diff --git a/lib/lib-es6-ts.js b/lib/lib-es6-ts.js index 13c89584..05cb410c 100644 --- a/lib/lib-es6-ts.js +++ b/lib/lib-es6-ts.js @@ -5,5 +5,5 @@ // This is a generated file from lib.es6.d.ts -define([], function() { return { contents: "/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved. \r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0 \r\n \r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, \r\nMERCHANTABLITY OR NON-INFRINGEMENT. \r\n \r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\n/// \r\ndeclare type PropertyKey = string | number | symbol;\r\n\r\ninterface Symbol {\r\n /** Returns a string representation of an object. */\r\n toString(): string;\r\n\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): Object;\r\n\r\n [Symbol.toStringTag]: \"Symbol\";\r\n}\r\n\r\ninterface SymbolConstructor {\r\n /** \r\n * A reference to the prototype. \r\n */\r\n prototype: Symbol;\r\n\r\n /**\r\n * Returns a new unique Symbol value.\r\n * @param description Description of the new Symbol object.\r\n */\r\n (description?: string|number): symbol;\r\n\r\n /**\r\n * Returns a Symbol object from the global symbol registry matching the given key if found. \r\n * Otherwise, returns a new symbol with this key.\r\n * @param key key to search for.\r\n */\r\n for(key: string): symbol;\r\n\r\n /**\r\n * Returns a key from the global symbol registry matching the given Symbol if found. \r\n * Otherwise, returns a undefined.\r\n * @param sym Symbol to find the key for.\r\n */\r\n keyFor(sym: symbol): string;\r\n\r\n // Well-known Symbols\r\n\r\n /** \r\n * A method that determines if a constructor object recognizes an object as one of the \r\n * constructor’s instances. Called by the semantics of the instanceof operator. \r\n */\r\n hasInstance: symbol;\r\n\r\n /** \r\n * A Boolean value that if true indicates that an object should flatten to its array elements\r\n * by Array.prototype.concat.\r\n */\r\n isConcatSpreadable: symbol;\r\n\r\n /** \r\n * A method that returns the default iterator for an object. Called by the semantics of the \r\n * for-of statement.\r\n */\r\n iterator: symbol;\r\n\r\n /**\r\n * A regular expression method that matches the regular expression against a string. Called \r\n * by the String.prototype.match method. \r\n */\r\n match: symbol;\r\n\r\n /** \r\n * A regular expression method that replaces matched substrings of a string. Called by the \r\n * String.prototype.replace method.\r\n */\r\n replace: symbol;\r\n\r\n /**\r\n * A regular expression method that returns the index within a string that matches the \r\n * regular expression. Called by the String.prototype.search method.\r\n */\r\n search: symbol;\r\n\r\n /** \r\n * A function valued property that is the constructor function that is used to create \r\n * derived objects.\r\n */\r\n species: symbol;\r\n\r\n /**\r\n * A regular expression method that splits a string at the indices that match the regular \r\n * expression. Called by the String.prototype.split method.\r\n */\r\n split: symbol;\r\n\r\n /** \r\n * A method that converts an object to a corresponding primitive value.\r\n * Called by the ToPrimitive abstract operation.\r\n */\r\n toPrimitive: symbol;\r\n\r\n /** \r\n * A String value that is used in the creation of the default string description of an object.\r\n * Called by the built-in method Object.prototype.toString.\r\n */\r\n toStringTag: symbol;\r\n\r\n /**\r\n * An Object whose own property names are property names that are excluded from the 'with'\r\n * environment bindings of the associated objects.\r\n */\r\n unscopables: symbol;\r\n}\r\ndeclare var Symbol: SymbolConstructor;\r\n\r\ninterface Object {\r\n /**\r\n * Determines whether an object has a property with the specified name. \r\n * @param v A property name.\r\n */\r\n hasOwnProperty(v: PropertyKey): boolean;\r\n\r\n /** \r\n * Determines whether a specified property is enumerable.\r\n * @param v A property name.\r\n */\r\n propertyIsEnumerable(v: PropertyKey): boolean;\r\n}\r\n\r\ninterface ObjectConstructor {\r\n /**\r\n * Copy the values of all of the enumerable own properties from one or more source objects to a \r\n * target object. Returns the target object.\r\n * @param target The target object to copy to.\r\n * @param source The source object from which to copy properties.\r\n */\r\n assign(target: T, source: U): T & U;\r\n\r\n /**\r\n * Copy the values of all of the enumerable own properties from one or more source objects to a \r\n * target object. Returns the target object.\r\n * @param target The target object to copy to.\r\n * @param source1 The first source object from which to copy properties.\r\n * @param source2 The second source object from which to copy properties.\r\n */\r\n assign(target: T, source1: U, source2: V): T & U & V;\r\n\r\n /**\r\n * Copy the values of all of the enumerable own properties from one or more source objects to a \r\n * target object. Returns the target object.\r\n * @param target The target object to copy to.\r\n * @param source1 The first source object from which to copy properties.\r\n * @param source2 The second source object from which to copy properties.\r\n * @param source3 The third source object from which to copy properties.\r\n */\r\n assign(target: T, source1: U, source2: V, source3: W): T & U & V & W;\r\n\r\n /**\r\n * Copy the values of all of the enumerable own properties from one or more source objects to a \r\n * target object. Returns the target object.\r\n * @param target The target object to copy to.\r\n * @param sources One or more source objects from which to copy properties\r\n */\r\n assign(target: any, ...sources: any[]): any;\r\n\r\n /**\r\n * Returns an array of all symbol properties found directly on object o.\r\n * @param o Object to retrieve the symbols from.\r\n */\r\n getOwnPropertySymbols(o: any): symbol[];\r\n\r\n /**\r\n * Returns true if the values are the same value, false otherwise.\r\n * @param value1 The first value.\r\n * @param value2 The second value.\r\n */\r\n is(value1: any, value2: any): boolean;\r\n\r\n /**\r\n * Sets the prototype of a specified object o to object proto or null. Returns the object o.\r\n * @param o The object to change its prototype.\r\n * @param proto The value of the new prototype or null.\r\n */\r\n setPrototypeOf(o: any, proto: any): any;\r\n\r\n /**\r\n * Gets the own property descriptor of the specified object. \r\n * An own property descriptor is one that is defined directly on the object and is not \r\n * inherited from the object's prototype. \r\n * @param o Object that contains the property.\r\n * @param p Name of the property.\r\n */\r\n getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor;\r\n\r\n /**\r\n * Adds a property to an object, or modifies attributes of an existing property. \r\n * @param o Object on which to add or modify the property. This can be a native JavaScript \r\n * object (that is, a user-defined object or a built in object) or a DOM object.\r\n * @param p The property name.\r\n * @param attributes Descriptor for the property. It can be for a data property or an accessor\r\n * property.\r\n */\r\n defineProperty(o: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): any;\r\n}\r\n\r\ninterface Function {\r\n /**\r\n * Returns the name of the function. Function names are read-only and can not be changed.\r\n */\r\n name: string;\r\n\r\n /**\r\n * Determines whether the given value inherits from this function if this function was used\r\n * as a constructor function.\r\n *\r\n * A constructor function can control which objects are recognized as its instances by\r\n * 'instanceof' by overriding this method.\r\n */\r\n [Symbol.hasInstance](value: any): boolean;\r\n}\r\n\r\ninterface NumberConstructor {\r\n /**\r\n * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1\r\n * that is representable as a Number value, which is approximately: \r\n * 2.2204460492503130808472633361816 x 10‍−‍16.\r\n */\r\n EPSILON: number;\r\n\r\n /**\r\n * Returns true if passed value is finite.\r\n * Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a \r\n * number. Only finite values of the type number, result in true.\r\n * @param number A numeric value.\r\n */\r\n isFinite(number: number): boolean;\r\n\r\n /**\r\n * Returns true if the value passed is an integer, false otherwise.\r\n * @param number A numeric value.\r\n */\r\n isInteger(number: number): boolean;\r\n\r\n /**\r\n * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a \r\n * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter\r\n * to a number. Only values of the type number, that are also NaN, result in true.\r\n * @param number A numeric value.\r\n */\r\n isNaN(number: number): boolean;\r\n\r\n /**\r\n * Returns true if the value passed is a safe integer.\r\n * @param number A numeric value.\r\n */\r\n isSafeInteger(number: number): boolean;\r\n\r\n /** \r\n * The value of the largest integer n such that n and n + 1 are both exactly representable as \r\n * a Number value. \r\n * The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1.\r\n */\r\n MAX_SAFE_INTEGER: number;\r\n\r\n /** \r\n * The value of the smallest integer n such that n and n − 1 are both exactly representable as \r\n * a Number value. \r\n * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).\r\n */\r\n MIN_SAFE_INTEGER: number;\r\n\r\n /**\r\n * Converts a string to a floating-point number. \r\n * @param string A string that contains a floating-point number. \r\n */\r\n parseFloat(string: string): number;\r\n\r\n /**\r\n * Converts A string to an integer.\r\n * @param s A string to convert into a number.\r\n * @param radix A value between 2 and 36 that specifies the base of the number in numString. \r\n * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\n * All other strings are considered decimal.\r\n */\r\n parseInt(string: string, radix?: number): number;\r\n}\r\n\r\ninterface Array {\r\n /** Iterator */\r\n [Symbol.iterator](): IterableIterator;\r\n\r\n /**\r\n * Returns an object whose properties have the value 'true'\r\n * when they will be absent when used in a 'with' statement.\r\n */\r\n [Symbol.unscopables](): {\r\n copyWithin: boolean;\r\n entries: boolean;\r\n fill: boolean;\r\n find: boolean;\r\n findIndex: boolean;\r\n keys: boolean;\r\n values: boolean;\r\n };\r\n\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, T]>;\r\n\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: T) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: T, start?: number, end?: number): T[];\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): T[];\r\n}\r\n\r\ninterface IArguments {\r\n /** Iterator */\r\n [Symbol.iterator](): IterableIterator;\r\n}\r\n\r\ninterface ArrayConstructor {\r\n /**\r\n * Creates an array from an array-like object.\r\n * @param arrayLike An array-like object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): Array;\r\n\r\n /**\r\n * Creates an array from an iterable object.\r\n * @param iterable An iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): Array;\r\n\r\n /**\r\n * Creates an array from an array-like object.\r\n * @param arrayLike An array-like object to convert to an array.\r\n */\r\n from(arrayLike: ArrayLike): Array;\r\n\r\n /**\r\n * Creates an array from an iterable object.\r\n * @param iterable An iterable object to convert to an array.\r\n */\r\n from(iterable: Iterable): Array;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: T[]): Array;\r\n}\r\n\r\ninterface String {\r\n /** Iterator */\r\n [Symbol.iterator](): IterableIterator;\r\n\r\n /**\r\n * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point \r\n * value of the UTF-16 encoded code point starting at the string element at position pos in \r\n * the String resulting from converting this object to a String. \r\n * If there is no element at that position, the result is undefined. \r\n * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.\r\n */\r\n codePointAt(pos: number): number;\r\n\r\n /**\r\n * Returns true if searchString appears as a substring of the result of converting this \r\n * object to a String, at one or more positions that are \r\n * greater than or equal to position; otherwise, returns false.\r\n * @param searchString search string \r\n * @param position If position is undefined, 0 is assumed, so as to search all of the String.\r\n */\r\n includes(searchString: string, position?: number): boolean;\r\n\r\n /**\r\n * Returns true if the sequence of elements of searchString converted to a String is the \r\n * same as the corresponding elements of this object (converted to a String) starting at \r\n * endPosition – length(this). Otherwise returns false.\r\n */\r\n endsWith(searchString: string, endPosition?: number): boolean;\r\n\r\n /**\r\n * Returns the String value result of normalizing the string into the normalization form \r\n * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.\r\n * @param form Applicable values: \"NFC\", \"NFD\", \"NFKC\", or \"NFKD\", If not specified default\r\n * is \"NFC\"\r\n */\r\n normalize(form?: string): string;\r\n\r\n /**\r\n * Returns a String value that is made from count copies appended together. If count is 0, \r\n * T is the empty String is returned.\r\n * @param count number of copies to append\r\n */\r\n repeat(count: number): string;\r\n\r\n /**\r\n * Returns true if the sequence of elements of searchString converted to a String is the \r\n * same as the corresponding elements of this object (converted to a String) starting at \r\n * position. Otherwise returns false.\r\n */\r\n startsWith(searchString: string, position?: number): boolean;\r\n\r\n // Overloads for objects with methods of well-known symbols.\r\n\r\n /**\r\n * Matches a string an object that supports being matched against, and returns an array containing the results of that search.\r\n * @param matcher An object that supports being matched against.\r\n */\r\n match(matcher: { [Symbol.match](string: string): RegExpMatchArray; }): RegExpMatchArray;\r\n\r\n /**\r\n * Replaces text in a string, using an object that supports replacement within a string.\r\n * @param searchValue A object can search for and replace matches within a string.\r\n * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.\r\n */\r\n replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;\r\n\r\n /**\r\n * Replaces text in a string, using an object that supports replacement within a string.\r\n * @param searchValue A object can search for and replace matches within a string.\r\n * @param replacer A function that returns the replacement text.\r\n */\r\n replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;\r\n\r\n /**\r\n * Finds the first substring match in a regular expression search.\r\n * @param searcher An object which supports searching within a string.\r\n */\r\n search(searcher: { [Symbol.search](string: string): number; }): number;\r\n\r\n /**\r\n * Split a string into substrings using the specified separator and return them as an array.\r\n * @param splitter An object that can split a string.\r\n * @param limit A value used to limit the number of elements returned in the array.\r\n */\r\n split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[];\r\n\r\n /**\r\n * Returns an HTML anchor element and sets the name attribute to the text value\r\n * @param name\r\n */\r\n anchor(name: string): string;\r\n\r\n /** Returns a HTML element */\r\n big(): string;\r\n\r\n /** Returns a HTML element */\r\n blink(): string;\r\n\r\n /** Returns a HTML element */\r\n bold(): string;\r\n\r\n /** Returns a HTML element */\r\n fixed(): string\r\n\r\n /** Returns a HTML element and sets the color attribute value */\r\n fontcolor(color: string): string\r\n\r\n /** Returns a HTML element and sets the size attribute value */\r\n fontsize(size: number): string;\r\n\r\n /** Returns a HTML element and sets the size attribute value */\r\n fontsize(size: string): string;\r\n\r\n /** Returns an HTML element */\r\n italics(): string;\r\n\r\n /** Returns an HTML element and sets the href attribute value */\r\n link(url: string): string;\r\n\r\n /** Returns a HTML element */\r\n small(): string;\r\n\r\n /** Returns a HTML element */\r\n strike(): string;\r\n\r\n /** Returns a HTML element */\r\n sub(): string;\r\n\r\n /** Returns a HTML element */\r\n sup(): string;\r\n}\r\n\r\ninterface StringConstructor {\r\n /**\r\n * Return the String value whose elements are, in order, the elements in the List elements.\r\n * If length is 0, the empty string is returned.\r\n */\r\n fromCodePoint(...codePoints: number[]): string;\r\n\r\n /**\r\n * String.raw is intended for use as a tag function of a Tagged Template String. When called\r\n * as such the first argument will be a well formed template call site object and the rest \r\n * parameter will contain the substitution values.\r\n * @param template A well-formed template string call site representation.\r\n * @param substitutions A set of substitution values.\r\n */\r\n raw(template: TemplateStringsArray, ...substitutions: any[]): string;\r\n}\r\n\r\ninterface IteratorResult {\r\n done: boolean;\r\n value?: T;\r\n}\r\n\r\ninterface Iterator {\r\n next(value?: any): IteratorResult;\r\n return?(value?: any): IteratorResult;\r\n throw?(e?: any): IteratorResult;\r\n}\r\n\r\ninterface Iterable {\r\n [Symbol.iterator](): Iterator;\r\n}\r\n\r\ninterface IterableIterator extends Iterator {\r\n [Symbol.iterator](): IterableIterator;\r\n}\r\n\r\ninterface GeneratorFunction extends Function {\r\n [Symbol.toStringTag]: \"GeneratorFunction\";\r\n}\r\n\r\ninterface GeneratorFunctionConstructor {\r\n /**\r\n * Creates a new Generator function.\r\n * @param args A list of arguments the function accepts.\r\n */\r\n new (...args: string[]): GeneratorFunction;\r\n (...args: string[]): GeneratorFunction;\r\n prototype: GeneratorFunction;\r\n}\r\ndeclare var GeneratorFunction: GeneratorFunctionConstructor;\r\n\r\ninterface Math {\r\n /**\r\n * Returns the number of leading zero bits in the 32-bit binary representation of a number.\r\n * @param x A numeric expression.\r\n */\r\n clz32(x: number): number;\r\n\r\n /**\r\n * Returns the result of 32-bit multiplication of two numbers.\r\n * @param x First number\r\n * @param y Second number\r\n */\r\n imul(x: number, y: number): number;\r\n\r\n /**\r\n * Returns the sign of the x, indicating whether x is positive, negative or zero.\r\n * @param x The numeric expression to test\r\n */\r\n sign(x: number): number;\r\n\r\n /**\r\n * Returns the base 10 logarithm of a number.\r\n * @param x A numeric expression.\r\n */\r\n log10(x: number): number;\r\n\r\n /**\r\n * Returns the base 2 logarithm of a number.\r\n * @param x A numeric expression.\r\n */\r\n log2(x: number): number;\r\n\r\n /**\r\n * Returns the natural logarithm of 1 + x.\r\n * @param x A numeric expression.\r\n */\r\n log1p(x: number): number;\r\n\r\n /**\r\n * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of \r\n * the natural logarithms).\r\n * @param x A numeric expression.\r\n */\r\n expm1(x: number): number;\r\n\r\n /**\r\n * Returns the hyperbolic cosine of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n cosh(x: number): number;\r\n\r\n /**\r\n * Returns the hyperbolic sine of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n sinh(x: number): number;\r\n\r\n /**\r\n * Returns the hyperbolic tangent of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n tanh(x: number): number;\r\n\r\n /**\r\n * Returns the inverse hyperbolic cosine of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n acosh(x: number): number;\r\n\r\n /**\r\n * Returns the inverse hyperbolic sine of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n asinh(x: number): number;\r\n\r\n /**\r\n * Returns the inverse hyperbolic tangent of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n atanh(x: number): number;\r\n\r\n /**\r\n * Returns the square root of the sum of squares of its arguments.\r\n * @param values Values to compute the square root for.\r\n * If no arguments are passed, the result is +0.\r\n * If there is only one argument, the result is the absolute value.\r\n * If any argument is +Infinity or -Infinity, the result is +Infinity.\r\n * If any argument is NaN, the result is NaN.\r\n * If all arguments are either +0 or −0, the result is +0.\r\n */\r\n hypot(...values: number[] ): number;\r\n\r\n /**\r\n * Returns the integral part of the a numeric expression, x, removing any fractional digits.\r\n * If x is already an integer, the result is x.\r\n * @param x A numeric expression.\r\n */\r\n trunc(x: number): number;\r\n\r\n /**\r\n * Returns the nearest single precision float representation of a number.\r\n * @param x A numeric expression.\r\n */\r\n fround(x: number): number;\r\n\r\n /**\r\n * Returns an implementation-dependent approximation to the cube root of number.\r\n * @param x A numeric expression.\r\n */\r\n cbrt(x: number): number;\r\n\r\n [Symbol.toStringTag]: \"Math\";\r\n}\r\n\r\ninterface Date {\r\n /**\r\n * Converts a Date object to a string.\r\n */\r\n [Symbol.toPrimitive](hint: \"default\"): string;\r\n /**\r\n * Converts a Date object to a string.\r\n */\r\n [Symbol.toPrimitive](hint: \"string\"): string;\r\n /**\r\n * Converts a Date object to a number.\r\n */\r\n [Symbol.toPrimitive](hint: \"number\"): number;\r\n /**\r\n * Converts a Date object to a string or number.\r\n *\r\n * @param hint The strings \"number\", \"string\", or \"default\" to specify what primitive to return.\r\n *\r\n * @throws {TypeError} If 'hint' was given something other than \"number\", \"string\", or \"default\".\r\n * @returns A number if 'hint' was \"number\", a string if 'hint' was \"string\" or \"default\".\r\n */\r\n [Symbol.toPrimitive](hint: string): string | number;\r\n}\r\n\r\ninterface RegExp {\r\n /**\r\n * Matches a string with this regular expression, and returns an array containing the results of\r\n * that search.\r\n * @param string A string to search within.\r\n */\r\n [Symbol.match](string: string): RegExpMatchArray;\r\n\r\n /**\r\n * Replaces text in a string, using this regular expression.\r\n * @param string A String object or string literal whose contents matching against\r\n * this regular expression will be replaced\r\n * @param replaceValue A String object or string literal containing the text to replace for every \r\n * successful match of this regular expression.\r\n */\r\n [Symbol.replace](string: string, replaceValue: string): string;\r\n\r\n /**\r\n * Replaces text in a string, using this regular expression.\r\n * @param string A String object or string literal whose contents matching against\r\n * this regular expression will be replaced\r\n * @param replacer A function that returns the replacement text.\r\n */\r\n [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;\r\n\r\n /**\r\n * Finds the position beginning first substring match in a regular expression search\r\n * using this regular expression.\r\n *\r\n * @param string The string to search within.\r\n */\r\n [Symbol.search](string: string): number;\r\n\r\n /**\r\n * Returns an array of substrings that were delimited by strings in the original input that\r\n * match against this regular expression.\r\n *\r\n * If the regular expression contains capturing parentheses, then each time this\r\n * regular expression matches, the results (including any undefined results) of the\r\n * capturing parentheses are spliced.\r\n *\r\n * @param string string value to split\r\n * @param limit if not undefined, the output array is truncated so that it contains no more\r\n * than 'limit' elements.\r\n */\r\n [Symbol.split](string: string, limit?: number): string[];\r\n\r\n /**\r\n * Returns a string indicating the flags of the regular expression in question. This field is read-only.\r\n * The characters in this string are sequenced and concatenated in the following order:\r\n *\r\n * - \"g\" for global\r\n * - \"i\" for ignoreCase\r\n * - \"m\" for multiline\r\n * - \"u\" for unicode\r\n * - \"y\" for sticky\r\n *\r\n * If no flags are set, the value is the empty string.\r\n */\r\n flags: string;\r\n\r\n /** \r\n * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular \r\n * expression. Default is false. Read-only. \r\n */\r\n sticky: boolean;\r\n\r\n /** \r\n * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular \r\n * expression. Default is false. Read-only. \r\n */\r\n unicode: boolean;\r\n}\r\n\r\ninterface RegExpConstructor {\r\n [Symbol.species](): RegExpConstructor;\r\n}\r\n\r\ninterface Map {\r\n clear(): void;\r\n delete(key: K): boolean;\r\n entries(): IterableIterator<[K, V]>;\r\n forEach(callbackfn: (value: V, index: K, map: Map) => void, thisArg?: any): void;\r\n get(key: K): V;\r\n has(key: K): boolean;\r\n keys(): IterableIterator;\r\n set(key: K, value?: V): Map;\r\n size: number;\r\n values(): IterableIterator;\r\n [Symbol.iterator]():IterableIterator<[K,V]>;\r\n [Symbol.toStringTag]: \"Map\";\r\n}\r\n\r\ninterface MapConstructor {\r\n new (): Map;\r\n new (): Map;\r\n new (iterable: Iterable<[K, V]>): Map;\r\n prototype: Map;\r\n}\r\ndeclare var Map: MapConstructor;\r\n\r\ninterface WeakMap {\r\n delete(key: K): boolean;\r\n get(key: K): V;\r\n has(key: K): boolean;\r\n set(key: K, value?: V): WeakMap;\r\n [Symbol.toStringTag]: \"WeakMap\";\r\n}\r\n\r\ninterface WeakMapConstructor {\r\n new (): WeakMap;\r\n new (): WeakMap;\r\n new (iterable: Iterable<[K, V]>): WeakMap;\r\n prototype: WeakMap;\r\n}\r\ndeclare var WeakMap: WeakMapConstructor;\r\n\r\ninterface Set {\r\n add(value: T): Set;\r\n clear(): void;\r\n delete(value: T): boolean;\r\n entries(): IterableIterator<[T, T]>;\r\n forEach(callbackfn: (value: T, index: T, set: Set) => void, thisArg?: any): void;\r\n has(value: T): boolean;\r\n keys(): IterableIterator;\r\n size: number;\r\n values(): IterableIterator;\r\n [Symbol.iterator]():IterableIterator;\r\n [Symbol.toStringTag]: \"Set\";\r\n}\r\n\r\ninterface SetConstructor {\r\n new (): Set;\r\n new (): Set;\r\n new (iterable: Iterable): Set;\r\n prototype: Set;\r\n}\r\ndeclare var Set: SetConstructor;\r\n\r\ninterface WeakSet {\r\n add(value: T): WeakSet;\r\n delete(value: T): boolean;\r\n has(value: T): boolean;\r\n [Symbol.toStringTag]: \"WeakSet\";\r\n}\r\n\r\ninterface WeakSetConstructor {\r\n new (): WeakSet;\r\n new (): WeakSet;\r\n new (iterable: Iterable): WeakSet;\r\n prototype: WeakSet;\r\n}\r\ndeclare var WeakSet: WeakSetConstructor;\r\n\r\ninterface JSON {\r\n [Symbol.toStringTag]: \"JSON\";\r\n}\r\n\r\n/**\r\n * Represents a raw buffer of binary data, which is used to store data for the \r\n * different typed arrays. ArrayBuffers cannot be read from or written to directly, \r\n * but can be passed to a typed array or DataView Object to interpret the raw \r\n * buffer as needed. \r\n */\r\ninterface ArrayBuffer {\r\n [Symbol.toStringTag]: \"ArrayBuffer\";\r\n}\r\n\r\ninterface DataView {\r\n [Symbol.toStringTag]: \"DataView\";\r\n}\r\n\r\n/**\r\n * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested \r\n * number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int8Array {\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n [Symbol.iterator](): IterableIterator;\r\n [Symbol.toStringTag]: \"Int8Array\";\r\n}\r\n\r\ninterface Int8ArrayConstructor {\r\n new (elements: Iterable): Int8Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;\r\n}\r\n\r\n/**\r\n * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint8Array {\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n [Symbol.iterator](): IterableIterator;\r\n [Symbol.toStringTag]: \"UInt8Array\";\r\n}\r\n\r\ninterface Uint8ArrayConstructor {\r\n new (elements: Iterable): Uint8Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;\r\n}\r\n\r\n/**\r\n * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0. \r\n * If the requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint8ClampedArray {\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n\r\n [Symbol.iterator](): IterableIterator;\r\n [Symbol.toStringTag]: \"Uint8ClampedArray\";\r\n}\r\n\r\ninterface Uint8ClampedArrayConstructor {\r\n new (elements: Iterable): Uint8ClampedArray;\r\n\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;\r\n}\r\n\r\n/**\r\n * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int16Array {\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n\r\n\r\n [Symbol.iterator](): IterableIterator;\r\n [Symbol.toStringTag]: \"Int16Array\";\r\n}\r\n\r\ninterface Int16ArrayConstructor {\r\n new (elements: Iterable): Int16Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;\r\n}\r\n\r\n/**\r\n * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint16Array {\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n [Symbol.iterator](): IterableIterator;\r\n [Symbol.toStringTag]: \"Uint16Array\";\r\n}\r\n\r\ninterface Uint16ArrayConstructor {\r\n new (elements: Iterable): Uint16Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;\r\n}\r\n\r\n/**\r\n * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int32Array {\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n [Symbol.iterator](): IterableIterator;\r\n [Symbol.toStringTag]: \"Int32Array\";\r\n}\r\n\r\ninterface Int32ArrayConstructor {\r\n new (elements: Iterable): Int32Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;\r\n}\r\n\r\n/**\r\n * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint32Array {\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n [Symbol.iterator](): IterableIterator;\r\n [Symbol.toStringTag]: \"Uint32Array\";\r\n}\r\n\r\ninterface Uint32ArrayConstructor {\r\n new (elements: Iterable): Uint32Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;\r\n}\r\n\r\n/**\r\n * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number\r\n * of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float32Array {\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n [Symbol.iterator](): IterableIterator;\r\n [Symbol.toStringTag]: \"Float32Array\";\r\n}\r\n\r\ninterface Float32ArrayConstructor {\r\n new (elements: Iterable): Float32Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;\r\n}\r\n\r\n/**\r\n * A typed array of 64-bit float values. The contents are initialized to 0. If the requested \r\n * number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float64Array {\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n [Symbol.iterator](): IterableIterator;\r\n [Symbol.toStringTag]: \"Float64Array\";\r\n}\r\n\r\ninterface Float64ArrayConstructor {\r\n new (elements: Iterable): Float64Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;\r\n}\r\n\r\ninterface ProxyHandler {\r\n getPrototypeOf? (target: T): any;\r\n setPrototypeOf? (target: T, v: any): boolean;\r\n isExtensible? (target: T): boolean;\r\n preventExtensions? (target: T): boolean;\r\n getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor;\r\n has? (target: T, p: PropertyKey): boolean;\r\n get? (target: T, p: PropertyKey, receiver: any): any;\r\n set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;\r\n deleteProperty? (target: T, p: PropertyKey): boolean;\r\n defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean;\r\n enumerate? (target: T): PropertyKey[];\r\n ownKeys? (target: T): PropertyKey[];\r\n apply? (target: T, thisArg: any, argArray?: any): any;\r\n construct? (target: T, thisArg: any, argArray?: any): any;\r\n}\r\n\r\ninterface ProxyConstructor {\r\n revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; };\r\n new (target: T, handler: ProxyHandler): T\r\n}\r\ndeclare var Proxy: ProxyConstructor;\r\n\r\ndeclare namespace Reflect {\r\n function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any;\r\n function construct(target: Function, argumentsList: ArrayLike, newTarget?: any): any;\r\n function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;\r\n function deleteProperty(target: any, propertyKey: PropertyKey): boolean;\r\n function enumerate(target: any): IterableIterator;\r\n function get(target: any, propertyKey: PropertyKey, receiver?: any): any;\r\n function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;\r\n function getPrototypeOf(target: any): any;\r\n function has(target: any, propertyKey: string): boolean;\r\n function has(target: any, propertyKey: symbol): boolean;\r\n function isExtensible(target: any): boolean;\r\n function ownKeys(target: any): Array;\r\n function preventExtensions(target: any): boolean;\r\n function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;\r\n function setPrototypeOf(target: any, proto: any): boolean;\r\n}\r\n\r\n/**\r\n * Represents the completion of an asynchronous operation\r\n */\r\ninterface Promise {\r\n /**\r\n * Attaches callbacks for the resolution and/or rejection of the Promise.\r\n * @param onfulfilled The callback to execute when the Promise is resolved.\r\n * @param onrejected The callback to execute when the Promise is rejected.\r\n * @returns A Promise for the completion of which ever callback is executed.\r\n */\r\n then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise;\r\n then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): Promise;\r\n\r\n /**\r\n * Attaches a callback for only the rejection of the Promise.\r\n * @param onrejected The callback to execute when the Promise is rejected.\r\n * @returns A Promise for the completion of the callback.\r\n */\r\n catch(onrejected?: (reason: any) => T | PromiseLike): Promise;\r\n catch(onrejected?: (reason: any) => void): Promise;\r\n\r\n [Symbol.toStringTag]: \"Promise\";\r\n}\r\n\r\ninterface PromiseConstructor {\r\n /** \r\n * A reference to the prototype. \r\n */\r\n prototype: Promise;\r\n\r\n /**\r\n * Creates a new Promise.\r\n * @param executor A callback used to initialize the promise. This callback is passed two arguments: \r\n * a resolve callback used resolve the promise with a value or the result of another promise, \r\n * and a reject callback used to reject the promise with a provided reason or error.\r\n */\r\n new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise;\r\n\r\n /**\r\n * Creates a Promise that is resolved with an array of results when all of the provided Promises \r\n * resolve, or rejected when any Promise is rejected.\r\n * @param values An array of Promises.\r\n * @returns A new Promise.\r\n */\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>;\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>;\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike ]): Promise<[T1, T2, T3, T4]>;\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>;\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>;\r\n all(values: Iterable>): Promise;\r\n\r\n /**\r\n * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved \r\n * or rejected.\r\n * @param values An array of Promises.\r\n * @returns A new Promise.\r\n */\r\n race(values: Iterable>): Promise;\r\n\r\n /**\r\n * Creates a new rejected promise for the provided reason.\r\n * @param reason The reason the promise was rejected.\r\n * @returns A new rejected Promise.\r\n */\r\n reject(reason: any): Promise;\r\n\r\n /**\r\n * Creates a new rejected promise for the provided reason.\r\n * @param reason The reason the promise was rejected.\r\n * @returns A new rejected Promise.\r\n */\r\n reject(reason: any): Promise;\r\n\r\n /**\r\n * Creates a new resolved promise for the provided value.\r\n * @param value A promise.\r\n * @returns A promise whose internal state matches the provided promise.\r\n */\r\n resolve(value: T | PromiseLike): Promise;\r\n\r\n /**\r\n * Creates a new resolved promise .\r\n * @returns A resolved promise.\r\n */\r\n resolve(): Promise;\r\n\r\n [Symbol.species]: Function;\r\n}\r\n\r\ndeclare var Promise: PromiseConstructor;\r\n/////////////////////////////\r\n/// ECMAScript APIs\r\n/////////////////////////////\r\n\r\ndeclare var NaN: number;\r\ndeclare var Infinity: number;\r\n\r\n/**\r\n * Evaluates JavaScript code and executes it. \r\n * @param x A String value that contains valid JavaScript code.\r\n */\r\ndeclare function eval(x: string): any;\r\n\r\n/**\r\n * Converts A string to an integer.\r\n * @param s A string to convert into a number.\r\n * @param radix A value between 2 and 36 that specifies the base of the number in numString. \r\n * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\n * All other strings are considered decimal.\r\n */\r\ndeclare function parseInt(s: string, radix?: number): number;\r\n\r\n/**\r\n * Converts a string to a floating-point number. \r\n * @param string A string that contains a floating-point number. \r\n */\r\ndeclare function parseFloat(string: string): number;\r\n\r\n/**\r\n * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number). \r\n * @param number A numeric value.\r\n */\r\ndeclare function isNaN(number: number): boolean;\r\n\r\n/** \r\n * Determines whether a supplied number is finite.\r\n * @param number Any numeric value.\r\n */\r\ndeclare function isFinite(number: number): boolean;\r\n\r\n/**\r\n * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).\r\n * @param encodedURI A value representing an encoded URI.\r\n */\r\ndeclare function decodeURI(encodedURI: string): string;\r\n\r\n/**\r\n * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).\r\n * @param encodedURIComponent A value representing an encoded URI component.\r\n */\r\ndeclare function decodeURIComponent(encodedURIComponent: string): string;\r\n\r\n/** \r\n * Encodes a text string as a valid Uniform Resource Identifier (URI)\r\n * @param uri A value representing an encoded URI.\r\n */\r\ndeclare function encodeURI(uri: string): string;\r\n\r\n/**\r\n * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).\r\n * @param uriComponent A value representing an encoded URI component.\r\n */\r\ndeclare function encodeURIComponent(uriComponent: string): string;\r\n\r\ninterface PropertyDescriptor {\r\n configurable?: boolean;\r\n enumerable?: boolean;\r\n value?: any;\r\n writable?: boolean;\r\n get? (): any;\r\n set? (v: any): void;\r\n}\r\n\r\ninterface PropertyDescriptorMap {\r\n [s: string]: PropertyDescriptor;\r\n}\r\n\r\ninterface Object {\r\n /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */\r\n constructor: Function;\r\n\r\n /** Returns a string representation of an object. */\r\n toString(): string;\r\n\r\n /** Returns a date converted to a string using the current locale. */\r\n toLocaleString(): string;\r\n\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): Object;\r\n\r\n /**\r\n * Determines whether an object has a property with the specified name. \r\n * @param v A property name.\r\n */\r\n hasOwnProperty(v: string): boolean;\r\n\r\n /**\r\n * Determines whether an object exists in another object's prototype chain. \r\n * @param v Another object whose prototype chain is to be checked.\r\n */\r\n isPrototypeOf(v: Object): boolean;\r\n\r\n /** \r\n * Determines whether a specified property is enumerable.\r\n * @param v A property name.\r\n */\r\n propertyIsEnumerable(v: string): boolean;\r\n}\r\n\r\ninterface ObjectConstructor {\r\n new (value?: any): Object;\r\n (): any;\r\n (value: any): any;\r\n\r\n /** A reference to the prototype for a class of objects. */\r\n prototype: Object;\r\n\r\n /** \r\n * Returns the prototype of an object. \r\n * @param o The object that references the prototype.\r\n */\r\n getPrototypeOf(o: any): any;\r\n\r\n /**\r\n * Gets the own property descriptor of the specified object. \r\n * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. \r\n * @param o Object that contains the property.\r\n * @param p Name of the property.\r\n */\r\n getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;\r\n\r\n /** \r\n * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly \r\n * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.\r\n * @param o Object that contains the own properties.\r\n */\r\n getOwnPropertyNames(o: any): string[];\r\n\r\n /** \r\n * Creates an object that has the specified prototype, and that optionally contains specified properties.\r\n * @param o Object to use as a prototype. May be null\r\n * @param properties JavaScript object that contains one or more property descriptors. \r\n */\r\n create(o: any, properties?: PropertyDescriptorMap): any;\r\n\r\n /**\r\n * Adds a property to an object, or modifies attributes of an existing property. \r\n * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.\r\n * @param p The property name.\r\n * @param attributes Descriptor for the property. It can be for a data property or an accessor property.\r\n */\r\n defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;\r\n\r\n /**\r\n * Adds one or more properties to an object, and/or modifies attributes of existing properties. \r\n * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.\r\n * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.\r\n */\r\n defineProperties(o: any, properties: PropertyDescriptorMap): any;\r\n\r\n /**\r\n * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.\r\n * @param o Object on which to lock the attributes. \r\n */\r\n seal(o: T): T;\r\n\r\n /**\r\n * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.\r\n * @param o Object on which to lock the attributes.\r\n */\r\n freeze(o: T): T;\r\n\r\n /**\r\n * Prevents the addition of new properties to an object.\r\n * @param o Object to make non-extensible. \r\n */\r\n preventExtensions(o: T): T;\r\n\r\n /**\r\n * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.\r\n * @param o Object to test. \r\n */\r\n isSealed(o: any): boolean;\r\n\r\n /**\r\n * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.\r\n * @param o Object to test. \r\n */\r\n isFrozen(o: any): boolean;\r\n\r\n /**\r\n * Returns a value that indicates whether new properties can be added to an object.\r\n * @param o Object to test. \r\n */\r\n isExtensible(o: any): boolean;\r\n\r\n /**\r\n * Returns the names of the enumerable properties and methods of an object.\r\n * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.\r\n */\r\n keys(o: any): string[];\r\n}\r\n\r\n/**\r\n * Provides functionality common to all JavaScript objects.\r\n */\r\ndeclare var Object: ObjectConstructor;\r\n\r\n/**\r\n * Creates a new function.\r\n */\r\ninterface Function {\r\n /**\r\n * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.\r\n * @param thisArg The object to be used as the this object.\r\n * @param argArray A set of arguments to be passed to the function.\r\n */\r\n apply(thisArg: any, argArray?: any): any;\r\n\r\n /**\r\n * Calls a method of an object, substituting another object for the current object.\r\n * @param thisArg The object to be used as the current object.\r\n * @param argArray A list of arguments to be passed to the method.\r\n */\r\n call(thisArg: any, ...argArray: any[]): any;\r\n\r\n /**\r\n * For a given function, creates a bound function that has the same body as the original function. \r\n * The this object of the bound function is associated with the specified object, and has the specified initial parameters.\r\n * @param thisArg An object to which the this keyword can refer inside the new function.\r\n * @param argArray A list of arguments to be passed to the new function.\r\n */\r\n bind(thisArg: any, ...argArray: any[]): any;\r\n\r\n prototype: any;\r\n length: number;\r\n\r\n // Non-standard extensions\r\n arguments: any;\r\n caller: Function;\r\n}\r\n\r\ninterface FunctionConstructor {\r\n /**\r\n * Creates a new function.\r\n * @param args A list of arguments the function accepts.\r\n */\r\n new (...args: string[]): Function;\r\n (...args: string[]): Function;\r\n prototype: Function;\r\n}\r\n\r\ndeclare var Function: FunctionConstructor;\r\n\r\ninterface IArguments {\r\n [index: number]: any;\r\n length: number;\r\n callee: Function;\r\n}\r\n\r\ninterface String {\r\n /** Returns a string representation of a string. */\r\n toString(): string;\r\n\r\n /**\r\n * Returns the character at the specified index.\r\n * @param pos The zero-based index of the desired character.\r\n */\r\n charAt(pos: number): string;\r\n\r\n /** \r\n * Returns the Unicode value of the character at the specified location.\r\n * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.\r\n */\r\n charCodeAt(index: number): number;\r\n\r\n /**\r\n * Returns a string that contains the concatenation of two or more strings.\r\n * @param strings The strings to append to the end of the string. \r\n */\r\n concat(...strings: string[]): string;\r\n\r\n /**\r\n * Returns the position of the first occurrence of a substring. \r\n * @param searchString The substring to search for in the string\r\n * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.\r\n */\r\n indexOf(searchString: string, position?: number): number;\r\n\r\n /**\r\n * Returns the last occurrence of a substring in the string.\r\n * @param searchString The substring to search for.\r\n * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.\r\n */\r\n lastIndexOf(searchString: string, position?: number): number;\r\n\r\n /**\r\n * Determines whether two strings are equivalent in the current locale.\r\n * @param that String to compare to target string\r\n */\r\n localeCompare(that: string): number;\r\n\r\n /** \r\n * Matches a string with a regular expression, and returns an array containing the results of that search.\r\n * @param regexp A variable name or string literal containing the regular expression pattern and flags.\r\n */\r\n match(regexp: string): RegExpMatchArray;\r\n\r\n /** \r\n * Matches a string with a regular expression, and returns an array containing the results of that search.\r\n * @param regexp A regular expression object that contains the regular expression pattern and applicable flags. \r\n */\r\n match(regexp: RegExp): RegExpMatchArray;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A string that represents the regular expression.\r\n * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.\r\n */\r\n replace(searchValue: string, replaceValue: string): string;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A string that represents the regular expression.\r\n * @param replacer A function that returns the replacement text.\r\n */\r\n replace(searchValue: string, replacer: (substring: string, ...args: any[]) => string): string;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags.\r\n * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.\r\n */\r\n replace(searchValue: RegExp, replaceValue: string): string;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags\r\n * @param replacer A function that returns the replacement text.\r\n */\r\n replace(searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string;\r\n\r\n /**\r\n * Finds the first substring match in a regular expression search.\r\n * @param regexp The regular expression pattern and applicable flags. \r\n */\r\n search(regexp: string): number;\r\n\r\n /**\r\n * Finds the first substring match in a regular expression search.\r\n * @param regexp The regular expression pattern and applicable flags. \r\n */\r\n search(regexp: RegExp): number;\r\n\r\n /**\r\n * Returns a section of a string.\r\n * @param start The index to the beginning of the specified portion of stringObj. \r\n * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. \r\n * If this value is not specified, the substring continues to the end of stringObj.\r\n */\r\n slice(start?: number, end?: number): string;\r\n\r\n /**\r\n * Split a string into substrings using the specified separator and return them as an array.\r\n * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. \r\n * @param limit A value used to limit the number of elements returned in the array.\r\n */\r\n split(separator: string, limit?: number): string[];\r\n\r\n /**\r\n * Split a string into substrings using the specified separator and return them as an array.\r\n * @param separator A Regular Express that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. \r\n * @param limit A value used to limit the number of elements returned in the array.\r\n */\r\n split(separator: RegExp, limit?: number): string[];\r\n\r\n /**\r\n * Returns the substring at the specified location within a String object. \r\n * @param start The zero-based index number indicating the beginning of the substring.\r\n * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.\r\n * If end is omitted, the characters from start through the end of the original string are returned.\r\n */\r\n substring(start: number, end?: number): string;\r\n\r\n /** Converts all the alphabetic characters in a string to lowercase. */\r\n toLowerCase(): string;\r\n\r\n /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */\r\n toLocaleLowerCase(): string;\r\n\r\n /** Converts all the alphabetic characters in a string to uppercase. */\r\n toUpperCase(): string;\r\n\r\n /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */\r\n toLocaleUpperCase(): string;\r\n\r\n /** Removes the leading and trailing white space and line terminator characters from a string. */\r\n trim(): string;\r\n\r\n /** Returns the length of a String object. */\r\n length: number;\r\n\r\n // IE extensions\r\n /**\r\n * Gets a substring beginning at the specified location and having the specified length.\r\n * @param from The starting position of the desired substring. The index of the first character in the string is zero.\r\n * @param length The number of characters to include in the returned substring.\r\n */\r\n substr(from: number, length?: number): string;\r\n\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): string;\r\n\r\n [index: number]: string;\r\n}\r\n\r\ninterface StringConstructor {\r\n new (value?: any): String;\r\n (value?: any): string;\r\n prototype: String;\r\n fromCharCode(...codes: number[]): string;\r\n}\r\n\r\n/** \r\n * Allows manipulation and formatting of text strings and determination and location of substrings within strings. \r\n */\r\ndeclare var String: StringConstructor;\r\n\r\ninterface Boolean {\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): boolean;\r\n}\r\n\r\ninterface BooleanConstructor {\r\n new (value?: any): Boolean;\r\n (value?: any): boolean;\r\n prototype: Boolean;\r\n}\r\n\r\ndeclare var Boolean: BooleanConstructor;\r\n\r\ninterface Number {\r\n /**\r\n * Returns a string representation of an object.\r\n * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.\r\n */\r\n toString(radix?: number): string;\r\n\r\n /** \r\n * Returns a string representing a number in fixed-point notation.\r\n * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.\r\n */\r\n toFixed(fractionDigits?: number): string;\r\n\r\n /**\r\n * Returns a string containing a number represented in exponential notation.\r\n * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.\r\n */\r\n toExponential(fractionDigits?: number): string;\r\n\r\n /**\r\n * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.\r\n * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.\r\n */\r\n toPrecision(precision?: number): string;\r\n\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): number;\r\n}\r\n\r\ninterface NumberConstructor {\r\n new (value?: any): Number;\r\n (value?: any): number;\r\n prototype: Number;\r\n\r\n /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */\r\n MAX_VALUE: number;\r\n\r\n /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */\r\n MIN_VALUE: number;\r\n\r\n /** \r\n * A value that is not a number.\r\n * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.\r\n */\r\n NaN: number;\r\n\r\n /** \r\n * A value that is less than the largest negative number that can be represented in JavaScript.\r\n * JavaScript displays NEGATIVE_INFINITY values as -infinity. \r\n */\r\n NEGATIVE_INFINITY: number;\r\n\r\n /**\r\n * A value greater than the largest number that can be represented in JavaScript. \r\n * JavaScript displays POSITIVE_INFINITY values as infinity. \r\n */\r\n POSITIVE_INFINITY: number;\r\n}\r\n\r\n/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */\r\ndeclare var Number: NumberConstructor;\r\n\r\ninterface TemplateStringsArray extends Array {\r\n raw: string[];\r\n}\r\n\r\ninterface Math {\r\n /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */\r\n E: number;\r\n /** The natural logarithm of 10. */\r\n LN10: number;\r\n /** The natural logarithm of 2. */\r\n LN2: number;\r\n /** The base-2 logarithm of e. */\r\n LOG2E: number;\r\n /** The base-10 logarithm of e. */\r\n LOG10E: number;\r\n /** Pi. This is the ratio of the circumference of a circle to its diameter. */\r\n PI: number;\r\n /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */\r\n SQRT1_2: number;\r\n /** The square root of 2. */\r\n SQRT2: number;\r\n /**\r\n * Returns the absolute value of a number (the value without regard to whether it is positive or negative). \r\n * For example, the absolute value of -5 is the same as the absolute value of 5.\r\n * @param x A numeric expression for which the absolute value is needed.\r\n */\r\n abs(x: number): number;\r\n /**\r\n * Returns the arc cosine (or inverse cosine) of a number. \r\n * @param x A numeric expression.\r\n */\r\n acos(x: number): number;\r\n /** \r\n * Returns the arcsine of a number. \r\n * @param x A numeric expression.\r\n */\r\n asin(x: number): number;\r\n /**\r\n * Returns the arctangent of a number. \r\n * @param x A numeric expression for which the arctangent is needed.\r\n */\r\n atan(x: number): number;\r\n /**\r\n * Returns the angle (in radians) from the X axis to a point.\r\n * @param y A numeric expression representing the cartesian y-coordinate.\r\n * @param x A numeric expression representing the cartesian x-coordinate.\r\n */\r\n atan2(y: number, x: number): number;\r\n /**\r\n * Returns the smallest number greater than or equal to its numeric argument. \r\n * @param x A numeric expression.\r\n */\r\n ceil(x: number): number;\r\n /**\r\n * Returns the cosine of a number. \r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n cos(x: number): number;\r\n /**\r\n * Returns e (the base of natural logarithms) raised to a power. \r\n * @param x A numeric expression representing the power of e.\r\n */\r\n exp(x: number): number;\r\n /**\r\n * Returns the greatest number less than or equal to its numeric argument. \r\n * @param x A numeric expression.\r\n */\r\n floor(x: number): number;\r\n /**\r\n * Returns the natural logarithm (base e) of a number. \r\n * @param x A numeric expression.\r\n */\r\n log(x: number): number;\r\n /**\r\n * Returns the larger of a set of supplied numeric expressions. \r\n * @param values Numeric expressions to be evaluated.\r\n */\r\n max(...values: number[]): number;\r\n /**\r\n * Returns the smaller of a set of supplied numeric expressions. \r\n * @param values Numeric expressions to be evaluated.\r\n */\r\n min(...values: number[]): number;\r\n /**\r\n * Returns the value of a base expression taken to a specified power. \r\n * @param x The base value of the expression.\r\n * @param y The exponent value of the expression.\r\n */\r\n pow(x: number, y: number): number;\r\n /** Returns a pseudorandom number between 0 and 1. */\r\n random(): number;\r\n /** \r\n * Returns a supplied numeric expression rounded to the nearest number.\r\n * @param x The value to be rounded to the nearest number.\r\n */\r\n round(x: number): number;\r\n /**\r\n * Returns the sine of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n sin(x: number): number;\r\n /**\r\n * Returns the square root of a number.\r\n * @param x A numeric expression.\r\n */\r\n sqrt(x: number): number;\r\n /**\r\n * Returns the tangent of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n tan(x: number): number;\r\n}\r\n/** An intrinsic object that provides basic mathematics functionality and constants. */\r\ndeclare var Math: Math;\r\n\r\n/** Enables basic storage and retrieval of dates and times. */\r\ninterface Date {\r\n /** Returns a string representation of a date. The format of the string depends on the locale. */\r\n toString(): string;\r\n /** Returns a date as a string value. */\r\n toDateString(): string;\r\n /** Returns a time as a string value. */\r\n toTimeString(): string;\r\n /** Returns a value as a string value appropriate to the host environment's current locale. */\r\n toLocaleString(): string;\r\n /** Returns a date as a string value appropriate to the host environment's current locale. */\r\n toLocaleDateString(): string;\r\n /** Returns a time as a string value appropriate to the host environment's current locale. */\r\n toLocaleTimeString(): string;\r\n /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */\r\n valueOf(): number;\r\n /** Gets the time value in milliseconds. */\r\n getTime(): number;\r\n /** Gets the year, using local time. */\r\n getFullYear(): number;\r\n /** Gets the year using Universal Coordinated Time (UTC). */\r\n getUTCFullYear(): number;\r\n /** Gets the month, using local time. */\r\n getMonth(): number;\r\n /** Gets the month of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCMonth(): number;\r\n /** Gets the day-of-the-month, using local time. */\r\n getDate(): number;\r\n /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */\r\n getUTCDate(): number;\r\n /** Gets the day of the week, using local time. */\r\n getDay(): number;\r\n /** Gets the day of the week using Universal Coordinated Time (UTC). */\r\n getUTCDay(): number;\r\n /** Gets the hours in a date, using local time. */\r\n getHours(): number;\r\n /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */\r\n getUTCHours(): number;\r\n /** Gets the minutes of a Date object, using local time. */\r\n getMinutes(): number;\r\n /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCMinutes(): number;\r\n /** Gets the seconds of a Date object, using local time. */\r\n getSeconds(): number;\r\n /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCSeconds(): number;\r\n /** Gets the milliseconds of a Date, using local time. */\r\n getMilliseconds(): number;\r\n /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCMilliseconds(): number;\r\n /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */\r\n getTimezoneOffset(): number;\r\n /** \r\n * Sets the date and time value in the Date object.\r\n * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. \r\n */\r\n setTime(time: number): number;\r\n /**\r\n * Sets the milliseconds value in the Date object using local time. \r\n * @param ms A numeric value equal to the millisecond value.\r\n */\r\n setMilliseconds(ms: number): number;\r\n /** \r\n * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).\r\n * @param ms A numeric value equal to the millisecond value. \r\n */\r\n setUTCMilliseconds(ms: number): number;\r\n\r\n /**\r\n * Sets the seconds value in the Date object using local time. \r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setSeconds(sec: number, ms?: number): number;\r\n /**\r\n * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).\r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setUTCSeconds(sec: number, ms?: number): number;\r\n /**\r\n * Sets the minutes value in the Date object using local time. \r\n * @param min A numeric value equal to the minutes value. \r\n * @param sec A numeric value equal to the seconds value. \r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setMinutes(min: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).\r\n * @param min A numeric value equal to the minutes value. \r\n * @param sec A numeric value equal to the seconds value. \r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setUTCMinutes(min: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the hour value in the Date object using local time.\r\n * @param hours A numeric value equal to the hours value.\r\n * @param min A numeric value equal to the minutes value.\r\n * @param sec A numeric value equal to the seconds value. \r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setHours(hours: number, min?: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the hours value in the Date object using Universal Coordinated Time (UTC).\r\n * @param hours A numeric value equal to the hours value.\r\n * @param min A numeric value equal to the minutes value.\r\n * @param sec A numeric value equal to the seconds value. \r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the numeric day-of-the-month value of the Date object using local time. \r\n * @param date A numeric value equal to the day of the month.\r\n */\r\n setDate(date: number): number;\r\n /** \r\n * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).\r\n * @param date A numeric value equal to the day of the month. \r\n */\r\n setUTCDate(date: number): number;\r\n /** \r\n * Sets the month value in the Date object using local time. \r\n * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. \r\n * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.\r\n */\r\n setMonth(month: number, date?: number): number;\r\n /**\r\n * Sets the month value in the Date object using Universal Coordinated Time (UTC).\r\n * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.\r\n * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.\r\n */\r\n setUTCMonth(month: number, date?: number): number;\r\n /**\r\n * Sets the year of the Date object using local time.\r\n * @param year A numeric value for the year.\r\n * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.\r\n * @param date A numeric value equal for the day of the month.\r\n */\r\n setFullYear(year: number, month?: number, date?: number): number;\r\n /**\r\n * Sets the year value in the Date object using Universal Coordinated Time (UTC).\r\n * @param year A numeric value equal to the year.\r\n * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.\r\n * @param date A numeric value equal to the day of the month.\r\n */\r\n setUTCFullYear(year: number, month?: number, date?: number): number;\r\n /** Returns a date converted to a string using Universal Coordinated Time (UTC). */\r\n toUTCString(): string;\r\n /** Returns a date as a string value in ISO format. */\r\n toISOString(): string;\r\n /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */\r\n toJSON(key?: any): string;\r\n}\r\n\r\ninterface DateConstructor {\r\n new (): Date;\r\n new (value: number): Date;\r\n new (value: string): Date;\r\n new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;\r\n (): string;\r\n prototype: Date;\r\n /**\r\n * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.\r\n * @param s A date string\r\n */\r\n parse(s: string): number;\r\n /**\r\n * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. \r\n * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.\r\n * @param month The month as an number between 0 and 11 (January to December).\r\n * @param date The date as an number between 1 and 31.\r\n * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.\r\n * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.\r\n * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.\r\n * @param ms An number from 0 to 999 that specifies the milliseconds.\r\n */\r\n UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;\r\n now(): number;\r\n}\r\n\r\ndeclare var Date: DateConstructor;\r\n\r\ninterface RegExpMatchArray extends Array {\r\n index?: number;\r\n input?: string;\r\n}\r\n\r\ninterface RegExpExecArray extends Array {\r\n index: number;\r\n input: string;\r\n}\r\n\r\ninterface RegExp {\r\n /** \r\n * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.\r\n * @param string The String object or string literal on which to perform the search.\r\n */\r\n exec(string: string): RegExpExecArray;\r\n\r\n /** \r\n * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.\r\n * @param string String on which to perform the search.\r\n */\r\n test(string: string): boolean;\r\n\r\n /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */\r\n source: string;\r\n\r\n /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */\r\n global: boolean;\r\n\r\n /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */\r\n ignoreCase: boolean;\r\n\r\n /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */\r\n multiline: boolean;\r\n\r\n lastIndex: number;\r\n\r\n // Non-standard extensions\r\n compile(): RegExp;\r\n}\r\n\r\ninterface RegExpConstructor {\r\n new (pattern: string, flags?: string): RegExp;\r\n (pattern: string, flags?: string): RegExp;\r\n prototype: RegExp;\r\n\r\n // Non-standard extensions\r\n $1: string;\r\n $2: string;\r\n $3: string;\r\n $4: string;\r\n $5: string;\r\n $6: string;\r\n $7: string;\r\n $8: string;\r\n $9: string;\r\n lastMatch: string;\r\n}\r\n\r\ndeclare var RegExp: RegExpConstructor;\r\n\r\ninterface Error {\r\n name: string;\r\n message: string;\r\n}\r\n\r\ninterface ErrorConstructor {\r\n new (message?: string): Error;\r\n (message?: string): Error;\r\n prototype: Error;\r\n}\r\n\r\ndeclare var Error: ErrorConstructor;\r\n\r\ninterface EvalError extends Error {\r\n}\r\n\r\ninterface EvalErrorConstructor {\r\n new (message?: string): EvalError;\r\n (message?: string): EvalError;\r\n prototype: EvalError;\r\n}\r\n\r\ndeclare var EvalError: EvalErrorConstructor;\r\n\r\ninterface RangeError extends Error {\r\n}\r\n\r\ninterface RangeErrorConstructor {\r\n new (message?: string): RangeError;\r\n (message?: string): RangeError;\r\n prototype: RangeError;\r\n}\r\n\r\ndeclare var RangeError: RangeErrorConstructor;\r\n\r\ninterface ReferenceError extends Error {\r\n}\r\n\r\ninterface ReferenceErrorConstructor {\r\n new (message?: string): ReferenceError;\r\n (message?: string): ReferenceError;\r\n prototype: ReferenceError;\r\n}\r\n\r\ndeclare var ReferenceError: ReferenceErrorConstructor;\r\n\r\ninterface SyntaxError extends Error {\r\n}\r\n\r\ninterface SyntaxErrorConstructor {\r\n new (message?: string): SyntaxError;\r\n (message?: string): SyntaxError;\r\n prototype: SyntaxError;\r\n}\r\n\r\ndeclare var SyntaxError: SyntaxErrorConstructor;\r\n\r\ninterface TypeError extends Error {\r\n}\r\n\r\ninterface TypeErrorConstructor {\r\n new (message?: string): TypeError;\r\n (message?: string): TypeError;\r\n prototype: TypeError;\r\n}\r\n\r\ndeclare var TypeError: TypeErrorConstructor;\r\n\r\ninterface URIError extends Error {\r\n}\r\n\r\ninterface URIErrorConstructor {\r\n new (message?: string): URIError;\r\n (message?: string): URIError;\r\n prototype: URIError;\r\n}\r\n\r\ndeclare var URIError: URIErrorConstructor;\r\n\r\ninterface JSON {\r\n /**\r\n * Converts a JavaScript Object Notation (JSON) string into an object.\r\n * @param text A valid JSON string.\r\n * @param reviver A function that transforms the results. This function is called for each member of the object. \r\n * If a member contains nested objects, the nested objects are transformed before the parent object is. \r\n */\r\n parse(text: string, reviver?: (key: any, value: any) => any): any;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n */\r\n stringify(value: any): string;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer A function that transforms the results.\r\n */\r\n stringify(value: any, replacer: (key: string, value: any) => any): string;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer Array that transforms the results.\r\n */\r\n stringify(value: any, replacer: any[]): string;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer A function that transforms the results.\r\n * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\r\n */\r\n stringify(value: any, replacer: (key: string, value: any) => any, space: string | number): string;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer Array that transforms the results.\r\n * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\r\n */\r\n stringify(value: any, replacer: any[], space: string | number): string;\r\n}\r\n/**\r\n * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.\r\n */\r\ndeclare var JSON: JSON;\r\n\r\n\r\n/////////////////////////////\r\n/// ECMAScript Array API (specially handled by compiler)\r\n/////////////////////////////\r\n\r\ninterface Array {\r\n /**\r\n * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.\r\n */\r\n length: number;\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n toLocaleString(): string;\r\n /**\r\n * Appends new elements to an array, and returns the new length of the array.\r\n * @param items New elements of the Array.\r\n */\r\n push(...items: T[]): number;\r\n /**\r\n * Removes the last element from an array and returns it.\r\n */\r\n pop(): T;\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat(...items: U[]): T[];\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat(...items: T[]): T[];\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): T[];\r\n /**\r\n * Removes the first element from an array and returns it.\r\n */\r\n shift(): T;\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): T[];\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: T, b: T) => number): T[];\r\n\r\n /**\r\n * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.\r\n * @param start The zero-based location in the array from which to start removing elements.\r\n */\r\n splice(start: number): T[];\r\n\r\n /**\r\n * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.\r\n * @param start The zero-based location in the array from which to start removing elements.\r\n * @param deleteCount The number of elements to remove.\r\n * @param items Elements to insert into the array in place of the deleted elements.\r\n */\r\n splice(start: number, deleteCount: number, ...items: T[]): T[];\r\n\r\n /**\r\n * Inserts new elements at the start of an array.\r\n * @param items Elements to insert at the start of the Array.\r\n */\r\n unshift(...items: T[]): number;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.\r\n */\r\n indexOf(searchElement: T, fromIndex?: number): number;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a specified value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.\r\n */\r\n lastIndexOf(searchElement: T, fromIndex?: number): number;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[];\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;\r\n\r\n [n: number]: T;\r\n}\r\n\r\ninterface ArrayConstructor {\r\n new (arrayLength?: number): any[];\r\n new (arrayLength: number): T[];\r\n new (...items: T[]): T[];\r\n (arrayLength?: number): any[];\r\n (arrayLength: number): T[];\r\n (...items: T[]): T[];\r\n isArray(arg: any): arg is Array;\r\n prototype: Array;\r\n}\r\n\r\ndeclare var Array: ArrayConstructor;\r\n\r\ninterface TypedPropertyDescriptor {\r\n enumerable?: boolean;\r\n configurable?: boolean;\r\n writable?: boolean;\r\n value?: T;\r\n get?: () => T;\r\n set?: (value: T) => void;\r\n}\r\n\r\ndeclare type ClassDecorator = (target: TFunction) => TFunction | void;\r\ndeclare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;\r\ndeclare type MethodDecorator = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor | void;\r\ndeclare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;\r\n\r\ndeclare type PromiseConstructorLike = new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike;\r\n\r\ninterface PromiseLike {\r\n /**\r\n * Attaches callbacks for the resolution and/or rejection of the Promise.\r\n * @param onfulfilled The callback to execute when the Promise is resolved.\r\n * @param onrejected The callback to execute when the Promise is rejected.\r\n * @returns A Promise for the completion of which ever callback is executed.\r\n */\r\n then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike;\r\n then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): PromiseLike;\r\n}\r\n\r\ninterface ArrayLike {\r\n length: number;\r\n [n: number]: T;\r\n}\r\n\r\n\r\n/**\r\n * Represents a raw buffer of binary data, which is used to store data for the \r\n * different typed arrays. ArrayBuffers cannot be read from or written to directly, \r\n * but can be passed to a typed array or DataView Object to interpret the raw \r\n * buffer as needed. \r\n */\r\ninterface ArrayBuffer {\r\n /**\r\n * Read-only. The length of the ArrayBuffer (in bytes).\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * Returns a section of an ArrayBuffer.\r\n */\r\n slice(begin:number, end?:number): ArrayBuffer;\r\n}\r\n\r\ninterface ArrayBufferConstructor {\r\n prototype: ArrayBuffer;\r\n new (byteLength: number): ArrayBuffer;\r\n isView(arg: any): arg is ArrayBufferView;\r\n}\r\ndeclare var ArrayBuffer: ArrayBufferConstructor;\r\n\r\ninterface ArrayBufferView {\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n}\r\n\r\ninterface DataView {\r\n buffer: ArrayBuffer;\r\n byteLength: number;\r\n byteOffset: number;\r\n /**\r\n * Gets the Float32 value at the specified byte offset from the start of the view. There is \r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getFloat32(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Float64 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getFloat64(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Int8 value at the specified byte offset from the start of the view. There is \r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getInt8(byteOffset: number): number;\r\n\r\n /**\r\n * Gets the Int16 value at the specified byte offset from the start of the view. There is \r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getInt16(byteOffset: number, littleEndian?: boolean): number;\r\n /**\r\n * Gets the Int32 value at the specified byte offset from the start of the view. There is \r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getInt32(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Uint8 value at the specified byte offset from the start of the view. There is \r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getUint8(byteOffset: number): number;\r\n\r\n /**\r\n * Gets the Uint16 value at the specified byte offset from the start of the view. There is \r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getUint16(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Uint32 value at the specified byte offset from the start of the view. There is \r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getUint32(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Stores an Float32 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, \r\n * otherwise a little-endian value should be written.\r\n */\r\n setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Float64 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, \r\n * otherwise a little-endian value should be written.\r\n */\r\n setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Int8 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n */\r\n setInt8(byteOffset: number, value: number): void;\r\n\r\n /**\r\n * Stores an Int16 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, \r\n * otherwise a little-endian value should be written.\r\n */\r\n setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Int32 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, \r\n * otherwise a little-endian value should be written.\r\n */\r\n setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Uint8 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n */\r\n setUint8(byteOffset: number, value: number): void;\r\n\r\n /**\r\n * Stores an Uint16 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, \r\n * otherwise a little-endian value should be written.\r\n */\r\n setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Uint32 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, \r\n * otherwise a little-endian value should be written.\r\n */\r\n setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n}\r\n\r\ninterface DataViewConstructor {\r\n new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;\r\n}\r\ndeclare var DataView: DataViewConstructor;\r\n\r\n/**\r\n * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested \r\n * number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int8Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Int8Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Int8Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): Int8Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Int8Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Int8Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Int8Array;\r\n\r\n /**\r\n * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Int8Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\ninterface Int8ArrayConstructor {\r\n prototype: Int8Array;\r\n new (length: number): Int8Array;\r\n new (array: ArrayLike): Int8Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Int8Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;\r\n\r\n}\r\ndeclare var Int8Array: Int8ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint8Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Uint8Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Uint8Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): Uint8Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Uint8Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint8Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Uint8Array;\r\n\r\n /**\r\n * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint8Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint8ArrayConstructor {\r\n prototype: Uint8Array;\r\n new (length: number): Uint8Array;\r\n new (array: ArrayLike): Uint8Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint8Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;\r\n\r\n}\r\ndeclare var Uint8Array: Uint8ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0. \r\n * If the requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint8ClampedArray {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): Uint8ClampedArray;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Uint8ClampedArray;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: Uint8ClampedArray, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Uint8ClampedArray;\r\n\r\n /**\r\n * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint8ClampedArrayConstructor {\r\n prototype: Uint8ClampedArray;\r\n new (length: number): Uint8ClampedArray;\r\n new (array: ArrayLike): Uint8ClampedArray;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint8ClampedArray;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;\r\n}\r\ndeclare var Uint8ClampedArray: Uint8ClampedArrayConstructor;\r\n\r\n/**\r\n * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int16Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Int16Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Int16Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): Int16Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Int16Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Int16Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Int16Array;\r\n\r\n /**\r\n * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Int16Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Int16ArrayConstructor {\r\n prototype: Int16Array;\r\n new (length: number): Int16Array;\r\n new (array: ArrayLike): Int16Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Int16Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;\r\n\r\n}\r\ndeclare var Int16Array: Int16ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint16Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Uint16Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Uint16Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): Uint16Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Uint16Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint16Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Uint16Array;\r\n\r\n /**\r\n * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint16Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint16ArrayConstructor {\r\n prototype: Uint16Array;\r\n new (length: number): Uint16Array;\r\n new (array: ArrayLike): Uint16Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint16Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;\r\n\r\n}\r\ndeclare var Uint16Array: Uint16ArrayConstructor;\r\n/**\r\n * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int32Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Int32Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Int32Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): Int32Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Int32Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Int32Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Int32Array;\r\n\r\n /**\r\n * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Int32Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Int32ArrayConstructor {\r\n prototype: Int32Array;\r\n new (length: number): Int32Array;\r\n new (array: ArrayLike): Int32Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Int32Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;\r\n}\r\ndeclare var Int32Array: Int32ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint32Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Uint32Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Uint32Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): Uint32Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Uint32Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint32Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Uint32Array;\r\n\r\n /**\r\n * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint32Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint32ArrayConstructor {\r\n prototype: Uint32Array;\r\n new (length: number): Uint32Array;\r\n new (array: ArrayLike): Uint32Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint32Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;\r\n}\r\ndeclare var Uint32Array: Uint32ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number\r\n * of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float32Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Float32Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Float32Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): Float32Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Float32Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Float32Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Float32Array;\r\n\r\n /**\r\n * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Float32Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Float32ArrayConstructor {\r\n prototype: Float32Array;\r\n new (length: number): Float32Array;\r\n new (array: ArrayLike): Float32Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Float32Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;\r\n\r\n}\r\ndeclare var Float32Array: Float32ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 64-bit float values. The contents are initialized to 0. If the requested \r\n * number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float64Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Float64Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Float64Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): Float64Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Float64Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Float64Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Float64Array;\r\n\r\n /**\r\n * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Float64Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Float64ArrayConstructor {\r\n prototype: Float64Array;\r\n new (length: number): Float64Array;\r\n new (array: ArrayLike): Float64Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Float64Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;\r\n}\r\ndeclare var Float64Array: Float64ArrayConstructor;\r\n/////////////////////////////\r\n/// ECMAScript Internationalization API \r\n/////////////////////////////\r\n\r\ndeclare module Intl {\r\n interface CollatorOptions {\r\n usage?: string;\r\n localeMatcher?: string;\r\n numeric?: boolean;\r\n caseFirst?: string;\r\n sensitivity?: string;\r\n ignorePunctuation?: boolean;\r\n }\r\n\r\n interface ResolvedCollatorOptions {\r\n locale: string;\r\n usage: string;\r\n sensitivity: string;\r\n ignorePunctuation: boolean;\r\n collation: string;\r\n caseFirst: string;\r\n numeric: boolean;\r\n }\r\n\r\n interface Collator {\r\n compare(x: string, y: string): number;\r\n resolvedOptions(): ResolvedCollatorOptions;\r\n }\r\n var Collator: {\r\n new (locales?: string[], options?: CollatorOptions): Collator;\r\n new (locale?: string, options?: CollatorOptions): Collator;\r\n (locales?: string[], options?: CollatorOptions): Collator;\r\n (locale?: string, options?: CollatorOptions): Collator;\r\n supportedLocalesOf(locales: string[], options?: CollatorOptions): string[];\r\n supportedLocalesOf(locale: string, options?: CollatorOptions): string[];\r\n }\r\n\r\n interface NumberFormatOptions {\r\n localeMatcher?: string;\r\n style?: string;\r\n currency?: string;\r\n currencyDisplay?: string;\r\n useGrouping?: boolean;\r\n minimumIntegerDigits?: number;\r\n minimumFractionDigits?: number;\r\n maximumFractionDigits?: number;\r\n minimumSignificantDigits?: number;\r\n maximumSignificantDigits?: number;\r\n }\r\n\r\n interface ResolvedNumberFormatOptions {\r\n locale: string;\r\n numberingSystem: string;\r\n style: string;\r\n currency?: string;\r\n currencyDisplay?: string;\r\n minimumIntegerDigits: number;\r\n minimumFractionDigits: number;\r\n maximumFractionDigits: number;\r\n minimumSignificantDigits?: number;\r\n maximumSignificantDigits?: number;\r\n useGrouping: boolean;\r\n }\r\n\r\n interface NumberFormat {\r\n format(value: number): string;\r\n resolvedOptions(): ResolvedNumberFormatOptions;\r\n }\r\n var NumberFormat: {\r\n new (locales?: string[], options?: NumberFormatOptions): NumberFormat;\r\n new (locale?: string, options?: NumberFormatOptions): NumberFormat;\r\n (locales?: string[], options?: NumberFormatOptions): NumberFormat;\r\n (locale?: string, options?: NumberFormatOptions): NumberFormat;\r\n supportedLocalesOf(locales: string[], options?: NumberFormatOptions): string[];\r\n supportedLocalesOf(locale: string, options?: NumberFormatOptions): string[];\r\n }\r\n\r\n interface DateTimeFormatOptions {\r\n localeMatcher?: string;\r\n weekday?: string;\r\n era?: string;\r\n year?: string;\r\n month?: string;\r\n day?: string;\r\n hour?: string;\r\n minute?: string;\r\n second?: string;\r\n timeZoneName?: string;\r\n formatMatcher?: string;\r\n hour12?: boolean;\r\n timeZone?: string;\r\n }\r\n\r\n interface ResolvedDateTimeFormatOptions {\r\n locale: string;\r\n calendar: string;\r\n numberingSystem: string;\r\n timeZone: string;\r\n hour12?: boolean;\r\n weekday?: string;\r\n era?: string;\r\n year?: string;\r\n month?: string;\r\n day?: string;\r\n hour?: string;\r\n minute?: string;\r\n second?: string;\r\n timeZoneName?: string;\r\n }\r\n\r\n interface DateTimeFormat {\r\n format(date?: Date | number): string;\r\n resolvedOptions(): ResolvedDateTimeFormatOptions;\r\n }\r\n var DateTimeFormat: {\r\n new (locales?: string[], options?: DateTimeFormatOptions): DateTimeFormat;\r\n new (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat;\r\n (locales?: string[], options?: DateTimeFormatOptions): DateTimeFormat;\r\n (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat;\r\n supportedLocalesOf(locales: string[], options?: DateTimeFormatOptions): string[];\r\n supportedLocalesOf(locale: string, options?: DateTimeFormatOptions): string[];\r\n }\r\n}\r\n\r\ninterface String {\r\n /**\r\n * Determines whether two strings are equivalent in the current locale.\r\n * @param that String to compare to target string\r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.\r\n * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.\r\n */\r\n localeCompare(that: string, locales: string[], options?: Intl.CollatorOptions): number;\r\n\r\n /**\r\n * Determines whether two strings are equivalent in the current locale.\r\n * @param that String to compare to target string\r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.\r\n * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.\r\n */\r\n localeCompare(that: string, locale: string, options?: Intl.CollatorOptions): number;\r\n}\r\n\r\ninterface Number {\r\n /**\r\n * Converts a number to a string by using the current or specified locale. \r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locales?: string[], options?: Intl.NumberFormatOptions): string;\r\n\r\n /**\r\n * Converts a number to a string by using the current or specified locale. \r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locale?: string, options?: Intl.NumberFormatOptions): string;\r\n}\r\n\r\ninterface Date {\r\n /**\r\n * Converts a date and time to a string by using the current or specified locale. \r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;\r\n /**\r\n * Converts a date to a string by using the current or specified locale. \r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;\r\n\r\n /**\r\n * Converts a time to a string by using the current or specified locale. \r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;\r\n \r\n /**\r\n * Converts a date and time to a string by using the current or specified locale. \r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;\r\n \r\n /**\r\n * Converts a date to a string by using the current or specified locale. \r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;\r\n\r\n /**\r\n * Converts a time to a string by using the current or specified locale. \r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;\r\n}\r\n\r\n\r\n/////////////////////////////\r\n/// IE DOM APIs\r\n/////////////////////////////\r\n\r\ninterface Algorithm {\r\n name?: string;\r\n}\r\n\r\ninterface AriaRequestEventInit extends EventInit {\r\n attributeName?: string;\r\n attributeValue?: string;\r\n}\r\n\r\ninterface ClipboardEventInit extends EventInit {\r\n data?: string;\r\n dataType?: string;\r\n}\r\n\r\ninterface CommandEventInit extends EventInit {\r\n commandName?: string;\r\n detail?: string;\r\n}\r\n\r\ninterface CompositionEventInit extends UIEventInit {\r\n data?: string;\r\n}\r\n\r\ninterface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation {\r\n arrayOfDomainStrings?: string[];\r\n}\r\n\r\ninterface CustomEventInit extends EventInit {\r\n detail?: any;\r\n}\r\n\r\ninterface DeviceAccelerationDict {\r\n x?: number;\r\n y?: number;\r\n z?: number;\r\n}\r\n\r\ninterface DeviceRotationRateDict {\r\n alpha?: number;\r\n beta?: number;\r\n gamma?: number;\r\n}\r\n\r\ninterface EventInit {\r\n bubbles?: boolean;\r\n cancelable?: boolean;\r\n}\r\n\r\ninterface ExceptionInformation {\r\n domain?: string;\r\n}\r\n\r\ninterface FocusEventInit extends UIEventInit {\r\n relatedTarget?: EventTarget;\r\n}\r\n\r\ninterface HashChangeEventInit extends EventInit {\r\n newURL?: string;\r\n oldURL?: string;\r\n}\r\n\r\ninterface KeyAlgorithm {\r\n name?: string;\r\n}\r\n\r\ninterface KeyboardEventInit extends SharedKeyboardAndMouseEventInit {\r\n key?: string;\r\n location?: number;\r\n repeat?: boolean;\r\n}\r\n\r\ninterface MouseEventInit extends SharedKeyboardAndMouseEventInit {\r\n screenX?: number;\r\n screenY?: number;\r\n clientX?: number;\r\n clientY?: number;\r\n button?: number;\r\n buttons?: number;\r\n relatedTarget?: EventTarget;\r\n}\r\n\r\ninterface MsZoomToOptions {\r\n contentX?: number;\r\n contentY?: number;\r\n viewportX?: string;\r\n viewportY?: string;\r\n scaleFactor?: number;\r\n animate?: string;\r\n}\r\n\r\ninterface MutationObserverInit {\r\n childList?: boolean;\r\n attributes?: boolean;\r\n characterData?: boolean;\r\n subtree?: boolean;\r\n attributeOldValue?: boolean;\r\n characterDataOldValue?: boolean;\r\n attributeFilter?: string[];\r\n}\r\n\r\ninterface ObjectURLOptions {\r\n oneTimeOnly?: boolean;\r\n}\r\n\r\ninterface PointerEventInit extends MouseEventInit {\r\n pointerId?: number;\r\n width?: number;\r\n height?: number;\r\n pressure?: number;\r\n tiltX?: number;\r\n tiltY?: number;\r\n pointerType?: string;\r\n isPrimary?: boolean;\r\n}\r\n\r\ninterface PositionOptions {\r\n enableHighAccuracy?: boolean;\r\n timeout?: number;\r\n maximumAge?: number;\r\n}\r\n\r\ninterface SharedKeyboardAndMouseEventInit extends UIEventInit {\r\n ctrlKey?: boolean;\r\n shiftKey?: boolean;\r\n altKey?: boolean;\r\n metaKey?: boolean;\r\n keyModifierStateAltGraph?: boolean;\r\n keyModifierStateCapsLock?: boolean;\r\n keyModifierStateFn?: boolean;\r\n keyModifierStateFnLock?: boolean;\r\n keyModifierStateHyper?: boolean;\r\n keyModifierStateNumLock?: boolean;\r\n keyModifierStateOS?: boolean;\r\n keyModifierStateScrollLock?: boolean;\r\n keyModifierStateSuper?: boolean;\r\n keyModifierStateSymbol?: boolean;\r\n keyModifierStateSymbolLock?: boolean;\r\n}\r\n\r\ninterface StoreExceptionsInformation extends ExceptionInformation {\r\n siteName?: string;\r\n explanationString?: string;\r\n detailURI?: string;\r\n}\r\n\r\ninterface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {\r\n arrayOfDomainStrings?: string[];\r\n}\r\n\r\ninterface UIEventInit extends EventInit {\r\n view?: Window;\r\n detail?: number;\r\n}\r\n\r\ninterface WebGLContextAttributes {\r\n alpha?: boolean;\r\n depth?: boolean;\r\n stencil?: boolean;\r\n antialias?: boolean;\r\n premultipliedAlpha?: boolean;\r\n preserveDrawingBuffer?: boolean;\r\n}\r\n\r\ninterface WebGLContextEventInit extends EventInit {\r\n statusMessage?: string;\r\n}\r\n\r\ninterface WheelEventInit extends MouseEventInit {\r\n deltaX?: number;\r\n deltaY?: number;\r\n deltaZ?: number;\r\n deltaMode?: number;\r\n}\r\n\r\ninterface EventListener {\r\n (evt: Event): void;\r\n}\r\n\r\ninterface ANGLE_instanced_arrays {\r\n drawArraysInstancedANGLE(mode: number, first: number, count: number, primcount: number): void;\r\n drawElementsInstancedANGLE(mode: number, count: number, type: number, offset: number, primcount: number): void;\r\n vertexAttribDivisorANGLE(index: number, divisor: number): void;\r\n VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;\r\n}\r\n\r\ndeclare var ANGLE_instanced_arrays: {\r\n prototype: ANGLE_instanced_arrays;\r\n new(): ANGLE_instanced_arrays;\r\n VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;\r\n}\r\n\r\ninterface AnalyserNode extends AudioNode {\r\n fftSize: number;\r\n frequencyBinCount: number;\r\n maxDecibels: number;\r\n minDecibels: number;\r\n smoothingTimeConstant: number;\r\n getByteFrequencyData(array: Uint8Array): void;\r\n getByteTimeDomainData(array: Uint8Array): void;\r\n getFloatFrequencyData(array: Float32Array): void;\r\n getFloatTimeDomainData(array: Float32Array): void;\r\n}\r\n\r\ndeclare var AnalyserNode: {\r\n prototype: AnalyserNode;\r\n new(): AnalyserNode;\r\n}\r\n\r\ninterface AnimationEvent extends Event {\r\n animationName: string;\r\n elapsedTime: number;\r\n initAnimationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, animationNameArg: string, elapsedTimeArg: number): void;\r\n}\r\n\r\ndeclare var AnimationEvent: {\r\n prototype: AnimationEvent;\r\n new(): AnimationEvent;\r\n}\r\n\r\ninterface ApplicationCache extends EventTarget {\r\n oncached: (ev: Event) => any;\r\n onchecking: (ev: Event) => any;\r\n ondownloading: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n onnoupdate: (ev: Event) => any;\r\n onobsolete: (ev: Event) => any;\r\n onprogress: (ev: ProgressEvent) => any;\r\n onupdateready: (ev: Event) => any;\r\n status: number;\r\n abort(): void;\r\n swapCache(): void;\r\n update(): void;\r\n CHECKING: number;\r\n DOWNLOADING: number;\r\n IDLE: number;\r\n OBSOLETE: number;\r\n UNCACHED: number;\r\n UPDATEREADY: number;\r\n addEventListener(type: \"cached\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"checking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"downloading\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"noupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"obsolete\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"updateready\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var ApplicationCache: {\r\n prototype: ApplicationCache;\r\n new(): ApplicationCache;\r\n CHECKING: number;\r\n DOWNLOADING: number;\r\n IDLE: number;\r\n OBSOLETE: number;\r\n UNCACHED: number;\r\n UPDATEREADY: number;\r\n}\r\n\r\ninterface AriaRequestEvent extends Event {\r\n attributeName: string;\r\n attributeValue: string;\r\n}\r\n\r\ndeclare var AriaRequestEvent: {\r\n prototype: AriaRequestEvent;\r\n new(type: string, eventInitDict?: AriaRequestEventInit): AriaRequestEvent;\r\n}\r\n\r\ninterface Attr extends Node {\r\n name: string;\r\n ownerElement: Element;\r\n specified: boolean;\r\n value: string;\r\n}\r\n\r\ndeclare var Attr: {\r\n prototype: Attr;\r\n new(): Attr;\r\n}\r\n\r\ninterface AudioBuffer {\r\n duration: number;\r\n length: number;\r\n numberOfChannels: number;\r\n sampleRate: number;\r\n getChannelData(channel: number): Float32Array;\r\n}\r\n\r\ndeclare var AudioBuffer: {\r\n prototype: AudioBuffer;\r\n new(): AudioBuffer;\r\n}\r\n\r\ninterface AudioBufferSourceNode extends AudioNode {\r\n buffer: AudioBuffer;\r\n loop: boolean;\r\n loopEnd: number;\r\n loopStart: number;\r\n onended: (ev: Event) => any;\r\n playbackRate: AudioParam;\r\n start(when?: number, offset?: number, duration?: number): void;\r\n stop(when?: number): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var AudioBufferSourceNode: {\r\n prototype: AudioBufferSourceNode;\r\n new(): AudioBufferSourceNode;\r\n}\r\n\r\ninterface AudioContext extends EventTarget {\r\n currentTime: number;\r\n destination: AudioDestinationNode;\r\n listener: AudioListener;\r\n sampleRate: number;\r\n state: string;\r\n createAnalyser(): AnalyserNode;\r\n createBiquadFilter(): BiquadFilterNode;\r\n createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;\r\n createBufferSource(): AudioBufferSourceNode;\r\n createChannelMerger(numberOfInputs?: number): ChannelMergerNode;\r\n createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode;\r\n createConvolver(): ConvolverNode;\r\n createDelay(maxDelayTime?: number): DelayNode;\r\n createDynamicsCompressor(): DynamicsCompressorNode;\r\n createGain(): GainNode;\r\n createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;\r\n createOscillator(): OscillatorNode;\r\n createPanner(): PannerNode;\r\n createPeriodicWave(real: Float32Array, imag: Float32Array): PeriodicWave;\r\n createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;\r\n createStereoPanner(): StereoPannerNode;\r\n createWaveShaper(): WaveShaperNode;\r\n decodeAudioData(audioData: ArrayBuffer, successCallback: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): void;\r\n}\r\n\r\ndeclare var AudioContext: {\r\n prototype: AudioContext;\r\n new(): AudioContext;\r\n}\r\n\r\ninterface AudioDestinationNode extends AudioNode {\r\n maxChannelCount: number;\r\n}\r\n\r\ndeclare var AudioDestinationNode: {\r\n prototype: AudioDestinationNode;\r\n new(): AudioDestinationNode;\r\n}\r\n\r\ninterface AudioListener {\r\n dopplerFactor: number;\r\n speedOfSound: number;\r\n setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void;\r\n setPosition(x: number, y: number, z: number): void;\r\n setVelocity(x: number, y: number, z: number): void;\r\n}\r\n\r\ndeclare var AudioListener: {\r\n prototype: AudioListener;\r\n new(): AudioListener;\r\n}\r\n\r\ninterface AudioNode extends EventTarget {\r\n channelCount: number;\r\n channelCountMode: string;\r\n channelInterpretation: string;\r\n context: AudioContext;\r\n numberOfInputs: number;\r\n numberOfOutputs: number;\r\n connect(destination: AudioNode, output?: number, input?: number): void;\r\n disconnect(output?: number): void;\r\n}\r\n\r\ndeclare var AudioNode: {\r\n prototype: AudioNode;\r\n new(): AudioNode;\r\n}\r\n\r\ninterface AudioParam {\r\n defaultValue: number;\r\n value: number;\r\n cancelScheduledValues(startTime: number): void;\r\n exponentialRampToValueAtTime(value: number, endTime: number): void;\r\n linearRampToValueAtTime(value: number, endTime: number): void;\r\n setTargetAtTime(target: number, startTime: number, timeConstant: number): void;\r\n setValueAtTime(value: number, startTime: number): void;\r\n setValueCurveAtTime(values: Float32Array, startTime: number, duration: number): void;\r\n}\r\n\r\ndeclare var AudioParam: {\r\n prototype: AudioParam;\r\n new(): AudioParam;\r\n}\r\n\r\ninterface AudioProcessingEvent extends Event {\r\n inputBuffer: AudioBuffer;\r\n outputBuffer: AudioBuffer;\r\n playbackTime: number;\r\n}\r\n\r\ndeclare var AudioProcessingEvent: {\r\n prototype: AudioProcessingEvent;\r\n new(): AudioProcessingEvent;\r\n}\r\n\r\ninterface AudioTrack {\r\n enabled: boolean;\r\n id: string;\r\n kind: string;\r\n label: string;\r\n language: string;\r\n sourceBuffer: SourceBuffer;\r\n}\r\n\r\ndeclare var AudioTrack: {\r\n prototype: AudioTrack;\r\n new(): AudioTrack;\r\n}\r\n\r\ninterface AudioTrackList extends EventTarget {\r\n length: number;\r\n onaddtrack: (ev: TrackEvent) => any;\r\n onchange: (ev: Event) => any;\r\n onremovetrack: (ev: TrackEvent) => any;\r\n getTrackById(id: string): AudioTrack;\r\n item(index: number): AudioTrack;\r\n addEventListener(type: \"addtrack\", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"removetrack\", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: AudioTrack;\r\n}\r\n\r\ndeclare var AudioTrackList: {\r\n prototype: AudioTrackList;\r\n new(): AudioTrackList;\r\n}\r\n\r\ninterface BarProp {\r\n visible: boolean;\r\n}\r\n\r\ndeclare var BarProp: {\r\n prototype: BarProp;\r\n new(): BarProp;\r\n}\r\n\r\ninterface BeforeUnloadEvent extends Event {\r\n returnValue: any;\r\n}\r\n\r\ndeclare var BeforeUnloadEvent: {\r\n prototype: BeforeUnloadEvent;\r\n new(): BeforeUnloadEvent;\r\n}\r\n\r\ninterface BiquadFilterNode extends AudioNode {\r\n Q: AudioParam;\r\n detune: AudioParam;\r\n frequency: AudioParam;\r\n gain: AudioParam;\r\n type: string;\r\n getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;\r\n}\r\n\r\ndeclare var BiquadFilterNode: {\r\n prototype: BiquadFilterNode;\r\n new(): BiquadFilterNode;\r\n}\r\n\r\ninterface Blob {\r\n size: number;\r\n type: string;\r\n msClose(): void;\r\n msDetachStream(): any;\r\n slice(start?: number, end?: number, contentType?: string): Blob;\r\n}\r\n\r\ndeclare var Blob: {\r\n prototype: Blob;\r\n new (blobParts?: any[], options?: BlobPropertyBag): Blob;\r\n}\r\n\r\ninterface CDATASection extends Text {\r\n}\r\n\r\ndeclare var CDATASection: {\r\n prototype: CDATASection;\r\n new(): CDATASection;\r\n}\r\n\r\ninterface CSS {\r\n supports(property: string, value?: string): boolean;\r\n}\r\ndeclare var CSS: CSS;\r\n\r\ninterface CSSConditionRule extends CSSGroupingRule {\r\n conditionText: string;\r\n}\r\n\r\ndeclare var CSSConditionRule: {\r\n prototype: CSSConditionRule;\r\n new(): CSSConditionRule;\r\n}\r\n\r\ninterface CSSFontFaceRule extends CSSRule {\r\n style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSFontFaceRule: {\r\n prototype: CSSFontFaceRule;\r\n new(): CSSFontFaceRule;\r\n}\r\n\r\ninterface CSSGroupingRule extends CSSRule {\r\n cssRules: CSSRuleList;\r\n deleteRule(index?: number): void;\r\n insertRule(rule: string, index?: number): number;\r\n}\r\n\r\ndeclare var CSSGroupingRule: {\r\n prototype: CSSGroupingRule;\r\n new(): CSSGroupingRule;\r\n}\r\n\r\ninterface CSSImportRule extends CSSRule {\r\n href: string;\r\n media: MediaList;\r\n styleSheet: CSSStyleSheet;\r\n}\r\n\r\ndeclare var CSSImportRule: {\r\n prototype: CSSImportRule;\r\n new(): CSSImportRule;\r\n}\r\n\r\ninterface CSSKeyframeRule extends CSSRule {\r\n keyText: string;\r\n style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSKeyframeRule: {\r\n prototype: CSSKeyframeRule;\r\n new(): CSSKeyframeRule;\r\n}\r\n\r\ninterface CSSKeyframesRule extends CSSRule {\r\n cssRules: CSSRuleList;\r\n name: string;\r\n appendRule(rule: string): void;\r\n deleteRule(rule: string): void;\r\n findRule(rule: string): CSSKeyframeRule;\r\n}\r\n\r\ndeclare var CSSKeyframesRule: {\r\n prototype: CSSKeyframesRule;\r\n new(): CSSKeyframesRule;\r\n}\r\n\r\ninterface CSSMediaRule extends CSSConditionRule {\r\n media: MediaList;\r\n}\r\n\r\ndeclare var CSSMediaRule: {\r\n prototype: CSSMediaRule;\r\n new(): CSSMediaRule;\r\n}\r\n\r\ninterface CSSNamespaceRule extends CSSRule {\r\n namespaceURI: string;\r\n prefix: string;\r\n}\r\n\r\ndeclare var CSSNamespaceRule: {\r\n prototype: CSSNamespaceRule;\r\n new(): CSSNamespaceRule;\r\n}\r\n\r\ninterface CSSPageRule extends CSSRule {\r\n pseudoClass: string;\r\n selector: string;\r\n selectorText: string;\r\n style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSPageRule: {\r\n prototype: CSSPageRule;\r\n new(): CSSPageRule;\r\n}\r\n\r\ninterface CSSRule {\r\n cssText: string;\r\n parentRule: CSSRule;\r\n parentStyleSheet: CSSStyleSheet;\r\n type: number;\r\n CHARSET_RULE: number;\r\n FONT_FACE_RULE: number;\r\n IMPORT_RULE: number;\r\n KEYFRAMES_RULE: number;\r\n KEYFRAME_RULE: number;\r\n MEDIA_RULE: number;\r\n NAMESPACE_RULE: number;\r\n PAGE_RULE: number;\r\n STYLE_RULE: number;\r\n SUPPORTS_RULE: number;\r\n UNKNOWN_RULE: number;\r\n VIEWPORT_RULE: number;\r\n}\r\n\r\ndeclare var CSSRule: {\r\n prototype: CSSRule;\r\n new(): CSSRule;\r\n CHARSET_RULE: number;\r\n FONT_FACE_RULE: number;\r\n IMPORT_RULE: number;\r\n KEYFRAMES_RULE: number;\r\n KEYFRAME_RULE: number;\r\n MEDIA_RULE: number;\r\n NAMESPACE_RULE: number;\r\n PAGE_RULE: number;\r\n STYLE_RULE: number;\r\n SUPPORTS_RULE: number;\r\n UNKNOWN_RULE: number;\r\n VIEWPORT_RULE: number;\r\n}\r\n\r\ninterface CSSRuleList {\r\n length: number;\r\n item(index: number): CSSRule;\r\n [index: number]: CSSRule;\r\n}\r\n\r\ndeclare var CSSRuleList: {\r\n prototype: CSSRuleList;\r\n new(): CSSRuleList;\r\n}\r\n\r\ninterface CSSStyleDeclaration {\r\n alignContent: string;\r\n alignItems: string;\r\n alignSelf: string;\r\n alignmentBaseline: string;\r\n animation: string;\r\n animationDelay: string;\r\n animationDirection: string;\r\n animationDuration: string;\r\n animationFillMode: string;\r\n animationIterationCount: string;\r\n animationName: string;\r\n animationPlayState: string;\r\n animationTimingFunction: string;\r\n backfaceVisibility: string;\r\n background: string;\r\n backgroundAttachment: string;\r\n backgroundClip: string;\r\n backgroundColor: string;\r\n backgroundImage: string;\r\n backgroundOrigin: string;\r\n backgroundPosition: string;\r\n backgroundPositionX: string;\r\n backgroundPositionY: string;\r\n backgroundRepeat: string;\r\n backgroundSize: string;\r\n baselineShift: string;\r\n border: string;\r\n borderBottom: string;\r\n borderBottomColor: string;\r\n borderBottomLeftRadius: string;\r\n borderBottomRightRadius: string;\r\n borderBottomStyle: string;\r\n borderBottomWidth: string;\r\n borderCollapse: string;\r\n borderColor: string;\r\n borderImage: string;\r\n borderImageOutset: string;\r\n borderImageRepeat: string;\r\n borderImageSlice: string;\r\n borderImageSource: string;\r\n borderImageWidth: string;\r\n borderLeft: string;\r\n borderLeftColor: string;\r\n borderLeftStyle: string;\r\n borderLeftWidth: string;\r\n borderRadius: string;\r\n borderRight: string;\r\n borderRightColor: string;\r\n borderRightStyle: string;\r\n borderRightWidth: string;\r\n borderSpacing: string;\r\n borderStyle: string;\r\n borderTop: string;\r\n borderTopColor: string;\r\n borderTopLeftRadius: string;\r\n borderTopRightRadius: string;\r\n borderTopStyle: string;\r\n borderTopWidth: string;\r\n borderWidth: string;\r\n bottom: string;\r\n boxShadow: string;\r\n boxSizing: string;\r\n breakAfter: string;\r\n breakBefore: string;\r\n breakInside: string;\r\n captionSide: string;\r\n clear: string;\r\n clip: string;\r\n clipPath: string;\r\n clipRule: string;\r\n color: string;\r\n colorInterpolationFilters: string;\r\n columnCount: any;\r\n columnFill: string;\r\n columnGap: any;\r\n columnRule: string;\r\n columnRuleColor: any;\r\n columnRuleStyle: string;\r\n columnRuleWidth: any;\r\n columnSpan: string;\r\n columnWidth: any;\r\n columns: string;\r\n content: string;\r\n counterIncrement: string;\r\n counterReset: string;\r\n cssFloat: string;\r\n cssText: string;\r\n cursor: string;\r\n direction: string;\r\n display: string;\r\n dominantBaseline: string;\r\n emptyCells: string;\r\n enableBackground: string;\r\n fill: string;\r\n fillOpacity: string;\r\n fillRule: string;\r\n filter: string;\r\n flex: string;\r\n flexBasis: string;\r\n flexDirection: string;\r\n flexFlow: string;\r\n flexGrow: string;\r\n flexShrink: string;\r\n flexWrap: string;\r\n floodColor: string;\r\n floodOpacity: string;\r\n font: string;\r\n fontFamily: string;\r\n fontFeatureSettings: string;\r\n fontSize: string;\r\n fontSizeAdjust: string;\r\n fontStretch: string;\r\n fontStyle: string;\r\n fontVariant: string;\r\n fontWeight: string;\r\n glyphOrientationHorizontal: string;\r\n glyphOrientationVertical: string;\r\n height: string;\r\n imeMode: string;\r\n justifyContent: string;\r\n kerning: string;\r\n left: string;\r\n length: number;\r\n letterSpacing: string;\r\n lightingColor: string;\r\n lineHeight: string;\r\n listStyle: string;\r\n listStyleImage: string;\r\n listStylePosition: string;\r\n listStyleType: string;\r\n margin: string;\r\n marginBottom: string;\r\n marginLeft: string;\r\n marginRight: string;\r\n marginTop: string;\r\n marker: string;\r\n markerEnd: string;\r\n markerMid: string;\r\n markerStart: string;\r\n mask: string;\r\n maxHeight: string;\r\n maxWidth: string;\r\n minHeight: string;\r\n minWidth: string;\r\n msContentZoomChaining: string;\r\n msContentZoomLimit: string;\r\n msContentZoomLimitMax: any;\r\n msContentZoomLimitMin: any;\r\n msContentZoomSnap: string;\r\n msContentZoomSnapPoints: string;\r\n msContentZoomSnapType: string;\r\n msContentZooming: string;\r\n msFlowFrom: string;\r\n msFlowInto: string;\r\n msFontFeatureSettings: string;\r\n msGridColumn: any;\r\n msGridColumnAlign: string;\r\n msGridColumnSpan: any;\r\n msGridColumns: string;\r\n msGridRow: any;\r\n msGridRowAlign: string;\r\n msGridRowSpan: any;\r\n msGridRows: string;\r\n msHighContrastAdjust: string;\r\n msHyphenateLimitChars: string;\r\n msHyphenateLimitLines: any;\r\n msHyphenateLimitZone: any;\r\n msHyphens: string;\r\n msImeAlign: string;\r\n msOverflowStyle: string;\r\n msScrollChaining: string;\r\n msScrollLimit: string;\r\n msScrollLimitXMax: any;\r\n msScrollLimitXMin: any;\r\n msScrollLimitYMax: any;\r\n msScrollLimitYMin: any;\r\n msScrollRails: string;\r\n msScrollSnapPointsX: string;\r\n msScrollSnapPointsY: string;\r\n msScrollSnapType: string;\r\n msScrollSnapX: string;\r\n msScrollSnapY: string;\r\n msScrollTranslation: string;\r\n msTextCombineHorizontal: string;\r\n msTextSizeAdjust: any;\r\n msTouchAction: string;\r\n msTouchSelect: string;\r\n msUserSelect: string;\r\n msWrapFlow: string;\r\n msWrapMargin: any;\r\n msWrapThrough: string;\r\n opacity: string;\r\n order: string;\r\n orphans: string;\r\n outline: string;\r\n outlineColor: string;\r\n outlineStyle: string;\r\n outlineWidth: string;\r\n overflow: string;\r\n overflowX: string;\r\n overflowY: string;\r\n padding: string;\r\n paddingBottom: string;\r\n paddingLeft: string;\r\n paddingRight: string;\r\n paddingTop: string;\r\n pageBreakAfter: string;\r\n pageBreakBefore: string;\r\n pageBreakInside: string;\r\n parentRule: CSSRule;\r\n perspective: string;\r\n perspectiveOrigin: string;\r\n pointerEvents: string;\r\n position: string;\r\n quotes: string;\r\n right: string;\r\n rubyAlign: string;\r\n rubyOverhang: string;\r\n rubyPosition: string;\r\n stopColor: string;\r\n stopOpacity: string;\r\n stroke: string;\r\n strokeDasharray: string;\r\n strokeDashoffset: string;\r\n strokeLinecap: string;\r\n strokeLinejoin: string;\r\n strokeMiterlimit: string;\r\n strokeOpacity: string;\r\n strokeWidth: string;\r\n tableLayout: string;\r\n textAlign: string;\r\n textAlignLast: string;\r\n textAnchor: string;\r\n textDecoration: string;\r\n textFillColor: string;\r\n textIndent: string;\r\n textJustify: string;\r\n textKashida: string;\r\n textKashidaSpace: string;\r\n textOverflow: string;\r\n textShadow: string;\r\n textTransform: string;\r\n textUnderlinePosition: string;\r\n top: string;\r\n touchAction: string;\r\n transform: string;\r\n transformOrigin: string;\r\n transformStyle: string;\r\n transition: string;\r\n transitionDelay: string;\r\n transitionDuration: string;\r\n transitionProperty: string;\r\n transitionTimingFunction: string;\r\n unicodeBidi: string;\r\n verticalAlign: string;\r\n visibility: string;\r\n webkitAlignContent: string;\r\n webkitAlignItems: string;\r\n webkitAlignSelf: string;\r\n webkitAnimation: string;\r\n webkitAnimationDelay: string;\r\n webkitAnimationDirection: string;\r\n webkitAnimationDuration: string;\r\n webkitAnimationFillMode: string;\r\n webkitAnimationIterationCount: string;\r\n webkitAnimationName: string;\r\n webkitAnimationPlayState: string;\r\n webkitAnimationTimingFunction: string;\r\n webkitAppearance: string;\r\n webkitBackfaceVisibility: string;\r\n webkitBackground: string;\r\n webkitBackgroundAttachment: string;\r\n webkitBackgroundClip: string;\r\n webkitBackgroundColor: string;\r\n webkitBackgroundImage: string;\r\n webkitBackgroundOrigin: string;\r\n webkitBackgroundPosition: string;\r\n webkitBackgroundPositionX: string;\r\n webkitBackgroundPositionY: string;\r\n webkitBackgroundRepeat: string;\r\n webkitBackgroundSize: string;\r\n webkitBorderBottomLeftRadius: string;\r\n webkitBorderBottomRightRadius: string;\r\n webkitBorderImage: string;\r\n webkitBorderImageOutset: string;\r\n webkitBorderImageRepeat: string;\r\n webkitBorderImageSlice: string;\r\n webkitBorderImageSource: string;\r\n webkitBorderImageWidth: string;\r\n webkitBorderRadius: string;\r\n webkitBorderTopLeftRadius: string;\r\n webkitBorderTopRightRadius: string;\r\n webkitBoxAlign: string;\r\n webkitBoxDirection: string;\r\n webkitBoxFlex: string;\r\n webkitBoxOrdinalGroup: string;\r\n webkitBoxOrient: string;\r\n webkitBoxPack: string;\r\n webkitBoxSizing: string;\r\n webkitColumnBreakAfter: string;\r\n webkitColumnBreakBefore: string;\r\n webkitColumnBreakInside: string;\r\n webkitColumnCount: any;\r\n webkitColumnGap: any;\r\n webkitColumnRule: string;\r\n webkitColumnRuleColor: any;\r\n webkitColumnRuleStyle: string;\r\n webkitColumnRuleWidth: any;\r\n webkitColumnSpan: string;\r\n webkitColumnWidth: any;\r\n webkitColumns: string;\r\n webkitFilter: string;\r\n webkitFlex: string;\r\n webkitFlexBasis: string;\r\n webkitFlexDirection: string;\r\n webkitFlexFlow: string;\r\n webkitFlexGrow: string;\r\n webkitFlexShrink: string;\r\n webkitFlexWrap: string;\r\n webkitJustifyContent: string;\r\n webkitOrder: string;\r\n webkitPerspective: string;\r\n webkitPerspectiveOrigin: string;\r\n webkitTapHighlightColor: string;\r\n webkitTextFillColor: string;\r\n webkitTextSizeAdjust: any;\r\n webkitTransform: string;\r\n webkitTransformOrigin: string;\r\n webkitTransformStyle: string;\r\n webkitTransition: string;\r\n webkitTransitionDelay: string;\r\n webkitTransitionDuration: string;\r\n webkitTransitionProperty: string;\r\n webkitTransitionTimingFunction: string;\r\n webkitUserSelect: string;\r\n webkitWritingMode: string;\r\n whiteSpace: string;\r\n widows: string;\r\n width: string;\r\n wordBreak: string;\r\n wordSpacing: string;\r\n wordWrap: string;\r\n writingMode: string;\r\n zIndex: string;\r\n zoom: string;\r\n getPropertyPriority(propertyName: string): string;\r\n getPropertyValue(propertyName: string): string;\r\n item(index: number): string;\r\n removeProperty(propertyName: string): string;\r\n setProperty(propertyName: string, value: string, priority?: string): void;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var CSSStyleDeclaration: {\r\n prototype: CSSStyleDeclaration;\r\n new(): CSSStyleDeclaration;\r\n}\r\n\r\ninterface CSSStyleRule extends CSSRule {\r\n readOnly: boolean;\r\n selectorText: string;\r\n style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSStyleRule: {\r\n prototype: CSSStyleRule;\r\n new(): CSSStyleRule;\r\n}\r\n\r\ninterface CSSStyleSheet extends StyleSheet {\r\n cssRules: CSSRuleList;\r\n cssText: string;\r\n href: string;\r\n id: string;\r\n imports: StyleSheetList;\r\n isAlternate: boolean;\r\n isPrefAlternate: boolean;\r\n ownerRule: CSSRule;\r\n owningElement: Element;\r\n pages: StyleSheetPageList;\r\n readOnly: boolean;\r\n rules: CSSRuleList;\r\n addImport(bstrURL: string, lIndex?: number): number;\r\n addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number;\r\n addRule(bstrSelector: string, bstrStyle?: string, lIndex?: number): number;\r\n deleteRule(index?: number): void;\r\n insertRule(rule: string, index?: number): number;\r\n removeImport(lIndex: number): void;\r\n removeRule(lIndex: number): void;\r\n}\r\n\r\ndeclare var CSSStyleSheet: {\r\n prototype: CSSStyleSheet;\r\n new(): CSSStyleSheet;\r\n}\r\n\r\ninterface CSSSupportsRule extends CSSConditionRule {\r\n}\r\n\r\ndeclare var CSSSupportsRule: {\r\n prototype: CSSSupportsRule;\r\n new(): CSSSupportsRule;\r\n}\r\n\r\ninterface CanvasGradient {\r\n addColorStop(offset: number, color: string): void;\r\n}\r\n\r\ndeclare var CanvasGradient: {\r\n prototype: CanvasGradient;\r\n new(): CanvasGradient;\r\n}\r\n\r\ninterface CanvasPattern {\r\n}\r\n\r\ndeclare var CanvasPattern: {\r\n prototype: CanvasPattern;\r\n new(): CanvasPattern;\r\n}\r\n\r\ninterface CanvasRenderingContext2D {\r\n canvas: HTMLCanvasElement;\r\n fillStyle: string | CanvasGradient | CanvasPattern;\r\n font: string;\r\n globalAlpha: number;\r\n globalCompositeOperation: string;\r\n lineCap: string;\r\n lineDashOffset: number;\r\n lineJoin: string;\r\n lineWidth: number;\r\n miterLimit: number;\r\n msFillRule: string;\r\n msImageSmoothingEnabled: boolean;\r\n shadowBlur: number;\r\n shadowColor: string;\r\n shadowOffsetX: number;\r\n shadowOffsetY: number;\r\n strokeStyle: string | CanvasGradient | CanvasPattern;\r\n textAlign: string;\r\n textBaseline: string;\r\n arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\r\n arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;\r\n beginPath(): void;\r\n bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;\r\n clearRect(x: number, y: number, w: number, h: number): void;\r\n clip(fillRule?: string): void;\r\n closePath(): void;\r\n createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;\r\n createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;\r\n createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;\r\n createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;\r\n drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;\r\n fill(fillRule?: string): void;\r\n fillRect(x: number, y: number, w: number, h: number): void;\r\n fillText(text: string, x: number, y: number, maxWidth?: number): void;\r\n getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;\r\n getLineDash(): number[];\r\n isPointInPath(x: number, y: number, fillRule?: string): boolean;\r\n lineTo(x: number, y: number): void;\r\n measureText(text: string): TextMetrics;\r\n moveTo(x: number, y: number): void;\r\n putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void;\r\n quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;\r\n rect(x: number, y: number, w: number, h: number): void;\r\n restore(): void;\r\n rotate(angle: number): void;\r\n save(): void;\r\n scale(x: number, y: number): void;\r\n setLineDash(segments: number[]): void;\r\n setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;\r\n stroke(): void;\r\n strokeRect(x: number, y: number, w: number, h: number): void;\r\n strokeText(text: string, x: number, y: number, maxWidth?: number): void;\r\n transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;\r\n translate(x: number, y: number): void;\r\n}\r\n\r\ndeclare var CanvasRenderingContext2D: {\r\n prototype: CanvasRenderingContext2D;\r\n new(): CanvasRenderingContext2D;\r\n}\r\n\r\ninterface ChannelMergerNode extends AudioNode {\r\n}\r\n\r\ndeclare var ChannelMergerNode: {\r\n prototype: ChannelMergerNode;\r\n new(): ChannelMergerNode;\r\n}\r\n\r\ninterface ChannelSplitterNode extends AudioNode {\r\n}\r\n\r\ndeclare var ChannelSplitterNode: {\r\n prototype: ChannelSplitterNode;\r\n new(): ChannelSplitterNode;\r\n}\r\n\r\ninterface CharacterData extends Node, ChildNode {\r\n data: string;\r\n length: number;\r\n appendData(arg: string): void;\r\n deleteData(offset: number, count: number): void;\r\n insertData(offset: number, arg: string): void;\r\n replaceData(offset: number, count: number, arg: string): void;\r\n substringData(offset: number, count: number): string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var CharacterData: {\r\n prototype: CharacterData;\r\n new(): CharacterData;\r\n}\r\n\r\ninterface ClientRect {\r\n bottom: number;\r\n height: number;\r\n left: number;\r\n right: number;\r\n top: number;\r\n width: number;\r\n}\r\n\r\ndeclare var ClientRect: {\r\n prototype: ClientRect;\r\n new(): ClientRect;\r\n}\r\n\r\ninterface ClientRectList {\r\n length: number;\r\n item(index: number): ClientRect;\r\n [index: number]: ClientRect;\r\n}\r\n\r\ndeclare var ClientRectList: {\r\n prototype: ClientRectList;\r\n new(): ClientRectList;\r\n}\r\n\r\ninterface ClipboardEvent extends Event {\r\n clipboardData: DataTransfer;\r\n}\r\n\r\ndeclare var ClipboardEvent: {\r\n prototype: ClipboardEvent;\r\n new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent;\r\n}\r\n\r\ninterface CloseEvent extends Event {\r\n code: number;\r\n reason: string;\r\n wasClean: boolean;\r\n initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;\r\n}\r\n\r\ndeclare var CloseEvent: {\r\n prototype: CloseEvent;\r\n new(): CloseEvent;\r\n}\r\n\r\ninterface CommandEvent extends Event {\r\n commandName: string;\r\n detail: string;\r\n}\r\n\r\ndeclare var CommandEvent: {\r\n prototype: CommandEvent;\r\n new(type: string, eventInitDict?: CommandEventInit): CommandEvent;\r\n}\r\n\r\ninterface Comment extends CharacterData {\r\n text: string;\r\n}\r\n\r\ndeclare var Comment: {\r\n prototype: Comment;\r\n new(): Comment;\r\n}\r\n\r\ninterface CompositionEvent extends UIEvent {\r\n data: string;\r\n locale: string;\r\n initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void;\r\n}\r\n\r\ndeclare var CompositionEvent: {\r\n prototype: CompositionEvent;\r\n new(typeArg: string, eventInitDict?: CompositionEventInit): CompositionEvent;\r\n}\r\n\r\ninterface Console {\r\n assert(test?: boolean, message?: string, ...optionalParams: any[]): void;\r\n clear(): void;\r\n count(countTitle?: string): void;\r\n debug(message?: string, ...optionalParams: any[]): void;\r\n dir(value?: any, ...optionalParams: any[]): void;\r\n dirxml(value: any): void;\r\n error(message?: any, ...optionalParams: any[]): void;\r\n group(groupTitle?: string): void;\r\n groupCollapsed(groupTitle?: string): void;\r\n groupEnd(): void;\r\n info(message?: any, ...optionalParams: any[]): void;\r\n log(message?: any, ...optionalParams: any[]): void;\r\n msIsIndependentlyComposed(element: Element): boolean;\r\n profile(reportName?: string): void;\r\n profileEnd(): void;\r\n select(element: Element): void;\r\n time(timerName?: string): void;\r\n timeEnd(timerName?: string): void;\r\n trace(message?: any, ...optionalParams: any[]): void;\r\n warn(message?: any, ...optionalParams: any[]): void;\r\n}\r\n\r\ndeclare var Console: {\r\n prototype: Console;\r\n new(): Console;\r\n}\r\n\r\ninterface ConvolverNode extends AudioNode {\r\n buffer: AudioBuffer;\r\n normalize: boolean;\r\n}\r\n\r\ndeclare var ConvolverNode: {\r\n prototype: ConvolverNode;\r\n new(): ConvolverNode;\r\n}\r\n\r\ninterface Coordinates {\r\n accuracy: number;\r\n altitude: number;\r\n altitudeAccuracy: number;\r\n heading: number;\r\n latitude: number;\r\n longitude: number;\r\n speed: number;\r\n}\r\n\r\ndeclare var Coordinates: {\r\n prototype: Coordinates;\r\n new(): Coordinates;\r\n}\r\n\r\ninterface Crypto extends Object, RandomSource {\r\n subtle: SubtleCrypto;\r\n}\r\n\r\ndeclare var Crypto: {\r\n prototype: Crypto;\r\n new(): Crypto;\r\n}\r\n\r\ninterface CryptoKey {\r\n algorithm: KeyAlgorithm;\r\n extractable: boolean;\r\n type: string;\r\n usages: string[];\r\n}\r\n\r\ndeclare var CryptoKey: {\r\n prototype: CryptoKey;\r\n new(): CryptoKey;\r\n}\r\n\r\ninterface CryptoKeyPair {\r\n privateKey: CryptoKey;\r\n publicKey: CryptoKey;\r\n}\r\n\r\ndeclare var CryptoKeyPair: {\r\n prototype: CryptoKeyPair;\r\n new(): CryptoKeyPair;\r\n}\r\n\r\ninterface CustomEvent extends Event {\r\n detail: any;\r\n initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any): void;\r\n}\r\n\r\ndeclare var CustomEvent: {\r\n prototype: CustomEvent;\r\n new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent;\r\n}\r\n\r\ninterface DOMError {\r\n name: string;\r\n toString(): string;\r\n}\r\n\r\ndeclare var DOMError: {\r\n prototype: DOMError;\r\n new(): DOMError;\r\n}\r\n\r\ninterface DOMException {\r\n code: number;\r\n message: string;\r\n name: string;\r\n toString(): string;\r\n ABORT_ERR: number;\r\n DATA_CLONE_ERR: number;\r\n DOMSTRING_SIZE_ERR: number;\r\n HIERARCHY_REQUEST_ERR: number;\r\n INDEX_SIZE_ERR: number;\r\n INUSE_ATTRIBUTE_ERR: number;\r\n INVALID_ACCESS_ERR: number;\r\n INVALID_CHARACTER_ERR: number;\r\n INVALID_MODIFICATION_ERR: number;\r\n INVALID_NODE_TYPE_ERR: number;\r\n INVALID_STATE_ERR: number;\r\n NAMESPACE_ERR: number;\r\n NETWORK_ERR: number;\r\n NOT_FOUND_ERR: number;\r\n NOT_SUPPORTED_ERR: number;\r\n NO_DATA_ALLOWED_ERR: number;\r\n NO_MODIFICATION_ALLOWED_ERR: number;\r\n PARSE_ERR: number;\r\n QUOTA_EXCEEDED_ERR: number;\r\n SECURITY_ERR: number;\r\n SERIALIZE_ERR: number;\r\n SYNTAX_ERR: number;\r\n TIMEOUT_ERR: number;\r\n TYPE_MISMATCH_ERR: number;\r\n URL_MISMATCH_ERR: number;\r\n VALIDATION_ERR: number;\r\n WRONG_DOCUMENT_ERR: number;\r\n}\r\n\r\ndeclare var DOMException: {\r\n prototype: DOMException;\r\n new(): DOMException;\r\n ABORT_ERR: number;\r\n DATA_CLONE_ERR: number;\r\n DOMSTRING_SIZE_ERR: number;\r\n HIERARCHY_REQUEST_ERR: number;\r\n INDEX_SIZE_ERR: number;\r\n INUSE_ATTRIBUTE_ERR: number;\r\n INVALID_ACCESS_ERR: number;\r\n INVALID_CHARACTER_ERR: number;\r\n INVALID_MODIFICATION_ERR: number;\r\n INVALID_NODE_TYPE_ERR: number;\r\n INVALID_STATE_ERR: number;\r\n NAMESPACE_ERR: number;\r\n NETWORK_ERR: number;\r\n NOT_FOUND_ERR: number;\r\n NOT_SUPPORTED_ERR: number;\r\n NO_DATA_ALLOWED_ERR: number;\r\n NO_MODIFICATION_ALLOWED_ERR: number;\r\n PARSE_ERR: number;\r\n QUOTA_EXCEEDED_ERR: number;\r\n SECURITY_ERR: number;\r\n SERIALIZE_ERR: number;\r\n SYNTAX_ERR: number;\r\n TIMEOUT_ERR: number;\r\n TYPE_MISMATCH_ERR: number;\r\n URL_MISMATCH_ERR: number;\r\n VALIDATION_ERR: number;\r\n WRONG_DOCUMENT_ERR: number;\r\n}\r\n\r\ninterface DOMImplementation {\r\n createDocument(namespaceURI: string, qualifiedName: string, doctype: DocumentType): Document;\r\n createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType;\r\n createHTMLDocument(title: string): Document;\r\n hasFeature(feature: string, version: string): boolean;\r\n}\r\n\r\ndeclare var DOMImplementation: {\r\n prototype: DOMImplementation;\r\n new(): DOMImplementation;\r\n}\r\n\r\ninterface DOMParser {\r\n parseFromString(source: string, mimeType: string): Document;\r\n}\r\n\r\ndeclare var DOMParser: {\r\n prototype: DOMParser;\r\n new(): DOMParser;\r\n}\r\n\r\ninterface DOMSettableTokenList extends DOMTokenList {\r\n value: string;\r\n}\r\n\r\ndeclare var DOMSettableTokenList: {\r\n prototype: DOMSettableTokenList;\r\n new(): DOMSettableTokenList;\r\n}\r\n\r\ninterface DOMStringList {\r\n length: number;\r\n contains(str: string): boolean;\r\n item(index: number): string;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var DOMStringList: {\r\n prototype: DOMStringList;\r\n new(): DOMStringList;\r\n}\r\n\r\ninterface DOMStringMap {\r\n [name: string]: string;\r\n}\r\n\r\ndeclare var DOMStringMap: {\r\n prototype: DOMStringMap;\r\n new(): DOMStringMap;\r\n}\r\n\r\ninterface DOMTokenList {\r\n length: number;\r\n add(...token: string[]): void;\r\n contains(token: string): boolean;\r\n item(index: number): string;\r\n remove(...token: string[]): void;\r\n toString(): string;\r\n toggle(token: string, force?: boolean): boolean;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var DOMTokenList: {\r\n prototype: DOMTokenList;\r\n new(): DOMTokenList;\r\n}\r\n\r\ninterface DataCue extends TextTrackCue {\r\n data: ArrayBuffer;\r\n}\r\n\r\ndeclare var DataCue: {\r\n prototype: DataCue;\r\n new(): DataCue;\r\n}\r\n\r\ninterface DataTransfer {\r\n dropEffect: string;\r\n effectAllowed: string;\r\n files: FileList;\r\n items: DataTransferItemList;\r\n types: DOMStringList;\r\n clearData(format?: string): boolean;\r\n getData(format: string): string;\r\n setData(format: string, data: string): boolean;\r\n}\r\n\r\ndeclare var DataTransfer: {\r\n prototype: DataTransfer;\r\n new(): DataTransfer;\r\n}\r\n\r\ninterface DataTransferItem {\r\n kind: string;\r\n type: string;\r\n getAsFile(): File;\r\n getAsString(_callback: FunctionStringCallback): void;\r\n}\r\n\r\ndeclare var DataTransferItem: {\r\n prototype: DataTransferItem;\r\n new(): DataTransferItem;\r\n}\r\n\r\ninterface DataTransferItemList {\r\n length: number;\r\n add(data: File): DataTransferItem;\r\n clear(): void;\r\n item(index: number): DataTransferItem;\r\n remove(index: number): void;\r\n [index: number]: DataTransferItem;\r\n}\r\n\r\ndeclare var DataTransferItemList: {\r\n prototype: DataTransferItemList;\r\n new(): DataTransferItemList;\r\n}\r\n\r\ninterface DeferredPermissionRequest {\r\n id: number;\r\n type: string;\r\n uri: string;\r\n allow(): void;\r\n deny(): void;\r\n}\r\n\r\ndeclare var DeferredPermissionRequest: {\r\n prototype: DeferredPermissionRequest;\r\n new(): DeferredPermissionRequest;\r\n}\r\n\r\ninterface DelayNode extends AudioNode {\r\n delayTime: AudioParam;\r\n}\r\n\r\ndeclare var DelayNode: {\r\n prototype: DelayNode;\r\n new(): DelayNode;\r\n}\r\n\r\ninterface DeviceAcceleration {\r\n x: number;\r\n y: number;\r\n z: number;\r\n}\r\n\r\ndeclare var DeviceAcceleration: {\r\n prototype: DeviceAcceleration;\r\n new(): DeviceAcceleration;\r\n}\r\n\r\ninterface DeviceMotionEvent extends Event {\r\n acceleration: DeviceAcceleration;\r\n accelerationIncludingGravity: DeviceAcceleration;\r\n interval: number;\r\n rotationRate: DeviceRotationRate;\r\n initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict, accelerationIncludingGravity: DeviceAccelerationDict, rotationRate: DeviceRotationRateDict, interval: number): void;\r\n}\r\n\r\ndeclare var DeviceMotionEvent: {\r\n prototype: DeviceMotionEvent;\r\n new(): DeviceMotionEvent;\r\n}\r\n\r\ninterface DeviceOrientationEvent extends Event {\r\n absolute: boolean;\r\n alpha: number;\r\n beta: number;\r\n gamma: number;\r\n initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number, beta: number, gamma: number, absolute: boolean): void;\r\n}\r\n\r\ndeclare var DeviceOrientationEvent: {\r\n prototype: DeviceOrientationEvent;\r\n new(): DeviceOrientationEvent;\r\n}\r\n\r\ninterface DeviceRotationRate {\r\n alpha: number;\r\n beta: number;\r\n gamma: number;\r\n}\r\n\r\ndeclare var DeviceRotationRate: {\r\n prototype: DeviceRotationRate;\r\n new(): DeviceRotationRate;\r\n}\r\n\r\ninterface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent {\r\n /**\r\n * Sets or gets the URL for the current document. \r\n */\r\n URL: string;\r\n /**\r\n * Gets the URL for the document, stripped of any character encoding.\r\n */\r\n URLUnencoded: string;\r\n /**\r\n * Gets the object that has the focus when the parent document has focus.\r\n */\r\n activeElement: Element;\r\n /**\r\n * Sets or gets the color of all active links in the document.\r\n */\r\n alinkColor: string;\r\n /**\r\n * Returns a reference to the collection of elements contained by the object.\r\n */\r\n all: HTMLCollection;\r\n /**\r\n * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.\r\n */\r\n anchors: HTMLCollection;\r\n /**\r\n * Retrieves a collection of all applet objects in the document.\r\n */\r\n applets: HTMLCollection;\r\n /**\r\n * Deprecated. Sets or retrieves a value that indicates the background color behind the object. \r\n */\r\n bgColor: string;\r\n /**\r\n * Specifies the beginning and end of the document body.\r\n */\r\n body: HTMLElement;\r\n characterSet: string;\r\n /**\r\n * Gets or sets the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Gets a value that indicates whether standards-compliant mode is switched on for the object.\r\n */\r\n compatMode: string;\r\n cookie: string;\r\n /**\r\n * Gets the default character set from the current regional language settings.\r\n */\r\n defaultCharset: string;\r\n defaultView: Window;\r\n /**\r\n * Sets or gets a value that indicates whether the document can be edited.\r\n */\r\n designMode: string;\r\n /**\r\n * Sets or retrieves a value that indicates the reading order of the object. \r\n */\r\n dir: string;\r\n /**\r\n * Gets an object representing the document type declaration associated with the current document. \r\n */\r\n doctype: DocumentType;\r\n /**\r\n * Gets a reference to the root node of the document. \r\n */\r\n documentElement: HTMLElement;\r\n /**\r\n * Sets or gets the security domain of the document. \r\n */\r\n domain: string;\r\n /**\r\n * Retrieves a collection of all embed objects in the document.\r\n */\r\n embeds: HTMLCollection;\r\n /**\r\n * Sets or gets the foreground (text) color of the document.\r\n */\r\n fgColor: string;\r\n /**\r\n * Retrieves a collection, in source order, of all form objects in the document.\r\n */\r\n forms: HTMLCollection;\r\n fullscreenElement: Element;\r\n fullscreenEnabled: boolean;\r\n head: HTMLHeadElement;\r\n hidden: boolean;\r\n /**\r\n * Retrieves a collection, in source order, of img objects in the document.\r\n */\r\n images: HTMLCollection;\r\n /**\r\n * Gets the implementation object of the current document. \r\n */\r\n implementation: DOMImplementation;\r\n /**\r\n * Returns the character encoding used to create the webpage that is loaded into the document object.\r\n */\r\n inputEncoding: string;\r\n /**\r\n * Gets the date that the page was last modified, if the page supplies one. \r\n */\r\n lastModified: string;\r\n /**\r\n * Sets or gets the color of the document links. \r\n */\r\n linkColor: string;\r\n /**\r\n * Retrieves a collection of all a objects that specify the href property and all area objects in the document.\r\n */\r\n links: HTMLCollection;\r\n /**\r\n * Contains information about the current URL. \r\n */\r\n location: Location;\r\n media: string;\r\n msCSSOMElementFloatMetrics: boolean;\r\n msCapsLockWarningOff: boolean;\r\n msHidden: boolean;\r\n msVisibilityState: string;\r\n /**\r\n * Fires when the user aborts the download.\r\n * @param ev The event.\r\n */\r\n onabort: (ev: Event) => any;\r\n /**\r\n * Fires when the object is set as the active element.\r\n * @param ev The event.\r\n */\r\n onactivate: (ev: UIEvent) => any;\r\n /**\r\n * Fires immediately before the object is set as the active element.\r\n * @param ev The event.\r\n */\r\n onbeforeactivate: (ev: UIEvent) => any;\r\n /**\r\n * Fires immediately before the activeElement is changed from the current object to another object in the parent document.\r\n * @param ev The event.\r\n */\r\n onbeforedeactivate: (ev: UIEvent) => any;\r\n /** \r\n * Fires when the object loses the input focus. \r\n * @param ev The focus event.\r\n */\r\n onblur: (ev: FocusEvent) => any;\r\n /**\r\n * Occurs when playback is possible, but would require further buffering. \r\n * @param ev The event.\r\n */\r\n oncanplay: (ev: Event) => any;\r\n oncanplaythrough: (ev: Event) => any;\r\n /**\r\n * Fires when the contents of the object or selection have changed. \r\n * @param ev The event.\r\n */\r\n onchange: (ev: Event) => any;\r\n /**\r\n * Fires when the user clicks the left mouse button on the object\r\n * @param ev The mouse event.\r\n */\r\n onclick: (ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user clicks the right mouse button in the client area, opening the context menu. \r\n * @param ev The mouse event.\r\n */\r\n oncontextmenu: (ev: PointerEvent) => any;\r\n /**\r\n * Fires when the user double-clicks the object.\r\n * @param ev The mouse event.\r\n */\r\n ondblclick: (ev: MouseEvent) => any;\r\n /**\r\n * Fires when the activeElement is changed from the current object to another object in the parent document.\r\n * @param ev The UI Event\r\n */\r\n ondeactivate: (ev: UIEvent) => any;\r\n /**\r\n * Fires on the source object continuously during a drag operation.\r\n * @param ev The event.\r\n */\r\n ondrag: (ev: DragEvent) => any;\r\n /**\r\n * Fires on the source object when the user releases the mouse at the close of a drag operation.\r\n * @param ev The event.\r\n */\r\n ondragend: (ev: DragEvent) => any;\r\n /** \r\n * Fires on the target element when the user drags the object to a valid drop target.\r\n * @param ev The drag event.\r\n */\r\n ondragenter: (ev: DragEvent) => any;\r\n /** \r\n * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.\r\n * @param ev The drag event.\r\n */\r\n ondragleave: (ev: DragEvent) => any;\r\n /**\r\n * Fires on the target element continuously while the user drags the object over a valid drop target.\r\n * @param ev The event.\r\n */\r\n ondragover: (ev: DragEvent) => any;\r\n /**\r\n * Fires on the source object when the user starts to drag a text selection or selected object. \r\n * @param ev The event.\r\n */\r\n ondragstart: (ev: DragEvent) => any;\r\n ondrop: (ev: DragEvent) => any;\r\n /**\r\n * Occurs when the duration attribute is updated. \r\n * @param ev The event.\r\n */\r\n ondurationchange: (ev: Event) => any;\r\n /**\r\n * Occurs when the media element is reset to its initial state. \r\n * @param ev The event.\r\n */\r\n onemptied: (ev: Event) => any;\r\n /**\r\n * Occurs when the end of playback is reached. \r\n * @param ev The event\r\n */\r\n onended: (ev: Event) => any;\r\n /**\r\n * Fires when an error occurs during object loading.\r\n * @param ev The event.\r\n */\r\n onerror: (ev: Event) => any;\r\n /**\r\n * Fires when the object receives focus. \r\n * @param ev The event.\r\n */\r\n onfocus: (ev: FocusEvent) => any;\r\n onfullscreenchange: (ev: Event) => any;\r\n onfullscreenerror: (ev: Event) => any;\r\n oninput: (ev: Event) => any;\r\n /**\r\n * Fires when the user presses a key.\r\n * @param ev The keyboard event\r\n */\r\n onkeydown: (ev: KeyboardEvent) => any;\r\n /**\r\n * Fires when the user presses an alphanumeric key.\r\n * @param ev The event.\r\n */\r\n onkeypress: (ev: KeyboardEvent) => any;\r\n /**\r\n * Fires when the user releases a key.\r\n * @param ev The keyboard event\r\n */\r\n onkeyup: (ev: KeyboardEvent) => any;\r\n /**\r\n * Fires immediately after the browser loads the object. \r\n * @param ev The event.\r\n */\r\n onload: (ev: Event) => any;\r\n /**\r\n * Occurs when media data is loaded at the current playback position. \r\n * @param ev The event.\r\n */\r\n onloadeddata: (ev: Event) => any;\r\n /**\r\n * Occurs when the duration and dimensions of the media have been determined.\r\n * @param ev The event.\r\n */\r\n onloadedmetadata: (ev: Event) => any;\r\n /**\r\n * Occurs when Internet Explorer begins looking for media data. \r\n * @param ev The event.\r\n */\r\n onloadstart: (ev: Event) => any;\r\n /**\r\n * Fires when the user clicks the object with either mouse button. \r\n * @param ev The mouse event.\r\n */\r\n onmousedown: (ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user moves the mouse over the object. \r\n * @param ev The mouse event.\r\n */\r\n onmousemove: (ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user moves the mouse pointer outside the boundaries of the object. \r\n * @param ev The mouse event.\r\n */\r\n onmouseout: (ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user moves the mouse pointer into the object.\r\n * @param ev The mouse event.\r\n */\r\n onmouseover: (ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user releases a mouse button while the mouse is over the object. \r\n * @param ev The mouse event.\r\n */\r\n onmouseup: (ev: MouseEvent) => any;\r\n /**\r\n * Fires when the wheel button is rotated. \r\n * @param ev The mouse event\r\n */\r\n onmousewheel: (ev: MouseWheelEvent) => any;\r\n onmscontentzoom: (ev: UIEvent) => any;\r\n onmsgesturechange: (ev: MSGestureEvent) => any;\r\n onmsgesturedoubletap: (ev: MSGestureEvent) => any;\r\n onmsgestureend: (ev: MSGestureEvent) => any;\r\n onmsgesturehold: (ev: MSGestureEvent) => any;\r\n onmsgesturestart: (ev: MSGestureEvent) => any;\r\n onmsgesturetap: (ev: MSGestureEvent) => any;\r\n onmsinertiastart: (ev: MSGestureEvent) => any;\r\n onmsmanipulationstatechanged: (ev: MSManipulationEvent) => any;\r\n onmspointercancel: (ev: MSPointerEvent) => any;\r\n onmspointerdown: (ev: MSPointerEvent) => any;\r\n onmspointerenter: (ev: MSPointerEvent) => any;\r\n onmspointerleave: (ev: MSPointerEvent) => any;\r\n onmspointermove: (ev: MSPointerEvent) => any;\r\n onmspointerout: (ev: MSPointerEvent) => any;\r\n onmspointerover: (ev: MSPointerEvent) => any;\r\n onmspointerup: (ev: MSPointerEvent) => any;\r\n /**\r\n * Occurs when an item is removed from a Jump List of a webpage running in Site Mode. \r\n * @param ev The event.\r\n */\r\n onmssitemodejumplistitemremoved: (ev: MSSiteModeEvent) => any;\r\n /**\r\n * Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode.\r\n * @param ev The event.\r\n */\r\n onmsthumbnailclick: (ev: MSSiteModeEvent) => any;\r\n /**\r\n * Occurs when playback is paused.\r\n * @param ev The event.\r\n */\r\n onpause: (ev: Event) => any;\r\n /**\r\n * Occurs when the play method is requested. \r\n * @param ev The event.\r\n */\r\n onplay: (ev: Event) => any;\r\n /**\r\n * Occurs when the audio or video has started playing. \r\n * @param ev The event.\r\n */\r\n onplaying: (ev: Event) => any;\r\n onpointerlockchange: (ev: Event) => any;\r\n onpointerlockerror: (ev: Event) => any;\r\n /**\r\n * Occurs to indicate progress while downloading media data. \r\n * @param ev The event.\r\n */\r\n onprogress: (ev: ProgressEvent) => any;\r\n /**\r\n * Occurs when the playback rate is increased or decreased. \r\n * @param ev The event.\r\n */\r\n onratechange: (ev: Event) => any;\r\n /**\r\n * Fires when the state of the object has changed.\r\n * @param ev The event\r\n */\r\n onreadystatechange: (ev: ProgressEvent) => any;\r\n /**\r\n * Fires when the user resets a form. \r\n * @param ev The event.\r\n */\r\n onreset: (ev: Event) => any;\r\n /**\r\n * Fires when the user repositions the scroll box in the scroll bar on the object. \r\n * @param ev The event.\r\n */\r\n onscroll: (ev: UIEvent) => any;\r\n /**\r\n * Occurs when the seek operation ends. \r\n * @param ev The event.\r\n */\r\n onseeked: (ev: Event) => any;\r\n /**\r\n * Occurs when the current playback position is moved. \r\n * @param ev The event.\r\n */\r\n onseeking: (ev: Event) => any;\r\n /**\r\n * Fires when the current selection changes.\r\n * @param ev The event.\r\n */\r\n onselect: (ev: UIEvent) => any;\r\n onselectstart: (ev: Event) => any;\r\n /**\r\n * Occurs when the download has stopped. \r\n * @param ev The event.\r\n */\r\n onstalled: (ev: Event) => any;\r\n /**\r\n * Fires when the user clicks the Stop button or leaves the Web page.\r\n * @param ev The event.\r\n */\r\n onstop: (ev: Event) => any;\r\n onsubmit: (ev: Event) => any;\r\n /**\r\n * Occurs if the load operation has been intentionally halted. \r\n * @param ev The event.\r\n */\r\n onsuspend: (ev: Event) => any;\r\n /**\r\n * Occurs to indicate the current playback position.\r\n * @param ev The event.\r\n */\r\n ontimeupdate: (ev: Event) => any;\r\n ontouchcancel: (ev: TouchEvent) => any;\r\n ontouchend: (ev: TouchEvent) => any;\r\n ontouchmove: (ev: TouchEvent) => any;\r\n ontouchstart: (ev: TouchEvent) => any;\r\n /**\r\n * Occurs when the volume is changed, or playback is muted or unmuted.\r\n * @param ev The event.\r\n */\r\n onvolumechange: (ev: Event) => any;\r\n /**\r\n * Occurs when playback stops because the next frame of a video resource is not available. \r\n * @param ev The event.\r\n */\r\n onwaiting: (ev: Event) => any;\r\n onwebkitfullscreenchange: (ev: Event) => any;\r\n onwebkitfullscreenerror: (ev: Event) => any;\r\n plugins: HTMLCollection;\r\n pointerLockElement: Element;\r\n /**\r\n * Retrieves a value that indicates the current state of the object.\r\n */\r\n readyState: string;\r\n /**\r\n * Gets the URL of the location that referred the user to the current page.\r\n */\r\n referrer: string;\r\n /**\r\n * Gets the root svg element in the document hierarchy.\r\n */\r\n rootElement: SVGSVGElement;\r\n /**\r\n * Retrieves a collection of all script objects in the document.\r\n */\r\n scripts: HTMLCollection;\r\n security: string;\r\n /**\r\n * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.\r\n */\r\n styleSheets: StyleSheetList;\r\n /**\r\n * Contains the title of the document.\r\n */\r\n title: string;\r\n visibilityState: string;\r\n /** \r\n * Sets or gets the color of the links that the user has visited.\r\n */\r\n vlinkColor: string;\r\n webkitCurrentFullScreenElement: Element;\r\n webkitFullscreenElement: Element;\r\n webkitFullscreenEnabled: boolean;\r\n webkitIsFullScreen: boolean;\r\n xmlEncoding: string;\r\n xmlStandalone: boolean;\r\n /**\r\n * Gets or sets the version attribute specified in the declaration of an XML document.\r\n */\r\n xmlVersion: string;\r\n currentScript: HTMLScriptElement;\r\n adoptNode(source: Node): Node;\r\n captureEvents(): void;\r\n clear(): void;\r\n /**\r\n * Closes an output stream and forces the sent data to display.\r\n */\r\n close(): void;\r\n /**\r\n * Creates an attribute object with a specified name.\r\n * @param name String that sets the attribute object's name.\r\n */\r\n createAttribute(name: string): Attr;\r\n createAttributeNS(namespaceURI: string, qualifiedName: string): Attr;\r\n createCDATASection(data: string): CDATASection;\r\n /**\r\n * Creates a comment object with the specified data.\r\n * @param data Sets the comment object's data.\r\n */\r\n createComment(data: string): Comment;\r\n /**\r\n * Creates a new document.\r\n */\r\n createDocumentFragment(): DocumentFragment;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: \"a\"): HTMLAnchorElement;\r\n createElement(tagName: \"abbr\"): HTMLPhraseElement;\r\n createElement(tagName: \"acronym\"): HTMLPhraseElement;\r\n createElement(tagName: \"address\"): HTMLBlockElement;\r\n createElement(tagName: \"applet\"): HTMLAppletElement;\r\n createElement(tagName: \"area\"): HTMLAreaElement;\r\n createElement(tagName: \"audio\"): HTMLAudioElement;\r\n createElement(tagName: \"b\"): HTMLPhraseElement;\r\n createElement(tagName: \"base\"): HTMLBaseElement;\r\n createElement(tagName: \"basefont\"): HTMLBaseFontElement;\r\n createElement(tagName: \"bdo\"): HTMLPhraseElement;\r\n createElement(tagName: \"big\"): HTMLPhraseElement;\r\n createElement(tagName: \"blockquote\"): HTMLBlockElement;\r\n createElement(tagName: \"body\"): HTMLBodyElement;\r\n createElement(tagName: \"br\"): HTMLBRElement;\r\n createElement(tagName: \"button\"): HTMLButtonElement;\r\n createElement(tagName: \"canvas\"): HTMLCanvasElement;\r\n createElement(tagName: \"caption\"): HTMLTableCaptionElement;\r\n createElement(tagName: \"center\"): HTMLBlockElement;\r\n createElement(tagName: \"cite\"): HTMLPhraseElement;\r\n createElement(tagName: \"code\"): HTMLPhraseElement;\r\n createElement(tagName: \"col\"): HTMLTableColElement;\r\n createElement(tagName: \"colgroup\"): HTMLTableColElement;\r\n createElement(tagName: \"datalist\"): HTMLDataListElement;\r\n createElement(tagName: \"dd\"): HTMLDDElement;\r\n createElement(tagName: \"del\"): HTMLModElement;\r\n createElement(tagName: \"dfn\"): HTMLPhraseElement;\r\n createElement(tagName: \"dir\"): HTMLDirectoryElement;\r\n createElement(tagName: \"div\"): HTMLDivElement;\r\n createElement(tagName: \"dl\"): HTMLDListElement;\r\n createElement(tagName: \"dt\"): HTMLDTElement;\r\n createElement(tagName: \"em\"): HTMLPhraseElement;\r\n createElement(tagName: \"embed\"): HTMLEmbedElement;\r\n createElement(tagName: \"fieldset\"): HTMLFieldSetElement;\r\n createElement(tagName: \"font\"): HTMLFontElement;\r\n createElement(tagName: \"form\"): HTMLFormElement;\r\n createElement(tagName: \"frame\"): HTMLFrameElement;\r\n createElement(tagName: \"frameset\"): HTMLFrameSetElement;\r\n createElement(tagName: \"h1\"): HTMLHeadingElement;\r\n createElement(tagName: \"h2\"): HTMLHeadingElement;\r\n createElement(tagName: \"h3\"): HTMLHeadingElement;\r\n createElement(tagName: \"h4\"): HTMLHeadingElement;\r\n createElement(tagName: \"h5\"): HTMLHeadingElement;\r\n createElement(tagName: \"h6\"): HTMLHeadingElement;\r\n createElement(tagName: \"head\"): HTMLHeadElement;\r\n createElement(tagName: \"hr\"): HTMLHRElement;\r\n createElement(tagName: \"html\"): HTMLHtmlElement;\r\n createElement(tagName: \"i\"): HTMLPhraseElement;\r\n createElement(tagName: \"iframe\"): HTMLIFrameElement;\r\n createElement(tagName: \"img\"): HTMLImageElement;\r\n createElement(tagName: \"input\"): HTMLInputElement;\r\n createElement(tagName: \"ins\"): HTMLModElement;\r\n createElement(tagName: \"isindex\"): HTMLIsIndexElement;\r\n createElement(tagName: \"kbd\"): HTMLPhraseElement;\r\n createElement(tagName: \"keygen\"): HTMLBlockElement;\r\n createElement(tagName: \"label\"): HTMLLabelElement;\r\n createElement(tagName: \"legend\"): HTMLLegendElement;\r\n createElement(tagName: \"li\"): HTMLLIElement;\r\n createElement(tagName: \"link\"): HTMLLinkElement;\r\n createElement(tagName: \"listing\"): HTMLBlockElement;\r\n createElement(tagName: \"map\"): HTMLMapElement;\r\n createElement(tagName: \"marquee\"): HTMLMarqueeElement;\r\n createElement(tagName: \"menu\"): HTMLMenuElement;\r\n createElement(tagName: \"meta\"): HTMLMetaElement;\r\n createElement(tagName: \"nextid\"): HTMLNextIdElement;\r\n createElement(tagName: \"nobr\"): HTMLPhraseElement;\r\n createElement(tagName: \"object\"): HTMLObjectElement;\r\n createElement(tagName: \"ol\"): HTMLOListElement;\r\n createElement(tagName: \"optgroup\"): HTMLOptGroupElement;\r\n createElement(tagName: \"option\"): HTMLOptionElement;\r\n createElement(tagName: \"p\"): HTMLParagraphElement;\r\n createElement(tagName: \"param\"): HTMLParamElement;\r\n createElement(tagName: \"plaintext\"): HTMLBlockElement;\r\n createElement(tagName: \"pre\"): HTMLPreElement;\r\n createElement(tagName: \"progress\"): HTMLProgressElement;\r\n createElement(tagName: \"q\"): HTMLQuoteElement;\r\n createElement(tagName: \"rt\"): HTMLPhraseElement;\r\n createElement(tagName: \"ruby\"): HTMLPhraseElement;\r\n createElement(tagName: \"s\"): HTMLPhraseElement;\r\n createElement(tagName: \"samp\"): HTMLPhraseElement;\r\n createElement(tagName: \"script\"): HTMLScriptElement;\r\n createElement(tagName: \"select\"): HTMLSelectElement;\r\n createElement(tagName: \"small\"): HTMLPhraseElement;\r\n createElement(tagName: \"source\"): HTMLSourceElement;\r\n createElement(tagName: \"span\"): HTMLSpanElement;\r\n createElement(tagName: \"strike\"): HTMLPhraseElement;\r\n createElement(tagName: \"strong\"): HTMLPhraseElement;\r\n createElement(tagName: \"style\"): HTMLStyleElement;\r\n createElement(tagName: \"sub\"): HTMLPhraseElement;\r\n createElement(tagName: \"sup\"): HTMLPhraseElement;\r\n createElement(tagName: \"table\"): HTMLTableElement;\r\n createElement(tagName: \"tbody\"): HTMLTableSectionElement;\r\n createElement(tagName: \"td\"): HTMLTableDataCellElement;\r\n createElement(tagName: \"textarea\"): HTMLTextAreaElement;\r\n createElement(tagName: \"tfoot\"): HTMLTableSectionElement;\r\n createElement(tagName: \"th\"): HTMLTableHeaderCellElement;\r\n createElement(tagName: \"thead\"): HTMLTableSectionElement;\r\n createElement(tagName: \"title\"): HTMLTitleElement;\r\n createElement(tagName: \"tr\"): HTMLTableRowElement;\r\n createElement(tagName: \"track\"): HTMLTrackElement;\r\n createElement(tagName: \"tt\"): HTMLPhraseElement;\r\n createElement(tagName: \"u\"): HTMLPhraseElement;\r\n createElement(tagName: \"ul\"): HTMLUListElement;\r\n createElement(tagName: \"var\"): HTMLPhraseElement;\r\n createElement(tagName: \"video\"): HTMLVideoElement;\r\n createElement(tagName: \"x-ms-webview\"): MSHTMLWebViewElement;\r\n createElement(tagName: \"xmp\"): HTMLBlockElement;\r\n createElement(tagName: string): HTMLElement;\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"a\"): SVGAElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"circle\"): SVGCircleElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"clipPath\"): SVGClipPathElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"componentTransferFunction\"): SVGComponentTransferFunctionElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"defs\"): SVGDefsElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"desc\"): SVGDescElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"ellipse\"): SVGEllipseElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feBlend\"): SVGFEBlendElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feColorMatrix\"): SVGFEColorMatrixElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feComponentTransfer\"): SVGFEComponentTransferElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feComposite\"): SVGFECompositeElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feConvolveMatrix\"): SVGFEConvolveMatrixElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feDiffuseLighting\"): SVGFEDiffuseLightingElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feDisplacementMap\"): SVGFEDisplacementMapElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feDistantLight\"): SVGFEDistantLightElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFlood\"): SVGFEFloodElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncA\"): SVGFEFuncAElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncB\"): SVGFEFuncBElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncG\"): SVGFEFuncGElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncR\"): SVGFEFuncRElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feGaussianBlur\"): SVGFEGaussianBlurElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feImage\"): SVGFEImageElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feMerge\"): SVGFEMergeElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feMergeNode\"): SVGFEMergeNodeElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feMorphology\"): SVGFEMorphologyElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feOffset\"): SVGFEOffsetElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"fePointLight\"): SVGFEPointLightElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feSpecularLighting\"): SVGFESpecularLightingElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feSpotLight\"): SVGFESpotLightElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feTile\"): SVGFETileElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feTurbulence\"): SVGFETurbulenceElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"filter\"): SVGFilterElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"foreignObject\"): SVGForeignObjectElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"g\"): SVGGElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"image\"): SVGImageElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"gradient\"): SVGGradientElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"line\"): SVGLineElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"linearGradient\"): SVGLinearGradientElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"marker\"): SVGMarkerElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"mask\"): SVGMaskElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"path\"): SVGPathElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"metadata\"): SVGMetadataElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"pattern\"): SVGPatternElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"polygon\"): SVGPolygonElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"polyline\"): SVGPolylineElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"radialGradient\"): SVGRadialGradientElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"rect\"): SVGRectElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"svg\"): SVGSVGElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"script\"): SVGScriptElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"stop\"): SVGStopElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"style\"): SVGStyleElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"switch\"): SVGSwitchElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"symbol\"): SVGSymbolElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"tspan\"): SVGTSpanElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"textContent\"): SVGTextContentElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"text\"): SVGTextElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"textPath\"): SVGTextPathElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"textPositioning\"): SVGTextPositioningElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"title\"): SVGTitleElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"use\"): SVGUseElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"view\"): SVGViewElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: string): SVGElement\r\n createElementNS(namespaceURI: string, qualifiedName: string): Element;\r\n createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;\r\n createNSResolver(nodeResolver: Node): XPathNSResolver;\r\n /**\r\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document. \r\n * @param root The root element or node to start traversing on.\r\n * @param whatToShow The type of nodes or elements to appear in the node list\r\n * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter.\r\n * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.\r\n */\r\n createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): NodeIterator;\r\n createProcessingInstruction(target: string, data: string): ProcessingInstruction;\r\n /**\r\n * Returns an empty range object that has both of its boundary points positioned at the beginning of the document. \r\n */\r\n createRange(): Range;\r\n /**\r\n * Creates a text string from the specified value. \r\n * @param data String that specifies the nodeValue property of the text node.\r\n */\r\n createTextNode(data: string): Text;\r\n createTouch(view: any, target: EventTarget, identifier: number, pageX: number, pageY: number, screenX: number, screenY: number): Touch;\r\n createTouchList(...touches: Touch[]): TouchList;\r\n /**\r\n * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.\r\n * @param root The root element or node to start traversing on.\r\n * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow.\r\n * @param filter A custom NodeFilter function to use.\r\n * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.\r\n */\r\n createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): TreeWalker;\r\n /**\r\n * Returns the element for the specified x coordinate and the specified y coordinate. \r\n * @param x The x-offset\r\n * @param y The y-offset\r\n */\r\n elementFromPoint(x: number, y: number): Element;\r\n evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver, type: number, result: XPathResult): XPathResult;\r\n /**\r\n * Executes a command on the current document, current selection, or the given range.\r\n * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.\r\n * @param showUI Display the user interface, defaults to false.\r\n * @param value Value to assign.\r\n */\r\n execCommand(commandId: string, showUI?: boolean, value?: any): boolean;\r\n /**\r\n * Displays help information for the given command identifier.\r\n * @param commandId Displays help information for the given command identifier.\r\n */\r\n execCommandShowHelp(commandId: string): boolean;\r\n exitFullscreen(): void;\r\n exitPointerLock(): void;\r\n /**\r\n * Causes the element to receive the focus and executes the code specified by the onfocus event.\r\n */\r\n focus(): void;\r\n /**\r\n * Returns a reference to the first object with the specified value of the ID or NAME attribute.\r\n * @param elementId String that specifies the ID value. Case-insensitive.\r\n */\r\n getElementById(elementId: string): HTMLElement;\r\n getElementsByClassName(classNames: string): NodeListOf;\r\n /**\r\n * Gets a collection of objects based on the value of the NAME or ID attribute.\r\n * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.\r\n */\r\n getElementsByName(elementName: string): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(tagname: \"a\"): NodeListOf;\r\n getElementsByTagName(tagname: \"abbr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"acronym\"): NodeListOf;\r\n getElementsByTagName(tagname: \"address\"): NodeListOf;\r\n getElementsByTagName(tagname: \"applet\"): NodeListOf;\r\n getElementsByTagName(tagname: \"area\"): NodeListOf;\r\n getElementsByTagName(tagname: \"article\"): NodeListOf;\r\n getElementsByTagName(tagname: \"aside\"): NodeListOf;\r\n getElementsByTagName(tagname: \"audio\"): NodeListOf;\r\n getElementsByTagName(tagname: \"b\"): NodeListOf;\r\n getElementsByTagName(tagname: \"base\"): NodeListOf;\r\n getElementsByTagName(tagname: \"basefont\"): NodeListOf;\r\n getElementsByTagName(tagname: \"bdo\"): NodeListOf;\r\n getElementsByTagName(tagname: \"big\"): NodeListOf;\r\n getElementsByTagName(tagname: \"blockquote\"): NodeListOf;\r\n getElementsByTagName(tagname: \"body\"): NodeListOf;\r\n getElementsByTagName(tagname: \"br\"): NodeListOf;\r\n getElementsByTagName(tagname: \"button\"): NodeListOf;\r\n getElementsByTagName(tagname: \"canvas\"): NodeListOf;\r\n getElementsByTagName(tagname: \"caption\"): NodeListOf;\r\n getElementsByTagName(tagname: \"center\"): NodeListOf;\r\n getElementsByTagName(tagname: \"circle\"): NodeListOf;\r\n getElementsByTagName(tagname: \"cite\"): NodeListOf;\r\n getElementsByTagName(tagname: \"clippath\"): NodeListOf;\r\n getElementsByTagName(tagname: \"code\"): NodeListOf;\r\n getElementsByTagName(tagname: \"col\"): NodeListOf;\r\n getElementsByTagName(tagname: \"colgroup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"datalist\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dd\"): NodeListOf;\r\n getElementsByTagName(tagname: \"defs\"): NodeListOf;\r\n getElementsByTagName(tagname: \"del\"): NodeListOf;\r\n getElementsByTagName(tagname: \"desc\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dfn\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dir\"): NodeListOf;\r\n getElementsByTagName(tagname: \"div\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dl\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dt\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ellipse\"): NodeListOf;\r\n getElementsByTagName(tagname: \"em\"): NodeListOf;\r\n getElementsByTagName(tagname: \"embed\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feblend\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fecolormatrix\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fecomponenttransfer\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fecomposite\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feconvolvematrix\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fediffuselighting\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fedisplacementmap\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fedistantlight\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feflood\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefunca\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefuncb\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefuncg\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefuncr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fegaussianblur\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feimage\"): NodeListOf;\r\n getElementsByTagName(tagname: \"femerge\"): NodeListOf;\r\n getElementsByTagName(tagname: \"femergenode\"): NodeListOf;\r\n getElementsByTagName(tagname: \"femorphology\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feoffset\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fepointlight\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fespecularlighting\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fespotlight\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fetile\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feturbulence\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fieldset\"): NodeListOf;\r\n getElementsByTagName(tagname: \"figcaption\"): NodeListOf;\r\n getElementsByTagName(tagname: \"figure\"): NodeListOf;\r\n getElementsByTagName(tagname: \"filter\"): NodeListOf;\r\n getElementsByTagName(tagname: \"font\"): NodeListOf;\r\n getElementsByTagName(tagname: \"footer\"): NodeListOf;\r\n getElementsByTagName(tagname: \"foreignobject\"): NodeListOf;\r\n getElementsByTagName(tagname: \"form\"): NodeListOf;\r\n getElementsByTagName(tagname: \"frame\"): NodeListOf;\r\n getElementsByTagName(tagname: \"frameset\"): NodeListOf;\r\n getElementsByTagName(tagname: \"g\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h1\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h2\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h3\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h4\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h5\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h6\"): NodeListOf;\r\n getElementsByTagName(tagname: \"head\"): NodeListOf;\r\n getElementsByTagName(tagname: \"header\"): NodeListOf;\r\n getElementsByTagName(tagname: \"hgroup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"hr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"html\"): NodeListOf;\r\n getElementsByTagName(tagname: \"i\"): NodeListOf;\r\n getElementsByTagName(tagname: \"iframe\"): NodeListOf;\r\n getElementsByTagName(tagname: \"image\"): NodeListOf;\r\n getElementsByTagName(tagname: \"img\"): NodeListOf;\r\n getElementsByTagName(tagname: \"input\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ins\"): NodeListOf;\r\n getElementsByTagName(tagname: \"isindex\"): NodeListOf;\r\n getElementsByTagName(tagname: \"kbd\"): NodeListOf;\r\n getElementsByTagName(tagname: \"keygen\"): NodeListOf;\r\n getElementsByTagName(tagname: \"label\"): NodeListOf;\r\n getElementsByTagName(tagname: \"legend\"): NodeListOf;\r\n getElementsByTagName(tagname: \"li\"): NodeListOf;\r\n getElementsByTagName(tagname: \"line\"): NodeListOf;\r\n getElementsByTagName(tagname: \"lineargradient\"): NodeListOf;\r\n getElementsByTagName(tagname: \"link\"): NodeListOf;\r\n getElementsByTagName(tagname: \"listing\"): NodeListOf;\r\n getElementsByTagName(tagname: \"map\"): NodeListOf;\r\n getElementsByTagName(tagname: \"mark\"): NodeListOf;\r\n getElementsByTagName(tagname: \"marker\"): NodeListOf;\r\n getElementsByTagName(tagname: \"marquee\"): NodeListOf;\r\n getElementsByTagName(tagname: \"mask\"): NodeListOf;\r\n getElementsByTagName(tagname: \"menu\"): NodeListOf;\r\n getElementsByTagName(tagname: \"meta\"): NodeListOf;\r\n getElementsByTagName(tagname: \"metadata\"): NodeListOf;\r\n getElementsByTagName(tagname: \"nav\"): NodeListOf;\r\n getElementsByTagName(tagname: \"nextid\"): NodeListOf;\r\n getElementsByTagName(tagname: \"nobr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"noframes\"): NodeListOf;\r\n getElementsByTagName(tagname: \"noscript\"): NodeListOf;\r\n getElementsByTagName(tagname: \"object\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ol\"): NodeListOf;\r\n getElementsByTagName(tagname: \"optgroup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"option\"): NodeListOf;\r\n getElementsByTagName(tagname: \"p\"): NodeListOf;\r\n getElementsByTagName(tagname: \"param\"): NodeListOf;\r\n getElementsByTagName(tagname: \"path\"): NodeListOf;\r\n getElementsByTagName(tagname: \"pattern\"): NodeListOf;\r\n getElementsByTagName(tagname: \"plaintext\"): NodeListOf;\r\n getElementsByTagName(tagname: \"polygon\"): NodeListOf;\r\n getElementsByTagName(tagname: \"polyline\"): NodeListOf;\r\n getElementsByTagName(tagname: \"pre\"): NodeListOf;\r\n getElementsByTagName(tagname: \"progress\"): NodeListOf;\r\n getElementsByTagName(tagname: \"q\"): NodeListOf;\r\n getElementsByTagName(tagname: \"radialgradient\"): NodeListOf;\r\n getElementsByTagName(tagname: \"rect\"): NodeListOf;\r\n getElementsByTagName(tagname: \"rt\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ruby\"): NodeListOf;\r\n getElementsByTagName(tagname: \"s\"): NodeListOf;\r\n getElementsByTagName(tagname: \"samp\"): NodeListOf;\r\n getElementsByTagName(tagname: \"script\"): NodeListOf;\r\n getElementsByTagName(tagname: \"section\"): NodeListOf;\r\n getElementsByTagName(tagname: \"select\"): NodeListOf;\r\n getElementsByTagName(tagname: \"small\"): NodeListOf;\r\n getElementsByTagName(tagname: \"source\"): NodeListOf;\r\n getElementsByTagName(tagname: \"span\"): NodeListOf;\r\n getElementsByTagName(tagname: \"stop\"): NodeListOf;\r\n getElementsByTagName(tagname: \"strike\"): NodeListOf;\r\n getElementsByTagName(tagname: \"strong\"): NodeListOf;\r\n getElementsByTagName(tagname: \"style\"): NodeListOf;\r\n getElementsByTagName(tagname: \"sub\"): NodeListOf;\r\n getElementsByTagName(tagname: \"sup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"svg\"): NodeListOf;\r\n getElementsByTagName(tagname: \"switch\"): NodeListOf;\r\n getElementsByTagName(tagname: \"symbol\"): NodeListOf;\r\n getElementsByTagName(tagname: \"table\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tbody\"): NodeListOf;\r\n getElementsByTagName(tagname: \"td\"): NodeListOf;\r\n getElementsByTagName(tagname: \"text\"): NodeListOf;\r\n getElementsByTagName(tagname: \"textpath\"): NodeListOf;\r\n getElementsByTagName(tagname: \"textarea\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tfoot\"): NodeListOf;\r\n getElementsByTagName(tagname: \"th\"): NodeListOf;\r\n getElementsByTagName(tagname: \"thead\"): NodeListOf;\r\n getElementsByTagName(tagname: \"title\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"track\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tspan\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tt\"): NodeListOf;\r\n getElementsByTagName(tagname: \"u\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ul\"): NodeListOf;\r\n getElementsByTagName(tagname: \"use\"): NodeListOf;\r\n getElementsByTagName(tagname: \"var\"): NodeListOf;\r\n getElementsByTagName(tagname: \"video\"): NodeListOf;\r\n getElementsByTagName(tagname: \"view\"): NodeListOf;\r\n getElementsByTagName(tagname: \"wbr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"x-ms-webview\"): NodeListOf;\r\n getElementsByTagName(tagname: \"xmp\"): NodeListOf;\r\n getElementsByTagName(tagname: string): NodeListOf;\r\n getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf;\r\n /**\r\n * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.\r\n */\r\n getSelection(): Selection;\r\n /**\r\n * Gets a value indicating whether the object currently has focus.\r\n */\r\n hasFocus(): boolean;\r\n importNode(importedNode: Node, deep: boolean): Node;\r\n msElementsFromPoint(x: number, y: number): NodeList;\r\n msElementsFromRect(left: number, top: number, width: number, height: number): NodeList;\r\n /**\r\n * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.\r\n * @param url Specifies a MIME type for the document.\r\n * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.\r\n * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, \"fullscreen=yes, toolbar=yes\"). The following values are supported.\r\n * @param replace Specifies whether the existing entry for the document is replaced in the history list.\r\n */\r\n open(url?: string, name?: string, features?: string, replace?: boolean): Document;\r\n /** \r\n * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.\r\n * @param commandId Specifies a command identifier.\r\n */\r\n queryCommandEnabled(commandId: string): boolean;\r\n /**\r\n * Returns a Boolean value that indicates whether the specified command is in the indeterminate state.\r\n * @param commandId String that specifies a command identifier.\r\n */\r\n queryCommandIndeterm(commandId: string): boolean;\r\n /**\r\n * Returns a Boolean value that indicates the current state of the command.\r\n * @param commandId String that specifies a command identifier.\r\n */\r\n queryCommandState(commandId: string): boolean;\r\n /**\r\n * Returns a Boolean value that indicates whether the current command is supported on the current range.\r\n * @param commandId Specifies a command identifier.\r\n */\r\n queryCommandSupported(commandId: string): boolean;\r\n /**\r\n * Retrieves the string associated with a command.\r\n * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers. \r\n */\r\n queryCommandText(commandId: string): string;\r\n /**\r\n * Returns the current value of the document, range, or current selection for the given command.\r\n * @param commandId String that specifies a command identifier.\r\n */\r\n queryCommandValue(commandId: string): string;\r\n releaseEvents(): void;\r\n /**\r\n * Allows updating the print settings for the page.\r\n */\r\n updateSettings(): void;\r\n webkitCancelFullScreen(): void;\r\n webkitExitFullscreen(): void;\r\n /**\r\n * Writes one or more HTML expressions to a document in the specified window. \r\n * @param content Specifies the text and HTML tags to write.\r\n */\r\n write(...content: string[]): void;\r\n /**\r\n * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window. \r\n * @param content The text and HTML tags to write.\r\n */\r\n writeln(...content: string[]): void;\r\n createElement(tagName: \"picture\"): HTMLPictureElement;\r\n getElementsByTagName(tagname: \"picture\"): NodeListOf;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"fullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"fullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mssitemodejumplistitemremoved\", listener: (ev: MSSiteModeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"msthumbnailclick\", listener: (ev: MSSiteModeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerlockchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerlockerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"readystatechange\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stop\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Document: {\r\n prototype: Document;\r\n new(): Document;\r\n}\r\n\r\ninterface DocumentFragment extends Node, NodeSelector {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var DocumentFragment: {\r\n prototype: DocumentFragment;\r\n new(): DocumentFragment;\r\n}\r\n\r\ninterface DocumentType extends Node, ChildNode {\r\n entities: NamedNodeMap;\r\n internalSubset: string;\r\n name: string;\r\n notations: NamedNodeMap;\r\n publicId: string;\r\n systemId: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var DocumentType: {\r\n prototype: DocumentType;\r\n new(): DocumentType;\r\n}\r\n\r\ninterface DragEvent extends MouseEvent {\r\n dataTransfer: DataTransfer;\r\n initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void;\r\n msConvertURL(file: File, targetType: string, targetURL?: string): void;\r\n}\r\n\r\ndeclare var DragEvent: {\r\n prototype: DragEvent;\r\n new(): DragEvent;\r\n}\r\n\r\ninterface DynamicsCompressorNode extends AudioNode {\r\n attack: AudioParam;\r\n knee: AudioParam;\r\n ratio: AudioParam;\r\n reduction: AudioParam;\r\n release: AudioParam;\r\n threshold: AudioParam;\r\n}\r\n\r\ndeclare var DynamicsCompressorNode: {\r\n prototype: DynamicsCompressorNode;\r\n new(): DynamicsCompressorNode;\r\n}\r\n\r\ninterface EXT_texture_filter_anisotropic {\r\n MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n}\r\n\r\ndeclare var EXT_texture_filter_anisotropic: {\r\n prototype: EXT_texture_filter_anisotropic;\r\n new(): EXT_texture_filter_anisotropic;\r\n MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n}\r\n\r\ninterface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelector, ChildNode {\r\n classList: DOMTokenList;\r\n clientHeight: number;\r\n clientLeft: number;\r\n clientTop: number;\r\n clientWidth: number;\r\n msContentZoomFactor: number;\r\n msRegionOverflow: string;\r\n onariarequest: (ev: AriaRequestEvent) => any;\r\n oncommand: (ev: CommandEvent) => any;\r\n ongotpointercapture: (ev: PointerEvent) => any;\r\n onlostpointercapture: (ev: PointerEvent) => any;\r\n onmsgesturechange: (ev: MSGestureEvent) => any;\r\n onmsgesturedoubletap: (ev: MSGestureEvent) => any;\r\n onmsgestureend: (ev: MSGestureEvent) => any;\r\n onmsgesturehold: (ev: MSGestureEvent) => any;\r\n onmsgesturestart: (ev: MSGestureEvent) => any;\r\n onmsgesturetap: (ev: MSGestureEvent) => any;\r\n onmsgotpointercapture: (ev: MSPointerEvent) => any;\r\n onmsinertiastart: (ev: MSGestureEvent) => any;\r\n onmslostpointercapture: (ev: MSPointerEvent) => any;\r\n onmspointercancel: (ev: MSPointerEvent) => any;\r\n onmspointerdown: (ev: MSPointerEvent) => any;\r\n onmspointerenter: (ev: MSPointerEvent) => any;\r\n onmspointerleave: (ev: MSPointerEvent) => any;\r\n onmspointermove: (ev: MSPointerEvent) => any;\r\n onmspointerout: (ev: MSPointerEvent) => any;\r\n onmspointerover: (ev: MSPointerEvent) => any;\r\n onmspointerup: (ev: MSPointerEvent) => any;\r\n ontouchcancel: (ev: TouchEvent) => any;\r\n ontouchend: (ev: TouchEvent) => any;\r\n ontouchmove: (ev: TouchEvent) => any;\r\n ontouchstart: (ev: TouchEvent) => any;\r\n onwebkitfullscreenchange: (ev: Event) => any;\r\n onwebkitfullscreenerror: (ev: Event) => any;\r\n scrollHeight: number;\r\n scrollLeft: number;\r\n scrollTop: number;\r\n scrollWidth: number;\r\n tagName: string;\r\n id: string;\r\n className: string;\r\n innerHTML: string;\r\n getAttribute(name?: string): string;\r\n getAttributeNS(namespaceURI: string, localName: string): string;\r\n getAttributeNode(name: string): Attr;\r\n getAttributeNodeNS(namespaceURI: string, localName: string): Attr;\r\n getBoundingClientRect(): ClientRect;\r\n getClientRects(): ClientRectList;\r\n getElementsByTagName(name: \"a\"): NodeListOf;\r\n getElementsByTagName(name: \"abbr\"): NodeListOf;\r\n getElementsByTagName(name: \"acronym\"): NodeListOf;\r\n getElementsByTagName(name: \"address\"): NodeListOf;\r\n getElementsByTagName(name: \"applet\"): NodeListOf;\r\n getElementsByTagName(name: \"area\"): NodeListOf;\r\n getElementsByTagName(name: \"article\"): NodeListOf;\r\n getElementsByTagName(name: \"aside\"): NodeListOf;\r\n getElementsByTagName(name: \"audio\"): NodeListOf;\r\n getElementsByTagName(name: \"b\"): NodeListOf;\r\n getElementsByTagName(name: \"base\"): NodeListOf;\r\n getElementsByTagName(name: \"basefont\"): NodeListOf;\r\n getElementsByTagName(name: \"bdo\"): NodeListOf;\r\n getElementsByTagName(name: \"big\"): NodeListOf;\r\n getElementsByTagName(name: \"blockquote\"): NodeListOf;\r\n getElementsByTagName(name: \"body\"): NodeListOf;\r\n getElementsByTagName(name: \"br\"): NodeListOf;\r\n getElementsByTagName(name: \"button\"): NodeListOf;\r\n getElementsByTagName(name: \"canvas\"): NodeListOf;\r\n getElementsByTagName(name: \"caption\"): NodeListOf;\r\n getElementsByTagName(name: \"center\"): NodeListOf;\r\n getElementsByTagName(name: \"circle\"): NodeListOf;\r\n getElementsByTagName(name: \"cite\"): NodeListOf;\r\n getElementsByTagName(name: \"clippath\"): NodeListOf;\r\n getElementsByTagName(name: \"code\"): NodeListOf;\r\n getElementsByTagName(name: \"col\"): NodeListOf;\r\n getElementsByTagName(name: \"colgroup\"): NodeListOf;\r\n getElementsByTagName(name: \"datalist\"): NodeListOf;\r\n getElementsByTagName(name: \"dd\"): NodeListOf;\r\n getElementsByTagName(name: \"defs\"): NodeListOf;\r\n getElementsByTagName(name: \"del\"): NodeListOf;\r\n getElementsByTagName(name: \"desc\"): NodeListOf;\r\n getElementsByTagName(name: \"dfn\"): NodeListOf;\r\n getElementsByTagName(name: \"dir\"): NodeListOf;\r\n getElementsByTagName(name: \"div\"): NodeListOf;\r\n getElementsByTagName(name: \"dl\"): NodeListOf;\r\n getElementsByTagName(name: \"dt\"): NodeListOf;\r\n getElementsByTagName(name: \"ellipse\"): NodeListOf;\r\n getElementsByTagName(name: \"em\"): NodeListOf;\r\n getElementsByTagName(name: \"embed\"): NodeListOf;\r\n getElementsByTagName(name: \"feblend\"): NodeListOf;\r\n getElementsByTagName(name: \"fecolormatrix\"): NodeListOf;\r\n getElementsByTagName(name: \"fecomponenttransfer\"): NodeListOf;\r\n getElementsByTagName(name: \"fecomposite\"): NodeListOf;\r\n getElementsByTagName(name: \"feconvolvematrix\"): NodeListOf;\r\n getElementsByTagName(name: \"fediffuselighting\"): NodeListOf;\r\n getElementsByTagName(name: \"fedisplacementmap\"): NodeListOf;\r\n getElementsByTagName(name: \"fedistantlight\"): NodeListOf;\r\n getElementsByTagName(name: \"feflood\"): NodeListOf;\r\n getElementsByTagName(name: \"fefunca\"): NodeListOf;\r\n getElementsByTagName(name: \"fefuncb\"): NodeListOf;\r\n getElementsByTagName(name: \"fefuncg\"): NodeListOf;\r\n getElementsByTagName(name: \"fefuncr\"): NodeListOf;\r\n getElementsByTagName(name: \"fegaussianblur\"): NodeListOf;\r\n getElementsByTagName(name: \"feimage\"): NodeListOf;\r\n getElementsByTagName(name: \"femerge\"): NodeListOf;\r\n getElementsByTagName(name: \"femergenode\"): NodeListOf;\r\n getElementsByTagName(name: \"femorphology\"): NodeListOf;\r\n getElementsByTagName(name: \"feoffset\"): NodeListOf;\r\n getElementsByTagName(name: \"fepointlight\"): NodeListOf;\r\n getElementsByTagName(name: \"fespecularlighting\"): NodeListOf;\r\n getElementsByTagName(name: \"fespotlight\"): NodeListOf;\r\n getElementsByTagName(name: \"fetile\"): NodeListOf;\r\n getElementsByTagName(name: \"feturbulence\"): NodeListOf;\r\n getElementsByTagName(name: \"fieldset\"): NodeListOf;\r\n getElementsByTagName(name: \"figcaption\"): NodeListOf;\r\n getElementsByTagName(name: \"figure\"): NodeListOf;\r\n getElementsByTagName(name: \"filter\"): NodeListOf;\r\n getElementsByTagName(name: \"font\"): NodeListOf;\r\n getElementsByTagName(name: \"footer\"): NodeListOf;\r\n getElementsByTagName(name: \"foreignobject\"): NodeListOf;\r\n getElementsByTagName(name: \"form\"): NodeListOf;\r\n getElementsByTagName(name: \"frame\"): NodeListOf;\r\n getElementsByTagName(name: \"frameset\"): NodeListOf;\r\n getElementsByTagName(name: \"g\"): NodeListOf;\r\n getElementsByTagName(name: \"h1\"): NodeListOf;\r\n getElementsByTagName(name: \"h2\"): NodeListOf;\r\n getElementsByTagName(name: \"h3\"): NodeListOf;\r\n getElementsByTagName(name: \"h4\"): NodeListOf;\r\n getElementsByTagName(name: \"h5\"): NodeListOf;\r\n getElementsByTagName(name: \"h6\"): NodeListOf;\r\n getElementsByTagName(name: \"head\"): NodeListOf;\r\n getElementsByTagName(name: \"header\"): NodeListOf;\r\n getElementsByTagName(name: \"hgroup\"): NodeListOf;\r\n getElementsByTagName(name: \"hr\"): NodeListOf;\r\n getElementsByTagName(name: \"html\"): NodeListOf;\r\n getElementsByTagName(name: \"i\"): NodeListOf;\r\n getElementsByTagName(name: \"iframe\"): NodeListOf;\r\n getElementsByTagName(name: \"image\"): NodeListOf;\r\n getElementsByTagName(name: \"img\"): NodeListOf;\r\n getElementsByTagName(name: \"input\"): NodeListOf;\r\n getElementsByTagName(name: \"ins\"): NodeListOf;\r\n getElementsByTagName(name: \"isindex\"): NodeListOf;\r\n getElementsByTagName(name: \"kbd\"): NodeListOf;\r\n getElementsByTagName(name: \"keygen\"): NodeListOf;\r\n getElementsByTagName(name: \"label\"): NodeListOf;\r\n getElementsByTagName(name: \"legend\"): NodeListOf;\r\n getElementsByTagName(name: \"li\"): NodeListOf;\r\n getElementsByTagName(name: \"line\"): NodeListOf;\r\n getElementsByTagName(name: \"lineargradient\"): NodeListOf;\r\n getElementsByTagName(name: \"link\"): NodeListOf;\r\n getElementsByTagName(name: \"listing\"): NodeListOf;\r\n getElementsByTagName(name: \"map\"): NodeListOf;\r\n getElementsByTagName(name: \"mark\"): NodeListOf;\r\n getElementsByTagName(name: \"marker\"): NodeListOf;\r\n getElementsByTagName(name: \"marquee\"): NodeListOf;\r\n getElementsByTagName(name: \"mask\"): NodeListOf;\r\n getElementsByTagName(name: \"menu\"): NodeListOf;\r\n getElementsByTagName(name: \"meta\"): NodeListOf;\r\n getElementsByTagName(name: \"metadata\"): NodeListOf;\r\n getElementsByTagName(name: \"nav\"): NodeListOf;\r\n getElementsByTagName(name: \"nextid\"): NodeListOf;\r\n getElementsByTagName(name: \"nobr\"): NodeListOf;\r\n getElementsByTagName(name: \"noframes\"): NodeListOf;\r\n getElementsByTagName(name: \"noscript\"): NodeListOf;\r\n getElementsByTagName(name: \"object\"): NodeListOf;\r\n getElementsByTagName(name: \"ol\"): NodeListOf;\r\n getElementsByTagName(name: \"optgroup\"): NodeListOf;\r\n getElementsByTagName(name: \"option\"): NodeListOf;\r\n getElementsByTagName(name: \"p\"): NodeListOf;\r\n getElementsByTagName(name: \"param\"): NodeListOf;\r\n getElementsByTagName(name: \"path\"): NodeListOf;\r\n getElementsByTagName(name: \"pattern\"): NodeListOf;\r\n getElementsByTagName(name: \"plaintext\"): NodeListOf;\r\n getElementsByTagName(name: \"polygon\"): NodeListOf;\r\n getElementsByTagName(name: \"polyline\"): NodeListOf;\r\n getElementsByTagName(name: \"pre\"): NodeListOf;\r\n getElementsByTagName(name: \"progress\"): NodeListOf;\r\n getElementsByTagName(name: \"q\"): NodeListOf;\r\n getElementsByTagName(name: \"radialgradient\"): NodeListOf;\r\n getElementsByTagName(name: \"rect\"): NodeListOf;\r\n getElementsByTagName(name: \"rt\"): NodeListOf;\r\n getElementsByTagName(name: \"ruby\"): NodeListOf;\r\n getElementsByTagName(name: \"s\"): NodeListOf;\r\n getElementsByTagName(name: \"samp\"): NodeListOf;\r\n getElementsByTagName(name: \"script\"): NodeListOf;\r\n getElementsByTagName(name: \"section\"): NodeListOf;\r\n getElementsByTagName(name: \"select\"): NodeListOf;\r\n getElementsByTagName(name: \"small\"): NodeListOf;\r\n getElementsByTagName(name: \"source\"): NodeListOf;\r\n getElementsByTagName(name: \"span\"): NodeListOf;\r\n getElementsByTagName(name: \"stop\"): NodeListOf;\r\n getElementsByTagName(name: \"strike\"): NodeListOf;\r\n getElementsByTagName(name: \"strong\"): NodeListOf;\r\n getElementsByTagName(name: \"style\"): NodeListOf;\r\n getElementsByTagName(name: \"sub\"): NodeListOf;\r\n getElementsByTagName(name: \"sup\"): NodeListOf;\r\n getElementsByTagName(name: \"svg\"): NodeListOf;\r\n getElementsByTagName(name: \"switch\"): NodeListOf;\r\n getElementsByTagName(name: \"symbol\"): NodeListOf;\r\n getElementsByTagName(name: \"table\"): NodeListOf;\r\n getElementsByTagName(name: \"tbody\"): NodeListOf;\r\n getElementsByTagName(name: \"td\"): NodeListOf;\r\n getElementsByTagName(name: \"text\"): NodeListOf;\r\n getElementsByTagName(name: \"textpath\"): NodeListOf;\r\n getElementsByTagName(name: \"textarea\"): NodeListOf;\r\n getElementsByTagName(name: \"tfoot\"): NodeListOf;\r\n getElementsByTagName(name: \"th\"): NodeListOf;\r\n getElementsByTagName(name: \"thead\"): NodeListOf;\r\n getElementsByTagName(name: \"title\"): NodeListOf;\r\n getElementsByTagName(name: \"tr\"): NodeListOf;\r\n getElementsByTagName(name: \"track\"): NodeListOf;\r\n getElementsByTagName(name: \"tspan\"): NodeListOf;\r\n getElementsByTagName(name: \"tt\"): NodeListOf;\r\n getElementsByTagName(name: \"u\"): NodeListOf;\r\n getElementsByTagName(name: \"ul\"): NodeListOf;\r\n getElementsByTagName(name: \"use\"): NodeListOf;\r\n getElementsByTagName(name: \"var\"): NodeListOf;\r\n getElementsByTagName(name: \"video\"): NodeListOf;\r\n getElementsByTagName(name: \"view\"): NodeListOf;\r\n getElementsByTagName(name: \"wbr\"): NodeListOf;\r\n getElementsByTagName(name: \"x-ms-webview\"): NodeListOf;\r\n getElementsByTagName(name: \"xmp\"): NodeListOf;\r\n getElementsByTagName(name: string): NodeListOf;\r\n getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf;\r\n hasAttribute(name: string): boolean;\r\n hasAttributeNS(namespaceURI: string, localName: string): boolean;\r\n msGetRegionContent(): MSRangeCollection;\r\n msGetUntransformedBounds(): ClientRect;\r\n msMatchesSelector(selectors: string): boolean;\r\n msReleasePointerCapture(pointerId: number): void;\r\n msSetPointerCapture(pointerId: number): void;\r\n msZoomTo(args: MsZoomToOptions): void;\r\n releasePointerCapture(pointerId: number): void;\r\n removeAttribute(name?: string): void;\r\n removeAttributeNS(namespaceURI: string, localName: string): void;\r\n removeAttributeNode(oldAttr: Attr): Attr;\r\n requestFullscreen(): void;\r\n requestPointerLock(): void;\r\n setAttribute(name: string, value: string): void;\r\n setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;\r\n setAttributeNode(newAttr: Attr): Attr;\r\n setAttributeNodeNS(newAttr: Attr): Attr;\r\n setPointerCapture(pointerId: number): void;\r\n webkitMatchesSelector(selectors: string): boolean;\r\n webkitRequestFullScreen(): void;\r\n webkitRequestFullscreen(): void;\r\n getElementsByClassName(classNames: string): NodeListOf;\r\n matches(selector: string): boolean;\r\n getElementsByTagName(tagname: \"picture\"): NodeListOf;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Element: {\r\n prototype: Element;\r\n new(): Element;\r\n}\r\n\r\ninterface ErrorEvent extends Event {\r\n colno: number;\r\n error: any;\r\n filename: string;\r\n lineno: number;\r\n message: string;\r\n initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;\r\n}\r\n\r\ndeclare var ErrorEvent: {\r\n prototype: ErrorEvent;\r\n new(): ErrorEvent;\r\n}\r\n\r\ninterface Event {\r\n bubbles: boolean;\r\n cancelBubble: boolean;\r\n cancelable: boolean;\r\n currentTarget: EventTarget;\r\n defaultPrevented: boolean;\r\n eventPhase: number;\r\n isTrusted: boolean;\r\n returnValue: boolean;\r\n srcElement: Element;\r\n target: EventTarget;\r\n timeStamp: number;\r\n type: string;\r\n initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;\r\n preventDefault(): void;\r\n stopImmediatePropagation(): void;\r\n stopPropagation(): void;\r\n AT_TARGET: number;\r\n BUBBLING_PHASE: number;\r\n CAPTURING_PHASE: number;\r\n}\r\n\r\ndeclare var Event: {\r\n prototype: Event;\r\n new(type: string, eventInitDict?: EventInit): Event;\r\n AT_TARGET: number;\r\n BUBBLING_PHASE: number;\r\n CAPTURING_PHASE: number;\r\n}\r\n\r\ninterface EventTarget {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n dispatchEvent(evt: Event): boolean;\r\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var EventTarget: {\r\n prototype: EventTarget;\r\n new(): EventTarget;\r\n}\r\n\r\ninterface External {\r\n}\r\n\r\ndeclare var External: {\r\n prototype: External;\r\n new(): External;\r\n}\r\n\r\ninterface File extends Blob {\r\n lastModifiedDate: any;\r\n name: string;\r\n}\r\n\r\ndeclare var File: {\r\n prototype: File;\r\n new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;\r\n}\r\n\r\ninterface FileList {\r\n length: number;\r\n item(index: number): File;\r\n [index: number]: File;\r\n}\r\n\r\ndeclare var FileList: {\r\n prototype: FileList;\r\n new(): FileList;\r\n}\r\n\r\ninterface FileReader extends EventTarget, MSBaseReader {\r\n error: DOMError;\r\n readAsArrayBuffer(blob: Blob): void;\r\n readAsBinaryString(blob: Blob): void;\r\n readAsDataURL(blob: Blob): void;\r\n readAsText(blob: Blob, encoding?: string): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var FileReader: {\r\n prototype: FileReader;\r\n new(): FileReader;\r\n}\r\n\r\ninterface FocusEvent extends UIEvent {\r\n relatedTarget: EventTarget;\r\n initFocusEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, relatedTargetArg: EventTarget): void;\r\n}\r\n\r\ndeclare var FocusEvent: {\r\n prototype: FocusEvent;\r\n new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;\r\n}\r\n\r\ninterface FormData {\r\n append(name: any, value: any, blobName?: string): void;\r\n}\r\n\r\ndeclare var FormData: {\r\n prototype: FormData;\r\n new (form?: HTMLFormElement): FormData;\r\n}\r\n\r\ninterface GainNode extends AudioNode {\r\n gain: AudioParam;\r\n}\r\n\r\ndeclare var GainNode: {\r\n prototype: GainNode;\r\n new(): GainNode;\r\n}\r\n\r\ninterface Gamepad {\r\n axes: number[];\r\n buttons: GamepadButton[];\r\n connected: boolean;\r\n id: string;\r\n index: number;\r\n mapping: string;\r\n timestamp: number;\r\n}\r\n\r\ndeclare var Gamepad: {\r\n prototype: Gamepad;\r\n new(): Gamepad;\r\n}\r\n\r\ninterface GamepadButton {\r\n pressed: boolean;\r\n value: number;\r\n}\r\n\r\ndeclare var GamepadButton: {\r\n prototype: GamepadButton;\r\n new(): GamepadButton;\r\n}\r\n\r\ninterface GamepadEvent extends Event {\r\n gamepad: Gamepad;\r\n}\r\n\r\ndeclare var GamepadEvent: {\r\n prototype: GamepadEvent;\r\n new(): GamepadEvent;\r\n}\r\n\r\ninterface Geolocation {\r\n clearWatch(watchId: number): void;\r\n getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void;\r\n watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number;\r\n}\r\n\r\ndeclare var Geolocation: {\r\n prototype: Geolocation;\r\n new(): Geolocation;\r\n}\r\n\r\ninterface HTMLAllCollection extends HTMLCollection {\r\n namedItem(name: string): Element;\r\n}\r\n\r\ndeclare var HTMLAllCollection: {\r\n prototype: HTMLAllCollection;\r\n new(): HTMLAllCollection;\r\n}\r\n\r\ninterface HTMLAnchorElement extends HTMLElement {\r\n Methods: string;\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Sets or retrieves the coordinates of the object.\r\n */\r\n coords: string;\r\n /**\r\n * Contains the anchor portion of the URL including the hash sign (#).\r\n */\r\n hash: string;\r\n /**\r\n * Contains the hostname and port values of the URL.\r\n */\r\n host: string;\r\n /**\r\n * Contains the hostname of a URL.\r\n */\r\n hostname: string;\r\n /**\r\n * Sets or retrieves a destination URL or an anchor point.\r\n */\r\n href: string;\r\n /**\r\n * Sets or retrieves the language code of the object.\r\n */\r\n hreflang: string;\r\n mimeType: string;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n name: string;\r\n nameProp: string;\r\n /**\r\n * Contains the pathname of the URL.\r\n */\r\n pathname: string;\r\n /**\r\n * Sets or retrieves the port number associated with a URL.\r\n */\r\n port: string;\r\n /**\r\n * Contains the protocol of the URL.\r\n */\r\n protocol: string;\r\n protocolLong: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rel: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rev: string;\r\n /**\r\n * Sets or retrieves the substring of the href property that follows the question mark.\r\n */\r\n search: string;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n shape: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Retrieves or sets the text of the object as a string. \r\n */\r\n text: string;\r\n type: string;\r\n urn: string;\r\n /** \r\n * Returns a string representation of an object.\r\n */\r\n toString(): string;\r\n}\r\n\r\ndeclare var HTMLAnchorElement: {\r\n prototype: HTMLAnchorElement;\r\n new(): HTMLAnchorElement;\r\n}\r\n\r\ninterface HTMLAppletElement extends HTMLElement {\r\n /**\r\n * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.\r\n */\r\n BaseHref: string;\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Gets or sets the optional alternative HTML script to execute if the object fails to load.\r\n */\r\n altHtml: string;\r\n /**\r\n * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.\r\n */\r\n archive: string;\r\n border: string;\r\n code: string;\r\n /**\r\n * Sets or retrieves the URL of the component.\r\n */\r\n codeBase: string;\r\n /**\r\n * Sets or retrieves the Internet media type for the code associated with the object.\r\n */\r\n codeType: string;\r\n /**\r\n * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned.\r\n */\r\n contentDocument: Document;\r\n /**\r\n * Sets or retrieves the URL that references the data of the object.\r\n */\r\n data: string;\r\n /**\r\n * Sets or retrieves a character string that can be used to implement your own declare functionality for the object.\r\n */\r\n declare: boolean;\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n hspace: number;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n name: string;\r\n object: string;\r\n /**\r\n * Sets or retrieves a message to be displayed while an object is loading.\r\n */\r\n standby: string;\r\n /**\r\n * Returns the content type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n vspace: number;\r\n width: number;\r\n}\r\n\r\ndeclare var HTMLAppletElement: {\r\n prototype: HTMLAppletElement;\r\n new(): HTMLAppletElement;\r\n}\r\n\r\ninterface HTMLAreaElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Sets or retrieves the coordinates of the object.\r\n */\r\n coords: string;\r\n /**\r\n * Sets or retrieves the subsection of the href property that follows the number sign (#).\r\n */\r\n hash: string;\r\n /**\r\n * Sets or retrieves the hostname and port number of the location or URL.\r\n */\r\n host: string;\r\n /**\r\n * Sets or retrieves the host name part of the location or URL. \r\n */\r\n hostname: string;\r\n /**\r\n * Sets or retrieves a destination URL or an anchor point.\r\n */\r\n href: string;\r\n /**\r\n * Sets or gets whether clicks in this region cause action.\r\n */\r\n noHref: boolean;\r\n /**\r\n * Sets or retrieves the file name or path specified by the object.\r\n */\r\n pathname: string;\r\n /**\r\n * Sets or retrieves the port number associated with a URL.\r\n */\r\n port: string;\r\n /**\r\n * Sets or retrieves the protocol portion of a URL.\r\n */\r\n protocol: string;\r\n rel: string;\r\n /**\r\n * Sets or retrieves the substring of the href property that follows the question mark.\r\n */\r\n search: string;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n shape: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /** \r\n * Returns a string representation of an object.\r\n */\r\n toString(): string;\r\n}\r\n\r\ndeclare var HTMLAreaElement: {\r\n prototype: HTMLAreaElement;\r\n new(): HTMLAreaElement;\r\n}\r\n\r\ninterface HTMLAreasCollection extends HTMLCollection {\r\n /**\r\n * Adds an element to the areas, controlRange, or options collection.\r\n */\r\n add(element: HTMLElement, before?: HTMLElement | number): void;\r\n /**\r\n * Removes an element from the collection.\r\n */\r\n remove(index?: number): void;\r\n}\r\n\r\ndeclare var HTMLAreasCollection: {\r\n prototype: HTMLAreasCollection;\r\n new(): HTMLAreasCollection;\r\n}\r\n\r\ninterface HTMLAudioElement extends HTMLMediaElement {\r\n}\r\n\r\ndeclare var HTMLAudioElement: {\r\n prototype: HTMLAudioElement;\r\n new(): HTMLAudioElement;\r\n}\r\n\r\ninterface HTMLBRElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.\r\n */\r\n clear: string;\r\n}\r\n\r\ndeclare var HTMLBRElement: {\r\n prototype: HTMLBRElement;\r\n new(): HTMLBRElement;\r\n}\r\n\r\ninterface HTMLBaseElement extends HTMLElement {\r\n /**\r\n * Gets or sets the baseline URL on which relative links are based.\r\n */\r\n href: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n}\r\n\r\ndeclare var HTMLBaseElement: {\r\n prototype: HTMLBaseElement;\r\n new(): HTMLBaseElement;\r\n}\r\n\r\ninterface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {\r\n /**\r\n * Sets or retrieves the current typeface family.\r\n */\r\n face: string;\r\n /**\r\n * Sets or retrieves the font size of the object.\r\n */\r\n size: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLBaseFontElement: {\r\n prototype: HTMLBaseFontElement;\r\n new(): HTMLBaseFontElement;\r\n}\r\n\r\ninterface HTMLBlockElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n clear: string;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: number;\r\n}\r\n\r\ndeclare var HTMLBlockElement: {\r\n prototype: HTMLBlockElement;\r\n new(): HTMLBlockElement;\r\n}\r\n\r\ninterface HTMLBodyElement extends HTMLElement {\r\n aLink: any;\r\n background: string;\r\n bgColor: any;\r\n bgProperties: string;\r\n link: any;\r\n noWrap: boolean;\r\n onafterprint: (ev: Event) => any;\r\n onbeforeprint: (ev: Event) => any;\r\n onbeforeunload: (ev: BeforeUnloadEvent) => any;\r\n onblur: (ev: FocusEvent) => any;\r\n onerror: (ev: Event) => any;\r\n onfocus: (ev: FocusEvent) => any;\r\n onhashchange: (ev: HashChangeEvent) => any;\r\n onload: (ev: Event) => any;\r\n onmessage: (ev: MessageEvent) => any;\r\n onoffline: (ev: Event) => any;\r\n ononline: (ev: Event) => any;\r\n onorientationchange: (ev: Event) => any;\r\n onpagehide: (ev: PageTransitionEvent) => any;\r\n onpageshow: (ev: PageTransitionEvent) => any;\r\n onpopstate: (ev: PopStateEvent) => any;\r\n onresize: (ev: UIEvent) => any;\r\n onstorage: (ev: StorageEvent) => any;\r\n onunload: (ev: Event) => any;\r\n text: any;\r\n vLink: any;\r\n createTextRange(): TextRange;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"afterprint\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeprint\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeunload\", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"hashchange\", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"offline\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"online\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"orientationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pagehide\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pageshow\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"popstate\", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"storage\", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"unload\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLBodyElement: {\r\n prototype: HTMLBodyElement;\r\n new(): HTMLBodyElement;\r\n}\r\n\r\ninterface HTMLButtonElement extends HTMLElement {\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Overrides the action attribute (where the data on a form is sent) on the parent form element.\r\n */\r\n formAction: string;\r\n /**\r\n * Used to override the encoding (formEnctype attribute) specified on the form element.\r\n */\r\n formEnctype: string;\r\n /**\r\n * Overrides the submit method attribute previously specified on a form element.\r\n */\r\n formMethod: string;\r\n /**\r\n * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a \"save draft\"-type submit option.\r\n */\r\n formNoValidate: string;\r\n /**\r\n * Overrides the target attribute on a form element.\r\n */\r\n formTarget: string;\r\n /** \r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n status: any;\r\n /**\r\n * Gets the classification and default behavior of the button.\r\n */\r\n type: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /** \r\n * Sets or retrieves the default or selected value of the control.\r\n */\r\n value: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Creates a TextRange object for the element.\r\n */\r\n createTextRange(): TextRange;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n}\r\n\r\ndeclare var HTMLButtonElement: {\r\n prototype: HTMLButtonElement;\r\n new(): HTMLButtonElement;\r\n}\r\n\r\ninterface HTMLCanvasElement extends HTMLElement {\r\n /**\r\n * Gets or sets the height of a canvas element on a document.\r\n */\r\n height: number;\r\n /**\r\n * Gets or sets the width of a canvas element on a document.\r\n */\r\n width: number;\r\n /**\r\n * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.\r\n * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext(\"2d\"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext(\"experimental-webgl\");\r\n */\r\n getContext(contextId: \"2d\"): CanvasRenderingContext2D;\r\n getContext(contextId: \"experimental-webgl\"): WebGLRenderingContext;\r\n getContext(contextId: string, ...args: any[]): CanvasRenderingContext2D | WebGLRenderingContext;\r\n /**\r\n * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.\r\n */\r\n msToBlob(): Blob;\r\n /**\r\n * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.\r\n * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.\r\n */\r\n toDataURL(type?: string, ...args: any[]): string;\r\n toBlob(): Blob;\r\n}\r\n\r\ndeclare var HTMLCanvasElement: {\r\n prototype: HTMLCanvasElement;\r\n new(): HTMLCanvasElement;\r\n}\r\n\r\ninterface HTMLCollection {\r\n /**\r\n * Sets or retrieves the number of objects in a collection.\r\n */\r\n length: number;\r\n /**\r\n * Retrieves an object from various collections.\r\n */\r\n item(nameOrIndex?: any, optionalIndex?: any): Element;\r\n /**\r\n * Retrieves a select object or an object from an options collection.\r\n */\r\n namedItem(name: string): Element;\r\n [index: number]: Element;\r\n}\r\n\r\ndeclare var HTMLCollection: {\r\n prototype: HTMLCollection;\r\n new(): HTMLCollection;\r\n}\r\n\r\ninterface HTMLDDElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n}\r\n\r\ndeclare var HTMLDDElement: {\r\n prototype: HTMLDDElement;\r\n new(): HTMLDDElement;\r\n}\r\n\r\ninterface HTMLDListElement extends HTMLElement {\r\n compact: boolean;\r\n}\r\n\r\ndeclare var HTMLDListElement: {\r\n prototype: HTMLDListElement;\r\n new(): HTMLDListElement;\r\n}\r\n\r\ninterface HTMLDTElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n}\r\n\r\ndeclare var HTMLDTElement: {\r\n prototype: HTMLDTElement;\r\n new(): HTMLDTElement;\r\n}\r\n\r\ninterface HTMLDataListElement extends HTMLElement {\r\n options: HTMLCollection;\r\n}\r\n\r\ndeclare var HTMLDataListElement: {\r\n prototype: HTMLDataListElement;\r\n new(): HTMLDataListElement;\r\n}\r\n\r\ninterface HTMLDirectoryElement extends HTMLElement {\r\n compact: boolean;\r\n}\r\n\r\ndeclare var HTMLDirectoryElement: {\r\n prototype: HTMLDirectoryElement;\r\n new(): HTMLDirectoryElement;\r\n}\r\n\r\ninterface HTMLDivElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text. \r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n}\r\n\r\ndeclare var HTMLDivElement: {\r\n prototype: HTMLDivElement;\r\n new(): HTMLDivElement;\r\n}\r\n\r\ninterface HTMLDocument extends Document {\r\n}\r\n\r\ndeclare var HTMLDocument: {\r\n prototype: HTMLDocument;\r\n new(): HTMLDocument;\r\n}\r\n\r\ninterface HTMLElement extends Element {\r\n accessKey: string;\r\n children: HTMLCollection;\r\n contentEditable: string;\r\n dataset: DOMStringMap;\r\n dir: string;\r\n draggable: boolean;\r\n hidden: boolean;\r\n hideFocus: boolean;\r\n innerHTML: string;\r\n innerText: string;\r\n isContentEditable: boolean;\r\n lang: string;\r\n offsetHeight: number;\r\n offsetLeft: number;\r\n offsetParent: Element;\r\n offsetTop: number;\r\n offsetWidth: number;\r\n onabort: (ev: Event) => any;\r\n onactivate: (ev: UIEvent) => any;\r\n onbeforeactivate: (ev: UIEvent) => any;\r\n onbeforecopy: (ev: DragEvent) => any;\r\n onbeforecut: (ev: DragEvent) => any;\r\n onbeforedeactivate: (ev: UIEvent) => any;\r\n onbeforepaste: (ev: DragEvent) => any;\r\n onblur: (ev: FocusEvent) => any;\r\n oncanplay: (ev: Event) => any;\r\n oncanplaythrough: (ev: Event) => any;\r\n onchange: (ev: Event) => any;\r\n onclick: (ev: MouseEvent) => any;\r\n oncontextmenu: (ev: PointerEvent) => any;\r\n oncopy: (ev: DragEvent) => any;\r\n oncuechange: (ev: Event) => any;\r\n oncut: (ev: DragEvent) => any;\r\n ondblclick: (ev: MouseEvent) => any;\r\n ondeactivate: (ev: UIEvent) => any;\r\n ondrag: (ev: DragEvent) => any;\r\n ondragend: (ev: DragEvent) => any;\r\n ondragenter: (ev: DragEvent) => any;\r\n ondragleave: (ev: DragEvent) => any;\r\n ondragover: (ev: DragEvent) => any;\r\n ondragstart: (ev: DragEvent) => any;\r\n ondrop: (ev: DragEvent) => any;\r\n ondurationchange: (ev: Event) => any;\r\n onemptied: (ev: Event) => any;\r\n onended: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n onfocus: (ev: FocusEvent) => any;\r\n oninput: (ev: Event) => any;\r\n onkeydown: (ev: KeyboardEvent) => any;\r\n onkeypress: (ev: KeyboardEvent) => any;\r\n onkeyup: (ev: KeyboardEvent) => any;\r\n onload: (ev: Event) => any;\r\n onloadeddata: (ev: Event) => any;\r\n onloadedmetadata: (ev: Event) => any;\r\n onloadstart: (ev: Event) => any;\r\n onmousedown: (ev: MouseEvent) => any;\r\n onmouseenter: (ev: MouseEvent) => any;\r\n onmouseleave: (ev: MouseEvent) => any;\r\n onmousemove: (ev: MouseEvent) => any;\r\n onmouseout: (ev: MouseEvent) => any;\r\n onmouseover: (ev: MouseEvent) => any;\r\n onmouseup: (ev: MouseEvent) => any;\r\n onmousewheel: (ev: MouseWheelEvent) => any;\r\n onmscontentzoom: (ev: UIEvent) => any;\r\n onmsmanipulationstatechanged: (ev: MSManipulationEvent) => any;\r\n onpaste: (ev: DragEvent) => any;\r\n onpause: (ev: Event) => any;\r\n onplay: (ev: Event) => any;\r\n onplaying: (ev: Event) => any;\r\n onprogress: (ev: ProgressEvent) => any;\r\n onratechange: (ev: Event) => any;\r\n onreset: (ev: Event) => any;\r\n onscroll: (ev: UIEvent) => any;\r\n onseeked: (ev: Event) => any;\r\n onseeking: (ev: Event) => any;\r\n onselect: (ev: UIEvent) => any;\r\n onselectstart: (ev: Event) => any;\r\n onstalled: (ev: Event) => any;\r\n onsubmit: (ev: Event) => any;\r\n onsuspend: (ev: Event) => any;\r\n ontimeupdate: (ev: Event) => any;\r\n onvolumechange: (ev: Event) => any;\r\n onwaiting: (ev: Event) => any;\r\n outerHTML: string;\r\n outerText: string;\r\n spellcheck: boolean;\r\n style: CSSStyleDeclaration;\r\n tabIndex: number;\r\n title: string;\r\n blur(): void;\r\n click(): void;\r\n dragDrop(): boolean;\r\n focus(): void;\r\n insertAdjacentElement(position: string, insertedElement: Element): Element;\r\n insertAdjacentHTML(where: string, html: string): void;\r\n insertAdjacentText(where: string, text: string): void;\r\n msGetInputContext(): MSInputMethodContext;\r\n scrollIntoView(top?: boolean): void;\r\n setActive(): void;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLElement: {\r\n prototype: HTMLElement;\r\n new(): HTMLElement;\r\n}\r\n\r\ninterface HTMLEmbedElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n hidden: any;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.\r\n */\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n msPlayToSource: any;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Retrieves the palette used for the embedded document.\r\n */\r\n palette: string;\r\n /**\r\n * Retrieves the URL of the plug-in used to view an embedded document.\r\n */\r\n pluginspage: string;\r\n readyState: string;\r\n /**\r\n * Sets or retrieves a URL to be loaded by the object.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the height and width units of the embed object.\r\n */\r\n units: string;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLEmbedElement: {\r\n prototype: HTMLEmbedElement;\r\n new(): HTMLEmbedElement;\r\n}\r\n\r\ninterface HTMLFieldSetElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n}\r\n\r\ndeclare var HTMLFieldSetElement: {\r\n prototype: HTMLFieldSetElement;\r\n new(): HTMLFieldSetElement;\r\n}\r\n\r\ninterface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {\r\n /**\r\n * Sets or retrieves the current typeface family.\r\n */\r\n face: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLFontElement: {\r\n prototype: HTMLFontElement;\r\n new(): HTMLFontElement;\r\n}\r\n\r\ninterface HTMLFormElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.\r\n */\r\n acceptCharset: string;\r\n /**\r\n * Sets or retrieves the URL to which the form content is sent for processing.\r\n */\r\n action: string;\r\n /**\r\n * Specifies whether autocomplete is applied to an editable text field.\r\n */\r\n autocomplete: string;\r\n /**\r\n * Retrieves a collection, in source order, of all controls in a given form.\r\n */\r\n elements: HTMLCollection;\r\n /**\r\n * Sets or retrieves the MIME encoding for the form.\r\n */\r\n encoding: string;\r\n /**\r\n * Sets or retrieves the encoding type for the form.\r\n */\r\n enctype: string;\r\n /**\r\n * Sets or retrieves the number of objects in a collection.\r\n */\r\n length: number;\r\n /**\r\n * Sets or retrieves how to send the form data to the server.\r\n */\r\n method: string;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Designates a form that is not validated when submitted.\r\n */\r\n noValidate: boolean;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Retrieves a form object or an object from an elements collection.\r\n * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.\r\n * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.\r\n */\r\n item(name?: any, index?: any): any;\r\n /**\r\n * Retrieves a form object or an object from an elements collection.\r\n */\r\n namedItem(name: string): any;\r\n /**\r\n * Fires when the user resets a form.\r\n */\r\n reset(): void;\r\n /**\r\n * Fires when a FORM is about to be submitted.\r\n */\r\n submit(): void;\r\n [name: string]: any;\r\n}\r\n\r\ndeclare var HTMLFormElement: {\r\n prototype: HTMLFormElement;\r\n new(): HTMLFormElement;\r\n}\r\n\r\ninterface HTMLFrameElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Specifies the properties of a border drawn around an object.\r\n */\r\n border: string;\r\n /**\r\n * Sets or retrieves the border color of the object.\r\n */\r\n borderColor: any;\r\n /**\r\n * Retrieves the document object of the page or frame.\r\n */\r\n contentDocument: Document;\r\n /**\r\n * Retrieves the object of the specified.\r\n */\r\n contentWindow: Window;\r\n /**\r\n * Sets or retrieves whether to display a border for the frame.\r\n */\r\n frameBorder: string;\r\n /**\r\n * Sets or retrieves the amount of additional space between the frames.\r\n */\r\n frameSpacing: any;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string | number;\r\n /**\r\n * Sets or retrieves a URI to a long description of the object.\r\n */\r\n longDesc: string;\r\n /**\r\n * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.\r\n */\r\n marginHeight: string;\r\n /**\r\n * Sets or retrieves the left and right margin widths before displaying the text in a frame.\r\n */\r\n marginWidth: string;\r\n /**\r\n * Sets or retrieves the frame name.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves whether the user can resize the frame.\r\n */\r\n noResize: boolean;\r\n /**\r\n * Raised when the object has been completely received from the server.\r\n */\r\n onload: (ev: Event) => any;\r\n /**\r\n * Sets or retrieves whether the frame can be scrolled.\r\n */\r\n scrolling: string;\r\n /**\r\n * Sets the value indicating whether the source file of a frame or iframe has specific security restrictions applied.\r\n */\r\n security: any;\r\n /**\r\n * Sets or retrieves a URL to be loaded by the object.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string | number;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLFrameElement: {\r\n prototype: HTMLFrameElement;\r\n new(): HTMLFrameElement;\r\n}\r\n\r\ninterface HTMLFrameSetElement extends HTMLElement {\r\n border: string;\r\n /**\r\n * Sets or retrieves the border color of the object.\r\n */\r\n borderColor: any;\r\n /**\r\n * Sets or retrieves the frame widths of the object.\r\n */\r\n cols: string;\r\n /**\r\n * Sets or retrieves whether to display a border for the frame.\r\n */\r\n frameBorder: string;\r\n /**\r\n * Sets or retrieves the amount of additional space between the frames.\r\n */\r\n frameSpacing: any;\r\n name: string;\r\n onafterprint: (ev: Event) => any;\r\n onbeforeprint: (ev: Event) => any;\r\n onbeforeunload: (ev: BeforeUnloadEvent) => any;\r\n /**\r\n * Fires when the object loses the input focus.\r\n */\r\n onblur: (ev: FocusEvent) => any;\r\n onerror: (ev: Event) => any;\r\n /**\r\n * Fires when the object receives focus.\r\n */\r\n onfocus: (ev: FocusEvent) => any;\r\n onhashchange: (ev: HashChangeEvent) => any;\r\n onload: (ev: Event) => any;\r\n onmessage: (ev: MessageEvent) => any;\r\n onoffline: (ev: Event) => any;\r\n ononline: (ev: Event) => any;\r\n onorientationchange: (ev: Event) => any;\r\n onpagehide: (ev: PageTransitionEvent) => any;\r\n onpageshow: (ev: PageTransitionEvent) => any;\r\n onresize: (ev: UIEvent) => any;\r\n onstorage: (ev: StorageEvent) => any;\r\n onunload: (ev: Event) => any;\r\n /**\r\n * Sets or retrieves the frame heights of the object.\r\n */\r\n rows: string;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeprint\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeunload\", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"hashchange\", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"offline\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"online\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"orientationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pagehide\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pageshow\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"storage\", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"unload\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLFrameSetElement: {\r\n prototype: HTMLFrameSetElement;\r\n new(): HTMLFrameSetElement;\r\n}\r\n\r\ninterface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves whether the horizontal rule is drawn with 3-D shading.\r\n */\r\n noShade: boolean;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLHRElement: {\r\n prototype: HTMLHRElement;\r\n new(): HTMLHRElement;\r\n}\r\n\r\ninterface HTMLHeadElement extends HTMLElement {\r\n profile: string;\r\n}\r\n\r\ndeclare var HTMLHeadElement: {\r\n prototype: HTMLHeadElement;\r\n new(): HTMLHeadElement;\r\n}\r\n\r\ninterface HTMLHeadingElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a value that indicates the table alignment.\r\n */\r\n align: string;\r\n clear: string;\r\n}\r\n\r\ndeclare var HTMLHeadingElement: {\r\n prototype: HTMLHeadingElement;\r\n new(): HTMLHeadingElement;\r\n}\r\n\r\ninterface HTMLHtmlElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the DTD version that governs the current document.\r\n */\r\n version: string;\r\n}\r\n\r\ndeclare var HTMLHtmlElement: {\r\n prototype: HTMLHtmlElement;\r\n new(): HTMLHtmlElement;\r\n}\r\n\r\ninterface HTMLIFrameElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n allowFullscreen: boolean;\r\n /**\r\n * Specifies the properties of a border drawn around an object.\r\n */\r\n border: string;\r\n /**\r\n * Retrieves the document object of the page or frame.\r\n */\r\n contentDocument: Document;\r\n /**\r\n * Retrieves the object of the specified.\r\n */\r\n contentWindow: Window;\r\n /**\r\n * Sets or retrieves whether to display a border for the frame.\r\n */\r\n frameBorder: string;\r\n /**\r\n * Sets or retrieves the amount of additional space between the frames.\r\n */\r\n frameSpacing: any;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n /**\r\n * Sets or retrieves the horizontal margin for the object.\r\n */\r\n hspace: number;\r\n /**\r\n * Sets or retrieves a URI to a long description of the object.\r\n */\r\n longDesc: string;\r\n /**\r\n * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.\r\n */\r\n marginHeight: string;\r\n /**\r\n * Sets or retrieves the left and right margin widths before displaying the text in a frame.\r\n */\r\n marginWidth: string;\r\n /**\r\n * Sets or retrieves the frame name.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves whether the user can resize the frame.\r\n */\r\n noResize: boolean;\r\n /**\r\n * Raised when the object has been completely received from the server.\r\n */\r\n onload: (ev: Event) => any;\r\n sandbox: DOMSettableTokenList;\r\n /**\r\n * Sets or retrieves whether the frame can be scrolled.\r\n */\r\n scrolling: string;\r\n /**\r\n * Sets the value indicating whether the source file of a frame or iframe has specific security restrictions applied.\r\n */\r\n security: any;\r\n /**\r\n * Sets or retrieves a URL to be loaded by the object.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the vertical margin for the object.\r\n */\r\n vspace: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLIFrameElement: {\r\n prototype: HTMLIFrameElement;\r\n new(): HTMLIFrameElement;\r\n}\r\n\r\ninterface HTMLImageElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Specifies the properties of a border drawn around an object.\r\n */\r\n border: string;\r\n /**\r\n * Retrieves whether the object is fully loaded.\r\n */\r\n complete: boolean;\r\n crossOrigin: string;\r\n currentSrc: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: number;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n hspace: number;\r\n /**\r\n * Sets or retrieves whether the image is a server-side image map.\r\n */\r\n isMap: boolean;\r\n /**\r\n * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.\r\n */\r\n longDesc: string;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n msPlayToSource: any;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * The original height of the image resource before sizing.\r\n */\r\n naturalHeight: number;\r\n /**\r\n * The original width of the image resource before sizing.\r\n */\r\n naturalWidth: number;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n srcset: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * Sets or retrieves the vertical margin for the object.\r\n */\r\n vspace: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: number;\r\n x: number;\r\n y: number;\r\n msGetAsCastingSource(): any;\r\n}\r\n\r\ndeclare var HTMLImageElement: {\r\n prototype: HTMLImageElement;\r\n new(): HTMLImageElement;\r\n create(): HTMLImageElement;\r\n}\r\n\r\ninterface HTMLInputElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a comma-separated list of content types.\r\n */\r\n accept: string;\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Specifies whether autocomplete is applied to an editable text field.\r\n */\r\n autocomplete: string;\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n border: string;\r\n /**\r\n * Sets or retrieves the state of the check box or radio button.\r\n */\r\n checked: boolean;\r\n /**\r\n * Retrieves whether the object is fully loaded.\r\n */\r\n complete: boolean;\r\n /**\r\n * Sets or retrieves the state of the check box or radio button.\r\n */\r\n defaultChecked: boolean;\r\n /**\r\n * Sets or retrieves the initial contents of the object.\r\n */\r\n defaultValue: string;\r\n disabled: boolean;\r\n /**\r\n * Returns a FileList object on a file type input object.\r\n */\r\n files: FileList;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in. \r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Overrides the action attribute (where the data on a form is sent) on the parent form element.\r\n */\r\n formAction: string;\r\n /**\r\n * Used to override the encoding (formEnctype attribute) specified on the form element.\r\n */\r\n formEnctype: string;\r\n /**\r\n * Overrides the submit method attribute previously specified on a form element.\r\n */\r\n formMethod: string;\r\n /**\r\n * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a \"save draft\"-type submit option.\r\n */\r\n formNoValidate: string;\r\n /**\r\n * Overrides the target attribute on a form element.\r\n */\r\n formTarget: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n hspace: number;\r\n indeterminate: boolean;\r\n /**\r\n * Specifies the ID of a pre-defined datalist of options for an input element.\r\n */\r\n list: HTMLElement;\r\n /**\r\n * Defines the maximum acceptable value for an input element with type=\"number\".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.\r\n */\r\n max: string;\r\n /**\r\n * Sets or retrieves the maximum number of characters that the user can enter in a text control.\r\n */\r\n maxLength: number;\r\n /**\r\n * Defines the minimum acceptable value for an input element with type=\"number\". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.\r\n */\r\n min: string;\r\n /**\r\n * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.\r\n */\r\n multiple: boolean;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Gets or sets a string containing a regular expression that the user's input must match.\r\n */\r\n pattern: string;\r\n /**\r\n * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.\r\n */\r\n placeholder: string;\r\n readOnly: boolean;\r\n /**\r\n * When present, marks an element that can't be submitted without a value.\r\n */\r\n required: boolean;\r\n /**\r\n * Gets or sets the end position or offset of a text selection.\r\n */\r\n selectionEnd: number;\r\n /**\r\n * Gets or sets the starting position or offset of a text selection.\r\n */\r\n selectionStart: number;\r\n size: number;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n status: boolean;\r\n /**\r\n * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.\r\n */\r\n step: string;\r\n /**\r\n * Returns the content type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /**\r\n * Returns the value of the data at the cursor's current position.\r\n */\r\n value: string;\r\n valueAsDate: Date;\r\n /**\r\n * Returns the input field value as a number.\r\n */\r\n valueAsNumber: number;\r\n /**\r\n * Sets or retrieves the vertical margin for the object.\r\n */\r\n vspace: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Creates a TextRange object for the element.\r\n */\r\n createTextRange(): TextRange;\r\n /**\r\n * Makes the selection equal to the current object.\r\n */\r\n select(): void;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n /**\r\n * Sets the start and end positions of a selection in a text field.\r\n * @param start The offset into the text field for the start of the selection.\r\n * @param end The offset into the text field for the end of the selection.\r\n */\r\n setSelectionRange(start: number, end: number): void;\r\n /**\r\n * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.\r\n * @param n Value to decrement the value by.\r\n */\r\n stepDown(n?: number): void;\r\n /**\r\n * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.\r\n * @param n Value to increment the value by.\r\n */\r\n stepUp(n?: number): void;\r\n}\r\n\r\ndeclare var HTMLInputElement: {\r\n prototype: HTMLInputElement;\r\n new(): HTMLInputElement;\r\n}\r\n\r\ninterface HTMLIsIndexElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the URL to which the form content is sent for processing.\r\n */\r\n action: string;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in. \r\n */\r\n form: HTMLFormElement;\r\n prompt: string;\r\n}\r\n\r\ndeclare var HTMLIsIndexElement: {\r\n prototype: HTMLIsIndexElement;\r\n new(): HTMLIsIndexElement;\r\n}\r\n\r\ninterface HTMLLIElement extends HTMLElement {\r\n type: string;\r\n /**\r\n * Sets or retrieves the value of a list item.\r\n */\r\n value: number;\r\n}\r\n\r\ndeclare var HTMLLIElement: {\r\n prototype: HTMLLIElement;\r\n new(): HTMLLIElement;\r\n}\r\n\r\ninterface HTMLLabelElement extends HTMLElement {\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the object to which the given label object is assigned.\r\n */\r\n htmlFor: string;\r\n}\r\n\r\ndeclare var HTMLLabelElement: {\r\n prototype: HTMLLabelElement;\r\n new(): HTMLLabelElement;\r\n}\r\n\r\ninterface HTMLLegendElement extends HTMLElement {\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n align: string;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n}\r\n\r\ndeclare var HTMLLegendElement: {\r\n prototype: HTMLLegendElement;\r\n new(): HTMLLegendElement;\r\n}\r\n\r\ninterface HTMLLinkElement extends HTMLElement, LinkStyle {\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n disabled: boolean;\r\n /**\r\n * Sets or retrieves a destination URL or an anchor point.\r\n */\r\n href: string;\r\n /**\r\n * Sets or retrieves the language code of the object.\r\n */\r\n hreflang: string;\r\n /**\r\n * Sets or retrieves the media type.\r\n */\r\n media: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rel: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rev: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Sets or retrieves the MIME type of the object.\r\n */\r\n type: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLLinkElement: {\r\n prototype: HTMLLinkElement;\r\n new(): HTMLLinkElement;\r\n}\r\n\r\ninterface HTMLMapElement extends HTMLElement {\r\n /**\r\n * Retrieves a collection of the area objects defined for the given map object.\r\n */\r\n areas: HTMLAreasCollection;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n}\r\n\r\ndeclare var HTMLMapElement: {\r\n prototype: HTMLMapElement;\r\n new(): HTMLMapElement;\r\n}\r\n\r\ninterface HTMLMarqueeElement extends HTMLElement {\r\n behavior: string;\r\n bgColor: any;\r\n direction: string;\r\n height: string;\r\n hspace: number;\r\n loop: number;\r\n onbounce: (ev: Event) => any;\r\n onfinish: (ev: Event) => any;\r\n onstart: (ev: Event) => any;\r\n scrollAmount: number;\r\n scrollDelay: number;\r\n trueSpeed: boolean;\r\n vspace: number;\r\n width: string;\r\n start(): void;\r\n stop(): void;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"bounce\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"finish\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"start\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLMarqueeElement: {\r\n prototype: HTMLMarqueeElement;\r\n new(): HTMLMarqueeElement;\r\n}\r\n\r\ninterface HTMLMediaElement extends HTMLElement {\r\n /**\r\n * Returns an AudioTrackList object with the audio tracks for a given video element.\r\n */\r\n audioTracks: AudioTrackList;\r\n /**\r\n * Gets or sets a value that indicates whether to start playing the media automatically.\r\n */\r\n autoplay: boolean;\r\n /**\r\n * Gets a collection of buffered time ranges.\r\n */\r\n buffered: TimeRanges;\r\n /**\r\n * Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).\r\n */\r\n controls: boolean;\r\n /**\r\n * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.\r\n */\r\n currentSrc: string;\r\n /**\r\n * Gets or sets the current playback position, in seconds.\r\n */\r\n currentTime: number;\r\n defaultMuted: boolean;\r\n /**\r\n * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.\r\n */\r\n defaultPlaybackRate: number;\r\n /**\r\n * Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.\r\n */\r\n duration: number;\r\n /**\r\n * Gets information about whether the playback has ended or not.\r\n */\r\n ended: boolean;\r\n /**\r\n * Returns an object representing the current error state of the audio or video element.\r\n */\r\n error: MediaError;\r\n /**\r\n * Gets or sets a flag to specify whether playback should restart after it completes.\r\n */\r\n loop: boolean;\r\n /**\r\n * Specifies the purpose of the audio or video media, such as background audio or alerts.\r\n */\r\n msAudioCategory: string;\r\n /**\r\n * Specifies the output device id that the audio will be sent to.\r\n */\r\n msAudioDeviceType: string;\r\n msGraphicsTrustStatus: MSGraphicsTrust;\r\n /**\r\n * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element.\r\n */\r\n msKeys: MSMediaKeys;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.\r\n */\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n msPlayToSource: any;\r\n /**\r\n * Specifies whether or not to enable low-latency playback on the media element.\r\n */\r\n msRealTime: boolean;\r\n /**\r\n * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.\r\n */\r\n muted: boolean;\r\n /**\r\n * Gets the current network activity for the element.\r\n */\r\n networkState: number;\r\n onmsneedkey: (ev: MSMediaKeyNeededEvent) => any;\r\n /**\r\n * Gets a flag that specifies whether playback is paused.\r\n */\r\n paused: boolean;\r\n /**\r\n * Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.\r\n */\r\n playbackRate: number;\r\n /**\r\n * Gets TimeRanges for the current media resource that has been played.\r\n */\r\n played: TimeRanges;\r\n /**\r\n * Gets or sets the current playback position, in seconds.\r\n */\r\n preload: string;\r\n readyState: number;\r\n /**\r\n * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.\r\n */\r\n seekable: TimeRanges;\r\n /**\r\n * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource.\r\n */\r\n seeking: boolean;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n textTracks: TextTrackList;\r\n videoTracks: VideoTrackList;\r\n /**\r\n * Gets or sets the volume level for audio portions of the media element.\r\n */\r\n volume: number;\r\n addTextTrack(kind: string, label?: string, language?: string): TextTrack;\r\n /**\r\n * Returns a string that specifies whether the client can play a given media resource type.\r\n */\r\n canPlayType(type: string): string;\r\n /**\r\n * Fires immediately after the client loads the object.\r\n */\r\n load(): void;\r\n /**\r\n * Clears all effects from the media pipeline.\r\n */\r\n msClearEffects(): void;\r\n msGetAsCastingSource(): any;\r\n /**\r\n * Inserts the specified audio effect into media pipeline.\r\n */\r\n msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;\r\n msSetMediaKeys(mediaKeys: MSMediaKeys): void;\r\n /**\r\n * Specifies the media protection manager for a given media pipeline.\r\n */\r\n msSetMediaProtectionManager(mediaProtectionManager?: any): void;\r\n /**\r\n * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.\r\n */\r\n pause(): void;\r\n /**\r\n * Loads and starts playback of a media resource.\r\n */\r\n play(): void;\r\n HAVE_CURRENT_DATA: number;\r\n HAVE_ENOUGH_DATA: number;\r\n HAVE_FUTURE_DATA: number;\r\n HAVE_METADATA: number;\r\n HAVE_NOTHING: number;\r\n NETWORK_EMPTY: number;\r\n NETWORK_IDLE: number;\r\n NETWORK_LOADING: number;\r\n NETWORK_NO_SOURCE: number;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"msneedkey\", listener: (ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLMediaElement: {\r\n prototype: HTMLMediaElement;\r\n new(): HTMLMediaElement;\r\n HAVE_CURRENT_DATA: number;\r\n HAVE_ENOUGH_DATA: number;\r\n HAVE_FUTURE_DATA: number;\r\n HAVE_METADATA: number;\r\n HAVE_NOTHING: number;\r\n NETWORK_EMPTY: number;\r\n NETWORK_IDLE: number;\r\n NETWORK_LOADING: number;\r\n NETWORK_NO_SOURCE: number;\r\n}\r\n\r\ninterface HTMLMenuElement extends HTMLElement {\r\n compact: boolean;\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLMenuElement: {\r\n prototype: HTMLMenuElement;\r\n new(): HTMLMenuElement;\r\n}\r\n\r\ninterface HTMLMetaElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Gets or sets meta-information to associate with httpEquiv or name.\r\n */\r\n content: string;\r\n /**\r\n * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.\r\n */\r\n httpEquiv: string;\r\n /**\r\n * Sets or retrieves the value specified in the content attribute of the meta object.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.\r\n */\r\n scheme: string;\r\n /**\r\n * Sets or retrieves the URL property that will be loaded after the specified time has elapsed. \r\n */\r\n url: string;\r\n}\r\n\r\ndeclare var HTMLMetaElement: {\r\n prototype: HTMLMetaElement;\r\n new(): HTMLMetaElement;\r\n}\r\n\r\ninterface HTMLModElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n /**\r\n * Sets or retrieves the date and time of a modification to the object.\r\n */\r\n dateTime: string;\r\n}\r\n\r\ndeclare var HTMLModElement: {\r\n prototype: HTMLModElement;\r\n new(): HTMLModElement;\r\n}\r\n\r\ninterface HTMLNextIdElement extends HTMLElement {\r\n n: string;\r\n}\r\n\r\ndeclare var HTMLNextIdElement: {\r\n prototype: HTMLNextIdElement;\r\n new(): HTMLNextIdElement;\r\n}\r\n\r\ninterface HTMLOListElement extends HTMLElement {\r\n compact: boolean;\r\n /**\r\n * The starting number.\r\n */\r\n start: number;\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLOListElement: {\r\n prototype: HTMLOListElement;\r\n new(): HTMLOListElement;\r\n}\r\n\r\ninterface HTMLObjectElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.\r\n */\r\n BaseHref: string;\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Gets or sets the optional alternative HTML script to execute if the object fails to load.\r\n */\r\n altHtml: string;\r\n /**\r\n * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.\r\n */\r\n archive: string;\r\n border: string;\r\n /**\r\n * Sets or retrieves the URL of the file containing the compiled Java class.\r\n */\r\n code: string;\r\n /**\r\n * Sets or retrieves the URL of the component.\r\n */\r\n codeBase: string;\r\n /**\r\n * Sets or retrieves the Internet media type for the code associated with the object.\r\n */\r\n codeType: string;\r\n /**\r\n * Retrieves the document object of the page or frame.\r\n */\r\n contentDocument: Document;\r\n /**\r\n * Sets or retrieves the URL that references the data of the object.\r\n */\r\n data: string;\r\n declare: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n hspace: number;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.\r\n */\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n msPlayToSource: any;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Retrieves the contained object.\r\n */\r\n object: any;\r\n readyState: number;\r\n /**\r\n * Sets or retrieves a message to be displayed while an object is loading.\r\n */\r\n standby: string;\r\n /**\r\n * Sets or retrieves the MIME type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n vspace: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLObjectElement: {\r\n prototype: HTMLObjectElement;\r\n new(): HTMLObjectElement;\r\n}\r\n\r\ninterface HTMLOptGroupElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the status of an option.\r\n */\r\n defaultSelected: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the ordinal position of an option in a list box.\r\n */\r\n index: number;\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own label functionality for the object.\r\n */\r\n label: string;\r\n /**\r\n * Sets or retrieves whether the option in the list box is the default item.\r\n */\r\n selected: boolean;\r\n /**\r\n * Sets or retrieves the text string specified by the option tag.\r\n */\r\n text: string;\r\n /**\r\n * Sets or retrieves the value which is returned to the server when the form control is submitted.\r\n */\r\n value: string;\r\n}\r\n\r\ndeclare var HTMLOptGroupElement: {\r\n prototype: HTMLOptGroupElement;\r\n new(): HTMLOptGroupElement;\r\n}\r\n\r\ninterface HTMLOptionElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the status of an option.\r\n */\r\n defaultSelected: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the ordinal position of an option in a list box.\r\n */\r\n index: number;\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own label functionality for the object.\r\n */\r\n label: string;\r\n /**\r\n * Sets or retrieves whether the option in the list box is the default item.\r\n */\r\n selected: boolean;\r\n /**\r\n * Sets or retrieves the text string specified by the option tag.\r\n */\r\n text: string;\r\n /**\r\n * Sets or retrieves the value which is returned to the server when the form control is submitted.\r\n */\r\n value: string;\r\n}\r\n\r\ndeclare var HTMLOptionElement: {\r\n prototype: HTMLOptionElement;\r\n new(): HTMLOptionElement;\r\n create(): HTMLOptionElement;\r\n}\r\n\r\ninterface HTMLParagraphElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text. \r\n */\r\n align: string;\r\n clear: string;\r\n}\r\n\r\ndeclare var HTMLParagraphElement: {\r\n prototype: HTMLParagraphElement;\r\n new(): HTMLParagraphElement;\r\n}\r\n\r\ninterface HTMLParamElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the name of an input parameter for an element.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves the content type of the resource designated by the value attribute.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the value of an input parameter for an element.\r\n */\r\n value: string;\r\n /**\r\n * Sets or retrieves the data type of the value attribute.\r\n */\r\n valueType: string;\r\n}\r\n\r\ndeclare var HTMLParamElement: {\r\n prototype: HTMLParamElement;\r\n new(): HTMLParamElement;\r\n}\r\n\r\ninterface HTMLPhraseElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n /**\r\n * Sets or retrieves the date and time of a modification to the object.\r\n */\r\n dateTime: string;\r\n}\r\n\r\ndeclare var HTMLPhraseElement: {\r\n prototype: HTMLPhraseElement;\r\n new(): HTMLPhraseElement;\r\n}\r\n\r\ninterface HTMLPreElement extends HTMLElement {\r\n /**\r\n * Indicates a citation by rendering text in italic type.\r\n */\r\n cite: string;\r\n clear: string;\r\n /**\r\n * Sets or gets a value that you can use to implement your own width functionality for the object.\r\n */\r\n width: number;\r\n}\r\n\r\ndeclare var HTMLPreElement: {\r\n prototype: HTMLPreElement;\r\n new(): HTMLPreElement;\r\n}\r\n\r\ninterface HTMLProgressElement extends HTMLElement {\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Defines the maximum, or \"done\" value for a progress element.\r\n */\r\n max: number;\r\n /**\r\n * Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).\r\n */\r\n position: number;\r\n /**\r\n * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.\r\n */\r\n value: number;\r\n}\r\n\r\ndeclare var HTMLProgressElement: {\r\n prototype: HTMLProgressElement;\r\n new(): HTMLProgressElement;\r\n}\r\n\r\ninterface HTMLQuoteElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n /**\r\n * Sets or retrieves the date and time of a modification to the object.\r\n */\r\n dateTime: string;\r\n}\r\n\r\ndeclare var HTMLQuoteElement: {\r\n prototype: HTMLQuoteElement;\r\n new(): HTMLQuoteElement;\r\n}\r\n\r\ninterface HTMLScriptElement extends HTMLElement {\r\n async: boolean;\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Sets or retrieves the status of the script.\r\n */\r\n defer: boolean;\r\n /**\r\n * Sets or retrieves the event for which the script is written. \r\n */\r\n event: string;\r\n /** \r\n * Sets or retrieves the object that is bound to the event script.\r\n */\r\n htmlFor: string;\r\n /**\r\n * Retrieves the URL to an external file that contains the source code or data.\r\n */\r\n src: string;\r\n /**\r\n * Retrieves or sets the text of the object as a string. \r\n */\r\n text: string;\r\n /**\r\n * Sets or retrieves the MIME type for the associated scripting engine.\r\n */\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLScriptElement: {\r\n prototype: HTMLScriptElement;\r\n new(): HTMLScriptElement;\r\n}\r\n\r\ninterface HTMLSelectElement extends HTMLElement {\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in. \r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the number of objects in a collection.\r\n */\r\n length: number;\r\n /**\r\n * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.\r\n */\r\n multiple: boolean;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n options: HTMLCollection;\r\n /**\r\n * When present, marks an element that can't be submitted without a value.\r\n */\r\n required: boolean;\r\n /**\r\n * Sets or retrieves the index of the selected option in a select object.\r\n */\r\n selectedIndex: number;\r\n /**\r\n * Sets or retrieves the number of rows in the list box. \r\n */\r\n size: number;\r\n /**\r\n * Retrieves the type of select control based on the value of the MULTIPLE attribute.\r\n */\r\n type: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /**\r\n * Sets or retrieves the value which is returned to the server when the form control is submitted.\r\n */\r\n value: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n selectedOptions: HTMLCollection;\r\n /**\r\n * Adds an element to the areas, controlRange, or options collection.\r\n * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.\r\n * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection. \r\n */\r\n add(element: HTMLElement, before?: HTMLElement | number): void;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Retrieves a select object or an object from an options collection.\r\n * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.\r\n * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.\r\n */\r\n item(name?: any, index?: any): any;\r\n /**\r\n * Retrieves a select object or an object from an options collection.\r\n * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.\r\n */\r\n namedItem(name: string): any;\r\n /**\r\n * Removes an element from the collection.\r\n * @param index Number that specifies the zero-based index of the element to remove from the collection.\r\n */\r\n remove(index?: number): void;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n [name: string]: any;\r\n}\r\n\r\ndeclare var HTMLSelectElement: {\r\n prototype: HTMLSelectElement;\r\n new(): HTMLSelectElement;\r\n}\r\n\r\ninterface HTMLSourceElement extends HTMLElement {\r\n /**\r\n * Gets or sets the intended media type of the media source.\r\n */\r\n media: string;\r\n msKeySystem: string;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n /**\r\n * Gets or sets the MIME type of a media resource.\r\n */\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLSourceElement: {\r\n prototype: HTMLSourceElement;\r\n new(): HTMLSourceElement;\r\n}\r\n\r\ninterface HTMLSpanElement extends HTMLElement {\r\n}\r\n\r\ndeclare var HTMLSpanElement: {\r\n prototype: HTMLSpanElement;\r\n new(): HTMLSpanElement;\r\n}\r\n\r\ninterface HTMLStyleElement extends HTMLElement, LinkStyle {\r\n /**\r\n * Sets or retrieves the media type.\r\n */\r\n media: string;\r\n /**\r\n * Retrieves the CSS language in which the style sheet is written.\r\n */\r\n type: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLStyleElement: {\r\n prototype: HTMLStyleElement;\r\n new(): HTMLStyleElement;\r\n}\r\n\r\ninterface HTMLTableCaptionElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the alignment of the caption or legend.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves whether the caption appears at the top or bottom of the table.\r\n */\r\n vAlign: string;\r\n}\r\n\r\ndeclare var HTMLTableCaptionElement: {\r\n prototype: HTMLTableCaptionElement;\r\n new(): HTMLTableCaptionElement;\r\n}\r\n\r\ninterface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves abbreviated text for the object.\r\n */\r\n abbr: string;\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves a comma-delimited list of conceptual categories associated with the object.\r\n */\r\n axis: string;\r\n bgColor: any;\r\n /**\r\n * Retrieves the position of the object in the cells collection of a row.\r\n */\r\n cellIndex: number;\r\n /**\r\n * Sets or retrieves the number columns in the table that the object should span.\r\n */\r\n colSpan: number;\r\n /**\r\n * Sets or retrieves a list of header cells that provide information for the object.\r\n */\r\n headers: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n /**\r\n * Sets or retrieves how many rows in a table the cell should span.\r\n */\r\n rowSpan: number;\r\n /**\r\n * Sets or retrieves the group of cells in a table to which the object's information applies.\r\n */\r\n scope: string;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableCellElement: {\r\n prototype: HTMLTableCellElement;\r\n new(): HTMLTableCellElement;\r\n}\r\n\r\ninterface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves the alignment of the object relative to the display or table.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves the number of columns in the group.\r\n */\r\n span: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: any;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableColElement: {\r\n prototype: HTMLTableColElement;\r\n new(): HTMLTableColElement;\r\n}\r\n\r\ninterface HTMLTableDataCellElement extends HTMLTableCellElement {\r\n}\r\n\r\ndeclare var HTMLTableDataCellElement: {\r\n prototype: HTMLTableDataCellElement;\r\n new(): HTMLTableDataCellElement;\r\n}\r\n\r\ninterface HTMLTableElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a value that indicates the table alignment.\r\n */\r\n align: string;\r\n bgColor: any;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n border: string;\r\n /**\r\n * Sets or retrieves the border color of the object. \r\n */\r\n borderColor: any;\r\n /**\r\n * Retrieves the caption object of a table.\r\n */\r\n caption: HTMLTableCaptionElement;\r\n /**\r\n * Sets or retrieves the amount of space between the border of the cell and the content of the cell.\r\n */\r\n cellPadding: string;\r\n /**\r\n * Sets or retrieves the amount of space between cells in a table.\r\n */\r\n cellSpacing: string;\r\n /**\r\n * Sets or retrieves the number of columns in the table.\r\n */\r\n cols: number;\r\n /**\r\n * Sets or retrieves the way the border frame around the table is displayed.\r\n */\r\n frame: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Sets or retrieves the number of horizontal rows contained in the object.\r\n */\r\n rows: HTMLCollection;\r\n /**\r\n * Sets or retrieves which dividing lines (inner borders) are displayed.\r\n */\r\n rules: string;\r\n /**\r\n * Sets or retrieves a description and/or structure of the object.\r\n */\r\n summary: string;\r\n /**\r\n * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.\r\n */\r\n tBodies: HTMLCollection;\r\n /**\r\n * Retrieves the tFoot object of the table.\r\n */\r\n tFoot: HTMLTableSectionElement;\r\n /**\r\n * Retrieves the tHead object of the table.\r\n */\r\n tHead: HTMLTableSectionElement;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Creates an empty caption element in the table.\r\n */\r\n createCaption(): HTMLTableCaptionElement;\r\n /**\r\n * Creates an empty tBody element in the table.\r\n */\r\n createTBody(): HTMLTableSectionElement;\r\n /**\r\n * Creates an empty tFoot element in the table.\r\n */\r\n createTFoot(): HTMLTableSectionElement;\r\n /**\r\n * Returns the tHead element object if successful, or null otherwise.\r\n */\r\n createTHead(): HTMLTableSectionElement;\r\n /**\r\n * Deletes the caption element and its contents from the table.\r\n */\r\n deleteCaption(): void;\r\n /**\r\n * Removes the specified row (tr) from the element and from the rows collection.\r\n * @param index Number that specifies the zero-based position in the rows collection of the row to remove.\r\n */\r\n deleteRow(index?: number): void;\r\n /**\r\n * Deletes the tFoot element and its contents from the table.\r\n */\r\n deleteTFoot(): void;\r\n /**\r\n * Deletes the tHead element and its contents from the table.\r\n */\r\n deleteTHead(): void;\r\n /**\r\n * Creates a new row (tr) in the table, and adds the row to the rows collection.\r\n * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.\r\n */\r\n insertRow(index?: number): HTMLTableRowElement;\r\n}\r\n\r\ndeclare var HTMLTableElement: {\r\n prototype: HTMLTableElement;\r\n new(): HTMLTableElement;\r\n}\r\n\r\ninterface HTMLTableHeaderCellElement extends HTMLTableCellElement {\r\n /**\r\n * Sets or retrieves the group of cells in a table to which the object's information applies.\r\n */\r\n scope: string;\r\n}\r\n\r\ndeclare var HTMLTableHeaderCellElement: {\r\n prototype: HTMLTableHeaderCellElement;\r\n new(): HTMLTableHeaderCellElement;\r\n}\r\n\r\ninterface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n bgColor: any;\r\n /**\r\n * Retrieves a collection of all cells in the table row.\r\n */\r\n cells: HTMLCollection;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Retrieves the position of the object in the rows collection for the table.\r\n */\r\n rowIndex: number;\r\n /**\r\n * Retrieves the position of the object in the collection.\r\n */\r\n sectionRowIndex: number;\r\n /**\r\n * Removes the specified cell from the table row, as well as from the cells collection.\r\n * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.\r\n */\r\n deleteCell(index?: number): void;\r\n /**\r\n * Creates a new cell in the table row, and adds the cell to the cells collection.\r\n * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.\r\n */\r\n insertCell(index?: number): HTMLTableCellElement;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableRowElement: {\r\n prototype: HTMLTableRowElement;\r\n new(): HTMLTableRowElement;\r\n}\r\n\r\ninterface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves a value that indicates the table alignment.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves the number of horizontal rows contained in the object.\r\n */\r\n rows: HTMLCollection;\r\n /**\r\n * Removes the specified row (tr) from the element and from the rows collection.\r\n * @param index Number that specifies the zero-based position in the rows collection of the row to remove.\r\n */\r\n deleteRow(index?: number): void;\r\n /**\r\n * Creates a new row (tr) in the table, and adds the row to the rows collection.\r\n * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.\r\n */\r\n insertRow(index?: number): HTMLTableRowElement;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableSectionElement: {\r\n prototype: HTMLTableSectionElement;\r\n new(): HTMLTableSectionElement;\r\n}\r\n\r\ninterface HTMLTextAreaElement extends HTMLElement {\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n cols: number;\r\n /**\r\n * Sets or retrieves the initial contents of the object.\r\n */\r\n defaultValue: string;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the maximum number of characters that the user can enter in a text control.\r\n */\r\n maxLength: number;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.\r\n */\r\n placeholder: string;\r\n /**\r\n * Sets or retrieves the value indicated whether the content of the object is read-only.\r\n */\r\n readOnly: boolean;\r\n /**\r\n * When present, marks an element that can't be submitted without a value.\r\n */\r\n required: boolean;\r\n /**\r\n * Sets or retrieves the number of horizontal rows contained in the object.\r\n */\r\n rows: number;\r\n /**\r\n * Gets or sets the end position or offset of a text selection.\r\n */\r\n selectionEnd: number;\r\n /**\r\n * Gets or sets the starting position or offset of a text selection.\r\n */\r\n selectionStart: number;\r\n /**\r\n * Sets or retrieves the value indicating whether the control is selected.\r\n */\r\n status: any;\r\n /**\r\n * Retrieves the type of control.\r\n */\r\n type: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /**\r\n * Retrieves or sets the text in the entry field of the textArea element.\r\n */\r\n value: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Sets or retrieves how to handle wordwrapping in the object.\r\n */\r\n wrap: string;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Creates a TextRange object for the element.\r\n */\r\n createTextRange(): TextRange;\r\n /**\r\n * Highlights the input area of a form element.\r\n */\r\n select(): void;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n /**\r\n * Sets the start and end positions of a selection in a text field.\r\n * @param start The offset into the text field for the start of the selection.\r\n * @param end The offset into the text field for the end of the selection.\r\n */\r\n setSelectionRange(start: number, end: number): void;\r\n}\r\n\r\ndeclare var HTMLTextAreaElement: {\r\n prototype: HTMLTextAreaElement;\r\n new(): HTMLTextAreaElement;\r\n}\r\n\r\ninterface HTMLTitleElement extends HTMLElement {\r\n /**\r\n * Retrieves or sets the text of the object as a string. \r\n */\r\n text: string;\r\n}\r\n\r\ndeclare var HTMLTitleElement: {\r\n prototype: HTMLTitleElement;\r\n new(): HTMLTitleElement;\r\n}\r\n\r\ninterface HTMLTrackElement extends HTMLElement {\r\n default: boolean;\r\n kind: string;\r\n label: string;\r\n readyState: number;\r\n src: string;\r\n srclang: string;\r\n track: TextTrack;\r\n ERROR: number;\r\n LOADED: number;\r\n LOADING: number;\r\n NONE: number;\r\n}\r\n\r\ndeclare var HTMLTrackElement: {\r\n prototype: HTMLTrackElement;\r\n new(): HTMLTrackElement;\r\n ERROR: number;\r\n LOADED: number;\r\n LOADING: number;\r\n NONE: number;\r\n}\r\n\r\ninterface HTMLUListElement extends HTMLElement {\r\n compact: boolean;\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLUListElement: {\r\n prototype: HTMLUListElement;\r\n new(): HTMLUListElement;\r\n}\r\n\r\ninterface HTMLUnknownElement extends HTMLElement {\r\n}\r\n\r\ndeclare var HTMLUnknownElement: {\r\n prototype: HTMLUnknownElement;\r\n new(): HTMLUnknownElement;\r\n}\r\n\r\ninterface HTMLVideoElement extends HTMLMediaElement {\r\n /**\r\n * Gets or sets the height of the video element.\r\n */\r\n height: number;\r\n msHorizontalMirror: boolean;\r\n msIsLayoutOptimalForPlayback: boolean;\r\n msIsStereo3D: boolean;\r\n msStereo3DPackingMode: string;\r\n msStereo3DRenderMode: string;\r\n msZoom: boolean;\r\n onMSVideoFormatChanged: (ev: Event) => any;\r\n onMSVideoFrameStepCompleted: (ev: Event) => any;\r\n onMSVideoOptimalLayoutChanged: (ev: Event) => any;\r\n /**\r\n * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.\r\n */\r\n poster: string;\r\n /**\r\n * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.\r\n */\r\n videoHeight: number;\r\n /**\r\n * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.\r\n */\r\n videoWidth: number;\r\n webkitDisplayingFullscreen: boolean;\r\n webkitSupportsFullscreen: boolean;\r\n /**\r\n * Gets or sets the width of the video element.\r\n */\r\n width: number;\r\n getVideoPlaybackQuality(): VideoPlaybackQuality;\r\n msFrameStep(forward: boolean): void;\r\n msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;\r\n msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void;\r\n webkitEnterFullScreen(): void;\r\n webkitEnterFullscreen(): void;\r\n webkitExitFullScreen(): void;\r\n webkitExitFullscreen(): void;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSVideoFormatChanged\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSVideoFrameStepCompleted\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSVideoOptimalLayoutChanged\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"msneedkey\", listener: (ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLVideoElement: {\r\n prototype: HTMLVideoElement;\r\n new(): HTMLVideoElement;\r\n}\r\n\r\ninterface HashChangeEvent extends Event {\r\n newURL: string;\r\n oldURL: string;\r\n}\r\n\r\ndeclare var HashChangeEvent: {\r\n prototype: HashChangeEvent;\r\n new(type: string, eventInitDict?: HashChangeEventInit): HashChangeEvent;\r\n}\r\n\r\ninterface History {\r\n length: number;\r\n state: any;\r\n back(distance?: any): void;\r\n forward(distance?: any): void;\r\n go(delta?: any): void;\r\n pushState(statedata: any, title?: string, url?: string): void;\r\n replaceState(statedata: any, title?: string, url?: string): void;\r\n}\r\n\r\ndeclare var History: {\r\n prototype: History;\r\n new(): History;\r\n}\r\n\r\ninterface IDBCursor {\r\n direction: string;\r\n key: any;\r\n primaryKey: any;\r\n source: any;\r\n advance(count: number): void;\r\n continue(key?: any): void;\r\n delete(): IDBRequest;\r\n update(value: any): IDBRequest;\r\n NEXT: string;\r\n NEXT_NO_DUPLICATE: string;\r\n PREV: string;\r\n PREV_NO_DUPLICATE: string;\r\n}\r\n\r\ndeclare var IDBCursor: {\r\n prototype: IDBCursor;\r\n new(): IDBCursor;\r\n NEXT: string;\r\n NEXT_NO_DUPLICATE: string;\r\n PREV: string;\r\n PREV_NO_DUPLICATE: string;\r\n}\r\n\r\ninterface IDBCursorWithValue extends IDBCursor {\r\n value: any;\r\n}\r\n\r\ndeclare var IDBCursorWithValue: {\r\n prototype: IDBCursorWithValue;\r\n new(): IDBCursorWithValue;\r\n}\r\n\r\ninterface IDBDatabase extends EventTarget {\r\n name: string;\r\n objectStoreNames: DOMStringList;\r\n onabort: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n version: number;\r\n close(): void;\r\n createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;\r\n deleteObjectStore(name: string): void;\r\n transaction(storeNames: any, mode?: string): IDBTransaction;\r\n addEventListener(type: \"abort\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBDatabase: {\r\n prototype: IDBDatabase;\r\n new(): IDBDatabase;\r\n}\r\n\r\ninterface IDBFactory {\r\n cmp(first: any, second: any): number;\r\n deleteDatabase(name: string): IDBOpenDBRequest;\r\n open(name: string, version?: number): IDBOpenDBRequest;\r\n}\r\n\r\ndeclare var IDBFactory: {\r\n prototype: IDBFactory;\r\n new(): IDBFactory;\r\n}\r\n\r\ninterface IDBIndex {\r\n keyPath: string | string[];\r\n name: string;\r\n objectStore: IDBObjectStore;\r\n unique: boolean;\r\n multiEntry: boolean;\r\n count(key?: any): IDBRequest;\r\n get(key: any): IDBRequest;\r\n getKey(key: any): IDBRequest;\r\n openCursor(range?: IDBKeyRange, direction?: string): IDBRequest;\r\n openKeyCursor(range?: IDBKeyRange, direction?: string): IDBRequest;\r\n}\r\n\r\ndeclare var IDBIndex: {\r\n prototype: IDBIndex;\r\n new(): IDBIndex;\r\n}\r\n\r\ninterface IDBKeyRange {\r\n lower: any;\r\n lowerOpen: boolean;\r\n upper: any;\r\n upperOpen: boolean;\r\n}\r\n\r\ndeclare var IDBKeyRange: {\r\n prototype: IDBKeyRange;\r\n new(): IDBKeyRange;\r\n bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;\r\n lowerBound(bound: any, open?: boolean): IDBKeyRange;\r\n only(value: any): IDBKeyRange;\r\n upperBound(bound: any, open?: boolean): IDBKeyRange;\r\n}\r\n\r\ninterface IDBObjectStore {\r\n indexNames: DOMStringList;\r\n keyPath: string;\r\n name: string;\r\n transaction: IDBTransaction;\r\n add(value: any, key?: any): IDBRequest;\r\n clear(): IDBRequest;\r\n count(key?: any): IDBRequest;\r\n createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;\r\n delete(key: any): IDBRequest;\r\n deleteIndex(indexName: string): void;\r\n get(key: any): IDBRequest;\r\n index(name: string): IDBIndex;\r\n openCursor(range?: any, direction?: string): IDBRequest;\r\n put(value: any, key?: any): IDBRequest;\r\n}\r\n\r\ndeclare var IDBObjectStore: {\r\n prototype: IDBObjectStore;\r\n new(): IDBObjectStore;\r\n}\r\n\r\ninterface IDBOpenDBRequest extends IDBRequest {\r\n onblocked: (ev: Event) => any;\r\n onupgradeneeded: (ev: IDBVersionChangeEvent) => any;\r\n addEventListener(type: \"blocked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"success\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"upgradeneeded\", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBOpenDBRequest: {\r\n prototype: IDBOpenDBRequest;\r\n new(): IDBOpenDBRequest;\r\n}\r\n\r\ninterface IDBRequest extends EventTarget {\r\n error: DOMError;\r\n onerror: (ev: Event) => any;\r\n onsuccess: (ev: Event) => any;\r\n readyState: string;\r\n result: any;\r\n source: any;\r\n transaction: IDBTransaction;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"success\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBRequest: {\r\n prototype: IDBRequest;\r\n new(): IDBRequest;\r\n}\r\n\r\ninterface IDBTransaction extends EventTarget {\r\n db: IDBDatabase;\r\n error: DOMError;\r\n mode: string;\r\n onabort: (ev: Event) => any;\r\n oncomplete: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n abort(): void;\r\n objectStore(name: string): IDBObjectStore;\r\n READ_ONLY: string;\r\n READ_WRITE: string;\r\n VERSION_CHANGE: string;\r\n addEventListener(type: \"abort\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"complete\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBTransaction: {\r\n prototype: IDBTransaction;\r\n new(): IDBTransaction;\r\n READ_ONLY: string;\r\n READ_WRITE: string;\r\n VERSION_CHANGE: string;\r\n}\r\n\r\ninterface IDBVersionChangeEvent extends Event {\r\n newVersion: number;\r\n oldVersion: number;\r\n}\r\n\r\ndeclare var IDBVersionChangeEvent: {\r\n prototype: IDBVersionChangeEvent;\r\n new(): IDBVersionChangeEvent;\r\n}\r\n\r\ninterface ImageData {\r\n data: Uint8ClampedArray;\r\n height: number;\r\n width: number;\r\n}\r\n\r\ndeclare var ImageData: {\r\n prototype: ImageData;\r\n new(width: number, height: number): ImageData;\r\n new(array: Uint8ClampedArray, width: number, height: number): ImageData;\r\n}\r\n\r\ninterface KeyboardEvent extends UIEvent {\r\n altKey: boolean;\r\n char: string;\r\n charCode: number;\r\n ctrlKey: boolean;\r\n key: string;\r\n keyCode: number;\r\n locale: string;\r\n location: number;\r\n metaKey: boolean;\r\n repeat: boolean;\r\n shiftKey: boolean;\r\n which: number;\r\n getModifierState(keyArg: string): boolean;\r\n initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void;\r\n DOM_KEY_LOCATION_JOYSTICK: number;\r\n DOM_KEY_LOCATION_LEFT: number;\r\n DOM_KEY_LOCATION_MOBILE: number;\r\n DOM_KEY_LOCATION_NUMPAD: number;\r\n DOM_KEY_LOCATION_RIGHT: number;\r\n DOM_KEY_LOCATION_STANDARD: number;\r\n}\r\n\r\ndeclare var KeyboardEvent: {\r\n prototype: KeyboardEvent;\r\n new(typeArg: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;\r\n DOM_KEY_LOCATION_JOYSTICK: number;\r\n DOM_KEY_LOCATION_LEFT: number;\r\n DOM_KEY_LOCATION_MOBILE: number;\r\n DOM_KEY_LOCATION_NUMPAD: number;\r\n DOM_KEY_LOCATION_RIGHT: number;\r\n DOM_KEY_LOCATION_STANDARD: number;\r\n}\r\n\r\ninterface Location {\r\n hash: string;\r\n host: string;\r\n hostname: string;\r\n href: string;\r\n origin: string;\r\n pathname: string;\r\n port: string;\r\n protocol: string;\r\n search: string;\r\n assign(url: string): void;\r\n reload(forcedReload?: boolean): void;\r\n replace(url: string): void;\r\n toString(): string;\r\n}\r\n\r\ndeclare var Location: {\r\n prototype: Location;\r\n new(): Location;\r\n}\r\n\r\ninterface LongRunningScriptDetectedEvent extends Event {\r\n executionTime: number;\r\n stopPageScriptExecution: boolean;\r\n}\r\n\r\ndeclare var LongRunningScriptDetectedEvent: {\r\n prototype: LongRunningScriptDetectedEvent;\r\n new(): LongRunningScriptDetectedEvent;\r\n}\r\n\r\ninterface MSApp {\r\n clearTemporaryWebDataAsync(): MSAppAsyncOperation;\r\n createBlobFromRandomAccessStream(type: string, seeker: any): Blob;\r\n createDataPackage(object: any): any;\r\n createDataPackageFromSelection(): any;\r\n createFileFromStorageFile(storageFile: any): File;\r\n createStreamFromInputStream(type: string, inputStream: any): MSStream;\r\n execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;\r\n execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;\r\n getCurrentPriority(): string;\r\n getHtmlPrintDocumentSourceAsync(htmlDoc: any): any;\r\n getViewId(view: any): any;\r\n isTaskScheduledAtPriorityOrHigher(priority: string): boolean;\r\n pageHandlesAllApplicationActivations(enabled: boolean): void;\r\n suppressSubdownloadCredentialPrompts(suppress: boolean): void;\r\n terminateApp(exceptionObject: any): void;\r\n CURRENT: string;\r\n HIGH: string;\r\n IDLE: string;\r\n NORMAL: string;\r\n}\r\ndeclare var MSApp: MSApp;\r\n\r\ninterface MSAppAsyncOperation extends EventTarget {\r\n error: DOMError;\r\n oncomplete: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n readyState: number;\r\n result: any;\r\n start(): void;\r\n COMPLETED: number;\r\n ERROR: number;\r\n STARTED: number;\r\n addEventListener(type: \"complete\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSAppAsyncOperation: {\r\n prototype: MSAppAsyncOperation;\r\n new(): MSAppAsyncOperation;\r\n COMPLETED: number;\r\n ERROR: number;\r\n STARTED: number;\r\n}\r\n\r\ninterface MSBlobBuilder {\r\n append(data: any, endings?: string): void;\r\n getBlob(contentType?: string): Blob;\r\n}\r\n\r\ndeclare var MSBlobBuilder: {\r\n prototype: MSBlobBuilder;\r\n new(): MSBlobBuilder;\r\n}\r\n\r\ninterface MSCSSMatrix {\r\n a: number;\r\n b: number;\r\n c: number;\r\n d: number;\r\n e: number;\r\n f: number;\r\n m11: number;\r\n m12: number;\r\n m13: number;\r\n m14: number;\r\n m21: number;\r\n m22: number;\r\n m23: number;\r\n m24: number;\r\n m31: number;\r\n m32: number;\r\n m33: number;\r\n m34: number;\r\n m41: number;\r\n m42: number;\r\n m43: number;\r\n m44: number;\r\n inverse(): MSCSSMatrix;\r\n multiply(secondMatrix: MSCSSMatrix): MSCSSMatrix;\r\n rotate(angleX: number, angleY?: number, angleZ?: number): MSCSSMatrix;\r\n rotateAxisAngle(x: number, y: number, z: number, angle: number): MSCSSMatrix;\r\n scale(scaleX: number, scaleY?: number, scaleZ?: number): MSCSSMatrix;\r\n setMatrixValue(value: string): void;\r\n skewX(angle: number): MSCSSMatrix;\r\n skewY(angle: number): MSCSSMatrix;\r\n toString(): string;\r\n translate(x: number, y: number, z?: number): MSCSSMatrix;\r\n}\r\n\r\ndeclare var MSCSSMatrix: {\r\n prototype: MSCSSMatrix;\r\n new(text?: string): MSCSSMatrix;\r\n}\r\n\r\ninterface MSGesture {\r\n target: Element;\r\n addPointer(pointerId: number): void;\r\n stop(): void;\r\n}\r\n\r\ndeclare var MSGesture: {\r\n prototype: MSGesture;\r\n new(): MSGesture;\r\n}\r\n\r\ninterface MSGestureEvent extends UIEvent {\r\n clientX: number;\r\n clientY: number;\r\n expansion: number;\r\n gestureObject: any;\r\n hwTimestamp: number;\r\n offsetX: number;\r\n offsetY: number;\r\n rotation: number;\r\n scale: number;\r\n screenX: number;\r\n screenY: number;\r\n translationX: number;\r\n translationY: number;\r\n velocityAngular: number;\r\n velocityExpansion: number;\r\n velocityX: number;\r\n velocityY: number;\r\n initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void;\r\n MSGESTURE_FLAG_BEGIN: number;\r\n MSGESTURE_FLAG_CANCEL: number;\r\n MSGESTURE_FLAG_END: number;\r\n MSGESTURE_FLAG_INERTIA: number;\r\n MSGESTURE_FLAG_NONE: number;\r\n}\r\n\r\ndeclare var MSGestureEvent: {\r\n prototype: MSGestureEvent;\r\n new(): MSGestureEvent;\r\n MSGESTURE_FLAG_BEGIN: number;\r\n MSGESTURE_FLAG_CANCEL: number;\r\n MSGESTURE_FLAG_END: number;\r\n MSGESTURE_FLAG_INERTIA: number;\r\n MSGESTURE_FLAG_NONE: number;\r\n}\r\n\r\ninterface MSGraphicsTrust {\r\n constrictionActive: boolean;\r\n status: string;\r\n}\r\n\r\ndeclare var MSGraphicsTrust: {\r\n prototype: MSGraphicsTrust;\r\n new(): MSGraphicsTrust;\r\n}\r\n\r\ninterface MSHTMLWebViewElement extends HTMLElement {\r\n canGoBack: boolean;\r\n canGoForward: boolean;\r\n containsFullScreenElement: boolean;\r\n documentTitle: string;\r\n height: number;\r\n settings: MSWebViewSettings;\r\n src: string;\r\n width: number;\r\n addWebAllowedObject(name: string, applicationObject: any): void;\r\n buildLocalStreamUri(contentIdentifier: string, relativePath: string): string;\r\n capturePreviewToBlobAsync(): MSWebViewAsyncOperation;\r\n captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation;\r\n getDeferredPermissionRequestById(id: number): DeferredPermissionRequest;\r\n getDeferredPermissionRequests(): DeferredPermissionRequest[];\r\n goBack(): void;\r\n goForward(): void;\r\n invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation;\r\n navigate(uri: string): void;\r\n navigateToLocalStreamUri(source: string, streamResolver: any): void;\r\n navigateToString(contents: string): void;\r\n navigateWithHttpRequestMessage(requestMessage: any): void;\r\n refresh(): void;\r\n stop(): void;\r\n}\r\n\r\ndeclare var MSHTMLWebViewElement: {\r\n prototype: MSHTMLWebViewElement;\r\n new(): MSHTMLWebViewElement;\r\n}\r\n\r\ninterface MSInputMethodContext extends EventTarget {\r\n compositionEndOffset: number;\r\n compositionStartOffset: number;\r\n oncandidatewindowhide: (ev: Event) => any;\r\n oncandidatewindowshow: (ev: Event) => any;\r\n oncandidatewindowupdate: (ev: Event) => any;\r\n target: HTMLElement;\r\n getCandidateWindowClientRect(): ClientRect;\r\n getCompositionAlternatives(): string[];\r\n hasComposition(): boolean;\r\n isCandidateWindowVisible(): boolean;\r\n addEventListener(type: \"MSCandidateWindowHide\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSCandidateWindowShow\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSCandidateWindowUpdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSInputMethodContext: {\r\n prototype: MSInputMethodContext;\r\n new(): MSInputMethodContext;\r\n}\r\n\r\ninterface MSManipulationEvent extends UIEvent {\r\n currentState: number;\r\n inertiaDestinationX: number;\r\n inertiaDestinationY: number;\r\n lastState: number;\r\n initMSManipulationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, lastState: number, currentState: number): void;\r\n MS_MANIPULATION_STATE_ACTIVE: number;\r\n MS_MANIPULATION_STATE_CANCELLED: number;\r\n MS_MANIPULATION_STATE_COMMITTED: number;\r\n MS_MANIPULATION_STATE_DRAGGING: number;\r\n MS_MANIPULATION_STATE_INERTIA: number;\r\n MS_MANIPULATION_STATE_PRESELECT: number;\r\n MS_MANIPULATION_STATE_SELECTING: number;\r\n MS_MANIPULATION_STATE_STOPPED: number;\r\n}\r\n\r\ndeclare var MSManipulationEvent: {\r\n prototype: MSManipulationEvent;\r\n new(): MSManipulationEvent;\r\n MS_MANIPULATION_STATE_ACTIVE: number;\r\n MS_MANIPULATION_STATE_CANCELLED: number;\r\n MS_MANIPULATION_STATE_COMMITTED: number;\r\n MS_MANIPULATION_STATE_DRAGGING: number;\r\n MS_MANIPULATION_STATE_INERTIA: number;\r\n MS_MANIPULATION_STATE_PRESELECT: number;\r\n MS_MANIPULATION_STATE_SELECTING: number;\r\n MS_MANIPULATION_STATE_STOPPED: number;\r\n}\r\n\r\ninterface MSMediaKeyError {\r\n code: number;\r\n systemCode: number;\r\n MS_MEDIA_KEYERR_CLIENT: number;\r\n MS_MEDIA_KEYERR_DOMAIN: number;\r\n MS_MEDIA_KEYERR_HARDWARECHANGE: number;\r\n MS_MEDIA_KEYERR_OUTPUT: number;\r\n MS_MEDIA_KEYERR_SERVICE: number;\r\n MS_MEDIA_KEYERR_UNKNOWN: number;\r\n}\r\n\r\ndeclare var MSMediaKeyError: {\r\n prototype: MSMediaKeyError;\r\n new(): MSMediaKeyError;\r\n MS_MEDIA_KEYERR_CLIENT: number;\r\n MS_MEDIA_KEYERR_DOMAIN: number;\r\n MS_MEDIA_KEYERR_HARDWARECHANGE: number;\r\n MS_MEDIA_KEYERR_OUTPUT: number;\r\n MS_MEDIA_KEYERR_SERVICE: number;\r\n MS_MEDIA_KEYERR_UNKNOWN: number;\r\n}\r\n\r\ninterface MSMediaKeyMessageEvent extends Event {\r\n destinationURL: string;\r\n message: Uint8Array;\r\n}\r\n\r\ndeclare var MSMediaKeyMessageEvent: {\r\n prototype: MSMediaKeyMessageEvent;\r\n new(): MSMediaKeyMessageEvent;\r\n}\r\n\r\ninterface MSMediaKeyNeededEvent extends Event {\r\n initData: Uint8Array;\r\n}\r\n\r\ndeclare var MSMediaKeyNeededEvent: {\r\n prototype: MSMediaKeyNeededEvent;\r\n new(): MSMediaKeyNeededEvent;\r\n}\r\n\r\ninterface MSMediaKeySession extends EventTarget {\r\n error: MSMediaKeyError;\r\n keySystem: string;\r\n sessionId: string;\r\n close(): void;\r\n update(key: Uint8Array): void;\r\n}\r\n\r\ndeclare var MSMediaKeySession: {\r\n prototype: MSMediaKeySession;\r\n new(): MSMediaKeySession;\r\n}\r\n\r\ninterface MSMediaKeys {\r\n keySystem: string;\r\n createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession;\r\n}\r\n\r\ndeclare var MSMediaKeys: {\r\n prototype: MSMediaKeys;\r\n new(keySystem: string): MSMediaKeys;\r\n isTypeSupported(keySystem: string, type?: string): boolean;\r\n}\r\n\r\ninterface MSMimeTypesCollection {\r\n length: number;\r\n}\r\n\r\ndeclare var MSMimeTypesCollection: {\r\n prototype: MSMimeTypesCollection;\r\n new(): MSMimeTypesCollection;\r\n}\r\n\r\ninterface MSPluginsCollection {\r\n length: number;\r\n refresh(reload?: boolean): void;\r\n}\r\n\r\ndeclare var MSPluginsCollection: {\r\n prototype: MSPluginsCollection;\r\n new(): MSPluginsCollection;\r\n}\r\n\r\ninterface MSPointerEvent extends MouseEvent {\r\n currentPoint: any;\r\n height: number;\r\n hwTimestamp: number;\r\n intermediatePoints: any;\r\n isPrimary: boolean;\r\n pointerId: number;\r\n pointerType: any;\r\n pressure: number;\r\n rotation: number;\r\n tiltX: number;\r\n tiltY: number;\r\n width: number;\r\n getCurrentPoint(element: Element): void;\r\n getIntermediatePoints(element: Element): void;\r\n initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;\r\n}\r\n\r\ndeclare var MSPointerEvent: {\r\n prototype: MSPointerEvent;\r\n new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;\r\n}\r\n\r\ninterface MSRangeCollection {\r\n length: number;\r\n item(index: number): Range;\r\n [index: number]: Range;\r\n}\r\n\r\ndeclare var MSRangeCollection: {\r\n prototype: MSRangeCollection;\r\n new(): MSRangeCollection;\r\n}\r\n\r\ninterface MSSiteModeEvent extends Event {\r\n actionURL: string;\r\n buttonID: number;\r\n}\r\n\r\ndeclare var MSSiteModeEvent: {\r\n prototype: MSSiteModeEvent;\r\n new(): MSSiteModeEvent;\r\n}\r\n\r\ninterface MSStream {\r\n type: string;\r\n msClose(): void;\r\n msDetachStream(): any;\r\n}\r\n\r\ndeclare var MSStream: {\r\n prototype: MSStream;\r\n new(): MSStream;\r\n}\r\n\r\ninterface MSStreamReader extends EventTarget, MSBaseReader {\r\n error: DOMError;\r\n readAsArrayBuffer(stream: MSStream, size?: number): void;\r\n readAsBinaryString(stream: MSStream, size?: number): void;\r\n readAsBlob(stream: MSStream, size?: number): void;\r\n readAsDataURL(stream: MSStream, size?: number): void;\r\n readAsText(stream: MSStream, encoding?: string, size?: number): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSStreamReader: {\r\n prototype: MSStreamReader;\r\n new(): MSStreamReader;\r\n}\r\n\r\ninterface MSWebViewAsyncOperation extends EventTarget {\r\n error: DOMError;\r\n oncomplete: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n readyState: number;\r\n result: any;\r\n target: MSHTMLWebViewElement;\r\n type: number;\r\n start(): void;\r\n COMPLETED: number;\r\n ERROR: number;\r\n STARTED: number;\r\n TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;\r\n TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;\r\n TYPE_INVOKE_SCRIPT: number;\r\n addEventListener(type: \"complete\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSWebViewAsyncOperation: {\r\n prototype: MSWebViewAsyncOperation;\r\n new(): MSWebViewAsyncOperation;\r\n COMPLETED: number;\r\n ERROR: number;\r\n STARTED: number;\r\n TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;\r\n TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;\r\n TYPE_INVOKE_SCRIPT: number;\r\n}\r\n\r\ninterface MSWebViewSettings {\r\n isIndexedDBEnabled: boolean;\r\n isJavaScriptEnabled: boolean;\r\n}\r\n\r\ndeclare var MSWebViewSettings: {\r\n prototype: MSWebViewSettings;\r\n new(): MSWebViewSettings;\r\n}\r\n\r\ninterface MediaElementAudioSourceNode extends AudioNode {\r\n}\r\n\r\ndeclare var MediaElementAudioSourceNode: {\r\n prototype: MediaElementAudioSourceNode;\r\n new(): MediaElementAudioSourceNode;\r\n}\r\n\r\ninterface MediaError {\r\n code: number;\r\n msExtendedCode: number;\r\n MEDIA_ERR_ABORTED: number;\r\n MEDIA_ERR_DECODE: number;\r\n MEDIA_ERR_NETWORK: number;\r\n MEDIA_ERR_SRC_NOT_SUPPORTED: number;\r\n MS_MEDIA_ERR_ENCRYPTED: number;\r\n}\r\n\r\ndeclare var MediaError: {\r\n prototype: MediaError;\r\n new(): MediaError;\r\n MEDIA_ERR_ABORTED: number;\r\n MEDIA_ERR_DECODE: number;\r\n MEDIA_ERR_NETWORK: number;\r\n MEDIA_ERR_SRC_NOT_SUPPORTED: number;\r\n MS_MEDIA_ERR_ENCRYPTED: number;\r\n}\r\n\r\ninterface MediaList {\r\n length: number;\r\n mediaText: string;\r\n appendMedium(newMedium: string): void;\r\n deleteMedium(oldMedium: string): void;\r\n item(index: number): string;\r\n toString(): string;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var MediaList: {\r\n prototype: MediaList;\r\n new(): MediaList;\r\n}\r\n\r\ninterface MediaQueryList {\r\n matches: boolean;\r\n media: string;\r\n addListener(listener: MediaQueryListListener): void;\r\n removeListener(listener: MediaQueryListListener): void;\r\n}\r\n\r\ndeclare var MediaQueryList: {\r\n prototype: MediaQueryList;\r\n new(): MediaQueryList;\r\n}\r\n\r\ninterface MediaSource extends EventTarget {\r\n activeSourceBuffers: SourceBufferList;\r\n duration: number;\r\n readyState: string;\r\n sourceBuffers: SourceBufferList;\r\n addSourceBuffer(type: string): SourceBuffer;\r\n endOfStream(error?: number): void;\r\n removeSourceBuffer(sourceBuffer: SourceBuffer): void;\r\n}\r\n\r\ndeclare var MediaSource: {\r\n prototype: MediaSource;\r\n new(): MediaSource;\r\n isTypeSupported(type: string): boolean;\r\n}\r\n\r\ninterface MessageChannel {\r\n port1: MessagePort;\r\n port2: MessagePort;\r\n}\r\n\r\ndeclare var MessageChannel: {\r\n prototype: MessageChannel;\r\n new(): MessageChannel;\r\n}\r\n\r\ninterface MessageEvent extends Event {\r\n data: any;\r\n origin: string;\r\n ports: any;\r\n source: Window;\r\n initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: Window): void;\r\n}\r\n\r\ndeclare var MessageEvent: {\r\n prototype: MessageEvent;\r\n new(type: string, eventInitDict?: MessageEventInit): MessageEvent;\r\n}\r\n\r\ninterface MessagePort extends EventTarget {\r\n onmessage: (ev: MessageEvent) => any;\r\n close(): void;\r\n postMessage(message?: any, ports?: any): void;\r\n start(): void;\r\n addEventListener(type: \"message\", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MessagePort: {\r\n prototype: MessagePort;\r\n new(): MessagePort;\r\n}\r\n\r\ninterface MimeType {\r\n description: string;\r\n enabledPlugin: Plugin;\r\n suffixes: string;\r\n type: string;\r\n}\r\n\r\ndeclare var MimeType: {\r\n prototype: MimeType;\r\n new(): MimeType;\r\n}\r\n\r\ninterface MimeTypeArray {\r\n length: number;\r\n item(index: number): Plugin;\r\n namedItem(type: string): Plugin;\r\n [index: number]: Plugin;\r\n}\r\n\r\ndeclare var MimeTypeArray: {\r\n prototype: MimeTypeArray;\r\n new(): MimeTypeArray;\r\n}\r\n\r\ninterface MouseEvent extends UIEvent {\r\n altKey: boolean;\r\n button: number;\r\n buttons: number;\r\n clientX: number;\r\n clientY: number;\r\n ctrlKey: boolean;\r\n fromElement: Element;\r\n layerX: number;\r\n layerY: number;\r\n metaKey: boolean;\r\n movementX: number;\r\n movementY: number;\r\n offsetX: number;\r\n offsetY: number;\r\n pageX: number;\r\n pageY: number;\r\n relatedTarget: EventTarget;\r\n screenX: number;\r\n screenY: number;\r\n shiftKey: boolean;\r\n toElement: Element;\r\n which: number;\r\n x: number;\r\n y: number;\r\n getModifierState(keyArg: string): boolean;\r\n initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget): void;\r\n}\r\n\r\ndeclare var MouseEvent: {\r\n prototype: MouseEvent;\r\n new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;\r\n}\r\n\r\ninterface MouseWheelEvent extends MouseEvent {\r\n wheelDelta: number;\r\n wheelDeltaX: number;\r\n wheelDeltaY: number;\r\n initMouseWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, wheelDeltaArg: number): void;\r\n}\r\n\r\ndeclare var MouseWheelEvent: {\r\n prototype: MouseWheelEvent;\r\n new(): MouseWheelEvent;\r\n}\r\n\r\ninterface MutationEvent extends Event {\r\n attrChange: number;\r\n attrName: string;\r\n newValue: string;\r\n prevValue: string;\r\n relatedNode: Node;\r\n initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void;\r\n ADDITION: number;\r\n MODIFICATION: number;\r\n REMOVAL: number;\r\n}\r\n\r\ndeclare var MutationEvent: {\r\n prototype: MutationEvent;\r\n new(): MutationEvent;\r\n ADDITION: number;\r\n MODIFICATION: number;\r\n REMOVAL: number;\r\n}\r\n\r\ninterface MutationObserver {\r\n disconnect(): void;\r\n observe(target: Node, options: MutationObserverInit): void;\r\n takeRecords(): MutationRecord[];\r\n}\r\n\r\ndeclare var MutationObserver: {\r\n prototype: MutationObserver;\r\n new(callback: MutationCallback): MutationObserver;\r\n}\r\n\r\ninterface MutationRecord {\r\n addedNodes: NodeList;\r\n attributeName: string;\r\n attributeNamespace: string;\r\n nextSibling: Node;\r\n oldValue: string;\r\n previousSibling: Node;\r\n removedNodes: NodeList;\r\n target: Node;\r\n type: string;\r\n}\r\n\r\ndeclare var MutationRecord: {\r\n prototype: MutationRecord;\r\n new(): MutationRecord;\r\n}\r\n\r\ninterface NamedNodeMap {\r\n length: number;\r\n getNamedItem(name: string): Attr;\r\n getNamedItemNS(namespaceURI: string, localName: string): Attr;\r\n item(index: number): Attr;\r\n removeNamedItem(name: string): Attr;\r\n removeNamedItemNS(namespaceURI: string, localName: string): Attr;\r\n setNamedItem(arg: Attr): Attr;\r\n setNamedItemNS(arg: Attr): Attr;\r\n [index: number]: Attr;\r\n}\r\n\r\ndeclare var NamedNodeMap: {\r\n prototype: NamedNodeMap;\r\n new(): NamedNodeMap;\r\n}\r\n\r\ninterface NavigationCompletedEvent extends NavigationEvent {\r\n isSuccess: boolean;\r\n webErrorStatus: number;\r\n}\r\n\r\ndeclare var NavigationCompletedEvent: {\r\n prototype: NavigationCompletedEvent;\r\n new(): NavigationCompletedEvent;\r\n}\r\n\r\ninterface NavigationEvent extends Event {\r\n uri: string;\r\n}\r\n\r\ndeclare var NavigationEvent: {\r\n prototype: NavigationEvent;\r\n new(): NavigationEvent;\r\n}\r\n\r\ninterface NavigationEventWithReferrer extends NavigationEvent {\r\n referer: string;\r\n}\r\n\r\ndeclare var NavigationEventWithReferrer: {\r\n prototype: NavigationEventWithReferrer;\r\n new(): NavigationEventWithReferrer;\r\n}\r\n\r\ninterface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver {\r\n appCodeName: string;\r\n appMinorVersion: string;\r\n browserLanguage: string;\r\n connectionSpeed: number;\r\n cookieEnabled: boolean;\r\n cpuClass: string;\r\n language: string;\r\n maxTouchPoints: number;\r\n mimeTypes: MSMimeTypesCollection;\r\n msManipulationViewsEnabled: boolean;\r\n msMaxTouchPoints: number;\r\n msPointerEnabled: boolean;\r\n plugins: MSPluginsCollection;\r\n pointerEnabled: boolean;\r\n systemLanguage: string;\r\n userLanguage: string;\r\n webdriver: boolean;\r\n getGamepads(): Gamepad[];\r\n javaEnabled(): boolean;\r\n msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;\r\n vibrate(pattern: number | number[]): boolean;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Navigator: {\r\n prototype: Navigator;\r\n new(): Navigator;\r\n}\r\n\r\ninterface Node extends EventTarget {\r\n attributes: NamedNodeMap;\r\n baseURI: string;\r\n childNodes: NodeList;\r\n firstChild: Node;\r\n lastChild: Node;\r\n localName: string;\r\n namespaceURI: string;\r\n nextSibling: Node;\r\n nodeName: string;\r\n nodeType: number;\r\n nodeValue: string;\r\n ownerDocument: Document;\r\n parentElement: HTMLElement;\r\n parentNode: Node;\r\n prefix: string;\r\n previousSibling: Node;\r\n textContent: string;\r\n appendChild(newChild: Node): Node;\r\n cloneNode(deep?: boolean): Node;\r\n compareDocumentPosition(other: Node): number;\r\n hasAttributes(): boolean;\r\n hasChildNodes(): boolean;\r\n insertBefore(newChild: Node, refChild?: Node): Node;\r\n isDefaultNamespace(namespaceURI: string): boolean;\r\n isEqualNode(arg: Node): boolean;\r\n isSameNode(other: Node): boolean;\r\n lookupNamespaceURI(prefix: string): string;\r\n lookupPrefix(namespaceURI: string): string;\r\n normalize(): void;\r\n removeChild(oldChild: Node): Node;\r\n replaceChild(newChild: Node, oldChild: Node): Node;\r\n contains(node: Node): boolean;\r\n ATTRIBUTE_NODE: number;\r\n CDATA_SECTION_NODE: number;\r\n COMMENT_NODE: number;\r\n DOCUMENT_FRAGMENT_NODE: number;\r\n DOCUMENT_NODE: number;\r\n DOCUMENT_POSITION_CONTAINED_BY: number;\r\n DOCUMENT_POSITION_CONTAINS: number;\r\n DOCUMENT_POSITION_DISCONNECTED: number;\r\n DOCUMENT_POSITION_FOLLOWING: number;\r\n DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;\r\n DOCUMENT_POSITION_PRECEDING: number;\r\n DOCUMENT_TYPE_NODE: number;\r\n ELEMENT_NODE: number;\r\n ENTITY_NODE: number;\r\n ENTITY_REFERENCE_NODE: number;\r\n NOTATION_NODE: number;\r\n PROCESSING_INSTRUCTION_NODE: number;\r\n TEXT_NODE: number;\r\n}\r\n\r\ndeclare var Node: {\r\n prototype: Node;\r\n new(): Node;\r\n ATTRIBUTE_NODE: number;\r\n CDATA_SECTION_NODE: number;\r\n COMMENT_NODE: number;\r\n DOCUMENT_FRAGMENT_NODE: number;\r\n DOCUMENT_NODE: number;\r\n DOCUMENT_POSITION_CONTAINED_BY: number;\r\n DOCUMENT_POSITION_CONTAINS: number;\r\n DOCUMENT_POSITION_DISCONNECTED: number;\r\n DOCUMENT_POSITION_FOLLOWING: number;\r\n DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;\r\n DOCUMENT_POSITION_PRECEDING: number;\r\n DOCUMENT_TYPE_NODE: number;\r\n ELEMENT_NODE: number;\r\n ENTITY_NODE: number;\r\n ENTITY_REFERENCE_NODE: number;\r\n NOTATION_NODE: number;\r\n PROCESSING_INSTRUCTION_NODE: number;\r\n TEXT_NODE: number;\r\n}\r\n\r\ninterface NodeFilter {\r\n acceptNode(n: Node): number;\r\n}\r\n\r\ndeclare var NodeFilter: {\r\n FILTER_ACCEPT: number;\r\n FILTER_REJECT: number;\r\n FILTER_SKIP: number;\r\n SHOW_ALL: number;\r\n SHOW_ATTRIBUTE: number;\r\n SHOW_CDATA_SECTION: number;\r\n SHOW_COMMENT: number;\r\n SHOW_DOCUMENT: number;\r\n SHOW_DOCUMENT_FRAGMENT: number;\r\n SHOW_DOCUMENT_TYPE: number;\r\n SHOW_ELEMENT: number;\r\n SHOW_ENTITY: number;\r\n SHOW_ENTITY_REFERENCE: number;\r\n SHOW_NOTATION: number;\r\n SHOW_PROCESSING_INSTRUCTION: number;\r\n SHOW_TEXT: number;\r\n}\r\n\r\ninterface NodeIterator {\r\n expandEntityReferences: boolean;\r\n filter: NodeFilter;\r\n root: Node;\r\n whatToShow: number;\r\n detach(): void;\r\n nextNode(): Node;\r\n previousNode(): Node;\r\n}\r\n\r\ndeclare var NodeIterator: {\r\n prototype: NodeIterator;\r\n new(): NodeIterator;\r\n}\r\n\r\ninterface NodeList {\r\n length: number;\r\n item(index: number): Node;\r\n [index: number]: Node;\r\n}\r\n\r\ndeclare var NodeList: {\r\n prototype: NodeList;\r\n new(): NodeList;\r\n}\r\n\r\ninterface OES_element_index_uint {\r\n}\r\n\r\ndeclare var OES_element_index_uint: {\r\n prototype: OES_element_index_uint;\r\n new(): OES_element_index_uint;\r\n}\r\n\r\ninterface OES_standard_derivatives {\r\n FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;\r\n}\r\n\r\ndeclare var OES_standard_derivatives: {\r\n prototype: OES_standard_derivatives;\r\n new(): OES_standard_derivatives;\r\n FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;\r\n}\r\n\r\ninterface OES_texture_float {\r\n}\r\n\r\ndeclare var OES_texture_float: {\r\n prototype: OES_texture_float;\r\n new(): OES_texture_float;\r\n}\r\n\r\ninterface OES_texture_float_linear {\r\n}\r\n\r\ndeclare var OES_texture_float_linear: {\r\n prototype: OES_texture_float_linear;\r\n new(): OES_texture_float_linear;\r\n}\r\n\r\ninterface OfflineAudioCompletionEvent extends Event {\r\n renderedBuffer: AudioBuffer;\r\n}\r\n\r\ndeclare var OfflineAudioCompletionEvent: {\r\n prototype: OfflineAudioCompletionEvent;\r\n new(): OfflineAudioCompletionEvent;\r\n}\r\n\r\ninterface OfflineAudioContext extends AudioContext {\r\n oncomplete: (ev: Event) => any;\r\n startRendering(): void;\r\n addEventListener(type: \"complete\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var OfflineAudioContext: {\r\n prototype: OfflineAudioContext;\r\n new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;\r\n}\r\n\r\ninterface OscillatorNode extends AudioNode {\r\n detune: AudioParam;\r\n frequency: AudioParam;\r\n onended: (ev: Event) => any;\r\n type: string;\r\n setPeriodicWave(periodicWave: PeriodicWave): void;\r\n start(when?: number): void;\r\n stop(when?: number): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var OscillatorNode: {\r\n prototype: OscillatorNode;\r\n new(): OscillatorNode;\r\n}\r\n\r\ninterface PageTransitionEvent extends Event {\r\n persisted: boolean;\r\n}\r\n\r\ndeclare var PageTransitionEvent: {\r\n prototype: PageTransitionEvent;\r\n new(): PageTransitionEvent;\r\n}\r\n\r\ninterface PannerNode extends AudioNode {\r\n coneInnerAngle: number;\r\n coneOuterAngle: number;\r\n coneOuterGain: number;\r\n distanceModel: string;\r\n maxDistance: number;\r\n panningModel: string;\r\n refDistance: number;\r\n rolloffFactor: number;\r\n setOrientation(x: number, y: number, z: number): void;\r\n setPosition(x: number, y: number, z: number): void;\r\n setVelocity(x: number, y: number, z: number): void;\r\n}\r\n\r\ndeclare var PannerNode: {\r\n prototype: PannerNode;\r\n new(): PannerNode;\r\n}\r\n\r\ninterface PerfWidgetExternal {\r\n activeNetworkRequestCount: number;\r\n averageFrameTime: number;\r\n averagePaintTime: number;\r\n extraInformationEnabled: boolean;\r\n independentRenderingEnabled: boolean;\r\n irDisablingContentString: string;\r\n irStatusAvailable: boolean;\r\n maxCpuSpeed: number;\r\n paintRequestsPerSecond: number;\r\n performanceCounter: number;\r\n performanceCounterFrequency: number;\r\n addEventListener(eventType: string, callback: Function): void;\r\n getMemoryUsage(): number;\r\n getProcessCpuUsage(): number;\r\n getRecentCpuUsage(last: number): any;\r\n getRecentFrames(last: number): any;\r\n getRecentMemoryUsage(last: number): any;\r\n getRecentPaintRequests(last: number): any;\r\n removeEventListener(eventType: string, callback: Function): void;\r\n repositionWindow(x: number, y: number): void;\r\n resizeWindow(width: number, height: number): void;\r\n}\r\n\r\ndeclare var PerfWidgetExternal: {\r\n prototype: PerfWidgetExternal;\r\n new(): PerfWidgetExternal;\r\n}\r\n\r\ninterface Performance {\r\n navigation: PerformanceNavigation;\r\n timing: PerformanceTiming;\r\n clearMarks(markName?: string): void;\r\n clearMeasures(measureName?: string): void;\r\n clearResourceTimings(): void;\r\n getEntries(): any;\r\n getEntriesByName(name: string, entryType?: string): any;\r\n getEntriesByType(entryType: string): any;\r\n getMarks(markName?: string): any;\r\n getMeasures(measureName?: string): any;\r\n mark(markName: string): void;\r\n measure(measureName: string, startMarkName?: string, endMarkName?: string): void;\r\n now(): number;\r\n setResourceTimingBufferSize(maxSize: number): void;\r\n toJSON(): any;\r\n}\r\n\r\ndeclare var Performance: {\r\n prototype: Performance;\r\n new(): Performance;\r\n}\r\n\r\ninterface PerformanceEntry {\r\n duration: number;\r\n entryType: string;\r\n name: string;\r\n startTime: number;\r\n}\r\n\r\ndeclare var PerformanceEntry: {\r\n prototype: PerformanceEntry;\r\n new(): PerformanceEntry;\r\n}\r\n\r\ninterface PerformanceMark extends PerformanceEntry {\r\n}\r\n\r\ndeclare var PerformanceMark: {\r\n prototype: PerformanceMark;\r\n new(): PerformanceMark;\r\n}\r\n\r\ninterface PerformanceMeasure extends PerformanceEntry {\r\n}\r\n\r\ndeclare var PerformanceMeasure: {\r\n prototype: PerformanceMeasure;\r\n new(): PerformanceMeasure;\r\n}\r\n\r\ninterface PerformanceNavigation {\r\n redirectCount: number;\r\n type: number;\r\n toJSON(): any;\r\n TYPE_BACK_FORWARD: number;\r\n TYPE_NAVIGATE: number;\r\n TYPE_RELOAD: number;\r\n TYPE_RESERVED: number;\r\n}\r\n\r\ndeclare var PerformanceNavigation: {\r\n prototype: PerformanceNavigation;\r\n new(): PerformanceNavigation;\r\n TYPE_BACK_FORWARD: number;\r\n TYPE_NAVIGATE: number;\r\n TYPE_RELOAD: number;\r\n TYPE_RESERVED: number;\r\n}\r\n\r\ninterface PerformanceNavigationTiming extends PerformanceEntry {\r\n connectEnd: number;\r\n connectStart: number;\r\n domComplete: number;\r\n domContentLoadedEventEnd: number;\r\n domContentLoadedEventStart: number;\r\n domInteractive: number;\r\n domLoading: number;\r\n domainLookupEnd: number;\r\n domainLookupStart: number;\r\n fetchStart: number;\r\n loadEventEnd: number;\r\n loadEventStart: number;\r\n navigationStart: number;\r\n redirectCount: number;\r\n redirectEnd: number;\r\n redirectStart: number;\r\n requestStart: number;\r\n responseEnd: number;\r\n responseStart: number;\r\n type: string;\r\n unloadEventEnd: number;\r\n unloadEventStart: number;\r\n}\r\n\r\ndeclare var PerformanceNavigationTiming: {\r\n prototype: PerformanceNavigationTiming;\r\n new(): PerformanceNavigationTiming;\r\n}\r\n\r\ninterface PerformanceResourceTiming extends PerformanceEntry {\r\n connectEnd: number;\r\n connectStart: number;\r\n domainLookupEnd: number;\r\n domainLookupStart: number;\r\n fetchStart: number;\r\n initiatorType: string;\r\n redirectEnd: number;\r\n redirectStart: number;\r\n requestStart: number;\r\n responseEnd: number;\r\n responseStart: number;\r\n}\r\n\r\ndeclare var PerformanceResourceTiming: {\r\n prototype: PerformanceResourceTiming;\r\n new(): PerformanceResourceTiming;\r\n}\r\n\r\ninterface PerformanceTiming {\r\n connectEnd: number;\r\n connectStart: number;\r\n domComplete: number;\r\n domContentLoadedEventEnd: number;\r\n domContentLoadedEventStart: number;\r\n domInteractive: number;\r\n domLoading: number;\r\n domainLookupEnd: number;\r\n domainLookupStart: number;\r\n fetchStart: number;\r\n loadEventEnd: number;\r\n loadEventStart: number;\r\n msFirstPaint: number;\r\n navigationStart: number;\r\n redirectEnd: number;\r\n redirectStart: number;\r\n requestStart: number;\r\n responseEnd: number;\r\n responseStart: number;\r\n unloadEventEnd: number;\r\n unloadEventStart: number;\r\n toJSON(): any;\r\n}\r\n\r\ndeclare var PerformanceTiming: {\r\n prototype: PerformanceTiming;\r\n new(): PerformanceTiming;\r\n}\r\n\r\ninterface PeriodicWave {\r\n}\r\n\r\ndeclare var PeriodicWave: {\r\n prototype: PeriodicWave;\r\n new(): PeriodicWave;\r\n}\r\n\r\ninterface PermissionRequest extends DeferredPermissionRequest {\r\n state: string;\r\n defer(): void;\r\n}\r\n\r\ndeclare var PermissionRequest: {\r\n prototype: PermissionRequest;\r\n new(): PermissionRequest;\r\n}\r\n\r\ninterface PermissionRequestedEvent extends Event {\r\n permissionRequest: PermissionRequest;\r\n}\r\n\r\ndeclare var PermissionRequestedEvent: {\r\n prototype: PermissionRequestedEvent;\r\n new(): PermissionRequestedEvent;\r\n}\r\n\r\ninterface Plugin {\r\n description: string;\r\n filename: string;\r\n length: number;\r\n name: string;\r\n version: string;\r\n item(index: number): MimeType;\r\n namedItem(type: string): MimeType;\r\n [index: number]: MimeType;\r\n}\r\n\r\ndeclare var Plugin: {\r\n prototype: Plugin;\r\n new(): Plugin;\r\n}\r\n\r\ninterface PluginArray {\r\n length: number;\r\n item(index: number): Plugin;\r\n namedItem(name: string): Plugin;\r\n refresh(reload?: boolean): void;\r\n [index: number]: Plugin;\r\n}\r\n\r\ndeclare var PluginArray: {\r\n prototype: PluginArray;\r\n new(): PluginArray;\r\n}\r\n\r\ninterface PointerEvent extends MouseEvent {\r\n currentPoint: any;\r\n height: number;\r\n hwTimestamp: number;\r\n intermediatePoints: any;\r\n isPrimary: boolean;\r\n pointerId: number;\r\n pointerType: any;\r\n pressure: number;\r\n rotation: number;\r\n tiltX: number;\r\n tiltY: number;\r\n width: number;\r\n getCurrentPoint(element: Element): void;\r\n getIntermediatePoints(element: Element): void;\r\n initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;\r\n}\r\n\r\ndeclare var PointerEvent: {\r\n prototype: PointerEvent;\r\n new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;\r\n}\r\n\r\ninterface PopStateEvent extends Event {\r\n state: any;\r\n initPopStateEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, stateArg: any): void;\r\n}\r\n\r\ndeclare var PopStateEvent: {\r\n prototype: PopStateEvent;\r\n new(): PopStateEvent;\r\n}\r\n\r\ninterface Position {\r\n coords: Coordinates;\r\n timestamp: number;\r\n}\r\n\r\ndeclare var Position: {\r\n prototype: Position;\r\n new(): Position;\r\n}\r\n\r\ninterface PositionError {\r\n code: number;\r\n message: string;\r\n toString(): string;\r\n PERMISSION_DENIED: number;\r\n POSITION_UNAVAILABLE: number;\r\n TIMEOUT: number;\r\n}\r\n\r\ndeclare var PositionError: {\r\n prototype: PositionError;\r\n new(): PositionError;\r\n PERMISSION_DENIED: number;\r\n POSITION_UNAVAILABLE: number;\r\n TIMEOUT: number;\r\n}\r\n\r\ninterface ProcessingInstruction extends CharacterData {\r\n target: string;\r\n}\r\n\r\ndeclare var ProcessingInstruction: {\r\n prototype: ProcessingInstruction;\r\n new(): ProcessingInstruction;\r\n}\r\n\r\ninterface ProgressEvent extends Event {\r\n lengthComputable: boolean;\r\n loaded: number;\r\n total: number;\r\n initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;\r\n}\r\n\r\ndeclare var ProgressEvent: {\r\n prototype: ProgressEvent;\r\n new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;\r\n}\r\n\r\ninterface Range {\r\n collapsed: boolean;\r\n commonAncestorContainer: Node;\r\n endContainer: Node;\r\n endOffset: number;\r\n startContainer: Node;\r\n startOffset: number;\r\n cloneContents(): DocumentFragment;\r\n cloneRange(): Range;\r\n collapse(toStart: boolean): void;\r\n compareBoundaryPoints(how: number, sourceRange: Range): number;\r\n createContextualFragment(fragment: string): DocumentFragment;\r\n deleteContents(): void;\r\n detach(): void;\r\n expand(Unit: string): boolean;\r\n extractContents(): DocumentFragment;\r\n getBoundingClientRect(): ClientRect;\r\n getClientRects(): ClientRectList;\r\n insertNode(newNode: Node): void;\r\n selectNode(refNode: Node): void;\r\n selectNodeContents(refNode: Node): void;\r\n setEnd(refNode: Node, offset: number): void;\r\n setEndAfter(refNode: Node): void;\r\n setEndBefore(refNode: Node): void;\r\n setStart(refNode: Node, offset: number): void;\r\n setStartAfter(refNode: Node): void;\r\n setStartBefore(refNode: Node): void;\r\n surroundContents(newParent: Node): void;\r\n toString(): string;\r\n END_TO_END: number;\r\n END_TO_START: number;\r\n START_TO_END: number;\r\n START_TO_START: number;\r\n}\r\n\r\ndeclare var Range: {\r\n prototype: Range;\r\n new(): Range;\r\n END_TO_END: number;\r\n END_TO_START: number;\r\n START_TO_END: number;\r\n START_TO_START: number;\r\n}\r\n\r\ninterface SVGAElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {\r\n target: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGAElement: {\r\n prototype: SVGAElement;\r\n new(): SVGAElement;\r\n}\r\n\r\ninterface SVGAngle {\r\n unitType: number;\r\n value: number;\r\n valueAsString: string;\r\n valueInSpecifiedUnits: number;\r\n convertToSpecifiedUnits(unitType: number): void;\r\n newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;\r\n SVG_ANGLETYPE_DEG: number;\r\n SVG_ANGLETYPE_GRAD: number;\r\n SVG_ANGLETYPE_RAD: number;\r\n SVG_ANGLETYPE_UNKNOWN: number;\r\n SVG_ANGLETYPE_UNSPECIFIED: number;\r\n}\r\n\r\ndeclare var SVGAngle: {\r\n prototype: SVGAngle;\r\n new(): SVGAngle;\r\n SVG_ANGLETYPE_DEG: number;\r\n SVG_ANGLETYPE_GRAD: number;\r\n SVG_ANGLETYPE_RAD: number;\r\n SVG_ANGLETYPE_UNKNOWN: number;\r\n SVG_ANGLETYPE_UNSPECIFIED: number;\r\n}\r\n\r\ninterface SVGAnimatedAngle {\r\n animVal: SVGAngle;\r\n baseVal: SVGAngle;\r\n}\r\n\r\ndeclare var SVGAnimatedAngle: {\r\n prototype: SVGAnimatedAngle;\r\n new(): SVGAnimatedAngle;\r\n}\r\n\r\ninterface SVGAnimatedBoolean {\r\n animVal: boolean;\r\n baseVal: boolean;\r\n}\r\n\r\ndeclare var SVGAnimatedBoolean: {\r\n prototype: SVGAnimatedBoolean;\r\n new(): SVGAnimatedBoolean;\r\n}\r\n\r\ninterface SVGAnimatedEnumeration {\r\n animVal: number;\r\n baseVal: number;\r\n}\r\n\r\ndeclare var SVGAnimatedEnumeration: {\r\n prototype: SVGAnimatedEnumeration;\r\n new(): SVGAnimatedEnumeration;\r\n}\r\n\r\ninterface SVGAnimatedInteger {\r\n animVal: number;\r\n baseVal: number;\r\n}\r\n\r\ndeclare var SVGAnimatedInteger: {\r\n prototype: SVGAnimatedInteger;\r\n new(): SVGAnimatedInteger;\r\n}\r\n\r\ninterface SVGAnimatedLength {\r\n animVal: SVGLength;\r\n baseVal: SVGLength;\r\n}\r\n\r\ndeclare var SVGAnimatedLength: {\r\n prototype: SVGAnimatedLength;\r\n new(): SVGAnimatedLength;\r\n}\r\n\r\ninterface SVGAnimatedLengthList {\r\n animVal: SVGLengthList;\r\n baseVal: SVGLengthList;\r\n}\r\n\r\ndeclare var SVGAnimatedLengthList: {\r\n prototype: SVGAnimatedLengthList;\r\n new(): SVGAnimatedLengthList;\r\n}\r\n\r\ninterface SVGAnimatedNumber {\r\n animVal: number;\r\n baseVal: number;\r\n}\r\n\r\ndeclare var SVGAnimatedNumber: {\r\n prototype: SVGAnimatedNumber;\r\n new(): SVGAnimatedNumber;\r\n}\r\n\r\ninterface SVGAnimatedNumberList {\r\n animVal: SVGNumberList;\r\n baseVal: SVGNumberList;\r\n}\r\n\r\ndeclare var SVGAnimatedNumberList: {\r\n prototype: SVGAnimatedNumberList;\r\n new(): SVGAnimatedNumberList;\r\n}\r\n\r\ninterface SVGAnimatedPreserveAspectRatio {\r\n animVal: SVGPreserveAspectRatio;\r\n baseVal: SVGPreserveAspectRatio;\r\n}\r\n\r\ndeclare var SVGAnimatedPreserveAspectRatio: {\r\n prototype: SVGAnimatedPreserveAspectRatio;\r\n new(): SVGAnimatedPreserveAspectRatio;\r\n}\r\n\r\ninterface SVGAnimatedRect {\r\n animVal: SVGRect;\r\n baseVal: SVGRect;\r\n}\r\n\r\ndeclare var SVGAnimatedRect: {\r\n prototype: SVGAnimatedRect;\r\n new(): SVGAnimatedRect;\r\n}\r\n\r\ninterface SVGAnimatedString {\r\n animVal: string;\r\n baseVal: string;\r\n}\r\n\r\ndeclare var SVGAnimatedString: {\r\n prototype: SVGAnimatedString;\r\n new(): SVGAnimatedString;\r\n}\r\n\r\ninterface SVGAnimatedTransformList {\r\n animVal: SVGTransformList;\r\n baseVal: SVGTransformList;\r\n}\r\n\r\ndeclare var SVGAnimatedTransformList: {\r\n prototype: SVGAnimatedTransformList;\r\n new(): SVGAnimatedTransformList;\r\n}\r\n\r\ninterface SVGCircleElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n cx: SVGAnimatedLength;\r\n cy: SVGAnimatedLength;\r\n r: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGCircleElement: {\r\n prototype: SVGCircleElement;\r\n new(): SVGCircleElement;\r\n}\r\n\r\ninterface SVGClipPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {\r\n clipPathUnits: SVGAnimatedEnumeration;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGClipPathElement: {\r\n prototype: SVGClipPathElement;\r\n new(): SVGClipPathElement;\r\n}\r\n\r\ninterface SVGComponentTransferFunctionElement extends SVGElement {\r\n amplitude: SVGAnimatedNumber;\r\n exponent: SVGAnimatedNumber;\r\n intercept: SVGAnimatedNumber;\r\n offset: SVGAnimatedNumber;\r\n slope: SVGAnimatedNumber;\r\n tableValues: SVGAnimatedNumberList;\r\n type: SVGAnimatedEnumeration;\r\n SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGComponentTransferFunctionElement: {\r\n prototype: SVGComponentTransferFunctionElement;\r\n new(): SVGComponentTransferFunctionElement;\r\n SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGDefsElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGDefsElement: {\r\n prototype: SVGDefsElement;\r\n new(): SVGDefsElement;\r\n}\r\n\r\ninterface SVGDescElement extends SVGElement, SVGStylable, SVGLangSpace {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGDescElement: {\r\n prototype: SVGDescElement;\r\n new(): SVGDescElement;\r\n}\r\n\r\ninterface SVGElement extends Element {\r\n id: string;\r\n onclick: (ev: MouseEvent) => any;\r\n ondblclick: (ev: MouseEvent) => any;\r\n onfocusin: (ev: FocusEvent) => any;\r\n onfocusout: (ev: FocusEvent) => any;\r\n onload: (ev: Event) => any;\r\n onmousedown: (ev: MouseEvent) => any;\r\n onmousemove: (ev: MouseEvent) => any;\r\n onmouseout: (ev: MouseEvent) => any;\r\n onmouseover: (ev: MouseEvent) => any;\r\n onmouseup: (ev: MouseEvent) => any;\r\n ownerSVGElement: SVGSVGElement;\r\n viewportElement: SVGElement;\r\n xmlbase: string;\r\n className: any;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusin\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusout\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGElement: {\r\n prototype: SVGElement;\r\n new(): SVGElement;\r\n}\r\n\r\ninterface SVGElementInstance extends EventTarget {\r\n childNodes: SVGElementInstanceList;\r\n correspondingElement: SVGElement;\r\n correspondingUseElement: SVGUseElement;\r\n firstChild: SVGElementInstance;\r\n lastChild: SVGElementInstance;\r\n nextSibling: SVGElementInstance;\r\n parentNode: SVGElementInstance;\r\n previousSibling: SVGElementInstance;\r\n}\r\n\r\ndeclare var SVGElementInstance: {\r\n prototype: SVGElementInstance;\r\n new(): SVGElementInstance;\r\n}\r\n\r\ninterface SVGElementInstanceList {\r\n length: number;\r\n item(index: number): SVGElementInstance;\r\n}\r\n\r\ndeclare var SVGElementInstanceList: {\r\n prototype: SVGElementInstanceList;\r\n new(): SVGElementInstanceList;\r\n}\r\n\r\ninterface SVGEllipseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n cx: SVGAnimatedLength;\r\n cy: SVGAnimatedLength;\r\n rx: SVGAnimatedLength;\r\n ry: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGEllipseElement: {\r\n prototype: SVGEllipseElement;\r\n new(): SVGEllipseElement;\r\n}\r\n\r\ninterface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n in2: SVGAnimatedString;\r\n mode: SVGAnimatedEnumeration;\r\n SVG_FEBLEND_MODE_COLOR: number;\r\n SVG_FEBLEND_MODE_COLOR_BURN: number;\r\n SVG_FEBLEND_MODE_COLOR_DODGE: number;\r\n SVG_FEBLEND_MODE_DARKEN: number;\r\n SVG_FEBLEND_MODE_DIFFERENCE: number;\r\n SVG_FEBLEND_MODE_EXCLUSION: number;\r\n SVG_FEBLEND_MODE_HARD_LIGHT: number;\r\n SVG_FEBLEND_MODE_HUE: number;\r\n SVG_FEBLEND_MODE_LIGHTEN: number;\r\n SVG_FEBLEND_MODE_LUMINOSITY: number;\r\n SVG_FEBLEND_MODE_MULTIPLY: number;\r\n SVG_FEBLEND_MODE_NORMAL: number;\r\n SVG_FEBLEND_MODE_OVERLAY: number;\r\n SVG_FEBLEND_MODE_SATURATION: number;\r\n SVG_FEBLEND_MODE_SCREEN: number;\r\n SVG_FEBLEND_MODE_SOFT_LIGHT: number;\r\n SVG_FEBLEND_MODE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEBlendElement: {\r\n prototype: SVGFEBlendElement;\r\n new(): SVGFEBlendElement;\r\n SVG_FEBLEND_MODE_COLOR: number;\r\n SVG_FEBLEND_MODE_COLOR_BURN: number;\r\n SVG_FEBLEND_MODE_COLOR_DODGE: number;\r\n SVG_FEBLEND_MODE_DARKEN: number;\r\n SVG_FEBLEND_MODE_DIFFERENCE: number;\r\n SVG_FEBLEND_MODE_EXCLUSION: number;\r\n SVG_FEBLEND_MODE_HARD_LIGHT: number;\r\n SVG_FEBLEND_MODE_HUE: number;\r\n SVG_FEBLEND_MODE_LIGHTEN: number;\r\n SVG_FEBLEND_MODE_LUMINOSITY: number;\r\n SVG_FEBLEND_MODE_MULTIPLY: number;\r\n SVG_FEBLEND_MODE_NORMAL: number;\r\n SVG_FEBLEND_MODE_OVERLAY: number;\r\n SVG_FEBLEND_MODE_SATURATION: number;\r\n SVG_FEBLEND_MODE_SCREEN: number;\r\n SVG_FEBLEND_MODE_SOFT_LIGHT: number;\r\n SVG_FEBLEND_MODE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n type: SVGAnimatedEnumeration;\r\n values: SVGAnimatedNumberList;\r\n SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;\r\n SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;\r\n SVG_FECOLORMATRIX_TYPE_MATRIX: number;\r\n SVG_FECOLORMATRIX_TYPE_SATURATE: number;\r\n SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEColorMatrixElement: {\r\n prototype: SVGFEColorMatrixElement;\r\n new(): SVGFEColorMatrixElement;\r\n SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;\r\n SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;\r\n SVG_FECOLORMATRIX_TYPE_MATRIX: number;\r\n SVG_FECOLORMATRIX_TYPE_SATURATE: number;\r\n SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEComponentTransferElement: {\r\n prototype: SVGFEComponentTransferElement;\r\n new(): SVGFEComponentTransferElement;\r\n}\r\n\r\ninterface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n in2: SVGAnimatedString;\r\n k1: SVGAnimatedNumber;\r\n k2: SVGAnimatedNumber;\r\n k3: SVGAnimatedNumber;\r\n k4: SVGAnimatedNumber;\r\n operator: SVGAnimatedEnumeration;\r\n SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;\r\n SVG_FECOMPOSITE_OPERATOR_ATOP: number;\r\n SVG_FECOMPOSITE_OPERATOR_IN: number;\r\n SVG_FECOMPOSITE_OPERATOR_OUT: number;\r\n SVG_FECOMPOSITE_OPERATOR_OVER: number;\r\n SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;\r\n SVG_FECOMPOSITE_OPERATOR_XOR: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFECompositeElement: {\r\n prototype: SVGFECompositeElement;\r\n new(): SVGFECompositeElement;\r\n SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;\r\n SVG_FECOMPOSITE_OPERATOR_ATOP: number;\r\n SVG_FECOMPOSITE_OPERATOR_IN: number;\r\n SVG_FECOMPOSITE_OPERATOR_OUT: number;\r\n SVG_FECOMPOSITE_OPERATOR_OVER: number;\r\n SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;\r\n SVG_FECOMPOSITE_OPERATOR_XOR: number;\r\n}\r\n\r\ninterface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n bias: SVGAnimatedNumber;\r\n divisor: SVGAnimatedNumber;\r\n edgeMode: SVGAnimatedEnumeration;\r\n in1: SVGAnimatedString;\r\n kernelMatrix: SVGAnimatedNumberList;\r\n kernelUnitLengthX: SVGAnimatedNumber;\r\n kernelUnitLengthY: SVGAnimatedNumber;\r\n orderX: SVGAnimatedInteger;\r\n orderY: SVGAnimatedInteger;\r\n preserveAlpha: SVGAnimatedBoolean;\r\n targetX: SVGAnimatedInteger;\r\n targetY: SVGAnimatedInteger;\r\n SVG_EDGEMODE_DUPLICATE: number;\r\n SVG_EDGEMODE_NONE: number;\r\n SVG_EDGEMODE_UNKNOWN: number;\r\n SVG_EDGEMODE_WRAP: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEConvolveMatrixElement: {\r\n prototype: SVGFEConvolveMatrixElement;\r\n new(): SVGFEConvolveMatrixElement;\r\n SVG_EDGEMODE_DUPLICATE: number;\r\n SVG_EDGEMODE_NONE: number;\r\n SVG_EDGEMODE_UNKNOWN: number;\r\n SVG_EDGEMODE_WRAP: number;\r\n}\r\n\r\ninterface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n diffuseConstant: SVGAnimatedNumber;\r\n in1: SVGAnimatedString;\r\n kernelUnitLengthX: SVGAnimatedNumber;\r\n kernelUnitLengthY: SVGAnimatedNumber;\r\n surfaceScale: SVGAnimatedNumber;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEDiffuseLightingElement: {\r\n prototype: SVGFEDiffuseLightingElement;\r\n new(): SVGFEDiffuseLightingElement;\r\n}\r\n\r\ninterface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n in2: SVGAnimatedString;\r\n scale: SVGAnimatedNumber;\r\n xChannelSelector: SVGAnimatedEnumeration;\r\n yChannelSelector: SVGAnimatedEnumeration;\r\n SVG_CHANNEL_A: number;\r\n SVG_CHANNEL_B: number;\r\n SVG_CHANNEL_G: number;\r\n SVG_CHANNEL_R: number;\r\n SVG_CHANNEL_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEDisplacementMapElement: {\r\n prototype: SVGFEDisplacementMapElement;\r\n new(): SVGFEDisplacementMapElement;\r\n SVG_CHANNEL_A: number;\r\n SVG_CHANNEL_B: number;\r\n SVG_CHANNEL_G: number;\r\n SVG_CHANNEL_R: number;\r\n SVG_CHANNEL_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEDistantLightElement extends SVGElement {\r\n azimuth: SVGAnimatedNumber;\r\n elevation: SVGAnimatedNumber;\r\n}\r\n\r\ndeclare var SVGFEDistantLightElement: {\r\n prototype: SVGFEDistantLightElement;\r\n new(): SVGFEDistantLightElement;\r\n}\r\n\r\ninterface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEFloodElement: {\r\n prototype: SVGFEFloodElement;\r\n new(): SVGFEFloodElement;\r\n}\r\n\r\ninterface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncAElement: {\r\n prototype: SVGFEFuncAElement;\r\n new(): SVGFEFuncAElement;\r\n}\r\n\r\ninterface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncBElement: {\r\n prototype: SVGFEFuncBElement;\r\n new(): SVGFEFuncBElement;\r\n}\r\n\r\ninterface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncGElement: {\r\n prototype: SVGFEFuncGElement;\r\n new(): SVGFEFuncGElement;\r\n}\r\n\r\ninterface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncRElement: {\r\n prototype: SVGFEFuncRElement;\r\n new(): SVGFEFuncRElement;\r\n}\r\n\r\ninterface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n stdDeviationX: SVGAnimatedNumber;\r\n stdDeviationY: SVGAnimatedNumber;\r\n setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEGaussianBlurElement: {\r\n prototype: SVGFEGaussianBlurElement;\r\n new(): SVGFEGaussianBlurElement;\r\n}\r\n\r\ninterface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {\r\n preserveAspectRatio: SVGAnimatedPreserveAspectRatio;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEImageElement: {\r\n prototype: SVGFEImageElement;\r\n new(): SVGFEImageElement;\r\n}\r\n\r\ninterface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEMergeElement: {\r\n prototype: SVGFEMergeElement;\r\n new(): SVGFEMergeElement;\r\n}\r\n\r\ninterface SVGFEMergeNodeElement extends SVGElement {\r\n in1: SVGAnimatedString;\r\n}\r\n\r\ndeclare var SVGFEMergeNodeElement: {\r\n prototype: SVGFEMergeNodeElement;\r\n new(): SVGFEMergeNodeElement;\r\n}\r\n\r\ninterface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n operator: SVGAnimatedEnumeration;\r\n radiusX: SVGAnimatedNumber;\r\n radiusY: SVGAnimatedNumber;\r\n SVG_MORPHOLOGY_OPERATOR_DILATE: number;\r\n SVG_MORPHOLOGY_OPERATOR_ERODE: number;\r\n SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEMorphologyElement: {\r\n prototype: SVGFEMorphologyElement;\r\n new(): SVGFEMorphologyElement;\r\n SVG_MORPHOLOGY_OPERATOR_DILATE: number;\r\n SVG_MORPHOLOGY_OPERATOR_ERODE: number;\r\n SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n dx: SVGAnimatedNumber;\r\n dy: SVGAnimatedNumber;\r\n in1: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEOffsetElement: {\r\n prototype: SVGFEOffsetElement;\r\n new(): SVGFEOffsetElement;\r\n}\r\n\r\ninterface SVGFEPointLightElement extends SVGElement {\r\n x: SVGAnimatedNumber;\r\n y: SVGAnimatedNumber;\r\n z: SVGAnimatedNumber;\r\n}\r\n\r\ndeclare var SVGFEPointLightElement: {\r\n prototype: SVGFEPointLightElement;\r\n new(): SVGFEPointLightElement;\r\n}\r\n\r\ninterface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n kernelUnitLengthX: SVGAnimatedNumber;\r\n kernelUnitLengthY: SVGAnimatedNumber;\r\n specularConstant: SVGAnimatedNumber;\r\n specularExponent: SVGAnimatedNumber;\r\n surfaceScale: SVGAnimatedNumber;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFESpecularLightingElement: {\r\n prototype: SVGFESpecularLightingElement;\r\n new(): SVGFESpecularLightingElement;\r\n}\r\n\r\ninterface SVGFESpotLightElement extends SVGElement {\r\n limitingConeAngle: SVGAnimatedNumber;\r\n pointsAtX: SVGAnimatedNumber;\r\n pointsAtY: SVGAnimatedNumber;\r\n pointsAtZ: SVGAnimatedNumber;\r\n specularExponent: SVGAnimatedNumber;\r\n x: SVGAnimatedNumber;\r\n y: SVGAnimatedNumber;\r\n z: SVGAnimatedNumber;\r\n}\r\n\r\ndeclare var SVGFESpotLightElement: {\r\n prototype: SVGFESpotLightElement;\r\n new(): SVGFESpotLightElement;\r\n}\r\n\r\ninterface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFETileElement: {\r\n prototype: SVGFETileElement;\r\n new(): SVGFETileElement;\r\n}\r\n\r\ninterface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n baseFrequencyX: SVGAnimatedNumber;\r\n baseFrequencyY: SVGAnimatedNumber;\r\n numOctaves: SVGAnimatedInteger;\r\n seed: SVGAnimatedNumber;\r\n stitchTiles: SVGAnimatedEnumeration;\r\n type: SVGAnimatedEnumeration;\r\n SVG_STITCHTYPE_NOSTITCH: number;\r\n SVG_STITCHTYPE_STITCH: number;\r\n SVG_STITCHTYPE_UNKNOWN: number;\r\n SVG_TURBULENCE_TYPE_FRACTALNOISE: number;\r\n SVG_TURBULENCE_TYPE_TURBULENCE: number;\r\n SVG_TURBULENCE_TYPE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFETurbulenceElement: {\r\n prototype: SVGFETurbulenceElement;\r\n new(): SVGFETurbulenceElement;\r\n SVG_STITCHTYPE_NOSTITCH: number;\r\n SVG_STITCHTYPE_STITCH: number;\r\n SVG_STITCHTYPE_UNKNOWN: number;\r\n SVG_TURBULENCE_TYPE_FRACTALNOISE: number;\r\n SVG_TURBULENCE_TYPE_TURBULENCE: number;\r\n SVG_TURBULENCE_TYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {\r\n filterResX: SVGAnimatedInteger;\r\n filterResY: SVGAnimatedInteger;\r\n filterUnits: SVGAnimatedEnumeration;\r\n height: SVGAnimatedLength;\r\n primitiveUnits: SVGAnimatedEnumeration;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n setFilterRes(filterResX: number, filterResY: number): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFilterElement: {\r\n prototype: SVGFilterElement;\r\n new(): SVGFilterElement;\r\n}\r\n\r\ninterface SVGForeignObjectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n height: SVGAnimatedLength;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGForeignObjectElement: {\r\n prototype: SVGForeignObjectElement;\r\n new(): SVGForeignObjectElement;\r\n}\r\n\r\ninterface SVGGElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGGElement: {\r\n prototype: SVGGElement;\r\n new(): SVGGElement;\r\n}\r\n\r\ninterface SVGGradientElement extends SVGElement, SVGStylable, SVGExternalResourcesRequired, SVGURIReference, SVGUnitTypes {\r\n gradientTransform: SVGAnimatedTransformList;\r\n gradientUnits: SVGAnimatedEnumeration;\r\n spreadMethod: SVGAnimatedEnumeration;\r\n SVG_SPREADMETHOD_PAD: number;\r\n SVG_SPREADMETHOD_REFLECT: number;\r\n SVG_SPREADMETHOD_REPEAT: number;\r\n SVG_SPREADMETHOD_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGGradientElement: {\r\n prototype: SVGGradientElement;\r\n new(): SVGGradientElement;\r\n SVG_SPREADMETHOD_PAD: number;\r\n SVG_SPREADMETHOD_REFLECT: number;\r\n SVG_SPREADMETHOD_REPEAT: number;\r\n SVG_SPREADMETHOD_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGImageElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {\r\n height: SVGAnimatedLength;\r\n preserveAspectRatio: SVGAnimatedPreserveAspectRatio;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGImageElement: {\r\n prototype: SVGImageElement;\r\n new(): SVGImageElement;\r\n}\r\n\r\ninterface SVGLength {\r\n unitType: number;\r\n value: number;\r\n valueAsString: string;\r\n valueInSpecifiedUnits: number;\r\n convertToSpecifiedUnits(unitType: number): void;\r\n newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;\r\n SVG_LENGTHTYPE_CM: number;\r\n SVG_LENGTHTYPE_EMS: number;\r\n SVG_LENGTHTYPE_EXS: number;\r\n SVG_LENGTHTYPE_IN: number;\r\n SVG_LENGTHTYPE_MM: number;\r\n SVG_LENGTHTYPE_NUMBER: number;\r\n SVG_LENGTHTYPE_PC: number;\r\n SVG_LENGTHTYPE_PERCENTAGE: number;\r\n SVG_LENGTHTYPE_PT: number;\r\n SVG_LENGTHTYPE_PX: number;\r\n SVG_LENGTHTYPE_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGLength: {\r\n prototype: SVGLength;\r\n new(): SVGLength;\r\n SVG_LENGTHTYPE_CM: number;\r\n SVG_LENGTHTYPE_EMS: number;\r\n SVG_LENGTHTYPE_EXS: number;\r\n SVG_LENGTHTYPE_IN: number;\r\n SVG_LENGTHTYPE_MM: number;\r\n SVG_LENGTHTYPE_NUMBER: number;\r\n SVG_LENGTHTYPE_PC: number;\r\n SVG_LENGTHTYPE_PERCENTAGE: number;\r\n SVG_LENGTHTYPE_PT: number;\r\n SVG_LENGTHTYPE_PX: number;\r\n SVG_LENGTHTYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGLengthList {\r\n numberOfItems: number;\r\n appendItem(newItem: SVGLength): SVGLength;\r\n clear(): void;\r\n getItem(index: number): SVGLength;\r\n initialize(newItem: SVGLength): SVGLength;\r\n insertItemBefore(newItem: SVGLength, index: number): SVGLength;\r\n removeItem(index: number): SVGLength;\r\n replaceItem(newItem: SVGLength, index: number): SVGLength;\r\n}\r\n\r\ndeclare var SVGLengthList: {\r\n prototype: SVGLengthList;\r\n new(): SVGLengthList;\r\n}\r\n\r\ninterface SVGLineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n x1: SVGAnimatedLength;\r\n x2: SVGAnimatedLength;\r\n y1: SVGAnimatedLength;\r\n y2: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGLineElement: {\r\n prototype: SVGLineElement;\r\n new(): SVGLineElement;\r\n}\r\n\r\ninterface SVGLinearGradientElement extends SVGGradientElement {\r\n x1: SVGAnimatedLength;\r\n x2: SVGAnimatedLength;\r\n y1: SVGAnimatedLength;\r\n y2: SVGAnimatedLength;\r\n}\r\n\r\ndeclare var SVGLinearGradientElement: {\r\n prototype: SVGLinearGradientElement;\r\n new(): SVGLinearGradientElement;\r\n}\r\n\r\ninterface SVGMarkerElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {\r\n markerHeight: SVGAnimatedLength;\r\n markerUnits: SVGAnimatedEnumeration;\r\n markerWidth: SVGAnimatedLength;\r\n orientAngle: SVGAnimatedAngle;\r\n orientType: SVGAnimatedEnumeration;\r\n refX: SVGAnimatedLength;\r\n refY: SVGAnimatedLength;\r\n setOrientToAngle(angle: SVGAngle): void;\r\n setOrientToAuto(): void;\r\n SVG_MARKERUNITS_STROKEWIDTH: number;\r\n SVG_MARKERUNITS_UNKNOWN: number;\r\n SVG_MARKERUNITS_USERSPACEONUSE: number;\r\n SVG_MARKER_ORIENT_ANGLE: number;\r\n SVG_MARKER_ORIENT_AUTO: number;\r\n SVG_MARKER_ORIENT_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGMarkerElement: {\r\n prototype: SVGMarkerElement;\r\n new(): SVGMarkerElement;\r\n SVG_MARKERUNITS_STROKEWIDTH: number;\r\n SVG_MARKERUNITS_UNKNOWN: number;\r\n SVG_MARKERUNITS_USERSPACEONUSE: number;\r\n SVG_MARKER_ORIENT_ANGLE: number;\r\n SVG_MARKER_ORIENT_AUTO: number;\r\n SVG_MARKER_ORIENT_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGMaskElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {\r\n height: SVGAnimatedLength;\r\n maskContentUnits: SVGAnimatedEnumeration;\r\n maskUnits: SVGAnimatedEnumeration;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGMaskElement: {\r\n prototype: SVGMaskElement;\r\n new(): SVGMaskElement;\r\n}\r\n\r\ninterface SVGMatrix {\r\n a: number;\r\n b: number;\r\n c: number;\r\n d: number;\r\n e: number;\r\n f: number;\r\n flipX(): SVGMatrix;\r\n flipY(): SVGMatrix;\r\n inverse(): SVGMatrix;\r\n multiply(secondMatrix: SVGMatrix): SVGMatrix;\r\n rotate(angle: number): SVGMatrix;\r\n rotateFromVector(x: number, y: number): SVGMatrix;\r\n scale(scaleFactor: number): SVGMatrix;\r\n scaleNonUniform(scaleFactorX: number, scaleFactorY: number): SVGMatrix;\r\n skewX(angle: number): SVGMatrix;\r\n skewY(angle: number): SVGMatrix;\r\n translate(x: number, y: number): SVGMatrix;\r\n}\r\n\r\ndeclare var SVGMatrix: {\r\n prototype: SVGMatrix;\r\n new(): SVGMatrix;\r\n}\r\n\r\ninterface SVGMetadataElement extends SVGElement {\r\n}\r\n\r\ndeclare var SVGMetadataElement: {\r\n prototype: SVGMetadataElement;\r\n new(): SVGMetadataElement;\r\n}\r\n\r\ninterface SVGNumber {\r\n value: number;\r\n}\r\n\r\ndeclare var SVGNumber: {\r\n prototype: SVGNumber;\r\n new(): SVGNumber;\r\n}\r\n\r\ninterface SVGNumberList {\r\n numberOfItems: number;\r\n appendItem(newItem: SVGNumber): SVGNumber;\r\n clear(): void;\r\n getItem(index: number): SVGNumber;\r\n initialize(newItem: SVGNumber): SVGNumber;\r\n insertItemBefore(newItem: SVGNumber, index: number): SVGNumber;\r\n removeItem(index: number): SVGNumber;\r\n replaceItem(newItem: SVGNumber, index: number): SVGNumber;\r\n}\r\n\r\ndeclare var SVGNumberList: {\r\n prototype: SVGNumberList;\r\n new(): SVGNumberList;\r\n}\r\n\r\ninterface SVGPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPathData {\r\n createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs;\r\n createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel;\r\n createSVGPathSegClosePath(): SVGPathSegClosePath;\r\n createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs;\r\n createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel;\r\n createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs;\r\n createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel;\r\n createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs;\r\n createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel;\r\n createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs;\r\n createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel;\r\n createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs;\r\n createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs;\r\n createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel;\r\n createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel;\r\n createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs;\r\n createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel;\r\n createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs;\r\n createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel;\r\n getPathSegAtLength(distance: number): number;\r\n getPointAtLength(distance: number): SVGPoint;\r\n getTotalLength(): number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPathElement: {\r\n prototype: SVGPathElement;\r\n new(): SVGPathElement;\r\n}\r\n\r\ninterface SVGPathSeg {\r\n pathSegType: number;\r\n pathSegTypeAsLetter: string;\r\n PATHSEG_ARC_ABS: number;\r\n PATHSEG_ARC_REL: number;\r\n PATHSEG_CLOSEPATH: number;\r\n PATHSEG_CURVETO_CUBIC_ABS: number;\r\n PATHSEG_CURVETO_CUBIC_REL: number;\r\n PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;\r\n PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;\r\n PATHSEG_CURVETO_QUADRATIC_ABS: number;\r\n PATHSEG_CURVETO_QUADRATIC_REL: number;\r\n PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;\r\n PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;\r\n PATHSEG_LINETO_ABS: number;\r\n PATHSEG_LINETO_HORIZONTAL_ABS: number;\r\n PATHSEG_LINETO_HORIZONTAL_REL: number;\r\n PATHSEG_LINETO_REL: number;\r\n PATHSEG_LINETO_VERTICAL_ABS: number;\r\n PATHSEG_LINETO_VERTICAL_REL: number;\r\n PATHSEG_MOVETO_ABS: number;\r\n PATHSEG_MOVETO_REL: number;\r\n PATHSEG_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGPathSeg: {\r\n prototype: SVGPathSeg;\r\n new(): SVGPathSeg;\r\n PATHSEG_ARC_ABS: number;\r\n PATHSEG_ARC_REL: number;\r\n PATHSEG_CLOSEPATH: number;\r\n PATHSEG_CURVETO_CUBIC_ABS: number;\r\n PATHSEG_CURVETO_CUBIC_REL: number;\r\n PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;\r\n PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;\r\n PATHSEG_CURVETO_QUADRATIC_ABS: number;\r\n PATHSEG_CURVETO_QUADRATIC_REL: number;\r\n PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;\r\n PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;\r\n PATHSEG_LINETO_ABS: number;\r\n PATHSEG_LINETO_HORIZONTAL_ABS: number;\r\n PATHSEG_LINETO_HORIZONTAL_REL: number;\r\n PATHSEG_LINETO_REL: number;\r\n PATHSEG_LINETO_VERTICAL_ABS: number;\r\n PATHSEG_LINETO_VERTICAL_REL: number;\r\n PATHSEG_MOVETO_ABS: number;\r\n PATHSEG_MOVETO_REL: number;\r\n PATHSEG_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGPathSegArcAbs extends SVGPathSeg {\r\n angle: number;\r\n largeArcFlag: boolean;\r\n r1: number;\r\n r2: number;\r\n sweepFlag: boolean;\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegArcAbs: {\r\n prototype: SVGPathSegArcAbs;\r\n new(): SVGPathSegArcAbs;\r\n}\r\n\r\ninterface SVGPathSegArcRel extends SVGPathSeg {\r\n angle: number;\r\n largeArcFlag: boolean;\r\n r1: number;\r\n r2: number;\r\n sweepFlag: boolean;\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegArcRel: {\r\n prototype: SVGPathSegArcRel;\r\n new(): SVGPathSegArcRel;\r\n}\r\n\r\ninterface SVGPathSegClosePath extends SVGPathSeg {\r\n}\r\n\r\ndeclare var SVGPathSegClosePath: {\r\n prototype: SVGPathSegClosePath;\r\n new(): SVGPathSegClosePath;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n x2: number;\r\n y: number;\r\n y1: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicAbs: {\r\n prototype: SVGPathSegCurvetoCubicAbs;\r\n new(): SVGPathSegCurvetoCubicAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicRel extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n x2: number;\r\n y: number;\r\n y1: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicRel: {\r\n prototype: SVGPathSegCurvetoCubicRel;\r\n new(): SVGPathSegCurvetoCubicRel;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {\r\n x: number;\r\n x2: number;\r\n y: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicSmoothAbs: {\r\n prototype: SVGPathSegCurvetoCubicSmoothAbs;\r\n new(): SVGPathSegCurvetoCubicSmoothAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {\r\n x: number;\r\n x2: number;\r\n y: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicSmoothRel: {\r\n prototype: SVGPathSegCurvetoCubicSmoothRel;\r\n new(): SVGPathSegCurvetoCubicSmoothRel;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n y: number;\r\n y1: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticAbs: {\r\n prototype: SVGPathSegCurvetoQuadraticAbs;\r\n new(): SVGPathSegCurvetoQuadraticAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n y: number;\r\n y1: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticRel: {\r\n prototype: SVGPathSegCurvetoQuadraticRel;\r\n new(): SVGPathSegCurvetoQuadraticRel;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticSmoothAbs: {\r\n prototype: SVGPathSegCurvetoQuadraticSmoothAbs;\r\n new(): SVGPathSegCurvetoQuadraticSmoothAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticSmoothRel: {\r\n prototype: SVGPathSegCurvetoQuadraticSmoothRel;\r\n new(): SVGPathSegCurvetoQuadraticSmoothRel;\r\n}\r\n\r\ninterface SVGPathSegLinetoAbs extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoAbs: {\r\n prototype: SVGPathSegLinetoAbs;\r\n new(): SVGPathSegLinetoAbs;\r\n}\r\n\r\ninterface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {\r\n x: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoHorizontalAbs: {\r\n prototype: SVGPathSegLinetoHorizontalAbs;\r\n new(): SVGPathSegLinetoHorizontalAbs;\r\n}\r\n\r\ninterface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {\r\n x: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoHorizontalRel: {\r\n prototype: SVGPathSegLinetoHorizontalRel;\r\n new(): SVGPathSegLinetoHorizontalRel;\r\n}\r\n\r\ninterface SVGPathSegLinetoRel extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoRel: {\r\n prototype: SVGPathSegLinetoRel;\r\n new(): SVGPathSegLinetoRel;\r\n}\r\n\r\ninterface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoVerticalAbs: {\r\n prototype: SVGPathSegLinetoVerticalAbs;\r\n new(): SVGPathSegLinetoVerticalAbs;\r\n}\r\n\r\ninterface SVGPathSegLinetoVerticalRel extends SVGPathSeg {\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoVerticalRel: {\r\n prototype: SVGPathSegLinetoVerticalRel;\r\n new(): SVGPathSegLinetoVerticalRel;\r\n}\r\n\r\ninterface SVGPathSegList {\r\n numberOfItems: number;\r\n appendItem(newItem: SVGPathSeg): SVGPathSeg;\r\n clear(): void;\r\n getItem(index: number): SVGPathSeg;\r\n initialize(newItem: SVGPathSeg): SVGPathSeg;\r\n insertItemBefore(newItem: SVGPathSeg, index: number): SVGPathSeg;\r\n removeItem(index: number): SVGPathSeg;\r\n replaceItem(newItem: SVGPathSeg, index: number): SVGPathSeg;\r\n}\r\n\r\ndeclare var SVGPathSegList: {\r\n prototype: SVGPathSegList;\r\n new(): SVGPathSegList;\r\n}\r\n\r\ninterface SVGPathSegMovetoAbs extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegMovetoAbs: {\r\n prototype: SVGPathSegMovetoAbs;\r\n new(): SVGPathSegMovetoAbs;\r\n}\r\n\r\ninterface SVGPathSegMovetoRel extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegMovetoRel: {\r\n prototype: SVGPathSegMovetoRel;\r\n new(): SVGPathSegMovetoRel;\r\n}\r\n\r\ninterface SVGPatternElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGURIReference, SVGUnitTypes {\r\n height: SVGAnimatedLength;\r\n patternContentUnits: SVGAnimatedEnumeration;\r\n patternTransform: SVGAnimatedTransformList;\r\n patternUnits: SVGAnimatedEnumeration;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPatternElement: {\r\n prototype: SVGPatternElement;\r\n new(): SVGPatternElement;\r\n}\r\n\r\ninterface SVGPoint {\r\n x: number;\r\n y: number;\r\n matrixTransform(matrix: SVGMatrix): SVGPoint;\r\n}\r\n\r\ndeclare var SVGPoint: {\r\n prototype: SVGPoint;\r\n new(): SVGPoint;\r\n}\r\n\r\ninterface SVGPointList {\r\n numberOfItems: number;\r\n appendItem(newItem: SVGPoint): SVGPoint;\r\n clear(): void;\r\n getItem(index: number): SVGPoint;\r\n initialize(newItem: SVGPoint): SVGPoint;\r\n insertItemBefore(newItem: SVGPoint, index: number): SVGPoint;\r\n removeItem(index: number): SVGPoint;\r\n replaceItem(newItem: SVGPoint, index: number): SVGPoint;\r\n}\r\n\r\ndeclare var SVGPointList: {\r\n prototype: SVGPointList;\r\n new(): SVGPointList;\r\n}\r\n\r\ninterface SVGPolygonElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPolygonElement: {\r\n prototype: SVGPolygonElement;\r\n new(): SVGPolygonElement;\r\n}\r\n\r\ninterface SVGPolylineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPolylineElement: {\r\n prototype: SVGPolylineElement;\r\n new(): SVGPolylineElement;\r\n}\r\n\r\ninterface SVGPreserveAspectRatio {\r\n align: number;\r\n meetOrSlice: number;\r\n SVG_MEETORSLICE_MEET: number;\r\n SVG_MEETORSLICE_SLICE: number;\r\n SVG_MEETORSLICE_UNKNOWN: number;\r\n SVG_PRESERVEASPECTRATIO_NONE: number;\r\n SVG_PRESERVEASPECTRATIO_UNKNOWN: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMIN: number;\r\n}\r\n\r\ndeclare var SVGPreserveAspectRatio: {\r\n prototype: SVGPreserveAspectRatio;\r\n new(): SVGPreserveAspectRatio;\r\n SVG_MEETORSLICE_MEET: number;\r\n SVG_MEETORSLICE_SLICE: number;\r\n SVG_MEETORSLICE_UNKNOWN: number;\r\n SVG_PRESERVEASPECTRATIO_NONE: number;\r\n SVG_PRESERVEASPECTRATIO_UNKNOWN: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMIN: number;\r\n}\r\n\r\ninterface SVGRadialGradientElement extends SVGGradientElement {\r\n cx: SVGAnimatedLength;\r\n cy: SVGAnimatedLength;\r\n fx: SVGAnimatedLength;\r\n fy: SVGAnimatedLength;\r\n r: SVGAnimatedLength;\r\n}\r\n\r\ndeclare var SVGRadialGradientElement: {\r\n prototype: SVGRadialGradientElement;\r\n new(): SVGRadialGradientElement;\r\n}\r\n\r\ninterface SVGRect {\r\n height: number;\r\n width: number;\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGRect: {\r\n prototype: SVGRect;\r\n new(): SVGRect;\r\n}\r\n\r\ninterface SVGRectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n height: SVGAnimatedLength;\r\n rx: SVGAnimatedLength;\r\n ry: SVGAnimatedLength;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGRectElement: {\r\n prototype: SVGRectElement;\r\n new(): SVGRectElement;\r\n}\r\n\r\ninterface SVGSVGElement extends SVGElement, DocumentEvent, SVGLocatable, SVGTests, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {\r\n contentScriptType: string;\r\n contentStyleType: string;\r\n currentScale: number;\r\n currentTranslate: SVGPoint;\r\n height: SVGAnimatedLength;\r\n onabort: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n onresize: (ev: UIEvent) => any;\r\n onscroll: (ev: UIEvent) => any;\r\n onunload: (ev: Event) => any;\r\n onzoom: (ev: SVGZoomEvent) => any;\r\n pixelUnitToMillimeterX: number;\r\n pixelUnitToMillimeterY: number;\r\n screenPixelToMillimeterX: number;\r\n screenPixelToMillimeterY: number;\r\n viewport: SVGRect;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n checkEnclosure(element: SVGElement, rect: SVGRect): boolean;\r\n checkIntersection(element: SVGElement, rect: SVGRect): boolean;\r\n createSVGAngle(): SVGAngle;\r\n createSVGLength(): SVGLength;\r\n createSVGMatrix(): SVGMatrix;\r\n createSVGNumber(): SVGNumber;\r\n createSVGPoint(): SVGPoint;\r\n createSVGRect(): SVGRect;\r\n createSVGTransform(): SVGTransform;\r\n createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;\r\n deselectAll(): void;\r\n forceRedraw(): void;\r\n getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;\r\n getCurrentTime(): number;\r\n getElementById(elementId: string): Element;\r\n getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeList;\r\n getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeList;\r\n pauseAnimations(): void;\r\n setCurrentTime(seconds: number): void;\r\n suspendRedraw(maxWaitMilliseconds: number): number;\r\n unpauseAnimations(): void;\r\n unsuspendRedraw(suspendHandleID: number): void;\r\n unsuspendRedrawAll(): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGAbort\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGError\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGUnload\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGZoom\", listener: (ev: SVGZoomEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusin\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusout\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGSVGElement: {\r\n prototype: SVGSVGElement;\r\n new(): SVGSVGElement;\r\n}\r\n\r\ninterface SVGScriptElement extends SVGElement, SVGExternalResourcesRequired, SVGURIReference {\r\n type: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGScriptElement: {\r\n prototype: SVGScriptElement;\r\n new(): SVGScriptElement;\r\n}\r\n\r\ninterface SVGStopElement extends SVGElement, SVGStylable {\r\n offset: SVGAnimatedNumber;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGStopElement: {\r\n prototype: SVGStopElement;\r\n new(): SVGStopElement;\r\n}\r\n\r\ninterface SVGStringList {\r\n numberOfItems: number;\r\n appendItem(newItem: string): string;\r\n clear(): void;\r\n getItem(index: number): string;\r\n initialize(newItem: string): string;\r\n insertItemBefore(newItem: string, index: number): string;\r\n removeItem(index: number): string;\r\n replaceItem(newItem: string, index: number): string;\r\n}\r\n\r\ndeclare var SVGStringList: {\r\n prototype: SVGStringList;\r\n new(): SVGStringList;\r\n}\r\n\r\ninterface SVGStyleElement extends SVGElement, SVGLangSpace {\r\n media: string;\r\n title: string;\r\n type: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGStyleElement: {\r\n prototype: SVGStyleElement;\r\n new(): SVGStyleElement;\r\n}\r\n\r\ninterface SVGSwitchElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGSwitchElement: {\r\n prototype: SVGSwitchElement;\r\n new(): SVGSwitchElement;\r\n}\r\n\r\ninterface SVGSymbolElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGSymbolElement: {\r\n prototype: SVGSymbolElement;\r\n new(): SVGSymbolElement;\r\n}\r\n\r\ninterface SVGTSpanElement extends SVGTextPositioningElement {\r\n}\r\n\r\ndeclare var SVGTSpanElement: {\r\n prototype: SVGTSpanElement;\r\n new(): SVGTSpanElement;\r\n}\r\n\r\ninterface SVGTextContentElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n lengthAdjust: SVGAnimatedEnumeration;\r\n textLength: SVGAnimatedLength;\r\n getCharNumAtPosition(point: SVGPoint): number;\r\n getComputedTextLength(): number;\r\n getEndPositionOfChar(charnum: number): SVGPoint;\r\n getExtentOfChar(charnum: number): SVGRect;\r\n getNumberOfChars(): number;\r\n getRotationOfChar(charnum: number): number;\r\n getStartPositionOfChar(charnum: number): SVGPoint;\r\n getSubStringLength(charnum: number, nchars: number): number;\r\n selectSubString(charnum: number, nchars: number): void;\r\n LENGTHADJUST_SPACING: number;\r\n LENGTHADJUST_SPACINGANDGLYPHS: number;\r\n LENGTHADJUST_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTextContentElement: {\r\n prototype: SVGTextContentElement;\r\n new(): SVGTextContentElement;\r\n LENGTHADJUST_SPACING: number;\r\n LENGTHADJUST_SPACINGANDGLYPHS: number;\r\n LENGTHADJUST_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGTextElement extends SVGTextPositioningElement, SVGTransformable {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTextElement: {\r\n prototype: SVGTextElement;\r\n new(): SVGTextElement;\r\n}\r\n\r\ninterface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {\r\n method: SVGAnimatedEnumeration;\r\n spacing: SVGAnimatedEnumeration;\r\n startOffset: SVGAnimatedLength;\r\n TEXTPATH_METHODTYPE_ALIGN: number;\r\n TEXTPATH_METHODTYPE_STRETCH: number;\r\n TEXTPATH_METHODTYPE_UNKNOWN: number;\r\n TEXTPATH_SPACINGTYPE_AUTO: number;\r\n TEXTPATH_SPACINGTYPE_EXACT: number;\r\n TEXTPATH_SPACINGTYPE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTextPathElement: {\r\n prototype: SVGTextPathElement;\r\n new(): SVGTextPathElement;\r\n TEXTPATH_METHODTYPE_ALIGN: number;\r\n TEXTPATH_METHODTYPE_STRETCH: number;\r\n TEXTPATH_METHODTYPE_UNKNOWN: number;\r\n TEXTPATH_SPACINGTYPE_AUTO: number;\r\n TEXTPATH_SPACINGTYPE_EXACT: number;\r\n TEXTPATH_SPACINGTYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGTextPositioningElement extends SVGTextContentElement {\r\n dx: SVGAnimatedLengthList;\r\n dy: SVGAnimatedLengthList;\r\n rotate: SVGAnimatedNumberList;\r\n x: SVGAnimatedLengthList;\r\n y: SVGAnimatedLengthList;\r\n}\r\n\r\ndeclare var SVGTextPositioningElement: {\r\n prototype: SVGTextPositioningElement;\r\n new(): SVGTextPositioningElement;\r\n}\r\n\r\ninterface SVGTitleElement extends SVGElement, SVGStylable, SVGLangSpace {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTitleElement: {\r\n prototype: SVGTitleElement;\r\n new(): SVGTitleElement;\r\n}\r\n\r\ninterface SVGTransform {\r\n angle: number;\r\n matrix: SVGMatrix;\r\n type: number;\r\n setMatrix(matrix: SVGMatrix): void;\r\n setRotate(angle: number, cx: number, cy: number): void;\r\n setScale(sx: number, sy: number): void;\r\n setSkewX(angle: number): void;\r\n setSkewY(angle: number): void;\r\n setTranslate(tx: number, ty: number): void;\r\n SVG_TRANSFORM_MATRIX: number;\r\n SVG_TRANSFORM_ROTATE: number;\r\n SVG_TRANSFORM_SCALE: number;\r\n SVG_TRANSFORM_SKEWX: number;\r\n SVG_TRANSFORM_SKEWY: number;\r\n SVG_TRANSFORM_TRANSLATE: number;\r\n SVG_TRANSFORM_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGTransform: {\r\n prototype: SVGTransform;\r\n new(): SVGTransform;\r\n SVG_TRANSFORM_MATRIX: number;\r\n SVG_TRANSFORM_ROTATE: number;\r\n SVG_TRANSFORM_SCALE: number;\r\n SVG_TRANSFORM_SKEWX: number;\r\n SVG_TRANSFORM_SKEWY: number;\r\n SVG_TRANSFORM_TRANSLATE: number;\r\n SVG_TRANSFORM_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGTransformList {\r\n numberOfItems: number;\r\n appendItem(newItem: SVGTransform): SVGTransform;\r\n clear(): void;\r\n consolidate(): SVGTransform;\r\n createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;\r\n getItem(index: number): SVGTransform;\r\n initialize(newItem: SVGTransform): SVGTransform;\r\n insertItemBefore(newItem: SVGTransform, index: number): SVGTransform;\r\n removeItem(index: number): SVGTransform;\r\n replaceItem(newItem: SVGTransform, index: number): SVGTransform;\r\n}\r\n\r\ndeclare var SVGTransformList: {\r\n prototype: SVGTransformList;\r\n new(): SVGTransformList;\r\n}\r\n\r\ninterface SVGUnitTypes {\r\n SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;\r\n SVG_UNIT_TYPE_UNKNOWN: number;\r\n SVG_UNIT_TYPE_USERSPACEONUSE: number;\r\n}\r\ndeclare var SVGUnitTypes: SVGUnitTypes;\r\n\r\ninterface SVGUseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {\r\n animatedInstanceRoot: SVGElementInstance;\r\n height: SVGAnimatedLength;\r\n instanceRoot: SVGElementInstance;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGUseElement: {\r\n prototype: SVGUseElement;\r\n new(): SVGUseElement;\r\n}\r\n\r\ninterface SVGViewElement extends SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {\r\n viewTarget: SVGStringList;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGViewElement: {\r\n prototype: SVGViewElement;\r\n new(): SVGViewElement;\r\n}\r\n\r\ninterface SVGZoomAndPan {\r\n SVG_ZOOMANDPAN_DISABLE: number;\r\n SVG_ZOOMANDPAN_MAGNIFY: number;\r\n SVG_ZOOMANDPAN_UNKNOWN: number;\r\n}\r\ndeclare var SVGZoomAndPan: SVGZoomAndPan;\r\n\r\ninterface SVGZoomEvent extends UIEvent {\r\n newScale: number;\r\n newTranslate: SVGPoint;\r\n previousScale: number;\r\n previousTranslate: SVGPoint;\r\n zoomRectScreen: SVGRect;\r\n}\r\n\r\ndeclare var SVGZoomEvent: {\r\n prototype: SVGZoomEvent;\r\n new(): SVGZoomEvent;\r\n}\r\n\r\ninterface Screen extends EventTarget {\r\n availHeight: number;\r\n availWidth: number;\r\n bufferDepth: number;\r\n colorDepth: number;\r\n deviceXDPI: number;\r\n deviceYDPI: number;\r\n fontSmoothingEnabled: boolean;\r\n height: number;\r\n logicalXDPI: number;\r\n logicalYDPI: number;\r\n msOrientation: string;\r\n onmsorientationchange: (ev: Event) => any;\r\n pixelDepth: number;\r\n systemXDPI: number;\r\n systemYDPI: number;\r\n width: number;\r\n msLockOrientation(orientations: string | string[]): boolean;\r\n msUnlockOrientation(): void;\r\n addEventListener(type: \"MSOrientationChange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Screen: {\r\n prototype: Screen;\r\n new(): Screen;\r\n}\r\n\r\ninterface ScriptNotifyEvent extends Event {\r\n callingUri: string;\r\n value: string;\r\n}\r\n\r\ndeclare var ScriptNotifyEvent: {\r\n prototype: ScriptNotifyEvent;\r\n new(): ScriptNotifyEvent;\r\n}\r\n\r\ninterface ScriptProcessorNode extends AudioNode {\r\n bufferSize: number;\r\n onaudioprocess: (ev: AudioProcessingEvent) => any;\r\n addEventListener(type: \"audioprocess\", listener: (ev: AudioProcessingEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var ScriptProcessorNode: {\r\n prototype: ScriptProcessorNode;\r\n new(): ScriptProcessorNode;\r\n}\r\n\r\ninterface Selection {\r\n anchorNode: Node;\r\n anchorOffset: number;\r\n focusNode: Node;\r\n focusOffset: number;\r\n isCollapsed: boolean;\r\n rangeCount: number;\r\n type: string;\r\n addRange(range: Range): void;\r\n collapse(parentNode: Node, offset: number): void;\r\n collapseToEnd(): void;\r\n collapseToStart(): void;\r\n containsNode(node: Node, partlyContained: boolean): boolean;\r\n deleteFromDocument(): void;\r\n empty(): void;\r\n extend(newNode: Node, offset: number): void;\r\n getRangeAt(index: number): Range;\r\n removeAllRanges(): void;\r\n removeRange(range: Range): void;\r\n selectAllChildren(parentNode: Node): void;\r\n setBaseAndExtent(baseNode: Node, baseOffset: number, extentNode: Node, extentOffset: number): void;\r\n toString(): string;\r\n}\r\n\r\ndeclare var Selection: {\r\n prototype: Selection;\r\n new(): Selection;\r\n}\r\n\r\ninterface SourceBuffer extends EventTarget {\r\n appendWindowEnd: number;\r\n appendWindowStart: number;\r\n audioTracks: AudioTrackList;\r\n buffered: TimeRanges;\r\n mode: string;\r\n timestampOffset: number;\r\n updating: boolean;\r\n videoTracks: VideoTrackList;\r\n abort(): void;\r\n appendBuffer(data: ArrayBuffer | ArrayBufferView): void;\r\n appendStream(stream: MSStream, maxSize?: number): void;\r\n remove(start: number, end: number): void;\r\n}\r\n\r\ndeclare var SourceBuffer: {\r\n prototype: SourceBuffer;\r\n new(): SourceBuffer;\r\n}\r\n\r\ninterface SourceBufferList extends EventTarget {\r\n length: number;\r\n item(index: number): SourceBuffer;\r\n [index: number]: SourceBuffer;\r\n}\r\n\r\ndeclare var SourceBufferList: {\r\n prototype: SourceBufferList;\r\n new(): SourceBufferList;\r\n}\r\n\r\ninterface StereoPannerNode extends AudioNode {\r\n pan: AudioParam;\r\n}\r\n\r\ndeclare var StereoPannerNode: {\r\n prototype: StereoPannerNode;\r\n new(): StereoPannerNode;\r\n}\r\n\r\ninterface Storage {\r\n length: number;\r\n clear(): void;\r\n getItem(key: string): any;\r\n key(index: number): string;\r\n removeItem(key: string): void;\r\n setItem(key: string, data: string): void;\r\n [key: string]: any;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var Storage: {\r\n prototype: Storage;\r\n new(): Storage;\r\n}\r\n\r\ninterface StorageEvent extends Event {\r\n url: string;\r\n key?: string;\r\n oldValue?: string;\r\n newValue?: string;\r\n storageArea?: Storage;\r\n}\r\n\r\ndeclare var StorageEvent: {\r\n prototype: StorageEvent;\r\n new (type: string, eventInitDict?: StorageEventInit): StorageEvent;\r\n}\r\n\r\ninterface StyleMedia {\r\n type: string;\r\n matchMedium(mediaquery: string): boolean;\r\n}\r\n\r\ndeclare var StyleMedia: {\r\n prototype: StyleMedia;\r\n new(): StyleMedia;\r\n}\r\n\r\ninterface StyleSheet {\r\n disabled: boolean;\r\n href: string;\r\n media: MediaList;\r\n ownerNode: Node;\r\n parentStyleSheet: StyleSheet;\r\n title: string;\r\n type: string;\r\n}\r\n\r\ndeclare var StyleSheet: {\r\n prototype: StyleSheet;\r\n new(): StyleSheet;\r\n}\r\n\r\ninterface StyleSheetList {\r\n length: number;\r\n item(index?: number): StyleSheet;\r\n [index: number]: StyleSheet;\r\n}\r\n\r\ndeclare var StyleSheetList: {\r\n prototype: StyleSheetList;\r\n new(): StyleSheetList;\r\n}\r\n\r\ninterface StyleSheetPageList {\r\n length: number;\r\n item(index: number): CSSPageRule;\r\n [index: number]: CSSPageRule;\r\n}\r\n\r\ndeclare var StyleSheetPageList: {\r\n prototype: StyleSheetPageList;\r\n new(): StyleSheetPageList;\r\n}\r\n\r\ninterface SubtleCrypto {\r\n decrypt(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;\r\n deriveBits(algorithm: string | Algorithm, baseKey: CryptoKey, length: number): any;\r\n deriveKey(algorithm: string | Algorithm, baseKey: CryptoKey, derivedKeyType: string | Algorithm, extractable: boolean, keyUsages: string[]): any;\r\n digest(algorithm: string | Algorithm, data: ArrayBufferView): any;\r\n encrypt(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;\r\n exportKey(format: string, key: CryptoKey): any;\r\n generateKey(algorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;\r\n importKey(format: string, keyData: ArrayBufferView, algorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;\r\n sign(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;\r\n unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string | Algorithm, unwrappedKeyAlgorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;\r\n verify(algorithm: string | Algorithm, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;\r\n wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string | Algorithm): any;\r\n}\r\n\r\ndeclare var SubtleCrypto: {\r\n prototype: SubtleCrypto;\r\n new(): SubtleCrypto;\r\n}\r\n\r\ninterface Text extends CharacterData {\r\n wholeText: string;\r\n replaceWholeText(content: string): Text;\r\n splitText(offset: number): Text;\r\n}\r\n\r\ndeclare var Text: {\r\n prototype: Text;\r\n new(): Text;\r\n}\r\n\r\ninterface TextEvent extends UIEvent {\r\n data: string;\r\n inputMethod: number;\r\n locale: string;\r\n initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void;\r\n DOM_INPUT_METHOD_DROP: number;\r\n DOM_INPUT_METHOD_HANDWRITING: number;\r\n DOM_INPUT_METHOD_IME: number;\r\n DOM_INPUT_METHOD_KEYBOARD: number;\r\n DOM_INPUT_METHOD_MULTIMODAL: number;\r\n DOM_INPUT_METHOD_OPTION: number;\r\n DOM_INPUT_METHOD_PASTE: number;\r\n DOM_INPUT_METHOD_SCRIPT: number;\r\n DOM_INPUT_METHOD_UNKNOWN: number;\r\n DOM_INPUT_METHOD_VOICE: number;\r\n}\r\n\r\ndeclare var TextEvent: {\r\n prototype: TextEvent;\r\n new(): TextEvent;\r\n DOM_INPUT_METHOD_DROP: number;\r\n DOM_INPUT_METHOD_HANDWRITING: number;\r\n DOM_INPUT_METHOD_IME: number;\r\n DOM_INPUT_METHOD_KEYBOARD: number;\r\n DOM_INPUT_METHOD_MULTIMODAL: number;\r\n DOM_INPUT_METHOD_OPTION: number;\r\n DOM_INPUT_METHOD_PASTE: number;\r\n DOM_INPUT_METHOD_SCRIPT: number;\r\n DOM_INPUT_METHOD_UNKNOWN: number;\r\n DOM_INPUT_METHOD_VOICE: number;\r\n}\r\n\r\ninterface TextMetrics {\r\n width: number;\r\n}\r\n\r\ndeclare var TextMetrics: {\r\n prototype: TextMetrics;\r\n new(): TextMetrics;\r\n}\r\n\r\ninterface TextRange {\r\n boundingHeight: number;\r\n boundingLeft: number;\r\n boundingTop: number;\r\n boundingWidth: number;\r\n htmlText: string;\r\n offsetLeft: number;\r\n offsetTop: number;\r\n text: string;\r\n collapse(start?: boolean): void;\r\n compareEndPoints(how: string, sourceRange: TextRange): number;\r\n duplicate(): TextRange;\r\n execCommand(cmdID: string, showUI?: boolean, value?: any): boolean;\r\n execCommandShowHelp(cmdID: string): boolean;\r\n expand(Unit: string): boolean;\r\n findText(string: string, count?: number, flags?: number): boolean;\r\n getBookmark(): string;\r\n getBoundingClientRect(): ClientRect;\r\n getClientRects(): ClientRectList;\r\n inRange(range: TextRange): boolean;\r\n isEqual(range: TextRange): boolean;\r\n move(unit: string, count?: number): number;\r\n moveEnd(unit: string, count?: number): number;\r\n moveStart(unit: string, count?: number): number;\r\n moveToBookmark(bookmark: string): boolean;\r\n moveToElementText(element: Element): void;\r\n moveToPoint(x: number, y: number): void;\r\n parentElement(): Element;\r\n pasteHTML(html: string): void;\r\n queryCommandEnabled(cmdID: string): boolean;\r\n queryCommandIndeterm(cmdID: string): boolean;\r\n queryCommandState(cmdID: string): boolean;\r\n queryCommandSupported(cmdID: string): boolean;\r\n queryCommandText(cmdID: string): string;\r\n queryCommandValue(cmdID: string): any;\r\n scrollIntoView(fStart?: boolean): void;\r\n select(): void;\r\n setEndPoint(how: string, SourceRange: TextRange): void;\r\n}\r\n\r\ndeclare var TextRange: {\r\n prototype: TextRange;\r\n new(): TextRange;\r\n}\r\n\r\ninterface TextRangeCollection {\r\n length: number;\r\n item(index: number): TextRange;\r\n [index: number]: TextRange;\r\n}\r\n\r\ndeclare var TextRangeCollection: {\r\n prototype: TextRangeCollection;\r\n new(): TextRangeCollection;\r\n}\r\n\r\ninterface TextTrack extends EventTarget {\r\n activeCues: TextTrackCueList;\r\n cues: TextTrackCueList;\r\n inBandMetadataTrackDispatchType: string;\r\n kind: string;\r\n label: string;\r\n language: string;\r\n mode: any;\r\n oncuechange: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n onload: (ev: Event) => any;\r\n readyState: number;\r\n addCue(cue: TextTrackCue): void;\r\n removeCue(cue: TextTrackCue): void;\r\n DISABLED: number;\r\n ERROR: number;\r\n HIDDEN: number;\r\n LOADED: number;\r\n LOADING: number;\r\n NONE: number;\r\n SHOWING: number;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var TextTrack: {\r\n prototype: TextTrack;\r\n new(): TextTrack;\r\n DISABLED: number;\r\n ERROR: number;\r\n HIDDEN: number;\r\n LOADED: number;\r\n LOADING: number;\r\n NONE: number;\r\n SHOWING: number;\r\n}\r\n\r\ninterface TextTrackCue extends EventTarget {\r\n endTime: number;\r\n id: string;\r\n onenter: (ev: Event) => any;\r\n onexit: (ev: Event) => any;\r\n pauseOnExit: boolean;\r\n startTime: number;\r\n text: string;\r\n track: TextTrack;\r\n getCueAsHTML(): DocumentFragment;\r\n addEventListener(type: \"enter\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"exit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var TextTrackCue: {\r\n prototype: TextTrackCue;\r\n new(startTime: number, endTime: number, text: string): TextTrackCue;\r\n}\r\n\r\ninterface TextTrackCueList {\r\n length: number;\r\n getCueById(id: string): TextTrackCue;\r\n item(index: number): TextTrackCue;\r\n [index: number]: TextTrackCue;\r\n}\r\n\r\ndeclare var TextTrackCueList: {\r\n prototype: TextTrackCueList;\r\n new(): TextTrackCueList;\r\n}\r\n\r\ninterface TextTrackList extends EventTarget {\r\n length: number;\r\n onaddtrack: (ev: TrackEvent) => any;\r\n item(index: number): TextTrack;\r\n addEventListener(type: \"addtrack\", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: TextTrack;\r\n}\r\n\r\ndeclare var TextTrackList: {\r\n prototype: TextTrackList;\r\n new(): TextTrackList;\r\n}\r\n\r\ninterface TimeRanges {\r\n length: number;\r\n end(index: number): number;\r\n start(index: number): number;\r\n}\r\n\r\ndeclare var TimeRanges: {\r\n prototype: TimeRanges;\r\n new(): TimeRanges;\r\n}\r\n\r\ninterface Touch {\r\n clientX: number;\r\n clientY: number;\r\n identifier: number;\r\n pageX: number;\r\n pageY: number;\r\n screenX: number;\r\n screenY: number;\r\n target: EventTarget;\r\n}\r\n\r\ndeclare var Touch: {\r\n prototype: Touch;\r\n new(): Touch;\r\n}\r\n\r\ninterface TouchEvent extends UIEvent {\r\n altKey: boolean;\r\n changedTouches: TouchList;\r\n ctrlKey: boolean;\r\n metaKey: boolean;\r\n shiftKey: boolean;\r\n targetTouches: TouchList;\r\n touches: TouchList;\r\n}\r\n\r\ndeclare var TouchEvent: {\r\n prototype: TouchEvent;\r\n new(): TouchEvent;\r\n}\r\n\r\ninterface TouchList {\r\n length: number;\r\n item(index: number): Touch;\r\n [index: number]: Touch;\r\n}\r\n\r\ndeclare var TouchList: {\r\n prototype: TouchList;\r\n new(): TouchList;\r\n}\r\n\r\ninterface TrackEvent extends Event {\r\n track: any;\r\n}\r\n\r\ndeclare var TrackEvent: {\r\n prototype: TrackEvent;\r\n new(): TrackEvent;\r\n}\r\n\r\ninterface TransitionEvent extends Event {\r\n elapsedTime: number;\r\n propertyName: string;\r\n initTransitionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, propertyNameArg: string, elapsedTimeArg: number): void;\r\n}\r\n\r\ndeclare var TransitionEvent: {\r\n prototype: TransitionEvent;\r\n new(): TransitionEvent;\r\n}\r\n\r\ninterface TreeWalker {\r\n currentNode: Node;\r\n expandEntityReferences: boolean;\r\n filter: NodeFilter;\r\n root: Node;\r\n whatToShow: number;\r\n firstChild(): Node;\r\n lastChild(): Node;\r\n nextNode(): Node;\r\n nextSibling(): Node;\r\n parentNode(): Node;\r\n previousNode(): Node;\r\n previousSibling(): Node;\r\n}\r\n\r\ndeclare var TreeWalker: {\r\n prototype: TreeWalker;\r\n new(): TreeWalker;\r\n}\r\n\r\ninterface UIEvent extends Event {\r\n detail: number;\r\n view: Window;\r\n initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number): void;\r\n}\r\n\r\ndeclare var UIEvent: {\r\n prototype: UIEvent;\r\n new(type: string, eventInitDict?: UIEventInit): UIEvent;\r\n}\r\n\r\ninterface URL {\r\n createObjectURL(object: any, options?: ObjectURLOptions): string;\r\n revokeObjectURL(url: string): void;\r\n}\r\ndeclare var URL: URL;\r\n\r\ninterface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {\r\n mediaType: string;\r\n}\r\n\r\ndeclare var UnviewableContentIdentifiedEvent: {\r\n prototype: UnviewableContentIdentifiedEvent;\r\n new(): UnviewableContentIdentifiedEvent;\r\n}\r\n\r\ninterface ValidityState {\r\n badInput: boolean;\r\n customError: boolean;\r\n patternMismatch: boolean;\r\n rangeOverflow: boolean;\r\n rangeUnderflow: boolean;\r\n stepMismatch: boolean;\r\n tooLong: boolean;\r\n typeMismatch: boolean;\r\n valid: boolean;\r\n valueMissing: boolean;\r\n}\r\n\r\ndeclare var ValidityState: {\r\n prototype: ValidityState;\r\n new(): ValidityState;\r\n}\r\n\r\ninterface VideoPlaybackQuality {\r\n corruptedVideoFrames: number;\r\n creationTime: number;\r\n droppedVideoFrames: number;\r\n totalFrameDelay: number;\r\n totalVideoFrames: number;\r\n}\r\n\r\ndeclare var VideoPlaybackQuality: {\r\n prototype: VideoPlaybackQuality;\r\n new(): VideoPlaybackQuality;\r\n}\r\n\r\ninterface VideoTrack {\r\n id: string;\r\n kind: string;\r\n label: string;\r\n language: string;\r\n selected: boolean;\r\n sourceBuffer: SourceBuffer;\r\n}\r\n\r\ndeclare var VideoTrack: {\r\n prototype: VideoTrack;\r\n new(): VideoTrack;\r\n}\r\n\r\ninterface VideoTrackList extends EventTarget {\r\n length: number;\r\n onaddtrack: (ev: TrackEvent) => any;\r\n onchange: (ev: Event) => any;\r\n onremovetrack: (ev: TrackEvent) => any;\r\n selectedIndex: number;\r\n getTrackById(id: string): VideoTrack;\r\n item(index: number): VideoTrack;\r\n addEventListener(type: \"addtrack\", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"removetrack\", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: VideoTrack;\r\n}\r\n\r\ndeclare var VideoTrackList: {\r\n prototype: VideoTrackList;\r\n new(): VideoTrackList;\r\n}\r\n\r\ninterface WEBGL_compressed_texture_s3tc {\r\n COMPRESSED_RGBA_S3TC_DXT1_EXT: number;\r\n COMPRESSED_RGBA_S3TC_DXT3_EXT: number;\r\n COMPRESSED_RGBA_S3TC_DXT5_EXT: number;\r\n COMPRESSED_RGB_S3TC_DXT1_EXT: number;\r\n}\r\n\r\ndeclare var WEBGL_compressed_texture_s3tc: {\r\n prototype: WEBGL_compressed_texture_s3tc;\r\n new(): WEBGL_compressed_texture_s3tc;\r\n COMPRESSED_RGBA_S3TC_DXT1_EXT: number;\r\n COMPRESSED_RGBA_S3TC_DXT3_EXT: number;\r\n COMPRESSED_RGBA_S3TC_DXT5_EXT: number;\r\n COMPRESSED_RGB_S3TC_DXT1_EXT: number;\r\n}\r\n\r\ninterface WEBGL_debug_renderer_info {\r\n UNMASKED_RENDERER_WEBGL: number;\r\n UNMASKED_VENDOR_WEBGL: number;\r\n}\r\n\r\ndeclare var WEBGL_debug_renderer_info: {\r\n prototype: WEBGL_debug_renderer_info;\r\n new(): WEBGL_debug_renderer_info;\r\n UNMASKED_RENDERER_WEBGL: number;\r\n UNMASKED_VENDOR_WEBGL: number;\r\n}\r\n\r\ninterface WEBGL_depth_texture {\r\n UNSIGNED_INT_24_8_WEBGL: number;\r\n}\r\n\r\ndeclare var WEBGL_depth_texture: {\r\n prototype: WEBGL_depth_texture;\r\n new(): WEBGL_depth_texture;\r\n UNSIGNED_INT_24_8_WEBGL: number;\r\n}\r\n\r\ninterface WaveShaperNode extends AudioNode {\r\n curve: Float32Array;\r\n oversample: string;\r\n}\r\n\r\ndeclare var WaveShaperNode: {\r\n prototype: WaveShaperNode;\r\n new(): WaveShaperNode;\r\n}\r\n\r\ninterface WebGLActiveInfo {\r\n name: string;\r\n size: number;\r\n type: number;\r\n}\r\n\r\ndeclare var WebGLActiveInfo: {\r\n prototype: WebGLActiveInfo;\r\n new(): WebGLActiveInfo;\r\n}\r\n\r\ninterface WebGLBuffer extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLBuffer: {\r\n prototype: WebGLBuffer;\r\n new(): WebGLBuffer;\r\n}\r\n\r\ninterface WebGLContextEvent extends Event {\r\n statusMessage: string;\r\n}\r\n\r\ndeclare var WebGLContextEvent: {\r\n prototype: WebGLContextEvent;\r\n new(): WebGLContextEvent;\r\n}\r\n\r\ninterface WebGLFramebuffer extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLFramebuffer: {\r\n prototype: WebGLFramebuffer;\r\n new(): WebGLFramebuffer;\r\n}\r\n\r\ninterface WebGLObject {\r\n}\r\n\r\ndeclare var WebGLObject: {\r\n prototype: WebGLObject;\r\n new(): WebGLObject;\r\n}\r\n\r\ninterface WebGLProgram extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLProgram: {\r\n prototype: WebGLProgram;\r\n new(): WebGLProgram;\r\n}\r\n\r\ninterface WebGLRenderbuffer extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLRenderbuffer: {\r\n prototype: WebGLRenderbuffer;\r\n new(): WebGLRenderbuffer;\r\n}\r\n\r\ninterface WebGLRenderingContext {\r\n canvas: HTMLCanvasElement;\r\n drawingBufferHeight: number;\r\n drawingBufferWidth: number;\r\n activeTexture(texture: number): void;\r\n attachShader(program: WebGLProgram, shader: WebGLShader): void;\r\n bindAttribLocation(program: WebGLProgram, index: number, name: string): void;\r\n bindBuffer(target: number, buffer: WebGLBuffer): void;\r\n bindFramebuffer(target: number, framebuffer: WebGLFramebuffer): void;\r\n bindRenderbuffer(target: number, renderbuffer: WebGLRenderbuffer): void;\r\n bindTexture(target: number, texture: WebGLTexture): void;\r\n blendColor(red: number, green: number, blue: number, alpha: number): void;\r\n blendEquation(mode: number): void;\r\n blendEquationSeparate(modeRGB: number, modeAlpha: number): void;\r\n blendFunc(sfactor: number, dfactor: number): void;\r\n blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;\r\n bufferData(target: number, size: number | ArrayBufferView | ArrayBuffer, usage: number): void;\r\n bufferSubData(target: number, offset: number, data: ArrayBufferView | ArrayBuffer): void;\r\n checkFramebufferStatus(target: number): number;\r\n clear(mask: number): void;\r\n clearColor(red: number, green: number, blue: number, alpha: number): void;\r\n clearDepth(depth: number): void;\r\n clearStencil(s: number): void;\r\n colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;\r\n compileShader(shader: WebGLShader): void;\r\n compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;\r\n compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;\r\n copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;\r\n copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;\r\n createBuffer(): WebGLBuffer;\r\n createFramebuffer(): WebGLFramebuffer;\r\n createProgram(): WebGLProgram;\r\n createRenderbuffer(): WebGLRenderbuffer;\r\n createShader(type: number): WebGLShader;\r\n createTexture(): WebGLTexture;\r\n cullFace(mode: number): void;\r\n deleteBuffer(buffer: WebGLBuffer): void;\r\n deleteFramebuffer(framebuffer: WebGLFramebuffer): void;\r\n deleteProgram(program: WebGLProgram): void;\r\n deleteRenderbuffer(renderbuffer: WebGLRenderbuffer): void;\r\n deleteShader(shader: WebGLShader): void;\r\n deleteTexture(texture: WebGLTexture): void;\r\n depthFunc(func: number): void;\r\n depthMask(flag: boolean): void;\r\n depthRange(zNear: number, zFar: number): void;\r\n detachShader(program: WebGLProgram, shader: WebGLShader): void;\r\n disable(cap: number): void;\r\n disableVertexAttribArray(index: number): void;\r\n drawArrays(mode: number, first: number, count: number): void;\r\n drawElements(mode: number, count: number, type: number, offset: number): void;\r\n enable(cap: number): void;\r\n enableVertexAttribArray(index: number): void;\r\n finish(): void;\r\n flush(): void;\r\n framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: WebGLRenderbuffer): void;\r\n framebufferTexture2D(target: number, attachment: number, textarget: number, texture: WebGLTexture, level: number): void;\r\n frontFace(mode: number): void;\r\n generateMipmap(target: number): void;\r\n getActiveAttrib(program: WebGLProgram, index: number): WebGLActiveInfo;\r\n getActiveUniform(program: WebGLProgram, index: number): WebGLActiveInfo;\r\n getAttachedShaders(program: WebGLProgram): WebGLShader[];\r\n getAttribLocation(program: WebGLProgram, name: string): number;\r\n getBufferParameter(target: number, pname: number): any;\r\n getContextAttributes(): WebGLContextAttributes;\r\n getError(): number;\r\n getExtension(name: string): any;\r\n getFramebufferAttachmentParameter(target: number, attachment: number, pname: number): any;\r\n getParameter(pname: number): any;\r\n getProgramInfoLog(program: WebGLProgram): string;\r\n getProgramParameter(program: WebGLProgram, pname: number): any;\r\n getRenderbufferParameter(target: number, pname: number): any;\r\n getShaderInfoLog(shader: WebGLShader): string;\r\n getShaderParameter(shader: WebGLShader, pname: number): any;\r\n getShaderPrecisionFormat(shadertype: number, precisiontype: number): WebGLShaderPrecisionFormat;\r\n getShaderSource(shader: WebGLShader): string;\r\n getSupportedExtensions(): string[];\r\n getTexParameter(target: number, pname: number): any;\r\n getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;\r\n getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation;\r\n getVertexAttrib(index: number, pname: number): any;\r\n getVertexAttribOffset(index: number, pname: number): number;\r\n hint(target: number, mode: number): void;\r\n isBuffer(buffer: WebGLBuffer): boolean;\r\n isContextLost(): boolean;\r\n isEnabled(cap: number): boolean;\r\n isFramebuffer(framebuffer: WebGLFramebuffer): boolean;\r\n isProgram(program: WebGLProgram): boolean;\r\n isRenderbuffer(renderbuffer: WebGLRenderbuffer): boolean;\r\n isShader(shader: WebGLShader): boolean;\r\n isTexture(texture: WebGLTexture): boolean;\r\n lineWidth(width: number): void;\r\n linkProgram(program: WebGLProgram): void;\r\n pixelStorei(pname: number, param: number): void;\r\n polygonOffset(factor: number, units: number): void;\r\n readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView): void;\r\n renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;\r\n sampleCoverage(value: number, invert: boolean): void;\r\n scissor(x: number, y: number, width: number, height: number): void;\r\n shaderSource(shader: WebGLShader, source: string): void;\r\n stencilFunc(func: number, ref: number, mask: number): void;\r\n stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void;\r\n stencilMask(mask: number): void;\r\n stencilMaskSeparate(face: number, mask: number): void;\r\n stencilOp(fail: number, zfail: number, zpass: number): void;\r\n stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void;\r\n texImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, format: number, type: number, pixels: ArrayBufferView): void;\r\n texImage2D(target: number, level: number, internalformat: number, format: number, type: number, image: HTMLImageElement): void;\r\n texImage2D(target: number, level: number, internalformat: number, format: number, type: number, canvas: HTMLCanvasElement): void;\r\n texImage2D(target: number, level: number, internalformat: number, format: number, type: number, video: HTMLVideoElement): void;\r\n texImage2D(target: number, level: number, internalformat: number, format: number, type: number, pixels: ImageData): void;\r\n texParameterf(target: number, pname: number, param: number): void;\r\n texParameteri(target: number, pname: number, param: number): void;\r\n texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView): void;\r\n texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, image: HTMLImageElement): void;\r\n texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, canvas: HTMLCanvasElement): void;\r\n texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, video: HTMLVideoElement): void;\r\n texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, pixels: ImageData): void;\r\n uniform1f(location: WebGLUniformLocation, x: number): void;\r\n uniform1fv(location: WebGLUniformLocation, v: Float32Array): void;\r\n uniform1i(location: WebGLUniformLocation, x: number): void;\r\n uniform1iv(location: WebGLUniformLocation, v: Int32Array): void;\r\n uniform2f(location: WebGLUniformLocation, x: number, y: number): void;\r\n uniform2fv(location: WebGLUniformLocation, v: Float32Array): void;\r\n uniform2i(location: WebGLUniformLocation, x: number, y: number): void;\r\n uniform2iv(location: WebGLUniformLocation, v: Int32Array): void;\r\n uniform3f(location: WebGLUniformLocation, x: number, y: number, z: number): void;\r\n uniform3fv(location: WebGLUniformLocation, v: Float32Array): void;\r\n uniform3i(location: WebGLUniformLocation, x: number, y: number, z: number): void;\r\n uniform3iv(location: WebGLUniformLocation, v: Int32Array): void;\r\n uniform4f(location: WebGLUniformLocation, x: number, y: number, z: number, w: number): void;\r\n uniform4fv(location: WebGLUniformLocation, v: Float32Array): void;\r\n uniform4i(location: WebGLUniformLocation, x: number, y: number, z: number, w: number): void;\r\n uniform4iv(location: WebGLUniformLocation, v: Int32Array): void;\r\n uniformMatrix2fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array): void;\r\n uniformMatrix3fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array): void;\r\n uniformMatrix4fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array): void;\r\n useProgram(program: WebGLProgram): void;\r\n validateProgram(program: WebGLProgram): void;\r\n vertexAttrib1f(indx: number, x: number): void;\r\n vertexAttrib1fv(indx: number, values: Float32Array): void;\r\n vertexAttrib2f(indx: number, x: number, y: number): void;\r\n vertexAttrib2fv(indx: number, values: Float32Array): void;\r\n vertexAttrib3f(indx: number, x: number, y: number, z: number): void;\r\n vertexAttrib3fv(indx: number, values: Float32Array): void;\r\n vertexAttrib4f(indx: number, x: number, y: number, z: number, w: number): void;\r\n vertexAttrib4fv(indx: number, values: Float32Array): void;\r\n vertexAttribPointer(indx: number, size: number, type: number, normalized: boolean, stride: number, offset: number): void;\r\n viewport(x: number, y: number, width: number, height: number): void;\r\n ACTIVE_ATTRIBUTES: number;\r\n ACTIVE_TEXTURE: number;\r\n ACTIVE_UNIFORMS: number;\r\n ALIASED_LINE_WIDTH_RANGE: number;\r\n ALIASED_POINT_SIZE_RANGE: number;\r\n ALPHA: number;\r\n ALPHA_BITS: number;\r\n ALWAYS: number;\r\n ARRAY_BUFFER: number;\r\n ARRAY_BUFFER_BINDING: number;\r\n ATTACHED_SHADERS: number;\r\n BACK: number;\r\n BLEND: number;\r\n BLEND_COLOR: number;\r\n BLEND_DST_ALPHA: number;\r\n BLEND_DST_RGB: number;\r\n BLEND_EQUATION: number;\r\n BLEND_EQUATION_ALPHA: number;\r\n BLEND_EQUATION_RGB: number;\r\n BLEND_SRC_ALPHA: number;\r\n BLEND_SRC_RGB: number;\r\n BLUE_BITS: number;\r\n BOOL: number;\r\n BOOL_VEC2: number;\r\n BOOL_VEC3: number;\r\n BOOL_VEC4: number;\r\n BROWSER_DEFAULT_WEBGL: number;\r\n BUFFER_SIZE: number;\r\n BUFFER_USAGE: number;\r\n BYTE: number;\r\n CCW: number;\r\n CLAMP_TO_EDGE: number;\r\n COLOR_ATTACHMENT0: number;\r\n COLOR_BUFFER_BIT: number;\r\n COLOR_CLEAR_VALUE: number;\r\n COLOR_WRITEMASK: number;\r\n COMPILE_STATUS: number;\r\n COMPRESSED_TEXTURE_FORMATS: number;\r\n CONSTANT_ALPHA: number;\r\n CONSTANT_COLOR: number;\r\n CONTEXT_LOST_WEBGL: number;\r\n CULL_FACE: number;\r\n CULL_FACE_MODE: number;\r\n CURRENT_PROGRAM: number;\r\n CURRENT_VERTEX_ATTRIB: number;\r\n CW: number;\r\n DECR: number;\r\n DECR_WRAP: number;\r\n DELETE_STATUS: number;\r\n DEPTH_ATTACHMENT: number;\r\n DEPTH_BITS: number;\r\n DEPTH_BUFFER_BIT: number;\r\n DEPTH_CLEAR_VALUE: number;\r\n DEPTH_COMPONENT: number;\r\n DEPTH_COMPONENT16: number;\r\n DEPTH_FUNC: number;\r\n DEPTH_RANGE: number;\r\n DEPTH_STENCIL: number;\r\n DEPTH_STENCIL_ATTACHMENT: number;\r\n DEPTH_TEST: number;\r\n DEPTH_WRITEMASK: number;\r\n DITHER: number;\r\n DONT_CARE: number;\r\n DST_ALPHA: number;\r\n DST_COLOR: number;\r\n DYNAMIC_DRAW: number;\r\n ELEMENT_ARRAY_BUFFER: number;\r\n ELEMENT_ARRAY_BUFFER_BINDING: number;\r\n EQUAL: number;\r\n FASTEST: number;\r\n FLOAT: number;\r\n FLOAT_MAT2: number;\r\n FLOAT_MAT3: number;\r\n FLOAT_MAT4: number;\r\n FLOAT_VEC2: number;\r\n FLOAT_VEC3: number;\r\n FLOAT_VEC4: number;\r\n FRAGMENT_SHADER: number;\r\n FRAMEBUFFER: number;\r\n FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;\r\n FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;\r\n FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;\r\n FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;\r\n FRAMEBUFFER_BINDING: number;\r\n FRAMEBUFFER_COMPLETE: number;\r\n FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;\r\n FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;\r\n FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;\r\n FRAMEBUFFER_UNSUPPORTED: number;\r\n FRONT: number;\r\n FRONT_AND_BACK: number;\r\n FRONT_FACE: number;\r\n FUNC_ADD: number;\r\n FUNC_REVERSE_SUBTRACT: number;\r\n FUNC_SUBTRACT: number;\r\n GENERATE_MIPMAP_HINT: number;\r\n GEQUAL: number;\r\n GREATER: number;\r\n GREEN_BITS: number;\r\n HIGH_FLOAT: number;\r\n HIGH_INT: number;\r\n IMPLEMENTATION_COLOR_READ_FORMAT: number;\r\n IMPLEMENTATION_COLOR_READ_TYPE: number;\r\n INCR: number;\r\n INCR_WRAP: number;\r\n INT: number;\r\n INT_VEC2: number;\r\n INT_VEC3: number;\r\n INT_VEC4: number;\r\n INVALID_ENUM: number;\r\n INVALID_FRAMEBUFFER_OPERATION: number;\r\n INVALID_OPERATION: number;\r\n INVALID_VALUE: number;\r\n INVERT: number;\r\n KEEP: number;\r\n LEQUAL: number;\r\n LESS: number;\r\n LINEAR: number;\r\n LINEAR_MIPMAP_LINEAR: number;\r\n LINEAR_MIPMAP_NEAREST: number;\r\n LINES: number;\r\n LINE_LOOP: number;\r\n LINE_STRIP: number;\r\n LINE_WIDTH: number;\r\n LINK_STATUS: number;\r\n LOW_FLOAT: number;\r\n LOW_INT: number;\r\n LUMINANCE: number;\r\n LUMINANCE_ALPHA: number;\r\n MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;\r\n MAX_CUBE_MAP_TEXTURE_SIZE: number;\r\n MAX_FRAGMENT_UNIFORM_VECTORS: number;\r\n MAX_RENDERBUFFER_SIZE: number;\r\n MAX_TEXTURE_IMAGE_UNITS: number;\r\n MAX_TEXTURE_SIZE: number;\r\n MAX_VARYING_VECTORS: number;\r\n MAX_VERTEX_ATTRIBS: number;\r\n MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;\r\n MAX_VERTEX_UNIFORM_VECTORS: number;\r\n MAX_VIEWPORT_DIMS: number;\r\n MEDIUM_FLOAT: number;\r\n MEDIUM_INT: number;\r\n MIRRORED_REPEAT: number;\r\n NEAREST: number;\r\n NEAREST_MIPMAP_LINEAR: number;\r\n NEAREST_MIPMAP_NEAREST: number;\r\n NEVER: number;\r\n NICEST: number;\r\n NONE: number;\r\n NOTEQUAL: number;\r\n NO_ERROR: number;\r\n ONE: number;\r\n ONE_MINUS_CONSTANT_ALPHA: number;\r\n ONE_MINUS_CONSTANT_COLOR: number;\r\n ONE_MINUS_DST_ALPHA: number;\r\n ONE_MINUS_DST_COLOR: number;\r\n ONE_MINUS_SRC_ALPHA: number;\r\n ONE_MINUS_SRC_COLOR: number;\r\n OUT_OF_MEMORY: number;\r\n PACK_ALIGNMENT: number;\r\n POINTS: number;\r\n POLYGON_OFFSET_FACTOR: number;\r\n POLYGON_OFFSET_FILL: number;\r\n POLYGON_OFFSET_UNITS: number;\r\n RED_BITS: number;\r\n RENDERBUFFER: number;\r\n RENDERBUFFER_ALPHA_SIZE: number;\r\n RENDERBUFFER_BINDING: number;\r\n RENDERBUFFER_BLUE_SIZE: number;\r\n RENDERBUFFER_DEPTH_SIZE: number;\r\n RENDERBUFFER_GREEN_SIZE: number;\r\n RENDERBUFFER_HEIGHT: number;\r\n RENDERBUFFER_INTERNAL_FORMAT: number;\r\n RENDERBUFFER_RED_SIZE: number;\r\n RENDERBUFFER_STENCIL_SIZE: number;\r\n RENDERBUFFER_WIDTH: number;\r\n RENDERER: number;\r\n REPEAT: number;\r\n REPLACE: number;\r\n RGB: number;\r\n RGB565: number;\r\n RGB5_A1: number;\r\n RGBA: number;\r\n RGBA4: number;\r\n SAMPLER_2D: number;\r\n SAMPLER_CUBE: number;\r\n SAMPLES: number;\r\n SAMPLE_ALPHA_TO_COVERAGE: number;\r\n SAMPLE_BUFFERS: number;\r\n SAMPLE_COVERAGE: number;\r\n SAMPLE_COVERAGE_INVERT: number;\r\n SAMPLE_COVERAGE_VALUE: number;\r\n SCISSOR_BOX: number;\r\n SCISSOR_TEST: number;\r\n SHADER_TYPE: number;\r\n SHADING_LANGUAGE_VERSION: number;\r\n SHORT: number;\r\n SRC_ALPHA: number;\r\n SRC_ALPHA_SATURATE: number;\r\n SRC_COLOR: number;\r\n STATIC_DRAW: number;\r\n STENCIL_ATTACHMENT: number;\r\n STENCIL_BACK_FAIL: number;\r\n STENCIL_BACK_FUNC: number;\r\n STENCIL_BACK_PASS_DEPTH_FAIL: number;\r\n STENCIL_BACK_PASS_DEPTH_PASS: number;\r\n STENCIL_BACK_REF: number;\r\n STENCIL_BACK_VALUE_MASK: number;\r\n STENCIL_BACK_WRITEMASK: number;\r\n STENCIL_BITS: number;\r\n STENCIL_BUFFER_BIT: number;\r\n STENCIL_CLEAR_VALUE: number;\r\n STENCIL_FAIL: number;\r\n STENCIL_FUNC: number;\r\n STENCIL_INDEX: number;\r\n STENCIL_INDEX8: number;\r\n STENCIL_PASS_DEPTH_FAIL: number;\r\n STENCIL_PASS_DEPTH_PASS: number;\r\n STENCIL_REF: number;\r\n STENCIL_TEST: number;\r\n STENCIL_VALUE_MASK: number;\r\n STENCIL_WRITEMASK: number;\r\n STREAM_DRAW: number;\r\n SUBPIXEL_BITS: number;\r\n TEXTURE: number;\r\n TEXTURE0: number;\r\n TEXTURE1: number;\r\n TEXTURE10: number;\r\n TEXTURE11: number;\r\n TEXTURE12: number;\r\n TEXTURE13: number;\r\n TEXTURE14: number;\r\n TEXTURE15: number;\r\n TEXTURE16: number;\r\n TEXTURE17: number;\r\n TEXTURE18: number;\r\n TEXTURE19: number;\r\n TEXTURE2: number;\r\n TEXTURE20: number;\r\n TEXTURE21: number;\r\n TEXTURE22: number;\r\n TEXTURE23: number;\r\n TEXTURE24: number;\r\n TEXTURE25: number;\r\n TEXTURE26: number;\r\n TEXTURE27: number;\r\n TEXTURE28: number;\r\n TEXTURE29: number;\r\n TEXTURE3: number;\r\n TEXTURE30: number;\r\n TEXTURE31: number;\r\n TEXTURE4: number;\r\n TEXTURE5: number;\r\n TEXTURE6: number;\r\n TEXTURE7: number;\r\n TEXTURE8: number;\r\n TEXTURE9: number;\r\n TEXTURE_2D: number;\r\n TEXTURE_BINDING_2D: number;\r\n TEXTURE_BINDING_CUBE_MAP: number;\r\n TEXTURE_CUBE_MAP: number;\r\n TEXTURE_CUBE_MAP_NEGATIVE_X: number;\r\n TEXTURE_CUBE_MAP_NEGATIVE_Y: number;\r\n TEXTURE_CUBE_MAP_NEGATIVE_Z: number;\r\n TEXTURE_CUBE_MAP_POSITIVE_X: number;\r\n TEXTURE_CUBE_MAP_POSITIVE_Y: number;\r\n TEXTURE_CUBE_MAP_POSITIVE_Z: number;\r\n TEXTURE_MAG_FILTER: number;\r\n TEXTURE_MIN_FILTER: number;\r\n TEXTURE_WRAP_S: number;\r\n TEXTURE_WRAP_T: number;\r\n TRIANGLES: number;\r\n TRIANGLE_FAN: number;\r\n TRIANGLE_STRIP: number;\r\n UNPACK_ALIGNMENT: number;\r\n UNPACK_COLORSPACE_CONVERSION_WEBGL: number;\r\n UNPACK_FLIP_Y_WEBGL: number;\r\n UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;\r\n UNSIGNED_BYTE: number;\r\n UNSIGNED_INT: number;\r\n UNSIGNED_SHORT: number;\r\n UNSIGNED_SHORT_4_4_4_4: number;\r\n UNSIGNED_SHORT_5_5_5_1: number;\r\n UNSIGNED_SHORT_5_6_5: number;\r\n VALIDATE_STATUS: number;\r\n VENDOR: number;\r\n VERSION: number;\r\n VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;\r\n VERTEX_ATTRIB_ARRAY_ENABLED: number;\r\n VERTEX_ATTRIB_ARRAY_NORMALIZED: number;\r\n VERTEX_ATTRIB_ARRAY_POINTER: number;\r\n VERTEX_ATTRIB_ARRAY_SIZE: number;\r\n VERTEX_ATTRIB_ARRAY_STRIDE: number;\r\n VERTEX_ATTRIB_ARRAY_TYPE: number;\r\n VERTEX_SHADER: number;\r\n VIEWPORT: number;\r\n ZERO: number;\r\n}\r\n\r\ndeclare var WebGLRenderingContext: {\r\n prototype: WebGLRenderingContext;\r\n new(): WebGLRenderingContext;\r\n ACTIVE_ATTRIBUTES: number;\r\n ACTIVE_TEXTURE: number;\r\n ACTIVE_UNIFORMS: number;\r\n ALIASED_LINE_WIDTH_RANGE: number;\r\n ALIASED_POINT_SIZE_RANGE: number;\r\n ALPHA: number;\r\n ALPHA_BITS: number;\r\n ALWAYS: number;\r\n ARRAY_BUFFER: number;\r\n ARRAY_BUFFER_BINDING: number;\r\n ATTACHED_SHADERS: number;\r\n BACK: number;\r\n BLEND: number;\r\n BLEND_COLOR: number;\r\n BLEND_DST_ALPHA: number;\r\n BLEND_DST_RGB: number;\r\n BLEND_EQUATION: number;\r\n BLEND_EQUATION_ALPHA: number;\r\n BLEND_EQUATION_RGB: number;\r\n BLEND_SRC_ALPHA: number;\r\n BLEND_SRC_RGB: number;\r\n BLUE_BITS: number;\r\n BOOL: number;\r\n BOOL_VEC2: number;\r\n BOOL_VEC3: number;\r\n BOOL_VEC4: number;\r\n BROWSER_DEFAULT_WEBGL: number;\r\n BUFFER_SIZE: number;\r\n BUFFER_USAGE: number;\r\n BYTE: number;\r\n CCW: number;\r\n CLAMP_TO_EDGE: number;\r\n COLOR_ATTACHMENT0: number;\r\n COLOR_BUFFER_BIT: number;\r\n COLOR_CLEAR_VALUE: number;\r\n COLOR_WRITEMASK: number;\r\n COMPILE_STATUS: number;\r\n COMPRESSED_TEXTURE_FORMATS: number;\r\n CONSTANT_ALPHA: number;\r\n CONSTANT_COLOR: number;\r\n CONTEXT_LOST_WEBGL: number;\r\n CULL_FACE: number;\r\n CULL_FACE_MODE: number;\r\n CURRENT_PROGRAM: number;\r\n CURRENT_VERTEX_ATTRIB: number;\r\n CW: number;\r\n DECR: number;\r\n DECR_WRAP: number;\r\n DELETE_STATUS: number;\r\n DEPTH_ATTACHMENT: number;\r\n DEPTH_BITS: number;\r\n DEPTH_BUFFER_BIT: number;\r\n DEPTH_CLEAR_VALUE: number;\r\n DEPTH_COMPONENT: number;\r\n DEPTH_COMPONENT16: number;\r\n DEPTH_FUNC: number;\r\n DEPTH_RANGE: number;\r\n DEPTH_STENCIL: number;\r\n DEPTH_STENCIL_ATTACHMENT: number;\r\n DEPTH_TEST: number;\r\n DEPTH_WRITEMASK: number;\r\n DITHER: number;\r\n DONT_CARE: number;\r\n DST_ALPHA: number;\r\n DST_COLOR: number;\r\n DYNAMIC_DRAW: number;\r\n ELEMENT_ARRAY_BUFFER: number;\r\n ELEMENT_ARRAY_BUFFER_BINDING: number;\r\n EQUAL: number;\r\n FASTEST: number;\r\n FLOAT: number;\r\n FLOAT_MAT2: number;\r\n FLOAT_MAT3: number;\r\n FLOAT_MAT4: number;\r\n FLOAT_VEC2: number;\r\n FLOAT_VEC3: number;\r\n FLOAT_VEC4: number;\r\n FRAGMENT_SHADER: number;\r\n FRAMEBUFFER: number;\r\n FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;\r\n FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;\r\n FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;\r\n FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;\r\n FRAMEBUFFER_BINDING: number;\r\n FRAMEBUFFER_COMPLETE: number;\r\n FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;\r\n FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;\r\n FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;\r\n FRAMEBUFFER_UNSUPPORTED: number;\r\n FRONT: number;\r\n FRONT_AND_BACK: number;\r\n FRONT_FACE: number;\r\n FUNC_ADD: number;\r\n FUNC_REVERSE_SUBTRACT: number;\r\n FUNC_SUBTRACT: number;\r\n GENERATE_MIPMAP_HINT: number;\r\n GEQUAL: number;\r\n GREATER: number;\r\n GREEN_BITS: number;\r\n HIGH_FLOAT: number;\r\n HIGH_INT: number;\r\n IMPLEMENTATION_COLOR_READ_FORMAT: number;\r\n IMPLEMENTATION_COLOR_READ_TYPE: number;\r\n INCR: number;\r\n INCR_WRAP: number;\r\n INT: number;\r\n INT_VEC2: number;\r\n INT_VEC3: number;\r\n INT_VEC4: number;\r\n INVALID_ENUM: number;\r\n INVALID_FRAMEBUFFER_OPERATION: number;\r\n INVALID_OPERATION: number;\r\n INVALID_VALUE: number;\r\n INVERT: number;\r\n KEEP: number;\r\n LEQUAL: number;\r\n LESS: number;\r\n LINEAR: number;\r\n LINEAR_MIPMAP_LINEAR: number;\r\n LINEAR_MIPMAP_NEAREST: number;\r\n LINES: number;\r\n LINE_LOOP: number;\r\n LINE_STRIP: number;\r\n LINE_WIDTH: number;\r\n LINK_STATUS: number;\r\n LOW_FLOAT: number;\r\n LOW_INT: number;\r\n LUMINANCE: number;\r\n LUMINANCE_ALPHA: number;\r\n MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;\r\n MAX_CUBE_MAP_TEXTURE_SIZE: number;\r\n MAX_FRAGMENT_UNIFORM_VECTORS: number;\r\n MAX_RENDERBUFFER_SIZE: number;\r\n MAX_TEXTURE_IMAGE_UNITS: number;\r\n MAX_TEXTURE_SIZE: number;\r\n MAX_VARYING_VECTORS: number;\r\n MAX_VERTEX_ATTRIBS: number;\r\n MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;\r\n MAX_VERTEX_UNIFORM_VECTORS: number;\r\n MAX_VIEWPORT_DIMS: number;\r\n MEDIUM_FLOAT: number;\r\n MEDIUM_INT: number;\r\n MIRRORED_REPEAT: number;\r\n NEAREST: number;\r\n NEAREST_MIPMAP_LINEAR: number;\r\n NEAREST_MIPMAP_NEAREST: number;\r\n NEVER: number;\r\n NICEST: number;\r\n NONE: number;\r\n NOTEQUAL: number;\r\n NO_ERROR: number;\r\n ONE: number;\r\n ONE_MINUS_CONSTANT_ALPHA: number;\r\n ONE_MINUS_CONSTANT_COLOR: number;\r\n ONE_MINUS_DST_ALPHA: number;\r\n ONE_MINUS_DST_COLOR: number;\r\n ONE_MINUS_SRC_ALPHA: number;\r\n ONE_MINUS_SRC_COLOR: number;\r\n OUT_OF_MEMORY: number;\r\n PACK_ALIGNMENT: number;\r\n POINTS: number;\r\n POLYGON_OFFSET_FACTOR: number;\r\n POLYGON_OFFSET_FILL: number;\r\n POLYGON_OFFSET_UNITS: number;\r\n RED_BITS: number;\r\n RENDERBUFFER: number;\r\n RENDERBUFFER_ALPHA_SIZE: number;\r\n RENDERBUFFER_BINDING: number;\r\n RENDERBUFFER_BLUE_SIZE: number;\r\n RENDERBUFFER_DEPTH_SIZE: number;\r\n RENDERBUFFER_GREEN_SIZE: number;\r\n RENDERBUFFER_HEIGHT: number;\r\n RENDERBUFFER_INTERNAL_FORMAT: number;\r\n RENDERBUFFER_RED_SIZE: number;\r\n RENDERBUFFER_STENCIL_SIZE: number;\r\n RENDERBUFFER_WIDTH: number;\r\n RENDERER: number;\r\n REPEAT: number;\r\n REPLACE: number;\r\n RGB: number;\r\n RGB565: number;\r\n RGB5_A1: number;\r\n RGBA: number;\r\n RGBA4: number;\r\n SAMPLER_2D: number;\r\n SAMPLER_CUBE: number;\r\n SAMPLES: number;\r\n SAMPLE_ALPHA_TO_COVERAGE: number;\r\n SAMPLE_BUFFERS: number;\r\n SAMPLE_COVERAGE: number;\r\n SAMPLE_COVERAGE_INVERT: number;\r\n SAMPLE_COVERAGE_VALUE: number;\r\n SCISSOR_BOX: number;\r\n SCISSOR_TEST: number;\r\n SHADER_TYPE: number;\r\n SHADING_LANGUAGE_VERSION: number;\r\n SHORT: number;\r\n SRC_ALPHA: number;\r\n SRC_ALPHA_SATURATE: number;\r\n SRC_COLOR: number;\r\n STATIC_DRAW: number;\r\n STENCIL_ATTACHMENT: number;\r\n STENCIL_BACK_FAIL: number;\r\n STENCIL_BACK_FUNC: number;\r\n STENCIL_BACK_PASS_DEPTH_FAIL: number;\r\n STENCIL_BACK_PASS_DEPTH_PASS: number;\r\n STENCIL_BACK_REF: number;\r\n STENCIL_BACK_VALUE_MASK: number;\r\n STENCIL_BACK_WRITEMASK: number;\r\n STENCIL_BITS: number;\r\n STENCIL_BUFFER_BIT: number;\r\n STENCIL_CLEAR_VALUE: number;\r\n STENCIL_FAIL: number;\r\n STENCIL_FUNC: number;\r\n STENCIL_INDEX: number;\r\n STENCIL_INDEX8: number;\r\n STENCIL_PASS_DEPTH_FAIL: number;\r\n STENCIL_PASS_DEPTH_PASS: number;\r\n STENCIL_REF: number;\r\n STENCIL_TEST: number;\r\n STENCIL_VALUE_MASK: number;\r\n STENCIL_WRITEMASK: number;\r\n STREAM_DRAW: number;\r\n SUBPIXEL_BITS: number;\r\n TEXTURE: number;\r\n TEXTURE0: number;\r\n TEXTURE1: number;\r\n TEXTURE10: number;\r\n TEXTURE11: number;\r\n TEXTURE12: number;\r\n TEXTURE13: number;\r\n TEXTURE14: number;\r\n TEXTURE15: number;\r\n TEXTURE16: number;\r\n TEXTURE17: number;\r\n TEXTURE18: number;\r\n TEXTURE19: number;\r\n TEXTURE2: number;\r\n TEXTURE20: number;\r\n TEXTURE21: number;\r\n TEXTURE22: number;\r\n TEXTURE23: number;\r\n TEXTURE24: number;\r\n TEXTURE25: number;\r\n TEXTURE26: number;\r\n TEXTURE27: number;\r\n TEXTURE28: number;\r\n TEXTURE29: number;\r\n TEXTURE3: number;\r\n TEXTURE30: number;\r\n TEXTURE31: number;\r\n TEXTURE4: number;\r\n TEXTURE5: number;\r\n TEXTURE6: number;\r\n TEXTURE7: number;\r\n TEXTURE8: number;\r\n TEXTURE9: number;\r\n TEXTURE_2D: number;\r\n TEXTURE_BINDING_2D: number;\r\n TEXTURE_BINDING_CUBE_MAP: number;\r\n TEXTURE_CUBE_MAP: number;\r\n TEXTURE_CUBE_MAP_NEGATIVE_X: number;\r\n TEXTURE_CUBE_MAP_NEGATIVE_Y: number;\r\n TEXTURE_CUBE_MAP_NEGATIVE_Z: number;\r\n TEXTURE_CUBE_MAP_POSITIVE_X: number;\r\n TEXTURE_CUBE_MAP_POSITIVE_Y: number;\r\n TEXTURE_CUBE_MAP_POSITIVE_Z: number;\r\n TEXTURE_MAG_FILTER: number;\r\n TEXTURE_MIN_FILTER: number;\r\n TEXTURE_WRAP_S: number;\r\n TEXTURE_WRAP_T: number;\r\n TRIANGLES: number;\r\n TRIANGLE_FAN: number;\r\n TRIANGLE_STRIP: number;\r\n UNPACK_ALIGNMENT: number;\r\n UNPACK_COLORSPACE_CONVERSION_WEBGL: number;\r\n UNPACK_FLIP_Y_WEBGL: number;\r\n UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;\r\n UNSIGNED_BYTE: number;\r\n UNSIGNED_INT: number;\r\n UNSIGNED_SHORT: number;\r\n UNSIGNED_SHORT_4_4_4_4: number;\r\n UNSIGNED_SHORT_5_5_5_1: number;\r\n UNSIGNED_SHORT_5_6_5: number;\r\n VALIDATE_STATUS: number;\r\n VENDOR: number;\r\n VERSION: number;\r\n VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;\r\n VERTEX_ATTRIB_ARRAY_ENABLED: number;\r\n VERTEX_ATTRIB_ARRAY_NORMALIZED: number;\r\n VERTEX_ATTRIB_ARRAY_POINTER: number;\r\n VERTEX_ATTRIB_ARRAY_SIZE: number;\r\n VERTEX_ATTRIB_ARRAY_STRIDE: number;\r\n VERTEX_ATTRIB_ARRAY_TYPE: number;\r\n VERTEX_SHADER: number;\r\n VIEWPORT: number;\r\n ZERO: number;\r\n}\r\n\r\ninterface WebGLShader extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLShader: {\r\n prototype: WebGLShader;\r\n new(): WebGLShader;\r\n}\r\n\r\ninterface WebGLShaderPrecisionFormat {\r\n precision: number;\r\n rangeMax: number;\r\n rangeMin: number;\r\n}\r\n\r\ndeclare var WebGLShaderPrecisionFormat: {\r\n prototype: WebGLShaderPrecisionFormat;\r\n new(): WebGLShaderPrecisionFormat;\r\n}\r\n\r\ninterface WebGLTexture extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLTexture: {\r\n prototype: WebGLTexture;\r\n new(): WebGLTexture;\r\n}\r\n\r\ninterface WebGLUniformLocation {\r\n}\r\n\r\ndeclare var WebGLUniformLocation: {\r\n prototype: WebGLUniformLocation;\r\n new(): WebGLUniformLocation;\r\n}\r\n\r\ninterface WebKitCSSMatrix {\r\n a: number;\r\n b: number;\r\n c: number;\r\n d: number;\r\n e: number;\r\n f: number;\r\n m11: number;\r\n m12: number;\r\n m13: number;\r\n m14: number;\r\n m21: number;\r\n m22: number;\r\n m23: number;\r\n m24: number;\r\n m31: number;\r\n m32: number;\r\n m33: number;\r\n m34: number;\r\n m41: number;\r\n m42: number;\r\n m43: number;\r\n m44: number;\r\n inverse(): WebKitCSSMatrix;\r\n multiply(secondMatrix: WebKitCSSMatrix): WebKitCSSMatrix;\r\n rotate(angleX: number, angleY?: number, angleZ?: number): WebKitCSSMatrix;\r\n rotateAxisAngle(x: number, y: number, z: number, angle: number): WebKitCSSMatrix;\r\n scale(scaleX: number, scaleY?: number, scaleZ?: number): WebKitCSSMatrix;\r\n setMatrixValue(value: string): void;\r\n skewX(angle: number): WebKitCSSMatrix;\r\n skewY(angle: number): WebKitCSSMatrix;\r\n toString(): string;\r\n translate(x: number, y: number, z?: number): WebKitCSSMatrix;\r\n}\r\n\r\ndeclare var WebKitCSSMatrix: {\r\n prototype: WebKitCSSMatrix;\r\n new(text?: string): WebKitCSSMatrix;\r\n}\r\n\r\ninterface WebKitPoint {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var WebKitPoint: {\r\n prototype: WebKitPoint;\r\n new(x?: number, y?: number): WebKitPoint;\r\n}\r\n\r\ninterface WebSocket extends EventTarget {\r\n binaryType: string;\r\n bufferedAmount: number;\r\n extensions: string;\r\n onclose: (ev: CloseEvent) => any;\r\n onerror: (ev: Event) => any;\r\n onmessage: (ev: MessageEvent) => any;\r\n onopen: (ev: Event) => any;\r\n protocol: string;\r\n readyState: number;\r\n url: string;\r\n close(code?: number, reason?: string): void;\r\n send(data: any): void;\r\n CLOSED: number;\r\n CLOSING: number;\r\n CONNECTING: number;\r\n OPEN: number;\r\n addEventListener(type: \"close\", listener: (ev: CloseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"open\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var WebSocket: {\r\n prototype: WebSocket;\r\n new(url: string, protocols?: string | string[]): WebSocket;\r\n CLOSED: number;\r\n CLOSING: number;\r\n CONNECTING: number;\r\n OPEN: number;\r\n}\r\n\r\ninterface WheelEvent extends MouseEvent {\r\n deltaMode: number;\r\n deltaX: number;\r\n deltaY: number;\r\n deltaZ: number;\r\n getCurrentPoint(element: Element): void;\r\n initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void;\r\n DOM_DELTA_LINE: number;\r\n DOM_DELTA_PAGE: number;\r\n DOM_DELTA_PIXEL: number;\r\n}\r\n\r\ndeclare var WheelEvent: {\r\n prototype: WheelEvent;\r\n new(typeArg: string, eventInitDict?: WheelEventInit): WheelEvent;\r\n DOM_DELTA_LINE: number;\r\n DOM_DELTA_PAGE: number;\r\n DOM_DELTA_PIXEL: number;\r\n}\r\n\r\ninterface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64 {\r\n animationStartTime: number;\r\n applicationCache: ApplicationCache;\r\n clientInformation: Navigator;\r\n closed: boolean;\r\n crypto: Crypto;\r\n defaultStatus: string;\r\n devicePixelRatio: number;\r\n doNotTrack: string;\r\n document: Document;\r\n event: Event;\r\n external: External;\r\n frameElement: Element;\r\n frames: Window;\r\n history: History;\r\n innerHeight: number;\r\n innerWidth: number;\r\n length: number;\r\n location: Location;\r\n locationbar: BarProp;\r\n menubar: BarProp;\r\n msAnimationStartTime: number;\r\n name: string;\r\n navigator: Navigator;\r\n offscreenBuffering: string | boolean;\r\n onabort: (ev: Event) => any;\r\n onafterprint: (ev: Event) => any;\r\n onbeforeprint: (ev: Event) => any;\r\n onbeforeunload: (ev: BeforeUnloadEvent) => any;\r\n onblur: (ev: FocusEvent) => any;\r\n oncanplay: (ev: Event) => any;\r\n oncanplaythrough: (ev: Event) => any;\r\n onchange: (ev: Event) => any;\r\n onclick: (ev: MouseEvent) => any;\r\n oncompassneedscalibration: (ev: Event) => any;\r\n oncontextmenu: (ev: PointerEvent) => any;\r\n ondblclick: (ev: MouseEvent) => any;\r\n ondevicemotion: (ev: DeviceMotionEvent) => any;\r\n ondeviceorientation: (ev: DeviceOrientationEvent) => any;\r\n ondrag: (ev: DragEvent) => any;\r\n ondragend: (ev: DragEvent) => any;\r\n ondragenter: (ev: DragEvent) => any;\r\n ondragleave: (ev: DragEvent) => any;\r\n ondragover: (ev: DragEvent) => any;\r\n ondragstart: (ev: DragEvent) => any;\r\n ondrop: (ev: DragEvent) => any;\r\n ondurationchange: (ev: Event) => any;\r\n onemptied: (ev: Event) => any;\r\n onended: (ev: Event) => any;\r\n onerror: ErrorEventHandler;\r\n onfocus: (ev: FocusEvent) => any;\r\n onhashchange: (ev: HashChangeEvent) => any;\r\n oninput: (ev: Event) => any;\r\n onkeydown: (ev: KeyboardEvent) => any;\r\n onkeypress: (ev: KeyboardEvent) => any;\r\n onkeyup: (ev: KeyboardEvent) => any;\r\n onload: (ev: Event) => any;\r\n onloadeddata: (ev: Event) => any;\r\n onloadedmetadata: (ev: Event) => any;\r\n onloadstart: (ev: Event) => any;\r\n onmessage: (ev: MessageEvent) => any;\r\n onmousedown: (ev: MouseEvent) => any;\r\n onmouseenter: (ev: MouseEvent) => any;\r\n onmouseleave: (ev: MouseEvent) => any;\r\n onmousemove: (ev: MouseEvent) => any;\r\n onmouseout: (ev: MouseEvent) => any;\r\n onmouseover: (ev: MouseEvent) => any;\r\n onmouseup: (ev: MouseEvent) => any;\r\n onmousewheel: (ev: MouseWheelEvent) => any;\r\n onmsgesturechange: (ev: MSGestureEvent) => any;\r\n onmsgesturedoubletap: (ev: MSGestureEvent) => any;\r\n onmsgestureend: (ev: MSGestureEvent) => any;\r\n onmsgesturehold: (ev: MSGestureEvent) => any;\r\n onmsgesturestart: (ev: MSGestureEvent) => any;\r\n onmsgesturetap: (ev: MSGestureEvent) => any;\r\n onmsinertiastart: (ev: MSGestureEvent) => any;\r\n onmspointercancel: (ev: MSPointerEvent) => any;\r\n onmspointerdown: (ev: MSPointerEvent) => any;\r\n onmspointerenter: (ev: MSPointerEvent) => any;\r\n onmspointerleave: (ev: MSPointerEvent) => any;\r\n onmspointermove: (ev: MSPointerEvent) => any;\r\n onmspointerout: (ev: MSPointerEvent) => any;\r\n onmspointerover: (ev: MSPointerEvent) => any;\r\n onmspointerup: (ev: MSPointerEvent) => any;\r\n onoffline: (ev: Event) => any;\r\n ononline: (ev: Event) => any;\r\n onorientationchange: (ev: Event) => any;\r\n onpagehide: (ev: PageTransitionEvent) => any;\r\n onpageshow: (ev: PageTransitionEvent) => any;\r\n onpause: (ev: Event) => any;\r\n onplay: (ev: Event) => any;\r\n onplaying: (ev: Event) => any;\r\n onpopstate: (ev: PopStateEvent) => any;\r\n onprogress: (ev: ProgressEvent) => any;\r\n onratechange: (ev: Event) => any;\r\n onreadystatechange: (ev: ProgressEvent) => any;\r\n onreset: (ev: Event) => any;\r\n onresize: (ev: UIEvent) => any;\r\n onscroll: (ev: UIEvent) => any;\r\n onseeked: (ev: Event) => any;\r\n onseeking: (ev: Event) => any;\r\n onselect: (ev: UIEvent) => any;\r\n onstalled: (ev: Event) => any;\r\n onstorage: (ev: StorageEvent) => any;\r\n onsubmit: (ev: Event) => any;\r\n onsuspend: (ev: Event) => any;\r\n ontimeupdate: (ev: Event) => any;\r\n ontouchcancel: any;\r\n ontouchend: any;\r\n ontouchmove: any;\r\n ontouchstart: any;\r\n onunload: (ev: Event) => any;\r\n onvolumechange: (ev: Event) => any;\r\n onwaiting: (ev: Event) => any;\r\n opener: Window;\r\n orientation: string | number;\r\n outerHeight: number;\r\n outerWidth: number;\r\n pageXOffset: number;\r\n pageYOffset: number;\r\n parent: Window;\r\n performance: Performance;\r\n personalbar: BarProp;\r\n screen: Screen;\r\n screenLeft: number;\r\n screenTop: number;\r\n screenX: number;\r\n screenY: number;\r\n scrollX: number;\r\n scrollY: number;\r\n scrollbars: BarProp;\r\n self: Window;\r\n status: string;\r\n statusbar: BarProp;\r\n styleMedia: StyleMedia;\r\n toolbar: BarProp;\r\n top: Window;\r\n window: Window;\r\n URL: URL;\r\n alert(message?: any): void;\r\n blur(): void;\r\n cancelAnimationFrame(handle: number): void;\r\n captureEvents(): void;\r\n close(): void;\r\n confirm(message?: string): boolean;\r\n focus(): void;\r\n getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;\r\n getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;\r\n getSelection(): Selection;\r\n matchMedia(mediaQuery: string): MediaQueryList;\r\n moveBy(x?: number, y?: number): void;\r\n moveTo(x?: number, y?: number): void;\r\n msCancelRequestAnimationFrame(handle: number): void;\r\n msMatchMedia(mediaQuery: string): MediaQueryList;\r\n msRequestAnimationFrame(callback: FrameRequestCallback): number;\r\n msWriteProfilerMark(profilerMarkName: string): void;\r\n open(url?: string, target?: string, features?: string, replace?: boolean): Window;\r\n postMessage(message: any, targetOrigin: string, ports?: any): void;\r\n print(): void;\r\n prompt(message?: string, _default?: string): string;\r\n releaseEvents(): void;\r\n requestAnimationFrame(callback: FrameRequestCallback): number;\r\n resizeBy(x?: number, y?: number): void;\r\n resizeTo(x?: number, y?: number): void;\r\n scroll(x?: number, y?: number): void;\r\n scrollBy(x?: number, y?: number): void;\r\n scrollTo(x?: number, y?: number): void;\r\n webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;\r\n webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"afterprint\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeprint\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeunload\", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"compassneedscalibration\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"devicemotion\", listener: (ev: DeviceMotionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deviceorientation\", listener: (ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"hashchange\", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"offline\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"online\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"orientationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pagehide\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pageshow\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"popstate\", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"readystatechange\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"storage\", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"unload\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: Window;\r\n}\r\n\r\ndeclare var Window: {\r\n prototype: Window;\r\n new(): Window;\r\n}\r\n\r\ninterface Worker extends EventTarget, AbstractWorker {\r\n onmessage: (ev: MessageEvent) => any;\r\n postMessage(message: any, ports?: any): void;\r\n terminate(): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Worker: {\r\n prototype: Worker;\r\n new(stringUrl: string): Worker;\r\n}\r\n\r\ninterface XMLDocument extends Document {\r\n}\r\n\r\ndeclare var XMLDocument: {\r\n prototype: XMLDocument;\r\n new(): XMLDocument;\r\n}\r\n\r\ninterface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {\r\n msCaching: string;\r\n onreadystatechange: (ev: ProgressEvent) => any;\r\n readyState: number;\r\n response: any;\r\n responseBody: any;\r\n responseText: string;\r\n responseType: string;\r\n responseXML: any;\r\n status: number;\r\n statusText: string;\r\n timeout: number;\r\n upload: XMLHttpRequestUpload;\r\n withCredentials: boolean;\r\n abort(): void;\r\n getAllResponseHeaders(): string;\r\n getResponseHeader(header: string): string;\r\n msCachingEnabled(): boolean;\r\n open(method: string, url: string, async?: boolean, user?: string, password?: string): void;\r\n overrideMimeType(mime: string): void;\r\n send(data?: Document): void;\r\n send(data?: string): void;\r\n send(data?: any): void;\r\n setRequestHeader(header: string, value: string): void;\r\n DONE: number;\r\n HEADERS_RECEIVED: number;\r\n LOADING: number;\r\n OPENED: number;\r\n UNSENT: number;\r\n addEventListener(type: \"abort\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadend\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"readystatechange\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeout\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var XMLHttpRequest: {\r\n prototype: XMLHttpRequest;\r\n new(): XMLHttpRequest;\r\n DONE: number;\r\n HEADERS_RECEIVED: number;\r\n LOADING: number;\r\n OPENED: number;\r\n UNSENT: number;\r\n create(): XMLHttpRequest;\r\n}\r\n\r\ninterface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var XMLHttpRequestUpload: {\r\n prototype: XMLHttpRequestUpload;\r\n new(): XMLHttpRequestUpload;\r\n}\r\n\r\ninterface XMLSerializer {\r\n serializeToString(target: Node): string;\r\n}\r\n\r\ndeclare var XMLSerializer: {\r\n prototype: XMLSerializer;\r\n new(): XMLSerializer;\r\n}\r\n\r\ninterface XPathEvaluator {\r\n createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;\r\n createNSResolver(nodeResolver?: Node): XPathNSResolver;\r\n evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver, type: number, result: XPathResult): XPathResult;\r\n}\r\n\r\ndeclare var XPathEvaluator: {\r\n prototype: XPathEvaluator;\r\n new(): XPathEvaluator;\r\n}\r\n\r\ninterface XPathExpression {\r\n evaluate(contextNode: Node, type: number, result: XPathResult): XPathExpression;\r\n}\r\n\r\ndeclare var XPathExpression: {\r\n prototype: XPathExpression;\r\n new(): XPathExpression;\r\n}\r\n\r\ninterface XPathNSResolver {\r\n lookupNamespaceURI(prefix: string): string;\r\n}\r\n\r\ndeclare var XPathNSResolver: {\r\n prototype: XPathNSResolver;\r\n new(): XPathNSResolver;\r\n}\r\n\r\ninterface XPathResult {\r\n booleanValue: boolean;\r\n invalidIteratorState: boolean;\r\n numberValue: number;\r\n resultType: number;\r\n singleNodeValue: Node;\r\n snapshotLength: number;\r\n stringValue: string;\r\n iterateNext(): Node;\r\n snapshotItem(index: number): Node;\r\n ANY_TYPE: number;\r\n ANY_UNORDERED_NODE_TYPE: number;\r\n BOOLEAN_TYPE: number;\r\n FIRST_ORDERED_NODE_TYPE: number;\r\n NUMBER_TYPE: number;\r\n ORDERED_NODE_ITERATOR_TYPE: number;\r\n ORDERED_NODE_SNAPSHOT_TYPE: number;\r\n STRING_TYPE: number;\r\n UNORDERED_NODE_ITERATOR_TYPE: number;\r\n UNORDERED_NODE_SNAPSHOT_TYPE: number;\r\n}\r\n\r\ndeclare var XPathResult: {\r\n prototype: XPathResult;\r\n new(): XPathResult;\r\n ANY_TYPE: number;\r\n ANY_UNORDERED_NODE_TYPE: number;\r\n BOOLEAN_TYPE: number;\r\n FIRST_ORDERED_NODE_TYPE: number;\r\n NUMBER_TYPE: number;\r\n ORDERED_NODE_ITERATOR_TYPE: number;\r\n ORDERED_NODE_SNAPSHOT_TYPE: number;\r\n STRING_TYPE: number;\r\n UNORDERED_NODE_ITERATOR_TYPE: number;\r\n UNORDERED_NODE_SNAPSHOT_TYPE: number;\r\n}\r\n\r\ninterface XSLTProcessor {\r\n clearParameters(): void;\r\n getParameter(namespaceURI: string, localName: string): any;\r\n importStylesheet(style: Node): void;\r\n removeParameter(namespaceURI: string, localName: string): void;\r\n reset(): void;\r\n setParameter(namespaceURI: string, localName: string, value: any): void;\r\n transformToDocument(source: Node): Document;\r\n transformToFragment(source: Node, document: Document): DocumentFragment;\r\n}\r\n\r\ndeclare var XSLTProcessor: {\r\n prototype: XSLTProcessor;\r\n new(): XSLTProcessor;\r\n}\r\n\r\ninterface AbstractWorker {\r\n onerror: (ev: Event) => any;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface ChildNode {\r\n remove(): void;\r\n}\r\n\r\ninterface DOML2DeprecatedColorProperty {\r\n color: string;\r\n}\r\n\r\ninterface DOML2DeprecatedSizeProperty {\r\n size: number;\r\n}\r\n\r\ninterface DocumentEvent {\r\n createEvent(eventInterface:\"AnimationEvent\"): AnimationEvent;\r\n createEvent(eventInterface:\"AriaRequestEvent\"): AriaRequestEvent;\r\n createEvent(eventInterface:\"AudioProcessingEvent\"): AudioProcessingEvent;\r\n createEvent(eventInterface:\"BeforeUnloadEvent\"): BeforeUnloadEvent;\r\n createEvent(eventInterface:\"ClipboardEvent\"): ClipboardEvent;\r\n createEvent(eventInterface:\"CloseEvent\"): CloseEvent;\r\n createEvent(eventInterface:\"CommandEvent\"): CommandEvent;\r\n createEvent(eventInterface:\"CompositionEvent\"): CompositionEvent;\r\n createEvent(eventInterface:\"CustomEvent\"): CustomEvent;\r\n createEvent(eventInterface:\"DeviceMotionEvent\"): DeviceMotionEvent;\r\n createEvent(eventInterface:\"DeviceOrientationEvent\"): DeviceOrientationEvent;\r\n createEvent(eventInterface:\"DragEvent\"): DragEvent;\r\n createEvent(eventInterface:\"ErrorEvent\"): ErrorEvent;\r\n createEvent(eventInterface:\"Event\"): Event;\r\n createEvent(eventInterface:\"Events\"): Event;\r\n createEvent(eventInterface:\"FocusEvent\"): FocusEvent;\r\n createEvent(eventInterface:\"GamepadEvent\"): GamepadEvent;\r\n createEvent(eventInterface:\"HashChangeEvent\"): HashChangeEvent;\r\n createEvent(eventInterface:\"IDBVersionChangeEvent\"): IDBVersionChangeEvent;\r\n createEvent(eventInterface:\"KeyboardEvent\"): KeyboardEvent;\r\n createEvent(eventInterface:\"LongRunningScriptDetectedEvent\"): LongRunningScriptDetectedEvent;\r\n createEvent(eventInterface:\"MSGestureEvent\"): MSGestureEvent;\r\n createEvent(eventInterface:\"MSManipulationEvent\"): MSManipulationEvent;\r\n createEvent(eventInterface:\"MSMediaKeyMessageEvent\"): MSMediaKeyMessageEvent;\r\n createEvent(eventInterface:\"MSMediaKeyNeededEvent\"): MSMediaKeyNeededEvent;\r\n createEvent(eventInterface:\"MSPointerEvent\"): MSPointerEvent;\r\n createEvent(eventInterface:\"MSSiteModeEvent\"): MSSiteModeEvent;\r\n createEvent(eventInterface:\"MessageEvent\"): MessageEvent;\r\n createEvent(eventInterface:\"MouseEvent\"): MouseEvent;\r\n createEvent(eventInterface:\"MouseEvents\"): MouseEvent;\r\n createEvent(eventInterface:\"MouseWheelEvent\"): MouseWheelEvent;\r\n createEvent(eventInterface:\"MutationEvent\"): MutationEvent;\r\n createEvent(eventInterface:\"MutationEvents\"): MutationEvent;\r\n createEvent(eventInterface:\"NavigationCompletedEvent\"): NavigationCompletedEvent;\r\n createEvent(eventInterface:\"NavigationEvent\"): NavigationEvent;\r\n createEvent(eventInterface:\"NavigationEventWithReferrer\"): NavigationEventWithReferrer;\r\n createEvent(eventInterface:\"OfflineAudioCompletionEvent\"): OfflineAudioCompletionEvent;\r\n createEvent(eventInterface:\"PageTransitionEvent\"): PageTransitionEvent;\r\n createEvent(eventInterface:\"PermissionRequestedEvent\"): PermissionRequestedEvent;\r\n createEvent(eventInterface:\"PointerEvent\"): PointerEvent;\r\n createEvent(eventInterface:\"PopStateEvent\"): PopStateEvent;\r\n createEvent(eventInterface:\"ProgressEvent\"): ProgressEvent;\r\n createEvent(eventInterface:\"SVGZoomEvent\"): SVGZoomEvent;\r\n createEvent(eventInterface:\"SVGZoomEvents\"): SVGZoomEvent;\r\n createEvent(eventInterface:\"ScriptNotifyEvent\"): ScriptNotifyEvent;\r\n createEvent(eventInterface:\"StorageEvent\"): StorageEvent;\r\n createEvent(eventInterface:\"TextEvent\"): TextEvent;\r\n createEvent(eventInterface:\"TouchEvent\"): TouchEvent;\r\n createEvent(eventInterface:\"TrackEvent\"): TrackEvent;\r\n createEvent(eventInterface:\"TransitionEvent\"): TransitionEvent;\r\n createEvent(eventInterface:\"UIEvent\"): UIEvent;\r\n createEvent(eventInterface:\"UIEvents\"): UIEvent;\r\n createEvent(eventInterface:\"UnviewableContentIdentifiedEvent\"): UnviewableContentIdentifiedEvent;\r\n createEvent(eventInterface:\"WebGLContextEvent\"): WebGLContextEvent;\r\n createEvent(eventInterface:\"WheelEvent\"): WheelEvent;\r\n createEvent(eventInterface: string): Event;\r\n}\r\n\r\ninterface ElementTraversal {\r\n childElementCount: number;\r\n firstElementChild: Element;\r\n lastElementChild: Element;\r\n nextElementSibling: Element;\r\n previousElementSibling: Element;\r\n}\r\n\r\ninterface GetSVGDocument {\r\n getSVGDocument(): Document;\r\n}\r\n\r\ninterface GlobalEventHandlers {\r\n onpointercancel: (ev: PointerEvent) => any;\r\n onpointerdown: (ev: PointerEvent) => any;\r\n onpointerenter: (ev: PointerEvent) => any;\r\n onpointerleave: (ev: PointerEvent) => any;\r\n onpointermove: (ev: PointerEvent) => any;\r\n onpointerout: (ev: PointerEvent) => any;\r\n onpointerover: (ev: PointerEvent) => any;\r\n onpointerup: (ev: PointerEvent) => any;\r\n onwheel: (ev: WheelEvent) => any;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own ch functionality for the object.\r\n */\r\n ch: string;\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own chOff functionality for the object.\r\n */\r\n chOff: string;\r\n /**\r\n * Sets or retrieves how text and other content are vertically aligned within the object that contains them.\r\n */\r\n vAlign: string;\r\n}\r\n\r\ninterface IDBEnvironment {\r\n indexedDB: IDBFactory;\r\n msIndexedDB: IDBFactory;\r\n}\r\n\r\ninterface LinkStyle {\r\n sheet: StyleSheet;\r\n}\r\n\r\ninterface MSBaseReader {\r\n onabort: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n onload: (ev: Event) => any;\r\n onloadend: (ev: ProgressEvent) => any;\r\n onloadstart: (ev: Event) => any;\r\n onprogress: (ev: ProgressEvent) => any;\r\n readyState: number;\r\n result: any;\r\n abort(): void;\r\n DONE: number;\r\n EMPTY: number;\r\n LOADING: number;\r\n addEventListener(type: \"abort\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadend\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface MSFileSaver {\r\n msSaveBlob(blob: any, defaultName?: string): boolean;\r\n msSaveOrOpenBlob(blob: any, defaultName?: string): boolean;\r\n}\r\n\r\ninterface MSNavigatorDoNotTrack {\r\n confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean;\r\n confirmWebWideTrackingException(args: ExceptionInformation): boolean;\r\n removeSiteSpecificTrackingException(args: ExceptionInformation): void;\r\n removeWebWideTrackingException(args: ExceptionInformation): void;\r\n storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void;\r\n storeWebWideTrackingException(args: StoreExceptionsInformation): void;\r\n}\r\n\r\ninterface NavigatorContentUtils {\r\n}\r\n\r\ninterface NavigatorGeolocation {\r\n geolocation: Geolocation;\r\n}\r\n\r\ninterface NavigatorID {\r\n appName: string;\r\n appVersion: string;\r\n platform: string;\r\n product: string;\r\n productSub: string;\r\n userAgent: string;\r\n vendor: string;\r\n vendorSub: string;\r\n}\r\n\r\ninterface NavigatorOnLine {\r\n onLine: boolean;\r\n}\r\n\r\ninterface NavigatorStorageUtils {\r\n}\r\n\r\ninterface NodeSelector {\r\n querySelector(selectors: string): Element;\r\n querySelectorAll(selectors: string): NodeListOf;\r\n}\r\n\r\ninterface RandomSource {\r\n getRandomValues(array: ArrayBufferView): ArrayBufferView;\r\n}\r\n\r\ninterface SVGAnimatedPathData {\r\n pathSegList: SVGPathSegList;\r\n}\r\n\r\ninterface SVGAnimatedPoints {\r\n animatedPoints: SVGPointList;\r\n points: SVGPointList;\r\n}\r\n\r\ninterface SVGExternalResourcesRequired {\r\n externalResourcesRequired: SVGAnimatedBoolean;\r\n}\r\n\r\ninterface SVGFilterPrimitiveStandardAttributes extends SVGStylable {\r\n height: SVGAnimatedLength;\r\n result: SVGAnimatedString;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n}\r\n\r\ninterface SVGFitToViewBox {\r\n preserveAspectRatio: SVGAnimatedPreserveAspectRatio;\r\n viewBox: SVGAnimatedRect;\r\n}\r\n\r\ninterface SVGLangSpace {\r\n xmllang: string;\r\n xmlspace: string;\r\n}\r\n\r\ninterface SVGLocatable {\r\n farthestViewportElement: SVGElement;\r\n nearestViewportElement: SVGElement;\r\n getBBox(): SVGRect;\r\n getCTM(): SVGMatrix;\r\n getScreenCTM(): SVGMatrix;\r\n getTransformToElement(element: SVGElement): SVGMatrix;\r\n}\r\n\r\ninterface SVGStylable {\r\n className: any;\r\n style: CSSStyleDeclaration;\r\n}\r\n\r\ninterface SVGTests {\r\n requiredExtensions: SVGStringList;\r\n requiredFeatures: SVGStringList;\r\n systemLanguage: SVGStringList;\r\n hasExtension(extension: string): boolean;\r\n}\r\n\r\ninterface SVGTransformable extends SVGLocatable {\r\n transform: SVGAnimatedTransformList;\r\n}\r\n\r\ninterface SVGURIReference {\r\n href: SVGAnimatedString;\r\n}\r\n\r\ninterface WindowBase64 {\r\n atob(encodedString: string): string;\r\n btoa(rawString: string): string;\r\n}\r\n\r\ninterface WindowConsole {\r\n console: Console;\r\n}\r\n\r\ninterface WindowLocalStorage {\r\n localStorage: Storage;\r\n}\r\n\r\ninterface WindowSessionStorage {\r\n sessionStorage: Storage;\r\n}\r\n\r\ninterface WindowTimers extends Object, WindowTimersExtension {\r\n clearInterval(handle: number): void;\r\n clearTimeout(handle: number): void;\r\n setInterval(handler: any, timeout?: any, ...args: any[]): number;\r\n setTimeout(handler: any, timeout?: any, ...args: any[]): number;\r\n}\r\n\r\ninterface WindowTimersExtension {\r\n clearImmediate(handle: number): void;\r\n msClearImmediate(handle: number): void;\r\n msSetImmediate(expression: any, ...args: any[]): number;\r\n setImmediate(expression: any, ...args: any[]): number;\r\n}\r\n\r\ninterface XMLHttpRequestEventTarget {\r\n onabort: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n onload: (ev: Event) => any;\r\n onloadend: (ev: ProgressEvent) => any;\r\n onloadstart: (ev: Event) => any;\r\n onprogress: (ev: ProgressEvent) => any;\r\n ontimeout: (ev: ProgressEvent) => any;\r\n addEventListener(type: \"abort\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadend\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeout\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface StorageEventInit extends EventInit {\r\n key?: string;\r\n oldValue?: string;\r\n newValue?: string;\r\n url: string;\r\n storageArea?: Storage;\r\n}\r\n\r\ninterface IDBObjectStoreParameters {\r\n keyPath?: string | string[];\r\n autoIncrement?: boolean;\r\n}\r\n\r\ninterface IDBIndexParameters {\r\n unique?: boolean;\r\n multiEntry?: boolean;\r\n}\r\n\r\ninterface NodeListOf extends NodeList {\r\n length: number;\r\n item(index: number): TNode;\r\n [index: number]: TNode;\r\n}\r\n\r\ninterface BlobPropertyBag {\r\n type?: string;\r\n endings?: string;\r\n}\r\n\r\ninterface FilePropertyBag {\r\n type?: string;\r\n lastModified?: number;\r\n}\r\n\r\ninterface EventListenerObject {\r\n handleEvent(evt: Event): void;\r\n}\r\n\r\ninterface MessageEventInit extends EventInit {\r\n data?: any;\r\n origin?: string;\r\n lastEventId?: string;\r\n channel?: string;\r\n source?: any;\r\n ports?: MessagePort[];\r\n}\r\n\r\ninterface ProgressEventInit extends EventInit {\r\n lengthComputable?: boolean;\r\n loaded?: number;\r\n total?: number;\r\n}\r\n\r\ninterface HTMLTemplateElement extends HTMLElement {\r\n content: DocumentFragment;\r\n}\r\n\r\ndeclare var HTMLTemplateElement: {\r\n prototype: HTMLTemplateElement;\r\n new(): HTMLTemplateElement;\r\n}\r\n\r\ninterface HTMLPictureElement extends HTMLElement {\r\n}\r\n\r\ndeclare var HTMLPictureElement: {\r\n prototype: HTMLPictureElement;\r\n new(): HTMLPictureElement;\r\n}\r\n\r\ndeclare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;\r\n\r\ninterface ErrorEventHandler {\r\n (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;\r\n}\r\ninterface PositionCallback {\r\n (position: Position): void;\r\n}\r\ninterface PositionErrorCallback {\r\n (error: PositionError): void;\r\n}\r\ninterface MediaQueryListListener {\r\n (mql: MediaQueryList): void;\r\n}\r\ninterface MSLaunchUriCallback {\r\n (): void;\r\n}\r\ninterface FrameRequestCallback {\r\n (time: number): void;\r\n}\r\ninterface MSUnsafeFunctionCallback {\r\n (): any;\r\n}\r\ninterface MSExecAtPriorityFunctionCallback {\r\n (...args: any[]): any;\r\n}\r\ninterface MutationCallback {\r\n (mutations: MutationRecord[], observer: MutationObserver): void;\r\n}\r\ninterface DecodeSuccessCallback {\r\n (decodedData: AudioBuffer): void;\r\n}\r\ninterface DecodeErrorCallback {\r\n (): void;\r\n}\r\ninterface FunctionStringCallback {\r\n (data: string): void;\r\n}\r\ndeclare var Audio: {new(src?: string): HTMLAudioElement; };\r\ndeclare var Image: {new(width?: number, height?: number): HTMLImageElement; };\r\ndeclare var Option: {new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; };\r\ndeclare var animationStartTime: number;\r\ndeclare var applicationCache: ApplicationCache;\r\ndeclare var clientInformation: Navigator;\r\ndeclare var closed: boolean;\r\ndeclare var crypto: Crypto;\r\ndeclare var defaultStatus: string;\r\ndeclare var devicePixelRatio: number;\r\ndeclare var doNotTrack: string;\r\ndeclare var document: Document;\r\ndeclare var event: Event;\r\ndeclare var external: External;\r\ndeclare var frameElement: Element;\r\ndeclare var frames: Window;\r\ndeclare var history: History;\r\ndeclare var innerHeight: number;\r\ndeclare var innerWidth: number;\r\ndeclare var length: number;\r\ndeclare var location: Location;\r\ndeclare var locationbar: BarProp;\r\ndeclare var menubar: BarProp;\r\ndeclare var msAnimationStartTime: number;\r\ndeclare var name: string;\r\ndeclare var navigator: Navigator;\r\ndeclare var offscreenBuffering: string | boolean;\r\ndeclare var onabort: (ev: Event) => any;\r\ndeclare var onafterprint: (ev: Event) => any;\r\ndeclare var onbeforeprint: (ev: Event) => any;\r\ndeclare var onbeforeunload: (ev: BeforeUnloadEvent) => any;\r\ndeclare var onblur: (ev: FocusEvent) => any;\r\ndeclare var oncanplay: (ev: Event) => any;\r\ndeclare var oncanplaythrough: (ev: Event) => any;\r\ndeclare var onchange: (ev: Event) => any;\r\ndeclare var onclick: (ev: MouseEvent) => any;\r\ndeclare var oncompassneedscalibration: (ev: Event) => any;\r\ndeclare var oncontextmenu: (ev: PointerEvent) => any;\r\ndeclare var ondblclick: (ev: MouseEvent) => any;\r\ndeclare var ondevicemotion: (ev: DeviceMotionEvent) => any;\r\ndeclare var ondeviceorientation: (ev: DeviceOrientationEvent) => any;\r\ndeclare var ondrag: (ev: DragEvent) => any;\r\ndeclare var ondragend: (ev: DragEvent) => any;\r\ndeclare var ondragenter: (ev: DragEvent) => any;\r\ndeclare var ondragleave: (ev: DragEvent) => any;\r\ndeclare var ondragover: (ev: DragEvent) => any;\r\ndeclare var ondragstart: (ev: DragEvent) => any;\r\ndeclare var ondrop: (ev: DragEvent) => any;\r\ndeclare var ondurationchange: (ev: Event) => any;\r\ndeclare var onemptied: (ev: Event) => any;\r\ndeclare var onended: (ev: Event) => any;\r\ndeclare var onerror: ErrorEventHandler;\r\ndeclare var onfocus: (ev: FocusEvent) => any;\r\ndeclare var onhashchange: (ev: HashChangeEvent) => any;\r\ndeclare var oninput: (ev: Event) => any;\r\ndeclare var onkeydown: (ev: KeyboardEvent) => any;\r\ndeclare var onkeypress: (ev: KeyboardEvent) => any;\r\ndeclare var onkeyup: (ev: KeyboardEvent) => any;\r\ndeclare var onload: (ev: Event) => any;\r\ndeclare var onloadeddata: (ev: Event) => any;\r\ndeclare var onloadedmetadata: (ev: Event) => any;\r\ndeclare var onloadstart: (ev: Event) => any;\r\ndeclare var onmessage: (ev: MessageEvent) => any;\r\ndeclare var onmousedown: (ev: MouseEvent) => any;\r\ndeclare var onmouseenter: (ev: MouseEvent) => any;\r\ndeclare var onmouseleave: (ev: MouseEvent) => any;\r\ndeclare var onmousemove: (ev: MouseEvent) => any;\r\ndeclare var onmouseout: (ev: MouseEvent) => any;\r\ndeclare var onmouseover: (ev: MouseEvent) => any;\r\ndeclare var onmouseup: (ev: MouseEvent) => any;\r\ndeclare var onmousewheel: (ev: MouseWheelEvent) => any;\r\ndeclare var onmsgesturechange: (ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturedoubletap: (ev: MSGestureEvent) => any;\r\ndeclare var onmsgestureend: (ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturehold: (ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturestart: (ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturetap: (ev: MSGestureEvent) => any;\r\ndeclare var onmsinertiastart: (ev: MSGestureEvent) => any;\r\ndeclare var onmspointercancel: (ev: MSPointerEvent) => any;\r\ndeclare var onmspointerdown: (ev: MSPointerEvent) => any;\r\ndeclare var onmspointerenter: (ev: MSPointerEvent) => any;\r\ndeclare var onmspointerleave: (ev: MSPointerEvent) => any;\r\ndeclare var onmspointermove: (ev: MSPointerEvent) => any;\r\ndeclare var onmspointerout: (ev: MSPointerEvent) => any;\r\ndeclare var onmspointerover: (ev: MSPointerEvent) => any;\r\ndeclare var onmspointerup: (ev: MSPointerEvent) => any;\r\ndeclare var onoffline: (ev: Event) => any;\r\ndeclare var ononline: (ev: Event) => any;\r\ndeclare var onorientationchange: (ev: Event) => any;\r\ndeclare var onpagehide: (ev: PageTransitionEvent) => any;\r\ndeclare var onpageshow: (ev: PageTransitionEvent) => any;\r\ndeclare var onpause: (ev: Event) => any;\r\ndeclare var onplay: (ev: Event) => any;\r\ndeclare var onplaying: (ev: Event) => any;\r\ndeclare var onpopstate: (ev: PopStateEvent) => any;\r\ndeclare var onprogress: (ev: ProgressEvent) => any;\r\ndeclare var onratechange: (ev: Event) => any;\r\ndeclare var onreadystatechange: (ev: ProgressEvent) => any;\r\ndeclare var onreset: (ev: Event) => any;\r\ndeclare var onresize: (ev: UIEvent) => any;\r\ndeclare var onscroll: (ev: UIEvent) => any;\r\ndeclare var onseeked: (ev: Event) => any;\r\ndeclare var onseeking: (ev: Event) => any;\r\ndeclare var onselect: (ev: UIEvent) => any;\r\ndeclare var onstalled: (ev: Event) => any;\r\ndeclare var onstorage: (ev: StorageEvent) => any;\r\ndeclare var onsubmit: (ev: Event) => any;\r\ndeclare var onsuspend: (ev: Event) => any;\r\ndeclare var ontimeupdate: (ev: Event) => any;\r\ndeclare var ontouchcancel: any;\r\ndeclare var ontouchend: any;\r\ndeclare var ontouchmove: any;\r\ndeclare var ontouchstart: any;\r\ndeclare var onunload: (ev: Event) => any;\r\ndeclare var onvolumechange: (ev: Event) => any;\r\ndeclare var onwaiting: (ev: Event) => any;\r\ndeclare var opener: Window;\r\ndeclare var orientation: string | number;\r\ndeclare var outerHeight: number;\r\ndeclare var outerWidth: number;\r\ndeclare var pageXOffset: number;\r\ndeclare var pageYOffset: number;\r\ndeclare var parent: Window;\r\ndeclare var performance: Performance;\r\ndeclare var personalbar: BarProp;\r\ndeclare var screen: Screen;\r\ndeclare var screenLeft: number;\r\ndeclare var screenTop: number;\r\ndeclare var screenX: number;\r\ndeclare var screenY: number;\r\ndeclare var scrollX: number;\r\ndeclare var scrollY: number;\r\ndeclare var scrollbars: BarProp;\r\ndeclare var self: Window;\r\ndeclare var status: string;\r\ndeclare var statusbar: BarProp;\r\ndeclare var styleMedia: StyleMedia;\r\ndeclare var toolbar: BarProp;\r\ndeclare var top: Window;\r\ndeclare var window: Window;\r\ndeclare var URL: URL;\r\ndeclare function alert(message?: any): void;\r\ndeclare function blur(): void;\r\ndeclare function cancelAnimationFrame(handle: number): void;\r\ndeclare function captureEvents(): void;\r\ndeclare function close(): void;\r\ndeclare function confirm(message?: string): boolean;\r\ndeclare function focus(): void;\r\ndeclare function getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;\r\ndeclare function getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;\r\ndeclare function getSelection(): Selection;\r\ndeclare function matchMedia(mediaQuery: string): MediaQueryList;\r\ndeclare function moveBy(x?: number, y?: number): void;\r\ndeclare function moveTo(x?: number, y?: number): void;\r\ndeclare function msCancelRequestAnimationFrame(handle: number): void;\r\ndeclare function msMatchMedia(mediaQuery: string): MediaQueryList;\r\ndeclare function msRequestAnimationFrame(callback: FrameRequestCallback): number;\r\ndeclare function msWriteProfilerMark(profilerMarkName: string): void;\r\ndeclare function open(url?: string, target?: string, features?: string, replace?: boolean): Window;\r\ndeclare function postMessage(message: any, targetOrigin: string, ports?: any): void;\r\ndeclare function print(): void;\r\ndeclare function prompt(message?: string, _default?: string): string;\r\ndeclare function releaseEvents(): void;\r\ndeclare function requestAnimationFrame(callback: FrameRequestCallback): number;\r\ndeclare function resizeBy(x?: number, y?: number): void;\r\ndeclare function resizeTo(x?: number, y?: number): void;\r\ndeclare function scroll(x?: number, y?: number): void;\r\ndeclare function scrollBy(x?: number, y?: number): void;\r\ndeclare function scrollTo(x?: number, y?: number): void;\r\ndeclare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;\r\ndeclare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;\r\ndeclare function toString(): string;\r\ndeclare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\ndeclare function dispatchEvent(evt: Event): boolean;\r\ndeclare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\ndeclare function clearInterval(handle: number): void;\r\ndeclare function clearTimeout(handle: number): void;\r\ndeclare function setInterval(handler: any, timeout?: any, ...args: any[]): number;\r\ndeclare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;\r\ndeclare function clearImmediate(handle: number): void;\r\ndeclare function msClearImmediate(handle: number): void;\r\ndeclare function msSetImmediate(expression: any, ...args: any[]): number;\r\ndeclare function setImmediate(expression: any, ...args: any[]): number;\r\ndeclare var sessionStorage: Storage;\r\ndeclare var localStorage: Storage;\r\ndeclare var console: Console;\r\ndeclare var onpointercancel: (ev: PointerEvent) => any;\r\ndeclare var onpointerdown: (ev: PointerEvent) => any;\r\ndeclare var onpointerenter: (ev: PointerEvent) => any;\r\ndeclare var onpointerleave: (ev: PointerEvent) => any;\r\ndeclare var onpointermove: (ev: PointerEvent) => any;\r\ndeclare var onpointerout: (ev: PointerEvent) => any;\r\ndeclare var onpointerover: (ev: PointerEvent) => any;\r\ndeclare var onpointerup: (ev: PointerEvent) => any;\r\ndeclare var onwheel: (ev: WheelEvent) => any;\r\ndeclare var indexedDB: IDBFactory;\r\ndeclare var msIndexedDB: IDBFactory;\r\ndeclare function atob(encodedString: string): string;\r\ndeclare function btoa(rawString: string): string;\r\ndeclare function addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"afterprint\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"beforeprint\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"beforeunload\", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"compassneedscalibration\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"devicemotion\", listener: (ev: DeviceMotionEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"deviceorientation\", listener: (ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"hashchange\", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"message\", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"offline\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"online\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"orientationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pagehide\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pageshow\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"popstate\", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"readystatechange\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"resize\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"storage\", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"unload\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;interface DOMTokenList {\r\n [Symbol.iterator](): IterableIterator;\r\n}\r\n\r\ninterface NodeList {\r\n [Symbol.iterator](): IterableIterator\r\n}\r\n\r\ninterface NodeListOf {\r\n [Symbol.iterator](): IterableIterator\r\n}\r\n\r\n/////////////////////////////\r\n/// WorkerGlobalScope APIs \r\n/////////////////////////////\r\n// These are only available in a Web Worker \r\ndeclare function importScripts(...urls: string[]): void;\r\n\r\n\r\n/////////////////////////////\r\n/// Windows Script Host APIS\r\n/////////////////////////////\r\n\r\n\r\ninterface ActiveXObject {\r\n new (s: string): any;\r\n}\r\ndeclare var ActiveXObject: ActiveXObject;\r\n\r\ninterface ITextWriter {\r\n Write(s: string): void;\r\n WriteLine(s: string): void;\r\n Close(): void;\r\n}\r\n\r\ninterface TextStreamBase {\r\n /**\r\n * The column number of the current character position in an input stream.\r\n */\r\n Column: number;\r\n\r\n /**\r\n * The current line number in an input stream.\r\n */\r\n Line: number;\r\n\r\n /**\r\n * Closes a text stream.\r\n * It is not necessary to close standard streams; they close automatically when the process ends. If \r\n * you close a standard stream, be aware that any other pointers to that standard stream become invalid.\r\n */\r\n Close(): void;\r\n}\r\n\r\ninterface TextStreamWriter extends TextStreamBase {\r\n /**\r\n * Sends a string to an output stream.\r\n */\r\n Write(s: string): void;\r\n\r\n /**\r\n * Sends a specified number of blank lines (newline characters) to an output stream.\r\n */\r\n WriteBlankLines(intLines: number): void;\r\n\r\n /**\r\n * Sends a string followed by a newline character to an output stream.\r\n */\r\n WriteLine(s: string): void;\r\n}\r\n\r\ninterface TextStreamReader extends TextStreamBase {\r\n /**\r\n * Returns a specified number of characters from an input stream, starting at the current pointer position.\r\n * Does not return until the ENTER key is pressed.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n */\r\n Read(characters: number): string;\r\n\r\n /**\r\n * Returns all characters from an input stream.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n */\r\n ReadAll(): string;\r\n\r\n /**\r\n * Returns an entire line from an input stream.\r\n * Although this method extracts the newline character, it does not add it to the returned string.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n */\r\n ReadLine(): string;\r\n\r\n /**\r\n * Skips a specified number of characters when reading from an input text stream.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)\r\n */\r\n Skip(characters: number): void;\r\n\r\n /**\r\n * Skips the next line when reading from an input text stream.\r\n * Can only be used on a stream in reading mode, not writing or appending mode.\r\n */\r\n SkipLine(): void;\r\n\r\n /**\r\n * Indicates whether the stream pointer position is at the end of a line.\r\n */\r\n AtEndOfLine: boolean;\r\n\r\n /**\r\n * Indicates whether the stream pointer position is at the end of a stream.\r\n */\r\n AtEndOfStream: boolean;\r\n}\r\n\r\ndeclare var WScript: {\r\n /**\r\n * Outputs text to either a message box (under WScript.exe) or the command console window followed by\r\n * a newline (under CScript.exe).\r\n */\r\n Echo(s: any): void;\r\n\r\n /**\r\n * Exposes the write-only error output stream for the current script.\r\n * Can be accessed only while using CScript.exe.\r\n */\r\n StdErr: TextStreamWriter;\r\n\r\n /**\r\n * Exposes the write-only output stream for the current script.\r\n * Can be accessed only while using CScript.exe.\r\n */\r\n StdOut: TextStreamWriter;\r\n Arguments: { length: number; Item(n: number): string; };\r\n\r\n /**\r\n * The full path of the currently running script.\r\n */\r\n ScriptFullName: string;\r\n\r\n /**\r\n * Forces the script to stop immediately, with an optional exit code.\r\n */\r\n Quit(exitCode?: number): number;\r\n\r\n /**\r\n * The Windows Script Host build version number.\r\n */\r\n BuildVersion: number;\r\n\r\n /**\r\n * Fully qualified path of the host executable.\r\n */\r\n FullName: string;\r\n\r\n /**\r\n * Gets/sets the script mode - interactive(true) or batch(false).\r\n */\r\n Interactive: boolean;\r\n\r\n /**\r\n * The name of the host executable (WScript.exe or CScript.exe).\r\n */\r\n Name: string;\r\n\r\n /**\r\n * Path of the directory containing the host executable.\r\n */\r\n Path: string;\r\n\r\n /**\r\n * The filename of the currently running script.\r\n */\r\n ScriptName: string;\r\n\r\n /**\r\n * Exposes the read-only input stream for the current script.\r\n * Can be accessed only while using CScript.exe.\r\n */\r\n StdIn: TextStreamReader;\r\n\r\n /**\r\n * Windows Script Host version\r\n */\r\n Version: string;\r\n\r\n /**\r\n * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.\r\n */\r\n ConnectObject(objEventSource: any, strPrefix: string): void;\r\n\r\n /**\r\n * Creates a COM object.\r\n * @param strProgiID\r\n * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.\r\n */\r\n CreateObject(strProgID: string, strPrefix?: string): any;\r\n\r\n /**\r\n * Disconnects a COM object from its event sources.\r\n */\r\n DisconnectObject(obj: any): void;\r\n\r\n /**\r\n * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.\r\n * @param strPathname Fully qualified path to the file containing the object persisted to disk.\r\n * For objects in memory, pass a zero-length string.\r\n * @param strProgID\r\n * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.\r\n */\r\n GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;\r\n\r\n /**\r\n * Suspends script execution for a specified length of time, then continues execution.\r\n * @param intTime Interval (in milliseconds) to suspend script execution.\r\n */\r\n Sleep(intTime: number): void;\r\n};\r\n\r\n/**\r\n * Allows enumerating over a COM collection, which may not have indexed item access.\r\n */\r\ninterface Enumerator {\r\n /**\r\n * Returns true if the current item is the last one in the collection, or the collection is empty,\r\n * or the current item is undefined.\r\n */\r\n atEnd(): boolean;\r\n\r\n /**\r\n * Returns the current item in the collection\r\n */\r\n item(): T;\r\n\r\n /**\r\n * Resets the current item in the collection to the first item. If there are no items in the collection,\r\n * the current item is set to undefined.\r\n */\r\n moveFirst(): void;\r\n\r\n /**\r\n * Moves the current item to the next item in the collection. If the enumerator is at the end of\r\n * the collection or the collection is empty, the current item is set to undefined.\r\n */\r\n moveNext(): void;\r\n}\r\n\r\ninterface EnumeratorConstructor {\r\n new (collection: any): Enumerator;\r\n new (collection: any): Enumerator;\r\n}\r\n\r\ndeclare var Enumerator: EnumeratorConstructor;\r\n\r\n/**\r\n * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.\r\n */\r\ninterface VBArray {\r\n /**\r\n * Returns the number of dimensions (1-based).\r\n */\r\n dimensions(): number;\r\n\r\n /**\r\n * Takes an index for each dimension in the array, and returns the item at the corresponding location.\r\n */\r\n getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;\r\n\r\n /**\r\n * Returns the smallest available index for a given dimension.\r\n * @param dimension 1-based dimension (defaults to 1)\r\n */\r\n lbound(dimension?: number): number;\r\n\r\n /**\r\n * Returns the largest available index for a given dimension.\r\n * @param dimension 1-based dimension (defaults to 1)\r\n */\r\n ubound(dimension?: number): number;\r\n\r\n /**\r\n * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,\r\n * each successive dimension is appended to the end of the array.\r\n * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]\r\n */\r\n toArray(): T[];\r\n}\r\n\r\ninterface VBArrayConstructor {\r\n new (safeArray: any): VBArray;\r\n new (safeArray: any): VBArray;\r\n}\r\n\r\ndeclare var VBArray: VBArrayConstructor;\r\n"}; }); +define([], function() { return { contents: "/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved. \r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0 \r\n \r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, \r\nMERCHANTABLITY OR NON-INFRINGEMENT. \r\n \r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\n/// \r\n/////////////////////////////\r\n/// ECMAScript APIs\r\n/////////////////////////////\r\n\r\ndeclare const NaN: number;\r\ndeclare const Infinity: number;\r\n\r\n/**\r\n * Evaluates JavaScript code and executes it.\r\n * @param x A String value that contains valid JavaScript code.\r\n */\r\ndeclare function eval(x: string): any;\r\n\r\n/**\r\n * Converts A string to an integer.\r\n * @param s A string to convert into a number.\r\n * @param radix A value between 2 and 36 that specifies the base of the number in numString.\r\n * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\n * All other strings are considered decimal.\r\n */\r\ndeclare function parseInt(s: string, radix?: number): number;\r\n\r\n/**\r\n * Converts a string to a floating-point number.\r\n * @param string A string that contains a floating-point number.\r\n */\r\ndeclare function parseFloat(string: string): number;\r\n\r\n/**\r\n * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).\r\n * @param number A numeric value.\r\n */\r\ndeclare function isNaN(number: number): boolean;\r\n\r\n/**\r\n * Determines whether a supplied number is finite.\r\n * @param number Any numeric value.\r\n */\r\ndeclare function isFinite(number: number): boolean;\r\n\r\n/**\r\n * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).\r\n * @param encodedURI A value representing an encoded URI.\r\n */\r\ndeclare function decodeURI(encodedURI: string): string;\r\n\r\n/**\r\n * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).\r\n * @param encodedURIComponent A value representing an encoded URI component.\r\n */\r\ndeclare function decodeURIComponent(encodedURIComponent: string): string;\r\n\r\n/**\r\n * Encodes a text string as a valid Uniform Resource Identifier (URI)\r\n * @param uri A value representing an encoded URI.\r\n */\r\ndeclare function encodeURI(uri: string): string;\r\n\r\n/**\r\n * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).\r\n * @param uriComponent A value representing an encoded URI component.\r\n */\r\ndeclare function encodeURIComponent(uriComponent: string): string;\r\n\r\ninterface PropertyDescriptor {\r\n configurable?: boolean;\r\n enumerable?: boolean;\r\n value?: any;\r\n writable?: boolean;\r\n get? (): any;\r\n set? (v: any): void;\r\n}\r\n\r\ninterface PropertyDescriptorMap {\r\n [s: string]: PropertyDescriptor;\r\n}\r\n\r\ninterface Object {\r\n /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */\r\n constructor: Function;\r\n\r\n /** Returns a string representation of an object. */\r\n toString(): string;\r\n\r\n /** Returns a date converted to a string using the current locale. */\r\n toLocaleString(): string;\r\n\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): Object;\r\n\r\n /**\r\n * Determines whether an object has a property with the specified name.\r\n * @param v A property name.\r\n */\r\n hasOwnProperty(v: string): boolean;\r\n\r\n /**\r\n * Determines whether an object exists in another object's prototype chain.\r\n * @param v Another object whose prototype chain is to be checked.\r\n */\r\n isPrototypeOf(v: Object): boolean;\r\n\r\n /**\r\n * Determines whether a specified property is enumerable.\r\n * @param v A property name.\r\n */\r\n propertyIsEnumerable(v: string): boolean;\r\n}\r\n\r\ninterface ObjectConstructor {\r\n new (value?: any): Object;\r\n (): any;\r\n (value: any): any;\r\n\r\n /** A reference to the prototype for a class of objects. */\r\n readonly prototype: Object;\r\n\r\n /**\r\n * Returns the prototype of an object.\r\n * @param o The object that references the prototype.\r\n */\r\n getPrototypeOf(o: any): any;\r\n\r\n /**\r\n * Gets the own property descriptor of the specified object.\r\n * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.\r\n * @param o Object that contains the property.\r\n * @param p Name of the property.\r\n */\r\n getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;\r\n\r\n /**\r\n * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly\r\n * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.\r\n * @param o Object that contains the own properties.\r\n */\r\n getOwnPropertyNames(o: any): string[];\r\n\r\n /**\r\n * Creates an object that has null prototype.\r\n * @param o Object to use as a prototype. May be null\r\n */\r\n create(o: null): any;\r\n\r\n /**\r\n * Creates an object that has the specified prototype, and that optionally contains specified properties.\r\n * @param o Object to use as a prototype. May be null\r\n */\r\n create(o: T): T;\r\n\r\n /**\r\n * Creates an object that has the specified prototype, and that optionally contains specified properties.\r\n * @param o Object to use as a prototype. May be null\r\n * @param properties JavaScript object that contains one or more property descriptors.\r\n */\r\n create(o: any, properties: PropertyDescriptorMap): any;\r\n\r\n /**\r\n * Adds a property to an object, or modifies attributes of an existing property.\r\n * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.\r\n * @param p The property name.\r\n * @param attributes Descriptor for the property. It can be for a data property or an accessor property.\r\n */\r\n defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;\r\n\r\n /**\r\n * Adds one or more properties to an object, and/or modifies attributes of existing properties.\r\n * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.\r\n * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.\r\n */\r\n defineProperties(o: any, properties: PropertyDescriptorMap): any;\r\n\r\n /**\r\n * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.\r\n * @param o Object on which to lock the attributes.\r\n */\r\n seal(o: T): T;\r\n\r\n /**\r\n * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.\r\n * @param o Object on which to lock the attributes.\r\n */\r\n freeze(o: T): T;\r\n\r\n /**\r\n * Prevents the addition of new properties to an object.\r\n * @param o Object to make non-extensible.\r\n */\r\n preventExtensions(o: T): T;\r\n\r\n /**\r\n * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.\r\n * @param o Object to test.\r\n */\r\n isSealed(o: any): boolean;\r\n\r\n /**\r\n * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.\r\n * @param o Object to test.\r\n */\r\n isFrozen(o: any): boolean;\r\n\r\n /**\r\n * Returns a value that indicates whether new properties can be added to an object.\r\n * @param o Object to test.\r\n */\r\n isExtensible(o: any): boolean;\r\n\r\n /**\r\n * Returns the names of the enumerable properties and methods of an object.\r\n * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.\r\n */\r\n keys(o: any): string[];\r\n}\r\n\r\n/**\r\n * Provides functionality common to all JavaScript objects.\r\n */\r\ndeclare const Object: ObjectConstructor;\r\n\r\n/**\r\n * Creates a new function.\r\n */\r\ninterface Function {\r\n /**\r\n * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.\r\n * @param thisArg The object to be used as the this object.\r\n * @param argArray A set of arguments to be passed to the function.\r\n */\r\n apply(this: Function, thisArg: any, argArray?: any): any;\r\n\r\n /**\r\n * Calls a method of an object, substituting another object for the current object.\r\n * @param thisArg The object to be used as the current object.\r\n * @param argArray A list of arguments to be passed to the method.\r\n */\r\n call(this: Function, thisArg: any, ...argArray: any[]): any;\r\n\r\n /**\r\n * For a given function, creates a bound function that has the same body as the original function.\r\n * The this object of the bound function is associated with the specified object, and has the specified initial parameters.\r\n * @param thisArg An object to which the this keyword can refer inside the new function.\r\n * @param argArray A list of arguments to be passed to the new function.\r\n */\r\n bind(this: Function, thisArg: any, ...argArray: any[]): any;\r\n\r\n prototype: any;\r\n readonly length: number;\r\n\r\n // Non-standard extensions\r\n arguments: any;\r\n caller: Function;\r\n}\r\n\r\ninterface FunctionConstructor {\r\n /**\r\n * Creates a new function.\r\n * @param args A list of arguments the function accepts.\r\n */\r\n new (...args: string[]): Function;\r\n (...args: string[]): Function;\r\n readonly prototype: Function;\r\n}\r\n\r\ndeclare const Function: FunctionConstructor;\r\n\r\ninterface IArguments {\r\n [index: number]: any;\r\n length: number;\r\n callee: Function;\r\n}\r\n\r\ninterface String {\r\n /** Returns a string representation of a string. */\r\n toString(): string;\r\n\r\n /**\r\n * Returns the character at the specified index.\r\n * @param pos The zero-based index of the desired character.\r\n */\r\n charAt(pos: number): string;\r\n\r\n /**\r\n * Returns the Unicode value of the character at the specified location.\r\n * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.\r\n */\r\n charCodeAt(index: number): number;\r\n\r\n /**\r\n * Returns a string that contains the concatenation of two or more strings.\r\n * @param strings The strings to append to the end of the string.\r\n */\r\n concat(...strings: string[]): string;\r\n\r\n /**\r\n * Returns the position of the first occurrence of a substring.\r\n * @param searchString The substring to search for in the string\r\n * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.\r\n */\r\n indexOf(searchString: string, position?: number): number;\r\n\r\n /**\r\n * Returns the last occurrence of a substring in the string.\r\n * @param searchString The substring to search for.\r\n * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.\r\n */\r\n lastIndexOf(searchString: string, position?: number): number;\r\n\r\n /**\r\n * Determines whether two strings are equivalent in the current locale.\r\n * @param that String to compare to target string\r\n */\r\n localeCompare(that: string): number;\r\n\r\n /**\r\n * Matches a string with a regular expression, and returns an array containing the results of that search.\r\n * @param regexp A variable name or string literal containing the regular expression pattern and flags.\r\n */\r\n match(regexp: string): RegExpMatchArray | null;\r\n\r\n /**\r\n * Matches a string with a regular expression, and returns an array containing the results of that search.\r\n * @param regexp A regular expression object that contains the regular expression pattern and applicable flags.\r\n */\r\n match(regexp: RegExp): RegExpMatchArray | null;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A string that represents the regular expression.\r\n * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.\r\n */\r\n replace(searchValue: string, replaceValue: string): string;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A string that represents the regular expression.\r\n * @param replacer A function that returns the replacement text.\r\n */\r\n replace(searchValue: string, replacer: (substring: string, ...args: any[]) => string): string;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags.\r\n * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.\r\n */\r\n replace(searchValue: RegExp, replaceValue: string): string;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags\r\n * @param replacer A function that returns the replacement text.\r\n */\r\n replace(searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string;\r\n\r\n /**\r\n * Finds the first substring match in a regular expression search.\r\n * @param regexp The regular expression pattern and applicable flags.\r\n */\r\n search(regexp: string): number;\r\n\r\n /**\r\n * Finds the first substring match in a regular expression search.\r\n * @param regexp The regular expression pattern and applicable flags.\r\n */\r\n search(regexp: RegExp): number;\r\n\r\n /**\r\n * Returns a section of a string.\r\n * @param start The index to the beginning of the specified portion of stringObj.\r\n * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.\r\n * If this value is not specified, the substring continues to the end of stringObj.\r\n */\r\n slice(start?: number, end?: number): string;\r\n\r\n /**\r\n * Split a string into substrings using the specified separator and return them as an array.\r\n * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.\r\n * @param limit A value used to limit the number of elements returned in the array.\r\n */\r\n split(separator: string, limit?: number): string[];\r\n\r\n /**\r\n * Split a string into substrings using the specified separator and return them as an array.\r\n * @param separator A Regular Express that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.\r\n * @param limit A value used to limit the number of elements returned in the array.\r\n */\r\n split(separator: RegExp, limit?: number): string[];\r\n\r\n /**\r\n * Returns the substring at the specified location within a String object.\r\n * @param start The zero-based index number indicating the beginning of the substring.\r\n * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.\r\n * If end is omitted, the characters from start through the end of the original string are returned.\r\n */\r\n substring(start: number, end?: number): string;\r\n\r\n /** Converts all the alphabetic characters in a string to lowercase. */\r\n toLowerCase(): string;\r\n\r\n /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */\r\n toLocaleLowerCase(): string;\r\n\r\n /** Converts all the alphabetic characters in a string to uppercase. */\r\n toUpperCase(): string;\r\n\r\n /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */\r\n toLocaleUpperCase(): string;\r\n\r\n /** Removes the leading and trailing white space and line terminator characters from a string. */\r\n trim(): string;\r\n\r\n /** Returns the length of a String object. */\r\n readonly length: number;\r\n\r\n // IE extensions\r\n /**\r\n * Gets a substring beginning at the specified location and having the specified length.\r\n * @param from The starting position of the desired substring. The index of the first character in the string is zero.\r\n * @param length The number of characters to include in the returned substring.\r\n */\r\n substr(from: number, length?: number): string;\r\n\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): string;\r\n\r\n readonly [index: number]: string;\r\n}\r\n\r\ninterface StringConstructor {\r\n new (value?: any): String;\r\n (value?: any): string;\r\n readonly prototype: String;\r\n fromCharCode(...codes: number[]): string;\r\n}\r\n\r\n/**\r\n * Allows manipulation and formatting of text strings and determination and location of substrings within strings.\r\n */\r\ndeclare const String: StringConstructor;\r\n\r\ninterface Boolean {\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): boolean;\r\n}\r\n\r\ninterface BooleanConstructor {\r\n new (value?: any): Boolean;\r\n (value?: any): boolean;\r\n readonly prototype: Boolean;\r\n}\r\n\r\ndeclare const Boolean: BooleanConstructor;\r\n\r\ninterface Number {\r\n /**\r\n * Returns a string representation of an object.\r\n * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.\r\n */\r\n toString(radix?: number): string;\r\n\r\n /**\r\n * Returns a string representing a number in fixed-point notation.\r\n * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.\r\n */\r\n toFixed(fractionDigits?: number): string;\r\n\r\n /**\r\n * Returns a string containing a number represented in exponential notation.\r\n * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.\r\n */\r\n toExponential(fractionDigits?: number): string;\r\n\r\n /**\r\n * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.\r\n * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.\r\n */\r\n toPrecision(precision?: number): string;\r\n\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): number;\r\n}\r\n\r\ninterface NumberConstructor {\r\n new (value?: any): Number;\r\n (value?: any): number;\r\n readonly prototype: Number;\r\n\r\n /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */\r\n readonly MAX_VALUE: number;\r\n\r\n /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */\r\n readonly MIN_VALUE: number;\r\n\r\n /**\r\n * A value that is not a number.\r\n * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.\r\n */\r\n readonly NaN: number;\r\n\r\n /**\r\n * A value that is less than the largest negative number that can be represented in JavaScript.\r\n * JavaScript displays NEGATIVE_INFINITY values as -infinity.\r\n */\r\n readonly NEGATIVE_INFINITY: number;\r\n\r\n /**\r\n * A value greater than the largest number that can be represented in JavaScript.\r\n * JavaScript displays POSITIVE_INFINITY values as infinity.\r\n */\r\n readonly POSITIVE_INFINITY: number;\r\n}\r\n\r\n/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */\r\ndeclare const Number: NumberConstructor;\r\n\r\ninterface TemplateStringsArray extends ReadonlyArray {\r\n readonly raw: ReadonlyArray\r\n}\r\n\r\ninterface Math {\r\n /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */\r\n readonly E: number;\r\n /** The natural logarithm of 10. */\r\n readonly LN10: number;\r\n /** The natural logarithm of 2. */\r\n readonly LN2: number;\r\n /** The base-2 logarithm of e. */\r\n readonly LOG2E: number;\r\n /** The base-10 logarithm of e. */\r\n readonly LOG10E: number;\r\n /** Pi. This is the ratio of the circumference of a circle to its diameter. */\r\n readonly PI: number;\r\n /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */\r\n readonly SQRT1_2: number;\r\n /** The square root of 2. */\r\n readonly SQRT2: number;\r\n /**\r\n * Returns the absolute value of a number (the value without regard to whether it is positive or negative).\r\n * For example, the absolute value of -5 is the same as the absolute value of 5.\r\n * @param x A numeric expression for which the absolute value is needed.\r\n */\r\n abs(x: number): number;\r\n /**\r\n * Returns the arc cosine (or inverse cosine) of a number.\r\n * @param x A numeric expression.\r\n */\r\n acos(x: number): number;\r\n /**\r\n * Returns the arcsine of a number.\r\n * @param x A numeric expression.\r\n */\r\n asin(x: number): number;\r\n /**\r\n * Returns the arctangent of a number.\r\n * @param x A numeric expression for which the arctangent is needed.\r\n */\r\n atan(x: number): number;\r\n /**\r\n * Returns the angle (in radians) from the X axis to a point.\r\n * @param y A numeric expression representing the cartesian y-coordinate.\r\n * @param x A numeric expression representing the cartesian x-coordinate.\r\n */\r\n atan2(y: number, x: number): number;\r\n /**\r\n * Returns the smallest number greater than or equal to its numeric argument.\r\n * @param x A numeric expression.\r\n */\r\n ceil(x: number): number;\r\n /**\r\n * Returns the cosine of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n cos(x: number): number;\r\n /**\r\n * Returns e (the base of natural logarithms) raised to a power.\r\n * @param x A numeric expression representing the power of e.\r\n */\r\n exp(x: number): number;\r\n /**\r\n * Returns the greatest number less than or equal to its numeric argument.\r\n * @param x A numeric expression.\r\n */\r\n floor(x: number): number;\r\n /**\r\n * Returns the natural logarithm (base e) of a number.\r\n * @param x A numeric expression.\r\n */\r\n log(x: number): number;\r\n /**\r\n * Returns the larger of a set of supplied numeric expressions.\r\n * @param values Numeric expressions to be evaluated.\r\n */\r\n max(...values: number[]): number;\r\n /**\r\n * Returns the smaller of a set of supplied numeric expressions.\r\n * @param values Numeric expressions to be evaluated.\r\n */\r\n min(...values: number[]): number;\r\n /**\r\n * Returns the value of a base expression taken to a specified power.\r\n * @param x The base value of the expression.\r\n * @param y The exponent value of the expression.\r\n */\r\n pow(x: number, y: number): number;\r\n /** Returns a pseudorandom number between 0 and 1. */\r\n random(): number;\r\n /**\r\n * Returns a supplied numeric expression rounded to the nearest number.\r\n * @param x The value to be rounded to the nearest number.\r\n */\r\n round(x: number): number;\r\n /**\r\n * Returns the sine of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n sin(x: number): number;\r\n /**\r\n * Returns the square root of a number.\r\n * @param x A numeric expression.\r\n */\r\n sqrt(x: number): number;\r\n /**\r\n * Returns the tangent of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n tan(x: number): number;\r\n}\r\n/** An intrinsic object that provides basic mathematics functionality and constants. */\r\ndeclare const Math: Math;\r\n\r\n/** Enables basic storage and retrieval of dates and times. */\r\ninterface Date {\r\n /** Returns a string representation of a date. The format of the string depends on the locale. */\r\n toString(): string;\r\n /** Returns a date as a string value. */\r\n toDateString(): string;\r\n /** Returns a time as a string value. */\r\n toTimeString(): string;\r\n /** Returns a value as a string value appropriate to the host environment's current locale. */\r\n toLocaleString(): string;\r\n /** Returns a date as a string value appropriate to the host environment's current locale. */\r\n toLocaleDateString(): string;\r\n /** Returns a time as a string value appropriate to the host environment's current locale. */\r\n toLocaleTimeString(): string;\r\n /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */\r\n valueOf(): number;\r\n /** Gets the time value in milliseconds. */\r\n getTime(): number;\r\n /** Gets the year, using local time. */\r\n getFullYear(): number;\r\n /** Gets the year using Universal Coordinated Time (UTC). */\r\n getUTCFullYear(): number;\r\n /** Gets the month, using local time. */\r\n getMonth(): number;\r\n /** Gets the month of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCMonth(): number;\r\n /** Gets the day-of-the-month, using local time. */\r\n getDate(): number;\r\n /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */\r\n getUTCDate(): number;\r\n /** Gets the day of the week, using local time. */\r\n getDay(): number;\r\n /** Gets the day of the week using Universal Coordinated Time (UTC). */\r\n getUTCDay(): number;\r\n /** Gets the hours in a date, using local time. */\r\n getHours(): number;\r\n /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */\r\n getUTCHours(): number;\r\n /** Gets the minutes of a Date object, using local time. */\r\n getMinutes(): number;\r\n /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCMinutes(): number;\r\n /** Gets the seconds of a Date object, using local time. */\r\n getSeconds(): number;\r\n /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCSeconds(): number;\r\n /** Gets the milliseconds of a Date, using local time. */\r\n getMilliseconds(): number;\r\n /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCMilliseconds(): number;\r\n /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */\r\n getTimezoneOffset(): number;\r\n /**\r\n * Sets the date and time value in the Date object.\r\n * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.\r\n */\r\n setTime(time: number): number;\r\n /**\r\n * Sets the milliseconds value in the Date object using local time.\r\n * @param ms A numeric value equal to the millisecond value.\r\n */\r\n setMilliseconds(ms: number): number;\r\n /**\r\n * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).\r\n * @param ms A numeric value equal to the millisecond value.\r\n */\r\n setUTCMilliseconds(ms: number): number;\r\n\r\n /**\r\n * Sets the seconds value in the Date object using local time.\r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setSeconds(sec: number, ms?: number): number;\r\n /**\r\n * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).\r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setUTCSeconds(sec: number, ms?: number): number;\r\n /**\r\n * Sets the minutes value in the Date object using local time.\r\n * @param min A numeric value equal to the minutes value.\r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setMinutes(min: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).\r\n * @param min A numeric value equal to the minutes value.\r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setUTCMinutes(min: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the hour value in the Date object using local time.\r\n * @param hours A numeric value equal to the hours value.\r\n * @param min A numeric value equal to the minutes value.\r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setHours(hours: number, min?: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the hours value in the Date object using Universal Coordinated Time (UTC).\r\n * @param hours A numeric value equal to the hours value.\r\n * @param min A numeric value equal to the minutes value.\r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the numeric day-of-the-month value of the Date object using local time.\r\n * @param date A numeric value equal to the day of the month.\r\n */\r\n setDate(date: number): number;\r\n /**\r\n * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).\r\n * @param date A numeric value equal to the day of the month.\r\n */\r\n setUTCDate(date: number): number;\r\n /**\r\n * Sets the month value in the Date object using local time.\r\n * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.\r\n * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.\r\n */\r\n setMonth(month: number, date?: number): number;\r\n /**\r\n * Sets the month value in the Date object using Universal Coordinated Time (UTC).\r\n * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.\r\n * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.\r\n */\r\n setUTCMonth(month: number, date?: number): number;\r\n /**\r\n * Sets the year of the Date object using local time.\r\n * @param year A numeric value for the year.\r\n * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.\r\n * @param date A numeric value equal for the day of the month.\r\n */\r\n setFullYear(year: number, month?: number, date?: number): number;\r\n /**\r\n * Sets the year value in the Date object using Universal Coordinated Time (UTC).\r\n * @param year A numeric value equal to the year.\r\n * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.\r\n * @param date A numeric value equal to the day of the month.\r\n */\r\n setUTCFullYear(year: number, month?: number, date?: number): number;\r\n /** Returns a date converted to a string using Universal Coordinated Time (UTC). */\r\n toUTCString(): string;\r\n /** Returns a date as a string value in ISO format. */\r\n toISOString(): string;\r\n /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */\r\n toJSON(key?: any): string;\r\n}\r\n\r\ninterface DateConstructor {\r\n new (): Date;\r\n new (value: number): Date;\r\n new (value: string): Date;\r\n new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;\r\n (): string;\r\n readonly prototype: Date;\r\n /**\r\n * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.\r\n * @param s A date string\r\n */\r\n parse(s: string): number;\r\n /**\r\n * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.\r\n * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.\r\n * @param month The month as an number between 0 and 11 (January to December).\r\n * @param date The date as an number between 1 and 31.\r\n * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.\r\n * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.\r\n * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.\r\n * @param ms An number from 0 to 999 that specifies the milliseconds.\r\n */\r\n UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;\r\n now(): number;\r\n}\r\n\r\ndeclare const Date: DateConstructor;\r\n\r\ninterface RegExpMatchArray extends Array {\r\n index?: number;\r\n input?: string;\r\n}\r\n\r\ninterface RegExpExecArray extends Array {\r\n index: number;\r\n input: string;\r\n}\r\n\r\ninterface RegExp {\r\n /**\r\n * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.\r\n * @param string The String object or string literal on which to perform the search.\r\n */\r\n exec(string: string): RegExpExecArray | null;\r\n\r\n /**\r\n * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.\r\n * @param string String on which to perform the search.\r\n */\r\n test(string: string): boolean;\r\n\r\n /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */\r\n readonly source: string;\r\n\r\n /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */\r\n readonly global: boolean;\r\n\r\n /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */\r\n readonly ignoreCase: boolean;\r\n\r\n /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */\r\n readonly multiline: boolean;\r\n\r\n lastIndex: number;\r\n\r\n // Non-standard extensions\r\n compile(): this;\r\n}\r\n\r\ninterface RegExpConstructor {\r\n new (pattern: RegExp): RegExp;\r\n new (pattern: string, flags?: string): RegExp;\r\n (pattern: RegExp): RegExp;\r\n (pattern: string, flags?: string): RegExp;\r\n readonly prototype: RegExp;\r\n\r\n // Non-standard extensions\r\n $1: string;\r\n $2: string;\r\n $3: string;\r\n $4: string;\r\n $5: string;\r\n $6: string;\r\n $7: string;\r\n $8: string;\r\n $9: string;\r\n lastMatch: string;\r\n}\r\n\r\ndeclare const RegExp: RegExpConstructor;\r\n\r\ninterface Error {\r\n name: string;\r\n message: string;\r\n stack?: string;\r\n}\r\n\r\ninterface ErrorConstructor {\r\n new (message?: string): Error;\r\n (message?: string): Error;\r\n readonly prototype: Error;\r\n}\r\n\r\ndeclare const Error: ErrorConstructor;\r\n\r\ninterface EvalError extends Error {\r\n}\r\n\r\ninterface EvalErrorConstructor {\r\n new (message?: string): EvalError;\r\n (message?: string): EvalError;\r\n readonly prototype: EvalError;\r\n}\r\n\r\ndeclare const EvalError: EvalErrorConstructor;\r\n\r\ninterface RangeError extends Error {\r\n}\r\n\r\ninterface RangeErrorConstructor {\r\n new (message?: string): RangeError;\r\n (message?: string): RangeError;\r\n readonly prototype: RangeError;\r\n}\r\n\r\ndeclare const RangeError: RangeErrorConstructor;\r\n\r\ninterface ReferenceError extends Error {\r\n}\r\n\r\ninterface ReferenceErrorConstructor {\r\n new (message?: string): ReferenceError;\r\n (message?: string): ReferenceError;\r\n readonly prototype: ReferenceError;\r\n}\r\n\r\ndeclare const ReferenceError: ReferenceErrorConstructor;\r\n\r\ninterface SyntaxError extends Error {\r\n}\r\n\r\ninterface SyntaxErrorConstructor {\r\n new (message?: string): SyntaxError;\r\n (message?: string): SyntaxError;\r\n readonly prototype: SyntaxError;\r\n}\r\n\r\ndeclare const SyntaxError: SyntaxErrorConstructor;\r\n\r\ninterface TypeError extends Error {\r\n}\r\n\r\ninterface TypeErrorConstructor {\r\n new (message?: string): TypeError;\r\n (message?: string): TypeError;\r\n readonly prototype: TypeError;\r\n}\r\n\r\ndeclare const TypeError: TypeErrorConstructor;\r\n\r\ninterface URIError extends Error {\r\n}\r\n\r\ninterface URIErrorConstructor {\r\n new (message?: string): URIError;\r\n (message?: string): URIError;\r\n readonly prototype: URIError;\r\n}\r\n\r\ndeclare const URIError: URIErrorConstructor;\r\n\r\ninterface JSON {\r\n /**\r\n * Converts a JavaScript Object Notation (JSON) string into an object.\r\n * @param text A valid JSON string.\r\n * @param reviver A function that transforms the results. This function is called for each member of the object.\r\n * If a member contains nested objects, the nested objects are transformed before the parent object is.\r\n */\r\n parse(text: string, reviver?: (key: any, value: any) => any): any;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer A function that transforms the results.\r\n * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\r\n */\r\n stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified.\r\n * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\r\n */\r\n stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;\r\n}\r\n\r\n/**\r\n * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.\r\n */\r\ndeclare const JSON: JSON;\r\n\r\n\r\n/////////////////////////////\r\n/// ECMAScript Array API (specially handled by compiler)\r\n/////////////////////////////\r\n\r\ninterface ReadonlyArray {\r\n /**\r\n * Gets the length of the array. This is a number one higher than the highest element defined in an array.\r\n */\r\n readonly length: number;\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n toLocaleString(): string;\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat>(...items: U[]): T[];\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat(...items: T[][]): T[];\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat(...items: (T | T[])[]): T[];\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): T[];\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.\r\n */\r\n indexOf(searchElement: T, fromIndex?: number): number;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a specified value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.\r\n */\r\n lastIndexOf(searchElement: T, fromIndex?: number): number;\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: T, index: number, array: ReadonlyArray) => boolean, thisArg?: any): boolean;\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: T, index: number, array: ReadonlyArray) => boolean, thisArg?: any): boolean;\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: T, index: number, array: ReadonlyArray) => void, thisArg?: any): void;\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: T, index: number, array: ReadonlyArray) => U, thisArg?: any): U[];\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: T, index: number, array: ReadonlyArray) => any, thisArg?: any): T[];\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray) => T, initialValue?: T): T;\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray) => U, initialValue: U): U;\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray) => T, initialValue?: T): T;\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray) => U, initialValue: U): U;\r\n\r\n readonly [n: number]: T;\r\n}\r\n\r\ninterface Array {\r\n /**\r\n * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.\r\n */\r\n length: number;\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n toLocaleString(): string;\r\n /**\r\n * Appends new elements to an array, and returns the new length of the array.\r\n * @param items New elements of the Array.\r\n */\r\n push(...items: T[]): number;\r\n /**\r\n * Removes the last element from an array and returns it.\r\n */\r\n pop(): T | undefined;\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat(...items: T[][]): T[];\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat(...items: (T | T[])[]): T[];\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): T[];\r\n /**\r\n * Removes the first element from an array and returns it.\r\n */\r\n shift(): T | undefined;\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): T[];\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: T, b: T) => number): this;\r\n /**\r\n * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.\r\n * @param start The zero-based location in the array from which to start removing elements.\r\n */\r\n splice(start: number): T[];\r\n /**\r\n * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.\r\n * @param start The zero-based location in the array from which to start removing elements.\r\n * @param deleteCount The number of elements to remove.\r\n * @param items Elements to insert into the array in place of the deleted elements.\r\n */\r\n splice(start: number, deleteCount: number, ...items: T[]): T[];\r\n /**\r\n * Inserts new elements at the start of an array.\r\n * @param items Elements to insert at the start of the Array.\r\n */\r\n unshift(...items: T[]): number;\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.\r\n */\r\n indexOf(searchElement: T, fromIndex?: number): number;\r\n /**\r\n * Returns the index of the last occurrence of a specified value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.\r\n */\r\n lastIndexOf(searchElement: T, fromIndex?: number): number;\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[];\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;\r\n\r\n [n: number]: T;\r\n}\r\n\r\ninterface ArrayConstructor {\r\n new (arrayLength?: number): any[];\r\n new (arrayLength: number): T[];\r\n new (...items: T[]): T[];\r\n (arrayLength?: number): any[];\r\n (arrayLength: number): T[];\r\n (...items: T[]): T[];\r\n isArray(arg: any): arg is Array;\r\n readonly prototype: Array;\r\n}\r\n\r\ndeclare const Array: ArrayConstructor;\r\n\r\ninterface TypedPropertyDescriptor {\r\n enumerable?: boolean;\r\n configurable?: boolean;\r\n writable?: boolean;\r\n value?: T;\r\n get?: () => T;\r\n set?: (value: T) => void;\r\n}\r\n\r\ndeclare type ClassDecorator = (target: TFunction) => TFunction | void;\r\ndeclare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;\r\ndeclare type MethodDecorator = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor | void;\r\ndeclare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;\r\n\r\ndeclare type PromiseConstructorLike = new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike;\r\n\r\ninterface PromiseLike {\r\n /**\r\n * Attaches callbacks for the resolution and/or rejection of the Promise.\r\n * @param onfulfilled The callback to execute when the Promise is resolved.\r\n * @param onrejected The callback to execute when the Promise is rejected.\r\n * @returns A Promise for the completion of which ever callback is executed.\r\n */\r\n then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike;\r\n then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): PromiseLike;\r\n}\r\n\r\ninterface ArrayLike {\r\n readonly length: number;\r\n readonly [n: number]: T;\r\n}\r\n\r\n/**\r\n * Represents a raw buffer of binary data, which is used to store data for the\r\n * different typed arrays. ArrayBuffers cannot be read from or written to directly,\r\n * but can be passed to a typed array or DataView Object to interpret the raw\r\n * buffer as needed.\r\n */\r\ninterface ArrayBuffer {\r\n /**\r\n * Read-only. The length of the ArrayBuffer (in bytes).\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * Returns a section of an ArrayBuffer.\r\n */\r\n slice(begin:number, end?:number): ArrayBuffer;\r\n}\r\n\r\ninterface ArrayBufferConstructor {\r\n readonly prototype: ArrayBuffer;\r\n new (byteLength: number): ArrayBuffer;\r\n isView(arg: any): arg is ArrayBufferView;\r\n}\r\ndeclare const ArrayBuffer: ArrayBufferConstructor;\r\n\r\ninterface ArrayBufferView {\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n}\r\n\r\ninterface DataView {\r\n readonly buffer: ArrayBuffer;\r\n readonly byteLength: number;\r\n readonly byteOffset: number;\r\n /**\r\n * Gets the Float32 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getFloat32(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Float64 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getFloat64(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Int8 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getInt8(byteOffset: number): number;\r\n\r\n /**\r\n * Gets the Int16 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getInt16(byteOffset: number, littleEndian?: boolean): number;\r\n /**\r\n * Gets the Int32 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getInt32(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Uint8 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getUint8(byteOffset: number): number;\r\n\r\n /**\r\n * Gets the Uint16 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getUint16(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Uint32 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getUint32(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Stores an Float32 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written,\r\n * otherwise a little-endian value should be written.\r\n */\r\n setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Float64 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written,\r\n * otherwise a little-endian value should be written.\r\n */\r\n setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Int8 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n */\r\n setInt8(byteOffset: number, value: number): void;\r\n\r\n /**\r\n * Stores an Int16 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written,\r\n * otherwise a little-endian value should be written.\r\n */\r\n setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Int32 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written,\r\n * otherwise a little-endian value should be written.\r\n */\r\n setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Uint8 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n */\r\n setUint8(byteOffset: number, value: number): void;\r\n\r\n /**\r\n * Stores an Uint16 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written,\r\n * otherwise a little-endian value should be written.\r\n */\r\n setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Uint32 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written,\r\n * otherwise a little-endian value should be written.\r\n */\r\n setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n}\r\n\r\ninterface DataViewConstructor {\r\n new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;\r\n}\r\ndeclare const DataView: DataViewConstructor;\r\n\r\n/**\r\n * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested\r\n * number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int8Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Int8Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Int8Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Int8Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\ninterface Int8ArrayConstructor {\r\n readonly prototype: Int8Array;\r\n new (length: number): Int8Array;\r\n new (array: ArrayLike): Int8Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Int8Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;\r\n\r\n}\r\ndeclare const Int8Array: Int8ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the\r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint8Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Uint8Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint8Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint8Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint8ArrayConstructor {\r\n readonly prototype: Uint8Array;\r\n new (length: number): Uint8Array;\r\n new (array: ArrayLike): Uint8Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint8Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;\r\n\r\n}\r\ndeclare const Uint8Array: Uint8ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.\r\n * If the requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint8ClampedArray {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Uint8ClampedArray;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: Uint8ClampedArray, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint8ClampedArrayConstructor {\r\n readonly prototype: Uint8ClampedArray;\r\n new (length: number): Uint8ClampedArray;\r\n new (array: ArrayLike): Uint8ClampedArray;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint8ClampedArray;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;\r\n}\r\ndeclare const Uint8ClampedArray: Uint8ClampedArrayConstructor;\r\n\r\n/**\r\n * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the\r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int16Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Int16Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Int16Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Int16Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Int16ArrayConstructor {\r\n readonly prototype: Int16Array;\r\n new (length: number): Int16Array;\r\n new (array: ArrayLike): Int16Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Int16Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;\r\n\r\n}\r\ndeclare const Int16Array: Int16ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the\r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint16Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Uint16Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint16Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint16Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint16ArrayConstructor {\r\n readonly prototype: Uint16Array;\r\n new (length: number): Uint16Array;\r\n new (array: ArrayLike): Uint16Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint16Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;\r\n\r\n}\r\ndeclare const Uint16Array: Uint16ArrayConstructor;\r\n/**\r\n * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the\r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int32Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Int32Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Int32Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Int32Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Int32ArrayConstructor {\r\n readonly prototype: Int32Array;\r\n new (length: number): Int32Array;\r\n new (array: ArrayLike): Int32Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Int32Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;\r\n}\r\ndeclare const Int32Array: Int32ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the\r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint32Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Uint32Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint32Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint32Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint32ArrayConstructor {\r\n readonly prototype: Uint32Array;\r\n new (length: number): Uint32Array;\r\n new (array: ArrayLike): Uint32Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint32Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;\r\n}\r\ndeclare const Uint32Array: Uint32ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number\r\n * of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float32Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Float32Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Float32Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Float32Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Float32ArrayConstructor {\r\n readonly prototype: Float32Array;\r\n new (length: number): Float32Array;\r\n new (array: ArrayLike): Float32Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Float32Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;\r\n\r\n}\r\ndeclare const Float32Array: Float32ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 64-bit float values. The contents are initialized to 0. If the requested\r\n * number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float64Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Float64Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Float64Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Float64Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Float64ArrayConstructor {\r\n readonly prototype: Float64Array;\r\n new (length: number): Float64Array;\r\n new (array: ArrayLike): Float64Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Float64Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;\r\n}\r\ndeclare const Float64Array: Float64ArrayConstructor;\r\n\r\n/////////////////////////////\r\n/// ECMAScript Internationalization API\r\n/////////////////////////////\r\n\r\ndeclare module Intl {\r\n interface CollatorOptions {\r\n usage?: string;\r\n localeMatcher?: string;\r\n numeric?: boolean;\r\n caseFirst?: string;\r\n sensitivity?: string;\r\n ignorePunctuation?: boolean;\r\n }\r\n\r\n interface ResolvedCollatorOptions {\r\n locale: string;\r\n usage: string;\r\n sensitivity: string;\r\n ignorePunctuation: boolean;\r\n collation: string;\r\n caseFirst: string;\r\n numeric: boolean;\r\n }\r\n\r\n interface Collator {\r\n compare(x: string, y: string): number;\r\n resolvedOptions(): ResolvedCollatorOptions;\r\n }\r\n var Collator: {\r\n new (locales?: string[], options?: CollatorOptions): Collator;\r\n new (locale?: string, options?: CollatorOptions): Collator;\r\n (locales?: string[], options?: CollatorOptions): Collator;\r\n (locale?: string, options?: CollatorOptions): Collator;\r\n supportedLocalesOf(locales: string[], options?: CollatorOptions): string[];\r\n supportedLocalesOf(locale: string, options?: CollatorOptions): string[];\r\n }\r\n\r\n interface NumberFormatOptions {\r\n localeMatcher?: string;\r\n style?: string;\r\n currency?: string;\r\n currencyDisplay?: string;\r\n useGrouping?: boolean;\r\n minimumIntegerDigits?: number;\r\n minimumFractionDigits?: number;\r\n maximumFractionDigits?: number;\r\n minimumSignificantDigits?: number;\r\n maximumSignificantDigits?: number;\r\n }\r\n\r\n interface ResolvedNumberFormatOptions {\r\n locale: string;\r\n numberingSystem: string;\r\n style: string;\r\n currency?: string;\r\n currencyDisplay?: string;\r\n minimumIntegerDigits: number;\r\n minimumFractionDigits: number;\r\n maximumFractionDigits: number;\r\n minimumSignificantDigits?: number;\r\n maximumSignificantDigits?: number;\r\n useGrouping: boolean;\r\n }\r\n\r\n interface NumberFormat {\r\n format(value: number): string;\r\n resolvedOptions(): ResolvedNumberFormatOptions;\r\n }\r\n var NumberFormat: {\r\n new (locales?: string[], options?: NumberFormatOptions): NumberFormat;\r\n new (locale?: string, options?: NumberFormatOptions): NumberFormat;\r\n (locales?: string[], options?: NumberFormatOptions): NumberFormat;\r\n (locale?: string, options?: NumberFormatOptions): NumberFormat;\r\n supportedLocalesOf(locales: string[], options?: NumberFormatOptions): string[];\r\n supportedLocalesOf(locale: string, options?: NumberFormatOptions): string[];\r\n }\r\n\r\n interface DateTimeFormatOptions {\r\n localeMatcher?: string;\r\n weekday?: string;\r\n era?: string;\r\n year?: string;\r\n month?: string;\r\n day?: string;\r\n hour?: string;\r\n minute?: string;\r\n second?: string;\r\n timeZoneName?: string;\r\n formatMatcher?: string;\r\n hour12?: boolean;\r\n timeZone?: string;\r\n }\r\n\r\n interface ResolvedDateTimeFormatOptions {\r\n locale: string;\r\n calendar: string;\r\n numberingSystem: string;\r\n timeZone: string;\r\n hour12?: boolean;\r\n weekday?: string;\r\n era?: string;\r\n year?: string;\r\n month?: string;\r\n day?: string;\r\n hour?: string;\r\n minute?: string;\r\n second?: string;\r\n timeZoneName?: string;\r\n }\r\n\r\n interface DateTimeFormat {\r\n format(date?: Date | number): string;\r\n resolvedOptions(): ResolvedDateTimeFormatOptions;\r\n }\r\n var DateTimeFormat: {\r\n new (locales?: string[], options?: DateTimeFormatOptions): DateTimeFormat;\r\n new (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat;\r\n (locales?: string[], options?: DateTimeFormatOptions): DateTimeFormat;\r\n (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat;\r\n supportedLocalesOf(locales: string[], options?: DateTimeFormatOptions): string[];\r\n supportedLocalesOf(locale: string, options?: DateTimeFormatOptions): string[];\r\n }\r\n}\r\n\r\ninterface String {\r\n /**\r\n * Determines whether two strings are equivalent in the current locale.\r\n * @param that String to compare to target string\r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.\r\n * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.\r\n */\r\n localeCompare(that: string, locales: string[], options?: Intl.CollatorOptions): number;\r\n\r\n /**\r\n * Determines whether two strings are equivalent in the current locale.\r\n * @param that String to compare to target string\r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.\r\n * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.\r\n */\r\n localeCompare(that: string, locale: string, options?: Intl.CollatorOptions): number;\r\n}\r\n\r\ninterface Number {\r\n /**\r\n * Converts a number to a string by using the current or specified locale.\r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locales?: string[], options?: Intl.NumberFormatOptions): string;\r\n\r\n /**\r\n * Converts a number to a string by using the current or specified locale.\r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locale?: string, options?: Intl.NumberFormatOptions): string;\r\n}\r\n\r\ninterface Date {\r\n /**\r\n * Converts a date and time to a string by using the current or specified locale.\r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;\r\n /**\r\n * Converts a date to a string by using the current or specified locale.\r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;\r\n\r\n /**\r\n * Converts a time to a string by using the current or specified locale.\r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;\r\n\r\n /**\r\n * Converts a date and time to a string by using the current or specified locale.\r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;\r\n\r\n /**\r\n * Converts a date to a string by using the current or specified locale.\r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;\r\n\r\n /**\r\n * Converts a time to a string by using the current or specified locale.\r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;\r\n}\r\ndeclare type PropertyKey = string | number | symbol;\r\n\r\ninterface Array {\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, \r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: T) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: T, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n}\r\n\r\ninterface ArrayConstructor {\r\n /**\r\n * Creates an array from an array-like object.\r\n * @param arrayLike An array-like object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): Array;\r\n\r\n\r\n /**\r\n * Creates an array from an array-like object.\r\n * @param arrayLike An array-like object to convert to an array.\r\n */\r\n from(arrayLike: ArrayLike): Array;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: T[]): Array;\r\n}\r\n\r\ninterface DateConstructor {\r\n new (value: Date): Date;\r\n}\r\n\r\ninterface Function {\r\n /**\r\n * Returns the name of the function. Function names are read-only and can not be changed.\r\n */\r\n readonly name: string;\r\n}\r\n\r\ninterface Math {\r\n /**\r\n * Returns the number of leading zero bits in the 32-bit binary representation of a number.\r\n * @param x A numeric expression.\r\n */\r\n clz32(x: number): number;\r\n\r\n /**\r\n * Returns the result of 32-bit multiplication of two numbers.\r\n * @param x First number\r\n * @param y Second number\r\n */\r\n imul(x: number, y: number): number;\r\n\r\n /**\r\n * Returns the sign of the x, indicating whether x is positive, negative or zero.\r\n * @param x The numeric expression to test\r\n */\r\n sign(x: number): number;\r\n\r\n /**\r\n * Returns the base 10 logarithm of a number.\r\n * @param x A numeric expression.\r\n */\r\n log10(x: number): number;\r\n\r\n /**\r\n * Returns the base 2 logarithm of a number.\r\n * @param x A numeric expression.\r\n */\r\n log2(x: number): number;\r\n\r\n /**\r\n * Returns the natural logarithm of 1 + x.\r\n * @param x A numeric expression.\r\n */\r\n log1p(x: number): number;\r\n\r\n /**\r\n * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of\r\n * the natural logarithms).\r\n * @param x A numeric expression.\r\n */\r\n expm1(x: number): number;\r\n\r\n /**\r\n * Returns the hyperbolic cosine of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n cosh(x: number): number;\r\n\r\n /**\r\n * Returns the hyperbolic sine of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n sinh(x: number): number;\r\n\r\n /**\r\n * Returns the hyperbolic tangent of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n tanh(x: number): number;\r\n\r\n /**\r\n * Returns the inverse hyperbolic cosine of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n acosh(x: number): number;\r\n\r\n /**\r\n * Returns the inverse hyperbolic sine of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n asinh(x: number): number;\r\n\r\n /**\r\n * Returns the inverse hyperbolic tangent of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n atanh(x: number): number;\r\n\r\n /**\r\n * Returns the square root of the sum of squares of its arguments.\r\n * @param values Values to compute the square root for.\r\n * If no arguments are passed, the result is +0.\r\n * If there is only one argument, the result is the absolute value.\r\n * If any argument is +Infinity or -Infinity, the result is +Infinity.\r\n * If any argument is NaN, the result is NaN.\r\n * If all arguments are either +0 or −0, the result is +0.\r\n */\r\n hypot(...values: number[] ): number;\r\n\r\n /**\r\n * Returns the integral part of the a numeric expression, x, removing any fractional digits.\r\n * If x is already an integer, the result is x.\r\n * @param x A numeric expression.\r\n */\r\n trunc(x: number): number;\r\n\r\n /**\r\n * Returns the nearest single precision float representation of a number.\r\n * @param x A numeric expression.\r\n */\r\n fround(x: number): number;\r\n\r\n /**\r\n * Returns an implementation-dependent approximation to the cube root of number.\r\n * @param x A numeric expression.\r\n */\r\n cbrt(x: number): number;\r\n}\r\n\r\ninterface NumberConstructor {\r\n /**\r\n * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1\r\n * that is representable as a Number value, which is approximately:\r\n * 2.2204460492503130808472633361816 x 10‍−‍16.\r\n */\r\n readonly EPSILON: number;\r\n\r\n /**\r\n * Returns true if passed value is finite.\r\n * Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a\r\n * number. Only finite values of the type number, result in true.\r\n * @param number A numeric value.\r\n */\r\n isFinite(number: number): boolean;\r\n\r\n /**\r\n * Returns true if the value passed is an integer, false otherwise.\r\n * @param number A numeric value.\r\n */\r\n isInteger(number: number): boolean;\r\n\r\n /**\r\n * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a\r\n * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter\r\n * to a number. Only values of the type number, that are also NaN, result in true.\r\n * @param number A numeric value.\r\n */\r\n isNaN(number: number): boolean;\r\n\r\n /**\r\n * Returns true if the value passed is a safe integer.\r\n * @param number A numeric value.\r\n */\r\n isSafeInteger(number: number): boolean;\r\n\r\n /**\r\n * The value of the largest integer n such that n and n + 1 are both exactly representable as\r\n * a Number value.\r\n * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.\r\n */\r\n readonly MAX_SAFE_INTEGER: number;\r\n\r\n /**\r\n * The value of the smallest integer n such that n and n − 1 are both exactly representable as\r\n * a Number value.\r\n * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).\r\n */\r\n readonly MIN_SAFE_INTEGER: number;\r\n\r\n /**\r\n * Converts a string to a floating-point number.\r\n * @param string A string that contains a floating-point number.\r\n */\r\n parseFloat(string: string): number;\r\n\r\n /**\r\n * Converts A string to an integer.\r\n * @param s A string to convert into a number.\r\n * @param radix A value between 2 and 36 that specifies the base of the number in numString.\r\n * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\n * All other strings are considered decimal.\r\n */\r\n parseInt(string: string, radix?: number): number;\r\n}\r\n\r\ninterface Object {\r\n /**\r\n * Determines whether an object has a property with the specified name.\r\n * @param v A property name.\r\n */\r\n hasOwnProperty(v: PropertyKey): boolean\r\n\r\n /**\r\n * Determines whether a specified property is enumerable.\r\n * @param v A property name.\r\n */\r\n propertyIsEnumerable(v: PropertyKey): boolean;\r\n}\r\n\r\ninterface ObjectConstructor {\r\n /**\r\n * Copy the values of all of the enumerable own properties from one or more source objects to a\r\n * target object. Returns the target object.\r\n * @param target The target object to copy to.\r\n * @param source The source object from which to copy properties.\r\n */\r\n assign(target: T, source: U): T & U;\r\n\r\n /**\r\n * Copy the values of all of the enumerable own properties from one or more source objects to a\r\n * target object. Returns the target object.\r\n * @param target The target object to copy to.\r\n * @param source1 The first source object from which to copy properties.\r\n * @param source2 The second source object from which to copy properties.\r\n */\r\n assign(target: T, source1: U, source2: V): T & U & V;\r\n\r\n /**\r\n * Copy the values of all of the enumerable own properties from one or more source objects to a\r\n * target object. Returns the target object.\r\n * @param target The target object to copy to.\r\n * @param source1 The first source object from which to copy properties.\r\n * @param source2 The second source object from which to copy properties.\r\n * @param source3 The third source object from which to copy properties.\r\n */\r\n assign(target: T, source1: U, source2: V, source3: W): T & U & V & W;\r\n\r\n /**\r\n * Copy the values of all of the enumerable own properties from one or more source objects to a\r\n * target object. Returns the target object.\r\n * @param target The target object to copy to.\r\n * @param sources One or more source objects from which to copy properties\r\n */\r\n assign(target: any, ...sources: any[]): any;\r\n\r\n /**\r\n * Returns an array of all symbol properties found directly on object o.\r\n * @param o Object to retrieve the symbols from.\r\n */\r\n getOwnPropertySymbols(o: any): symbol[];\r\n\r\n /**\r\n * Returns true if the values are the same value, false otherwise.\r\n * @param value1 The first value.\r\n * @param value2 The second value.\r\n */\r\n is(value1: any, value2: any): boolean;\r\n\r\n /**\r\n * Sets the prototype of a specified object o to object proto or null. Returns the object o.\r\n * @param o The object to change its prototype.\r\n * @param proto The value of the new prototype or null.\r\n */\r\n setPrototypeOf(o: any, proto: any): any;\r\n\r\n /**\r\n * Gets the own property descriptor of the specified object.\r\n * An own property descriptor is one that is defined directly on the object and is not\r\n * inherited from the object's prototype.\r\n * @param o Object that contains the property.\r\n * @param p Name of the property.\r\n */\r\n getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor;\r\n\r\n /**\r\n * Adds a property to an object, or modifies attributes of an existing property.\r\n * @param o Object on which to add or modify the property. This can be a native JavaScript\r\n * object (that is, a user-defined object or a built in object) or a DOM object.\r\n * @param p The property name.\r\n * @param attributes Descriptor for the property. It can be for a data property or an accessor\r\n * property.\r\n */\r\n defineProperty(o: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): any;\r\n}\r\n\r\ninterface ReadonlyArray {\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: T, index: number, obj: ReadonlyArray) => boolean, thisArg?: any): T | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, \r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: T) => boolean, thisArg?: any): number;\r\n}\r\n\r\ninterface RegExp {\r\n /**\r\n * Returns a string indicating the flags of the regular expression in question. This field is read-only.\r\n * The characters in this string are sequenced and concatenated in the following order:\r\n *\r\n * - \"g\" for global\r\n * - \"i\" for ignoreCase\r\n * - \"m\" for multiline\r\n * - \"u\" for unicode\r\n * - \"y\" for sticky\r\n *\r\n * If no flags are set, the value is the empty string.\r\n */\r\n readonly flags: string;\r\n\r\n /**\r\n * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular\r\n * expression. Default is false. Read-only.\r\n */\r\n readonly sticky: boolean;\r\n\r\n /**\r\n * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular\r\n * expression. Default is false. Read-only.\r\n */\r\n readonly unicode: boolean;\r\n}\r\n\r\ninterface RegExpConstructor {\r\n new (pattern: RegExp, flags?: string): RegExp;\r\n (pattern: RegExp, flags?: string): RegExp;\r\n}\r\n\r\ninterface String {\r\n /**\r\n * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point\r\n * value of the UTF-16 encoded code point starting at the string element at position pos in\r\n * the String resulting from converting this object to a String.\r\n * If there is no element at that position, the result is undefined.\r\n * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.\r\n */\r\n codePointAt(pos: number): number | undefined;\r\n\r\n /**\r\n * Returns true if searchString appears as a substring of the result of converting this\r\n * object to a String, at one or more positions that are\r\n * greater than or equal to position; otherwise, returns false.\r\n * @param searchString search string\r\n * @param position If position is undefined, 0 is assumed, so as to search all of the String.\r\n */\r\n includes(searchString: string, position?: number): boolean;\r\n\r\n /**\r\n * Returns true if the sequence of elements of searchString converted to a String is the\r\n * same as the corresponding elements of this object (converted to a String) starting at\r\n * endPosition – length(this). Otherwise returns false.\r\n */\r\n endsWith(searchString: string, endPosition?: number): boolean;\r\n\r\n /**\r\n * Returns the String value result of normalizing the string into the normalization form\r\n * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.\r\n * @param form Applicable values: \"NFC\", \"NFD\", \"NFKC\", or \"NFKD\", If not specified default\r\n * is \"NFC\"\r\n */\r\n normalize(form: \"NFC\" | \"NFD\" | \"NFKC\" | \"NFKD\"): string;\r\n\r\n /**\r\n * Returns the String value result of normalizing the string into the normalization form\r\n * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.\r\n * @param form Applicable values: \"NFC\", \"NFD\", \"NFKC\", or \"NFKD\", If not specified default\r\n * is \"NFC\"\r\n */\r\n normalize(form?: string): string;\r\n\r\n /**\r\n * Returns a String value that is made from count copies appended together. If count is 0,\r\n * T is the empty String is returned.\r\n * @param count number of copies to append\r\n */\r\n repeat(count: number): string;\r\n\r\n /**\r\n * Returns true if the sequence of elements of searchString converted to a String is the\r\n * same as the corresponding elements of this object (converted to a String) starting at\r\n * position. Otherwise returns false.\r\n */\r\n startsWith(searchString: string, position?: number): boolean;\r\n\r\n /**\r\n * Returns an HTML anchor element and sets the name attribute to the text value\r\n * @param name\r\n */\r\n anchor(name: string): string;\r\n\r\n /** Returns a HTML element */\r\n big(): string;\r\n\r\n /** Returns a HTML element */\r\n blink(): string;\r\n\r\n /** Returns a HTML element */\r\n bold(): string;\r\n\r\n /** Returns a HTML element */\r\n fixed(): string\r\n\r\n /** Returns a HTML element and sets the color attribute value */\r\n fontcolor(color: string): string\r\n\r\n /** Returns a HTML element and sets the size attribute value */\r\n fontsize(size: number): string;\r\n\r\n /** Returns a HTML element and sets the size attribute value */\r\n fontsize(size: string): string;\r\n\r\n /** Returns an HTML element */\r\n italics(): string;\r\n\r\n /** Returns an HTML element and sets the href attribute value */\r\n link(url: string): string;\r\n\r\n /** Returns a HTML element */\r\n small(): string;\r\n\r\n /** Returns a HTML element */\r\n strike(): string;\r\n\r\n /** Returns a HTML element */\r\n sub(): string;\r\n\r\n /** Returns a HTML element */\r\n sup(): string;\r\n}\r\n\r\ninterface StringConstructor {\r\n /**\r\n * Return the String value whose elements are, in order, the elements in the List elements.\r\n * If length is 0, the empty string is returned.\r\n */\r\n fromCodePoint(...codePoints: number[]): string;\r\n\r\n /**\r\n * String.raw is intended for use as a tag function of a Tagged Template String. When called\r\n * as such the first argument will be a well formed template call site object and the rest\r\n * parameter will contain the substitution values.\r\n * @param template A well-formed template string call site representation.\r\n * @param substitutions A set of substitution values.\r\n */\r\n raw(template: TemplateStringsArray, ...substitutions: any[]): string;\r\n}\r\ninterface Map {\r\n clear(): void;\r\n delete(key: K): boolean;\r\n forEach(callbackfn: (value: V, index: K, map: Map) => void, thisArg?: any): void;\r\n get(key: K): V | undefined;\r\n has(key: K): boolean;\r\n set(key: K, value?: V): this;\r\n readonly size: number;\r\n}\r\n\r\ninterface MapConstructor {\r\n new (): Map;\r\n new (entries?: [K, V][]): Map;\r\n readonly prototype: Map;\r\n}\r\ndeclare var Map: MapConstructor;\r\n\r\ninterface WeakMap {\r\n delete(key: K): boolean;\r\n get(key: K): V | undefined;\r\n has(key: K): boolean;\r\n set(key: K, value?: V): this;\r\n}\r\n\r\ninterface WeakMapConstructor {\r\n new (): WeakMap;\r\n new (entries?: [K, V][]): WeakMap;\r\n readonly prototype: WeakMap;\r\n}\r\ndeclare var WeakMap: WeakMapConstructor;\r\n\r\ninterface Set {\r\n add(value: T): this;\r\n clear(): void;\r\n delete(value: T): boolean;\r\n forEach(callbackfn: (value: T, index: T, set: Set) => void, thisArg?: any): void;\r\n has(value: T): boolean;\r\n readonly size: number;\r\n}\r\n\r\ninterface SetConstructor {\r\n new (): Set;\r\n new (values?: T[]): Set;\r\n readonly prototype: Set;\r\n}\r\ndeclare var Set: SetConstructor;\r\n\r\ninterface WeakSet {\r\n add(value: T): this;\r\n delete(value: T): boolean;\r\n has(value: T): boolean;\r\n}\r\n\r\ninterface WeakSetConstructor {\r\n new (): WeakSet;\r\n new (values?: T[]): WeakSet;\r\n readonly prototype: WeakSet;\r\n}\r\ndeclare var WeakSet: WeakSetConstructor;\r\ninterface GeneratorFunction extends Function { }\r\n\r\ninterface GeneratorFunctionConstructor {\r\n /**\r\n * Creates a new Generator function.\r\n * @param args A list of arguments the function accepts.\r\n */\r\n new (...args: string[]): GeneratorFunction;\r\n (...args: string[]): GeneratorFunction;\r\n readonly prototype: GeneratorFunction;\r\n}\r\ndeclare var GeneratorFunction: GeneratorFunctionConstructor;\r\n/// \r\n\r\ninterface SymbolConstructor {\r\n /** \r\n * A method that returns the default iterator for an object. Called by the semantics of the \r\n * for-of statement.\r\n */\r\n readonly iterator: symbol;\r\n}\r\n\r\ninterface IteratorResult {\r\n done: boolean;\r\n value: T;\r\n}\r\n\r\ninterface Iterator {\r\n next(value?: any): IteratorResult;\r\n return?(value?: any): IteratorResult;\r\n throw?(e?: any): IteratorResult;\r\n}\r\n\r\ninterface Iterable {\r\n [Symbol.iterator](): Iterator;\r\n}\r\n\r\ninterface IterableIterator extends Iterator {\r\n [Symbol.iterator](): IterableIterator;\r\n}\r\n\r\ninterface Array {\r\n /** Iterator */\r\n [Symbol.iterator](): IterableIterator;\r\n\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, T]>;\r\n\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n}\r\n\r\ninterface ArrayConstructor {\r\n /**\r\n * Creates an array from an iterable object.\r\n * @param iterable An iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): Array;\r\n \r\n /**\r\n * Creates an array from an iterable object.\r\n * @param iterable An iterable object to convert to an array.\r\n */\r\n from(iterable: Iterable): Array;\r\n}\r\n\r\ninterface ReadonlyArray {\r\n /** Iterator */\r\n [Symbol.iterator](): IterableIterator;\r\n\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, T]>;\r\n\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n}\r\n\r\ninterface IArguments {\r\n /** Iterator */\r\n [Symbol.iterator](): IterableIterator;\r\n}\r\n\r\ninterface Map {\r\n [Symbol.iterator](): IterableIterator<[K,V]>;\r\n entries(): IterableIterator<[K, V]>;\r\n keys(): IterableIterator;\r\n values(): IterableIterator;\r\n}\r\n\r\ninterface MapConstructor {\r\n new (iterable: Iterable<[K, V]>): Map;\r\n}\r\n\r\ninterface WeakMap { }\r\n\r\ninterface WeakMapConstructor {\r\n new (iterable: Iterable<[K, V]>): WeakMap;\r\n}\r\n\r\ninterface Set {\r\n [Symbol.iterator](): IterableIterator;\r\n entries(): IterableIterator<[T, T]>;\r\n keys(): IterableIterator;\r\n values(): IterableIterator;\r\n}\r\n\r\ninterface SetConstructor {\r\n new (iterable: Iterable): Set;\r\n}\r\n\r\ninterface WeakSet { }\r\n\r\ninterface WeakSetConstructor {\r\n new (iterable: Iterable): WeakSet;\r\n}\r\n\r\ninterface Promise { }\r\n\r\ninterface PromiseConstructor {\r\n /**\r\n * Creates a Promise that is resolved with an array of results when all of the provided Promises \r\n * resolve, or rejected when any Promise is rejected.\r\n * @param values An array of Promises.\r\n * @returns A new Promise.\r\n */\r\n all(values: Iterable>): Promise;\r\n \r\n /**\r\n * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved \r\n * or rejected.\r\n * @param values An array of Promises.\r\n * @returns A new Promise.\r\n */\r\n race(values: Iterable>): Promise;\r\n}\r\n\r\ndeclare namespace Reflect {\r\n function enumerate(target: any): IterableIterator;\r\n}\r\n\r\ninterface String {\r\n /** Iterator */\r\n [Symbol.iterator](): IterableIterator;\r\n}\r\n\r\n/**\r\n * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested \r\n * number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int8Array {\r\n [Symbol.iterator](): IterableIterator;\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n}\r\n\r\ninterface Int8ArrayConstructor {\r\n new (elements: Iterable): Int8Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;\r\n}\r\n\r\n/**\r\n * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint8Array {\r\n [Symbol.iterator](): IterableIterator;\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n}\r\n\r\ninterface Uint8ArrayConstructor {\r\n new (elements: Iterable): Uint8Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;\r\n}\r\n\r\n/**\r\n * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0. \r\n * If the requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint8ClampedArray {\r\n [Symbol.iterator](): IterableIterator;\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n}\r\n\r\ninterface Uint8ClampedArrayConstructor {\r\n new (elements: Iterable): Uint8ClampedArray;\r\n\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;\r\n}\r\n\r\n/**\r\n * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int16Array {\r\n [Symbol.iterator](): IterableIterator;\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n}\r\n\r\ninterface Int16ArrayConstructor {\r\n new (elements: Iterable): Int16Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;\r\n}\r\n\r\n/**\r\n * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint16Array {\r\n [Symbol.iterator](): IterableIterator;\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n}\r\n\r\ninterface Uint16ArrayConstructor {\r\n new (elements: Iterable): Uint16Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;\r\n}\r\n\r\n/**\r\n * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int32Array {\r\n [Symbol.iterator](): IterableIterator;\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n}\r\n\r\ninterface Int32ArrayConstructor {\r\n new (elements: Iterable): Int32Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;\r\n}\r\n\r\n/**\r\n * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint32Array {\r\n [Symbol.iterator](): IterableIterator;\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n}\r\n\r\ninterface Uint32ArrayConstructor {\r\n new (elements: Iterable): Uint32Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;\r\n}\r\n\r\n/**\r\n * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number\r\n * of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float32Array {\r\n [Symbol.iterator](): IterableIterator;\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n}\r\n\r\ninterface Float32ArrayConstructor {\r\n new (elements: Iterable): Float32Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;\r\n}\r\n\r\n/**\r\n * A typed array of 64-bit float values. The contents are initialized to 0. If the requested \r\n * number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float64Array {\r\n [Symbol.iterator](): IterableIterator;\r\n /** \r\n * Returns an array of key, value pairs for every entry in the array\r\n */\r\n entries(): IterableIterator<[number, number]>;\r\n /** \r\n * Returns an list of keys in the array\r\n */\r\n keys(): IterableIterator;\r\n /** \r\n * Returns an list of values in the array\r\n */\r\n values(): IterableIterator;\r\n}\r\n\r\ninterface Float64ArrayConstructor {\r\n new (elements: Iterable): Float64Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;\r\n}/**\r\n * Represents the completion of an asynchronous operation\r\n */\r\ninterface Promise {\r\n /**\r\n * Attaches callbacks for the resolution and/or rejection of the Promise.\r\n * @param onfulfilled The callback to execute when the Promise is resolved.\r\n * @param onrejected The callback to execute when the Promise is rejected.\r\n * @returns A Promise for the completion of which ever callback is executed.\r\n */\r\n then(onfulfilled: (value: T) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise;\r\n\r\n /**\r\n * Attaches callbacks for the resolution and/or rejection of the Promise.\r\n * @param onfulfilled The callback to execute when the Promise is resolved.\r\n * @param onrejected The callback to execute when the Promise is rejected.\r\n * @returns A Promise for the completion of which ever callback is executed.\r\n */\r\n then(onfulfilled: (value: T) => TResult | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise;\r\n\r\n /**\r\n * Attaches callbacks for the resolution and/or rejection of the Promise.\r\n * @param onfulfilled The callback to execute when the Promise is resolved.\r\n * @returns A Promise for the completion of which ever callback is executed.\r\n */\r\n then(onfulfilled: (value: T) => TResult | PromiseLike): Promise;\r\n\r\n /**\r\n * Creates a new Promise with the same internal state of this Promise.\r\n * @returns A Promise.\r\n */\r\n then(): Promise;\r\n\r\n /**\r\n * Attaches a callback for only the rejection of the Promise.\r\n * @param onrejected The callback to execute when the Promise is rejected.\r\n * @returns A Promise for the completion of the callback.\r\n */\r\n catch(onrejected: (reason: any) => TResult | PromiseLike): Promise;\r\n\r\n /**\r\n * Attaches a callback for only the rejection of the Promise.\r\n * @param onrejected The callback to execute when the Promise is rejected.\r\n * @returns A Promise for the completion of the callback.\r\n */\r\n catch(onrejected: (reason: any) => T | PromiseLike): Promise;\r\n}\r\n\r\ninterface PromiseConstructor {\r\n /**\r\n * A reference to the prototype.\r\n */\r\n readonly prototype: Promise;\r\n\r\n /**\r\n * Creates a new Promise.\r\n * @param executor A callback used to initialize the promise. This callback is passed two arguments:\r\n * a resolve callback used resolve the promise with a value or the result of another promise,\r\n * and a reject callback used to reject the promise with a provided reason or error.\r\n */\r\n new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise;\r\n\r\n /**\r\n * Creates a Promise that is resolved with an array of results when all of the provided Promises\r\n * resolve, or rejected when any Promise is rejected.\r\n * @param values An array of Promises.\r\n * @returns A new Promise.\r\n */\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;\r\n\r\n /**\r\n * Creates a Promise that is resolved with an array of results when all of the provided Promises\r\n * resolve, or rejected when any Promise is rejected.\r\n * @param values An array of Promises.\r\n * @returns A new Promise.\r\n */\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;\r\n\r\n /**\r\n * Creates a Promise that is resolved with an array of results when all of the provided Promises\r\n * resolve, or rejected when any Promise is rejected.\r\n * @param values An array of Promises.\r\n * @returns A new Promise.\r\n */\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;\r\n\r\n /**\r\n * Creates a Promise that is resolved with an array of results when all of the provided Promises\r\n * resolve, or rejected when any Promise is rejected.\r\n * @param values An array of Promises.\r\n * @returns A new Promise.\r\n */\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;\r\n\r\n /**\r\n * Creates a Promise that is resolved with an array of results when all of the provided Promises\r\n * resolve, or rejected when any Promise is rejected.\r\n * @param values An array of Promises.\r\n * @returns A new Promise.\r\n */\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>;\r\n\r\n /**\r\n * Creates a Promise that is resolved with an array of results when all of the provided Promises\r\n * resolve, or rejected when any Promise is rejected.\r\n * @param values An array of Promises.\r\n * @returns A new Promise.\r\n */\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike , T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>;\r\n\r\n /**\r\n * Creates a Promise that is resolved with an array of results when all of the provided Promises\r\n * resolve, or rejected when any Promise is rejected.\r\n * @param values An array of Promises.\r\n * @returns A new Promise.\r\n */\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike ]): Promise<[T1, T2, T3, T4]>;\r\n\r\n /**\r\n * Creates a Promise that is resolved with an array of results when all of the provided Promises\r\n * resolve, or rejected when any Promise is rejected.\r\n * @param values An array of Promises.\r\n * @returns A new Promise.\r\n */\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>;\r\n\r\n /**\r\n * Creates a Promise that is resolved with an array of results when all of the provided Promises\r\n * resolve, or rejected when any Promise is rejected.\r\n * @param values An array of Promises.\r\n * @returns A new Promise.\r\n */\r\n all(values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>;\r\n\r\n /**\r\n * Creates a Promise that is resolved with an array of results when all of the provided Promises\r\n * resolve, or rejected when any Promise is rejected.\r\n * @param values An array of Promises.\r\n * @returns A new Promise.\r\n */\r\n all(values: (T | PromiseLike)[]): Promise;\r\n\r\n /**\r\n * Creates a new rejected promise for the provided reason.\r\n * @param reason The reason the promise was rejected.\r\n * @returns A new rejected Promise.\r\n */\r\n reject(reason: any): Promise;\r\n\r\n /**\r\n * Creates a new rejected promise for the provided reason.\r\n * @param reason The reason the promise was rejected.\r\n * @returns A new rejected Promise.\r\n */\r\n reject(reason: any): Promise;\r\n\r\n /**\r\n * Creates a new resolved promise for the provided value.\r\n * @param value A promise.\r\n * @returns A promise whose internal state matches the provided promise.\r\n */\r\n resolve(value: T | PromiseLike): Promise;\r\n\r\n /**\r\n * Creates a new resolved promise .\r\n * @returns A resolved promise.\r\n */\r\n resolve(): Promise;\r\n}\r\n\r\ndeclare var Promise: PromiseConstructor;interface ProxyHandler {\r\n getPrototypeOf? (target: T): any;\r\n setPrototypeOf? (target: T, v: any): boolean;\r\n isExtensible? (target: T): boolean;\r\n preventExtensions? (target: T): boolean;\r\n getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor;\r\n has? (target: T, p: PropertyKey): boolean;\r\n get? (target: T, p: PropertyKey, receiver: any): any;\r\n set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;\r\n deleteProperty? (target: T, p: PropertyKey): boolean;\r\n defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean;\r\n enumerate? (target: T): PropertyKey[];\r\n ownKeys? (target: T): PropertyKey[];\r\n apply? (target: T, thisArg: any, argArray?: any): any;\r\n construct? (target: T, thisArg: any, argArray?: any): any;\r\n}\r\n\r\ninterface ProxyConstructor {\r\n revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; };\r\n new (target: T, handler: ProxyHandler): T\r\n}\r\ndeclare var Proxy: ProxyConstructor;declare namespace Reflect {\r\n function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any;\r\n function construct(target: Function, argumentsList: ArrayLike, newTarget?: any): any;\r\n function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;\r\n function deleteProperty(target: any, propertyKey: PropertyKey): boolean;\r\n function get(target: any, propertyKey: PropertyKey, receiver?: any): any;\r\n function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;\r\n function getPrototypeOf(target: any): any;\r\n function has(target: any, propertyKey: string): boolean;\r\n function has(target: any, propertyKey: symbol): boolean;\r\n function isExtensible(target: any): boolean;\r\n function ownKeys(target: any): Array;\r\n function preventExtensions(target: any): boolean;\r\n function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;\r\n function setPrototypeOf(target: any, proto: any): boolean;\r\n}interface Symbol {\r\n /** Returns a string representation of an object. */\r\n toString(): string;\r\n\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): Object;\r\n}\r\n\r\ninterface SymbolConstructor {\r\n /** \r\n * A reference to the prototype. \r\n */\r\n readonly prototype: Symbol;\r\n\r\n /**\r\n * Returns a new unique Symbol value.\r\n * @param description Description of the new Symbol object.\r\n */\r\n (description?: string|number): symbol;\r\n\r\n /**\r\n * Returns a Symbol object from the global symbol registry matching the given key if found. \r\n * Otherwise, returns a new symbol with this key.\r\n * @param key key to search for.\r\n */\r\n for(key: string): symbol;\r\n\r\n /**\r\n * Returns a key from the global symbol registry matching the given Symbol if found. \r\n * Otherwise, returns a undefined.\r\n * @param sym Symbol to find the key for.\r\n */\r\n keyFor(sym: symbol): string | undefined;\r\n}\r\n\r\ndeclare var Symbol: SymbolConstructor;/// \r\n\r\ninterface SymbolConstructor {\r\n /** \r\n * A method that determines if a constructor object recognizes an object as one of the \r\n * constructor’s instances. Called by the semantics of the instanceof operator. \r\n */\r\n readonly hasInstance: symbol;\r\n\r\n /** \r\n * A Boolean value that if true indicates that an object should flatten to its array elements\r\n * by Array.prototype.concat.\r\n */\r\n readonly isConcatSpreadable: symbol;\r\n\r\n /**\r\n * A regular expression method that matches the regular expression against a string. Called \r\n * by the String.prototype.match method. \r\n */\r\n readonly match: symbol;\r\n\r\n /** \r\n * A regular expression method that replaces matched substrings of a string. Called by the \r\n * String.prototype.replace method.\r\n */\r\n readonly replace: symbol;\r\n\r\n /**\r\n * A regular expression method that returns the index within a string that matches the \r\n * regular expression. Called by the String.prototype.search method.\r\n */\r\n readonly search: symbol;\r\n\r\n /** \r\n * A function valued property that is the constructor function that is used to create \r\n * derived objects.\r\n */\r\n readonly species: symbol;\r\n\r\n /**\r\n * A regular expression method that splits a string at the indices that match the regular \r\n * expression. Called by the String.prototype.split method.\r\n */\r\n readonly split: symbol;\r\n\r\n /** \r\n * A method that converts an object to a corresponding primitive value.\r\n * Called by the ToPrimitive abstract operation.\r\n */\r\n readonly toPrimitive: symbol;\r\n\r\n /** \r\n * A String value that is used in the creation of the default string description of an object.\r\n * Called by the built-in method Object.prototype.toString.\r\n */\r\n readonly toStringTag: symbol;\r\n\r\n /**\r\n * An Object whose own property names are property names that are excluded from the 'with'\r\n * environment bindings of the associated objects.\r\n */\r\n readonly unscopables: symbol;\r\n}\r\n\r\ninterface Symbol {\r\n readonly [Symbol.toStringTag]: \"Symbol\";\r\n}\r\n\r\ninterface Array {\r\n /**\r\n * Returns an object whose properties have the value 'true'\r\n * when they will be absent when used in a 'with' statement.\r\n */\r\n [Symbol.unscopables](): {\r\n copyWithin: boolean;\r\n entries: boolean;\r\n fill: boolean;\r\n find: boolean;\r\n findIndex: boolean;\r\n keys: boolean;\r\n values: boolean;\r\n };\r\n}\r\n\r\ninterface Date {\r\n /**\r\n * Converts a Date object to a string.\r\n */\r\n [Symbol.toPrimitive](hint: \"default\"): string;\r\n /**\r\n * Converts a Date object to a string.\r\n */\r\n [Symbol.toPrimitive](hint: \"string\"): string;\r\n /**\r\n * Converts a Date object to a number.\r\n */\r\n [Symbol.toPrimitive](hint: \"number\"): number;\r\n /**\r\n * Converts a Date object to a string or number.\r\n *\r\n * @param hint The strings \"number\", \"string\", or \"default\" to specify what primitive to return.\r\n *\r\n * @throws {TypeError} If 'hint' was given something other than \"number\", \"string\", or \"default\".\r\n * @returns A number if 'hint' was \"number\", a string if 'hint' was \"string\" or \"default\".\r\n */\r\n [Symbol.toPrimitive](hint: string): string | number;\r\n}\r\n\r\ninterface Map {\r\n readonly [Symbol.toStringTag]: \"Map\";\r\n}\r\n\r\ninterface WeakMap{\r\n readonly [Symbol.toStringTag]: \"WeakMap\";\r\n}\r\n\r\ninterface Set {\r\n readonly [Symbol.toStringTag]: \"Set\";\r\n}\r\n\r\ninterface WeakSet {\r\n readonly [Symbol.toStringTag]: \"WeakSet\";\r\n}\r\n\r\ninterface JSON {\r\n readonly [Symbol.toStringTag]: \"JSON\";\r\n}\r\n\r\ninterface Function {\r\n /**\r\n * Determines whether the given value inherits from this function if this function was used\r\n * as a constructor function.\r\n *\r\n * A constructor function can control which objects are recognized as its instances by\r\n * 'instanceof' by overriding this method.\r\n */\r\n [Symbol.hasInstance](value: any): boolean;\r\n}\r\n\r\ninterface GeneratorFunction extends Function {\r\n readonly [Symbol.toStringTag]: \"GeneratorFunction\";\r\n}\r\n\r\ninterface Math {\r\n readonly [Symbol.toStringTag]: \"Math\";\r\n}\r\n\r\ninterface Promise {\r\n readonly [Symbol.toStringTag]: \"Promise\";\r\n}\r\n\r\ninterface PromiseConstructor {\r\n readonly [Symbol.species]: Function;\r\n}\r\n\r\ninterface RegExp {\r\n /**\r\n * Matches a string with this regular expression, and returns an array containing the results of\r\n * that search.\r\n * @param string A string to search within.\r\n */\r\n [Symbol.match](string: string): RegExpMatchArray | null;\r\n\r\n /**\r\n * Replaces text in a string, using this regular expression.\r\n * @param string A String object or string literal whose contents matching against\r\n * this regular expression will be replaced\r\n * @param replaceValue A String object or string literal containing the text to replace for every \r\n * successful match of this regular expression.\r\n */\r\n [Symbol.replace](string: string, replaceValue: string): string;\r\n\r\n /**\r\n * Replaces text in a string, using this regular expression.\r\n * @param string A String object or string literal whose contents matching against\r\n * this regular expression will be replaced\r\n * @param replacer A function that returns the replacement text.\r\n */\r\n [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;\r\n\r\n /**\r\n * Finds the position beginning first substring match in a regular expression search\r\n * using this regular expression.\r\n *\r\n * @param string The string to search within.\r\n */\r\n [Symbol.search](string: string): number;\r\n\r\n /**\r\n * Returns an array of substrings that were delimited by strings in the original input that\r\n * match against this regular expression.\r\n *\r\n * If the regular expression contains capturing parentheses, then each time this\r\n * regular expression matches, the results (including any undefined results) of the\r\n * capturing parentheses are spliced.\r\n *\r\n * @param string string value to split\r\n * @param limit if not undefined, the output array is truncated so that it contains no more\r\n * than 'limit' elements.\r\n */\r\n [Symbol.split](string: string, limit?: number): string[];\r\n}\r\n\r\ninterface RegExpConstructor {\r\n [Symbol.species](): RegExpConstructor;\r\n}\r\n\r\ninterface String {\r\n /**\r\n * Matches a string an object that supports being matched against, and returns an array containing the results of that search.\r\n * @param matcher An object that supports being matched against.\r\n */\r\n match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null;\r\n\r\n /**\r\n * Replaces text in a string, using an object that supports replacement within a string.\r\n * @param searchValue A object can search for and replace matches within a string.\r\n * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.\r\n */\r\n replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;\r\n\r\n /**\r\n * Replaces text in a string, using an object that supports replacement within a string.\r\n * @param searchValue A object can search for and replace matches within a string.\r\n * @param replacer A function that returns the replacement text.\r\n */\r\n replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;\r\n\r\n /**\r\n * Finds the first substring match in a regular expression search.\r\n * @param searcher An object which supports searching within a string.\r\n */\r\n search(searcher: { [Symbol.search](string: string): number; }): number;\r\n\r\n /**\r\n * Split a string into substrings using the specified separator and return them as an array.\r\n * @param splitter An object that can split a string.\r\n * @param limit A value used to limit the number of elements returned in the array.\r\n */\r\n split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[];\r\n}\r\n\r\n/**\r\n * Represents a raw buffer of binary data, which is used to store data for the \r\n * different typed arrays. ArrayBuffers cannot be read from or written to directly, \r\n * but can be passed to a typed array or DataView Object to interpret the raw \r\n * buffer as needed. \r\n */\r\ninterface ArrayBuffer {\r\n readonly [Symbol.toStringTag]: \"ArrayBuffer\";\r\n}\r\n\r\ninterface DataView {\r\n readonly [Symbol.toStringTag]: \"DataView\";\r\n}\r\n\r\n/**\r\n * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested \r\n * number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int8Array {\r\n readonly [Symbol.toStringTag]: \"Int8Array\";\r\n}\r\n\r\n/**\r\n * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint8Array {\r\n readonly [Symbol.toStringTag]: \"UInt8Array\";\r\n}\r\n\r\n/**\r\n * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0. \r\n * If the requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint8ClampedArray {\r\n readonly [Symbol.toStringTag]: \"Uint8ClampedArray\";\r\n}\r\n\r\n/**\r\n * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int16Array {\r\n readonly [Symbol.toStringTag]: \"Int16Array\";\r\n}\r\n\r\n/**\r\n * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint16Array {\r\n readonly [Symbol.toStringTag]: \"Uint16Array\";\r\n}\r\n\r\n/**\r\n * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int32Array {\r\n readonly [Symbol.toStringTag]: \"Int32Array\";\r\n}\r\n\r\n/**\r\n * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint32Array {\r\n readonly [Symbol.toStringTag]: \"Uint32Array\";\r\n}\r\n\r\n/**\r\n * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number\r\n * of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float32Array {\r\n readonly [Symbol.toStringTag]: \"Float32Array\";\r\n}\r\n\r\n/**\r\n * A typed array of 64-bit float values. The contents are initialized to 0. If the requested \r\n * number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float64Array {\r\n readonly [Symbol.toStringTag]: \"Float64Array\";\r\n}\r\n/////////////////////////////\r\n/// IE DOM APIs\r\n/////////////////////////////\r\n\r\ninterface Algorithm {\r\n name: string;\r\n}\r\n\r\ninterface AriaRequestEventInit extends EventInit {\r\n attributeName?: string;\r\n attributeValue?: string;\r\n}\r\n\r\ninterface CommandEventInit extends EventInit {\r\n commandName?: string;\r\n detail?: string;\r\n}\r\n\r\ninterface CompositionEventInit extends UIEventInit {\r\n data?: string;\r\n}\r\n\r\ninterface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation {\r\n arrayOfDomainStrings?: string[];\r\n}\r\n\r\ninterface ConstrainBooleanParameters {\r\n exact?: boolean;\r\n ideal?: boolean;\r\n}\r\n\r\ninterface ConstrainDOMStringParameters {\r\n exact?: string | string[];\r\n ideal?: string | string[];\r\n}\r\n\r\ninterface ConstrainDoubleRange extends DoubleRange {\r\n exact?: number;\r\n ideal?: number;\r\n}\r\n\r\ninterface ConstrainLongRange extends LongRange {\r\n exact?: number;\r\n ideal?: number;\r\n}\r\n\r\ninterface ConstrainVideoFacingModeParameters {\r\n exact?: string | string[];\r\n ideal?: string | string[];\r\n}\r\n\r\ninterface CustomEventInit extends EventInit {\r\n detail?: any;\r\n}\r\n\r\ninterface DeviceAccelerationDict {\r\n x?: number;\r\n y?: number;\r\n z?: number;\r\n}\r\n\r\ninterface DeviceLightEventInit extends EventInit {\r\n value?: number;\r\n}\r\n\r\ninterface DeviceRotationRateDict {\r\n alpha?: number;\r\n beta?: number;\r\n gamma?: number;\r\n}\r\n\r\ninterface DoubleRange {\r\n max?: number;\r\n min?: number;\r\n}\r\n\r\ninterface EventInit {\r\n bubbles?: boolean;\r\n cancelable?: boolean;\r\n}\r\n\r\ninterface EventModifierInit extends UIEventInit {\r\n ctrlKey?: boolean;\r\n shiftKey?: boolean;\r\n altKey?: boolean;\r\n metaKey?: boolean;\r\n modifierAltGraph?: boolean;\r\n modifierCapsLock?: boolean;\r\n modifierFn?: boolean;\r\n modifierFnLock?: boolean;\r\n modifierHyper?: boolean;\r\n modifierNumLock?: boolean;\r\n modifierOS?: boolean;\r\n modifierScrollLock?: boolean;\r\n modifierSuper?: boolean;\r\n modifierSymbol?: boolean;\r\n modifierSymbolLock?: boolean;\r\n}\r\n\r\ninterface ExceptionInformation {\r\n domain?: string;\r\n}\r\n\r\ninterface FocusEventInit extends UIEventInit {\r\n relatedTarget?: EventTarget;\r\n}\r\n\r\ninterface HashChangeEventInit extends EventInit {\r\n newURL?: string;\r\n oldURL?: string;\r\n}\r\n\r\ninterface IDBIndexParameters {\r\n multiEntry?: boolean;\r\n unique?: boolean;\r\n}\r\n\r\ninterface IDBObjectStoreParameters {\r\n autoIncrement?: boolean;\r\n keyPath?: IDBKeyPath;\r\n}\r\n\r\ninterface KeyAlgorithm {\r\n name?: string;\r\n}\r\n\r\ninterface KeyboardEventInit extends EventModifierInit {\r\n code?: string;\r\n key?: string;\r\n location?: number;\r\n repeat?: boolean;\r\n}\r\n\r\ninterface LongRange {\r\n max?: number;\r\n min?: number;\r\n}\r\n\r\ninterface MSAccountInfo {\r\n rpDisplayName?: string;\r\n userDisplayName?: string;\r\n accountName?: string;\r\n userId?: string;\r\n accountImageUri?: string;\r\n}\r\n\r\ninterface MSAudioLocalClientEvent extends MSLocalClientEventBase {\r\n networkSendQualityEventRatio?: number;\r\n networkDelayEventRatio?: number;\r\n cpuInsufficientEventRatio?: number;\r\n deviceHalfDuplexAECEventRatio?: number;\r\n deviceRenderNotFunctioningEventRatio?: number;\r\n deviceCaptureNotFunctioningEventRatio?: number;\r\n deviceGlitchesEventRatio?: number;\r\n deviceLowSNREventRatio?: number;\r\n deviceLowSpeechLevelEventRatio?: number;\r\n deviceClippingEventRatio?: number;\r\n deviceEchoEventRatio?: number;\r\n deviceNearEndToEchoRatioEventRatio?: number;\r\n deviceRenderZeroVolumeEventRatio?: number;\r\n deviceRenderMuteEventRatio?: number;\r\n deviceMultipleEndpointsEventCount?: number;\r\n deviceHowlingEventCount?: number;\r\n}\r\n\r\ninterface MSAudioRecvPayload extends MSPayloadBase {\r\n samplingRate?: number;\r\n signal?: MSAudioRecvSignal;\r\n packetReorderRatio?: number;\r\n packetReorderDepthAvg?: number;\r\n packetReorderDepthMax?: number;\r\n burstLossLength1?: number;\r\n burstLossLength2?: number;\r\n burstLossLength3?: number;\r\n burstLossLength4?: number;\r\n burstLossLength5?: number;\r\n burstLossLength6?: number;\r\n burstLossLength7?: number;\r\n burstLossLength8OrHigher?: number;\r\n fecRecvDistance1?: number;\r\n fecRecvDistance2?: number;\r\n fecRecvDistance3?: number;\r\n ratioConcealedSamplesAvg?: number;\r\n ratioStretchedSamplesAvg?: number;\r\n ratioCompressedSamplesAvg?: number;\r\n}\r\n\r\ninterface MSAudioRecvSignal {\r\n initialSignalLevelRMS?: number;\r\n recvSignalLevelCh1?: number;\r\n recvNoiseLevelCh1?: number;\r\n renderSignalLevel?: number;\r\n renderNoiseLevel?: number;\r\n renderLoopbackSignalLevel?: number;\r\n}\r\n\r\ninterface MSAudioSendPayload extends MSPayloadBase {\r\n samplingRate?: number;\r\n signal?: MSAudioSendSignal;\r\n audioFECUsed?: boolean;\r\n sendMutePercent?: number;\r\n}\r\n\r\ninterface MSAudioSendSignal {\r\n noiseLevel?: number;\r\n sendSignalLevelCh1?: number;\r\n sendNoiseLevelCh1?: number;\r\n}\r\n\r\ninterface MSConnectivity {\r\n iceType?: string;\r\n iceWarningFlags?: MSIceWarningFlags;\r\n relayAddress?: MSRelayAddress;\r\n}\r\n\r\ninterface MSCredentialFilter {\r\n accept?: MSCredentialSpec[];\r\n}\r\n\r\ninterface MSCredentialParameters {\r\n type?: string;\r\n}\r\n\r\ninterface MSCredentialSpec {\r\n type?: string;\r\n id?: string;\r\n}\r\n\r\ninterface MSDelay {\r\n roundTrip?: number;\r\n roundTripMax?: number;\r\n}\r\n\r\ninterface MSDescription extends RTCStats {\r\n connectivity?: MSConnectivity;\r\n transport?: string;\r\n networkconnectivity?: MSNetworkConnectivityInfo;\r\n localAddr?: MSIPAddressInfo;\r\n remoteAddr?: MSIPAddressInfo;\r\n deviceDevName?: string;\r\n reflexiveLocalIPAddr?: MSIPAddressInfo;\r\n}\r\n\r\ninterface MSFIDOCredentialParameters extends MSCredentialParameters {\r\n algorithm?: string | Algorithm;\r\n authenticators?: AAGUID[];\r\n}\r\n\r\ninterface MSIPAddressInfo {\r\n ipAddr?: string;\r\n port?: number;\r\n manufacturerMacAddrMask?: string;\r\n}\r\n\r\ninterface MSIceWarningFlags {\r\n turnTcpTimedOut?: boolean;\r\n turnUdpAllocateFailed?: boolean;\r\n turnUdpSendFailed?: boolean;\r\n turnTcpAllocateFailed?: boolean;\r\n turnTcpSendFailed?: boolean;\r\n udpLocalConnectivityFailed?: boolean;\r\n udpNatConnectivityFailed?: boolean;\r\n udpRelayConnectivityFailed?: boolean;\r\n tcpNatConnectivityFailed?: boolean;\r\n tcpRelayConnectivityFailed?: boolean;\r\n connCheckMessageIntegrityFailed?: boolean;\r\n allocationMessageIntegrityFailed?: boolean;\r\n connCheckOtherError?: boolean;\r\n turnAuthUnknownUsernameError?: boolean;\r\n noRelayServersConfigured?: boolean;\r\n multipleRelayServersAttempted?: boolean;\r\n portRangeExhausted?: boolean;\r\n alternateServerReceived?: boolean;\r\n pseudoTLSFailure?: boolean;\r\n turnTurnTcpConnectivityFailed?: boolean;\r\n useCandidateChecksFailed?: boolean;\r\n fipsAllocationFailure?: boolean;\r\n}\r\n\r\ninterface MSJitter {\r\n interArrival?: number;\r\n interArrivalMax?: number;\r\n interArrivalSD?: number;\r\n}\r\n\r\ninterface MSLocalClientEventBase extends RTCStats {\r\n networkReceiveQualityEventRatio?: number;\r\n networkBandwidthLowEventRatio?: number;\r\n}\r\n\r\ninterface MSNetwork extends RTCStats {\r\n jitter?: MSJitter;\r\n delay?: MSDelay;\r\n packetLoss?: MSPacketLoss;\r\n utilization?: MSUtilization;\r\n}\r\n\r\ninterface MSNetworkConnectivityInfo {\r\n vpn?: boolean;\r\n linkspeed?: number;\r\n networkConnectionDetails?: string;\r\n}\r\n\r\ninterface MSNetworkInterfaceType {\r\n interfaceTypeEthernet?: boolean;\r\n interfaceTypeWireless?: boolean;\r\n interfaceTypePPP?: boolean;\r\n interfaceTypeTunnel?: boolean;\r\n interfaceTypeWWAN?: boolean;\r\n}\r\n\r\ninterface MSOutboundNetwork extends MSNetwork {\r\n appliedBandwidthLimit?: number;\r\n}\r\n\r\ninterface MSPacketLoss {\r\n lossRate?: number;\r\n lossRateMax?: number;\r\n}\r\n\r\ninterface MSPayloadBase extends RTCStats {\r\n payloadDescription?: string;\r\n}\r\n\r\ninterface MSRelayAddress {\r\n relayAddress?: string;\r\n port?: number;\r\n}\r\n\r\ninterface MSSignatureParameters {\r\n userPrompt?: string;\r\n}\r\n\r\ninterface MSTransportDiagnosticsStats extends RTCStats {\r\n baseAddress?: string;\r\n localAddress?: string;\r\n localSite?: string;\r\n networkName?: string;\r\n remoteAddress?: string;\r\n remoteSite?: string;\r\n localMR?: string;\r\n remoteMR?: string;\r\n iceWarningFlags?: MSIceWarningFlags;\r\n portRangeMin?: number;\r\n portRangeMax?: number;\r\n localMRTCPPort?: number;\r\n remoteMRTCPPort?: number;\r\n stunVer?: number;\r\n numConsentReqSent?: number;\r\n numConsentReqReceived?: number;\r\n numConsentRespSent?: number;\r\n numConsentRespReceived?: number;\r\n interfaces?: MSNetworkInterfaceType;\r\n baseInterface?: MSNetworkInterfaceType;\r\n protocol?: string;\r\n localInterface?: MSNetworkInterfaceType;\r\n localAddrType?: string;\r\n remoteAddrType?: string;\r\n iceRole?: string;\r\n rtpRtcpMux?: boolean;\r\n allocationTimeInMs?: number;\r\n msRtcEngineVersion?: string;\r\n}\r\n\r\ninterface MSUtilization {\r\n packets?: number;\r\n bandwidthEstimation?: number;\r\n bandwidthEstimationMin?: number;\r\n bandwidthEstimationMax?: number;\r\n bandwidthEstimationStdDev?: number;\r\n bandwidthEstimationAvg?: number;\r\n}\r\n\r\ninterface MSVideoPayload extends MSPayloadBase {\r\n resoluton?: string;\r\n videoBitRateAvg?: number;\r\n videoBitRateMax?: number;\r\n videoFrameRateAvg?: number;\r\n videoPacketLossRate?: number;\r\n durationSeconds?: number;\r\n}\r\n\r\ninterface MSVideoRecvPayload extends MSVideoPayload {\r\n videoFrameLossRate?: number;\r\n recvCodecType?: string;\r\n recvResolutionWidth?: number;\r\n recvResolutionHeight?: number;\r\n videoResolutions?: MSVideoResolutionDistribution;\r\n recvFrameRateAverage?: number;\r\n recvBitRateMaximum?: number;\r\n recvBitRateAverage?: number;\r\n recvVideoStreamsMax?: number;\r\n recvVideoStreamsMin?: number;\r\n recvVideoStreamsMode?: number;\r\n videoPostFECPLR?: number;\r\n lowBitRateCallPercent?: number;\r\n lowFrameRateCallPercent?: number;\r\n reorderBufferTotalPackets?: number;\r\n recvReorderBufferReorderedPackets?: number;\r\n recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number;\r\n recvReorderBufferMaxSuccessfullyOrderedExtent?: number;\r\n recvReorderBufferMaxSuccessfullyOrderedLateTime?: number;\r\n recvReorderBufferPacketsDroppedDueToTimeout?: number;\r\n recvFpsHarmonicAverage?: number;\r\n recvNumResSwitches?: number;\r\n}\r\n\r\ninterface MSVideoResolutionDistribution {\r\n cifQuality?: number;\r\n vgaQuality?: number;\r\n h720Quality?: number;\r\n h1080Quality?: number;\r\n h1440Quality?: number;\r\n h2160Quality?: number;\r\n}\r\n\r\ninterface MSVideoSendPayload extends MSVideoPayload {\r\n sendFrameRateAverage?: number;\r\n sendBitRateMaximum?: number;\r\n sendBitRateAverage?: number;\r\n sendVideoStreamsMax?: number;\r\n sendResolutionWidth?: number;\r\n sendResolutionHeight?: number;\r\n}\r\n\r\ninterface MediaEncryptedEventInit extends EventInit {\r\n initDataType?: string;\r\n initData?: ArrayBuffer;\r\n}\r\n\r\ninterface MediaKeyMessageEventInit extends EventInit {\r\n messageType?: string;\r\n message?: ArrayBuffer;\r\n}\r\n\r\ninterface MediaKeySystemConfiguration {\r\n initDataTypes?: string[];\r\n audioCapabilities?: MediaKeySystemMediaCapability[];\r\n videoCapabilities?: MediaKeySystemMediaCapability[];\r\n distinctiveIdentifier?: string;\r\n persistentState?: string;\r\n}\r\n\r\ninterface MediaKeySystemMediaCapability {\r\n contentType?: string;\r\n robustness?: string;\r\n}\r\n\r\ninterface MediaStreamConstraints {\r\n video?: boolean | MediaTrackConstraints;\r\n audio?: boolean | MediaTrackConstraints;\r\n}\r\n\r\ninterface MediaStreamErrorEventInit extends EventInit {\r\n error?: MediaStreamError;\r\n}\r\n\r\ninterface MediaStreamTrackEventInit extends EventInit {\r\n track?: MediaStreamTrack;\r\n}\r\n\r\ninterface MediaTrackCapabilities {\r\n width?: number | LongRange;\r\n height?: number | LongRange;\r\n aspectRatio?: number | DoubleRange;\r\n frameRate?: number | DoubleRange;\r\n facingMode?: string;\r\n volume?: number | DoubleRange;\r\n sampleRate?: number | LongRange;\r\n sampleSize?: number | LongRange;\r\n echoCancellation?: boolean[];\r\n deviceId?: string;\r\n groupId?: string;\r\n}\r\n\r\ninterface MediaTrackConstraintSet {\r\n width?: number | ConstrainLongRange;\r\n height?: number | ConstrainLongRange;\r\n aspectRatio?: number | ConstrainDoubleRange;\r\n frameRate?: number | ConstrainDoubleRange;\r\n facingMode?: string | string[] | ConstrainDOMStringParameters;\r\n volume?: number | ConstrainDoubleRange;\r\n sampleRate?: number | ConstrainLongRange;\r\n sampleSize?: number | ConstrainLongRange;\r\n echoCancelation?: boolean | ConstrainBooleanParameters;\r\n deviceId?: string | string[] | ConstrainDOMStringParameters;\r\n groupId?: string | string[] | ConstrainDOMStringParameters;\r\n}\r\n\r\ninterface MediaTrackConstraints extends MediaTrackConstraintSet {\r\n advanced?: MediaTrackConstraintSet[];\r\n}\r\n\r\ninterface MediaTrackSettings {\r\n width?: number;\r\n height?: number;\r\n aspectRatio?: number;\r\n frameRate?: number;\r\n facingMode?: string;\r\n volume?: number;\r\n sampleRate?: number;\r\n sampleSize?: number;\r\n echoCancellation?: boolean;\r\n deviceId?: string;\r\n groupId?: string;\r\n}\r\n\r\ninterface MediaTrackSupportedConstraints {\r\n width?: boolean;\r\n height?: boolean;\r\n aspectRatio?: boolean;\r\n frameRate?: boolean;\r\n facingMode?: boolean;\r\n volume?: boolean;\r\n sampleRate?: boolean;\r\n sampleSize?: boolean;\r\n echoCancellation?: boolean;\r\n deviceId?: boolean;\r\n groupId?: boolean;\r\n}\r\n\r\ninterface MouseEventInit extends EventModifierInit {\r\n screenX?: number;\r\n screenY?: number;\r\n clientX?: number;\r\n clientY?: number;\r\n button?: number;\r\n buttons?: number;\r\n relatedTarget?: EventTarget;\r\n}\r\n\r\ninterface MsZoomToOptions {\r\n contentX?: number;\r\n contentY?: number;\r\n viewportX?: string;\r\n viewportY?: string;\r\n scaleFactor?: number;\r\n animate?: string;\r\n}\r\n\r\ninterface MutationObserverInit {\r\n childList?: boolean;\r\n attributes?: boolean;\r\n characterData?: boolean;\r\n subtree?: boolean;\r\n attributeOldValue?: boolean;\r\n characterDataOldValue?: boolean;\r\n attributeFilter?: string[];\r\n}\r\n\r\ninterface ObjectURLOptions {\r\n oneTimeOnly?: boolean;\r\n}\r\n\r\ninterface PeriodicWaveConstraints {\r\n disableNormalization?: boolean;\r\n}\r\n\r\ninterface PointerEventInit extends MouseEventInit {\r\n pointerId?: number;\r\n width?: number;\r\n height?: number;\r\n pressure?: number;\r\n tiltX?: number;\r\n tiltY?: number;\r\n pointerType?: string;\r\n isPrimary?: boolean;\r\n}\r\n\r\ninterface PositionOptions {\r\n enableHighAccuracy?: boolean;\r\n timeout?: number;\r\n maximumAge?: number;\r\n}\r\n\r\ninterface RTCDTMFToneChangeEventInit extends EventInit {\r\n tone?: string;\r\n}\r\n\r\ninterface RTCDtlsFingerprint {\r\n algorithm?: string;\r\n value?: string;\r\n}\r\n\r\ninterface RTCDtlsParameters {\r\n role?: string;\r\n fingerprints?: RTCDtlsFingerprint[];\r\n}\r\n\r\ninterface RTCIceCandidate {\r\n foundation?: string;\r\n priority?: number;\r\n ip?: string;\r\n protocol?: string;\r\n port?: number;\r\n type?: string;\r\n tcpType?: string;\r\n relatedAddress?: string;\r\n relatedPort?: number;\r\n}\r\n\r\ninterface RTCIceCandidateAttributes extends RTCStats {\r\n ipAddress?: string;\r\n portNumber?: number;\r\n transport?: string;\r\n candidateType?: string;\r\n priority?: number;\r\n addressSourceUrl?: string;\r\n}\r\n\r\ninterface RTCIceCandidateComplete {\r\n}\r\n\r\ninterface RTCIceCandidatePair {\r\n local?: RTCIceCandidate;\r\n remote?: RTCIceCandidate;\r\n}\r\n\r\ninterface RTCIceCandidatePairStats extends RTCStats {\r\n transportId?: string;\r\n localCandidateId?: string;\r\n remoteCandidateId?: string;\r\n state?: string;\r\n priority?: number;\r\n nominated?: boolean;\r\n writable?: boolean;\r\n readable?: boolean;\r\n bytesSent?: number;\r\n bytesReceived?: number;\r\n roundTripTime?: number;\r\n availableOutgoingBitrate?: number;\r\n availableIncomingBitrate?: number;\r\n}\r\n\r\ninterface RTCIceGatherOptions {\r\n gatherPolicy?: string;\r\n iceservers?: RTCIceServer[];\r\n}\r\n\r\ninterface RTCIceParameters {\r\n usernameFragment?: string;\r\n password?: string;\r\n}\r\n\r\ninterface RTCIceServer {\r\n urls?: any;\r\n username?: string;\r\n credential?: string;\r\n}\r\n\r\ninterface RTCInboundRTPStreamStats extends RTCRTPStreamStats {\r\n packetsReceived?: number;\r\n bytesReceived?: number;\r\n packetsLost?: number;\r\n jitter?: number;\r\n fractionLost?: number;\r\n}\r\n\r\ninterface RTCMediaStreamTrackStats extends RTCStats {\r\n trackIdentifier?: string;\r\n remoteSource?: boolean;\r\n ssrcIds?: string[];\r\n frameWidth?: number;\r\n frameHeight?: number;\r\n framesPerSecond?: number;\r\n framesSent?: number;\r\n framesReceived?: number;\r\n framesDecoded?: number;\r\n framesDropped?: number;\r\n framesCorrupted?: number;\r\n audioLevel?: number;\r\n echoReturnLoss?: number;\r\n echoReturnLossEnhancement?: number;\r\n}\r\n\r\ninterface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {\r\n packetsSent?: number;\r\n bytesSent?: number;\r\n targetBitrate?: number;\r\n roundTripTime?: number;\r\n}\r\n\r\ninterface RTCRTPStreamStats extends RTCStats {\r\n ssrc?: string;\r\n associateStatsId?: string;\r\n isRemote?: boolean;\r\n mediaTrackId?: string;\r\n transportId?: string;\r\n codecId?: string;\r\n firCount?: number;\r\n pliCount?: number;\r\n nackCount?: number;\r\n sliCount?: number;\r\n}\r\n\r\ninterface RTCRtcpFeedback {\r\n type?: string;\r\n parameter?: string;\r\n}\r\n\r\ninterface RTCRtcpParameters {\r\n ssrc?: number;\r\n cname?: string;\r\n reducedSize?: boolean;\r\n mux?: boolean;\r\n}\r\n\r\ninterface RTCRtpCapabilities {\r\n codecs?: RTCRtpCodecCapability[];\r\n headerExtensions?: RTCRtpHeaderExtension[];\r\n fecMechanisms?: string[];\r\n}\r\n\r\ninterface RTCRtpCodecCapability {\r\n name?: string;\r\n kind?: string;\r\n clockRate?: number;\r\n preferredPayloadType?: number;\r\n maxptime?: number;\r\n numChannels?: number;\r\n rtcpFeedback?: RTCRtcpFeedback[];\r\n parameters?: any;\r\n options?: any;\r\n maxTemporalLayers?: number;\r\n maxSpatialLayers?: number;\r\n svcMultiStreamSupport?: boolean;\r\n}\r\n\r\ninterface RTCRtpCodecParameters {\r\n name?: string;\r\n payloadType?: any;\r\n clockRate?: number;\r\n maxptime?: number;\r\n numChannels?: number;\r\n rtcpFeedback?: RTCRtcpFeedback[];\r\n parameters?: any;\r\n}\r\n\r\ninterface RTCRtpContributingSource {\r\n timestamp?: number;\r\n csrc?: number;\r\n audioLevel?: number;\r\n}\r\n\r\ninterface RTCRtpEncodingParameters {\r\n ssrc?: number;\r\n codecPayloadType?: number;\r\n fec?: RTCRtpFecParameters;\r\n rtx?: RTCRtpRtxParameters;\r\n priority?: number;\r\n maxBitrate?: number;\r\n minQuality?: number;\r\n framerateBias?: number;\r\n resolutionScale?: number;\r\n framerateScale?: number;\r\n active?: boolean;\r\n encodingId?: string;\r\n dependencyEncodingIds?: string[];\r\n ssrcRange?: RTCSsrcRange;\r\n}\r\n\r\ninterface RTCRtpFecParameters {\r\n ssrc?: number;\r\n mechanism?: string;\r\n}\r\n\r\ninterface RTCRtpHeaderExtension {\r\n kind?: string;\r\n uri?: string;\r\n preferredId?: number;\r\n preferredEncrypt?: boolean;\r\n}\r\n\r\ninterface RTCRtpHeaderExtensionParameters {\r\n uri?: string;\r\n id?: number;\r\n encrypt?: boolean;\r\n}\r\n\r\ninterface RTCRtpParameters {\r\n muxId?: string;\r\n codecs?: RTCRtpCodecParameters[];\r\n headerExtensions?: RTCRtpHeaderExtensionParameters[];\r\n encodings?: RTCRtpEncodingParameters[];\r\n rtcp?: RTCRtcpParameters;\r\n}\r\n\r\ninterface RTCRtpRtxParameters {\r\n ssrc?: number;\r\n}\r\n\r\ninterface RTCRtpUnhandled {\r\n ssrc?: number;\r\n payloadType?: number;\r\n muxId?: string;\r\n}\r\n\r\ninterface RTCSrtpKeyParam {\r\n keyMethod?: string;\r\n keySalt?: string;\r\n lifetime?: string;\r\n mkiValue?: number;\r\n mkiLength?: number;\r\n}\r\n\r\ninterface RTCSrtpSdesParameters {\r\n tag?: number;\r\n cryptoSuite?: string;\r\n keyParams?: RTCSrtpKeyParam[];\r\n sessionParams?: string[];\r\n}\r\n\r\ninterface RTCSsrcRange {\r\n min?: number;\r\n max?: number;\r\n}\r\n\r\ninterface RTCStats {\r\n timestamp?: number;\r\n type?: string;\r\n id?: string;\r\n msType?: string;\r\n}\r\n\r\ninterface RTCStatsReport {\r\n}\r\n\r\ninterface RTCTransportStats extends RTCStats {\r\n bytesSent?: number;\r\n bytesReceived?: number;\r\n rtcpTransportStatsId?: string;\r\n activeConnection?: boolean;\r\n selectedCandidatePairId?: string;\r\n localCertificateId?: string;\r\n remoteCertificateId?: string;\r\n}\r\n\r\ninterface StoreExceptionsInformation extends ExceptionInformation {\r\n siteName?: string;\r\n explanationString?: string;\r\n detailURI?: string;\r\n}\r\n\r\ninterface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {\r\n arrayOfDomainStrings?: string[];\r\n}\r\n\r\ninterface UIEventInit extends EventInit {\r\n view?: Window;\r\n detail?: number;\r\n}\r\n\r\ninterface WebGLContextAttributes {\r\n failIfMajorPerformanceCaveat?: boolean;\r\n alpha?: boolean;\r\n depth?: boolean;\r\n stencil?: boolean;\r\n antialias?: boolean;\r\n premultipliedAlpha?: boolean;\r\n preserveDrawingBuffer?: boolean;\r\n}\r\n\r\ninterface WebGLContextEventInit extends EventInit {\r\n statusMessage?: string;\r\n}\r\n\r\ninterface WheelEventInit extends MouseEventInit {\r\n deltaX?: number;\r\n deltaY?: number;\r\n deltaZ?: number;\r\n deltaMode?: number;\r\n}\r\n\r\ninterface EventListener {\r\n (evt: Event): void;\r\n}\r\n\r\ninterface ANGLE_instanced_arrays {\r\n drawArraysInstancedANGLE(mode: number, first: number, count: number, primcount: number): void;\r\n drawElementsInstancedANGLE(mode: number, count: number, type: number, offset: number, primcount: number): void;\r\n vertexAttribDivisorANGLE(index: number, divisor: number): void;\r\n readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;\r\n}\r\n\r\ndeclare var ANGLE_instanced_arrays: {\r\n prototype: ANGLE_instanced_arrays;\r\n new(): ANGLE_instanced_arrays;\r\n readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;\r\n}\r\n\r\ninterface AnalyserNode extends AudioNode {\r\n fftSize: number;\r\n readonly frequencyBinCount: number;\r\n maxDecibels: number;\r\n minDecibels: number;\r\n smoothingTimeConstant: number;\r\n getByteFrequencyData(array: Uint8Array): void;\r\n getByteTimeDomainData(array: Uint8Array): void;\r\n getFloatFrequencyData(array: Float32Array): void;\r\n getFloatTimeDomainData(array: Float32Array): void;\r\n}\r\n\r\ndeclare var AnalyserNode: {\r\n prototype: AnalyserNode;\r\n new(): AnalyserNode;\r\n}\r\n\r\ninterface AnimationEvent extends Event {\r\n readonly animationName: string;\r\n readonly elapsedTime: number;\r\n initAnimationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, animationNameArg: string, elapsedTimeArg: number): void;\r\n}\r\n\r\ndeclare var AnimationEvent: {\r\n prototype: AnimationEvent;\r\n new(): AnimationEvent;\r\n}\r\n\r\ninterface ApplicationCache extends EventTarget {\r\n oncached: (this: this, ev: Event) => any;\r\n onchecking: (this: this, ev: Event) => any;\r\n ondownloading: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onnoupdate: (this: this, ev: Event) => any;\r\n onobsolete: (this: this, ev: Event) => any;\r\n onprogress: (this: this, ev: ProgressEvent) => any;\r\n onupdateready: (this: this, ev: Event) => any;\r\n readonly status: number;\r\n abort(): void;\r\n swapCache(): void;\r\n update(): void;\r\n readonly CHECKING: number;\r\n readonly DOWNLOADING: number;\r\n readonly IDLE: number;\r\n readonly OBSOLETE: number;\r\n readonly UNCACHED: number;\r\n readonly UPDATEREADY: number;\r\n addEventListener(type: \"cached\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"checking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"downloading\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"noupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"obsolete\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"updateready\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var ApplicationCache: {\r\n prototype: ApplicationCache;\r\n new(): ApplicationCache;\r\n readonly CHECKING: number;\r\n readonly DOWNLOADING: number;\r\n readonly IDLE: number;\r\n readonly OBSOLETE: number;\r\n readonly UNCACHED: number;\r\n readonly UPDATEREADY: number;\r\n}\r\n\r\ninterface AriaRequestEvent extends Event {\r\n readonly attributeName: string;\r\n attributeValue: string | null;\r\n}\r\n\r\ndeclare var AriaRequestEvent: {\r\n prototype: AriaRequestEvent;\r\n new(type: string, eventInitDict?: AriaRequestEventInit): AriaRequestEvent;\r\n}\r\n\r\ninterface Attr extends Node {\r\n readonly name: string;\r\n readonly ownerElement: Element;\r\n readonly prefix: string | null;\r\n readonly specified: boolean;\r\n value: string;\r\n}\r\n\r\ndeclare var Attr: {\r\n prototype: Attr;\r\n new(): Attr;\r\n}\r\n\r\ninterface AudioBuffer {\r\n readonly duration: number;\r\n readonly length: number;\r\n readonly numberOfChannels: number;\r\n readonly sampleRate: number;\r\n copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void;\r\n copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void;\r\n getChannelData(channel: number): Float32Array;\r\n}\r\n\r\ndeclare var AudioBuffer: {\r\n prototype: AudioBuffer;\r\n new(): AudioBuffer;\r\n}\r\n\r\ninterface AudioBufferSourceNode extends AudioNode {\r\n buffer: AudioBuffer | null;\r\n readonly detune: AudioParam;\r\n loop: boolean;\r\n loopEnd: number;\r\n loopStart: number;\r\n onended: (this: this, ev: MediaStreamErrorEvent) => any;\r\n readonly playbackRate: AudioParam;\r\n start(when?: number, offset?: number, duration?: number): void;\r\n stop(when?: number): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var AudioBufferSourceNode: {\r\n prototype: AudioBufferSourceNode;\r\n new(): AudioBufferSourceNode;\r\n}\r\n\r\ninterface AudioContext extends EventTarget {\r\n readonly currentTime: number;\r\n readonly destination: AudioDestinationNode;\r\n readonly listener: AudioListener;\r\n readonly sampleRate: number;\r\n state: string;\r\n createAnalyser(): AnalyserNode;\r\n createBiquadFilter(): BiquadFilterNode;\r\n createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;\r\n createBufferSource(): AudioBufferSourceNode;\r\n createChannelMerger(numberOfInputs?: number): ChannelMergerNode;\r\n createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode;\r\n createConvolver(): ConvolverNode;\r\n createDelay(maxDelayTime?: number): DelayNode;\r\n createDynamicsCompressor(): DynamicsCompressorNode;\r\n createGain(): GainNode;\r\n createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;\r\n createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode;\r\n createOscillator(): OscillatorNode;\r\n createPanner(): PannerNode;\r\n createPeriodicWave(real: Float32Array, imag: Float32Array, constraints?: PeriodicWaveConstraints): PeriodicWave;\r\n createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;\r\n createStereoPanner(): StereoPannerNode;\r\n createWaveShaper(): WaveShaperNode;\r\n decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): PromiseLike;\r\n}\r\n\r\ndeclare var AudioContext: {\r\n prototype: AudioContext;\r\n new(): AudioContext;\r\n}\r\n\r\ninterface AudioDestinationNode extends AudioNode {\r\n readonly maxChannelCount: number;\r\n}\r\n\r\ndeclare var AudioDestinationNode: {\r\n prototype: AudioDestinationNode;\r\n new(): AudioDestinationNode;\r\n}\r\n\r\ninterface AudioListener {\r\n dopplerFactor: number;\r\n speedOfSound: number;\r\n setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void;\r\n setPosition(x: number, y: number, z: number): void;\r\n setVelocity(x: number, y: number, z: number): void;\r\n}\r\n\r\ndeclare var AudioListener: {\r\n prototype: AudioListener;\r\n new(): AudioListener;\r\n}\r\n\r\ninterface AudioNode extends EventTarget {\r\n channelCount: number;\r\n channelCountMode: string;\r\n channelInterpretation: string;\r\n readonly context: AudioContext;\r\n readonly numberOfInputs: number;\r\n readonly numberOfOutputs: number;\r\n connect(destination: AudioNode, output?: number, input?: number): void;\r\n disconnect(output?: number): void;\r\n disconnect(destination: AudioNode, output?: number, input?: number): void;\r\n disconnect(destination: AudioParam, output?: number): void;\r\n}\r\n\r\ndeclare var AudioNode: {\r\n prototype: AudioNode;\r\n new(): AudioNode;\r\n}\r\n\r\ninterface AudioParam {\r\n readonly defaultValue: number;\r\n value: number;\r\n cancelScheduledValues(startTime: number): void;\r\n exponentialRampToValueAtTime(value: number, endTime: number): void;\r\n linearRampToValueAtTime(value: number, endTime: number): void;\r\n setTargetAtTime(target: number, startTime: number, timeConstant: number): void;\r\n setValueAtTime(value: number, startTime: number): void;\r\n setValueCurveAtTime(values: Float32Array, startTime: number, duration: number): void;\r\n}\r\n\r\ndeclare var AudioParam: {\r\n prototype: AudioParam;\r\n new(): AudioParam;\r\n}\r\n\r\ninterface AudioProcessingEvent extends Event {\r\n readonly inputBuffer: AudioBuffer;\r\n readonly outputBuffer: AudioBuffer;\r\n readonly playbackTime: number;\r\n}\r\n\r\ndeclare var AudioProcessingEvent: {\r\n prototype: AudioProcessingEvent;\r\n new(): AudioProcessingEvent;\r\n}\r\n\r\ninterface AudioTrack {\r\n enabled: boolean;\r\n readonly id: string;\r\n kind: string;\r\n readonly label: string;\r\n language: string;\r\n readonly sourceBuffer: SourceBuffer;\r\n}\r\n\r\ndeclare var AudioTrack: {\r\n prototype: AudioTrack;\r\n new(): AudioTrack;\r\n}\r\n\r\ninterface AudioTrackList extends EventTarget {\r\n readonly length: number;\r\n onaddtrack: (this: this, ev: TrackEvent) => any;\r\n onchange: (this: this, ev: Event) => any;\r\n onremovetrack: (this: this, ev: TrackEvent) => any;\r\n getTrackById(id: string): AudioTrack | null;\r\n item(index: number): AudioTrack;\r\n addEventListener(type: \"addtrack\", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"removetrack\", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: AudioTrack;\r\n}\r\n\r\ndeclare var AudioTrackList: {\r\n prototype: AudioTrackList;\r\n new(): AudioTrackList;\r\n}\r\n\r\ninterface BarProp {\r\n readonly visible: boolean;\r\n}\r\n\r\ndeclare var BarProp: {\r\n prototype: BarProp;\r\n new(): BarProp;\r\n}\r\n\r\ninterface BeforeUnloadEvent extends Event {\r\n returnValue: any;\r\n}\r\n\r\ndeclare var BeforeUnloadEvent: {\r\n prototype: BeforeUnloadEvent;\r\n new(): BeforeUnloadEvent;\r\n}\r\n\r\ninterface BiquadFilterNode extends AudioNode {\r\n readonly Q: AudioParam;\r\n readonly detune: AudioParam;\r\n readonly frequency: AudioParam;\r\n readonly gain: AudioParam;\r\n type: string;\r\n getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;\r\n}\r\n\r\ndeclare var BiquadFilterNode: {\r\n prototype: BiquadFilterNode;\r\n new(): BiquadFilterNode;\r\n}\r\n\r\ninterface Blob {\r\n readonly size: number;\r\n readonly type: string;\r\n msClose(): void;\r\n msDetachStream(): any;\r\n slice(start?: number, end?: number, contentType?: string): Blob;\r\n}\r\n\r\ndeclare var Blob: {\r\n prototype: Blob;\r\n new (blobParts?: any[], options?: BlobPropertyBag): Blob;\r\n}\r\n\r\ninterface CDATASection extends Text {\r\n}\r\n\r\ndeclare var CDATASection: {\r\n prototype: CDATASection;\r\n new(): CDATASection;\r\n}\r\n\r\ninterface CSS {\r\n supports(property: string, value?: string): boolean;\r\n}\r\ndeclare var CSS: CSS;\r\n\r\ninterface CSSConditionRule extends CSSGroupingRule {\r\n conditionText: string;\r\n}\r\n\r\ndeclare var CSSConditionRule: {\r\n prototype: CSSConditionRule;\r\n new(): CSSConditionRule;\r\n}\r\n\r\ninterface CSSFontFaceRule extends CSSRule {\r\n readonly style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSFontFaceRule: {\r\n prototype: CSSFontFaceRule;\r\n new(): CSSFontFaceRule;\r\n}\r\n\r\ninterface CSSGroupingRule extends CSSRule {\r\n readonly cssRules: CSSRuleList;\r\n deleteRule(index: number): void;\r\n insertRule(rule: string, index: number): number;\r\n}\r\n\r\ndeclare var CSSGroupingRule: {\r\n prototype: CSSGroupingRule;\r\n new(): CSSGroupingRule;\r\n}\r\n\r\ninterface CSSImportRule extends CSSRule {\r\n readonly href: string;\r\n readonly media: MediaList;\r\n readonly styleSheet: CSSStyleSheet;\r\n}\r\n\r\ndeclare var CSSImportRule: {\r\n prototype: CSSImportRule;\r\n new(): CSSImportRule;\r\n}\r\n\r\ninterface CSSKeyframeRule extends CSSRule {\r\n keyText: string;\r\n readonly style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSKeyframeRule: {\r\n prototype: CSSKeyframeRule;\r\n new(): CSSKeyframeRule;\r\n}\r\n\r\ninterface CSSKeyframesRule extends CSSRule {\r\n readonly cssRules: CSSRuleList;\r\n name: string;\r\n appendRule(rule: string): void;\r\n deleteRule(rule: string): void;\r\n findRule(rule: string): CSSKeyframeRule;\r\n}\r\n\r\ndeclare var CSSKeyframesRule: {\r\n prototype: CSSKeyframesRule;\r\n new(): CSSKeyframesRule;\r\n}\r\n\r\ninterface CSSMediaRule extends CSSConditionRule {\r\n readonly media: MediaList;\r\n}\r\n\r\ndeclare var CSSMediaRule: {\r\n prototype: CSSMediaRule;\r\n new(): CSSMediaRule;\r\n}\r\n\r\ninterface CSSNamespaceRule extends CSSRule {\r\n readonly namespaceURI: string;\r\n readonly prefix: string;\r\n}\r\n\r\ndeclare var CSSNamespaceRule: {\r\n prototype: CSSNamespaceRule;\r\n new(): CSSNamespaceRule;\r\n}\r\n\r\ninterface CSSPageRule extends CSSRule {\r\n readonly pseudoClass: string;\r\n readonly selector: string;\r\n selectorText: string;\r\n readonly style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSPageRule: {\r\n prototype: CSSPageRule;\r\n new(): CSSPageRule;\r\n}\r\n\r\ninterface CSSRule {\r\n cssText: string;\r\n readonly parentRule: CSSRule;\r\n readonly parentStyleSheet: CSSStyleSheet;\r\n readonly type: number;\r\n readonly CHARSET_RULE: number;\r\n readonly FONT_FACE_RULE: number;\r\n readonly IMPORT_RULE: number;\r\n readonly KEYFRAMES_RULE: number;\r\n readonly KEYFRAME_RULE: number;\r\n readonly MEDIA_RULE: number;\r\n readonly NAMESPACE_RULE: number;\r\n readonly PAGE_RULE: number;\r\n readonly STYLE_RULE: number;\r\n readonly SUPPORTS_RULE: number;\r\n readonly UNKNOWN_RULE: number;\r\n readonly VIEWPORT_RULE: number;\r\n}\r\n\r\ndeclare var CSSRule: {\r\n prototype: CSSRule;\r\n new(): CSSRule;\r\n readonly CHARSET_RULE: number;\r\n readonly FONT_FACE_RULE: number;\r\n readonly IMPORT_RULE: number;\r\n readonly KEYFRAMES_RULE: number;\r\n readonly KEYFRAME_RULE: number;\r\n readonly MEDIA_RULE: number;\r\n readonly NAMESPACE_RULE: number;\r\n readonly PAGE_RULE: number;\r\n readonly STYLE_RULE: number;\r\n readonly SUPPORTS_RULE: number;\r\n readonly UNKNOWN_RULE: number;\r\n readonly VIEWPORT_RULE: number;\r\n}\r\n\r\ninterface CSSRuleList {\r\n readonly length: number;\r\n item(index: number): CSSRule;\r\n [index: number]: CSSRule;\r\n}\r\n\r\ndeclare var CSSRuleList: {\r\n prototype: CSSRuleList;\r\n new(): CSSRuleList;\r\n}\r\n\r\ninterface CSSStyleDeclaration {\r\n alignContent: string | null;\r\n alignItems: string | null;\r\n alignSelf: string | null;\r\n alignmentBaseline: string | null;\r\n animation: string | null;\r\n animationDelay: string | null;\r\n animationDirection: string | null;\r\n animationDuration: string | null;\r\n animationFillMode: string | null;\r\n animationIterationCount: string | null;\r\n animationName: string | null;\r\n animationPlayState: string | null;\r\n animationTimingFunction: string | null;\r\n backfaceVisibility: string | null;\r\n background: string | null;\r\n backgroundAttachment: string | null;\r\n backgroundClip: string | null;\r\n backgroundColor: string | null;\r\n backgroundImage: string | null;\r\n backgroundOrigin: string | null;\r\n backgroundPosition: string | null;\r\n backgroundPositionX: string | null;\r\n backgroundPositionY: string | null;\r\n backgroundRepeat: string | null;\r\n backgroundSize: string | null;\r\n baselineShift: string | null;\r\n border: string | null;\r\n borderBottom: string | null;\r\n borderBottomColor: string | null;\r\n borderBottomLeftRadius: string | null;\r\n borderBottomRightRadius: string | null;\r\n borderBottomStyle: string | null;\r\n borderBottomWidth: string | null;\r\n borderCollapse: string | null;\r\n borderColor: string | null;\r\n borderImage: string | null;\r\n borderImageOutset: string | null;\r\n borderImageRepeat: string | null;\r\n borderImageSlice: string | null;\r\n borderImageSource: string | null;\r\n borderImageWidth: string | null;\r\n borderLeft: string | null;\r\n borderLeftColor: string | null;\r\n borderLeftStyle: string | null;\r\n borderLeftWidth: string | null;\r\n borderRadius: string | null;\r\n borderRight: string | null;\r\n borderRightColor: string | null;\r\n borderRightStyle: string | null;\r\n borderRightWidth: string | null;\r\n borderSpacing: string | null;\r\n borderStyle: string | null;\r\n borderTop: string | null;\r\n borderTopColor: string | null;\r\n borderTopLeftRadius: string | null;\r\n borderTopRightRadius: string | null;\r\n borderTopStyle: string | null;\r\n borderTopWidth: string | null;\r\n borderWidth: string | null;\r\n bottom: string | null;\r\n boxShadow: string | null;\r\n boxSizing: string | null;\r\n breakAfter: string | null;\r\n breakBefore: string | null;\r\n breakInside: string | null;\r\n captionSide: string | null;\r\n clear: string | null;\r\n clip: string | null;\r\n clipPath: string | null;\r\n clipRule: string | null;\r\n color: string | null;\r\n colorInterpolationFilters: string | null;\r\n columnCount: any;\r\n columnFill: string | null;\r\n columnGap: any;\r\n columnRule: string | null;\r\n columnRuleColor: any;\r\n columnRuleStyle: string | null;\r\n columnRuleWidth: any;\r\n columnSpan: string | null;\r\n columnWidth: any;\r\n columns: string | null;\r\n content: string | null;\r\n counterIncrement: string | null;\r\n counterReset: string | null;\r\n cssFloat: string | null;\r\n cssText: string;\r\n cursor: string | null;\r\n direction: string | null;\r\n display: string | null;\r\n dominantBaseline: string | null;\r\n emptyCells: string | null;\r\n enableBackground: string | null;\r\n fill: string | null;\r\n fillOpacity: string | null;\r\n fillRule: string | null;\r\n filter: string | null;\r\n flex: string | null;\r\n flexBasis: string | null;\r\n flexDirection: string | null;\r\n flexFlow: string | null;\r\n flexGrow: string | null;\r\n flexShrink: string | null;\r\n flexWrap: string | null;\r\n floodColor: string | null;\r\n floodOpacity: string | null;\r\n font: string | null;\r\n fontFamily: string | null;\r\n fontFeatureSettings: string | null;\r\n fontSize: string | null;\r\n fontSizeAdjust: string | null;\r\n fontStretch: string | null;\r\n fontStyle: string | null;\r\n fontVariant: string | null;\r\n fontWeight: string | null;\r\n glyphOrientationHorizontal: string | null;\r\n glyphOrientationVertical: string | null;\r\n height: string | null;\r\n imeMode: string | null;\r\n justifyContent: string | null;\r\n kerning: string | null;\r\n left: string | null;\r\n readonly length: number;\r\n letterSpacing: string | null;\r\n lightingColor: string | null;\r\n lineHeight: string | null;\r\n listStyle: string | null;\r\n listStyleImage: string | null;\r\n listStylePosition: string | null;\r\n listStyleType: string | null;\r\n margin: string | null;\r\n marginBottom: string | null;\r\n marginLeft: string | null;\r\n marginRight: string | null;\r\n marginTop: string | null;\r\n marker: string | null;\r\n markerEnd: string | null;\r\n markerMid: string | null;\r\n markerStart: string | null;\r\n mask: string | null;\r\n maxHeight: string | null;\r\n maxWidth: string | null;\r\n minHeight: string | null;\r\n minWidth: string | null;\r\n msContentZoomChaining: string | null;\r\n msContentZoomLimit: string | null;\r\n msContentZoomLimitMax: any;\r\n msContentZoomLimitMin: any;\r\n msContentZoomSnap: string | null;\r\n msContentZoomSnapPoints: string | null;\r\n msContentZoomSnapType: string | null;\r\n msContentZooming: string | null;\r\n msFlowFrom: string | null;\r\n msFlowInto: string | null;\r\n msFontFeatureSettings: string | null;\r\n msGridColumn: any;\r\n msGridColumnAlign: string | null;\r\n msGridColumnSpan: any;\r\n msGridColumns: string | null;\r\n msGridRow: any;\r\n msGridRowAlign: string | null;\r\n msGridRowSpan: any;\r\n msGridRows: string | null;\r\n msHighContrastAdjust: string | null;\r\n msHyphenateLimitChars: string | null;\r\n msHyphenateLimitLines: any;\r\n msHyphenateLimitZone: any;\r\n msHyphens: string | null;\r\n msImeAlign: string | null;\r\n msOverflowStyle: string | null;\r\n msScrollChaining: string | null;\r\n msScrollLimit: string | null;\r\n msScrollLimitXMax: any;\r\n msScrollLimitXMin: any;\r\n msScrollLimitYMax: any;\r\n msScrollLimitYMin: any;\r\n msScrollRails: string | null;\r\n msScrollSnapPointsX: string | null;\r\n msScrollSnapPointsY: string | null;\r\n msScrollSnapType: string | null;\r\n msScrollSnapX: string | null;\r\n msScrollSnapY: string | null;\r\n msScrollTranslation: string | null;\r\n msTextCombineHorizontal: string | null;\r\n msTextSizeAdjust: any;\r\n msTouchAction: string | null;\r\n msTouchSelect: string | null;\r\n msUserSelect: string | null;\r\n msWrapFlow: string;\r\n msWrapMargin: any;\r\n msWrapThrough: string;\r\n opacity: string | null;\r\n order: string | null;\r\n orphans: string | null;\r\n outline: string | null;\r\n outlineColor: string | null;\r\n outlineStyle: string | null;\r\n outlineWidth: string | null;\r\n overflow: string | null;\r\n overflowX: string | null;\r\n overflowY: string | null;\r\n padding: string | null;\r\n paddingBottom: string | null;\r\n paddingLeft: string | null;\r\n paddingRight: string | null;\r\n paddingTop: string | null;\r\n pageBreakAfter: string | null;\r\n pageBreakBefore: string | null;\r\n pageBreakInside: string | null;\r\n readonly parentRule: CSSRule;\r\n perspective: string | null;\r\n perspectiveOrigin: string | null;\r\n pointerEvents: string | null;\r\n position: string | null;\r\n quotes: string | null;\r\n right: string | null;\r\n rubyAlign: string | null;\r\n rubyOverhang: string | null;\r\n rubyPosition: string | null;\r\n stopColor: string | null;\r\n stopOpacity: string | null;\r\n stroke: string | null;\r\n strokeDasharray: string | null;\r\n strokeDashoffset: string | null;\r\n strokeLinecap: string | null;\r\n strokeLinejoin: string | null;\r\n strokeMiterlimit: string | null;\r\n strokeOpacity: string | null;\r\n strokeWidth: string | null;\r\n tableLayout: string | null;\r\n textAlign: string | null;\r\n textAlignLast: string | null;\r\n textAnchor: string | null;\r\n textDecoration: string | null;\r\n textIndent: string | null;\r\n textJustify: string | null;\r\n textKashida: string | null;\r\n textKashidaSpace: string | null;\r\n textOverflow: string | null;\r\n textShadow: string | null;\r\n textTransform: string | null;\r\n textUnderlinePosition: string | null;\r\n top: string | null;\r\n touchAction: string | null;\r\n transform: string | null;\r\n transformOrigin: string | null;\r\n transformStyle: string | null;\r\n transition: string | null;\r\n transitionDelay: string | null;\r\n transitionDuration: string | null;\r\n transitionProperty: string | null;\r\n transitionTimingFunction: string | null;\r\n unicodeBidi: string | null;\r\n verticalAlign: string | null;\r\n visibility: string | null;\r\n webkitAlignContent: string | null;\r\n webkitAlignItems: string | null;\r\n webkitAlignSelf: string | null;\r\n webkitAnimation: string | null;\r\n webkitAnimationDelay: string | null;\r\n webkitAnimationDirection: string | null;\r\n webkitAnimationDuration: string | null;\r\n webkitAnimationFillMode: string | null;\r\n webkitAnimationIterationCount: string | null;\r\n webkitAnimationName: string | null;\r\n webkitAnimationPlayState: string | null;\r\n webkitAnimationTimingFunction: string | null;\r\n webkitAppearance: string | null;\r\n webkitBackfaceVisibility: string | null;\r\n webkitBackgroundClip: string | null;\r\n webkitBackgroundOrigin: string | null;\r\n webkitBackgroundSize: string | null;\r\n webkitBorderBottomLeftRadius: string | null;\r\n webkitBorderBottomRightRadius: string | null;\r\n webkitBorderImage: string | null;\r\n webkitBorderRadius: string | null;\r\n webkitBorderTopLeftRadius: string | null;\r\n webkitBorderTopRightRadius: string | null;\r\n webkitBoxAlign: string | null;\r\n webkitBoxDirection: string | null;\r\n webkitBoxFlex: string | null;\r\n webkitBoxOrdinalGroup: string | null;\r\n webkitBoxOrient: string | null;\r\n webkitBoxPack: string | null;\r\n webkitBoxSizing: string | null;\r\n webkitColumnBreakAfter: string | null;\r\n webkitColumnBreakBefore: string | null;\r\n webkitColumnBreakInside: string | null;\r\n webkitColumnCount: any;\r\n webkitColumnGap: any;\r\n webkitColumnRule: string | null;\r\n webkitColumnRuleColor: any;\r\n webkitColumnRuleStyle: string | null;\r\n webkitColumnRuleWidth: any;\r\n webkitColumnSpan: string | null;\r\n webkitColumnWidth: any;\r\n webkitColumns: string | null;\r\n webkitFilter: string | null;\r\n webkitFlex: string | null;\r\n webkitFlexBasis: string | null;\r\n webkitFlexDirection: string | null;\r\n webkitFlexFlow: string | null;\r\n webkitFlexGrow: string | null;\r\n webkitFlexShrink: string | null;\r\n webkitFlexWrap: string | null;\r\n webkitJustifyContent: string | null;\r\n webkitOrder: string | null;\r\n webkitPerspective: string | null;\r\n webkitPerspectiveOrigin: string | null;\r\n webkitTapHighlightColor: string | null;\r\n webkitTextFillColor: string | null;\r\n webkitTextSizeAdjust: any;\r\n webkitTransform: string | null;\r\n webkitTransformOrigin: string | null;\r\n webkitTransformStyle: string | null;\r\n webkitTransition: string | null;\r\n webkitTransitionDelay: string | null;\r\n webkitTransitionDuration: string | null;\r\n webkitTransitionProperty: string | null;\r\n webkitTransitionTimingFunction: string | null;\r\n webkitUserModify: string | null;\r\n webkitUserSelect: string | null;\r\n webkitWritingMode: string | null;\r\n whiteSpace: string | null;\r\n widows: string | null;\r\n width: string | null;\r\n wordBreak: string | null;\r\n wordSpacing: string | null;\r\n wordWrap: string | null;\r\n writingMode: string | null;\r\n zIndex: string | null;\r\n zoom: string | null;\r\n getPropertyPriority(propertyName: string): string;\r\n getPropertyValue(propertyName: string): string;\r\n item(index: number): string;\r\n removeProperty(propertyName: string): string;\r\n setProperty(propertyName: string, value: string | null, priority?: string): void;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var CSSStyleDeclaration: {\r\n prototype: CSSStyleDeclaration;\r\n new(): CSSStyleDeclaration;\r\n}\r\n\r\ninterface CSSStyleRule extends CSSRule {\r\n readonly readOnly: boolean;\r\n selectorText: string;\r\n readonly style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSStyleRule: {\r\n prototype: CSSStyleRule;\r\n new(): CSSStyleRule;\r\n}\r\n\r\ninterface CSSStyleSheet extends StyleSheet {\r\n readonly cssRules: CSSRuleList;\r\n cssText: string;\r\n readonly href: string;\r\n readonly id: string;\r\n readonly imports: StyleSheetList;\r\n readonly isAlternate: boolean;\r\n readonly isPrefAlternate: boolean;\r\n readonly ownerRule: CSSRule;\r\n readonly owningElement: Element;\r\n readonly pages: StyleSheetPageList;\r\n readonly readOnly: boolean;\r\n readonly rules: CSSRuleList;\r\n addImport(bstrURL: string, lIndex?: number): number;\r\n addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number;\r\n addRule(bstrSelector: string, bstrStyle?: string, lIndex?: number): number;\r\n deleteRule(index?: number): void;\r\n insertRule(rule: string, index?: number): number;\r\n removeImport(lIndex: number): void;\r\n removeRule(lIndex: number): void;\r\n}\r\n\r\ndeclare var CSSStyleSheet: {\r\n prototype: CSSStyleSheet;\r\n new(): CSSStyleSheet;\r\n}\r\n\r\ninterface CSSSupportsRule extends CSSConditionRule {\r\n}\r\n\r\ndeclare var CSSSupportsRule: {\r\n prototype: CSSSupportsRule;\r\n new(): CSSSupportsRule;\r\n}\r\n\r\ninterface CanvasGradient {\r\n addColorStop(offset: number, color: string): void;\r\n}\r\n\r\ndeclare var CanvasGradient: {\r\n prototype: CanvasGradient;\r\n new(): CanvasGradient;\r\n}\r\n\r\ninterface CanvasPattern {\r\n}\r\n\r\ndeclare var CanvasPattern: {\r\n prototype: CanvasPattern;\r\n new(): CanvasPattern;\r\n}\r\n\r\ninterface CanvasRenderingContext2D extends Object, CanvasPathMethods {\r\n readonly canvas: HTMLCanvasElement;\r\n fillStyle: string | CanvasGradient | CanvasPattern;\r\n font: string;\r\n globalAlpha: number;\r\n globalCompositeOperation: string;\r\n lineCap: string;\r\n lineDashOffset: number;\r\n lineJoin: string;\r\n lineWidth: number;\r\n miterLimit: number;\r\n msFillRule: string;\r\n msImageSmoothingEnabled: boolean;\r\n shadowBlur: number;\r\n shadowColor: string;\r\n shadowOffsetX: number;\r\n shadowOffsetY: number;\r\n strokeStyle: string | CanvasGradient | CanvasPattern;\r\n textAlign: string;\r\n textBaseline: string;\r\n mozImageSmoothingEnabled: boolean;\r\n webkitImageSmoothingEnabled: boolean;\r\n oImageSmoothingEnabled: boolean;\r\n beginPath(): void;\r\n clearRect(x: number, y: number, w: number, h: number): void;\r\n clip(fillRule?: string): void;\r\n createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;\r\n createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;\r\n createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;\r\n createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;\r\n drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;\r\n fill(fillRule?: string): void;\r\n fillRect(x: number, y: number, w: number, h: number): void;\r\n fillText(text: string, x: number, y: number, maxWidth?: number): void;\r\n getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;\r\n getLineDash(): number[];\r\n isPointInPath(x: number, y: number, fillRule?: string): boolean;\r\n measureText(text: string): TextMetrics;\r\n putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void;\r\n restore(): void;\r\n rotate(angle: number): void;\r\n save(): void;\r\n scale(x: number, y: number): void;\r\n setLineDash(segments: number[]): void;\r\n setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;\r\n stroke(): void;\r\n strokeRect(x: number, y: number, w: number, h: number): void;\r\n strokeText(text: string, x: number, y: number, maxWidth?: number): void;\r\n transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;\r\n translate(x: number, y: number): void;\r\n}\r\n\r\ndeclare var CanvasRenderingContext2D: {\r\n prototype: CanvasRenderingContext2D;\r\n new(): CanvasRenderingContext2D;\r\n}\r\n\r\ninterface ChannelMergerNode extends AudioNode {\r\n}\r\n\r\ndeclare var ChannelMergerNode: {\r\n prototype: ChannelMergerNode;\r\n new(): ChannelMergerNode;\r\n}\r\n\r\ninterface ChannelSplitterNode extends AudioNode {\r\n}\r\n\r\ndeclare var ChannelSplitterNode: {\r\n prototype: ChannelSplitterNode;\r\n new(): ChannelSplitterNode;\r\n}\r\n\r\ninterface CharacterData extends Node, ChildNode {\r\n data: string;\r\n readonly length: number;\r\n appendData(arg: string): void;\r\n deleteData(offset: number, count: number): void;\r\n insertData(offset: number, arg: string): void;\r\n replaceData(offset: number, count: number, arg: string): void;\r\n substringData(offset: number, count: number): string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var CharacterData: {\r\n prototype: CharacterData;\r\n new(): CharacterData;\r\n}\r\n\r\ninterface ClientRect {\r\n bottom: number;\r\n readonly height: number;\r\n left: number;\r\n right: number;\r\n top: number;\r\n readonly width: number;\r\n}\r\n\r\ndeclare var ClientRect: {\r\n prototype: ClientRect;\r\n new(): ClientRect;\r\n}\r\n\r\ninterface ClientRectList {\r\n readonly length: number;\r\n item(index: number): ClientRect;\r\n [index: number]: ClientRect;\r\n}\r\n\r\ndeclare var ClientRectList: {\r\n prototype: ClientRectList;\r\n new(): ClientRectList;\r\n}\r\n\r\ninterface ClipboardEvent extends Event {\r\n readonly clipboardData: DataTransfer;\r\n}\r\n\r\ndeclare var ClipboardEvent: {\r\n prototype: ClipboardEvent;\r\n new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent;\r\n}\r\n\r\ninterface CloseEvent extends Event {\r\n readonly code: number;\r\n readonly reason: string;\r\n readonly wasClean: boolean;\r\n initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;\r\n}\r\n\r\ndeclare var CloseEvent: {\r\n prototype: CloseEvent;\r\n new(): CloseEvent;\r\n}\r\n\r\ninterface CommandEvent extends Event {\r\n readonly commandName: string;\r\n readonly detail: string | null;\r\n}\r\n\r\ndeclare var CommandEvent: {\r\n prototype: CommandEvent;\r\n new(type: string, eventInitDict?: CommandEventInit): CommandEvent;\r\n}\r\n\r\ninterface Comment extends CharacterData {\r\n text: string;\r\n}\r\n\r\ndeclare var Comment: {\r\n prototype: Comment;\r\n new(): Comment;\r\n}\r\n\r\ninterface CompositionEvent extends UIEvent {\r\n readonly data: string;\r\n readonly locale: string;\r\n initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void;\r\n}\r\n\r\ndeclare var CompositionEvent: {\r\n prototype: CompositionEvent;\r\n new(typeArg: string, eventInitDict?: CompositionEventInit): CompositionEvent;\r\n}\r\n\r\ninterface Console {\r\n assert(test?: boolean, message?: string, ...optionalParams: any[]): void;\r\n clear(): void;\r\n count(countTitle?: string): void;\r\n debug(message?: string, ...optionalParams: any[]): void;\r\n dir(value?: any, ...optionalParams: any[]): void;\r\n dirxml(value: any): void;\r\n error(message?: any, ...optionalParams: any[]): void;\r\n exception(message?: string, ...optionalParams: any[]): void;\r\n group(groupTitle?: string): void;\r\n groupCollapsed(groupTitle?: string): void;\r\n groupEnd(): void;\r\n info(message?: any, ...optionalParams: any[]): void;\r\n log(message?: any, ...optionalParams: any[]): void;\r\n msIsIndependentlyComposed(element: Element): boolean;\r\n profile(reportName?: string): void;\r\n profileEnd(): void;\r\n select(element: Element): void;\r\n table(...data: any[]): void;\r\n time(timerName?: string): void;\r\n timeEnd(timerName?: string): void;\r\n trace(message?: any, ...optionalParams: any[]): void;\r\n warn(message?: any, ...optionalParams: any[]): void;\r\n}\r\n\r\ndeclare var Console: {\r\n prototype: Console;\r\n new(): Console;\r\n}\r\n\r\ninterface ConvolverNode extends AudioNode {\r\n buffer: AudioBuffer | null;\r\n normalize: boolean;\r\n}\r\n\r\ndeclare var ConvolverNode: {\r\n prototype: ConvolverNode;\r\n new(): ConvolverNode;\r\n}\r\n\r\ninterface Coordinates {\r\n readonly accuracy: number;\r\n readonly altitude: number | null;\r\n readonly altitudeAccuracy: number | null;\r\n readonly heading: number | null;\r\n readonly latitude: number;\r\n readonly longitude: number;\r\n readonly speed: number | null;\r\n}\r\n\r\ndeclare var Coordinates: {\r\n prototype: Coordinates;\r\n new(): Coordinates;\r\n}\r\n\r\ninterface Crypto extends Object, RandomSource {\r\n readonly subtle: SubtleCrypto;\r\n}\r\n\r\ndeclare var Crypto: {\r\n prototype: Crypto;\r\n new(): Crypto;\r\n}\r\n\r\ninterface CryptoKey {\r\n readonly algorithm: KeyAlgorithm;\r\n readonly extractable: boolean;\r\n readonly type: string;\r\n readonly usages: string[];\r\n}\r\n\r\ndeclare var CryptoKey: {\r\n prototype: CryptoKey;\r\n new(): CryptoKey;\r\n}\r\n\r\ninterface CryptoKeyPair {\r\n privateKey: CryptoKey;\r\n publicKey: CryptoKey;\r\n}\r\n\r\ndeclare var CryptoKeyPair: {\r\n prototype: CryptoKeyPair;\r\n new(): CryptoKeyPair;\r\n}\r\n\r\ninterface CustomEvent extends Event {\r\n readonly detail: any;\r\n initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any): void;\r\n}\r\n\r\ndeclare var CustomEvent: {\r\n prototype: CustomEvent;\r\n new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent;\r\n}\r\n\r\ninterface DOMError {\r\n readonly name: string;\r\n toString(): string;\r\n}\r\n\r\ndeclare var DOMError: {\r\n prototype: DOMError;\r\n new(): DOMError;\r\n}\r\n\r\ninterface DOMException {\r\n readonly code: number;\r\n readonly message: string;\r\n readonly name: string;\r\n toString(): string;\r\n readonly ABORT_ERR: number;\r\n readonly DATA_CLONE_ERR: number;\r\n readonly DOMSTRING_SIZE_ERR: number;\r\n readonly HIERARCHY_REQUEST_ERR: number;\r\n readonly INDEX_SIZE_ERR: number;\r\n readonly INUSE_ATTRIBUTE_ERR: number;\r\n readonly INVALID_ACCESS_ERR: number;\r\n readonly INVALID_CHARACTER_ERR: number;\r\n readonly INVALID_MODIFICATION_ERR: number;\r\n readonly INVALID_NODE_TYPE_ERR: number;\r\n readonly INVALID_STATE_ERR: number;\r\n readonly NAMESPACE_ERR: number;\r\n readonly NETWORK_ERR: number;\r\n readonly NOT_FOUND_ERR: number;\r\n readonly NOT_SUPPORTED_ERR: number;\r\n readonly NO_DATA_ALLOWED_ERR: number;\r\n readonly NO_MODIFICATION_ALLOWED_ERR: number;\r\n readonly PARSE_ERR: number;\r\n readonly QUOTA_EXCEEDED_ERR: number;\r\n readonly SECURITY_ERR: number;\r\n readonly SERIALIZE_ERR: number;\r\n readonly SYNTAX_ERR: number;\r\n readonly TIMEOUT_ERR: number;\r\n readonly TYPE_MISMATCH_ERR: number;\r\n readonly URL_MISMATCH_ERR: number;\r\n readonly VALIDATION_ERR: number;\r\n readonly WRONG_DOCUMENT_ERR: number;\r\n}\r\n\r\ndeclare var DOMException: {\r\n prototype: DOMException;\r\n new(): DOMException;\r\n readonly ABORT_ERR: number;\r\n readonly DATA_CLONE_ERR: number;\r\n readonly DOMSTRING_SIZE_ERR: number;\r\n readonly HIERARCHY_REQUEST_ERR: number;\r\n readonly INDEX_SIZE_ERR: number;\r\n readonly INUSE_ATTRIBUTE_ERR: number;\r\n readonly INVALID_ACCESS_ERR: number;\r\n readonly INVALID_CHARACTER_ERR: number;\r\n readonly INVALID_MODIFICATION_ERR: number;\r\n readonly INVALID_NODE_TYPE_ERR: number;\r\n readonly INVALID_STATE_ERR: number;\r\n readonly NAMESPACE_ERR: number;\r\n readonly NETWORK_ERR: number;\r\n readonly NOT_FOUND_ERR: number;\r\n readonly NOT_SUPPORTED_ERR: number;\r\n readonly NO_DATA_ALLOWED_ERR: number;\r\n readonly NO_MODIFICATION_ALLOWED_ERR: number;\r\n readonly PARSE_ERR: number;\r\n readonly QUOTA_EXCEEDED_ERR: number;\r\n readonly SECURITY_ERR: number;\r\n readonly SERIALIZE_ERR: number;\r\n readonly SYNTAX_ERR: number;\r\n readonly TIMEOUT_ERR: number;\r\n readonly TYPE_MISMATCH_ERR: number;\r\n readonly URL_MISMATCH_ERR: number;\r\n readonly VALIDATION_ERR: number;\r\n readonly WRONG_DOCUMENT_ERR: number;\r\n}\r\n\r\ninterface DOMImplementation {\r\n createDocument(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType): Document;\r\n createDocumentType(qualifiedName: string, publicId: string | null, systemId: string | null): DocumentType;\r\n createHTMLDocument(title: string): Document;\r\n hasFeature(feature: string | null, version: string | null): boolean;\r\n}\r\n\r\ndeclare var DOMImplementation: {\r\n prototype: DOMImplementation;\r\n new(): DOMImplementation;\r\n}\r\n\r\ninterface DOMParser {\r\n parseFromString(source: string, mimeType: string): Document;\r\n}\r\n\r\ndeclare var DOMParser: {\r\n prototype: DOMParser;\r\n new(): DOMParser;\r\n}\r\n\r\ninterface DOMSettableTokenList extends DOMTokenList {\r\n value: string;\r\n}\r\n\r\ndeclare var DOMSettableTokenList: {\r\n prototype: DOMSettableTokenList;\r\n new(): DOMSettableTokenList;\r\n}\r\n\r\ninterface DOMStringList {\r\n readonly length: number;\r\n contains(str: string): boolean;\r\n item(index: number): string | null;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var DOMStringList: {\r\n prototype: DOMStringList;\r\n new(): DOMStringList;\r\n}\r\n\r\ninterface DOMStringMap {\r\n [name: string]: string;\r\n}\r\n\r\ndeclare var DOMStringMap: {\r\n prototype: DOMStringMap;\r\n new(): DOMStringMap;\r\n}\r\n\r\ninterface DOMTokenList {\r\n readonly length: number;\r\n add(...token: string[]): void;\r\n contains(token: string): boolean;\r\n item(index: number): string;\r\n remove(...token: string[]): void;\r\n toString(): string;\r\n toggle(token: string, force?: boolean): boolean;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var DOMTokenList: {\r\n prototype: DOMTokenList;\r\n new(): DOMTokenList;\r\n}\r\n\r\ninterface DataCue extends TextTrackCue {\r\n data: ArrayBuffer;\r\n}\r\n\r\ndeclare var DataCue: {\r\n prototype: DataCue;\r\n new(): DataCue;\r\n}\r\n\r\ninterface DataTransfer {\r\n dropEffect: string;\r\n effectAllowed: string;\r\n readonly files: FileList;\r\n readonly items: DataTransferItemList;\r\n readonly types: DOMStringList;\r\n clearData(format?: string): boolean;\r\n getData(format: string): string;\r\n setData(format: string, data: string): boolean;\r\n}\r\n\r\ndeclare var DataTransfer: {\r\n prototype: DataTransfer;\r\n new(): DataTransfer;\r\n}\r\n\r\ninterface DataTransferItem {\r\n readonly kind: string;\r\n readonly type: string;\r\n getAsFile(): File | null;\r\n getAsString(_callback: FunctionStringCallback | null): void;\r\n}\r\n\r\ndeclare var DataTransferItem: {\r\n prototype: DataTransferItem;\r\n new(): DataTransferItem;\r\n}\r\n\r\ninterface DataTransferItemList {\r\n readonly length: number;\r\n add(data: File): DataTransferItem | null;\r\n clear(): void;\r\n item(index: number): DataTransferItem;\r\n remove(index: number): void;\r\n [index: number]: DataTransferItem;\r\n}\r\n\r\ndeclare var DataTransferItemList: {\r\n prototype: DataTransferItemList;\r\n new(): DataTransferItemList;\r\n}\r\n\r\ninterface DeferredPermissionRequest {\r\n readonly id: number;\r\n readonly type: string;\r\n readonly uri: string;\r\n allow(): void;\r\n deny(): void;\r\n}\r\n\r\ndeclare var DeferredPermissionRequest: {\r\n prototype: DeferredPermissionRequest;\r\n new(): DeferredPermissionRequest;\r\n}\r\n\r\ninterface DelayNode extends AudioNode {\r\n readonly delayTime: AudioParam;\r\n}\r\n\r\ndeclare var DelayNode: {\r\n prototype: DelayNode;\r\n new(): DelayNode;\r\n}\r\n\r\ninterface DeviceAcceleration {\r\n readonly x: number | null;\r\n readonly y: number | null;\r\n readonly z: number | null;\r\n}\r\n\r\ndeclare var DeviceAcceleration: {\r\n prototype: DeviceAcceleration;\r\n new(): DeviceAcceleration;\r\n}\r\n\r\ninterface DeviceLightEvent extends Event {\r\n readonly value: number;\r\n}\r\n\r\ndeclare var DeviceLightEvent: {\r\n prototype: DeviceLightEvent;\r\n new(type: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;\r\n}\r\n\r\ninterface DeviceMotionEvent extends Event {\r\n readonly acceleration: DeviceAcceleration | null;\r\n readonly accelerationIncludingGravity: DeviceAcceleration | null;\r\n readonly interval: number | null;\r\n readonly rotationRate: DeviceRotationRate | null;\r\n initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict | null, accelerationIncludingGravity: DeviceAccelerationDict | null, rotationRate: DeviceRotationRateDict | null, interval: number | null): void;\r\n}\r\n\r\ndeclare var DeviceMotionEvent: {\r\n prototype: DeviceMotionEvent;\r\n new(): DeviceMotionEvent;\r\n}\r\n\r\ninterface DeviceOrientationEvent extends Event {\r\n readonly absolute: boolean;\r\n readonly alpha: number | null;\r\n readonly beta: number | null;\r\n readonly gamma: number | null;\r\n initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number | null, beta: number | null, gamma: number | null, absolute: boolean): void;\r\n}\r\n\r\ndeclare var DeviceOrientationEvent: {\r\n prototype: DeviceOrientationEvent;\r\n new(): DeviceOrientationEvent;\r\n}\r\n\r\ninterface DeviceRotationRate {\r\n readonly alpha: number | null;\r\n readonly beta: number | null;\r\n readonly gamma: number | null;\r\n}\r\n\r\ndeclare var DeviceRotationRate: {\r\n prototype: DeviceRotationRate;\r\n new(): DeviceRotationRate;\r\n}\r\n\r\ninterface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent, ParentNode {\r\n /**\r\n * Sets or gets the URL for the current document. \r\n */\r\n readonly URL: string;\r\n /**\r\n * Gets the URL for the document, stripped of any character encoding.\r\n */\r\n readonly URLUnencoded: string;\r\n /**\r\n * Gets the object that has the focus when the parent document has focus.\r\n */\r\n readonly activeElement: Element;\r\n /**\r\n * Sets or gets the color of all active links in the document.\r\n */\r\n alinkColor: string;\r\n /**\r\n * Returns a reference to the collection of elements contained by the object.\r\n */\r\n readonly all: HTMLAllCollection;\r\n /**\r\n * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.\r\n */\r\n anchors: HTMLCollectionOf;\r\n /**\r\n * Retrieves a collection of all applet objects in the document.\r\n */\r\n applets: HTMLCollectionOf;\r\n /**\r\n * Deprecated. Sets or retrieves a value that indicates the background color behind the object. \r\n */\r\n bgColor: string;\r\n /**\r\n * Specifies the beginning and end of the document body.\r\n */\r\n body: HTMLElement;\r\n readonly characterSet: string;\r\n /**\r\n * Gets or sets the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Gets a value that indicates whether standards-compliant mode is switched on for the object.\r\n */\r\n readonly compatMode: string;\r\n cookie: string;\r\n readonly currentScript: HTMLScriptElement | SVGScriptElement;\r\n /**\r\n * Gets the default character set from the current regional language settings.\r\n */\r\n readonly defaultCharset: string;\r\n readonly defaultView: Window;\r\n /**\r\n * Sets or gets a value that indicates whether the document can be edited.\r\n */\r\n designMode: string;\r\n /**\r\n * Sets or retrieves a value that indicates the reading order of the object. \r\n */\r\n dir: string;\r\n /**\r\n * Gets an object representing the document type declaration associated with the current document. \r\n */\r\n readonly doctype: DocumentType;\r\n /**\r\n * Gets a reference to the root node of the document. \r\n */\r\n documentElement: HTMLElement;\r\n /**\r\n * Sets or gets the security domain of the document. \r\n */\r\n domain: string;\r\n /**\r\n * Retrieves a collection of all embed objects in the document.\r\n */\r\n embeds: HTMLCollectionOf;\r\n /**\r\n * Sets or gets the foreground (text) color of the document.\r\n */\r\n fgColor: string;\r\n /**\r\n * Retrieves a collection, in source order, of all form objects in the document.\r\n */\r\n forms: HTMLCollectionOf;\r\n readonly fullscreenElement: Element | null;\r\n readonly fullscreenEnabled: boolean;\r\n readonly head: HTMLHeadElement;\r\n readonly hidden: boolean;\r\n /**\r\n * Retrieves a collection, in source order, of img objects in the document.\r\n */\r\n images: HTMLCollectionOf;\r\n /**\r\n * Gets the implementation object of the current document. \r\n */\r\n readonly implementation: DOMImplementation;\r\n /**\r\n * Returns the character encoding used to create the webpage that is loaded into the document object.\r\n */\r\n readonly inputEncoding: string | null;\r\n /**\r\n * Gets the date that the page was last modified, if the page supplies one. \r\n */\r\n readonly lastModified: string;\r\n /**\r\n * Sets or gets the color of the document links. \r\n */\r\n linkColor: string;\r\n /**\r\n * Retrieves a collection of all a objects that specify the href property and all area objects in the document.\r\n */\r\n links: HTMLCollectionOf;\r\n /**\r\n * Contains information about the current URL. \r\n */\r\n readonly location: Location;\r\n msCSSOMElementFloatMetrics: boolean;\r\n msCapsLockWarningOff: boolean;\r\n /**\r\n * Fires when the user aborts the download.\r\n * @param ev The event.\r\n */\r\n onabort: (this: this, ev: UIEvent) => any;\r\n /**\r\n * Fires when the object is set as the active element.\r\n * @param ev The event.\r\n */\r\n onactivate: (this: this, ev: UIEvent) => any;\r\n /**\r\n * Fires immediately before the object is set as the active element.\r\n * @param ev The event.\r\n */\r\n onbeforeactivate: (this: this, ev: UIEvent) => any;\r\n /**\r\n * Fires immediately before the activeElement is changed from the current object to another object in the parent document.\r\n * @param ev The event.\r\n */\r\n onbeforedeactivate: (this: this, ev: UIEvent) => any;\r\n /** \r\n * Fires when the object loses the input focus. \r\n * @param ev The focus event.\r\n */\r\n onblur: (this: this, ev: FocusEvent) => any;\r\n /**\r\n * Occurs when playback is possible, but would require further buffering. \r\n * @param ev The event.\r\n */\r\n oncanplay: (this: this, ev: Event) => any;\r\n oncanplaythrough: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the contents of the object or selection have changed. \r\n * @param ev The event.\r\n */\r\n onchange: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the user clicks the left mouse button on the object\r\n * @param ev The mouse event.\r\n */\r\n onclick: (this: this, ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user clicks the right mouse button in the client area, opening the context menu. \r\n * @param ev The mouse event.\r\n */\r\n oncontextmenu: (this: this, ev: PointerEvent) => any;\r\n /**\r\n * Fires when the user double-clicks the object.\r\n * @param ev The mouse event.\r\n */\r\n ondblclick: (this: this, ev: MouseEvent) => any;\r\n /**\r\n * Fires when the activeElement is changed from the current object to another object in the parent document.\r\n * @param ev The UI Event\r\n */\r\n ondeactivate: (this: this, ev: UIEvent) => any;\r\n /**\r\n * Fires on the source object continuously during a drag operation.\r\n * @param ev The event.\r\n */\r\n ondrag: (this: this, ev: DragEvent) => any;\r\n /**\r\n * Fires on the source object when the user releases the mouse at the close of a drag operation.\r\n * @param ev The event.\r\n */\r\n ondragend: (this: this, ev: DragEvent) => any;\r\n /** \r\n * Fires on the target element when the user drags the object to a valid drop target.\r\n * @param ev The drag event.\r\n */\r\n ondragenter: (this: this, ev: DragEvent) => any;\r\n /** \r\n * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.\r\n * @param ev The drag event.\r\n */\r\n ondragleave: (this: this, ev: DragEvent) => any;\r\n /**\r\n * Fires on the target element continuously while the user drags the object over a valid drop target.\r\n * @param ev The event.\r\n */\r\n ondragover: (this: this, ev: DragEvent) => any;\r\n /**\r\n * Fires on the source object when the user starts to drag a text selection or selected object. \r\n * @param ev The event.\r\n */\r\n ondragstart: (this: this, ev: DragEvent) => any;\r\n ondrop: (this: this, ev: DragEvent) => any;\r\n /**\r\n * Occurs when the duration attribute is updated. \r\n * @param ev The event.\r\n */\r\n ondurationchange: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when the media element is reset to its initial state. \r\n * @param ev The event.\r\n */\r\n onemptied: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when the end of playback is reached. \r\n * @param ev The event\r\n */\r\n onended: (this: this, ev: MediaStreamErrorEvent) => any;\r\n /**\r\n * Fires when an error occurs during object loading.\r\n * @param ev The event.\r\n */\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n /**\r\n * Fires when the object receives focus. \r\n * @param ev The event.\r\n */\r\n onfocus: (this: this, ev: FocusEvent) => any;\r\n onfullscreenchange: (this: this, ev: Event) => any;\r\n onfullscreenerror: (this: this, ev: Event) => any;\r\n oninput: (this: this, ev: Event) => any;\r\n oninvalid: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the user presses a key.\r\n * @param ev The keyboard event\r\n */\r\n onkeydown: (this: this, ev: KeyboardEvent) => any;\r\n /**\r\n * Fires when the user presses an alphanumeric key.\r\n * @param ev The event.\r\n */\r\n onkeypress: (this: this, ev: KeyboardEvent) => any;\r\n /**\r\n * Fires when the user releases a key.\r\n * @param ev The keyboard event\r\n */\r\n onkeyup: (this: this, ev: KeyboardEvent) => any;\r\n /**\r\n * Fires immediately after the browser loads the object. \r\n * @param ev The event.\r\n */\r\n onload: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when media data is loaded at the current playback position. \r\n * @param ev The event.\r\n */\r\n onloadeddata: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when the duration and dimensions of the media have been determined.\r\n * @param ev The event.\r\n */\r\n onloadedmetadata: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when Internet Explorer begins looking for media data. \r\n * @param ev The event.\r\n */\r\n onloadstart: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the user clicks the object with either mouse button. \r\n * @param ev The mouse event.\r\n */\r\n onmousedown: (this: this, ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user moves the mouse over the object. \r\n * @param ev The mouse event.\r\n */\r\n onmousemove: (this: this, ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user moves the mouse pointer outside the boundaries of the object. \r\n * @param ev The mouse event.\r\n */\r\n onmouseout: (this: this, ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user moves the mouse pointer into the object.\r\n * @param ev The mouse event.\r\n */\r\n onmouseover: (this: this, ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user releases a mouse button while the mouse is over the object. \r\n * @param ev The mouse event.\r\n */\r\n onmouseup: (this: this, ev: MouseEvent) => any;\r\n /**\r\n * Fires when the wheel button is rotated. \r\n * @param ev The mouse event\r\n */\r\n onmousewheel: (this: this, ev: WheelEvent) => any;\r\n onmscontentzoom: (this: this, ev: UIEvent) => any;\r\n onmsgesturechange: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturedoubletap: (this: this, ev: MSGestureEvent) => any;\r\n onmsgestureend: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturehold: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturestart: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturetap: (this: this, ev: MSGestureEvent) => any;\r\n onmsinertiastart: (this: this, ev: MSGestureEvent) => any;\r\n onmsmanipulationstatechanged: (this: this, ev: MSManipulationEvent) => any;\r\n onmspointercancel: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerdown: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerenter: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerleave: (this: this, ev: MSPointerEvent) => any;\r\n onmspointermove: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerout: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerover: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerup: (this: this, ev: MSPointerEvent) => any;\r\n /**\r\n * Occurs when an item is removed from a Jump List of a webpage running in Site Mode. \r\n * @param ev The event.\r\n */\r\n onmssitemodejumplistitemremoved: (this: this, ev: MSSiteModeEvent) => any;\r\n /**\r\n * Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode.\r\n * @param ev The event.\r\n */\r\n onmsthumbnailclick: (this: this, ev: MSSiteModeEvent) => any;\r\n /**\r\n * Occurs when playback is paused.\r\n * @param ev The event.\r\n */\r\n onpause: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when the play method is requested. \r\n * @param ev The event.\r\n */\r\n onplay: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when the audio or video has started playing. \r\n * @param ev The event.\r\n */\r\n onplaying: (this: this, ev: Event) => any;\r\n onpointerlockchange: (this: this, ev: Event) => any;\r\n onpointerlockerror: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs to indicate progress while downloading media data. \r\n * @param ev The event.\r\n */\r\n onprogress: (this: this, ev: ProgressEvent) => any;\r\n /**\r\n * Occurs when the playback rate is increased or decreased. \r\n * @param ev The event.\r\n */\r\n onratechange: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the state of the object has changed.\r\n * @param ev The event\r\n */\r\n onreadystatechange: (this: this, ev: ProgressEvent) => any;\r\n /**\r\n * Fires when the user resets a form. \r\n * @param ev The event.\r\n */\r\n onreset: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the user repositions the scroll box in the scroll bar on the object. \r\n * @param ev The event.\r\n */\r\n onscroll: (this: this, ev: UIEvent) => any;\r\n /**\r\n * Occurs when the seek operation ends. \r\n * @param ev The event.\r\n */\r\n onseeked: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when the current playback position is moved. \r\n * @param ev The event.\r\n */\r\n onseeking: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the current selection changes.\r\n * @param ev The event.\r\n */\r\n onselect: (this: this, ev: UIEvent) => any;\r\n /**\r\n * Fires when the selection state of a document changes.\r\n * @param ev The event.\r\n */\r\n onselectionchange: (this: this, ev: Event) => any;\r\n onselectstart: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when the download has stopped. \r\n * @param ev The event.\r\n */\r\n onstalled: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the user clicks the Stop button or leaves the Web page.\r\n * @param ev The event.\r\n */\r\n onstop: (this: this, ev: Event) => any;\r\n onsubmit: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs if the load operation has been intentionally halted. \r\n * @param ev The event.\r\n */\r\n onsuspend: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs to indicate the current playback position.\r\n * @param ev The event.\r\n */\r\n ontimeupdate: (this: this, ev: Event) => any;\r\n ontouchcancel: (ev: TouchEvent) => any;\r\n ontouchend: (ev: TouchEvent) => any;\r\n ontouchmove: (ev: TouchEvent) => any;\r\n ontouchstart: (ev: TouchEvent) => any;\r\n /**\r\n * Occurs when the volume is changed, or playback is muted or unmuted.\r\n * @param ev The event.\r\n */\r\n onvolumechange: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when playback stops because the next frame of a video resource is not available. \r\n * @param ev The event.\r\n */\r\n onwaiting: (this: this, ev: Event) => any;\r\n onwebkitfullscreenchange: (this: this, ev: Event) => any;\r\n onwebkitfullscreenerror: (this: this, ev: Event) => any;\r\n plugins: HTMLCollectionOf;\r\n readonly pointerLockElement: Element;\r\n /**\r\n * Retrieves a value that indicates the current state of the object.\r\n */\r\n readonly readyState: string;\r\n /**\r\n * Gets the URL of the location that referred the user to the current page.\r\n */\r\n readonly referrer: string;\r\n /**\r\n * Gets the root svg element in the document hierarchy.\r\n */\r\n readonly rootElement: SVGSVGElement;\r\n /**\r\n * Retrieves a collection of all script objects in the document.\r\n */\r\n scripts: HTMLCollectionOf;\r\n readonly scrollingElement: Element | null;\r\n /**\r\n * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.\r\n */\r\n readonly styleSheets: StyleSheetList;\r\n /**\r\n * Contains the title of the document.\r\n */\r\n title: string;\r\n readonly visibilityState: string;\r\n /** \r\n * Sets or gets the color of the links that the user has visited.\r\n */\r\n vlinkColor: string;\r\n readonly webkitCurrentFullScreenElement: Element | null;\r\n readonly webkitFullscreenElement: Element | null;\r\n readonly webkitFullscreenEnabled: boolean;\r\n readonly webkitIsFullScreen: boolean;\r\n readonly xmlEncoding: string | null;\r\n xmlStandalone: boolean;\r\n /**\r\n * Gets or sets the version attribute specified in the declaration of an XML document.\r\n */\r\n xmlVersion: string | null;\r\n adoptNode(source: Node): Node;\r\n captureEvents(): void;\r\n caretRangeFromPoint(x: number, y: number): Range;\r\n clear(): void;\r\n /**\r\n * Closes an output stream and forces the sent data to display.\r\n */\r\n close(): void;\r\n /**\r\n * Creates an attribute object with a specified name.\r\n * @param name String that sets the attribute object's name.\r\n */\r\n createAttribute(name: string): Attr;\r\n createAttributeNS(namespaceURI: string | null, qualifiedName: string): Attr;\r\n createCDATASection(data: string): CDATASection;\r\n /**\r\n * Creates a comment object with the specified data.\r\n * @param data Sets the comment object's data.\r\n */\r\n createComment(data: string): Comment;\r\n /**\r\n * Creates a new document.\r\n */\r\n createDocumentFragment(): DocumentFragment;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: \"a\"): HTMLAnchorElement;\r\n createElement(tagName: \"applet\"): HTMLAppletElement;\r\n createElement(tagName: \"area\"): HTMLAreaElement;\r\n createElement(tagName: \"audio\"): HTMLAudioElement;\r\n createElement(tagName: \"base\"): HTMLBaseElement;\r\n createElement(tagName: \"basefont\"): HTMLBaseFontElement;\r\n createElement(tagName: \"blockquote\"): HTMLQuoteElement;\r\n createElement(tagName: \"body\"): HTMLBodyElement;\r\n createElement(tagName: \"br\"): HTMLBRElement;\r\n createElement(tagName: \"button\"): HTMLButtonElement;\r\n createElement(tagName: \"canvas\"): HTMLCanvasElement;\r\n createElement(tagName: \"caption\"): HTMLTableCaptionElement;\r\n createElement(tagName: \"col\"): HTMLTableColElement;\r\n createElement(tagName: \"colgroup\"): HTMLTableColElement;\r\n createElement(tagName: \"datalist\"): HTMLDataListElement;\r\n createElement(tagName: \"del\"): HTMLModElement;\r\n createElement(tagName: \"dir\"): HTMLDirectoryElement;\r\n createElement(tagName: \"div\"): HTMLDivElement;\r\n createElement(tagName: \"dl\"): HTMLDListElement;\r\n createElement(tagName: \"embed\"): HTMLEmbedElement;\r\n createElement(tagName: \"fieldset\"): HTMLFieldSetElement;\r\n createElement(tagName: \"font\"): HTMLFontElement;\r\n createElement(tagName: \"form\"): HTMLFormElement;\r\n createElement(tagName: \"frame\"): HTMLFrameElement;\r\n createElement(tagName: \"frameset\"): HTMLFrameSetElement;\r\n createElement(tagName: \"h1\"): HTMLHeadingElement;\r\n createElement(tagName: \"h2\"): HTMLHeadingElement;\r\n createElement(tagName: \"h3\"): HTMLHeadingElement;\r\n createElement(tagName: \"h4\"): HTMLHeadingElement;\r\n createElement(tagName: \"h5\"): HTMLHeadingElement;\r\n createElement(tagName: \"h6\"): HTMLHeadingElement;\r\n createElement(tagName: \"head\"): HTMLHeadElement;\r\n createElement(tagName: \"hr\"): HTMLHRElement;\r\n createElement(tagName: \"html\"): HTMLHtmlElement;\r\n createElement(tagName: \"iframe\"): HTMLIFrameElement;\r\n createElement(tagName: \"img\"): HTMLImageElement;\r\n createElement(tagName: \"input\"): HTMLInputElement;\r\n createElement(tagName: \"ins\"): HTMLModElement;\r\n createElement(tagName: \"isindex\"): HTMLUnknownElement;\r\n createElement(tagName: \"label\"): HTMLLabelElement;\r\n createElement(tagName: \"legend\"): HTMLLegendElement;\r\n createElement(tagName: \"li\"): HTMLLIElement;\r\n createElement(tagName: \"link\"): HTMLLinkElement;\r\n createElement(tagName: \"listing\"): HTMLPreElement;\r\n createElement(tagName: \"map\"): HTMLMapElement;\r\n createElement(tagName: \"marquee\"): HTMLMarqueeElement;\r\n createElement(tagName: \"menu\"): HTMLMenuElement;\r\n createElement(tagName: \"meta\"): HTMLMetaElement;\r\n createElement(tagName: \"meter\"): HTMLMeterElement;\r\n createElement(tagName: \"nextid\"): HTMLUnknownElement;\r\n createElement(tagName: \"object\"): HTMLObjectElement;\r\n createElement(tagName: \"ol\"): HTMLOListElement;\r\n createElement(tagName: \"optgroup\"): HTMLOptGroupElement;\r\n createElement(tagName: \"option\"): HTMLOptionElement;\r\n createElement(tagName: \"p\"): HTMLParagraphElement;\r\n createElement(tagName: \"param\"): HTMLParamElement;\r\n createElement(tagName: \"picture\"): HTMLPictureElement;\r\n createElement(tagName: \"pre\"): HTMLPreElement;\r\n createElement(tagName: \"progress\"): HTMLProgressElement;\r\n createElement(tagName: \"q\"): HTMLQuoteElement;\r\n createElement(tagName: \"script\"): HTMLScriptElement;\r\n createElement(tagName: \"select\"): HTMLSelectElement;\r\n createElement(tagName: \"source\"): HTMLSourceElement;\r\n createElement(tagName: \"span\"): HTMLSpanElement;\r\n createElement(tagName: \"style\"): HTMLStyleElement;\r\n createElement(tagName: \"table\"): HTMLTableElement;\r\n createElement(tagName: \"tbody\"): HTMLTableSectionElement;\r\n createElement(tagName: \"td\"): HTMLTableDataCellElement;\r\n createElement(tagName: \"template\"): HTMLTemplateElement;\r\n createElement(tagName: \"textarea\"): HTMLTextAreaElement;\r\n createElement(tagName: \"tfoot\"): HTMLTableSectionElement;\r\n createElement(tagName: \"th\"): HTMLTableHeaderCellElement;\r\n createElement(tagName: \"thead\"): HTMLTableSectionElement;\r\n createElement(tagName: \"title\"): HTMLTitleElement;\r\n createElement(tagName: \"tr\"): HTMLTableRowElement;\r\n createElement(tagName: \"track\"): HTMLTrackElement;\r\n createElement(tagName: \"ul\"): HTMLUListElement;\r\n createElement(tagName: \"video\"): HTMLVideoElement;\r\n createElement(tagName: \"x-ms-webview\"): MSHTMLWebViewElement;\r\n createElement(tagName: \"xmp\"): HTMLPreElement;\r\n createElement(tagName: string): HTMLElement;\r\n createElementNS(namespaceURI: \"http://www.w3.org/1999/xhtml\", qualifiedName: string): HTMLElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"a\"): SVGAElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"circle\"): SVGCircleElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"clipPath\"): SVGClipPathElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"componentTransferFunction\"): SVGComponentTransferFunctionElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"defs\"): SVGDefsElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"desc\"): SVGDescElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"ellipse\"): SVGEllipseElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feBlend\"): SVGFEBlendElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feColorMatrix\"): SVGFEColorMatrixElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feComponentTransfer\"): SVGFEComponentTransferElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feComposite\"): SVGFECompositeElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feConvolveMatrix\"): SVGFEConvolveMatrixElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feDiffuseLighting\"): SVGFEDiffuseLightingElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feDisplacementMap\"): SVGFEDisplacementMapElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feDistantLight\"): SVGFEDistantLightElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFlood\"): SVGFEFloodElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncA\"): SVGFEFuncAElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncB\"): SVGFEFuncBElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncG\"): SVGFEFuncGElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncR\"): SVGFEFuncRElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feGaussianBlur\"): SVGFEGaussianBlurElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feImage\"): SVGFEImageElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feMerge\"): SVGFEMergeElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feMergeNode\"): SVGFEMergeNodeElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feMorphology\"): SVGFEMorphologyElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feOffset\"): SVGFEOffsetElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"fePointLight\"): SVGFEPointLightElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feSpecularLighting\"): SVGFESpecularLightingElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feSpotLight\"): SVGFESpotLightElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feTile\"): SVGFETileElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feTurbulence\"): SVGFETurbulenceElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"filter\"): SVGFilterElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"foreignObject\"): SVGForeignObjectElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"g\"): SVGGElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"image\"): SVGImageElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"gradient\"): SVGGradientElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"line\"): SVGLineElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"linearGradient\"): SVGLinearGradientElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"marker\"): SVGMarkerElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"mask\"): SVGMaskElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"path\"): SVGPathElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"metadata\"): SVGMetadataElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"pattern\"): SVGPatternElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"polygon\"): SVGPolygonElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"polyline\"): SVGPolylineElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"radialGradient\"): SVGRadialGradientElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"rect\"): SVGRectElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"svg\"): SVGSVGElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"script\"): SVGScriptElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"stop\"): SVGStopElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"style\"): SVGStyleElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"switch\"): SVGSwitchElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"symbol\"): SVGSymbolElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"tspan\"): SVGTSpanElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"textContent\"): SVGTextContentElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"text\"): SVGTextElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"textPath\"): SVGTextPathElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"textPositioning\"): SVGTextPositioningElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"title\"): SVGTitleElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"use\"): SVGUseElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"view\"): SVGViewElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: string): SVGElement\r\n createElementNS(namespaceURI: string | null, qualifiedName: string): Element;\r\n createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;\r\n createNSResolver(nodeResolver: Node): XPathNSResolver;\r\n /**\r\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document. \r\n * @param root The root element or node to start traversing on.\r\n * @param whatToShow The type of nodes or elements to appear in the node list\r\n * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter.\r\n * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.\r\n */\r\n createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): NodeIterator;\r\n createProcessingInstruction(target: string, data: string): ProcessingInstruction;\r\n /**\r\n * Returns an empty range object that has both of its boundary points positioned at the beginning of the document. \r\n */\r\n createRange(): Range;\r\n /**\r\n * Creates a text string from the specified value. \r\n * @param data String that specifies the nodeValue property of the text node.\r\n */\r\n createTextNode(data: string): Text;\r\n createTouch(view: Window, target: EventTarget, identifier: number, pageX: number, pageY: number, screenX: number, screenY: number): Touch;\r\n createTouchList(...touches: Touch[]): TouchList;\r\n /**\r\n * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.\r\n * @param root The root element or node to start traversing on.\r\n * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow.\r\n * @param filter A custom NodeFilter function to use.\r\n * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.\r\n */\r\n createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): TreeWalker;\r\n /**\r\n * Returns the element for the specified x coordinate and the specified y coordinate. \r\n * @param x The x-offset\r\n * @param y The y-offset\r\n */\r\n elementFromPoint(x: number, y: number): Element;\r\n evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver, type: number, result: XPathResult): XPathResult;\r\n /**\r\n * Executes a command on the current document, current selection, or the given range.\r\n * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.\r\n * @param showUI Display the user interface, defaults to false.\r\n * @param value Value to assign.\r\n */\r\n execCommand(commandId: string, showUI?: boolean, value?: any): boolean;\r\n /**\r\n * Displays help information for the given command identifier.\r\n * @param commandId Displays help information for the given command identifier.\r\n */\r\n execCommandShowHelp(commandId: string): boolean;\r\n exitFullscreen(): void;\r\n exitPointerLock(): void;\r\n /**\r\n * Causes the element to receive the focus and executes the code specified by the onfocus event.\r\n */\r\n focus(): void;\r\n /**\r\n * Returns a reference to the first object with the specified value of the ID or NAME attribute.\r\n * @param elementId String that specifies the ID value. Case-insensitive.\r\n */\r\n getElementById(elementId: string): HTMLElement | null;\r\n getElementsByClassName(classNames: string): HTMLCollectionOf;\r\n /**\r\n * Gets a collection of objects based on the value of the NAME or ID attribute.\r\n * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.\r\n */\r\n getElementsByName(elementName: string): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(tagname: \"a\"): NodeListOf;\r\n getElementsByTagName(tagname: \"abbr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"acronym\"): NodeListOf;\r\n getElementsByTagName(tagname: \"address\"): NodeListOf;\r\n getElementsByTagName(tagname: \"applet\"): NodeListOf;\r\n getElementsByTagName(tagname: \"area\"): NodeListOf;\r\n getElementsByTagName(tagname: \"article\"): NodeListOf;\r\n getElementsByTagName(tagname: \"aside\"): NodeListOf;\r\n getElementsByTagName(tagname: \"audio\"): NodeListOf;\r\n getElementsByTagName(tagname: \"b\"): NodeListOf;\r\n getElementsByTagName(tagname: \"base\"): NodeListOf;\r\n getElementsByTagName(tagname: \"basefont\"): NodeListOf;\r\n getElementsByTagName(tagname: \"bdo\"): NodeListOf;\r\n getElementsByTagName(tagname: \"big\"): NodeListOf;\r\n getElementsByTagName(tagname: \"blockquote\"): NodeListOf;\r\n getElementsByTagName(tagname: \"body\"): NodeListOf;\r\n getElementsByTagName(tagname: \"br\"): NodeListOf;\r\n getElementsByTagName(tagname: \"button\"): NodeListOf;\r\n getElementsByTagName(tagname: \"canvas\"): NodeListOf;\r\n getElementsByTagName(tagname: \"caption\"): NodeListOf;\r\n getElementsByTagName(tagname: \"center\"): NodeListOf;\r\n getElementsByTagName(tagname: \"circle\"): NodeListOf;\r\n getElementsByTagName(tagname: \"cite\"): NodeListOf;\r\n getElementsByTagName(tagname: \"clippath\"): NodeListOf;\r\n getElementsByTagName(tagname: \"code\"): NodeListOf;\r\n getElementsByTagName(tagname: \"col\"): NodeListOf;\r\n getElementsByTagName(tagname: \"colgroup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"datalist\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dd\"): NodeListOf;\r\n getElementsByTagName(tagname: \"defs\"): NodeListOf;\r\n getElementsByTagName(tagname: \"del\"): NodeListOf;\r\n getElementsByTagName(tagname: \"desc\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dfn\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dir\"): NodeListOf;\r\n getElementsByTagName(tagname: \"div\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dl\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dt\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ellipse\"): NodeListOf;\r\n getElementsByTagName(tagname: \"em\"): NodeListOf;\r\n getElementsByTagName(tagname: \"embed\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feblend\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fecolormatrix\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fecomponenttransfer\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fecomposite\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feconvolvematrix\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fediffuselighting\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fedisplacementmap\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fedistantlight\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feflood\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefunca\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefuncb\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefuncg\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefuncr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fegaussianblur\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feimage\"): NodeListOf;\r\n getElementsByTagName(tagname: \"femerge\"): NodeListOf;\r\n getElementsByTagName(tagname: \"femergenode\"): NodeListOf;\r\n getElementsByTagName(tagname: \"femorphology\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feoffset\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fepointlight\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fespecularlighting\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fespotlight\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fetile\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feturbulence\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fieldset\"): NodeListOf;\r\n getElementsByTagName(tagname: \"figcaption\"): NodeListOf;\r\n getElementsByTagName(tagname: \"figure\"): NodeListOf;\r\n getElementsByTagName(tagname: \"filter\"): NodeListOf;\r\n getElementsByTagName(tagname: \"font\"): NodeListOf;\r\n getElementsByTagName(tagname: \"footer\"): NodeListOf;\r\n getElementsByTagName(tagname: \"foreignobject\"): NodeListOf;\r\n getElementsByTagName(tagname: \"form\"): NodeListOf;\r\n getElementsByTagName(tagname: \"frame\"): NodeListOf;\r\n getElementsByTagName(tagname: \"frameset\"): NodeListOf;\r\n getElementsByTagName(tagname: \"g\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h1\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h2\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h3\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h4\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h5\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h6\"): NodeListOf;\r\n getElementsByTagName(tagname: \"head\"): NodeListOf;\r\n getElementsByTagName(tagname: \"header\"): NodeListOf;\r\n getElementsByTagName(tagname: \"hgroup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"hr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"html\"): NodeListOf;\r\n getElementsByTagName(tagname: \"i\"): NodeListOf;\r\n getElementsByTagName(tagname: \"iframe\"): NodeListOf;\r\n getElementsByTagName(tagname: \"image\"): NodeListOf;\r\n getElementsByTagName(tagname: \"img\"): NodeListOf;\r\n getElementsByTagName(tagname: \"input\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ins\"): NodeListOf;\r\n getElementsByTagName(tagname: \"isindex\"): NodeListOf;\r\n getElementsByTagName(tagname: \"kbd\"): NodeListOf;\r\n getElementsByTagName(tagname: \"keygen\"): NodeListOf;\r\n getElementsByTagName(tagname: \"label\"): NodeListOf;\r\n getElementsByTagName(tagname: \"legend\"): NodeListOf;\r\n getElementsByTagName(tagname: \"li\"): NodeListOf;\r\n getElementsByTagName(tagname: \"line\"): NodeListOf;\r\n getElementsByTagName(tagname: \"lineargradient\"): NodeListOf;\r\n getElementsByTagName(tagname: \"link\"): NodeListOf;\r\n getElementsByTagName(tagname: \"listing\"): NodeListOf;\r\n getElementsByTagName(tagname: \"map\"): NodeListOf;\r\n getElementsByTagName(tagname: \"mark\"): NodeListOf;\r\n getElementsByTagName(tagname: \"marker\"): NodeListOf;\r\n getElementsByTagName(tagname: \"marquee\"): NodeListOf;\r\n getElementsByTagName(tagname: \"mask\"): NodeListOf;\r\n getElementsByTagName(tagname: \"menu\"): NodeListOf;\r\n getElementsByTagName(tagname: \"meta\"): NodeListOf;\r\n getElementsByTagName(tagname: \"metadata\"): NodeListOf;\r\n getElementsByTagName(tagname: \"meter\"): NodeListOf;\r\n getElementsByTagName(tagname: \"nav\"): NodeListOf;\r\n getElementsByTagName(tagname: \"nextid\"): NodeListOf;\r\n getElementsByTagName(tagname: \"nobr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"noframes\"): NodeListOf;\r\n getElementsByTagName(tagname: \"noscript\"): NodeListOf;\r\n getElementsByTagName(tagname: \"object\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ol\"): NodeListOf;\r\n getElementsByTagName(tagname: \"optgroup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"option\"): NodeListOf;\r\n getElementsByTagName(tagname: \"p\"): NodeListOf;\r\n getElementsByTagName(tagname: \"param\"): NodeListOf;\r\n getElementsByTagName(tagname: \"path\"): NodeListOf;\r\n getElementsByTagName(tagname: \"pattern\"): NodeListOf;\r\n getElementsByTagName(tagname: \"picture\"): NodeListOf;\r\n getElementsByTagName(tagname: \"plaintext\"): NodeListOf;\r\n getElementsByTagName(tagname: \"polygon\"): NodeListOf;\r\n getElementsByTagName(tagname: \"polyline\"): NodeListOf;\r\n getElementsByTagName(tagname: \"pre\"): NodeListOf;\r\n getElementsByTagName(tagname: \"progress\"): NodeListOf;\r\n getElementsByTagName(tagname: \"q\"): NodeListOf;\r\n getElementsByTagName(tagname: \"radialgradient\"): NodeListOf;\r\n getElementsByTagName(tagname: \"rect\"): NodeListOf;\r\n getElementsByTagName(tagname: \"rt\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ruby\"): NodeListOf;\r\n getElementsByTagName(tagname: \"s\"): NodeListOf;\r\n getElementsByTagName(tagname: \"samp\"): NodeListOf;\r\n getElementsByTagName(tagname: \"script\"): NodeListOf;\r\n getElementsByTagName(tagname: \"section\"): NodeListOf;\r\n getElementsByTagName(tagname: \"select\"): NodeListOf;\r\n getElementsByTagName(tagname: \"small\"): NodeListOf;\r\n getElementsByTagName(tagname: \"source\"): NodeListOf;\r\n getElementsByTagName(tagname: \"span\"): NodeListOf;\r\n getElementsByTagName(tagname: \"stop\"): NodeListOf;\r\n getElementsByTagName(tagname: \"strike\"): NodeListOf;\r\n getElementsByTagName(tagname: \"strong\"): NodeListOf;\r\n getElementsByTagName(tagname: \"style\"): NodeListOf;\r\n getElementsByTagName(tagname: \"sub\"): NodeListOf;\r\n getElementsByTagName(tagname: \"sup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"svg\"): NodeListOf;\r\n getElementsByTagName(tagname: \"switch\"): NodeListOf;\r\n getElementsByTagName(tagname: \"symbol\"): NodeListOf;\r\n getElementsByTagName(tagname: \"table\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tbody\"): NodeListOf;\r\n getElementsByTagName(tagname: \"td\"): NodeListOf;\r\n getElementsByTagName(tagname: \"template\"): NodeListOf;\r\n getElementsByTagName(tagname: \"text\"): NodeListOf;\r\n getElementsByTagName(tagname: \"textpath\"): NodeListOf;\r\n getElementsByTagName(tagname: \"textarea\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tfoot\"): NodeListOf;\r\n getElementsByTagName(tagname: \"th\"): NodeListOf;\r\n getElementsByTagName(tagname: \"thead\"): NodeListOf;\r\n getElementsByTagName(tagname: \"title\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"track\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tspan\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tt\"): NodeListOf;\r\n getElementsByTagName(tagname: \"u\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ul\"): NodeListOf;\r\n getElementsByTagName(tagname: \"use\"): NodeListOf;\r\n getElementsByTagName(tagname: \"var\"): NodeListOf;\r\n getElementsByTagName(tagname: \"video\"): NodeListOf;\r\n getElementsByTagName(tagname: \"view\"): NodeListOf;\r\n getElementsByTagName(tagname: \"wbr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"x-ms-webview\"): NodeListOf;\r\n getElementsByTagName(tagname: \"xmp\"): NodeListOf;\r\n getElementsByTagName(tagname: string): NodeListOf;\r\n getElementsByTagNameNS(namespaceURI: \"http://www.w3.org/1999/xhtml\", localName: string): HTMLCollectionOf;\r\n getElementsByTagNameNS(namespaceURI: \"http://www.w3.org/2000/svg\", localName: string): HTMLCollectionOf;\r\n getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf;\r\n /**\r\n * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.\r\n */\r\n getSelection(): Selection;\r\n /**\r\n * Gets a value indicating whether the object currently has focus.\r\n */\r\n hasFocus(): boolean;\r\n importNode(importedNode: Node, deep: boolean): Node;\r\n msElementsFromPoint(x: number, y: number): NodeListOf;\r\n msElementsFromRect(left: number, top: number, width: number, height: number): NodeListOf;\r\n /**\r\n * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.\r\n * @param url Specifies a MIME type for the document.\r\n * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.\r\n * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, \"fullscreen=yes, toolbar=yes\"). The following values are supported.\r\n * @param replace Specifies whether the existing entry for the document is replaced in the history list.\r\n */\r\n open(url?: string, name?: string, features?: string, replace?: boolean): Document;\r\n /** \r\n * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.\r\n * @param commandId Specifies a command identifier.\r\n */\r\n queryCommandEnabled(commandId: string): boolean;\r\n /**\r\n * Returns a Boolean value that indicates whether the specified command is in the indeterminate state.\r\n * @param commandId String that specifies a command identifier.\r\n */\r\n queryCommandIndeterm(commandId: string): boolean;\r\n /**\r\n * Returns a Boolean value that indicates the current state of the command.\r\n * @param commandId String that specifies a command identifier.\r\n */\r\n queryCommandState(commandId: string): boolean;\r\n /**\r\n * Returns a Boolean value that indicates whether the current command is supported on the current range.\r\n * @param commandId Specifies a command identifier.\r\n */\r\n queryCommandSupported(commandId: string): boolean;\r\n /**\r\n * Retrieves the string associated with a command.\r\n * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers. \r\n */\r\n queryCommandText(commandId: string): string;\r\n /**\r\n * Returns the current value of the document, range, or current selection for the given command.\r\n * @param commandId String that specifies a command identifier.\r\n */\r\n queryCommandValue(commandId: string): string;\r\n releaseEvents(): void;\r\n /**\r\n * Allows updating the print settings for the page.\r\n */\r\n updateSettings(): void;\r\n webkitCancelFullScreen(): void;\r\n webkitExitFullscreen(): void;\r\n /**\r\n * Writes one or more HTML expressions to a document in the specified window. \r\n * @param content Specifies the text and HTML tags to write.\r\n */\r\n write(...content: string[]): void;\r\n /**\r\n * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window. \r\n * @param content The text and HTML tags to write.\r\n */\r\n writeln(...content: string[]): void;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"fullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"fullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mssitemodejumplistitemremoved\", listener: (this: this, ev: MSSiteModeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"msthumbnailclick\", listener: (this: this, ev: MSSiteModeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerlockchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerlockerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"readystatechange\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectionchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stop\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Document: {\r\n prototype: Document;\r\n new(): Document;\r\n}\r\n\r\ninterface DocumentFragment extends Node, NodeSelector, ParentNode {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var DocumentFragment: {\r\n prototype: DocumentFragment;\r\n new(): DocumentFragment;\r\n}\r\n\r\ninterface DocumentType extends Node, ChildNode {\r\n readonly entities: NamedNodeMap;\r\n readonly internalSubset: string | null;\r\n readonly name: string;\r\n readonly notations: NamedNodeMap;\r\n readonly publicId: string | null;\r\n readonly systemId: string | null;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var DocumentType: {\r\n prototype: DocumentType;\r\n new(): DocumentType;\r\n}\r\n\r\ninterface DragEvent extends MouseEvent {\r\n readonly dataTransfer: DataTransfer;\r\n initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void;\r\n msConvertURL(file: File, targetType: string, targetURL?: string): void;\r\n}\r\n\r\ndeclare var DragEvent: {\r\n prototype: DragEvent;\r\n new(): DragEvent;\r\n}\r\n\r\ninterface DynamicsCompressorNode extends AudioNode {\r\n readonly attack: AudioParam;\r\n readonly knee: AudioParam;\r\n readonly ratio: AudioParam;\r\n readonly reduction: AudioParam;\r\n readonly release: AudioParam;\r\n readonly threshold: AudioParam;\r\n}\r\n\r\ndeclare var DynamicsCompressorNode: {\r\n prototype: DynamicsCompressorNode;\r\n new(): DynamicsCompressorNode;\r\n}\r\n\r\ninterface EXT_frag_depth {\r\n}\r\n\r\ndeclare var EXT_frag_depth: {\r\n prototype: EXT_frag_depth;\r\n new(): EXT_frag_depth;\r\n}\r\n\r\ninterface EXT_texture_filter_anisotropic {\r\n readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n readonly TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n}\r\n\r\ndeclare var EXT_texture_filter_anisotropic: {\r\n prototype: EXT_texture_filter_anisotropic;\r\n new(): EXT_texture_filter_anisotropic;\r\n readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n readonly TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n}\r\n\r\ninterface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelector, ChildNode, ParentNode {\r\n readonly classList: DOMTokenList;\r\n className: string;\r\n readonly clientHeight: number;\r\n readonly clientLeft: number;\r\n readonly clientTop: number;\r\n readonly clientWidth: number;\r\n id: string;\r\n msContentZoomFactor: number;\r\n readonly msRegionOverflow: string;\r\n onariarequest: (this: this, ev: AriaRequestEvent) => any;\r\n oncommand: (this: this, ev: CommandEvent) => any;\r\n ongotpointercapture: (this: this, ev: PointerEvent) => any;\r\n onlostpointercapture: (this: this, ev: PointerEvent) => any;\r\n onmsgesturechange: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturedoubletap: (this: this, ev: MSGestureEvent) => any;\r\n onmsgestureend: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturehold: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturestart: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturetap: (this: this, ev: MSGestureEvent) => any;\r\n onmsgotpointercapture: (this: this, ev: MSPointerEvent) => any;\r\n onmsinertiastart: (this: this, ev: MSGestureEvent) => any;\r\n onmslostpointercapture: (this: this, ev: MSPointerEvent) => any;\r\n onmspointercancel: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerdown: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerenter: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerleave: (this: this, ev: MSPointerEvent) => any;\r\n onmspointermove: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerout: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerover: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerup: (this: this, ev: MSPointerEvent) => any;\r\n ontouchcancel: (ev: TouchEvent) => any;\r\n ontouchend: (ev: TouchEvent) => any;\r\n ontouchmove: (ev: TouchEvent) => any;\r\n ontouchstart: (ev: TouchEvent) => any;\r\n onwebkitfullscreenchange: (this: this, ev: Event) => any;\r\n onwebkitfullscreenerror: (this: this, ev: Event) => any;\r\n readonly prefix: string | null;\r\n readonly scrollHeight: number;\r\n scrollLeft: number;\r\n scrollTop: number;\r\n readonly scrollWidth: number;\r\n readonly tagName: string;\r\n innerHTML: string;\r\n getAttribute(name: string): string | null;\r\n getAttributeNS(namespaceURI: string, localName: string): string;\r\n getAttributeNode(name: string): Attr;\r\n getAttributeNodeNS(namespaceURI: string, localName: string): Attr;\r\n getBoundingClientRect(): ClientRect;\r\n getClientRects(): ClientRectList;\r\n getElementsByTagName(name: \"a\"): NodeListOf;\r\n getElementsByTagName(name: \"abbr\"): NodeListOf;\r\n getElementsByTagName(name: \"acronym\"): NodeListOf;\r\n getElementsByTagName(name: \"address\"): NodeListOf;\r\n getElementsByTagName(name: \"applet\"): NodeListOf;\r\n getElementsByTagName(name: \"area\"): NodeListOf;\r\n getElementsByTagName(name: \"article\"): NodeListOf;\r\n getElementsByTagName(name: \"aside\"): NodeListOf;\r\n getElementsByTagName(name: \"audio\"): NodeListOf;\r\n getElementsByTagName(name: \"b\"): NodeListOf;\r\n getElementsByTagName(name: \"base\"): NodeListOf;\r\n getElementsByTagName(name: \"basefont\"): NodeListOf;\r\n getElementsByTagName(name: \"bdo\"): NodeListOf;\r\n getElementsByTagName(name: \"big\"): NodeListOf;\r\n getElementsByTagName(name: \"blockquote\"): NodeListOf;\r\n getElementsByTagName(name: \"body\"): NodeListOf;\r\n getElementsByTagName(name: \"br\"): NodeListOf;\r\n getElementsByTagName(name: \"button\"): NodeListOf;\r\n getElementsByTagName(name: \"canvas\"): NodeListOf;\r\n getElementsByTagName(name: \"caption\"): NodeListOf;\r\n getElementsByTagName(name: \"center\"): NodeListOf;\r\n getElementsByTagName(name: \"circle\"): NodeListOf;\r\n getElementsByTagName(name: \"cite\"): NodeListOf;\r\n getElementsByTagName(name: \"clippath\"): NodeListOf;\r\n getElementsByTagName(name: \"code\"): NodeListOf;\r\n getElementsByTagName(name: \"col\"): NodeListOf;\r\n getElementsByTagName(name: \"colgroup\"): NodeListOf;\r\n getElementsByTagName(name: \"datalist\"): NodeListOf;\r\n getElementsByTagName(name: \"dd\"): NodeListOf;\r\n getElementsByTagName(name: \"defs\"): NodeListOf;\r\n getElementsByTagName(name: \"del\"): NodeListOf;\r\n getElementsByTagName(name: \"desc\"): NodeListOf;\r\n getElementsByTagName(name: \"dfn\"): NodeListOf;\r\n getElementsByTagName(name: \"dir\"): NodeListOf;\r\n getElementsByTagName(name: \"div\"): NodeListOf;\r\n getElementsByTagName(name: \"dl\"): NodeListOf;\r\n getElementsByTagName(name: \"dt\"): NodeListOf;\r\n getElementsByTagName(name: \"ellipse\"): NodeListOf;\r\n getElementsByTagName(name: \"em\"): NodeListOf;\r\n getElementsByTagName(name: \"embed\"): NodeListOf;\r\n getElementsByTagName(name: \"feblend\"): NodeListOf;\r\n getElementsByTagName(name: \"fecolormatrix\"): NodeListOf;\r\n getElementsByTagName(name: \"fecomponenttransfer\"): NodeListOf;\r\n getElementsByTagName(name: \"fecomposite\"): NodeListOf;\r\n getElementsByTagName(name: \"feconvolvematrix\"): NodeListOf;\r\n getElementsByTagName(name: \"fediffuselighting\"): NodeListOf;\r\n getElementsByTagName(name: \"fedisplacementmap\"): NodeListOf;\r\n getElementsByTagName(name: \"fedistantlight\"): NodeListOf;\r\n getElementsByTagName(name: \"feflood\"): NodeListOf;\r\n getElementsByTagName(name: \"fefunca\"): NodeListOf;\r\n getElementsByTagName(name: \"fefuncb\"): NodeListOf;\r\n getElementsByTagName(name: \"fefuncg\"): NodeListOf;\r\n getElementsByTagName(name: \"fefuncr\"): NodeListOf;\r\n getElementsByTagName(name: \"fegaussianblur\"): NodeListOf;\r\n getElementsByTagName(name: \"feimage\"): NodeListOf;\r\n getElementsByTagName(name: \"femerge\"): NodeListOf;\r\n getElementsByTagName(name: \"femergenode\"): NodeListOf;\r\n getElementsByTagName(name: \"femorphology\"): NodeListOf;\r\n getElementsByTagName(name: \"feoffset\"): NodeListOf;\r\n getElementsByTagName(name: \"fepointlight\"): NodeListOf;\r\n getElementsByTagName(name: \"fespecularlighting\"): NodeListOf;\r\n getElementsByTagName(name: \"fespotlight\"): NodeListOf;\r\n getElementsByTagName(name: \"fetile\"): NodeListOf;\r\n getElementsByTagName(name: \"feturbulence\"): NodeListOf;\r\n getElementsByTagName(name: \"fieldset\"): NodeListOf;\r\n getElementsByTagName(name: \"figcaption\"): NodeListOf;\r\n getElementsByTagName(name: \"figure\"): NodeListOf;\r\n getElementsByTagName(name: \"filter\"): NodeListOf;\r\n getElementsByTagName(name: \"font\"): NodeListOf;\r\n getElementsByTagName(name: \"footer\"): NodeListOf;\r\n getElementsByTagName(name: \"foreignobject\"): NodeListOf;\r\n getElementsByTagName(name: \"form\"): NodeListOf;\r\n getElementsByTagName(name: \"frame\"): NodeListOf;\r\n getElementsByTagName(name: \"frameset\"): NodeListOf;\r\n getElementsByTagName(name: \"g\"): NodeListOf;\r\n getElementsByTagName(name: \"h1\"): NodeListOf;\r\n getElementsByTagName(name: \"h2\"): NodeListOf;\r\n getElementsByTagName(name: \"h3\"): NodeListOf;\r\n getElementsByTagName(name: \"h4\"): NodeListOf;\r\n getElementsByTagName(name: \"h5\"): NodeListOf;\r\n getElementsByTagName(name: \"h6\"): NodeListOf;\r\n getElementsByTagName(name: \"head\"): NodeListOf;\r\n getElementsByTagName(name: \"header\"): NodeListOf;\r\n getElementsByTagName(name: \"hgroup\"): NodeListOf;\r\n getElementsByTagName(name: \"hr\"): NodeListOf;\r\n getElementsByTagName(name: \"html\"): NodeListOf;\r\n getElementsByTagName(name: \"i\"): NodeListOf;\r\n getElementsByTagName(name: \"iframe\"): NodeListOf;\r\n getElementsByTagName(name: \"image\"): NodeListOf;\r\n getElementsByTagName(name: \"img\"): NodeListOf;\r\n getElementsByTagName(name: \"input\"): NodeListOf;\r\n getElementsByTagName(name: \"ins\"): NodeListOf;\r\n getElementsByTagName(name: \"isindex\"): NodeListOf;\r\n getElementsByTagName(name: \"kbd\"): NodeListOf;\r\n getElementsByTagName(name: \"keygen\"): NodeListOf;\r\n getElementsByTagName(name: \"label\"): NodeListOf;\r\n getElementsByTagName(name: \"legend\"): NodeListOf;\r\n getElementsByTagName(name: \"li\"): NodeListOf;\r\n getElementsByTagName(name: \"line\"): NodeListOf;\r\n getElementsByTagName(name: \"lineargradient\"): NodeListOf;\r\n getElementsByTagName(name: \"link\"): NodeListOf;\r\n getElementsByTagName(name: \"listing\"): NodeListOf;\r\n getElementsByTagName(name: \"map\"): NodeListOf;\r\n getElementsByTagName(name: \"mark\"): NodeListOf;\r\n getElementsByTagName(name: \"marker\"): NodeListOf;\r\n getElementsByTagName(name: \"marquee\"): NodeListOf;\r\n getElementsByTagName(name: \"mask\"): NodeListOf;\r\n getElementsByTagName(name: \"menu\"): NodeListOf;\r\n getElementsByTagName(name: \"meta\"): NodeListOf;\r\n getElementsByTagName(name: \"metadata\"): NodeListOf;\r\n getElementsByTagName(name: \"meter\"): NodeListOf;\r\n getElementsByTagName(name: \"nav\"): NodeListOf;\r\n getElementsByTagName(name: \"nextid\"): NodeListOf;\r\n getElementsByTagName(name: \"nobr\"): NodeListOf;\r\n getElementsByTagName(name: \"noframes\"): NodeListOf;\r\n getElementsByTagName(name: \"noscript\"): NodeListOf;\r\n getElementsByTagName(name: \"object\"): NodeListOf;\r\n getElementsByTagName(name: \"ol\"): NodeListOf;\r\n getElementsByTagName(name: \"optgroup\"): NodeListOf;\r\n getElementsByTagName(name: \"option\"): NodeListOf;\r\n getElementsByTagName(name: \"p\"): NodeListOf;\r\n getElementsByTagName(name: \"param\"): NodeListOf;\r\n getElementsByTagName(name: \"path\"): NodeListOf;\r\n getElementsByTagName(name: \"pattern\"): NodeListOf;\r\n getElementsByTagName(name: \"picture\"): NodeListOf;\r\n getElementsByTagName(name: \"plaintext\"): NodeListOf;\r\n getElementsByTagName(name: \"polygon\"): NodeListOf;\r\n getElementsByTagName(name: \"polyline\"): NodeListOf;\r\n getElementsByTagName(name: \"pre\"): NodeListOf;\r\n getElementsByTagName(name: \"progress\"): NodeListOf;\r\n getElementsByTagName(name: \"q\"): NodeListOf;\r\n getElementsByTagName(name: \"radialgradient\"): NodeListOf;\r\n getElementsByTagName(name: \"rect\"): NodeListOf;\r\n getElementsByTagName(name: \"rt\"): NodeListOf;\r\n getElementsByTagName(name: \"ruby\"): NodeListOf;\r\n getElementsByTagName(name: \"s\"): NodeListOf;\r\n getElementsByTagName(name: \"samp\"): NodeListOf;\r\n getElementsByTagName(name: \"script\"): NodeListOf;\r\n getElementsByTagName(name: \"section\"): NodeListOf;\r\n getElementsByTagName(name: \"select\"): NodeListOf;\r\n getElementsByTagName(name: \"small\"): NodeListOf;\r\n getElementsByTagName(name: \"source\"): NodeListOf;\r\n getElementsByTagName(name: \"span\"): NodeListOf;\r\n getElementsByTagName(name: \"stop\"): NodeListOf;\r\n getElementsByTagName(name: \"strike\"): NodeListOf;\r\n getElementsByTagName(name: \"strong\"): NodeListOf;\r\n getElementsByTagName(name: \"style\"): NodeListOf;\r\n getElementsByTagName(name: \"sub\"): NodeListOf;\r\n getElementsByTagName(name: \"sup\"): NodeListOf;\r\n getElementsByTagName(name: \"svg\"): NodeListOf;\r\n getElementsByTagName(name: \"switch\"): NodeListOf;\r\n getElementsByTagName(name: \"symbol\"): NodeListOf;\r\n getElementsByTagName(name: \"table\"): NodeListOf;\r\n getElementsByTagName(name: \"tbody\"): NodeListOf;\r\n getElementsByTagName(name: \"td\"): NodeListOf;\r\n getElementsByTagName(name: \"template\"): NodeListOf;\r\n getElementsByTagName(name: \"text\"): NodeListOf;\r\n getElementsByTagName(name: \"textpath\"): NodeListOf;\r\n getElementsByTagName(name: \"textarea\"): NodeListOf;\r\n getElementsByTagName(name: \"tfoot\"): NodeListOf;\r\n getElementsByTagName(name: \"th\"): NodeListOf;\r\n getElementsByTagName(name: \"thead\"): NodeListOf;\r\n getElementsByTagName(name: \"title\"): NodeListOf;\r\n getElementsByTagName(name: \"tr\"): NodeListOf;\r\n getElementsByTagName(name: \"track\"): NodeListOf;\r\n getElementsByTagName(name: \"tspan\"): NodeListOf;\r\n getElementsByTagName(name: \"tt\"): NodeListOf;\r\n getElementsByTagName(name: \"u\"): NodeListOf;\r\n getElementsByTagName(name: \"ul\"): NodeListOf;\r\n getElementsByTagName(name: \"use\"): NodeListOf;\r\n getElementsByTagName(name: \"var\"): NodeListOf;\r\n getElementsByTagName(name: \"video\"): NodeListOf;\r\n getElementsByTagName(name: \"view\"): NodeListOf;\r\n getElementsByTagName(name: \"wbr\"): NodeListOf;\r\n getElementsByTagName(name: \"x-ms-webview\"): NodeListOf;\r\n getElementsByTagName(name: \"xmp\"): NodeListOf;\r\n getElementsByTagName(name: string): NodeListOf;\r\n getElementsByTagNameNS(namespaceURI: \"http://www.w3.org/1999/xhtml\", localName: string): HTMLCollectionOf;\r\n getElementsByTagNameNS(namespaceURI: \"http://www.w3.org/2000/svg\", localName: string): HTMLCollectionOf;\r\n getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf;\r\n hasAttribute(name: string): boolean;\r\n hasAttributeNS(namespaceURI: string, localName: string): boolean;\r\n msGetRegionContent(): MSRangeCollection;\r\n msGetUntransformedBounds(): ClientRect;\r\n msMatchesSelector(selectors: string): boolean;\r\n msReleasePointerCapture(pointerId: number): void;\r\n msSetPointerCapture(pointerId: number): void;\r\n msZoomTo(args: MsZoomToOptions): void;\r\n releasePointerCapture(pointerId: number): void;\r\n removeAttribute(name?: string): void;\r\n removeAttributeNS(namespaceURI: string, localName: string): void;\r\n removeAttributeNode(oldAttr: Attr): Attr;\r\n requestFullscreen(): void;\r\n requestPointerLock(): void;\r\n setAttribute(name: string, value: string): void;\r\n setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;\r\n setAttributeNode(newAttr: Attr): Attr;\r\n setAttributeNodeNS(newAttr: Attr): Attr;\r\n setPointerCapture(pointerId: number): void;\r\n webkitMatchesSelector(selectors: string): boolean;\r\n webkitRequestFullScreen(): void;\r\n webkitRequestFullscreen(): void;\r\n getElementsByClassName(classNames: string): NodeListOf;\r\n matches(selector: string): boolean;\r\n closest(selector: string): Element | null;\r\n scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;\r\n scroll(options?: ScrollToOptions): void;\r\n scroll(x: number, y: number): void;\r\n scrollTo(options?: ScrollToOptions): void;\r\n scrollTo(x: number, y: number): void;\r\n scrollBy(options?: ScrollToOptions): void;\r\n scrollBy(x: number, y: number): void;\r\n insertAdjacentElement(position: string, insertedElement: Element): Element | null;\r\n insertAdjacentHTML(where: string, html: string): void;\r\n insertAdjacentText(where: string, text: string): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Element: {\r\n prototype: Element;\r\n new(): Element;\r\n}\r\n\r\ninterface ErrorEvent extends Event {\r\n readonly colno: number;\r\n readonly error: any;\r\n readonly filename: string;\r\n readonly lineno: number;\r\n readonly message: string;\r\n initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;\r\n}\r\n\r\ndeclare var ErrorEvent: {\r\n prototype: ErrorEvent;\r\n new(): ErrorEvent;\r\n}\r\n\r\ninterface Event {\r\n readonly bubbles: boolean;\r\n cancelBubble: boolean;\r\n readonly cancelable: boolean;\r\n readonly currentTarget: EventTarget;\r\n readonly defaultPrevented: boolean;\r\n readonly eventPhase: number;\r\n readonly isTrusted: boolean;\r\n returnValue: boolean;\r\n readonly srcElement: Element | null;\r\n readonly target: EventTarget;\r\n readonly timeStamp: number;\r\n readonly type: string;\r\n initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;\r\n preventDefault(): void;\r\n stopImmediatePropagation(): void;\r\n stopPropagation(): void;\r\n readonly AT_TARGET: number;\r\n readonly BUBBLING_PHASE: number;\r\n readonly CAPTURING_PHASE: number;\r\n}\r\n\r\ndeclare var Event: {\r\n prototype: Event;\r\n new(type: string, eventInitDict?: EventInit): Event;\r\n readonly AT_TARGET: number;\r\n readonly BUBBLING_PHASE: number;\r\n readonly CAPTURING_PHASE: number;\r\n}\r\n\r\ninterface EventTarget {\r\n addEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n dispatchEvent(evt: Event): boolean;\r\n removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var EventTarget: {\r\n prototype: EventTarget;\r\n new(): EventTarget;\r\n}\r\n\r\ninterface External {\r\n}\r\n\r\ndeclare var External: {\r\n prototype: External;\r\n new(): External;\r\n}\r\n\r\ninterface File extends Blob {\r\n readonly lastModifiedDate: any;\r\n readonly name: string;\r\n readonly webkitRelativePath: string;\r\n}\r\n\r\ndeclare var File: {\r\n prototype: File;\r\n new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;\r\n}\r\n\r\ninterface FileList {\r\n readonly length: number;\r\n item(index: number): File;\r\n [index: number]: File;\r\n}\r\n\r\ndeclare var FileList: {\r\n prototype: FileList;\r\n new(): FileList;\r\n}\r\n\r\ninterface FileReader extends EventTarget, MSBaseReader {\r\n readonly error: DOMError;\r\n readAsArrayBuffer(blob: Blob): void;\r\n readAsBinaryString(blob: Blob): void;\r\n readAsDataURL(blob: Blob): void;\r\n readAsText(blob: Blob, encoding?: string): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var FileReader: {\r\n prototype: FileReader;\r\n new(): FileReader;\r\n}\r\n\r\ninterface FocusEvent extends UIEvent {\r\n readonly relatedTarget: EventTarget;\r\n initFocusEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, relatedTargetArg: EventTarget): void;\r\n}\r\n\r\ndeclare var FocusEvent: {\r\n prototype: FocusEvent;\r\n new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;\r\n}\r\n\r\ninterface FormData {\r\n append(name: any, value: any, blobName?: string): void;\r\n}\r\n\r\ndeclare var FormData: {\r\n prototype: FormData;\r\n new (form?: HTMLFormElement): FormData;\r\n}\r\n\r\ninterface GainNode extends AudioNode {\r\n readonly gain: AudioParam;\r\n}\r\n\r\ndeclare var GainNode: {\r\n prototype: GainNode;\r\n new(): GainNode;\r\n}\r\n\r\ninterface Gamepad {\r\n readonly axes: number[];\r\n readonly buttons: GamepadButton[];\r\n readonly connected: boolean;\r\n readonly id: string;\r\n readonly index: number;\r\n readonly mapping: string;\r\n readonly timestamp: number;\r\n}\r\n\r\ndeclare var Gamepad: {\r\n prototype: Gamepad;\r\n new(): Gamepad;\r\n}\r\n\r\ninterface GamepadButton {\r\n readonly pressed: boolean;\r\n readonly value: number;\r\n}\r\n\r\ndeclare var GamepadButton: {\r\n prototype: GamepadButton;\r\n new(): GamepadButton;\r\n}\r\n\r\ninterface GamepadEvent extends Event {\r\n readonly gamepad: Gamepad;\r\n}\r\n\r\ndeclare var GamepadEvent: {\r\n prototype: GamepadEvent;\r\n new(): GamepadEvent;\r\n}\r\n\r\ninterface Geolocation {\r\n clearWatch(watchId: number): void;\r\n getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void;\r\n watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number;\r\n}\r\n\r\ndeclare var Geolocation: {\r\n prototype: Geolocation;\r\n new(): Geolocation;\r\n}\r\n\r\ninterface HTMLAllCollection extends HTMLCollection {\r\n namedItem(name: string): Element;\r\n}\r\n\r\ndeclare var HTMLAllCollection: {\r\n prototype: HTMLAllCollection;\r\n new(): HTMLAllCollection;\r\n}\r\n\r\ninterface HTMLAnchorElement extends HTMLElement {\r\n Methods: string;\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Sets or retrieves the coordinates of the object.\r\n */\r\n coords: string;\r\n download: string;\r\n /**\r\n * Contains the anchor portion of the URL including the hash sign (#).\r\n */\r\n hash: string;\r\n /**\r\n * Contains the hostname and port values of the URL.\r\n */\r\n host: string;\r\n /**\r\n * Contains the hostname of a URL.\r\n */\r\n hostname: string;\r\n /**\r\n * Sets or retrieves a destination URL or an anchor point.\r\n */\r\n href: string;\r\n /**\r\n * Sets or retrieves the language code of the object.\r\n */\r\n hreflang: string;\r\n readonly mimeType: string;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n name: string;\r\n readonly nameProp: string;\r\n /**\r\n * Contains the pathname of the URL.\r\n */\r\n pathname: string;\r\n /**\r\n * Sets or retrieves the port number associated with a URL.\r\n */\r\n port: string;\r\n /**\r\n * Contains the protocol of the URL.\r\n */\r\n protocol: string;\r\n readonly protocolLong: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rel: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rev: string;\r\n /**\r\n * Sets or retrieves the substring of the href property that follows the question mark.\r\n */\r\n search: string;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n shape: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Retrieves or sets the text of the object as a string. \r\n */\r\n text: string;\r\n type: string;\r\n urn: string;\r\n /** \r\n * Returns a string representation of an object.\r\n */\r\n toString(): string;\r\n}\r\n\r\ndeclare var HTMLAnchorElement: {\r\n prototype: HTMLAnchorElement;\r\n new(): HTMLAnchorElement;\r\n}\r\n\r\ninterface HTMLAppletElement extends HTMLElement {\r\n /**\r\n * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.\r\n */\r\n readonly BaseHref: string;\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Gets or sets the optional alternative HTML script to execute if the object fails to load.\r\n */\r\n altHtml: string;\r\n /**\r\n * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.\r\n */\r\n archive: string;\r\n border: string;\r\n code: string;\r\n /**\r\n * Sets or retrieves the URL of the component.\r\n */\r\n codeBase: string;\r\n /**\r\n * Sets or retrieves the Internet media type for the code associated with the object.\r\n */\r\n codeType: string;\r\n /**\r\n * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned.\r\n */\r\n readonly contentDocument: Document;\r\n /**\r\n * Sets or retrieves the URL that references the data of the object.\r\n */\r\n data: string;\r\n /**\r\n * Sets or retrieves a character string that can be used to implement your own declare functionality for the object.\r\n */\r\n declare: boolean;\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n hspace: number;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n name: string;\r\n object: string | null;\r\n /**\r\n * Sets or retrieves a message to be displayed while an object is loading.\r\n */\r\n standby: string;\r\n /**\r\n * Returns the content type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n vspace: number;\r\n width: number;\r\n}\r\n\r\ndeclare var HTMLAppletElement: {\r\n prototype: HTMLAppletElement;\r\n new(): HTMLAppletElement;\r\n}\r\n\r\ninterface HTMLAreaElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Sets or retrieves the coordinates of the object.\r\n */\r\n coords: string;\r\n download: string;\r\n /**\r\n * Sets or retrieves the subsection of the href property that follows the number sign (#).\r\n */\r\n hash: string;\r\n /**\r\n * Sets or retrieves the hostname and port number of the location or URL.\r\n */\r\n host: string;\r\n /**\r\n * Sets or retrieves the host name part of the location or URL. \r\n */\r\n hostname: string;\r\n /**\r\n * Sets or retrieves a destination URL or an anchor point.\r\n */\r\n href: string;\r\n /**\r\n * Sets or gets whether clicks in this region cause action.\r\n */\r\n noHref: boolean;\r\n /**\r\n * Sets or retrieves the file name or path specified by the object.\r\n */\r\n pathname: string;\r\n /**\r\n * Sets or retrieves the port number associated with a URL.\r\n */\r\n port: string;\r\n /**\r\n * Sets or retrieves the protocol portion of a URL.\r\n */\r\n protocol: string;\r\n rel: string;\r\n /**\r\n * Sets or retrieves the substring of the href property that follows the question mark.\r\n */\r\n search: string;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n shape: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /** \r\n * Returns a string representation of an object.\r\n */\r\n toString(): string;\r\n}\r\n\r\ndeclare var HTMLAreaElement: {\r\n prototype: HTMLAreaElement;\r\n new(): HTMLAreaElement;\r\n}\r\n\r\ninterface HTMLAreasCollection extends HTMLCollection {\r\n /**\r\n * Adds an element to the areas, controlRange, or options collection.\r\n */\r\n add(element: HTMLElement, before?: HTMLElement | number): void;\r\n /**\r\n * Removes an element from the collection.\r\n */\r\n remove(index?: number): void;\r\n}\r\n\r\ndeclare var HTMLAreasCollection: {\r\n prototype: HTMLAreasCollection;\r\n new(): HTMLAreasCollection;\r\n}\r\n\r\ninterface HTMLAudioElement extends HTMLMediaElement {\r\n}\r\n\r\ndeclare var HTMLAudioElement: {\r\n prototype: HTMLAudioElement;\r\n new(): HTMLAudioElement;\r\n}\r\n\r\ninterface HTMLBRElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.\r\n */\r\n clear: string;\r\n}\r\n\r\ndeclare var HTMLBRElement: {\r\n prototype: HTMLBRElement;\r\n new(): HTMLBRElement;\r\n}\r\n\r\ninterface HTMLBaseElement extends HTMLElement {\r\n /**\r\n * Gets or sets the baseline URL on which relative links are based.\r\n */\r\n href: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n}\r\n\r\ndeclare var HTMLBaseElement: {\r\n prototype: HTMLBaseElement;\r\n new(): HTMLBaseElement;\r\n}\r\n\r\ninterface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {\r\n /**\r\n * Sets or retrieves the current typeface family.\r\n */\r\n face: string;\r\n /**\r\n * Sets or retrieves the font size of the object.\r\n */\r\n size: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLBaseFontElement: {\r\n prototype: HTMLBaseFontElement;\r\n new(): HTMLBaseFontElement;\r\n}\r\n\r\ninterface HTMLBodyElement extends HTMLElement {\r\n aLink: any;\r\n background: string;\r\n bgColor: any;\r\n bgProperties: string;\r\n link: any;\r\n noWrap: boolean;\r\n onafterprint: (this: this, ev: Event) => any;\r\n onbeforeprint: (this: this, ev: Event) => any;\r\n onbeforeunload: (this: this, ev: BeforeUnloadEvent) => any;\r\n onblur: (this: this, ev: FocusEvent) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onfocus: (this: this, ev: FocusEvent) => any;\r\n onhashchange: (this: this, ev: HashChangeEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n onmessage: (this: this, ev: MessageEvent) => any;\r\n onoffline: (this: this, ev: Event) => any;\r\n ononline: (this: this, ev: Event) => any;\r\n onorientationchange: (this: this, ev: Event) => any;\r\n onpagehide: (this: this, ev: PageTransitionEvent) => any;\r\n onpageshow: (this: this, ev: PageTransitionEvent) => any;\r\n onpopstate: (this: this, ev: PopStateEvent) => any;\r\n onresize: (this: this, ev: UIEvent) => any;\r\n onstorage: (this: this, ev: StorageEvent) => any;\r\n onunload: (this: this, ev: Event) => any;\r\n text: any;\r\n vLink: any;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"afterprint\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeprint\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeunload\", listener: (this: this, ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"hashchange\", listener: (this: this, ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"offline\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"online\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"orientationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pagehide\", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pageshow\", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"popstate\", listener: (this: this, ev: PopStateEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"storage\", listener: (this: this, ev: StorageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"unload\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLBodyElement: {\r\n prototype: HTMLBodyElement;\r\n new(): HTMLBodyElement;\r\n}\r\n\r\ninterface HTMLButtonElement extends HTMLElement {\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Overrides the action attribute (where the data on a form is sent) on the parent form element.\r\n */\r\n formAction: string;\r\n /**\r\n * Used to override the encoding (formEnctype attribute) specified on the form element.\r\n */\r\n formEnctype: string;\r\n /**\r\n * Overrides the submit method attribute previously specified on a form element.\r\n */\r\n formMethod: string;\r\n /**\r\n * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a \"save draft\"-type submit option.\r\n */\r\n formNoValidate: string;\r\n /**\r\n * Overrides the target attribute on a form element.\r\n */\r\n formTarget: string;\r\n /** \r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n status: any;\r\n /**\r\n * Gets the classification and default behavior of the button.\r\n */\r\n type: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n readonly validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n readonly validity: ValidityState;\r\n /** \r\n * Sets or retrieves the default or selected value of the control.\r\n */\r\n value: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n readonly willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n}\r\n\r\ndeclare var HTMLButtonElement: {\r\n prototype: HTMLButtonElement;\r\n new(): HTMLButtonElement;\r\n}\r\n\r\ninterface HTMLCanvasElement extends HTMLElement {\r\n /**\r\n * Gets or sets the height of a canvas element on a document.\r\n */\r\n height: number;\r\n /**\r\n * Gets or sets the width of a canvas element on a document.\r\n */\r\n width: number;\r\n /**\r\n * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.\r\n * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext(\"2d\"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext(\"experimental-webgl\");\r\n */\r\n getContext(contextId: \"2d\", contextAttributes?: Canvas2DContextAttributes): CanvasRenderingContext2D | null;\r\n getContext(contextId: \"webgl\" | \"experimental-webgl\", contextAttributes?: WebGLContextAttributes): WebGLRenderingContext | null;\r\n getContext(contextId: string, contextAttributes?: {}): CanvasRenderingContext2D | WebGLRenderingContext | null;\r\n /**\r\n * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.\r\n */\r\n msToBlob(): Blob;\r\n /**\r\n * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.\r\n * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.\r\n */\r\n toDataURL(type?: string, ...args: any[]): string;\r\n toBlob(callback: (result: Blob | null) => void, type?: string, ...arguments: any[]): void;\r\n}\r\n\r\ndeclare var HTMLCanvasElement: {\r\n prototype: HTMLCanvasElement;\r\n new(): HTMLCanvasElement;\r\n}\r\n\r\ninterface HTMLCollection {\r\n /**\r\n * Sets or retrieves the number of objects in a collection.\r\n */\r\n readonly length: number;\r\n /**\r\n * Retrieves an object from various collections.\r\n */\r\n item(index: number): Element;\r\n /**\r\n * Retrieves a select object or an object from an options collection.\r\n */\r\n namedItem(name: string): Element;\r\n [index: number]: Element;\r\n}\r\n\r\ndeclare var HTMLCollection: {\r\n prototype: HTMLCollection;\r\n new(): HTMLCollection;\r\n}\r\n\r\ninterface HTMLDListElement extends HTMLElement {\r\n compact: boolean;\r\n}\r\n\r\ndeclare var HTMLDListElement: {\r\n prototype: HTMLDListElement;\r\n new(): HTMLDListElement;\r\n}\r\n\r\ninterface HTMLDataListElement extends HTMLElement {\r\n options: HTMLCollectionOf;\r\n}\r\n\r\ndeclare var HTMLDataListElement: {\r\n prototype: HTMLDataListElement;\r\n new(): HTMLDataListElement;\r\n}\r\n\r\ninterface HTMLDirectoryElement extends HTMLElement {\r\n compact: boolean;\r\n}\r\n\r\ndeclare var HTMLDirectoryElement: {\r\n prototype: HTMLDirectoryElement;\r\n new(): HTMLDirectoryElement;\r\n}\r\n\r\ninterface HTMLDivElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text. \r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n}\r\n\r\ndeclare var HTMLDivElement: {\r\n prototype: HTMLDivElement;\r\n new(): HTMLDivElement;\r\n}\r\n\r\ninterface HTMLDocument extends Document {\r\n}\r\n\r\ndeclare var HTMLDocument: {\r\n prototype: HTMLDocument;\r\n new(): HTMLDocument;\r\n}\r\n\r\ninterface HTMLElement extends Element {\r\n accessKey: string;\r\n readonly children: HTMLCollection;\r\n contentEditable: string;\r\n readonly dataset: DOMStringMap;\r\n dir: string;\r\n draggable: boolean;\r\n hidden: boolean;\r\n hideFocus: boolean;\r\n innerHTML: string;\r\n innerText: string;\r\n readonly isContentEditable: boolean;\r\n lang: string;\r\n readonly offsetHeight: number;\r\n readonly offsetLeft: number;\r\n readonly offsetParent: Element;\r\n readonly offsetTop: number;\r\n readonly offsetWidth: number;\r\n onabort: (this: this, ev: UIEvent) => any;\r\n onactivate: (this: this, ev: UIEvent) => any;\r\n onbeforeactivate: (this: this, ev: UIEvent) => any;\r\n onbeforecopy: (this: this, ev: ClipboardEvent) => any;\r\n onbeforecut: (this: this, ev: ClipboardEvent) => any;\r\n onbeforedeactivate: (this: this, ev: UIEvent) => any;\r\n onbeforepaste: (this: this, ev: ClipboardEvent) => any;\r\n onblur: (this: this, ev: FocusEvent) => any;\r\n oncanplay: (this: this, ev: Event) => any;\r\n oncanplaythrough: (this: this, ev: Event) => any;\r\n onchange: (this: this, ev: Event) => any;\r\n onclick: (this: this, ev: MouseEvent) => any;\r\n oncontextmenu: (this: this, ev: PointerEvent) => any;\r\n oncopy: (this: this, ev: ClipboardEvent) => any;\r\n oncuechange: (this: this, ev: Event) => any;\r\n oncut: (this: this, ev: ClipboardEvent) => any;\r\n ondblclick: (this: this, ev: MouseEvent) => any;\r\n ondeactivate: (this: this, ev: UIEvent) => any;\r\n ondrag: (this: this, ev: DragEvent) => any;\r\n ondragend: (this: this, ev: DragEvent) => any;\r\n ondragenter: (this: this, ev: DragEvent) => any;\r\n ondragleave: (this: this, ev: DragEvent) => any;\r\n ondragover: (this: this, ev: DragEvent) => any;\r\n ondragstart: (this: this, ev: DragEvent) => any;\r\n ondrop: (this: this, ev: DragEvent) => any;\r\n ondurationchange: (this: this, ev: Event) => any;\r\n onemptied: (this: this, ev: Event) => any;\r\n onended: (this: this, ev: MediaStreamErrorEvent) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onfocus: (this: this, ev: FocusEvent) => any;\r\n oninput: (this: this, ev: Event) => any;\r\n oninvalid: (this: this, ev: Event) => any;\r\n onkeydown: (this: this, ev: KeyboardEvent) => any;\r\n onkeypress: (this: this, ev: KeyboardEvent) => any;\r\n onkeyup: (this: this, ev: KeyboardEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n onloadeddata: (this: this, ev: Event) => any;\r\n onloadedmetadata: (this: this, ev: Event) => any;\r\n onloadstart: (this: this, ev: Event) => any;\r\n onmousedown: (this: this, ev: MouseEvent) => any;\r\n onmouseenter: (this: this, ev: MouseEvent) => any;\r\n onmouseleave: (this: this, ev: MouseEvent) => any;\r\n onmousemove: (this: this, ev: MouseEvent) => any;\r\n onmouseout: (this: this, ev: MouseEvent) => any;\r\n onmouseover: (this: this, ev: MouseEvent) => any;\r\n onmouseup: (this: this, ev: MouseEvent) => any;\r\n onmousewheel: (this: this, ev: WheelEvent) => any;\r\n onmscontentzoom: (this: this, ev: UIEvent) => any;\r\n onmsmanipulationstatechanged: (this: this, ev: MSManipulationEvent) => any;\r\n onpaste: (this: this, ev: ClipboardEvent) => any;\r\n onpause: (this: this, ev: Event) => any;\r\n onplay: (this: this, ev: Event) => any;\r\n onplaying: (this: this, ev: Event) => any;\r\n onprogress: (this: this, ev: ProgressEvent) => any;\r\n onratechange: (this: this, ev: Event) => any;\r\n onreset: (this: this, ev: Event) => any;\r\n onscroll: (this: this, ev: UIEvent) => any;\r\n onseeked: (this: this, ev: Event) => any;\r\n onseeking: (this: this, ev: Event) => any;\r\n onselect: (this: this, ev: UIEvent) => any;\r\n onselectstart: (this: this, ev: Event) => any;\r\n onstalled: (this: this, ev: Event) => any;\r\n onsubmit: (this: this, ev: Event) => any;\r\n onsuspend: (this: this, ev: Event) => any;\r\n ontimeupdate: (this: this, ev: Event) => any;\r\n onvolumechange: (this: this, ev: Event) => any;\r\n onwaiting: (this: this, ev: Event) => any;\r\n outerHTML: string;\r\n outerText: string;\r\n spellcheck: boolean;\r\n readonly style: CSSStyleDeclaration;\r\n tabIndex: number;\r\n title: string;\r\n blur(): void;\r\n click(): void;\r\n dragDrop(): boolean;\r\n focus(): void;\r\n msGetInputContext(): MSInputMethodContext;\r\n setActive(): void;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLElement: {\r\n prototype: HTMLElement;\r\n new(): HTMLElement;\r\n}\r\n\r\ninterface HTMLEmbedElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n hidden: any;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.\r\n */\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n readonly msPlayToSource: any;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Retrieves the palette used for the embedded document.\r\n */\r\n readonly palette: string;\r\n /**\r\n * Retrieves the URL of the plug-in used to view an embedded document.\r\n */\r\n readonly pluginspage: string;\r\n readonly readyState: string;\r\n /**\r\n * Sets or retrieves a URL to be loaded by the object.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the height and width units of the embed object.\r\n */\r\n units: string;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLEmbedElement: {\r\n prototype: HTMLEmbedElement;\r\n new(): HTMLEmbedElement;\r\n}\r\n\r\ninterface HTMLFieldSetElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n readonly validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n readonly validity: ValidityState;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n readonly willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n}\r\n\r\ndeclare var HTMLFieldSetElement: {\r\n prototype: HTMLFieldSetElement;\r\n new(): HTMLFieldSetElement;\r\n}\r\n\r\ninterface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {\r\n /**\r\n * Sets or retrieves the current typeface family.\r\n */\r\n face: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLFontElement: {\r\n prototype: HTMLFontElement;\r\n new(): HTMLFontElement;\r\n}\r\n\r\ninterface HTMLFormElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.\r\n */\r\n acceptCharset: string;\r\n /**\r\n * Sets or retrieves the URL to which the form content is sent for processing.\r\n */\r\n action: string;\r\n /**\r\n * Specifies whether autocomplete is applied to an editable text field.\r\n */\r\n autocomplete: string;\r\n /**\r\n * Retrieves a collection, in source order, of all controls in a given form.\r\n */\r\n readonly elements: HTMLCollection;\r\n /**\r\n * Sets or retrieves the MIME encoding for the form.\r\n */\r\n encoding: string;\r\n /**\r\n * Sets or retrieves the encoding type for the form.\r\n */\r\n enctype: string;\r\n /**\r\n * Sets or retrieves the number of objects in a collection.\r\n */\r\n readonly length: number;\r\n /**\r\n * Sets or retrieves how to send the form data to the server.\r\n */\r\n method: string;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Designates a form that is not validated when submitted.\r\n */\r\n noValidate: boolean;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Retrieves a form object or an object from an elements collection.\r\n * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.\r\n * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.\r\n */\r\n item(name?: any, index?: any): any;\r\n /**\r\n * Retrieves a form object or an object from an elements collection.\r\n */\r\n namedItem(name: string): any;\r\n /**\r\n * Fires when the user resets a form.\r\n */\r\n reset(): void;\r\n /**\r\n * Fires when a FORM is about to be submitted.\r\n */\r\n submit(): void;\r\n [name: string]: any;\r\n}\r\n\r\ndeclare var HTMLFormElement: {\r\n prototype: HTMLFormElement;\r\n new(): HTMLFormElement;\r\n}\r\n\r\ninterface HTMLFrameElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Specifies the properties of a border drawn around an object.\r\n */\r\n border: string;\r\n /**\r\n * Sets or retrieves the border color of the object.\r\n */\r\n borderColor: any;\r\n /**\r\n * Retrieves the document object of the page or frame.\r\n */\r\n readonly contentDocument: Document;\r\n /**\r\n * Retrieves the object of the specified.\r\n */\r\n readonly contentWindow: Window;\r\n /**\r\n * Sets or retrieves whether to display a border for the frame.\r\n */\r\n frameBorder: string;\r\n /**\r\n * Sets or retrieves the amount of additional space between the frames.\r\n */\r\n frameSpacing: any;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string | number;\r\n /**\r\n * Sets or retrieves a URI to a long description of the object.\r\n */\r\n longDesc: string;\r\n /**\r\n * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.\r\n */\r\n marginHeight: string;\r\n /**\r\n * Sets or retrieves the left and right margin widths before displaying the text in a frame.\r\n */\r\n marginWidth: string;\r\n /**\r\n * Sets or retrieves the frame name.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves whether the user can resize the frame.\r\n */\r\n noResize: boolean;\r\n /**\r\n * Raised when the object has been completely received from the server.\r\n */\r\n onload: (this: this, ev: Event) => any;\r\n /**\r\n * Sets or retrieves whether the frame can be scrolled.\r\n */\r\n scrolling: string;\r\n /**\r\n * Sets or retrieves a URL to be loaded by the object.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string | number;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLFrameElement: {\r\n prototype: HTMLFrameElement;\r\n new(): HTMLFrameElement;\r\n}\r\n\r\ninterface HTMLFrameSetElement extends HTMLElement {\r\n border: string;\r\n /**\r\n * Sets or retrieves the border color of the object.\r\n */\r\n borderColor: any;\r\n /**\r\n * Sets or retrieves the frame widths of the object.\r\n */\r\n cols: string;\r\n /**\r\n * Sets or retrieves whether to display a border for the frame.\r\n */\r\n frameBorder: string;\r\n /**\r\n * Sets or retrieves the amount of additional space between the frames.\r\n */\r\n frameSpacing: any;\r\n name: string;\r\n onafterprint: (this: this, ev: Event) => any;\r\n onbeforeprint: (this: this, ev: Event) => any;\r\n onbeforeunload: (this: this, ev: BeforeUnloadEvent) => any;\r\n /**\r\n * Fires when the object loses the input focus.\r\n */\r\n onblur: (this: this, ev: FocusEvent) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n /**\r\n * Fires when the object receives focus.\r\n */\r\n onfocus: (this: this, ev: FocusEvent) => any;\r\n onhashchange: (this: this, ev: HashChangeEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n onmessage: (this: this, ev: MessageEvent) => any;\r\n onoffline: (this: this, ev: Event) => any;\r\n ononline: (this: this, ev: Event) => any;\r\n onorientationchange: (this: this, ev: Event) => any;\r\n onpagehide: (this: this, ev: PageTransitionEvent) => any;\r\n onpageshow: (this: this, ev: PageTransitionEvent) => any;\r\n onresize: (this: this, ev: UIEvent) => any;\r\n onstorage: (this: this, ev: StorageEvent) => any;\r\n onunload: (this: this, ev: Event) => any;\r\n /**\r\n * Sets or retrieves the frame heights of the object.\r\n */\r\n rows: string;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeprint\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeunload\", listener: (this: this, ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"hashchange\", listener: (this: this, ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"offline\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"online\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"orientationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pagehide\", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pageshow\", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"storage\", listener: (this: this, ev: StorageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"unload\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLFrameSetElement: {\r\n prototype: HTMLFrameSetElement;\r\n new(): HTMLFrameSetElement;\r\n}\r\n\r\ninterface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves whether the horizontal rule is drawn with 3-D shading.\r\n */\r\n noShade: boolean;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLHRElement: {\r\n prototype: HTMLHRElement;\r\n new(): HTMLHRElement;\r\n}\r\n\r\ninterface HTMLHeadElement extends HTMLElement {\r\n profile: string;\r\n}\r\n\r\ndeclare var HTMLHeadElement: {\r\n prototype: HTMLHeadElement;\r\n new(): HTMLHeadElement;\r\n}\r\n\r\ninterface HTMLHeadingElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a value that indicates the table alignment.\r\n */\r\n align: string;\r\n}\r\n\r\ndeclare var HTMLHeadingElement: {\r\n prototype: HTMLHeadingElement;\r\n new(): HTMLHeadingElement;\r\n}\r\n\r\ninterface HTMLHtmlElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the DTD version that governs the current document.\r\n */\r\n version: string;\r\n}\r\n\r\ndeclare var HTMLHtmlElement: {\r\n prototype: HTMLHtmlElement;\r\n new(): HTMLHtmlElement;\r\n}\r\n\r\ninterface HTMLIFrameElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n allowFullscreen: boolean;\r\n /**\r\n * Specifies the properties of a border drawn around an object.\r\n */\r\n border: string;\r\n /**\r\n * Retrieves the document object of the page or frame.\r\n */\r\n readonly contentDocument: Document;\r\n /**\r\n * Retrieves the object of the specified.\r\n */\r\n readonly contentWindow: Window;\r\n /**\r\n * Sets or retrieves whether to display a border for the frame.\r\n */\r\n frameBorder: string;\r\n /**\r\n * Sets or retrieves the amount of additional space between the frames.\r\n */\r\n frameSpacing: any;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n /**\r\n * Sets or retrieves the horizontal margin for the object.\r\n */\r\n hspace: number;\r\n /**\r\n * Sets or retrieves a URI to a long description of the object.\r\n */\r\n longDesc: string;\r\n /**\r\n * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.\r\n */\r\n marginHeight: string;\r\n /**\r\n * Sets or retrieves the left and right margin widths before displaying the text in a frame.\r\n */\r\n marginWidth: string;\r\n /**\r\n * Sets or retrieves the frame name.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves whether the user can resize the frame.\r\n */\r\n noResize: boolean;\r\n /**\r\n * Raised when the object has been completely received from the server.\r\n */\r\n onload: (this: this, ev: Event) => any;\r\n readonly sandbox: DOMSettableTokenList;\r\n /**\r\n * Sets or retrieves whether the frame can be scrolled.\r\n */\r\n scrolling: string;\r\n /**\r\n * Sets or retrieves a URL to be loaded by the object.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the vertical margin for the object.\r\n */\r\n vspace: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLIFrameElement: {\r\n prototype: HTMLIFrameElement;\r\n new(): HTMLIFrameElement;\r\n}\r\n\r\ninterface HTMLImageElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Specifies the properties of a border drawn around an object.\r\n */\r\n border: string;\r\n /**\r\n * Retrieves whether the object is fully loaded.\r\n */\r\n readonly complete: boolean;\r\n crossOrigin: string;\r\n readonly currentSrc: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: number;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n hspace: number;\r\n /**\r\n * Sets or retrieves whether the image is a server-side image map.\r\n */\r\n isMap: boolean;\r\n /**\r\n * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.\r\n */\r\n longDesc: string;\r\n lowsrc: string;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n readonly msPlayToSource: any;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * The original height of the image resource before sizing.\r\n */\r\n readonly naturalHeight: number;\r\n /**\r\n * The original width of the image resource before sizing.\r\n */\r\n readonly naturalWidth: number;\r\n sizes: string;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n srcset: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * Sets or retrieves the vertical margin for the object.\r\n */\r\n vspace: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: number;\r\n readonly x: number;\r\n readonly y: number;\r\n msGetAsCastingSource(): any;\r\n}\r\n\r\ndeclare var HTMLImageElement: {\r\n prototype: HTMLImageElement;\r\n new(): HTMLImageElement;\r\n create(): HTMLImageElement;\r\n}\r\n\r\ninterface HTMLInputElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a comma-separated list of content types.\r\n */\r\n accept: string;\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Specifies whether autocomplete is applied to an editable text field.\r\n */\r\n autocomplete: string;\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n border: string;\r\n /**\r\n * Sets or retrieves the state of the check box or radio button.\r\n */\r\n checked: boolean;\r\n /**\r\n * Retrieves whether the object is fully loaded.\r\n */\r\n readonly complete: boolean;\r\n /**\r\n * Sets or retrieves the state of the check box or radio button.\r\n */\r\n defaultChecked: boolean;\r\n /**\r\n * Sets or retrieves the initial contents of the object.\r\n */\r\n defaultValue: string;\r\n disabled: boolean;\r\n /**\r\n * Returns a FileList object on a file type input object.\r\n */\r\n readonly files: FileList | null;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in. \r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Overrides the action attribute (where the data on a form is sent) on the parent form element.\r\n */\r\n formAction: string;\r\n /**\r\n * Used to override the encoding (formEnctype attribute) specified on the form element.\r\n */\r\n formEnctype: string;\r\n /**\r\n * Overrides the submit method attribute previously specified on a form element.\r\n */\r\n formMethod: string;\r\n /**\r\n * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a \"save draft\"-type submit option.\r\n */\r\n formNoValidate: string;\r\n /**\r\n * Overrides the target attribute on a form element.\r\n */\r\n formTarget: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n hspace: number;\r\n indeterminate: boolean;\r\n /**\r\n * Specifies the ID of a pre-defined datalist of options for an input element.\r\n */\r\n readonly list: HTMLElement;\r\n /**\r\n * Defines the maximum acceptable value for an input element with type=\"number\".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.\r\n */\r\n max: string;\r\n /**\r\n * Sets or retrieves the maximum number of characters that the user can enter in a text control.\r\n */\r\n maxLength: number;\r\n /**\r\n * Defines the minimum acceptable value for an input element with type=\"number\". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.\r\n */\r\n min: string;\r\n /**\r\n * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.\r\n */\r\n multiple: boolean;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Gets or sets a string containing a regular expression that the user's input must match.\r\n */\r\n pattern: string;\r\n /**\r\n * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.\r\n */\r\n placeholder: string;\r\n readOnly: boolean;\r\n /**\r\n * When present, marks an element that can't be submitted without a value.\r\n */\r\n required: boolean;\r\n selectionDirection: string;\r\n /**\r\n * Gets or sets the end position or offset of a text selection.\r\n */\r\n selectionEnd: number;\r\n /**\r\n * Gets or sets the starting position or offset of a text selection.\r\n */\r\n selectionStart: number;\r\n size: number;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n status: boolean;\r\n /**\r\n * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.\r\n */\r\n step: string;\r\n /**\r\n * Returns the content type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n readonly validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n readonly validity: ValidityState;\r\n /**\r\n * Returns the value of the data at the cursor's current position.\r\n */\r\n value: string;\r\n valueAsDate: Date;\r\n /**\r\n * Returns the input field value as a number.\r\n */\r\n valueAsNumber: number;\r\n /**\r\n * Sets or retrieves the vertical margin for the object.\r\n */\r\n vspace: number;\r\n webkitdirectory: boolean;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n readonly willValidate: boolean;\r\n minLength: number;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Makes the selection equal to the current object.\r\n */\r\n select(): void;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n /**\r\n * Sets the start and end positions of a selection in a text field.\r\n * @param start The offset into the text field for the start of the selection.\r\n * @param end The offset into the text field for the end of the selection.\r\n */\r\n setSelectionRange(start?: number, end?: number, direction?: string): void;\r\n /**\r\n * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.\r\n * @param n Value to decrement the value by.\r\n */\r\n stepDown(n?: number): void;\r\n /**\r\n * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.\r\n * @param n Value to increment the value by.\r\n */\r\n stepUp(n?: number): void;\r\n}\r\n\r\ndeclare var HTMLInputElement: {\r\n prototype: HTMLInputElement;\r\n new(): HTMLInputElement;\r\n}\r\n\r\ninterface HTMLLIElement extends HTMLElement {\r\n type: string;\r\n /**\r\n * Sets or retrieves the value of a list item.\r\n */\r\n value: number;\r\n}\r\n\r\ndeclare var HTMLLIElement: {\r\n prototype: HTMLLIElement;\r\n new(): HTMLLIElement;\r\n}\r\n\r\ninterface HTMLLabelElement extends HTMLElement {\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the object to which the given label object is assigned.\r\n */\r\n htmlFor: string;\r\n}\r\n\r\ndeclare var HTMLLabelElement: {\r\n prototype: HTMLLabelElement;\r\n new(): HTMLLabelElement;\r\n}\r\n\r\ninterface HTMLLegendElement extends HTMLElement {\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n align: string;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n}\r\n\r\ndeclare var HTMLLegendElement: {\r\n prototype: HTMLLegendElement;\r\n new(): HTMLLegendElement;\r\n}\r\n\r\ninterface HTMLLinkElement extends HTMLElement, LinkStyle {\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n disabled: boolean;\r\n /**\r\n * Sets or retrieves a destination URL or an anchor point.\r\n */\r\n href: string;\r\n /**\r\n * Sets or retrieves the language code of the object.\r\n */\r\n hreflang: string;\r\n /**\r\n * Sets or retrieves the media type.\r\n */\r\n media: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rel: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rev: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Sets or retrieves the MIME type of the object.\r\n */\r\n type: string;\r\n import?: Document;\r\n integrity: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLLinkElement: {\r\n prototype: HTMLLinkElement;\r\n new(): HTMLLinkElement;\r\n}\r\n\r\ninterface HTMLMapElement extends HTMLElement {\r\n /**\r\n * Retrieves a collection of the area objects defined for the given map object.\r\n */\r\n readonly areas: HTMLAreasCollection;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n}\r\n\r\ndeclare var HTMLMapElement: {\r\n prototype: HTMLMapElement;\r\n new(): HTMLMapElement;\r\n}\r\n\r\ninterface HTMLMarqueeElement extends HTMLElement {\r\n behavior: string;\r\n bgColor: any;\r\n direction: string;\r\n height: string;\r\n hspace: number;\r\n loop: number;\r\n onbounce: (this: this, ev: Event) => any;\r\n onfinish: (this: this, ev: Event) => any;\r\n onstart: (this: this, ev: Event) => any;\r\n scrollAmount: number;\r\n scrollDelay: number;\r\n trueSpeed: boolean;\r\n vspace: number;\r\n width: string;\r\n start(): void;\r\n stop(): void;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"bounce\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"finish\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"start\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLMarqueeElement: {\r\n prototype: HTMLMarqueeElement;\r\n new(): HTMLMarqueeElement;\r\n}\r\n\r\ninterface HTMLMediaElement extends HTMLElement {\r\n /**\r\n * Returns an AudioTrackList object with the audio tracks for a given video element.\r\n */\r\n readonly audioTracks: AudioTrackList;\r\n /**\r\n * Gets or sets a value that indicates whether to start playing the media automatically.\r\n */\r\n autoplay: boolean;\r\n /**\r\n * Gets a collection of buffered time ranges.\r\n */\r\n readonly buffered: TimeRanges;\r\n /**\r\n * Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).\r\n */\r\n controls: boolean;\r\n crossOrigin: string;\r\n /**\r\n * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.\r\n */\r\n readonly currentSrc: string;\r\n /**\r\n * Gets or sets the current playback position, in seconds.\r\n */\r\n currentTime: number;\r\n defaultMuted: boolean;\r\n /**\r\n * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.\r\n */\r\n defaultPlaybackRate: number;\r\n /**\r\n * Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.\r\n */\r\n readonly duration: number;\r\n /**\r\n * Gets information about whether the playback has ended or not.\r\n */\r\n readonly ended: boolean;\r\n /**\r\n * Returns an object representing the current error state of the audio or video element.\r\n */\r\n readonly error: MediaError;\r\n /**\r\n * Gets or sets a flag to specify whether playback should restart after it completes.\r\n */\r\n loop: boolean;\r\n readonly mediaKeys: MediaKeys | null;\r\n /**\r\n * Specifies the purpose of the audio or video media, such as background audio or alerts.\r\n */\r\n msAudioCategory: string;\r\n /**\r\n * Specifies the output device id that the audio will be sent to.\r\n */\r\n msAudioDeviceType: string;\r\n readonly msGraphicsTrustStatus: MSGraphicsTrust;\r\n /**\r\n * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element.\r\n */\r\n readonly msKeys: MSMediaKeys;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.\r\n */\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n readonly msPlayToSource: any;\r\n /**\r\n * Specifies whether or not to enable low-latency playback on the media element.\r\n */\r\n msRealTime: boolean;\r\n /**\r\n * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.\r\n */\r\n muted: boolean;\r\n /**\r\n * Gets the current network activity for the element.\r\n */\r\n readonly networkState: number;\r\n onencrypted: (this: this, ev: MediaEncryptedEvent) => any;\r\n onmsneedkey: (this: this, ev: MSMediaKeyNeededEvent) => any;\r\n /**\r\n * Gets a flag that specifies whether playback is paused.\r\n */\r\n readonly paused: boolean;\r\n /**\r\n * Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.\r\n */\r\n playbackRate: number;\r\n /**\r\n * Gets TimeRanges for the current media resource that has been played.\r\n */\r\n readonly played: TimeRanges;\r\n /**\r\n * Gets or sets the current playback position, in seconds.\r\n */\r\n preload: string;\r\n readyState: number;\r\n /**\r\n * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.\r\n */\r\n readonly seekable: TimeRanges;\r\n /**\r\n * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource.\r\n */\r\n readonly seeking: boolean;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n srcObject: MediaStream | null;\r\n readonly textTracks: TextTrackList;\r\n readonly videoTracks: VideoTrackList;\r\n /**\r\n * Gets or sets the volume level for audio portions of the media element.\r\n */\r\n volume: number;\r\n addTextTrack(kind: string, label?: string, language?: string): TextTrack;\r\n /**\r\n * Returns a string that specifies whether the client can play a given media resource type.\r\n */\r\n canPlayType(type: string): string;\r\n /**\r\n * Resets the audio or video object and loads a new media resource.\r\n */\r\n load(): void;\r\n /**\r\n * Clears all effects from the media pipeline.\r\n */\r\n msClearEffects(): void;\r\n msGetAsCastingSource(): any;\r\n /**\r\n * Inserts the specified audio effect into media pipeline.\r\n */\r\n msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;\r\n msSetMediaKeys(mediaKeys: MSMediaKeys): void;\r\n /**\r\n * Specifies the media protection manager for a given media pipeline.\r\n */\r\n msSetMediaProtectionManager(mediaProtectionManager?: any): void;\r\n /**\r\n * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.\r\n */\r\n pause(): void;\r\n /**\r\n * Loads and starts playback of a media resource.\r\n */\r\n play(): void;\r\n setMediaKeys(mediaKeys: MediaKeys | null): PromiseLike;\r\n readonly HAVE_CURRENT_DATA: number;\r\n readonly HAVE_ENOUGH_DATA: number;\r\n readonly HAVE_FUTURE_DATA: number;\r\n readonly HAVE_METADATA: number;\r\n readonly HAVE_NOTHING: number;\r\n readonly NETWORK_EMPTY: number;\r\n readonly NETWORK_IDLE: number;\r\n readonly NETWORK_LOADING: number;\r\n readonly NETWORK_NO_SOURCE: number;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"encrypted\", listener: (this: this, ev: MediaEncryptedEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"msneedkey\", listener: (this: this, ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLMediaElement: {\r\n prototype: HTMLMediaElement;\r\n new(): HTMLMediaElement;\r\n readonly HAVE_CURRENT_DATA: number;\r\n readonly HAVE_ENOUGH_DATA: number;\r\n readonly HAVE_FUTURE_DATA: number;\r\n readonly HAVE_METADATA: number;\r\n readonly HAVE_NOTHING: number;\r\n readonly NETWORK_EMPTY: number;\r\n readonly NETWORK_IDLE: number;\r\n readonly NETWORK_LOADING: number;\r\n readonly NETWORK_NO_SOURCE: number;\r\n}\r\n\r\ninterface HTMLMenuElement extends HTMLElement {\r\n compact: boolean;\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLMenuElement: {\r\n prototype: HTMLMenuElement;\r\n new(): HTMLMenuElement;\r\n}\r\n\r\ninterface HTMLMetaElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Gets or sets meta-information to associate with httpEquiv or name.\r\n */\r\n content: string;\r\n /**\r\n * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.\r\n */\r\n httpEquiv: string;\r\n /**\r\n * Sets or retrieves the value specified in the content attribute of the meta object.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.\r\n */\r\n scheme: string;\r\n /**\r\n * Sets or retrieves the URL property that will be loaded after the specified time has elapsed. \r\n */\r\n url: string;\r\n}\r\n\r\ndeclare var HTMLMetaElement: {\r\n prototype: HTMLMetaElement;\r\n new(): HTMLMetaElement;\r\n}\r\n\r\ninterface HTMLMeterElement extends HTMLElement {\r\n high: number;\r\n low: number;\r\n max: number;\r\n min: number;\r\n optimum: number;\r\n value: number;\r\n}\r\n\r\ndeclare var HTMLMeterElement: {\r\n prototype: HTMLMeterElement;\r\n new(): HTMLMeterElement;\r\n}\r\n\r\ninterface HTMLModElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n /**\r\n * Sets or retrieves the date and time of a modification to the object.\r\n */\r\n dateTime: string;\r\n}\r\n\r\ndeclare var HTMLModElement: {\r\n prototype: HTMLModElement;\r\n new(): HTMLModElement;\r\n}\r\n\r\ninterface HTMLOListElement extends HTMLElement {\r\n compact: boolean;\r\n /**\r\n * The starting number.\r\n */\r\n start: number;\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLOListElement: {\r\n prototype: HTMLOListElement;\r\n new(): HTMLOListElement;\r\n}\r\n\r\ninterface HTMLObjectElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.\r\n */\r\n readonly BaseHref: string;\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Gets or sets the optional alternative HTML script to execute if the object fails to load.\r\n */\r\n altHtml: string;\r\n /**\r\n * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.\r\n */\r\n archive: string;\r\n border: string;\r\n /**\r\n * Sets or retrieves the URL of the file containing the compiled Java class.\r\n */\r\n code: string;\r\n /**\r\n * Sets or retrieves the URL of the component.\r\n */\r\n codeBase: string;\r\n /**\r\n * Sets or retrieves the Internet media type for the code associated with the object.\r\n */\r\n codeType: string;\r\n /**\r\n * Retrieves the document object of the page or frame.\r\n */\r\n readonly contentDocument: Document;\r\n /**\r\n * Sets or retrieves the URL that references the data of the object.\r\n */\r\n data: string;\r\n declare: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n hspace: number;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.\r\n */\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n readonly msPlayToSource: any;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Retrieves the contained object.\r\n */\r\n readonly object: any;\r\n readonly readyState: number;\r\n /**\r\n * Sets or retrieves a message to be displayed while an object is loading.\r\n */\r\n standby: string;\r\n /**\r\n * Sets or retrieves the MIME type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n readonly validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n readonly validity: ValidityState;\r\n vspace: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n readonly willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLObjectElement: {\r\n prototype: HTMLObjectElement;\r\n new(): HTMLObjectElement;\r\n}\r\n\r\ninterface HTMLOptGroupElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the status of an option.\r\n */\r\n defaultSelected: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the ordinal position of an option in a list box.\r\n */\r\n readonly index: number;\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own label functionality for the object.\r\n */\r\n label: string;\r\n /**\r\n * Sets or retrieves whether the option in the list box is the default item.\r\n */\r\n selected: boolean;\r\n /**\r\n * Sets or retrieves the text string specified by the option tag.\r\n */\r\n readonly text: string;\r\n /**\r\n * Sets or retrieves the value which is returned to the server when the form control is submitted.\r\n */\r\n value: string;\r\n}\r\n\r\ndeclare var HTMLOptGroupElement: {\r\n prototype: HTMLOptGroupElement;\r\n new(): HTMLOptGroupElement;\r\n}\r\n\r\ninterface HTMLOptionElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the status of an option.\r\n */\r\n defaultSelected: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the ordinal position of an option in a list box.\r\n */\r\n readonly index: number;\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own label functionality for the object.\r\n */\r\n label: string;\r\n /**\r\n * Sets or retrieves whether the option in the list box is the default item.\r\n */\r\n selected: boolean;\r\n /**\r\n * Sets or retrieves the text string specified by the option tag.\r\n */\r\n text: string;\r\n /**\r\n * Sets or retrieves the value which is returned to the server when the form control is submitted.\r\n */\r\n value: string;\r\n}\r\n\r\ndeclare var HTMLOptionElement: {\r\n prototype: HTMLOptionElement;\r\n new(): HTMLOptionElement;\r\n create(): HTMLOptionElement;\r\n}\r\n\r\ninterface HTMLOptionsCollection extends HTMLCollectionOf {\r\n length: number;\r\n selectedIndex: number;\r\n add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number): void;\r\n remove(index: number): void;\r\n}\r\n\r\ndeclare var HTMLOptionsCollection: {\r\n prototype: HTMLOptionsCollection;\r\n new(): HTMLOptionsCollection;\r\n}\r\n\r\ninterface HTMLParagraphElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text. \r\n */\r\n align: string;\r\n clear: string;\r\n}\r\n\r\ndeclare var HTMLParagraphElement: {\r\n prototype: HTMLParagraphElement;\r\n new(): HTMLParagraphElement;\r\n}\r\n\r\ninterface HTMLParamElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the name of an input parameter for an element.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves the content type of the resource designated by the value attribute.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the value of an input parameter for an element.\r\n */\r\n value: string;\r\n /**\r\n * Sets or retrieves the data type of the value attribute.\r\n */\r\n valueType: string;\r\n}\r\n\r\ndeclare var HTMLParamElement: {\r\n prototype: HTMLParamElement;\r\n new(): HTMLParamElement;\r\n}\r\n\r\ninterface HTMLPictureElement extends HTMLElement {\r\n}\r\n\r\ndeclare var HTMLPictureElement: {\r\n prototype: HTMLPictureElement;\r\n new(): HTMLPictureElement;\r\n}\r\n\r\ninterface HTMLPreElement extends HTMLElement {\r\n /**\r\n * Sets or gets a value that you can use to implement your own width functionality for the object.\r\n */\r\n width: number;\r\n}\r\n\r\ndeclare var HTMLPreElement: {\r\n prototype: HTMLPreElement;\r\n new(): HTMLPreElement;\r\n}\r\n\r\ninterface HTMLProgressElement extends HTMLElement {\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Defines the maximum, or \"done\" value for a progress element.\r\n */\r\n max: number;\r\n /**\r\n * Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).\r\n */\r\n readonly position: number;\r\n /**\r\n * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.\r\n */\r\n value: number;\r\n}\r\n\r\ndeclare var HTMLProgressElement: {\r\n prototype: HTMLProgressElement;\r\n new(): HTMLProgressElement;\r\n}\r\n\r\ninterface HTMLQuoteElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n}\r\n\r\ndeclare var HTMLQuoteElement: {\r\n prototype: HTMLQuoteElement;\r\n new(): HTMLQuoteElement;\r\n}\r\n\r\ninterface HTMLScriptElement extends HTMLElement {\r\n async: boolean;\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Sets or retrieves the status of the script.\r\n */\r\n defer: boolean;\r\n /**\r\n * Sets or retrieves the event for which the script is written. \r\n */\r\n event: string;\r\n /** \r\n * Sets or retrieves the object that is bound to the event script.\r\n */\r\n htmlFor: string;\r\n /**\r\n * Retrieves the URL to an external file that contains the source code or data.\r\n */\r\n src: string;\r\n /**\r\n * Retrieves or sets the text of the object as a string. \r\n */\r\n text: string;\r\n /**\r\n * Sets or retrieves the MIME type for the associated scripting engine.\r\n */\r\n type: string;\r\n integrity: string;\r\n}\r\n\r\ndeclare var HTMLScriptElement: {\r\n prototype: HTMLScriptElement;\r\n new(): HTMLScriptElement;\r\n}\r\n\r\ninterface HTMLSelectElement extends HTMLElement {\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in. \r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the number of objects in a collection.\r\n */\r\n length: number;\r\n /**\r\n * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.\r\n */\r\n multiple: boolean;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n readonly options: HTMLOptionsCollection;\r\n /**\r\n * When present, marks an element that can't be submitted without a value.\r\n */\r\n required: boolean;\r\n /**\r\n * Sets or retrieves the index of the selected option in a select object.\r\n */\r\n selectedIndex: number;\r\n selectedOptions: HTMLCollectionOf;\r\n /**\r\n * Sets or retrieves the number of rows in the list box. \r\n */\r\n size: number;\r\n /**\r\n * Retrieves the type of select control based on the value of the MULTIPLE attribute.\r\n */\r\n readonly type: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n readonly validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n readonly validity: ValidityState;\r\n /**\r\n * Sets or retrieves the value which is returned to the server when the form control is submitted.\r\n */\r\n value: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n readonly willValidate: boolean;\r\n /**\r\n * Adds an element to the areas, controlRange, or options collection.\r\n * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.\r\n * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection. \r\n */\r\n add(element: HTMLElement, before?: HTMLElement | number): void;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Retrieves a select object or an object from an options collection.\r\n * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.\r\n * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.\r\n */\r\n item(name?: any, index?: any): any;\r\n /**\r\n * Retrieves a select object or an object from an options collection.\r\n * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.\r\n */\r\n namedItem(name: string): any;\r\n /**\r\n * Removes an element from the collection.\r\n * @param index Number that specifies the zero-based index of the element to remove from the collection.\r\n */\r\n remove(index?: number): void;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n [name: string]: any;\r\n}\r\n\r\ndeclare var HTMLSelectElement: {\r\n prototype: HTMLSelectElement;\r\n new(): HTMLSelectElement;\r\n}\r\n\r\ninterface HTMLSourceElement extends HTMLElement {\r\n /**\r\n * Gets or sets the intended media type of the media source.\r\n */\r\n media: string;\r\n msKeySystem: string;\r\n sizes: string;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n srcset: string;\r\n /**\r\n * Gets or sets the MIME type of a media resource.\r\n */\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLSourceElement: {\r\n prototype: HTMLSourceElement;\r\n new(): HTMLSourceElement;\r\n}\r\n\r\ninterface HTMLSpanElement extends HTMLElement {\r\n}\r\n\r\ndeclare var HTMLSpanElement: {\r\n prototype: HTMLSpanElement;\r\n new(): HTMLSpanElement;\r\n}\r\n\r\ninterface HTMLStyleElement extends HTMLElement, LinkStyle {\r\n disabled: boolean;\r\n /**\r\n * Sets or retrieves the media type.\r\n */\r\n media: string;\r\n /**\r\n * Retrieves the CSS language in which the style sheet is written.\r\n */\r\n type: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLStyleElement: {\r\n prototype: HTMLStyleElement;\r\n new(): HTMLStyleElement;\r\n}\r\n\r\ninterface HTMLTableCaptionElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the alignment of the caption or legend.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves whether the caption appears at the top or bottom of the table.\r\n */\r\n vAlign: string;\r\n}\r\n\r\ndeclare var HTMLTableCaptionElement: {\r\n prototype: HTMLTableCaptionElement;\r\n new(): HTMLTableCaptionElement;\r\n}\r\n\r\ninterface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves abbreviated text for the object.\r\n */\r\n abbr: string;\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves a comma-delimited list of conceptual categories associated with the object.\r\n */\r\n axis: string;\r\n bgColor: any;\r\n /**\r\n * Retrieves the position of the object in the cells collection of a row.\r\n */\r\n readonly cellIndex: number;\r\n /**\r\n * Sets or retrieves the number columns in the table that the object should span.\r\n */\r\n colSpan: number;\r\n /**\r\n * Sets or retrieves a list of header cells that provide information for the object.\r\n */\r\n headers: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n /**\r\n * Sets or retrieves how many rows in a table the cell should span.\r\n */\r\n rowSpan: number;\r\n /**\r\n * Sets or retrieves the group of cells in a table to which the object's information applies.\r\n */\r\n scope: string;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableCellElement: {\r\n prototype: HTMLTableCellElement;\r\n new(): HTMLTableCellElement;\r\n}\r\n\r\ninterface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves the alignment of the object relative to the display or table.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves the number of columns in the group.\r\n */\r\n span: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: any;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableColElement: {\r\n prototype: HTMLTableColElement;\r\n new(): HTMLTableColElement;\r\n}\r\n\r\ninterface HTMLTableDataCellElement extends HTMLTableCellElement {\r\n}\r\n\r\ndeclare var HTMLTableDataCellElement: {\r\n prototype: HTMLTableDataCellElement;\r\n new(): HTMLTableDataCellElement;\r\n}\r\n\r\ninterface HTMLTableElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a value that indicates the table alignment.\r\n */\r\n align: string;\r\n bgColor: any;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n border: string;\r\n /**\r\n * Sets or retrieves the border color of the object. \r\n */\r\n borderColor: any;\r\n /**\r\n * Retrieves the caption object of a table.\r\n */\r\n caption: HTMLTableCaptionElement;\r\n /**\r\n * Sets or retrieves the amount of space between the border of the cell and the content of the cell.\r\n */\r\n cellPadding: string;\r\n /**\r\n * Sets or retrieves the amount of space between cells in a table.\r\n */\r\n cellSpacing: string;\r\n /**\r\n * Sets or retrieves the number of columns in the table.\r\n */\r\n cols: number;\r\n /**\r\n * Sets or retrieves the way the border frame around the table is displayed.\r\n */\r\n frame: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Sets or retrieves the number of horizontal rows contained in the object.\r\n */\r\n rows: HTMLCollectionOf;\r\n /**\r\n * Sets or retrieves which dividing lines (inner borders) are displayed.\r\n */\r\n rules: string;\r\n /**\r\n * Sets or retrieves a description and/or structure of the object.\r\n */\r\n summary: string;\r\n /**\r\n * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.\r\n */\r\n tBodies: HTMLCollectionOf;\r\n /**\r\n * Retrieves the tFoot object of the table.\r\n */\r\n tFoot: HTMLTableSectionElement;\r\n /**\r\n * Retrieves the tHead object of the table.\r\n */\r\n tHead: HTMLTableSectionElement;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Creates an empty caption element in the table.\r\n */\r\n createCaption(): HTMLTableCaptionElement;\r\n /**\r\n * Creates an empty tBody element in the table.\r\n */\r\n createTBody(): HTMLTableSectionElement;\r\n /**\r\n * Creates an empty tFoot element in the table.\r\n */\r\n createTFoot(): HTMLTableSectionElement;\r\n /**\r\n * Returns the tHead element object if successful, or null otherwise.\r\n */\r\n createTHead(): HTMLTableSectionElement;\r\n /**\r\n * Deletes the caption element and its contents from the table.\r\n */\r\n deleteCaption(): void;\r\n /**\r\n * Removes the specified row (tr) from the element and from the rows collection.\r\n * @param index Number that specifies the zero-based position in the rows collection of the row to remove.\r\n */\r\n deleteRow(index?: number): void;\r\n /**\r\n * Deletes the tFoot element and its contents from the table.\r\n */\r\n deleteTFoot(): void;\r\n /**\r\n * Deletes the tHead element and its contents from the table.\r\n */\r\n deleteTHead(): void;\r\n /**\r\n * Creates a new row (tr) in the table, and adds the row to the rows collection.\r\n * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.\r\n */\r\n insertRow(index?: number): HTMLTableRowElement;\r\n}\r\n\r\ndeclare var HTMLTableElement: {\r\n prototype: HTMLTableElement;\r\n new(): HTMLTableElement;\r\n}\r\n\r\ninterface HTMLTableHeaderCellElement extends HTMLTableCellElement {\r\n /**\r\n * Sets or retrieves the group of cells in a table to which the object's information applies.\r\n */\r\n scope: string;\r\n}\r\n\r\ndeclare var HTMLTableHeaderCellElement: {\r\n prototype: HTMLTableHeaderCellElement;\r\n new(): HTMLTableHeaderCellElement;\r\n}\r\n\r\ninterface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n bgColor: any;\r\n /**\r\n * Retrieves a collection of all cells in the table row.\r\n */\r\n cells: HTMLCollectionOf;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Retrieves the position of the object in the rows collection for the table.\r\n */\r\n readonly rowIndex: number;\r\n /**\r\n * Retrieves the position of the object in the collection.\r\n */\r\n readonly sectionRowIndex: number;\r\n /**\r\n * Removes the specified cell from the table row, as well as from the cells collection.\r\n * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.\r\n */\r\n deleteCell(index?: number): void;\r\n /**\r\n * Creates a new cell in the table row, and adds the cell to the cells collection.\r\n * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.\r\n */\r\n insertCell(index?: number): HTMLTableDataCellElement;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableRowElement: {\r\n prototype: HTMLTableRowElement;\r\n new(): HTMLTableRowElement;\r\n}\r\n\r\ninterface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves a value that indicates the table alignment.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves the number of horizontal rows contained in the object.\r\n */\r\n rows: HTMLCollectionOf;\r\n /**\r\n * Removes the specified row (tr) from the element and from the rows collection.\r\n * @param index Number that specifies the zero-based position in the rows collection of the row to remove.\r\n */\r\n deleteRow(index?: number): void;\r\n /**\r\n * Creates a new row (tr) in the table, and adds the row to the rows collection.\r\n * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.\r\n */\r\n insertRow(index?: number): HTMLTableRowElement;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableSectionElement: {\r\n prototype: HTMLTableSectionElement;\r\n new(): HTMLTableSectionElement;\r\n}\r\n\r\ninterface HTMLTemplateElement extends HTMLElement {\r\n readonly content: DocumentFragment;\r\n}\r\n\r\ndeclare var HTMLTemplateElement: {\r\n prototype: HTMLTemplateElement;\r\n new(): HTMLTemplateElement;\r\n}\r\n\r\ninterface HTMLTextAreaElement extends HTMLElement {\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n cols: number;\r\n /**\r\n * Sets or retrieves the initial contents of the object.\r\n */\r\n defaultValue: string;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the maximum number of characters that the user can enter in a text control.\r\n */\r\n maxLength: number;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.\r\n */\r\n placeholder: string;\r\n /**\r\n * Sets or retrieves the value indicated whether the content of the object is read-only.\r\n */\r\n readOnly: boolean;\r\n /**\r\n * When present, marks an element that can't be submitted without a value.\r\n */\r\n required: boolean;\r\n /**\r\n * Sets or retrieves the number of horizontal rows contained in the object.\r\n */\r\n rows: number;\r\n /**\r\n * Gets or sets the end position or offset of a text selection.\r\n */\r\n selectionEnd: number;\r\n /**\r\n * Gets or sets the starting position or offset of a text selection.\r\n */\r\n selectionStart: number;\r\n /**\r\n * Sets or retrieves the value indicating whether the control is selected.\r\n */\r\n status: any;\r\n /**\r\n * Retrieves the type of control.\r\n */\r\n readonly type: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n readonly validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n readonly validity: ValidityState;\r\n /**\r\n * Retrieves or sets the text in the entry field of the textArea element.\r\n */\r\n value: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n readonly willValidate: boolean;\r\n /**\r\n * Sets or retrieves how to handle wordwrapping in the object.\r\n */\r\n wrap: string;\r\n minLength: number;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Highlights the input area of a form element.\r\n */\r\n select(): void;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n /**\r\n * Sets the start and end positions of a selection in a text field.\r\n * @param start The offset into the text field for the start of the selection.\r\n * @param end The offset into the text field for the end of the selection.\r\n */\r\n setSelectionRange(start: number, end: number): void;\r\n}\r\n\r\ndeclare var HTMLTextAreaElement: {\r\n prototype: HTMLTextAreaElement;\r\n new(): HTMLTextAreaElement;\r\n}\r\n\r\ninterface HTMLTitleElement extends HTMLElement {\r\n /**\r\n * Retrieves or sets the text of the object as a string. \r\n */\r\n text: string;\r\n}\r\n\r\ndeclare var HTMLTitleElement: {\r\n prototype: HTMLTitleElement;\r\n new(): HTMLTitleElement;\r\n}\r\n\r\ninterface HTMLTrackElement extends HTMLElement {\r\n default: boolean;\r\n kind: string;\r\n label: string;\r\n readonly readyState: number;\r\n src: string;\r\n srclang: string;\r\n readonly track: TextTrack;\r\n readonly ERROR: number;\r\n readonly LOADED: number;\r\n readonly LOADING: number;\r\n readonly NONE: number;\r\n}\r\n\r\ndeclare var HTMLTrackElement: {\r\n prototype: HTMLTrackElement;\r\n new(): HTMLTrackElement;\r\n readonly ERROR: number;\r\n readonly LOADED: number;\r\n readonly LOADING: number;\r\n readonly NONE: number;\r\n}\r\n\r\ninterface HTMLUListElement extends HTMLElement {\r\n compact: boolean;\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLUListElement: {\r\n prototype: HTMLUListElement;\r\n new(): HTMLUListElement;\r\n}\r\n\r\ninterface HTMLUnknownElement extends HTMLElement {\r\n}\r\n\r\ndeclare var HTMLUnknownElement: {\r\n prototype: HTMLUnknownElement;\r\n new(): HTMLUnknownElement;\r\n}\r\n\r\ninterface HTMLVideoElement extends HTMLMediaElement {\r\n /**\r\n * Gets or sets the height of the video element.\r\n */\r\n height: number;\r\n msHorizontalMirror: boolean;\r\n readonly msIsLayoutOptimalForPlayback: boolean;\r\n readonly msIsStereo3D: boolean;\r\n msStereo3DPackingMode: string;\r\n msStereo3DRenderMode: string;\r\n msZoom: boolean;\r\n onMSVideoFormatChanged: (this: this, ev: Event) => any;\r\n onMSVideoFrameStepCompleted: (this: this, ev: Event) => any;\r\n onMSVideoOptimalLayoutChanged: (this: this, ev: Event) => any;\r\n /**\r\n * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.\r\n */\r\n poster: string;\r\n /**\r\n * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.\r\n */\r\n readonly videoHeight: number;\r\n /**\r\n * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.\r\n */\r\n readonly videoWidth: number;\r\n readonly webkitDisplayingFullscreen: boolean;\r\n readonly webkitSupportsFullscreen: boolean;\r\n /**\r\n * Gets or sets the width of the video element.\r\n */\r\n width: number;\r\n getVideoPlaybackQuality(): VideoPlaybackQuality;\r\n msFrameStep(forward: boolean): void;\r\n msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;\r\n msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void;\r\n webkitEnterFullScreen(): void;\r\n webkitEnterFullscreen(): void;\r\n webkitExitFullScreen(): void;\r\n webkitExitFullscreen(): void;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSVideoFormatChanged\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSVideoFrameStepCompleted\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSVideoOptimalLayoutChanged\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"encrypted\", listener: (this: this, ev: MediaEncryptedEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"msneedkey\", listener: (this: this, ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLVideoElement: {\r\n prototype: HTMLVideoElement;\r\n new(): HTMLVideoElement;\r\n}\r\n\r\ninterface HashChangeEvent extends Event {\r\n readonly newURL: string | null;\r\n readonly oldURL: string | null;\r\n}\r\n\r\ndeclare var HashChangeEvent: {\r\n prototype: HashChangeEvent;\r\n new(type: string, eventInitDict?: HashChangeEventInit): HashChangeEvent;\r\n}\r\n\r\ninterface History {\r\n readonly length: number;\r\n readonly state: any;\r\n back(distance?: any): void;\r\n forward(distance?: any): void;\r\n go(delta?: any): void;\r\n pushState(statedata: any, title?: string, url?: string): void;\r\n replaceState(statedata: any, title?: string, url?: string): void;\r\n}\r\n\r\ndeclare var History: {\r\n prototype: History;\r\n new(): History;\r\n}\r\n\r\ninterface IDBCursor {\r\n readonly direction: string;\r\n key: IDBKeyRange | IDBValidKey;\r\n readonly primaryKey: any;\r\n source: IDBObjectStore | IDBIndex;\r\n advance(count: number): void;\r\n continue(key?: IDBKeyRange | IDBValidKey): void;\r\n delete(): IDBRequest;\r\n update(value: any): IDBRequest;\r\n readonly NEXT: string;\r\n readonly NEXT_NO_DUPLICATE: string;\r\n readonly PREV: string;\r\n readonly PREV_NO_DUPLICATE: string;\r\n}\r\n\r\ndeclare var IDBCursor: {\r\n prototype: IDBCursor;\r\n new(): IDBCursor;\r\n readonly NEXT: string;\r\n readonly NEXT_NO_DUPLICATE: string;\r\n readonly PREV: string;\r\n readonly PREV_NO_DUPLICATE: string;\r\n}\r\n\r\ninterface IDBCursorWithValue extends IDBCursor {\r\n readonly value: any;\r\n}\r\n\r\ndeclare var IDBCursorWithValue: {\r\n prototype: IDBCursorWithValue;\r\n new(): IDBCursorWithValue;\r\n}\r\n\r\ninterface IDBDatabase extends EventTarget {\r\n readonly name: string;\r\n readonly objectStoreNames: DOMStringList;\r\n onabort: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n version: number;\r\n onversionchange: (ev: IDBVersionChangeEvent) => any;\r\n close(): void;\r\n createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;\r\n deleteObjectStore(name: string): void;\r\n transaction(storeNames: string | string[], mode?: string): IDBTransaction;\r\n addEventListener(type: \"versionchange\", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBDatabase: {\r\n prototype: IDBDatabase;\r\n new(): IDBDatabase;\r\n}\r\n\r\ninterface IDBFactory {\r\n cmp(first: any, second: any): number;\r\n deleteDatabase(name: string): IDBOpenDBRequest;\r\n open(name: string, version?: number): IDBOpenDBRequest;\r\n}\r\n\r\ndeclare var IDBFactory: {\r\n prototype: IDBFactory;\r\n new(): IDBFactory;\r\n}\r\n\r\ninterface IDBIndex {\r\n keyPath: string | string[];\r\n readonly name: string;\r\n readonly objectStore: IDBObjectStore;\r\n readonly unique: boolean;\r\n multiEntry: boolean;\r\n count(key?: IDBKeyRange | IDBValidKey): IDBRequest;\r\n get(key: IDBKeyRange | IDBValidKey): IDBRequest;\r\n getKey(key: IDBKeyRange | IDBValidKey): IDBRequest;\r\n openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;\r\n openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;\r\n}\r\n\r\ndeclare var IDBIndex: {\r\n prototype: IDBIndex;\r\n new(): IDBIndex;\r\n}\r\n\r\ninterface IDBKeyRange {\r\n readonly lower: any;\r\n readonly lowerOpen: boolean;\r\n readonly upper: any;\r\n readonly upperOpen: boolean;\r\n}\r\n\r\ndeclare var IDBKeyRange: {\r\n prototype: IDBKeyRange;\r\n new(): IDBKeyRange;\r\n bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;\r\n lowerBound(lower: any, open?: boolean): IDBKeyRange;\r\n only(value: any): IDBKeyRange;\r\n upperBound(upper: any, open?: boolean): IDBKeyRange;\r\n}\r\n\r\ninterface IDBObjectStore {\r\n readonly indexNames: DOMStringList;\r\n keyPath: string | string[];\r\n readonly name: string;\r\n readonly transaction: IDBTransaction;\r\n autoIncrement: boolean;\r\n add(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;\r\n clear(): IDBRequest;\r\n count(key?: IDBKeyRange | IDBValidKey): IDBRequest;\r\n createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;\r\n delete(key: IDBKeyRange | IDBValidKey): IDBRequest;\r\n deleteIndex(indexName: string): void;\r\n get(key: any): IDBRequest;\r\n index(name: string): IDBIndex;\r\n openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;\r\n put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;\r\n}\r\n\r\ndeclare var IDBObjectStore: {\r\n prototype: IDBObjectStore;\r\n new(): IDBObjectStore;\r\n}\r\n\r\ninterface IDBOpenDBRequest extends IDBRequest {\r\n onblocked: (this: this, ev: Event) => any;\r\n onupgradeneeded: (this: this, ev: IDBVersionChangeEvent) => any;\r\n addEventListener(type: \"blocked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"success\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"upgradeneeded\", listener: (this: this, ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBOpenDBRequest: {\r\n prototype: IDBOpenDBRequest;\r\n new(): IDBOpenDBRequest;\r\n}\r\n\r\ninterface IDBRequest extends EventTarget {\r\n readonly error: DOMError;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onsuccess: (this: this, ev: Event) => any;\r\n readonly readyState: string;\r\n readonly result: any;\r\n source: IDBObjectStore | IDBIndex | IDBCursor;\r\n readonly transaction: IDBTransaction;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"success\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBRequest: {\r\n prototype: IDBRequest;\r\n new(): IDBRequest;\r\n}\r\n\r\ninterface IDBTransaction extends EventTarget {\r\n readonly db: IDBDatabase;\r\n readonly error: DOMError;\r\n readonly mode: string;\r\n onabort: (this: this, ev: Event) => any;\r\n oncomplete: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n abort(): void;\r\n objectStore(name: string): IDBObjectStore;\r\n readonly READ_ONLY: string;\r\n readonly READ_WRITE: string;\r\n readonly VERSION_CHANGE: string;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"complete\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBTransaction: {\r\n prototype: IDBTransaction;\r\n new(): IDBTransaction;\r\n readonly READ_ONLY: string;\r\n readonly READ_WRITE: string;\r\n readonly VERSION_CHANGE: string;\r\n}\r\n\r\ninterface IDBVersionChangeEvent extends Event {\r\n readonly newVersion: number | null;\r\n readonly oldVersion: number;\r\n}\r\n\r\ndeclare var IDBVersionChangeEvent: {\r\n prototype: IDBVersionChangeEvent;\r\n new(): IDBVersionChangeEvent;\r\n}\r\n\r\ninterface ImageData {\r\n data: Uint8ClampedArray;\r\n readonly height: number;\r\n readonly width: number;\r\n}\r\n\r\ndeclare var ImageData: {\r\n prototype: ImageData;\r\n new(width: number, height: number): ImageData;\r\n new(array: Uint8ClampedArray, width: number, height: number): ImageData;\r\n}\r\n\r\ninterface KeyboardEvent extends UIEvent {\r\n readonly altKey: boolean;\r\n readonly char: string | null;\r\n readonly charCode: number;\r\n readonly ctrlKey: boolean;\r\n readonly key: string;\r\n readonly keyCode: number;\r\n readonly locale: string;\r\n readonly location: number;\r\n readonly metaKey: boolean;\r\n readonly repeat: boolean;\r\n readonly shiftKey: boolean;\r\n readonly which: number;\r\n readonly code: string;\r\n getModifierState(keyArg: string): boolean;\r\n initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void;\r\n readonly DOM_KEY_LOCATION_JOYSTICK: number;\r\n readonly DOM_KEY_LOCATION_LEFT: number;\r\n readonly DOM_KEY_LOCATION_MOBILE: number;\r\n readonly DOM_KEY_LOCATION_NUMPAD: number;\r\n readonly DOM_KEY_LOCATION_RIGHT: number;\r\n readonly DOM_KEY_LOCATION_STANDARD: number;\r\n}\r\n\r\ndeclare var KeyboardEvent: {\r\n prototype: KeyboardEvent;\r\n new(typeArg: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;\r\n readonly DOM_KEY_LOCATION_JOYSTICK: number;\r\n readonly DOM_KEY_LOCATION_LEFT: number;\r\n readonly DOM_KEY_LOCATION_MOBILE: number;\r\n readonly DOM_KEY_LOCATION_NUMPAD: number;\r\n readonly DOM_KEY_LOCATION_RIGHT: number;\r\n readonly DOM_KEY_LOCATION_STANDARD: number;\r\n}\r\n\r\ninterface ListeningStateChangedEvent extends Event {\r\n readonly label: string;\r\n readonly state: string;\r\n}\r\n\r\ndeclare var ListeningStateChangedEvent: {\r\n prototype: ListeningStateChangedEvent;\r\n new(): ListeningStateChangedEvent;\r\n}\r\n\r\ninterface Location {\r\n hash: string;\r\n host: string;\r\n hostname: string;\r\n href: string;\r\n readonly origin: string;\r\n pathname: string;\r\n port: string;\r\n protocol: string;\r\n search: string;\r\n assign(url: string): void;\r\n reload(forcedReload?: boolean): void;\r\n replace(url: string): void;\r\n toString(): string;\r\n}\r\n\r\ndeclare var Location: {\r\n prototype: Location;\r\n new(): Location;\r\n}\r\n\r\ninterface LongRunningScriptDetectedEvent extends Event {\r\n readonly executionTime: number;\r\n stopPageScriptExecution: boolean;\r\n}\r\n\r\ndeclare var LongRunningScriptDetectedEvent: {\r\n prototype: LongRunningScriptDetectedEvent;\r\n new(): LongRunningScriptDetectedEvent;\r\n}\r\n\r\ninterface MSApp {\r\n clearTemporaryWebDataAsync(): MSAppAsyncOperation;\r\n createBlobFromRandomAccessStream(type: string, seeker: any): Blob;\r\n createDataPackage(object: any): any;\r\n createDataPackageFromSelection(): any;\r\n createFileFromStorageFile(storageFile: any): File;\r\n createStreamFromInputStream(type: string, inputStream: any): MSStream;\r\n execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;\r\n execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;\r\n getCurrentPriority(): string;\r\n getHtmlPrintDocumentSourceAsync(htmlDoc: any): PromiseLike;\r\n getViewId(view: any): any;\r\n isTaskScheduledAtPriorityOrHigher(priority: string): boolean;\r\n pageHandlesAllApplicationActivations(enabled: boolean): void;\r\n suppressSubdownloadCredentialPrompts(suppress: boolean): void;\r\n terminateApp(exceptionObject: any): void;\r\n readonly CURRENT: string;\r\n readonly HIGH: string;\r\n readonly IDLE: string;\r\n readonly NORMAL: string;\r\n}\r\ndeclare var MSApp: MSApp;\r\n\r\ninterface MSAppAsyncOperation extends EventTarget {\r\n readonly error: DOMError;\r\n oncomplete: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n readonly readyState: number;\r\n readonly result: any;\r\n start(): void;\r\n readonly COMPLETED: number;\r\n readonly ERROR: number;\r\n readonly STARTED: number;\r\n addEventListener(type: \"complete\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSAppAsyncOperation: {\r\n prototype: MSAppAsyncOperation;\r\n new(): MSAppAsyncOperation;\r\n readonly COMPLETED: number;\r\n readonly ERROR: number;\r\n readonly STARTED: number;\r\n}\r\n\r\ninterface MSAssertion {\r\n readonly id: string;\r\n readonly type: string;\r\n}\r\n\r\ndeclare var MSAssertion: {\r\n prototype: MSAssertion;\r\n new(): MSAssertion;\r\n}\r\n\r\ninterface MSBlobBuilder {\r\n append(data: any, endings?: string): void;\r\n getBlob(contentType?: string): Blob;\r\n}\r\n\r\ndeclare var MSBlobBuilder: {\r\n prototype: MSBlobBuilder;\r\n new(): MSBlobBuilder;\r\n}\r\n\r\ninterface MSCredentials {\r\n getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): PromiseLike;\r\n makeCredential(accountInfo: MSAccountInfo, params: MSCredentialParameters[], challenge?: string): PromiseLike;\r\n}\r\n\r\ndeclare var MSCredentials: {\r\n prototype: MSCredentials;\r\n new(): MSCredentials;\r\n}\r\n\r\ninterface MSFIDOCredentialAssertion extends MSAssertion {\r\n readonly algorithm: string | Algorithm;\r\n readonly attestation: any;\r\n readonly publicKey: string;\r\n readonly transportHints: string[];\r\n}\r\n\r\ndeclare var MSFIDOCredentialAssertion: {\r\n prototype: MSFIDOCredentialAssertion;\r\n new(): MSFIDOCredentialAssertion;\r\n}\r\n\r\ninterface MSFIDOSignature {\r\n readonly authnrData: string;\r\n readonly clientData: string;\r\n readonly signature: string;\r\n}\r\n\r\ndeclare var MSFIDOSignature: {\r\n prototype: MSFIDOSignature;\r\n new(): MSFIDOSignature;\r\n}\r\n\r\ninterface MSFIDOSignatureAssertion extends MSAssertion {\r\n readonly signature: MSFIDOSignature;\r\n}\r\n\r\ndeclare var MSFIDOSignatureAssertion: {\r\n prototype: MSFIDOSignatureAssertion;\r\n new(): MSFIDOSignatureAssertion;\r\n}\r\n\r\ninterface MSGesture {\r\n target: Element;\r\n addPointer(pointerId: number): void;\r\n stop(): void;\r\n}\r\n\r\ndeclare var MSGesture: {\r\n prototype: MSGesture;\r\n new(): MSGesture;\r\n}\r\n\r\ninterface MSGestureEvent extends UIEvent {\r\n readonly clientX: number;\r\n readonly clientY: number;\r\n readonly expansion: number;\r\n readonly gestureObject: any;\r\n readonly hwTimestamp: number;\r\n readonly offsetX: number;\r\n readonly offsetY: number;\r\n readonly rotation: number;\r\n readonly scale: number;\r\n readonly screenX: number;\r\n readonly screenY: number;\r\n readonly translationX: number;\r\n readonly translationY: number;\r\n readonly velocityAngular: number;\r\n readonly velocityExpansion: number;\r\n readonly velocityX: number;\r\n readonly velocityY: number;\r\n initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void;\r\n readonly MSGESTURE_FLAG_BEGIN: number;\r\n readonly MSGESTURE_FLAG_CANCEL: number;\r\n readonly MSGESTURE_FLAG_END: number;\r\n readonly MSGESTURE_FLAG_INERTIA: number;\r\n readonly MSGESTURE_FLAG_NONE: number;\r\n}\r\n\r\ndeclare var MSGestureEvent: {\r\n prototype: MSGestureEvent;\r\n new(): MSGestureEvent;\r\n readonly MSGESTURE_FLAG_BEGIN: number;\r\n readonly MSGESTURE_FLAG_CANCEL: number;\r\n readonly MSGESTURE_FLAG_END: number;\r\n readonly MSGESTURE_FLAG_INERTIA: number;\r\n readonly MSGESTURE_FLAG_NONE: number;\r\n}\r\n\r\ninterface MSGraphicsTrust {\r\n readonly constrictionActive: boolean;\r\n readonly status: string;\r\n}\r\n\r\ndeclare var MSGraphicsTrust: {\r\n prototype: MSGraphicsTrust;\r\n new(): MSGraphicsTrust;\r\n}\r\n\r\ninterface MSHTMLWebViewElement extends HTMLElement {\r\n readonly canGoBack: boolean;\r\n readonly canGoForward: boolean;\r\n readonly containsFullScreenElement: boolean;\r\n readonly documentTitle: string;\r\n height: number;\r\n readonly settings: MSWebViewSettings;\r\n src: string;\r\n width: number;\r\n addWebAllowedObject(name: string, applicationObject: any): void;\r\n buildLocalStreamUri(contentIdentifier: string, relativePath: string): string;\r\n capturePreviewToBlobAsync(): MSWebViewAsyncOperation;\r\n captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation;\r\n getDeferredPermissionRequestById(id: number): DeferredPermissionRequest;\r\n getDeferredPermissionRequests(): DeferredPermissionRequest[];\r\n goBack(): void;\r\n goForward(): void;\r\n invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation;\r\n navigate(uri: string): void;\r\n navigateToLocalStreamUri(source: string, streamResolver: any): void;\r\n navigateToString(contents: string): void;\r\n navigateWithHttpRequestMessage(requestMessage: any): void;\r\n refresh(): void;\r\n stop(): void;\r\n}\r\n\r\ndeclare var MSHTMLWebViewElement: {\r\n prototype: MSHTMLWebViewElement;\r\n new(): MSHTMLWebViewElement;\r\n}\r\n\r\ninterface MSInputMethodContext extends EventTarget {\r\n readonly compositionEndOffset: number;\r\n readonly compositionStartOffset: number;\r\n oncandidatewindowhide: (this: this, ev: Event) => any;\r\n oncandidatewindowshow: (this: this, ev: Event) => any;\r\n oncandidatewindowupdate: (this: this, ev: Event) => any;\r\n readonly target: HTMLElement;\r\n getCandidateWindowClientRect(): ClientRect;\r\n getCompositionAlternatives(): string[];\r\n hasComposition(): boolean;\r\n isCandidateWindowVisible(): boolean;\r\n addEventListener(type: \"MSCandidateWindowHide\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSCandidateWindowShow\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSCandidateWindowUpdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSInputMethodContext: {\r\n prototype: MSInputMethodContext;\r\n new(): MSInputMethodContext;\r\n}\r\n\r\ninterface MSManipulationEvent extends UIEvent {\r\n readonly currentState: number;\r\n readonly inertiaDestinationX: number;\r\n readonly inertiaDestinationY: number;\r\n readonly lastState: number;\r\n initMSManipulationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, lastState: number, currentState: number): void;\r\n readonly MS_MANIPULATION_STATE_ACTIVE: number;\r\n readonly MS_MANIPULATION_STATE_CANCELLED: number;\r\n readonly MS_MANIPULATION_STATE_COMMITTED: number;\r\n readonly MS_MANIPULATION_STATE_DRAGGING: number;\r\n readonly MS_MANIPULATION_STATE_INERTIA: number;\r\n readonly MS_MANIPULATION_STATE_PRESELECT: number;\r\n readonly MS_MANIPULATION_STATE_SELECTING: number;\r\n readonly MS_MANIPULATION_STATE_STOPPED: number;\r\n}\r\n\r\ndeclare var MSManipulationEvent: {\r\n prototype: MSManipulationEvent;\r\n new(): MSManipulationEvent;\r\n readonly MS_MANIPULATION_STATE_ACTIVE: number;\r\n readonly MS_MANIPULATION_STATE_CANCELLED: number;\r\n readonly MS_MANIPULATION_STATE_COMMITTED: number;\r\n readonly MS_MANIPULATION_STATE_DRAGGING: number;\r\n readonly MS_MANIPULATION_STATE_INERTIA: number;\r\n readonly MS_MANIPULATION_STATE_PRESELECT: number;\r\n readonly MS_MANIPULATION_STATE_SELECTING: number;\r\n readonly MS_MANIPULATION_STATE_STOPPED: number;\r\n}\r\n\r\ninterface MSMediaKeyError {\r\n readonly code: number;\r\n readonly systemCode: number;\r\n readonly MS_MEDIA_KEYERR_CLIENT: number;\r\n readonly MS_MEDIA_KEYERR_DOMAIN: number;\r\n readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;\r\n readonly MS_MEDIA_KEYERR_OUTPUT: number;\r\n readonly MS_MEDIA_KEYERR_SERVICE: number;\r\n readonly MS_MEDIA_KEYERR_UNKNOWN: number;\r\n}\r\n\r\ndeclare var MSMediaKeyError: {\r\n prototype: MSMediaKeyError;\r\n new(): MSMediaKeyError;\r\n readonly MS_MEDIA_KEYERR_CLIENT: number;\r\n readonly MS_MEDIA_KEYERR_DOMAIN: number;\r\n readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;\r\n readonly MS_MEDIA_KEYERR_OUTPUT: number;\r\n readonly MS_MEDIA_KEYERR_SERVICE: number;\r\n readonly MS_MEDIA_KEYERR_UNKNOWN: number;\r\n}\r\n\r\ninterface MSMediaKeyMessageEvent extends Event {\r\n readonly destinationURL: string | null;\r\n readonly message: Uint8Array;\r\n}\r\n\r\ndeclare var MSMediaKeyMessageEvent: {\r\n prototype: MSMediaKeyMessageEvent;\r\n new(): MSMediaKeyMessageEvent;\r\n}\r\n\r\ninterface MSMediaKeyNeededEvent extends Event {\r\n readonly initData: Uint8Array | null;\r\n}\r\n\r\ndeclare var MSMediaKeyNeededEvent: {\r\n prototype: MSMediaKeyNeededEvent;\r\n new(): MSMediaKeyNeededEvent;\r\n}\r\n\r\ninterface MSMediaKeySession extends EventTarget {\r\n readonly error: MSMediaKeyError | null;\r\n readonly keySystem: string;\r\n readonly sessionId: string;\r\n close(): void;\r\n update(key: Uint8Array): void;\r\n}\r\n\r\ndeclare var MSMediaKeySession: {\r\n prototype: MSMediaKeySession;\r\n new(): MSMediaKeySession;\r\n}\r\n\r\ninterface MSMediaKeys {\r\n readonly keySystem: string;\r\n createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession;\r\n}\r\n\r\ndeclare var MSMediaKeys: {\r\n prototype: MSMediaKeys;\r\n new(keySystem: string): MSMediaKeys;\r\n isTypeSupported(keySystem: string, type?: string): boolean;\r\n isTypeSupportedWithFeatures(keySystem: string, type?: string): string;\r\n}\r\n\r\ninterface MSPointerEvent extends MouseEvent {\r\n readonly currentPoint: any;\r\n readonly height: number;\r\n readonly hwTimestamp: number;\r\n readonly intermediatePoints: any;\r\n readonly isPrimary: boolean;\r\n readonly pointerId: number;\r\n readonly pointerType: any;\r\n readonly pressure: number;\r\n readonly rotation: number;\r\n readonly tiltX: number;\r\n readonly tiltY: number;\r\n readonly width: number;\r\n getCurrentPoint(element: Element): void;\r\n getIntermediatePoints(element: Element): void;\r\n initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;\r\n}\r\n\r\ndeclare var MSPointerEvent: {\r\n prototype: MSPointerEvent;\r\n new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;\r\n}\r\n\r\ninterface MSRangeCollection {\r\n readonly length: number;\r\n item(index: number): Range;\r\n [index: number]: Range;\r\n}\r\n\r\ndeclare var MSRangeCollection: {\r\n prototype: MSRangeCollection;\r\n new(): MSRangeCollection;\r\n}\r\n\r\ninterface MSSiteModeEvent extends Event {\r\n readonly actionURL: string;\r\n readonly buttonID: number;\r\n}\r\n\r\ndeclare var MSSiteModeEvent: {\r\n prototype: MSSiteModeEvent;\r\n new(): MSSiteModeEvent;\r\n}\r\n\r\ninterface MSStream {\r\n readonly type: string;\r\n msClose(): void;\r\n msDetachStream(): any;\r\n}\r\n\r\ndeclare var MSStream: {\r\n prototype: MSStream;\r\n new(): MSStream;\r\n}\r\n\r\ninterface MSStreamReader extends EventTarget, MSBaseReader {\r\n readonly error: DOMError;\r\n readAsArrayBuffer(stream: MSStream, size?: number): void;\r\n readAsBinaryString(stream: MSStream, size?: number): void;\r\n readAsBlob(stream: MSStream, size?: number): void;\r\n readAsDataURL(stream: MSStream, size?: number): void;\r\n readAsText(stream: MSStream, encoding?: string, size?: number): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSStreamReader: {\r\n prototype: MSStreamReader;\r\n new(): MSStreamReader;\r\n}\r\n\r\ninterface MSWebViewAsyncOperation extends EventTarget {\r\n readonly error: DOMError;\r\n oncomplete: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n readonly readyState: number;\r\n readonly result: any;\r\n readonly target: MSHTMLWebViewElement;\r\n readonly type: number;\r\n start(): void;\r\n readonly COMPLETED: number;\r\n readonly ERROR: number;\r\n readonly STARTED: number;\r\n readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;\r\n readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;\r\n readonly TYPE_INVOKE_SCRIPT: number;\r\n addEventListener(type: \"complete\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSWebViewAsyncOperation: {\r\n prototype: MSWebViewAsyncOperation;\r\n new(): MSWebViewAsyncOperation;\r\n readonly COMPLETED: number;\r\n readonly ERROR: number;\r\n readonly STARTED: number;\r\n readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;\r\n readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;\r\n readonly TYPE_INVOKE_SCRIPT: number;\r\n}\r\n\r\ninterface MSWebViewSettings {\r\n isIndexedDBEnabled: boolean;\r\n isJavaScriptEnabled: boolean;\r\n}\r\n\r\ndeclare var MSWebViewSettings: {\r\n prototype: MSWebViewSettings;\r\n new(): MSWebViewSettings;\r\n}\r\n\r\ninterface MediaDeviceInfo {\r\n readonly deviceId: string;\r\n readonly groupId: string;\r\n readonly kind: string;\r\n readonly label: string;\r\n}\r\n\r\ndeclare var MediaDeviceInfo: {\r\n prototype: MediaDeviceInfo;\r\n new(): MediaDeviceInfo;\r\n}\r\n\r\ninterface MediaDevices extends EventTarget {\r\n ondevicechange: (this: this, ev: Event) => any;\r\n enumerateDevices(): any;\r\n getSupportedConstraints(): MediaTrackSupportedConstraints;\r\n getUserMedia(constraints: MediaStreamConstraints): PromiseLike;\r\n addEventListener(type: \"devicechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MediaDevices: {\r\n prototype: MediaDevices;\r\n new(): MediaDevices;\r\n}\r\n\r\ninterface MediaElementAudioSourceNode extends AudioNode {\r\n}\r\n\r\ndeclare var MediaElementAudioSourceNode: {\r\n prototype: MediaElementAudioSourceNode;\r\n new(): MediaElementAudioSourceNode;\r\n}\r\n\r\ninterface MediaEncryptedEvent extends Event {\r\n readonly initData: ArrayBuffer | null;\r\n readonly initDataType: string;\r\n}\r\n\r\ndeclare var MediaEncryptedEvent: {\r\n prototype: MediaEncryptedEvent;\r\n new(type: string, eventInitDict?: MediaEncryptedEventInit): MediaEncryptedEvent;\r\n}\r\n\r\ninterface MediaError {\r\n readonly code: number;\r\n readonly msExtendedCode: number;\r\n readonly MEDIA_ERR_ABORTED: number;\r\n readonly MEDIA_ERR_DECODE: number;\r\n readonly MEDIA_ERR_NETWORK: number;\r\n readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;\r\n readonly MS_MEDIA_ERR_ENCRYPTED: number;\r\n}\r\n\r\ndeclare var MediaError: {\r\n prototype: MediaError;\r\n new(): MediaError;\r\n readonly MEDIA_ERR_ABORTED: number;\r\n readonly MEDIA_ERR_DECODE: number;\r\n readonly MEDIA_ERR_NETWORK: number;\r\n readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;\r\n readonly MS_MEDIA_ERR_ENCRYPTED: number;\r\n}\r\n\r\ninterface MediaKeyMessageEvent extends Event {\r\n readonly message: ArrayBuffer;\r\n readonly messageType: string;\r\n}\r\n\r\ndeclare var MediaKeyMessageEvent: {\r\n prototype: MediaKeyMessageEvent;\r\n new(type: string, eventInitDict?: MediaKeyMessageEventInit): MediaKeyMessageEvent;\r\n}\r\n\r\ninterface MediaKeySession extends EventTarget {\r\n readonly closed: PromiseLike;\r\n readonly expiration: number;\r\n readonly keyStatuses: MediaKeyStatusMap;\r\n readonly sessionId: string;\r\n close(): PromiseLike;\r\n generateRequest(initDataType: string, initData: any): PromiseLike;\r\n load(sessionId: string): PromiseLike;\r\n remove(): PromiseLike;\r\n update(response: any): PromiseLike;\r\n}\r\n\r\ndeclare var MediaKeySession: {\r\n prototype: MediaKeySession;\r\n new(): MediaKeySession;\r\n}\r\n\r\ninterface MediaKeyStatusMap {\r\n readonly size: number;\r\n forEach(callback: ForEachCallback): void;\r\n get(keyId: any): string;\r\n has(keyId: any): boolean;\r\n}\r\n\r\ndeclare var MediaKeyStatusMap: {\r\n prototype: MediaKeyStatusMap;\r\n new(): MediaKeyStatusMap;\r\n}\r\n\r\ninterface MediaKeySystemAccess {\r\n readonly keySystem: string;\r\n createMediaKeys(): PromiseLike;\r\n getConfiguration(): MediaKeySystemConfiguration;\r\n}\r\n\r\ndeclare var MediaKeySystemAccess: {\r\n prototype: MediaKeySystemAccess;\r\n new(): MediaKeySystemAccess;\r\n}\r\n\r\ninterface MediaKeys {\r\n createSession(sessionType?: string): MediaKeySession;\r\n setServerCertificate(serverCertificate: any): PromiseLike;\r\n}\r\n\r\ndeclare var MediaKeys: {\r\n prototype: MediaKeys;\r\n new(): MediaKeys;\r\n}\r\n\r\ninterface MediaList {\r\n readonly length: number;\r\n mediaText: string;\r\n appendMedium(newMedium: string): void;\r\n deleteMedium(oldMedium: string): void;\r\n item(index: number): string;\r\n toString(): string;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var MediaList: {\r\n prototype: MediaList;\r\n new(): MediaList;\r\n}\r\n\r\ninterface MediaQueryList {\r\n readonly matches: boolean;\r\n readonly media: string;\r\n addListener(listener: MediaQueryListListener): void;\r\n removeListener(listener: MediaQueryListListener): void;\r\n}\r\n\r\ndeclare var MediaQueryList: {\r\n prototype: MediaQueryList;\r\n new(): MediaQueryList;\r\n}\r\n\r\ninterface MediaSource extends EventTarget {\r\n readonly activeSourceBuffers: SourceBufferList;\r\n duration: number;\r\n readonly readyState: string;\r\n readonly sourceBuffers: SourceBufferList;\r\n addSourceBuffer(type: string): SourceBuffer;\r\n endOfStream(error?: number): void;\r\n removeSourceBuffer(sourceBuffer: SourceBuffer): void;\r\n}\r\n\r\ndeclare var MediaSource: {\r\n prototype: MediaSource;\r\n new(): MediaSource;\r\n isTypeSupported(type: string): boolean;\r\n}\r\n\r\ninterface MediaStream extends EventTarget {\r\n readonly active: boolean;\r\n readonly id: string;\r\n onactive: (this: this, ev: Event) => any;\r\n onaddtrack: (this: this, ev: TrackEvent) => any;\r\n oninactive: (this: this, ev: Event) => any;\r\n onremovetrack: (this: this, ev: TrackEvent) => any;\r\n addTrack(track: MediaStreamTrack): void;\r\n clone(): MediaStream;\r\n getAudioTracks(): MediaStreamTrack[];\r\n getTrackById(trackId: string): MediaStreamTrack | null;\r\n getTracks(): MediaStreamTrack[];\r\n getVideoTracks(): MediaStreamTrack[];\r\n removeTrack(track: MediaStreamTrack): void;\r\n stop(): void;\r\n addEventListener(type: \"active\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"addtrack\", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"inactive\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"removetrack\", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MediaStream: {\r\n prototype: MediaStream;\r\n new(streamOrTracks?: MediaStream | MediaStreamTrack[]): MediaStream;\r\n}\r\n\r\ninterface MediaStreamAudioSourceNode extends AudioNode {\r\n}\r\n\r\ndeclare var MediaStreamAudioSourceNode: {\r\n prototype: MediaStreamAudioSourceNode;\r\n new(): MediaStreamAudioSourceNode;\r\n}\r\n\r\ninterface MediaStreamError {\r\n readonly constraintName: string | null;\r\n readonly message: string | null;\r\n readonly name: string;\r\n}\r\n\r\ndeclare var MediaStreamError: {\r\n prototype: MediaStreamError;\r\n new(): MediaStreamError;\r\n}\r\n\r\ninterface MediaStreamErrorEvent extends Event {\r\n readonly error: MediaStreamError | null;\r\n}\r\n\r\ndeclare var MediaStreamErrorEvent: {\r\n prototype: MediaStreamErrorEvent;\r\n new(type: string, eventInitDict?: MediaStreamErrorEventInit): MediaStreamErrorEvent;\r\n}\r\n\r\ninterface MediaStreamTrack extends EventTarget {\r\n enabled: boolean;\r\n readonly id: string;\r\n readonly kind: string;\r\n readonly label: string;\r\n readonly muted: boolean;\r\n onended: (this: this, ev: MediaStreamErrorEvent) => any;\r\n onmute: (this: this, ev: Event) => any;\r\n onoverconstrained: (this: this, ev: MediaStreamErrorEvent) => any;\r\n onunmute: (this: this, ev: Event) => any;\r\n readonly readonly: boolean;\r\n readonly readyState: string;\r\n readonly remote: boolean;\r\n applyConstraints(constraints: MediaTrackConstraints): PromiseLike;\r\n clone(): MediaStreamTrack;\r\n getCapabilities(): MediaTrackCapabilities;\r\n getConstraints(): MediaTrackConstraints;\r\n getSettings(): MediaTrackSettings;\r\n stop(): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mute\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"overconstrained\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"unmute\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MediaStreamTrack: {\r\n prototype: MediaStreamTrack;\r\n new(): MediaStreamTrack;\r\n}\r\n\r\ninterface MediaStreamTrackEvent extends Event {\r\n readonly track: MediaStreamTrack;\r\n}\r\n\r\ndeclare var MediaStreamTrackEvent: {\r\n prototype: MediaStreamTrackEvent;\r\n new(type: string, eventInitDict?: MediaStreamTrackEventInit): MediaStreamTrackEvent;\r\n}\r\n\r\ninterface MessageChannel {\r\n readonly port1: MessagePort;\r\n readonly port2: MessagePort;\r\n}\r\n\r\ndeclare var MessageChannel: {\r\n prototype: MessageChannel;\r\n new(): MessageChannel;\r\n}\r\n\r\ninterface MessageEvent extends Event {\r\n readonly data: any;\r\n readonly origin: string;\r\n readonly ports: any;\r\n readonly source: Window;\r\n initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: Window): void;\r\n}\r\n\r\ndeclare var MessageEvent: {\r\n prototype: MessageEvent;\r\n new(type: string, eventInitDict?: MessageEventInit): MessageEvent;\r\n}\r\n\r\ninterface MessagePort extends EventTarget {\r\n onmessage: (this: this, ev: MessageEvent) => any;\r\n close(): void;\r\n postMessage(message?: any, ports?: any): void;\r\n start(): void;\r\n addEventListener(type: \"message\", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MessagePort: {\r\n prototype: MessagePort;\r\n new(): MessagePort;\r\n}\r\n\r\ninterface MimeType {\r\n readonly description: string;\r\n readonly enabledPlugin: Plugin;\r\n readonly suffixes: string;\r\n readonly type: string;\r\n}\r\n\r\ndeclare var MimeType: {\r\n prototype: MimeType;\r\n new(): MimeType;\r\n}\r\n\r\ninterface MimeTypeArray {\r\n readonly length: number;\r\n item(index: number): Plugin;\r\n namedItem(type: string): Plugin;\r\n [index: number]: Plugin;\r\n}\r\n\r\ndeclare var MimeTypeArray: {\r\n prototype: MimeTypeArray;\r\n new(): MimeTypeArray;\r\n}\r\n\r\ninterface MouseEvent extends UIEvent {\r\n readonly altKey: boolean;\r\n readonly button: number;\r\n readonly buttons: number;\r\n readonly clientX: number;\r\n readonly clientY: number;\r\n readonly ctrlKey: boolean;\r\n readonly fromElement: Element;\r\n readonly layerX: number;\r\n readonly layerY: number;\r\n readonly metaKey: boolean;\r\n readonly movementX: number;\r\n readonly movementY: number;\r\n readonly offsetX: number;\r\n readonly offsetY: number;\r\n readonly pageX: number;\r\n readonly pageY: number;\r\n readonly relatedTarget: EventTarget;\r\n readonly screenX: number;\r\n readonly screenY: number;\r\n readonly shiftKey: boolean;\r\n readonly toElement: Element;\r\n readonly which: number;\r\n readonly x: number;\r\n readonly y: number;\r\n getModifierState(keyArg: string): boolean;\r\n initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget): void;\r\n}\r\n\r\ndeclare var MouseEvent: {\r\n prototype: MouseEvent;\r\n new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;\r\n}\r\n\r\ninterface MutationEvent extends Event {\r\n readonly attrChange: number;\r\n readonly attrName: string;\r\n readonly newValue: string;\r\n readonly prevValue: string;\r\n readonly relatedNode: Node;\r\n initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void;\r\n readonly ADDITION: number;\r\n readonly MODIFICATION: number;\r\n readonly REMOVAL: number;\r\n}\r\n\r\ndeclare var MutationEvent: {\r\n prototype: MutationEvent;\r\n new(): MutationEvent;\r\n readonly ADDITION: number;\r\n readonly MODIFICATION: number;\r\n readonly REMOVAL: number;\r\n}\r\n\r\ninterface MutationObserver {\r\n disconnect(): void;\r\n observe(target: Node, options: MutationObserverInit): void;\r\n takeRecords(): MutationRecord[];\r\n}\r\n\r\ndeclare var MutationObserver: {\r\n prototype: MutationObserver;\r\n new(callback: MutationCallback): MutationObserver;\r\n}\r\n\r\ninterface MutationRecord {\r\n readonly addedNodes: NodeList;\r\n readonly attributeName: string | null;\r\n readonly attributeNamespace: string | null;\r\n readonly nextSibling: Node | null;\r\n readonly oldValue: string | null;\r\n readonly previousSibling: Node | null;\r\n readonly removedNodes: NodeList;\r\n readonly target: Node;\r\n readonly type: string;\r\n}\r\n\r\ndeclare var MutationRecord: {\r\n prototype: MutationRecord;\r\n new(): MutationRecord;\r\n}\r\n\r\ninterface NamedNodeMap {\r\n readonly length: number;\r\n getNamedItem(name: string): Attr;\r\n getNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;\r\n item(index: number): Attr;\r\n removeNamedItem(name: string): Attr;\r\n removeNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;\r\n setNamedItem(arg: Attr): Attr;\r\n setNamedItemNS(arg: Attr): Attr;\r\n [index: number]: Attr;\r\n}\r\n\r\ndeclare var NamedNodeMap: {\r\n prototype: NamedNodeMap;\r\n new(): NamedNodeMap;\r\n}\r\n\r\ninterface NavigationCompletedEvent extends NavigationEvent {\r\n readonly isSuccess: boolean;\r\n readonly webErrorStatus: number;\r\n}\r\n\r\ndeclare var NavigationCompletedEvent: {\r\n prototype: NavigationCompletedEvent;\r\n new(): NavigationCompletedEvent;\r\n}\r\n\r\ninterface NavigationEvent extends Event {\r\n readonly uri: string;\r\n}\r\n\r\ndeclare var NavigationEvent: {\r\n prototype: NavigationEvent;\r\n new(): NavigationEvent;\r\n}\r\n\r\ninterface NavigationEventWithReferrer extends NavigationEvent {\r\n readonly referer: string;\r\n}\r\n\r\ndeclare var NavigationEventWithReferrer: {\r\n prototype: NavigationEventWithReferrer;\r\n new(): NavigationEventWithReferrer;\r\n}\r\n\r\ninterface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorUserMedia {\r\n readonly appCodeName: string;\r\n readonly cookieEnabled: boolean;\r\n readonly language: string;\r\n readonly maxTouchPoints: number;\r\n readonly mimeTypes: MimeTypeArray;\r\n readonly msManipulationViewsEnabled: boolean;\r\n readonly msMaxTouchPoints: number;\r\n readonly msPointerEnabled: boolean;\r\n readonly plugins: PluginArray;\r\n readonly pointerEnabled: boolean;\r\n readonly webdriver: boolean;\r\n getGamepads(): Gamepad[];\r\n javaEnabled(): boolean;\r\n msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;\r\n requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): PromiseLike;\r\n vibrate(pattern: number | number[]): boolean;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Navigator: {\r\n prototype: Navigator;\r\n new(): Navigator;\r\n}\r\n\r\ninterface Node extends EventTarget {\r\n readonly attributes: NamedNodeMap;\r\n readonly baseURI: string | null;\r\n readonly childNodes: NodeList;\r\n readonly firstChild: Node;\r\n readonly lastChild: Node;\r\n readonly localName: string | null;\r\n readonly namespaceURI: string | null;\r\n readonly nextSibling: Node;\r\n readonly nodeName: string;\r\n readonly nodeType: number;\r\n nodeValue: string | null;\r\n readonly ownerDocument: Document;\r\n readonly parentElement: HTMLElement;\r\n readonly parentNode: Node;\r\n readonly previousSibling: Node;\r\n textContent: string | null;\r\n appendChild(newChild: Node): Node;\r\n cloneNode(deep?: boolean): Node;\r\n compareDocumentPosition(other: Node): number;\r\n contains(child: Node): boolean;\r\n hasAttributes(): boolean;\r\n hasChildNodes(): boolean;\r\n insertBefore(newChild: Node, refChild: Node | null): Node;\r\n isDefaultNamespace(namespaceURI: string | null): boolean;\r\n isEqualNode(arg: Node): boolean;\r\n isSameNode(other: Node): boolean;\r\n lookupNamespaceURI(prefix: string | null): string | null;\r\n lookupPrefix(namespaceURI: string | null): string | null;\r\n normalize(): void;\r\n removeChild(oldChild: Node): Node;\r\n replaceChild(newChild: Node, oldChild: Node): Node;\r\n readonly ATTRIBUTE_NODE: number;\r\n readonly CDATA_SECTION_NODE: number;\r\n readonly COMMENT_NODE: number;\r\n readonly DOCUMENT_FRAGMENT_NODE: number;\r\n readonly DOCUMENT_NODE: number;\r\n readonly DOCUMENT_POSITION_CONTAINED_BY: number;\r\n readonly DOCUMENT_POSITION_CONTAINS: number;\r\n readonly DOCUMENT_POSITION_DISCONNECTED: number;\r\n readonly DOCUMENT_POSITION_FOLLOWING: number;\r\n readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;\r\n readonly DOCUMENT_POSITION_PRECEDING: number;\r\n readonly DOCUMENT_TYPE_NODE: number;\r\n readonly ELEMENT_NODE: number;\r\n readonly ENTITY_NODE: number;\r\n readonly ENTITY_REFERENCE_NODE: number;\r\n readonly NOTATION_NODE: number;\r\n readonly PROCESSING_INSTRUCTION_NODE: number;\r\n readonly TEXT_NODE: number;\r\n}\r\n\r\ndeclare var Node: {\r\n prototype: Node;\r\n new(): Node;\r\n readonly ATTRIBUTE_NODE: number;\r\n readonly CDATA_SECTION_NODE: number;\r\n readonly COMMENT_NODE: number;\r\n readonly DOCUMENT_FRAGMENT_NODE: number;\r\n readonly DOCUMENT_NODE: number;\r\n readonly DOCUMENT_POSITION_CONTAINED_BY: number;\r\n readonly DOCUMENT_POSITION_CONTAINS: number;\r\n readonly DOCUMENT_POSITION_DISCONNECTED: number;\r\n readonly DOCUMENT_POSITION_FOLLOWING: number;\r\n readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;\r\n readonly DOCUMENT_POSITION_PRECEDING: number;\r\n readonly DOCUMENT_TYPE_NODE: number;\r\n readonly ELEMENT_NODE: number;\r\n readonly ENTITY_NODE: number;\r\n readonly ENTITY_REFERENCE_NODE: number;\r\n readonly NOTATION_NODE: number;\r\n readonly PROCESSING_INSTRUCTION_NODE: number;\r\n readonly TEXT_NODE: number;\r\n}\r\n\r\ninterface NodeFilter {\r\n acceptNode(n: Node): number;\r\n}\r\n\r\ndeclare var NodeFilter: {\r\n readonly FILTER_ACCEPT: number;\r\n readonly FILTER_REJECT: number;\r\n readonly FILTER_SKIP: number;\r\n readonly SHOW_ALL: number;\r\n readonly SHOW_ATTRIBUTE: number;\r\n readonly SHOW_CDATA_SECTION: number;\r\n readonly SHOW_COMMENT: number;\r\n readonly SHOW_DOCUMENT: number;\r\n readonly SHOW_DOCUMENT_FRAGMENT: number;\r\n readonly SHOW_DOCUMENT_TYPE: number;\r\n readonly SHOW_ELEMENT: number;\r\n readonly SHOW_ENTITY: number;\r\n readonly SHOW_ENTITY_REFERENCE: number;\r\n readonly SHOW_NOTATION: number;\r\n readonly SHOW_PROCESSING_INSTRUCTION: number;\r\n readonly SHOW_TEXT: number;\r\n}\r\n\r\ninterface NodeIterator {\r\n readonly expandEntityReferences: boolean;\r\n readonly filter: NodeFilter;\r\n readonly root: Node;\r\n readonly whatToShow: number;\r\n detach(): void;\r\n nextNode(): Node;\r\n previousNode(): Node;\r\n}\r\n\r\ndeclare var NodeIterator: {\r\n prototype: NodeIterator;\r\n new(): NodeIterator;\r\n}\r\n\r\ninterface NodeList {\r\n readonly length: number;\r\n item(index: number): Node;\r\n [index: number]: Node;\r\n}\r\n\r\ndeclare var NodeList: {\r\n prototype: NodeList;\r\n new(): NodeList;\r\n}\r\n\r\ninterface OES_element_index_uint {\r\n}\r\n\r\ndeclare var OES_element_index_uint: {\r\n prototype: OES_element_index_uint;\r\n new(): OES_element_index_uint;\r\n}\r\n\r\ninterface OES_standard_derivatives {\r\n readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;\r\n}\r\n\r\ndeclare var OES_standard_derivatives: {\r\n prototype: OES_standard_derivatives;\r\n new(): OES_standard_derivatives;\r\n readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;\r\n}\r\n\r\ninterface OES_texture_float {\r\n}\r\n\r\ndeclare var OES_texture_float: {\r\n prototype: OES_texture_float;\r\n new(): OES_texture_float;\r\n}\r\n\r\ninterface OES_texture_float_linear {\r\n}\r\n\r\ndeclare var OES_texture_float_linear: {\r\n prototype: OES_texture_float_linear;\r\n new(): OES_texture_float_linear;\r\n}\r\n\r\ninterface OfflineAudioCompletionEvent extends Event {\r\n readonly renderedBuffer: AudioBuffer;\r\n}\r\n\r\ndeclare var OfflineAudioCompletionEvent: {\r\n prototype: OfflineAudioCompletionEvent;\r\n new(): OfflineAudioCompletionEvent;\r\n}\r\n\r\ninterface OfflineAudioContext extends AudioContext {\r\n oncomplete: (this: this, ev: Event) => any;\r\n startRendering(): PromiseLike;\r\n addEventListener(type: \"complete\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var OfflineAudioContext: {\r\n prototype: OfflineAudioContext;\r\n new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;\r\n}\r\n\r\ninterface OscillatorNode extends AudioNode {\r\n readonly detune: AudioParam;\r\n readonly frequency: AudioParam;\r\n onended: (this: this, ev: MediaStreamErrorEvent) => any;\r\n type: string;\r\n setPeriodicWave(periodicWave: PeriodicWave): void;\r\n start(when?: number): void;\r\n stop(when?: number): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var OscillatorNode: {\r\n prototype: OscillatorNode;\r\n new(): OscillatorNode;\r\n}\r\n\r\ninterface OverflowEvent extends UIEvent {\r\n readonly horizontalOverflow: boolean;\r\n readonly orient: number;\r\n readonly verticalOverflow: boolean;\r\n readonly BOTH: number;\r\n readonly HORIZONTAL: number;\r\n readonly VERTICAL: number;\r\n}\r\n\r\ndeclare var OverflowEvent: {\r\n prototype: OverflowEvent;\r\n new(): OverflowEvent;\r\n readonly BOTH: number;\r\n readonly HORIZONTAL: number;\r\n readonly VERTICAL: number;\r\n}\r\n\r\ninterface PageTransitionEvent extends Event {\r\n readonly persisted: boolean;\r\n}\r\n\r\ndeclare var PageTransitionEvent: {\r\n prototype: PageTransitionEvent;\r\n new(): PageTransitionEvent;\r\n}\r\n\r\ninterface PannerNode extends AudioNode {\r\n coneInnerAngle: number;\r\n coneOuterAngle: number;\r\n coneOuterGain: number;\r\n distanceModel: string;\r\n maxDistance: number;\r\n panningModel: string;\r\n refDistance: number;\r\n rolloffFactor: number;\r\n setOrientation(x: number, y: number, z: number): void;\r\n setPosition(x: number, y: number, z: number): void;\r\n setVelocity(x: number, y: number, z: number): void;\r\n}\r\n\r\ndeclare var PannerNode: {\r\n prototype: PannerNode;\r\n new(): PannerNode;\r\n}\r\n\r\ninterface PerfWidgetExternal {\r\n readonly activeNetworkRequestCount: number;\r\n readonly averageFrameTime: number;\r\n readonly averagePaintTime: number;\r\n readonly extraInformationEnabled: boolean;\r\n readonly independentRenderingEnabled: boolean;\r\n readonly irDisablingContentString: string;\r\n readonly irStatusAvailable: boolean;\r\n readonly maxCpuSpeed: number;\r\n readonly paintRequestsPerSecond: number;\r\n readonly performanceCounter: number;\r\n readonly performanceCounterFrequency: number;\r\n addEventListener(eventType: string, callback: Function): void;\r\n getMemoryUsage(): number;\r\n getProcessCpuUsage(): number;\r\n getRecentCpuUsage(last: number | null): any;\r\n getRecentFrames(last: number | null): any;\r\n getRecentMemoryUsage(last: number | null): any;\r\n getRecentPaintRequests(last: number | null): any;\r\n removeEventListener(eventType: string, callback: Function): void;\r\n repositionWindow(x: number, y: number): void;\r\n resizeWindow(width: number, height: number): void;\r\n}\r\n\r\ndeclare var PerfWidgetExternal: {\r\n prototype: PerfWidgetExternal;\r\n new(): PerfWidgetExternal;\r\n}\r\n\r\ninterface Performance {\r\n readonly navigation: PerformanceNavigation;\r\n readonly timing: PerformanceTiming;\r\n clearMarks(markName?: string): void;\r\n clearMeasures(measureName?: string): void;\r\n clearResourceTimings(): void;\r\n getEntries(): any;\r\n getEntriesByName(name: string, entryType?: string): any;\r\n getEntriesByType(entryType: string): any;\r\n getMarks(markName?: string): any;\r\n getMeasures(measureName?: string): any;\r\n mark(markName: string): void;\r\n measure(measureName: string, startMarkName?: string, endMarkName?: string): void;\r\n now(): number;\r\n setResourceTimingBufferSize(maxSize: number): void;\r\n toJSON(): any;\r\n}\r\n\r\ndeclare var Performance: {\r\n prototype: Performance;\r\n new(): Performance;\r\n}\r\n\r\ninterface PerformanceEntry {\r\n readonly duration: number;\r\n readonly entryType: string;\r\n readonly name: string;\r\n readonly startTime: number;\r\n}\r\n\r\ndeclare var PerformanceEntry: {\r\n prototype: PerformanceEntry;\r\n new(): PerformanceEntry;\r\n}\r\n\r\ninterface PerformanceMark extends PerformanceEntry {\r\n}\r\n\r\ndeclare var PerformanceMark: {\r\n prototype: PerformanceMark;\r\n new(): PerformanceMark;\r\n}\r\n\r\ninterface PerformanceMeasure extends PerformanceEntry {\r\n}\r\n\r\ndeclare var PerformanceMeasure: {\r\n prototype: PerformanceMeasure;\r\n new(): PerformanceMeasure;\r\n}\r\n\r\ninterface PerformanceNavigation {\r\n readonly redirectCount: number;\r\n readonly type: number;\r\n toJSON(): any;\r\n readonly TYPE_BACK_FORWARD: number;\r\n readonly TYPE_NAVIGATE: number;\r\n readonly TYPE_RELOAD: number;\r\n readonly TYPE_RESERVED: number;\r\n}\r\n\r\ndeclare var PerformanceNavigation: {\r\n prototype: PerformanceNavigation;\r\n new(): PerformanceNavigation;\r\n readonly TYPE_BACK_FORWARD: number;\r\n readonly TYPE_NAVIGATE: number;\r\n readonly TYPE_RELOAD: number;\r\n readonly TYPE_RESERVED: number;\r\n}\r\n\r\ninterface PerformanceNavigationTiming extends PerformanceEntry {\r\n readonly connectEnd: number;\r\n readonly connectStart: number;\r\n readonly domComplete: number;\r\n readonly domContentLoadedEventEnd: number;\r\n readonly domContentLoadedEventStart: number;\r\n readonly domInteractive: number;\r\n readonly domLoading: number;\r\n readonly domainLookupEnd: number;\r\n readonly domainLookupStart: number;\r\n readonly fetchStart: number;\r\n readonly loadEventEnd: number;\r\n readonly loadEventStart: number;\r\n readonly navigationStart: number;\r\n readonly redirectCount: number;\r\n readonly redirectEnd: number;\r\n readonly redirectStart: number;\r\n readonly requestStart: number;\r\n readonly responseEnd: number;\r\n readonly responseStart: number;\r\n readonly type: string;\r\n readonly unloadEventEnd: number;\r\n readonly unloadEventStart: number;\r\n}\r\n\r\ndeclare var PerformanceNavigationTiming: {\r\n prototype: PerformanceNavigationTiming;\r\n new(): PerformanceNavigationTiming;\r\n}\r\n\r\ninterface PerformanceResourceTiming extends PerformanceEntry {\r\n readonly connectEnd: number;\r\n readonly connectStart: number;\r\n readonly domainLookupEnd: number;\r\n readonly domainLookupStart: number;\r\n readonly fetchStart: number;\r\n readonly initiatorType: string;\r\n readonly redirectEnd: number;\r\n readonly redirectStart: number;\r\n readonly requestStart: number;\r\n readonly responseEnd: number;\r\n readonly responseStart: number;\r\n}\r\n\r\ndeclare var PerformanceResourceTiming: {\r\n prototype: PerformanceResourceTiming;\r\n new(): PerformanceResourceTiming;\r\n}\r\n\r\ninterface PerformanceTiming {\r\n readonly connectEnd: number;\r\n readonly connectStart: number;\r\n readonly domComplete: number;\r\n readonly domContentLoadedEventEnd: number;\r\n readonly domContentLoadedEventStart: number;\r\n readonly domInteractive: number;\r\n readonly domLoading: number;\r\n readonly domainLookupEnd: number;\r\n readonly domainLookupStart: number;\r\n readonly fetchStart: number;\r\n readonly loadEventEnd: number;\r\n readonly loadEventStart: number;\r\n readonly msFirstPaint: number;\r\n readonly navigationStart: number;\r\n readonly redirectEnd: number;\r\n readonly redirectStart: number;\r\n readonly requestStart: number;\r\n readonly responseEnd: number;\r\n readonly responseStart: number;\r\n readonly unloadEventEnd: number;\r\n readonly unloadEventStart: number;\r\n readonly secureConnectionStart: number;\r\n toJSON(): any;\r\n}\r\n\r\ndeclare var PerformanceTiming: {\r\n prototype: PerformanceTiming;\r\n new(): PerformanceTiming;\r\n}\r\n\r\ninterface PeriodicWave {\r\n}\r\n\r\ndeclare var PeriodicWave: {\r\n prototype: PeriodicWave;\r\n new(): PeriodicWave;\r\n}\r\n\r\ninterface PermissionRequest extends DeferredPermissionRequest {\r\n readonly state: string;\r\n defer(): void;\r\n}\r\n\r\ndeclare var PermissionRequest: {\r\n prototype: PermissionRequest;\r\n new(): PermissionRequest;\r\n}\r\n\r\ninterface PermissionRequestedEvent extends Event {\r\n readonly permissionRequest: PermissionRequest;\r\n}\r\n\r\ndeclare var PermissionRequestedEvent: {\r\n prototype: PermissionRequestedEvent;\r\n new(): PermissionRequestedEvent;\r\n}\r\n\r\ninterface Plugin {\r\n readonly description: string;\r\n readonly filename: string;\r\n readonly length: number;\r\n readonly name: string;\r\n readonly version: string;\r\n item(index: number): MimeType;\r\n namedItem(type: string): MimeType;\r\n [index: number]: MimeType;\r\n}\r\n\r\ndeclare var Plugin: {\r\n prototype: Plugin;\r\n new(): Plugin;\r\n}\r\n\r\ninterface PluginArray {\r\n readonly length: number;\r\n item(index: number): Plugin;\r\n namedItem(name: string): Plugin;\r\n refresh(reload?: boolean): void;\r\n [index: number]: Plugin;\r\n}\r\n\r\ndeclare var PluginArray: {\r\n prototype: PluginArray;\r\n new(): PluginArray;\r\n}\r\n\r\ninterface PointerEvent extends MouseEvent {\r\n readonly currentPoint: any;\r\n readonly height: number;\r\n readonly hwTimestamp: number;\r\n readonly intermediatePoints: any;\r\n readonly isPrimary: boolean;\r\n readonly pointerId: number;\r\n readonly pointerType: any;\r\n readonly pressure: number;\r\n readonly rotation: number;\r\n readonly tiltX: number;\r\n readonly tiltY: number;\r\n readonly width: number;\r\n getCurrentPoint(element: Element): void;\r\n getIntermediatePoints(element: Element): void;\r\n initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;\r\n}\r\n\r\ndeclare var PointerEvent: {\r\n prototype: PointerEvent;\r\n new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;\r\n}\r\n\r\ninterface PopStateEvent extends Event {\r\n readonly state: any;\r\n initPopStateEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, stateArg: any): void;\r\n}\r\n\r\ndeclare var PopStateEvent: {\r\n prototype: PopStateEvent;\r\n new(): PopStateEvent;\r\n}\r\n\r\ninterface Position {\r\n readonly coords: Coordinates;\r\n readonly timestamp: number;\r\n}\r\n\r\ndeclare var Position: {\r\n prototype: Position;\r\n new(): Position;\r\n}\r\n\r\ninterface PositionError {\r\n readonly code: number;\r\n readonly message: string;\r\n toString(): string;\r\n readonly PERMISSION_DENIED: number;\r\n readonly POSITION_UNAVAILABLE: number;\r\n readonly TIMEOUT: number;\r\n}\r\n\r\ndeclare var PositionError: {\r\n prototype: PositionError;\r\n new(): PositionError;\r\n readonly PERMISSION_DENIED: number;\r\n readonly POSITION_UNAVAILABLE: number;\r\n readonly TIMEOUT: number;\r\n}\r\n\r\ninterface ProcessingInstruction extends CharacterData {\r\n readonly target: string;\r\n}\r\n\r\ndeclare var ProcessingInstruction: {\r\n prototype: ProcessingInstruction;\r\n new(): ProcessingInstruction;\r\n}\r\n\r\ninterface ProgressEvent extends Event {\r\n readonly lengthComputable: boolean;\r\n readonly loaded: number;\r\n readonly total: number;\r\n initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;\r\n}\r\n\r\ndeclare var ProgressEvent: {\r\n prototype: ProgressEvent;\r\n new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;\r\n}\r\n\r\ninterface RTCDTMFToneChangeEvent extends Event {\r\n readonly tone: string;\r\n}\r\n\r\ndeclare var RTCDTMFToneChangeEvent: {\r\n prototype: RTCDTMFToneChangeEvent;\r\n new(type: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;\r\n}\r\n\r\ninterface RTCDtlsTransport extends RTCStatsProvider {\r\n ondtlsstatechange: ((this: this, ev: RTCDtlsTransportStateChangedEvent) => any) | null;\r\n onerror: ((this: this, ev: ErrorEvent) => any) | null;\r\n readonly state: string;\r\n readonly transport: RTCIceTransport;\r\n getLocalParameters(): RTCDtlsParameters;\r\n getRemoteCertificates(): ArrayBuffer[];\r\n getRemoteParameters(): RTCDtlsParameters | null;\r\n start(remoteParameters: RTCDtlsParameters): void;\r\n stop(): void;\r\n addEventListener(type: \"dtlsstatechange\", listener: (this: this, ev: RTCDtlsTransportStateChangedEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var RTCDtlsTransport: {\r\n prototype: RTCDtlsTransport;\r\n new(transport: RTCIceTransport): RTCDtlsTransport;\r\n}\r\n\r\ninterface RTCDtlsTransportStateChangedEvent extends Event {\r\n readonly state: string;\r\n}\r\n\r\ndeclare var RTCDtlsTransportStateChangedEvent: {\r\n prototype: RTCDtlsTransportStateChangedEvent;\r\n new(): RTCDtlsTransportStateChangedEvent;\r\n}\r\n\r\ninterface RTCDtmfSender extends EventTarget {\r\n readonly canInsertDTMF: boolean;\r\n readonly duration: number;\r\n readonly interToneGap: number;\r\n ontonechange: (this: this, ev: RTCDTMFToneChangeEvent) => any;\r\n readonly sender: RTCRtpSender;\r\n readonly toneBuffer: string;\r\n insertDTMF(tones: string, duration?: number, interToneGap?: number): void;\r\n addEventListener(type: \"tonechange\", listener: (this: this, ev: RTCDTMFToneChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var RTCDtmfSender: {\r\n prototype: RTCDtmfSender;\r\n new(sender: RTCRtpSender): RTCDtmfSender;\r\n}\r\n\r\ninterface RTCIceCandidatePairChangedEvent extends Event {\r\n readonly pair: RTCIceCandidatePair;\r\n}\r\n\r\ndeclare var RTCIceCandidatePairChangedEvent: {\r\n prototype: RTCIceCandidatePairChangedEvent;\r\n new(): RTCIceCandidatePairChangedEvent;\r\n}\r\n\r\ninterface RTCIceGatherer extends RTCStatsProvider {\r\n readonly component: string;\r\n onerror: ((this: this, ev: ErrorEvent) => any) | null;\r\n onlocalcandidate: ((this: this, ev: RTCIceGathererEvent) => any) | null;\r\n createAssociatedGatherer(): RTCIceGatherer;\r\n getLocalCandidates(): RTCIceCandidate[];\r\n getLocalParameters(): RTCIceParameters;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"localcandidate\", listener: (this: this, ev: RTCIceGathererEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var RTCIceGatherer: {\r\n prototype: RTCIceGatherer;\r\n new(options: RTCIceGatherOptions): RTCIceGatherer;\r\n}\r\n\r\ninterface RTCIceGathererEvent extends Event {\r\n readonly candidate: RTCIceCandidate | RTCIceCandidateComplete;\r\n}\r\n\r\ndeclare var RTCIceGathererEvent: {\r\n prototype: RTCIceGathererEvent;\r\n new(): RTCIceGathererEvent;\r\n}\r\n\r\ninterface RTCIceTransport extends RTCStatsProvider {\r\n readonly component: string;\r\n readonly iceGatherer: RTCIceGatherer | null;\r\n oncandidatepairchange: ((this: this, ev: RTCIceCandidatePairChangedEvent) => any) | null;\r\n onicestatechange: ((this: this, ev: RTCIceTransportStateChangedEvent) => any) | null;\r\n readonly role: string;\r\n readonly state: string;\r\n addRemoteCandidate(remoteCandidate: RTCIceCandidate | RTCIceCandidateComplete): void;\r\n createAssociatedTransport(): RTCIceTransport;\r\n getNominatedCandidatePair(): RTCIceCandidatePair | null;\r\n getRemoteCandidates(): RTCIceCandidate[];\r\n getRemoteParameters(): RTCIceParameters | null;\r\n setRemoteCandidates(remoteCandidates: RTCIceCandidate[]): void;\r\n start(gatherer: RTCIceGatherer, remoteParameters: RTCIceParameters, role?: string): void;\r\n stop(): void;\r\n addEventListener(type: \"candidatepairchange\", listener: (this: this, ev: RTCIceCandidatePairChangedEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"icestatechange\", listener: (this: this, ev: RTCIceTransportStateChangedEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var RTCIceTransport: {\r\n prototype: RTCIceTransport;\r\n new(): RTCIceTransport;\r\n}\r\n\r\ninterface RTCIceTransportStateChangedEvent extends Event {\r\n readonly state: string;\r\n}\r\n\r\ndeclare var RTCIceTransportStateChangedEvent: {\r\n prototype: RTCIceTransportStateChangedEvent;\r\n new(): RTCIceTransportStateChangedEvent;\r\n}\r\n\r\ninterface RTCRtpReceiver extends RTCStatsProvider {\r\n onerror: ((this: this, ev: ErrorEvent) => any) | null;\r\n readonly rtcpTransport: RTCDtlsTransport;\r\n readonly track: MediaStreamTrack | null;\r\n readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;\r\n getContributingSources(): RTCRtpContributingSource[];\r\n receive(parameters: RTCRtpParameters): void;\r\n requestSendCSRC(csrc: number): void;\r\n setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;\r\n stop(): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var RTCRtpReceiver: {\r\n prototype: RTCRtpReceiver;\r\n new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver;\r\n getCapabilities(kind?: string): RTCRtpCapabilities;\r\n}\r\n\r\ninterface RTCRtpSender extends RTCStatsProvider {\r\n onerror: ((this: this, ev: ErrorEvent) => any) | null;\r\n onssrcconflict: ((this: this, ev: RTCSsrcConflictEvent) => any) | null;\r\n readonly rtcpTransport: RTCDtlsTransport;\r\n readonly track: MediaStreamTrack;\r\n readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;\r\n send(parameters: RTCRtpParameters): void;\r\n setTrack(track: MediaStreamTrack): void;\r\n setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;\r\n stop(): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ssrcconflict\", listener: (this: this, ev: RTCSsrcConflictEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var RTCRtpSender: {\r\n prototype: RTCRtpSender;\r\n new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender;\r\n getCapabilities(kind?: string): RTCRtpCapabilities;\r\n}\r\n\r\ninterface RTCSrtpSdesTransport extends EventTarget {\r\n onerror: ((this: this, ev: ErrorEvent) => any) | null;\r\n readonly transport: RTCIceTransport;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var RTCSrtpSdesTransport: {\r\n prototype: RTCSrtpSdesTransport;\r\n new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;\r\n getLocalParameters(): RTCSrtpSdesParameters[];\r\n}\r\n\r\ninterface RTCSsrcConflictEvent extends Event {\r\n readonly ssrc: number;\r\n}\r\n\r\ndeclare var RTCSsrcConflictEvent: {\r\n prototype: RTCSsrcConflictEvent;\r\n new(): RTCSsrcConflictEvent;\r\n}\r\n\r\ninterface RTCStatsProvider extends EventTarget {\r\n getStats(): PromiseLike;\r\n msGetStats(): PromiseLike;\r\n}\r\n\r\ndeclare var RTCStatsProvider: {\r\n prototype: RTCStatsProvider;\r\n new(): RTCStatsProvider;\r\n}\r\n\r\ninterface Range {\r\n readonly collapsed: boolean;\r\n readonly commonAncestorContainer: Node;\r\n readonly endContainer: Node;\r\n readonly endOffset: number;\r\n readonly startContainer: Node;\r\n readonly startOffset: number;\r\n cloneContents(): DocumentFragment;\r\n cloneRange(): Range;\r\n collapse(toStart: boolean): void;\r\n compareBoundaryPoints(how: number, sourceRange: Range): number;\r\n createContextualFragment(fragment: string): DocumentFragment;\r\n deleteContents(): void;\r\n detach(): void;\r\n expand(Unit: string): boolean;\r\n extractContents(): DocumentFragment;\r\n getBoundingClientRect(): ClientRect;\r\n getClientRects(): ClientRectList;\r\n insertNode(newNode: Node): void;\r\n selectNode(refNode: Node): void;\r\n selectNodeContents(refNode: Node): void;\r\n setEnd(refNode: Node, offset: number): void;\r\n setEndAfter(refNode: Node): void;\r\n setEndBefore(refNode: Node): void;\r\n setStart(refNode: Node, offset: number): void;\r\n setStartAfter(refNode: Node): void;\r\n setStartBefore(refNode: Node): void;\r\n surroundContents(newParent: Node): void;\r\n toString(): string;\r\n readonly END_TO_END: number;\r\n readonly END_TO_START: number;\r\n readonly START_TO_END: number;\r\n readonly START_TO_START: number;\r\n}\r\n\r\ndeclare var Range: {\r\n prototype: Range;\r\n new(): Range;\r\n readonly END_TO_END: number;\r\n readonly END_TO_START: number;\r\n readonly START_TO_END: number;\r\n readonly START_TO_START: number;\r\n}\r\n\r\ninterface SVGAElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {\r\n readonly target: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGAElement: {\r\n prototype: SVGAElement;\r\n new(): SVGAElement;\r\n}\r\n\r\ninterface SVGAngle {\r\n readonly unitType: number;\r\n value: number;\r\n valueAsString: string;\r\n valueInSpecifiedUnits: number;\r\n convertToSpecifiedUnits(unitType: number): void;\r\n newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;\r\n readonly SVG_ANGLETYPE_DEG: number;\r\n readonly SVG_ANGLETYPE_GRAD: number;\r\n readonly SVG_ANGLETYPE_RAD: number;\r\n readonly SVG_ANGLETYPE_UNKNOWN: number;\r\n readonly SVG_ANGLETYPE_UNSPECIFIED: number;\r\n}\r\n\r\ndeclare var SVGAngle: {\r\n prototype: SVGAngle;\r\n new(): SVGAngle;\r\n readonly SVG_ANGLETYPE_DEG: number;\r\n readonly SVG_ANGLETYPE_GRAD: number;\r\n readonly SVG_ANGLETYPE_RAD: number;\r\n readonly SVG_ANGLETYPE_UNKNOWN: number;\r\n readonly SVG_ANGLETYPE_UNSPECIFIED: number;\r\n}\r\n\r\ninterface SVGAnimatedAngle {\r\n readonly animVal: SVGAngle;\r\n readonly baseVal: SVGAngle;\r\n}\r\n\r\ndeclare var SVGAnimatedAngle: {\r\n prototype: SVGAnimatedAngle;\r\n new(): SVGAnimatedAngle;\r\n}\r\n\r\ninterface SVGAnimatedBoolean {\r\n readonly animVal: boolean;\r\n baseVal: boolean;\r\n}\r\n\r\ndeclare var SVGAnimatedBoolean: {\r\n prototype: SVGAnimatedBoolean;\r\n new(): SVGAnimatedBoolean;\r\n}\r\n\r\ninterface SVGAnimatedEnumeration {\r\n readonly animVal: number;\r\n baseVal: number;\r\n}\r\n\r\ndeclare var SVGAnimatedEnumeration: {\r\n prototype: SVGAnimatedEnumeration;\r\n new(): SVGAnimatedEnumeration;\r\n}\r\n\r\ninterface SVGAnimatedInteger {\r\n readonly animVal: number;\r\n baseVal: number;\r\n}\r\n\r\ndeclare var SVGAnimatedInteger: {\r\n prototype: SVGAnimatedInteger;\r\n new(): SVGAnimatedInteger;\r\n}\r\n\r\ninterface SVGAnimatedLength {\r\n readonly animVal: SVGLength;\r\n readonly baseVal: SVGLength;\r\n}\r\n\r\ndeclare var SVGAnimatedLength: {\r\n prototype: SVGAnimatedLength;\r\n new(): SVGAnimatedLength;\r\n}\r\n\r\ninterface SVGAnimatedLengthList {\r\n readonly animVal: SVGLengthList;\r\n readonly baseVal: SVGLengthList;\r\n}\r\n\r\ndeclare var SVGAnimatedLengthList: {\r\n prototype: SVGAnimatedLengthList;\r\n new(): SVGAnimatedLengthList;\r\n}\r\n\r\ninterface SVGAnimatedNumber {\r\n readonly animVal: number;\r\n baseVal: number;\r\n}\r\n\r\ndeclare var SVGAnimatedNumber: {\r\n prototype: SVGAnimatedNumber;\r\n new(): SVGAnimatedNumber;\r\n}\r\n\r\ninterface SVGAnimatedNumberList {\r\n readonly animVal: SVGNumberList;\r\n readonly baseVal: SVGNumberList;\r\n}\r\n\r\ndeclare var SVGAnimatedNumberList: {\r\n prototype: SVGAnimatedNumberList;\r\n new(): SVGAnimatedNumberList;\r\n}\r\n\r\ninterface SVGAnimatedPreserveAspectRatio {\r\n readonly animVal: SVGPreserveAspectRatio;\r\n readonly baseVal: SVGPreserveAspectRatio;\r\n}\r\n\r\ndeclare var SVGAnimatedPreserveAspectRatio: {\r\n prototype: SVGAnimatedPreserveAspectRatio;\r\n new(): SVGAnimatedPreserveAspectRatio;\r\n}\r\n\r\ninterface SVGAnimatedRect {\r\n readonly animVal: SVGRect;\r\n readonly baseVal: SVGRect;\r\n}\r\n\r\ndeclare var SVGAnimatedRect: {\r\n prototype: SVGAnimatedRect;\r\n new(): SVGAnimatedRect;\r\n}\r\n\r\ninterface SVGAnimatedString {\r\n readonly animVal: string;\r\n baseVal: string;\r\n}\r\n\r\ndeclare var SVGAnimatedString: {\r\n prototype: SVGAnimatedString;\r\n new(): SVGAnimatedString;\r\n}\r\n\r\ninterface SVGAnimatedTransformList {\r\n readonly animVal: SVGTransformList;\r\n readonly baseVal: SVGTransformList;\r\n}\r\n\r\ndeclare var SVGAnimatedTransformList: {\r\n prototype: SVGAnimatedTransformList;\r\n new(): SVGAnimatedTransformList;\r\n}\r\n\r\ninterface SVGCircleElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n readonly cx: SVGAnimatedLength;\r\n readonly cy: SVGAnimatedLength;\r\n readonly r: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGCircleElement: {\r\n prototype: SVGCircleElement;\r\n new(): SVGCircleElement;\r\n}\r\n\r\ninterface SVGClipPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {\r\n readonly clipPathUnits: SVGAnimatedEnumeration;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGClipPathElement: {\r\n prototype: SVGClipPathElement;\r\n new(): SVGClipPathElement;\r\n}\r\n\r\ninterface SVGComponentTransferFunctionElement extends SVGElement {\r\n readonly amplitude: SVGAnimatedNumber;\r\n readonly exponent: SVGAnimatedNumber;\r\n readonly intercept: SVGAnimatedNumber;\r\n readonly offset: SVGAnimatedNumber;\r\n readonly slope: SVGAnimatedNumber;\r\n readonly tableValues: SVGAnimatedNumberList;\r\n readonly type: SVGAnimatedEnumeration;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGComponentTransferFunctionElement: {\r\n prototype: SVGComponentTransferFunctionElement;\r\n new(): SVGComponentTransferFunctionElement;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGDefsElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGDefsElement: {\r\n prototype: SVGDefsElement;\r\n new(): SVGDefsElement;\r\n}\r\n\r\ninterface SVGDescElement extends SVGElement, SVGStylable, SVGLangSpace {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGDescElement: {\r\n prototype: SVGDescElement;\r\n new(): SVGDescElement;\r\n}\r\n\r\ninterface SVGElement extends Element {\r\n onclick: (this: this, ev: MouseEvent) => any;\r\n ondblclick: (this: this, ev: MouseEvent) => any;\r\n onfocusin: (this: this, ev: FocusEvent) => any;\r\n onfocusout: (this: this, ev: FocusEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n onmousedown: (this: this, ev: MouseEvent) => any;\r\n onmousemove: (this: this, ev: MouseEvent) => any;\r\n onmouseout: (this: this, ev: MouseEvent) => any;\r\n onmouseover: (this: this, ev: MouseEvent) => any;\r\n onmouseup: (this: this, ev: MouseEvent) => any;\r\n readonly ownerSVGElement: SVGSVGElement;\r\n readonly viewportElement: SVGElement;\r\n xmlbase: string;\r\n className: any;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusin\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusout\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGElement: {\r\n prototype: SVGElement;\r\n new(): SVGElement;\r\n}\r\n\r\ninterface SVGElementInstance extends EventTarget {\r\n readonly childNodes: SVGElementInstanceList;\r\n readonly correspondingElement: SVGElement;\r\n readonly correspondingUseElement: SVGUseElement;\r\n readonly firstChild: SVGElementInstance;\r\n readonly lastChild: SVGElementInstance;\r\n readonly nextSibling: SVGElementInstance;\r\n readonly parentNode: SVGElementInstance;\r\n readonly previousSibling: SVGElementInstance;\r\n}\r\n\r\ndeclare var SVGElementInstance: {\r\n prototype: SVGElementInstance;\r\n new(): SVGElementInstance;\r\n}\r\n\r\ninterface SVGElementInstanceList {\r\n readonly length: number;\r\n item(index: number): SVGElementInstance;\r\n}\r\n\r\ndeclare var SVGElementInstanceList: {\r\n prototype: SVGElementInstanceList;\r\n new(): SVGElementInstanceList;\r\n}\r\n\r\ninterface SVGEllipseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n readonly cx: SVGAnimatedLength;\r\n readonly cy: SVGAnimatedLength;\r\n readonly rx: SVGAnimatedLength;\r\n readonly ry: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGEllipseElement: {\r\n prototype: SVGEllipseElement;\r\n new(): SVGEllipseElement;\r\n}\r\n\r\ninterface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n readonly in2: SVGAnimatedString;\r\n readonly mode: SVGAnimatedEnumeration;\r\n readonly SVG_FEBLEND_MODE_COLOR: number;\r\n readonly SVG_FEBLEND_MODE_COLOR_BURN: number;\r\n readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;\r\n readonly SVG_FEBLEND_MODE_DARKEN: number;\r\n readonly SVG_FEBLEND_MODE_DIFFERENCE: number;\r\n readonly SVG_FEBLEND_MODE_EXCLUSION: number;\r\n readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;\r\n readonly SVG_FEBLEND_MODE_HUE: number;\r\n readonly SVG_FEBLEND_MODE_LIGHTEN: number;\r\n readonly SVG_FEBLEND_MODE_LUMINOSITY: number;\r\n readonly SVG_FEBLEND_MODE_MULTIPLY: number;\r\n readonly SVG_FEBLEND_MODE_NORMAL: number;\r\n readonly SVG_FEBLEND_MODE_OVERLAY: number;\r\n readonly SVG_FEBLEND_MODE_SATURATION: number;\r\n readonly SVG_FEBLEND_MODE_SCREEN: number;\r\n readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;\r\n readonly SVG_FEBLEND_MODE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEBlendElement: {\r\n prototype: SVGFEBlendElement;\r\n new(): SVGFEBlendElement;\r\n readonly SVG_FEBLEND_MODE_COLOR: number;\r\n readonly SVG_FEBLEND_MODE_COLOR_BURN: number;\r\n readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;\r\n readonly SVG_FEBLEND_MODE_DARKEN: number;\r\n readonly SVG_FEBLEND_MODE_DIFFERENCE: number;\r\n readonly SVG_FEBLEND_MODE_EXCLUSION: number;\r\n readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;\r\n readonly SVG_FEBLEND_MODE_HUE: number;\r\n readonly SVG_FEBLEND_MODE_LIGHTEN: number;\r\n readonly SVG_FEBLEND_MODE_LUMINOSITY: number;\r\n readonly SVG_FEBLEND_MODE_MULTIPLY: number;\r\n readonly SVG_FEBLEND_MODE_NORMAL: number;\r\n readonly SVG_FEBLEND_MODE_OVERLAY: number;\r\n readonly SVG_FEBLEND_MODE_SATURATION: number;\r\n readonly SVG_FEBLEND_MODE_SCREEN: number;\r\n readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;\r\n readonly SVG_FEBLEND_MODE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n readonly type: SVGAnimatedEnumeration;\r\n readonly values: SVGAnimatedNumberList;\r\n readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEColorMatrixElement: {\r\n prototype: SVGFEColorMatrixElement;\r\n new(): SVGFEColorMatrixElement;\r\n readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEComponentTransferElement: {\r\n prototype: SVGFEComponentTransferElement;\r\n new(): SVGFEComponentTransferElement;\r\n}\r\n\r\ninterface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n readonly in2: SVGAnimatedString;\r\n readonly k1: SVGAnimatedNumber;\r\n readonly k2: SVGAnimatedNumber;\r\n readonly k3: SVGAnimatedNumber;\r\n readonly k4: SVGAnimatedNumber;\r\n readonly operator: SVGAnimatedEnumeration;\r\n readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_IN: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFECompositeElement: {\r\n prototype: SVGFECompositeElement;\r\n new(): SVGFECompositeElement;\r\n readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_IN: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;\r\n}\r\n\r\ninterface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly bias: SVGAnimatedNumber;\r\n readonly divisor: SVGAnimatedNumber;\r\n readonly edgeMode: SVGAnimatedEnumeration;\r\n readonly in1: SVGAnimatedString;\r\n readonly kernelMatrix: SVGAnimatedNumberList;\r\n readonly kernelUnitLengthX: SVGAnimatedNumber;\r\n readonly kernelUnitLengthY: SVGAnimatedNumber;\r\n readonly orderX: SVGAnimatedInteger;\r\n readonly orderY: SVGAnimatedInteger;\r\n readonly preserveAlpha: SVGAnimatedBoolean;\r\n readonly targetX: SVGAnimatedInteger;\r\n readonly targetY: SVGAnimatedInteger;\r\n readonly SVG_EDGEMODE_DUPLICATE: number;\r\n readonly SVG_EDGEMODE_NONE: number;\r\n readonly SVG_EDGEMODE_UNKNOWN: number;\r\n readonly SVG_EDGEMODE_WRAP: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEConvolveMatrixElement: {\r\n prototype: SVGFEConvolveMatrixElement;\r\n new(): SVGFEConvolveMatrixElement;\r\n readonly SVG_EDGEMODE_DUPLICATE: number;\r\n readonly SVG_EDGEMODE_NONE: number;\r\n readonly SVG_EDGEMODE_UNKNOWN: number;\r\n readonly SVG_EDGEMODE_WRAP: number;\r\n}\r\n\r\ninterface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly diffuseConstant: SVGAnimatedNumber;\r\n readonly in1: SVGAnimatedString;\r\n readonly kernelUnitLengthX: SVGAnimatedNumber;\r\n readonly kernelUnitLengthY: SVGAnimatedNumber;\r\n readonly surfaceScale: SVGAnimatedNumber;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEDiffuseLightingElement: {\r\n prototype: SVGFEDiffuseLightingElement;\r\n new(): SVGFEDiffuseLightingElement;\r\n}\r\n\r\ninterface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n readonly in2: SVGAnimatedString;\r\n readonly scale: SVGAnimatedNumber;\r\n readonly xChannelSelector: SVGAnimatedEnumeration;\r\n readonly yChannelSelector: SVGAnimatedEnumeration;\r\n readonly SVG_CHANNEL_A: number;\r\n readonly SVG_CHANNEL_B: number;\r\n readonly SVG_CHANNEL_G: number;\r\n readonly SVG_CHANNEL_R: number;\r\n readonly SVG_CHANNEL_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEDisplacementMapElement: {\r\n prototype: SVGFEDisplacementMapElement;\r\n new(): SVGFEDisplacementMapElement;\r\n readonly SVG_CHANNEL_A: number;\r\n readonly SVG_CHANNEL_B: number;\r\n readonly SVG_CHANNEL_G: number;\r\n readonly SVG_CHANNEL_R: number;\r\n readonly SVG_CHANNEL_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEDistantLightElement extends SVGElement {\r\n readonly azimuth: SVGAnimatedNumber;\r\n readonly elevation: SVGAnimatedNumber;\r\n}\r\n\r\ndeclare var SVGFEDistantLightElement: {\r\n prototype: SVGFEDistantLightElement;\r\n new(): SVGFEDistantLightElement;\r\n}\r\n\r\ninterface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEFloodElement: {\r\n prototype: SVGFEFloodElement;\r\n new(): SVGFEFloodElement;\r\n}\r\n\r\ninterface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncAElement: {\r\n prototype: SVGFEFuncAElement;\r\n new(): SVGFEFuncAElement;\r\n}\r\n\r\ninterface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncBElement: {\r\n prototype: SVGFEFuncBElement;\r\n new(): SVGFEFuncBElement;\r\n}\r\n\r\ninterface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncGElement: {\r\n prototype: SVGFEFuncGElement;\r\n new(): SVGFEFuncGElement;\r\n}\r\n\r\ninterface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncRElement: {\r\n prototype: SVGFEFuncRElement;\r\n new(): SVGFEFuncRElement;\r\n}\r\n\r\ninterface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n readonly stdDeviationX: SVGAnimatedNumber;\r\n readonly stdDeviationY: SVGAnimatedNumber;\r\n setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEGaussianBlurElement: {\r\n prototype: SVGFEGaussianBlurElement;\r\n new(): SVGFEGaussianBlurElement;\r\n}\r\n\r\ninterface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {\r\n readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEImageElement: {\r\n prototype: SVGFEImageElement;\r\n new(): SVGFEImageElement;\r\n}\r\n\r\ninterface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEMergeElement: {\r\n prototype: SVGFEMergeElement;\r\n new(): SVGFEMergeElement;\r\n}\r\n\r\ninterface SVGFEMergeNodeElement extends SVGElement {\r\n readonly in1: SVGAnimatedString;\r\n}\r\n\r\ndeclare var SVGFEMergeNodeElement: {\r\n prototype: SVGFEMergeNodeElement;\r\n new(): SVGFEMergeNodeElement;\r\n}\r\n\r\ninterface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n readonly operator: SVGAnimatedEnumeration;\r\n readonly radiusX: SVGAnimatedNumber;\r\n readonly radiusY: SVGAnimatedNumber;\r\n readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;\r\n readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;\r\n readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEMorphologyElement: {\r\n prototype: SVGFEMorphologyElement;\r\n new(): SVGFEMorphologyElement;\r\n readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;\r\n readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;\r\n readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly dx: SVGAnimatedNumber;\r\n readonly dy: SVGAnimatedNumber;\r\n readonly in1: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEOffsetElement: {\r\n prototype: SVGFEOffsetElement;\r\n new(): SVGFEOffsetElement;\r\n}\r\n\r\ninterface SVGFEPointLightElement extends SVGElement {\r\n readonly x: SVGAnimatedNumber;\r\n readonly y: SVGAnimatedNumber;\r\n readonly z: SVGAnimatedNumber;\r\n}\r\n\r\ndeclare var SVGFEPointLightElement: {\r\n prototype: SVGFEPointLightElement;\r\n new(): SVGFEPointLightElement;\r\n}\r\n\r\ninterface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n readonly kernelUnitLengthX: SVGAnimatedNumber;\r\n readonly kernelUnitLengthY: SVGAnimatedNumber;\r\n readonly specularConstant: SVGAnimatedNumber;\r\n readonly specularExponent: SVGAnimatedNumber;\r\n readonly surfaceScale: SVGAnimatedNumber;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFESpecularLightingElement: {\r\n prototype: SVGFESpecularLightingElement;\r\n new(): SVGFESpecularLightingElement;\r\n}\r\n\r\ninterface SVGFESpotLightElement extends SVGElement {\r\n readonly limitingConeAngle: SVGAnimatedNumber;\r\n readonly pointsAtX: SVGAnimatedNumber;\r\n readonly pointsAtY: SVGAnimatedNumber;\r\n readonly pointsAtZ: SVGAnimatedNumber;\r\n readonly specularExponent: SVGAnimatedNumber;\r\n readonly x: SVGAnimatedNumber;\r\n readonly y: SVGAnimatedNumber;\r\n readonly z: SVGAnimatedNumber;\r\n}\r\n\r\ndeclare var SVGFESpotLightElement: {\r\n prototype: SVGFESpotLightElement;\r\n new(): SVGFESpotLightElement;\r\n}\r\n\r\ninterface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFETileElement: {\r\n prototype: SVGFETileElement;\r\n new(): SVGFETileElement;\r\n}\r\n\r\ninterface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly baseFrequencyX: SVGAnimatedNumber;\r\n readonly baseFrequencyY: SVGAnimatedNumber;\r\n readonly numOctaves: SVGAnimatedInteger;\r\n readonly seed: SVGAnimatedNumber;\r\n readonly stitchTiles: SVGAnimatedEnumeration;\r\n readonly type: SVGAnimatedEnumeration;\r\n readonly SVG_STITCHTYPE_NOSTITCH: number;\r\n readonly SVG_STITCHTYPE_STITCH: number;\r\n readonly SVG_STITCHTYPE_UNKNOWN: number;\r\n readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;\r\n readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;\r\n readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFETurbulenceElement: {\r\n prototype: SVGFETurbulenceElement;\r\n new(): SVGFETurbulenceElement;\r\n readonly SVG_STITCHTYPE_NOSTITCH: number;\r\n readonly SVG_STITCHTYPE_STITCH: number;\r\n readonly SVG_STITCHTYPE_UNKNOWN: number;\r\n readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;\r\n readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;\r\n readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {\r\n readonly filterResX: SVGAnimatedInteger;\r\n readonly filterResY: SVGAnimatedInteger;\r\n readonly filterUnits: SVGAnimatedEnumeration;\r\n readonly height: SVGAnimatedLength;\r\n readonly primitiveUnits: SVGAnimatedEnumeration;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n setFilterRes(filterResX: number, filterResY: number): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFilterElement: {\r\n prototype: SVGFilterElement;\r\n new(): SVGFilterElement;\r\n}\r\n\r\ninterface SVGForeignObjectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n readonly height: SVGAnimatedLength;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGForeignObjectElement: {\r\n prototype: SVGForeignObjectElement;\r\n new(): SVGForeignObjectElement;\r\n}\r\n\r\ninterface SVGGElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGGElement: {\r\n prototype: SVGGElement;\r\n new(): SVGGElement;\r\n}\r\n\r\ninterface SVGGradientElement extends SVGElement, SVGStylable, SVGExternalResourcesRequired, SVGURIReference, SVGUnitTypes {\r\n readonly gradientTransform: SVGAnimatedTransformList;\r\n readonly gradientUnits: SVGAnimatedEnumeration;\r\n readonly spreadMethod: SVGAnimatedEnumeration;\r\n readonly SVG_SPREADMETHOD_PAD: number;\r\n readonly SVG_SPREADMETHOD_REFLECT: number;\r\n readonly SVG_SPREADMETHOD_REPEAT: number;\r\n readonly SVG_SPREADMETHOD_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGGradientElement: {\r\n prototype: SVGGradientElement;\r\n new(): SVGGradientElement;\r\n readonly SVG_SPREADMETHOD_PAD: number;\r\n readonly SVG_SPREADMETHOD_REFLECT: number;\r\n readonly SVG_SPREADMETHOD_REPEAT: number;\r\n readonly SVG_SPREADMETHOD_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGImageElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {\r\n readonly height: SVGAnimatedLength;\r\n readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGImageElement: {\r\n prototype: SVGImageElement;\r\n new(): SVGImageElement;\r\n}\r\n\r\ninterface SVGLength {\r\n readonly unitType: number;\r\n value: number;\r\n valueAsString: string;\r\n valueInSpecifiedUnits: number;\r\n convertToSpecifiedUnits(unitType: number): void;\r\n newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;\r\n readonly SVG_LENGTHTYPE_CM: number;\r\n readonly SVG_LENGTHTYPE_EMS: number;\r\n readonly SVG_LENGTHTYPE_EXS: number;\r\n readonly SVG_LENGTHTYPE_IN: number;\r\n readonly SVG_LENGTHTYPE_MM: number;\r\n readonly SVG_LENGTHTYPE_NUMBER: number;\r\n readonly SVG_LENGTHTYPE_PC: number;\r\n readonly SVG_LENGTHTYPE_PERCENTAGE: number;\r\n readonly SVG_LENGTHTYPE_PT: number;\r\n readonly SVG_LENGTHTYPE_PX: number;\r\n readonly SVG_LENGTHTYPE_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGLength: {\r\n prototype: SVGLength;\r\n new(): SVGLength;\r\n readonly SVG_LENGTHTYPE_CM: number;\r\n readonly SVG_LENGTHTYPE_EMS: number;\r\n readonly SVG_LENGTHTYPE_EXS: number;\r\n readonly SVG_LENGTHTYPE_IN: number;\r\n readonly SVG_LENGTHTYPE_MM: number;\r\n readonly SVG_LENGTHTYPE_NUMBER: number;\r\n readonly SVG_LENGTHTYPE_PC: number;\r\n readonly SVG_LENGTHTYPE_PERCENTAGE: number;\r\n readonly SVG_LENGTHTYPE_PT: number;\r\n readonly SVG_LENGTHTYPE_PX: number;\r\n readonly SVG_LENGTHTYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGLengthList {\r\n readonly numberOfItems: number;\r\n appendItem(newItem: SVGLength): SVGLength;\r\n clear(): void;\r\n getItem(index: number): SVGLength;\r\n initialize(newItem: SVGLength): SVGLength;\r\n insertItemBefore(newItem: SVGLength, index: number): SVGLength;\r\n removeItem(index: number): SVGLength;\r\n replaceItem(newItem: SVGLength, index: number): SVGLength;\r\n}\r\n\r\ndeclare var SVGLengthList: {\r\n prototype: SVGLengthList;\r\n new(): SVGLengthList;\r\n}\r\n\r\ninterface SVGLineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n readonly x1: SVGAnimatedLength;\r\n readonly x2: SVGAnimatedLength;\r\n readonly y1: SVGAnimatedLength;\r\n readonly y2: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGLineElement: {\r\n prototype: SVGLineElement;\r\n new(): SVGLineElement;\r\n}\r\n\r\ninterface SVGLinearGradientElement extends SVGGradientElement {\r\n readonly x1: SVGAnimatedLength;\r\n readonly x2: SVGAnimatedLength;\r\n readonly y1: SVGAnimatedLength;\r\n readonly y2: SVGAnimatedLength;\r\n}\r\n\r\ndeclare var SVGLinearGradientElement: {\r\n prototype: SVGLinearGradientElement;\r\n new(): SVGLinearGradientElement;\r\n}\r\n\r\ninterface SVGMarkerElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {\r\n readonly markerHeight: SVGAnimatedLength;\r\n readonly markerUnits: SVGAnimatedEnumeration;\r\n readonly markerWidth: SVGAnimatedLength;\r\n readonly orientAngle: SVGAnimatedAngle;\r\n readonly orientType: SVGAnimatedEnumeration;\r\n readonly refX: SVGAnimatedLength;\r\n readonly refY: SVGAnimatedLength;\r\n setOrientToAngle(angle: SVGAngle): void;\r\n setOrientToAuto(): void;\r\n readonly SVG_MARKERUNITS_STROKEWIDTH: number;\r\n readonly SVG_MARKERUNITS_UNKNOWN: number;\r\n readonly SVG_MARKERUNITS_USERSPACEONUSE: number;\r\n readonly SVG_MARKER_ORIENT_ANGLE: number;\r\n readonly SVG_MARKER_ORIENT_AUTO: number;\r\n readonly SVG_MARKER_ORIENT_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGMarkerElement: {\r\n prototype: SVGMarkerElement;\r\n new(): SVGMarkerElement;\r\n readonly SVG_MARKERUNITS_STROKEWIDTH: number;\r\n readonly SVG_MARKERUNITS_UNKNOWN: number;\r\n readonly SVG_MARKERUNITS_USERSPACEONUSE: number;\r\n readonly SVG_MARKER_ORIENT_ANGLE: number;\r\n readonly SVG_MARKER_ORIENT_AUTO: number;\r\n readonly SVG_MARKER_ORIENT_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGMaskElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {\r\n readonly height: SVGAnimatedLength;\r\n readonly maskContentUnits: SVGAnimatedEnumeration;\r\n readonly maskUnits: SVGAnimatedEnumeration;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGMaskElement: {\r\n prototype: SVGMaskElement;\r\n new(): SVGMaskElement;\r\n}\r\n\r\ninterface SVGMatrix {\r\n a: number;\r\n b: number;\r\n c: number;\r\n d: number;\r\n e: number;\r\n f: number;\r\n flipX(): SVGMatrix;\r\n flipY(): SVGMatrix;\r\n inverse(): SVGMatrix;\r\n multiply(secondMatrix: SVGMatrix): SVGMatrix;\r\n rotate(angle: number): SVGMatrix;\r\n rotateFromVector(x: number, y: number): SVGMatrix;\r\n scale(scaleFactor: number): SVGMatrix;\r\n scaleNonUniform(scaleFactorX: number, scaleFactorY: number): SVGMatrix;\r\n skewX(angle: number): SVGMatrix;\r\n skewY(angle: number): SVGMatrix;\r\n translate(x: number, y: number): SVGMatrix;\r\n}\r\n\r\ndeclare var SVGMatrix: {\r\n prototype: SVGMatrix;\r\n new(): SVGMatrix;\r\n}\r\n\r\ninterface SVGMetadataElement extends SVGElement {\r\n}\r\n\r\ndeclare var SVGMetadataElement: {\r\n prototype: SVGMetadataElement;\r\n new(): SVGMetadataElement;\r\n}\r\n\r\ninterface SVGNumber {\r\n value: number;\r\n}\r\n\r\ndeclare var SVGNumber: {\r\n prototype: SVGNumber;\r\n new(): SVGNumber;\r\n}\r\n\r\ninterface SVGNumberList {\r\n readonly numberOfItems: number;\r\n appendItem(newItem: SVGNumber): SVGNumber;\r\n clear(): void;\r\n getItem(index: number): SVGNumber;\r\n initialize(newItem: SVGNumber): SVGNumber;\r\n insertItemBefore(newItem: SVGNumber, index: number): SVGNumber;\r\n removeItem(index: number): SVGNumber;\r\n replaceItem(newItem: SVGNumber, index: number): SVGNumber;\r\n}\r\n\r\ndeclare var SVGNumberList: {\r\n prototype: SVGNumberList;\r\n new(): SVGNumberList;\r\n}\r\n\r\ninterface SVGPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPathData {\r\n createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs;\r\n createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel;\r\n createSVGPathSegClosePath(): SVGPathSegClosePath;\r\n createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs;\r\n createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel;\r\n createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs;\r\n createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel;\r\n createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs;\r\n createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel;\r\n createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs;\r\n createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel;\r\n createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs;\r\n createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs;\r\n createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel;\r\n createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel;\r\n createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs;\r\n createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel;\r\n createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs;\r\n createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel;\r\n getPathSegAtLength(distance: number): number;\r\n getPointAtLength(distance: number): SVGPoint;\r\n getTotalLength(): number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPathElement: {\r\n prototype: SVGPathElement;\r\n new(): SVGPathElement;\r\n}\r\n\r\ninterface SVGPathSeg {\r\n readonly pathSegType: number;\r\n readonly pathSegTypeAsLetter: string;\r\n readonly PATHSEG_ARC_ABS: number;\r\n readonly PATHSEG_ARC_REL: number;\r\n readonly PATHSEG_CLOSEPATH: number;\r\n readonly PATHSEG_CURVETO_CUBIC_ABS: number;\r\n readonly PATHSEG_CURVETO_CUBIC_REL: number;\r\n readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;\r\n readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_REL: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;\r\n readonly PATHSEG_LINETO_ABS: number;\r\n readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;\r\n readonly PATHSEG_LINETO_HORIZONTAL_REL: number;\r\n readonly PATHSEG_LINETO_REL: number;\r\n readonly PATHSEG_LINETO_VERTICAL_ABS: number;\r\n readonly PATHSEG_LINETO_VERTICAL_REL: number;\r\n readonly PATHSEG_MOVETO_ABS: number;\r\n readonly PATHSEG_MOVETO_REL: number;\r\n readonly PATHSEG_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGPathSeg: {\r\n prototype: SVGPathSeg;\r\n new(): SVGPathSeg;\r\n readonly PATHSEG_ARC_ABS: number;\r\n readonly PATHSEG_ARC_REL: number;\r\n readonly PATHSEG_CLOSEPATH: number;\r\n readonly PATHSEG_CURVETO_CUBIC_ABS: number;\r\n readonly PATHSEG_CURVETO_CUBIC_REL: number;\r\n readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;\r\n readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_REL: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;\r\n readonly PATHSEG_LINETO_ABS: number;\r\n readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;\r\n readonly PATHSEG_LINETO_HORIZONTAL_REL: number;\r\n readonly PATHSEG_LINETO_REL: number;\r\n readonly PATHSEG_LINETO_VERTICAL_ABS: number;\r\n readonly PATHSEG_LINETO_VERTICAL_REL: number;\r\n readonly PATHSEG_MOVETO_ABS: number;\r\n readonly PATHSEG_MOVETO_REL: number;\r\n readonly PATHSEG_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGPathSegArcAbs extends SVGPathSeg {\r\n angle: number;\r\n largeArcFlag: boolean;\r\n r1: number;\r\n r2: number;\r\n sweepFlag: boolean;\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegArcAbs: {\r\n prototype: SVGPathSegArcAbs;\r\n new(): SVGPathSegArcAbs;\r\n}\r\n\r\ninterface SVGPathSegArcRel extends SVGPathSeg {\r\n angle: number;\r\n largeArcFlag: boolean;\r\n r1: number;\r\n r2: number;\r\n sweepFlag: boolean;\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegArcRel: {\r\n prototype: SVGPathSegArcRel;\r\n new(): SVGPathSegArcRel;\r\n}\r\n\r\ninterface SVGPathSegClosePath extends SVGPathSeg {\r\n}\r\n\r\ndeclare var SVGPathSegClosePath: {\r\n prototype: SVGPathSegClosePath;\r\n new(): SVGPathSegClosePath;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n x2: number;\r\n y: number;\r\n y1: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicAbs: {\r\n prototype: SVGPathSegCurvetoCubicAbs;\r\n new(): SVGPathSegCurvetoCubicAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicRel extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n x2: number;\r\n y: number;\r\n y1: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicRel: {\r\n prototype: SVGPathSegCurvetoCubicRel;\r\n new(): SVGPathSegCurvetoCubicRel;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {\r\n x: number;\r\n x2: number;\r\n y: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicSmoothAbs: {\r\n prototype: SVGPathSegCurvetoCubicSmoothAbs;\r\n new(): SVGPathSegCurvetoCubicSmoothAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {\r\n x: number;\r\n x2: number;\r\n y: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicSmoothRel: {\r\n prototype: SVGPathSegCurvetoCubicSmoothRel;\r\n new(): SVGPathSegCurvetoCubicSmoothRel;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n y: number;\r\n y1: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticAbs: {\r\n prototype: SVGPathSegCurvetoQuadraticAbs;\r\n new(): SVGPathSegCurvetoQuadraticAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n y: number;\r\n y1: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticRel: {\r\n prototype: SVGPathSegCurvetoQuadraticRel;\r\n new(): SVGPathSegCurvetoQuadraticRel;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticSmoothAbs: {\r\n prototype: SVGPathSegCurvetoQuadraticSmoothAbs;\r\n new(): SVGPathSegCurvetoQuadraticSmoothAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticSmoothRel: {\r\n prototype: SVGPathSegCurvetoQuadraticSmoothRel;\r\n new(): SVGPathSegCurvetoQuadraticSmoothRel;\r\n}\r\n\r\ninterface SVGPathSegLinetoAbs extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoAbs: {\r\n prototype: SVGPathSegLinetoAbs;\r\n new(): SVGPathSegLinetoAbs;\r\n}\r\n\r\ninterface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {\r\n x: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoHorizontalAbs: {\r\n prototype: SVGPathSegLinetoHorizontalAbs;\r\n new(): SVGPathSegLinetoHorizontalAbs;\r\n}\r\n\r\ninterface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {\r\n x: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoHorizontalRel: {\r\n prototype: SVGPathSegLinetoHorizontalRel;\r\n new(): SVGPathSegLinetoHorizontalRel;\r\n}\r\n\r\ninterface SVGPathSegLinetoRel extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoRel: {\r\n prototype: SVGPathSegLinetoRel;\r\n new(): SVGPathSegLinetoRel;\r\n}\r\n\r\ninterface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoVerticalAbs: {\r\n prototype: SVGPathSegLinetoVerticalAbs;\r\n new(): SVGPathSegLinetoVerticalAbs;\r\n}\r\n\r\ninterface SVGPathSegLinetoVerticalRel extends SVGPathSeg {\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoVerticalRel: {\r\n prototype: SVGPathSegLinetoVerticalRel;\r\n new(): SVGPathSegLinetoVerticalRel;\r\n}\r\n\r\ninterface SVGPathSegList {\r\n readonly numberOfItems: number;\r\n appendItem(newItem: SVGPathSeg): SVGPathSeg;\r\n clear(): void;\r\n getItem(index: number): SVGPathSeg;\r\n initialize(newItem: SVGPathSeg): SVGPathSeg;\r\n insertItemBefore(newItem: SVGPathSeg, index: number): SVGPathSeg;\r\n removeItem(index: number): SVGPathSeg;\r\n replaceItem(newItem: SVGPathSeg, index: number): SVGPathSeg;\r\n}\r\n\r\ndeclare var SVGPathSegList: {\r\n prototype: SVGPathSegList;\r\n new(): SVGPathSegList;\r\n}\r\n\r\ninterface SVGPathSegMovetoAbs extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegMovetoAbs: {\r\n prototype: SVGPathSegMovetoAbs;\r\n new(): SVGPathSegMovetoAbs;\r\n}\r\n\r\ninterface SVGPathSegMovetoRel extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegMovetoRel: {\r\n prototype: SVGPathSegMovetoRel;\r\n new(): SVGPathSegMovetoRel;\r\n}\r\n\r\ninterface SVGPatternElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGURIReference, SVGUnitTypes {\r\n readonly height: SVGAnimatedLength;\r\n readonly patternContentUnits: SVGAnimatedEnumeration;\r\n readonly patternTransform: SVGAnimatedTransformList;\r\n readonly patternUnits: SVGAnimatedEnumeration;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPatternElement: {\r\n prototype: SVGPatternElement;\r\n new(): SVGPatternElement;\r\n}\r\n\r\ninterface SVGPoint {\r\n x: number;\r\n y: number;\r\n matrixTransform(matrix: SVGMatrix): SVGPoint;\r\n}\r\n\r\ndeclare var SVGPoint: {\r\n prototype: SVGPoint;\r\n new(): SVGPoint;\r\n}\r\n\r\ninterface SVGPointList {\r\n readonly numberOfItems: number;\r\n appendItem(newItem: SVGPoint): SVGPoint;\r\n clear(): void;\r\n getItem(index: number): SVGPoint;\r\n initialize(newItem: SVGPoint): SVGPoint;\r\n insertItemBefore(newItem: SVGPoint, index: number): SVGPoint;\r\n removeItem(index: number): SVGPoint;\r\n replaceItem(newItem: SVGPoint, index: number): SVGPoint;\r\n}\r\n\r\ndeclare var SVGPointList: {\r\n prototype: SVGPointList;\r\n new(): SVGPointList;\r\n}\r\n\r\ninterface SVGPolygonElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPolygonElement: {\r\n prototype: SVGPolygonElement;\r\n new(): SVGPolygonElement;\r\n}\r\n\r\ninterface SVGPolylineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPolylineElement: {\r\n prototype: SVGPolylineElement;\r\n new(): SVGPolylineElement;\r\n}\r\n\r\ninterface SVGPreserveAspectRatio {\r\n align: number;\r\n meetOrSlice: number;\r\n readonly SVG_MEETORSLICE_MEET: number;\r\n readonly SVG_MEETORSLICE_SLICE: number;\r\n readonly SVG_MEETORSLICE_UNKNOWN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_NONE: number;\r\n readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;\r\n}\r\n\r\ndeclare var SVGPreserveAspectRatio: {\r\n prototype: SVGPreserveAspectRatio;\r\n new(): SVGPreserveAspectRatio;\r\n readonly SVG_MEETORSLICE_MEET: number;\r\n readonly SVG_MEETORSLICE_SLICE: number;\r\n readonly SVG_MEETORSLICE_UNKNOWN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_NONE: number;\r\n readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;\r\n}\r\n\r\ninterface SVGRadialGradientElement extends SVGGradientElement {\r\n readonly cx: SVGAnimatedLength;\r\n readonly cy: SVGAnimatedLength;\r\n readonly fx: SVGAnimatedLength;\r\n readonly fy: SVGAnimatedLength;\r\n readonly r: SVGAnimatedLength;\r\n}\r\n\r\ndeclare var SVGRadialGradientElement: {\r\n prototype: SVGRadialGradientElement;\r\n new(): SVGRadialGradientElement;\r\n}\r\n\r\ninterface SVGRect {\r\n height: number;\r\n width: number;\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGRect: {\r\n prototype: SVGRect;\r\n new(): SVGRect;\r\n}\r\n\r\ninterface SVGRectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n readonly height: SVGAnimatedLength;\r\n readonly rx: SVGAnimatedLength;\r\n readonly ry: SVGAnimatedLength;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGRectElement: {\r\n prototype: SVGRectElement;\r\n new(): SVGRectElement;\r\n}\r\n\r\ninterface SVGSVGElement extends SVGElement, DocumentEvent, SVGLocatable, SVGTests, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {\r\n contentScriptType: string;\r\n contentStyleType: string;\r\n currentScale: number;\r\n readonly currentTranslate: SVGPoint;\r\n readonly height: SVGAnimatedLength;\r\n onabort: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: Event) => any;\r\n onresize: (this: this, ev: UIEvent) => any;\r\n onscroll: (this: this, ev: UIEvent) => any;\r\n onunload: (this: this, ev: Event) => any;\r\n onzoom: (this: this, ev: SVGZoomEvent) => any;\r\n readonly pixelUnitToMillimeterX: number;\r\n readonly pixelUnitToMillimeterY: number;\r\n readonly screenPixelToMillimeterX: number;\r\n readonly screenPixelToMillimeterY: number;\r\n readonly viewport: SVGRect;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n checkEnclosure(element: SVGElement, rect: SVGRect): boolean;\r\n checkIntersection(element: SVGElement, rect: SVGRect): boolean;\r\n createSVGAngle(): SVGAngle;\r\n createSVGLength(): SVGLength;\r\n createSVGMatrix(): SVGMatrix;\r\n createSVGNumber(): SVGNumber;\r\n createSVGPoint(): SVGPoint;\r\n createSVGRect(): SVGRect;\r\n createSVGTransform(): SVGTransform;\r\n createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;\r\n deselectAll(): void;\r\n forceRedraw(): void;\r\n getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;\r\n getCurrentTime(): number;\r\n getElementById(elementId: string): Element;\r\n getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeListOf;\r\n getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeListOf;\r\n pauseAnimations(): void;\r\n setCurrentTime(seconds: number): void;\r\n suspendRedraw(maxWaitMilliseconds: number): number;\r\n unpauseAnimations(): void;\r\n unsuspendRedraw(suspendHandleID: number): void;\r\n unsuspendRedrawAll(): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGAbort\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGError\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGUnload\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGZoom\", listener: (this: this, ev: SVGZoomEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusin\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusout\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGSVGElement: {\r\n prototype: SVGSVGElement;\r\n new(): SVGSVGElement;\r\n}\r\n\r\ninterface SVGScriptElement extends SVGElement, SVGExternalResourcesRequired, SVGURIReference {\r\n type: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGScriptElement: {\r\n prototype: SVGScriptElement;\r\n new(): SVGScriptElement;\r\n}\r\n\r\ninterface SVGStopElement extends SVGElement, SVGStylable {\r\n readonly offset: SVGAnimatedNumber;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGStopElement: {\r\n prototype: SVGStopElement;\r\n new(): SVGStopElement;\r\n}\r\n\r\ninterface SVGStringList {\r\n readonly numberOfItems: number;\r\n appendItem(newItem: string): string;\r\n clear(): void;\r\n getItem(index: number): string;\r\n initialize(newItem: string): string;\r\n insertItemBefore(newItem: string, index: number): string;\r\n removeItem(index: number): string;\r\n replaceItem(newItem: string, index: number): string;\r\n}\r\n\r\ndeclare var SVGStringList: {\r\n prototype: SVGStringList;\r\n new(): SVGStringList;\r\n}\r\n\r\ninterface SVGStyleElement extends SVGElement, SVGLangSpace {\r\n disabled: boolean;\r\n media: string;\r\n title: string;\r\n type: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGStyleElement: {\r\n prototype: SVGStyleElement;\r\n new(): SVGStyleElement;\r\n}\r\n\r\ninterface SVGSwitchElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGSwitchElement: {\r\n prototype: SVGSwitchElement;\r\n new(): SVGSwitchElement;\r\n}\r\n\r\ninterface SVGSymbolElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGSymbolElement: {\r\n prototype: SVGSymbolElement;\r\n new(): SVGSymbolElement;\r\n}\r\n\r\ninterface SVGTSpanElement extends SVGTextPositioningElement {\r\n}\r\n\r\ndeclare var SVGTSpanElement: {\r\n prototype: SVGTSpanElement;\r\n new(): SVGTSpanElement;\r\n}\r\n\r\ninterface SVGTextContentElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n readonly lengthAdjust: SVGAnimatedEnumeration;\r\n readonly textLength: SVGAnimatedLength;\r\n getCharNumAtPosition(point: SVGPoint): number;\r\n getComputedTextLength(): number;\r\n getEndPositionOfChar(charnum: number): SVGPoint;\r\n getExtentOfChar(charnum: number): SVGRect;\r\n getNumberOfChars(): number;\r\n getRotationOfChar(charnum: number): number;\r\n getStartPositionOfChar(charnum: number): SVGPoint;\r\n getSubStringLength(charnum: number, nchars: number): number;\r\n selectSubString(charnum: number, nchars: number): void;\r\n readonly LENGTHADJUST_SPACING: number;\r\n readonly LENGTHADJUST_SPACINGANDGLYPHS: number;\r\n readonly LENGTHADJUST_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTextContentElement: {\r\n prototype: SVGTextContentElement;\r\n new(): SVGTextContentElement;\r\n readonly LENGTHADJUST_SPACING: number;\r\n readonly LENGTHADJUST_SPACINGANDGLYPHS: number;\r\n readonly LENGTHADJUST_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGTextElement extends SVGTextPositioningElement, SVGTransformable {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTextElement: {\r\n prototype: SVGTextElement;\r\n new(): SVGTextElement;\r\n}\r\n\r\ninterface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {\r\n readonly method: SVGAnimatedEnumeration;\r\n readonly spacing: SVGAnimatedEnumeration;\r\n readonly startOffset: SVGAnimatedLength;\r\n readonly TEXTPATH_METHODTYPE_ALIGN: number;\r\n readonly TEXTPATH_METHODTYPE_STRETCH: number;\r\n readonly TEXTPATH_METHODTYPE_UNKNOWN: number;\r\n readonly TEXTPATH_SPACINGTYPE_AUTO: number;\r\n readonly TEXTPATH_SPACINGTYPE_EXACT: number;\r\n readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTextPathElement: {\r\n prototype: SVGTextPathElement;\r\n new(): SVGTextPathElement;\r\n readonly TEXTPATH_METHODTYPE_ALIGN: number;\r\n readonly TEXTPATH_METHODTYPE_STRETCH: number;\r\n readonly TEXTPATH_METHODTYPE_UNKNOWN: number;\r\n readonly TEXTPATH_SPACINGTYPE_AUTO: number;\r\n readonly TEXTPATH_SPACINGTYPE_EXACT: number;\r\n readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGTextPositioningElement extends SVGTextContentElement {\r\n readonly dx: SVGAnimatedLengthList;\r\n readonly dy: SVGAnimatedLengthList;\r\n readonly rotate: SVGAnimatedNumberList;\r\n readonly x: SVGAnimatedLengthList;\r\n readonly y: SVGAnimatedLengthList;\r\n}\r\n\r\ndeclare var SVGTextPositioningElement: {\r\n prototype: SVGTextPositioningElement;\r\n new(): SVGTextPositioningElement;\r\n}\r\n\r\ninterface SVGTitleElement extends SVGElement, SVGStylable, SVGLangSpace {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTitleElement: {\r\n prototype: SVGTitleElement;\r\n new(): SVGTitleElement;\r\n}\r\n\r\ninterface SVGTransform {\r\n readonly angle: number;\r\n readonly matrix: SVGMatrix;\r\n readonly type: number;\r\n setMatrix(matrix: SVGMatrix): void;\r\n setRotate(angle: number, cx: number, cy: number): void;\r\n setScale(sx: number, sy: number): void;\r\n setSkewX(angle: number): void;\r\n setSkewY(angle: number): void;\r\n setTranslate(tx: number, ty: number): void;\r\n readonly SVG_TRANSFORM_MATRIX: number;\r\n readonly SVG_TRANSFORM_ROTATE: number;\r\n readonly SVG_TRANSFORM_SCALE: number;\r\n readonly SVG_TRANSFORM_SKEWX: number;\r\n readonly SVG_TRANSFORM_SKEWY: number;\r\n readonly SVG_TRANSFORM_TRANSLATE: number;\r\n readonly SVG_TRANSFORM_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGTransform: {\r\n prototype: SVGTransform;\r\n new(): SVGTransform;\r\n readonly SVG_TRANSFORM_MATRIX: number;\r\n readonly SVG_TRANSFORM_ROTATE: number;\r\n readonly SVG_TRANSFORM_SCALE: number;\r\n readonly SVG_TRANSFORM_SKEWX: number;\r\n readonly SVG_TRANSFORM_SKEWY: number;\r\n readonly SVG_TRANSFORM_TRANSLATE: number;\r\n readonly SVG_TRANSFORM_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGTransformList {\r\n readonly numberOfItems: number;\r\n appendItem(newItem: SVGTransform): SVGTransform;\r\n clear(): void;\r\n consolidate(): SVGTransform;\r\n createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;\r\n getItem(index: number): SVGTransform;\r\n initialize(newItem: SVGTransform): SVGTransform;\r\n insertItemBefore(newItem: SVGTransform, index: number): SVGTransform;\r\n removeItem(index: number): SVGTransform;\r\n replaceItem(newItem: SVGTransform, index: number): SVGTransform;\r\n}\r\n\r\ndeclare var SVGTransformList: {\r\n prototype: SVGTransformList;\r\n new(): SVGTransformList;\r\n}\r\n\r\ninterface SVGUnitTypes {\r\n readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;\r\n readonly SVG_UNIT_TYPE_UNKNOWN: number;\r\n readonly SVG_UNIT_TYPE_USERSPACEONUSE: number;\r\n}\r\ndeclare var SVGUnitTypes: SVGUnitTypes;\r\n\r\ninterface SVGUseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {\r\n readonly animatedInstanceRoot: SVGElementInstance;\r\n readonly height: SVGAnimatedLength;\r\n readonly instanceRoot: SVGElementInstance;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGUseElement: {\r\n prototype: SVGUseElement;\r\n new(): SVGUseElement;\r\n}\r\n\r\ninterface SVGViewElement extends SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {\r\n readonly viewTarget: SVGStringList;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGViewElement: {\r\n prototype: SVGViewElement;\r\n new(): SVGViewElement;\r\n}\r\n\r\ninterface SVGZoomAndPan {\r\n readonly zoomAndPan: number;\r\n}\r\n\r\ndeclare var SVGZoomAndPan: {\r\n readonly SVG_ZOOMANDPAN_DISABLE: number;\r\n readonly SVG_ZOOMANDPAN_MAGNIFY: number;\r\n readonly SVG_ZOOMANDPAN_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGZoomEvent extends UIEvent {\r\n readonly newScale: number;\r\n readonly newTranslate: SVGPoint;\r\n readonly previousScale: number;\r\n readonly previousTranslate: SVGPoint;\r\n readonly zoomRectScreen: SVGRect;\r\n}\r\n\r\ndeclare var SVGZoomEvent: {\r\n prototype: SVGZoomEvent;\r\n new(): SVGZoomEvent;\r\n}\r\n\r\ninterface Screen extends EventTarget {\r\n readonly availHeight: number;\r\n readonly availWidth: number;\r\n bufferDepth: number;\r\n readonly colorDepth: number;\r\n readonly deviceXDPI: number;\r\n readonly deviceYDPI: number;\r\n readonly fontSmoothingEnabled: boolean;\r\n readonly height: number;\r\n readonly logicalXDPI: number;\r\n readonly logicalYDPI: number;\r\n readonly msOrientation: string;\r\n onmsorientationchange: (this: this, ev: Event) => any;\r\n readonly pixelDepth: number;\r\n readonly systemXDPI: number;\r\n readonly systemYDPI: number;\r\n readonly width: number;\r\n msLockOrientation(orientations: string | string[]): boolean;\r\n msUnlockOrientation(): void;\r\n addEventListener(type: \"MSOrientationChange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Screen: {\r\n prototype: Screen;\r\n new(): Screen;\r\n}\r\n\r\ninterface ScriptNotifyEvent extends Event {\r\n readonly callingUri: string;\r\n readonly value: string;\r\n}\r\n\r\ndeclare var ScriptNotifyEvent: {\r\n prototype: ScriptNotifyEvent;\r\n new(): ScriptNotifyEvent;\r\n}\r\n\r\ninterface ScriptProcessorNode extends AudioNode {\r\n readonly bufferSize: number;\r\n onaudioprocess: (this: this, ev: AudioProcessingEvent) => any;\r\n addEventListener(type: \"audioprocess\", listener: (this: this, ev: AudioProcessingEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var ScriptProcessorNode: {\r\n prototype: ScriptProcessorNode;\r\n new(): ScriptProcessorNode;\r\n}\r\n\r\ninterface Selection {\r\n readonly anchorNode: Node;\r\n readonly anchorOffset: number;\r\n readonly focusNode: Node;\r\n readonly focusOffset: number;\r\n readonly isCollapsed: boolean;\r\n readonly rangeCount: number;\r\n readonly type: string;\r\n addRange(range: Range): void;\r\n collapse(parentNode: Node, offset: number): void;\r\n collapseToEnd(): void;\r\n collapseToStart(): void;\r\n containsNode(node: Node, partlyContained: boolean): boolean;\r\n deleteFromDocument(): void;\r\n empty(): void;\r\n extend(newNode: Node, offset: number): void;\r\n getRangeAt(index: number): Range;\r\n removeAllRanges(): void;\r\n removeRange(range: Range): void;\r\n selectAllChildren(parentNode: Node): void;\r\n setBaseAndExtent(baseNode: Node, baseOffset: number, extentNode: Node, extentOffset: number): void;\r\n toString(): string;\r\n}\r\n\r\ndeclare var Selection: {\r\n prototype: Selection;\r\n new(): Selection;\r\n}\r\n\r\ninterface SourceBuffer extends EventTarget {\r\n appendWindowEnd: number;\r\n appendWindowStart: number;\r\n readonly audioTracks: AudioTrackList;\r\n readonly buffered: TimeRanges;\r\n mode: string;\r\n timestampOffset: number;\r\n readonly updating: boolean;\r\n readonly videoTracks: VideoTrackList;\r\n abort(): void;\r\n appendBuffer(data: ArrayBuffer | ArrayBufferView): void;\r\n appendStream(stream: MSStream, maxSize?: number): void;\r\n remove(start: number, end: number): void;\r\n}\r\n\r\ndeclare var SourceBuffer: {\r\n prototype: SourceBuffer;\r\n new(): SourceBuffer;\r\n}\r\n\r\ninterface SourceBufferList extends EventTarget {\r\n readonly length: number;\r\n item(index: number): SourceBuffer;\r\n [index: number]: SourceBuffer;\r\n}\r\n\r\ndeclare var SourceBufferList: {\r\n prototype: SourceBufferList;\r\n new(): SourceBufferList;\r\n}\r\n\r\ninterface StereoPannerNode extends AudioNode {\r\n readonly pan: AudioParam;\r\n}\r\n\r\ndeclare var StereoPannerNode: {\r\n prototype: StereoPannerNode;\r\n new(): StereoPannerNode;\r\n}\r\n\r\ninterface Storage {\r\n readonly length: number;\r\n clear(): void;\r\n getItem(key: string): string | null;\r\n key(index: number): string | null;\r\n removeItem(key: string): void;\r\n setItem(key: string, data: string): void;\r\n [key: string]: any;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var Storage: {\r\n prototype: Storage;\r\n new(): Storage;\r\n}\r\n\r\ninterface StorageEvent extends Event {\r\n readonly url: string;\r\n key?: string;\r\n oldValue?: string;\r\n newValue?: string;\r\n storageArea?: Storage;\r\n}\r\n\r\ndeclare var StorageEvent: {\r\n prototype: StorageEvent;\r\n new (type: string, eventInitDict?: StorageEventInit): StorageEvent;\r\n}\r\n\r\ninterface StyleMedia {\r\n readonly type: string;\r\n matchMedium(mediaquery: string): boolean;\r\n}\r\n\r\ndeclare var StyleMedia: {\r\n prototype: StyleMedia;\r\n new(): StyleMedia;\r\n}\r\n\r\ninterface StyleSheet {\r\n disabled: boolean;\r\n readonly href: string;\r\n readonly media: MediaList;\r\n readonly ownerNode: Node;\r\n readonly parentStyleSheet: StyleSheet;\r\n readonly title: string;\r\n readonly type: string;\r\n}\r\n\r\ndeclare var StyleSheet: {\r\n prototype: StyleSheet;\r\n new(): StyleSheet;\r\n}\r\n\r\ninterface StyleSheetList {\r\n readonly length: number;\r\n item(index?: number): StyleSheet;\r\n [index: number]: StyleSheet;\r\n}\r\n\r\ndeclare var StyleSheetList: {\r\n prototype: StyleSheetList;\r\n new(): StyleSheetList;\r\n}\r\n\r\ninterface StyleSheetPageList {\r\n readonly length: number;\r\n item(index: number): CSSPageRule;\r\n [index: number]: CSSPageRule;\r\n}\r\n\r\ndeclare var StyleSheetPageList: {\r\n prototype: StyleSheetPageList;\r\n new(): StyleSheetPageList;\r\n}\r\n\r\ninterface SubtleCrypto {\r\n decrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike;\r\n deriveBits(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): PromiseLike;\r\n deriveKey(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike;\r\n digest(algorithm: AlgorithmIdentifier, data: BufferSource): PromiseLike;\r\n encrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike;\r\n exportKey(format: \"jwk\", key: CryptoKey): PromiseLike;\r\n exportKey(format: \"raw\" | \"pkcs8\" | \"spki\", key: CryptoKey): PromiseLike;\r\n exportKey(format: string, key: CryptoKey): PromiseLike;\r\n generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): PromiseLike;\r\n generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: string[]): PromiseLike;\r\n generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike;\r\n importKey(format: \"jwk\", keyData: JsonWebKey, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike;\r\n importKey(format: \"raw\" | \"pkcs8\" | \"spki\", keyData: BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike;\r\n importKey(format: string, keyData: JsonWebKey | BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike;\r\n sign(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: BufferSource): PromiseLike;\r\n unwrapKey(format: string, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: string[]): PromiseLike;\r\n verify(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: BufferSource, data: BufferSource): PromiseLike;\r\n wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier): PromiseLike;\r\n}\r\n\r\ndeclare var SubtleCrypto: {\r\n prototype: SubtleCrypto;\r\n new(): SubtleCrypto;\r\n}\r\n\r\ninterface Text extends CharacterData {\r\n readonly wholeText: string;\r\n splitText(offset: number): Text;\r\n}\r\n\r\ndeclare var Text: {\r\n prototype: Text;\r\n new(): Text;\r\n}\r\n\r\ninterface TextEvent extends UIEvent {\r\n readonly data: string;\r\n readonly inputMethod: number;\r\n readonly locale: string;\r\n initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void;\r\n readonly DOM_INPUT_METHOD_DROP: number;\r\n readonly DOM_INPUT_METHOD_HANDWRITING: number;\r\n readonly DOM_INPUT_METHOD_IME: number;\r\n readonly DOM_INPUT_METHOD_KEYBOARD: number;\r\n readonly DOM_INPUT_METHOD_MULTIMODAL: number;\r\n readonly DOM_INPUT_METHOD_OPTION: number;\r\n readonly DOM_INPUT_METHOD_PASTE: number;\r\n readonly DOM_INPUT_METHOD_SCRIPT: number;\r\n readonly DOM_INPUT_METHOD_UNKNOWN: number;\r\n readonly DOM_INPUT_METHOD_VOICE: number;\r\n}\r\n\r\ndeclare var TextEvent: {\r\n prototype: TextEvent;\r\n new(): TextEvent;\r\n readonly DOM_INPUT_METHOD_DROP: number;\r\n readonly DOM_INPUT_METHOD_HANDWRITING: number;\r\n readonly DOM_INPUT_METHOD_IME: number;\r\n readonly DOM_INPUT_METHOD_KEYBOARD: number;\r\n readonly DOM_INPUT_METHOD_MULTIMODAL: number;\r\n readonly DOM_INPUT_METHOD_OPTION: number;\r\n readonly DOM_INPUT_METHOD_PASTE: number;\r\n readonly DOM_INPUT_METHOD_SCRIPT: number;\r\n readonly DOM_INPUT_METHOD_UNKNOWN: number;\r\n readonly DOM_INPUT_METHOD_VOICE: number;\r\n}\r\n\r\ninterface TextMetrics {\r\n readonly width: number;\r\n}\r\n\r\ndeclare var TextMetrics: {\r\n prototype: TextMetrics;\r\n new(): TextMetrics;\r\n}\r\n\r\ninterface TextTrack extends EventTarget {\r\n readonly activeCues: TextTrackCueList;\r\n readonly cues: TextTrackCueList;\r\n readonly inBandMetadataTrackDispatchType: string;\r\n readonly kind: string;\r\n readonly label: string;\r\n readonly language: string;\r\n mode: any;\r\n oncuechange: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n readonly readyState: number;\r\n addCue(cue: TextTrackCue): void;\r\n removeCue(cue: TextTrackCue): void;\r\n readonly DISABLED: number;\r\n readonly ERROR: number;\r\n readonly HIDDEN: number;\r\n readonly LOADED: number;\r\n readonly LOADING: number;\r\n readonly NONE: number;\r\n readonly SHOWING: number;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var TextTrack: {\r\n prototype: TextTrack;\r\n new(): TextTrack;\r\n readonly DISABLED: number;\r\n readonly ERROR: number;\r\n readonly HIDDEN: number;\r\n readonly LOADED: number;\r\n readonly LOADING: number;\r\n readonly NONE: number;\r\n readonly SHOWING: number;\r\n}\r\n\r\ninterface TextTrackCue extends EventTarget {\r\n endTime: number;\r\n id: string;\r\n onenter: (this: this, ev: Event) => any;\r\n onexit: (this: this, ev: Event) => any;\r\n pauseOnExit: boolean;\r\n startTime: number;\r\n text: string;\r\n readonly track: TextTrack;\r\n getCueAsHTML(): DocumentFragment;\r\n addEventListener(type: \"enter\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"exit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var TextTrackCue: {\r\n prototype: TextTrackCue;\r\n new(startTime: number, endTime: number, text: string): TextTrackCue;\r\n}\r\n\r\ninterface TextTrackCueList {\r\n readonly length: number;\r\n getCueById(id: string): TextTrackCue;\r\n item(index: number): TextTrackCue;\r\n [index: number]: TextTrackCue;\r\n}\r\n\r\ndeclare var TextTrackCueList: {\r\n prototype: TextTrackCueList;\r\n new(): TextTrackCueList;\r\n}\r\n\r\ninterface TextTrackList extends EventTarget {\r\n readonly length: number;\r\n onaddtrack: ((this: this, ev: TrackEvent) => any) | null;\r\n item(index: number): TextTrack;\r\n addEventListener(type: \"addtrack\", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: TextTrack;\r\n}\r\n\r\ndeclare var TextTrackList: {\r\n prototype: TextTrackList;\r\n new(): TextTrackList;\r\n}\r\n\r\ninterface TimeRanges {\r\n readonly length: number;\r\n end(index: number): number;\r\n start(index: number): number;\r\n}\r\n\r\ndeclare var TimeRanges: {\r\n prototype: TimeRanges;\r\n new(): TimeRanges;\r\n}\r\n\r\ninterface Touch {\r\n readonly clientX: number;\r\n readonly clientY: number;\r\n readonly identifier: number;\r\n readonly pageX: number;\r\n readonly pageY: number;\r\n readonly screenX: number;\r\n readonly screenY: number;\r\n readonly target: EventTarget;\r\n}\r\n\r\ndeclare var Touch: {\r\n prototype: Touch;\r\n new(): Touch;\r\n}\r\n\r\ninterface TouchEvent extends UIEvent {\r\n readonly altKey: boolean;\r\n readonly changedTouches: TouchList;\r\n readonly ctrlKey: boolean;\r\n readonly metaKey: boolean;\r\n readonly shiftKey: boolean;\r\n readonly targetTouches: TouchList;\r\n readonly touches: TouchList;\r\n}\r\n\r\ndeclare var TouchEvent: {\r\n prototype: TouchEvent;\r\n new(): TouchEvent;\r\n}\r\n\r\ninterface TouchList {\r\n readonly length: number;\r\n item(index: number): Touch | null;\r\n [index: number]: Touch;\r\n}\r\n\r\ndeclare var TouchList: {\r\n prototype: TouchList;\r\n new(): TouchList;\r\n}\r\n\r\ninterface TrackEvent extends Event {\r\n readonly track: any;\r\n}\r\n\r\ndeclare var TrackEvent: {\r\n prototype: TrackEvent;\r\n new(): TrackEvent;\r\n}\r\n\r\ninterface TransitionEvent extends Event {\r\n readonly elapsedTime: number;\r\n readonly propertyName: string;\r\n initTransitionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, propertyNameArg: string, elapsedTimeArg: number): void;\r\n}\r\n\r\ndeclare var TransitionEvent: {\r\n prototype: TransitionEvent;\r\n new(): TransitionEvent;\r\n}\r\n\r\ninterface TreeWalker {\r\n currentNode: Node;\r\n readonly expandEntityReferences: boolean;\r\n readonly filter: NodeFilter;\r\n readonly root: Node;\r\n readonly whatToShow: number;\r\n firstChild(): Node;\r\n lastChild(): Node;\r\n nextNode(): Node;\r\n nextSibling(): Node;\r\n parentNode(): Node;\r\n previousNode(): Node;\r\n previousSibling(): Node;\r\n}\r\n\r\ndeclare var TreeWalker: {\r\n prototype: TreeWalker;\r\n new(): TreeWalker;\r\n}\r\n\r\ninterface UIEvent extends Event {\r\n readonly detail: number;\r\n readonly view: Window;\r\n initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number): void;\r\n}\r\n\r\ndeclare var UIEvent: {\r\n prototype: UIEvent;\r\n new(type: string, eventInitDict?: UIEventInit): UIEvent;\r\n}\r\n\r\ninterface URL {\r\n hash: string;\r\n host: string;\r\n hostname: string;\r\n href: string;\r\n readonly origin: string;\r\n password: string;\r\n pathname: string;\r\n port: string;\r\n protocol: string;\r\n search: string;\r\n username: string;\r\n toString(): string;\r\n}\r\n\r\ndeclare var URL: {\r\n prototype: URL;\r\n new(url: string, base?: string): URL;\r\n createObjectURL(object: any, options?: ObjectURLOptions): string;\r\n revokeObjectURL(url: string): void;\r\n}\r\n\r\ninterface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {\r\n readonly mediaType: string;\r\n}\r\n\r\ndeclare var UnviewableContentIdentifiedEvent: {\r\n prototype: UnviewableContentIdentifiedEvent;\r\n new(): UnviewableContentIdentifiedEvent;\r\n}\r\n\r\ninterface ValidityState {\r\n readonly badInput: boolean;\r\n readonly customError: boolean;\r\n readonly patternMismatch: boolean;\r\n readonly rangeOverflow: boolean;\r\n readonly rangeUnderflow: boolean;\r\n readonly stepMismatch: boolean;\r\n readonly tooLong: boolean;\r\n readonly typeMismatch: boolean;\r\n readonly valid: boolean;\r\n readonly valueMissing: boolean;\r\n}\r\n\r\ndeclare var ValidityState: {\r\n prototype: ValidityState;\r\n new(): ValidityState;\r\n}\r\n\r\ninterface VideoPlaybackQuality {\r\n readonly corruptedVideoFrames: number;\r\n readonly creationTime: number;\r\n readonly droppedVideoFrames: number;\r\n readonly totalFrameDelay: number;\r\n readonly totalVideoFrames: number;\r\n}\r\n\r\ndeclare var VideoPlaybackQuality: {\r\n prototype: VideoPlaybackQuality;\r\n new(): VideoPlaybackQuality;\r\n}\r\n\r\ninterface VideoTrack {\r\n readonly id: string;\r\n kind: string;\r\n readonly label: string;\r\n language: string;\r\n selected: boolean;\r\n readonly sourceBuffer: SourceBuffer;\r\n}\r\n\r\ndeclare var VideoTrack: {\r\n prototype: VideoTrack;\r\n new(): VideoTrack;\r\n}\r\n\r\ninterface VideoTrackList extends EventTarget {\r\n readonly length: number;\r\n onaddtrack: (this: this, ev: TrackEvent) => any;\r\n onchange: (this: this, ev: Event) => any;\r\n onremovetrack: (this: this, ev: TrackEvent) => any;\r\n readonly selectedIndex: number;\r\n getTrackById(id: string): VideoTrack | null;\r\n item(index: number): VideoTrack;\r\n addEventListener(type: \"addtrack\", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"removetrack\", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: VideoTrack;\r\n}\r\n\r\ndeclare var VideoTrackList: {\r\n prototype: VideoTrackList;\r\n new(): VideoTrackList;\r\n}\r\n\r\ninterface WEBGL_compressed_texture_s3tc {\r\n readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;\r\n readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;\r\n readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;\r\n readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;\r\n}\r\n\r\ndeclare var WEBGL_compressed_texture_s3tc: {\r\n prototype: WEBGL_compressed_texture_s3tc;\r\n new(): WEBGL_compressed_texture_s3tc;\r\n readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;\r\n readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;\r\n readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;\r\n readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;\r\n}\r\n\r\ninterface WEBGL_debug_renderer_info {\r\n readonly UNMASKED_RENDERER_WEBGL: number;\r\n readonly UNMASKED_VENDOR_WEBGL: number;\r\n}\r\n\r\ndeclare var WEBGL_debug_renderer_info: {\r\n prototype: WEBGL_debug_renderer_info;\r\n new(): WEBGL_debug_renderer_info;\r\n readonly UNMASKED_RENDERER_WEBGL: number;\r\n readonly UNMASKED_VENDOR_WEBGL: number;\r\n}\r\n\r\ninterface WEBGL_depth_texture {\r\n readonly UNSIGNED_INT_24_8_WEBGL: number;\r\n}\r\n\r\ndeclare var WEBGL_depth_texture: {\r\n prototype: WEBGL_depth_texture;\r\n new(): WEBGL_depth_texture;\r\n readonly UNSIGNED_INT_24_8_WEBGL: number;\r\n}\r\n\r\ninterface WaveShaperNode extends AudioNode {\r\n curve: Float32Array | null;\r\n oversample: string;\r\n}\r\n\r\ndeclare var WaveShaperNode: {\r\n prototype: WaveShaperNode;\r\n new(): WaveShaperNode;\r\n}\r\n\r\ninterface WebGLActiveInfo {\r\n readonly name: string;\r\n readonly size: number;\r\n readonly type: number;\r\n}\r\n\r\ndeclare var WebGLActiveInfo: {\r\n prototype: WebGLActiveInfo;\r\n new(): WebGLActiveInfo;\r\n}\r\n\r\ninterface WebGLBuffer extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLBuffer: {\r\n prototype: WebGLBuffer;\r\n new(): WebGLBuffer;\r\n}\r\n\r\ninterface WebGLContextEvent extends Event {\r\n readonly statusMessage: string;\r\n}\r\n\r\ndeclare var WebGLContextEvent: {\r\n prototype: WebGLContextEvent;\r\n new(type: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent;\r\n}\r\n\r\ninterface WebGLFramebuffer extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLFramebuffer: {\r\n prototype: WebGLFramebuffer;\r\n new(): WebGLFramebuffer;\r\n}\r\n\r\ninterface WebGLObject {\r\n}\r\n\r\ndeclare var WebGLObject: {\r\n prototype: WebGLObject;\r\n new(): WebGLObject;\r\n}\r\n\r\ninterface WebGLProgram extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLProgram: {\r\n prototype: WebGLProgram;\r\n new(): WebGLProgram;\r\n}\r\n\r\ninterface WebGLRenderbuffer extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLRenderbuffer: {\r\n prototype: WebGLRenderbuffer;\r\n new(): WebGLRenderbuffer;\r\n}\r\n\r\ninterface WebGLRenderingContext {\r\n readonly canvas: HTMLCanvasElement;\r\n readonly drawingBufferHeight: number;\r\n readonly drawingBufferWidth: number;\r\n activeTexture(texture: number): void;\r\n attachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;\r\n bindAttribLocation(program: WebGLProgram | null, index: number, name: string): void;\r\n bindBuffer(target: number, buffer: WebGLBuffer | null): void;\r\n bindFramebuffer(target: number, framebuffer: WebGLFramebuffer | null): void;\r\n bindRenderbuffer(target: number, renderbuffer: WebGLRenderbuffer | null): void;\r\n bindTexture(target: number, texture: WebGLTexture | null): void;\r\n blendColor(red: number, green: number, blue: number, alpha: number): void;\r\n blendEquation(mode: number): void;\r\n blendEquationSeparate(modeRGB: number, modeAlpha: number): void;\r\n blendFunc(sfactor: number, dfactor: number): void;\r\n blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;\r\n bufferData(target: number, size: number | ArrayBufferView | ArrayBuffer, usage: number): void;\r\n bufferSubData(target: number, offset: number, data: ArrayBufferView | ArrayBuffer): void;\r\n checkFramebufferStatus(target: number): number;\r\n clear(mask: number): void;\r\n clearColor(red: number, green: number, blue: number, alpha: number): void;\r\n clearDepth(depth: number): void;\r\n clearStencil(s: number): void;\r\n colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;\r\n compileShader(shader: WebGLShader | null): void;\r\n compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;\r\n compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;\r\n copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;\r\n copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;\r\n createBuffer(): WebGLBuffer | null;\r\n createFramebuffer(): WebGLFramebuffer | null;\r\n createProgram(): WebGLProgram | null;\r\n createRenderbuffer(): WebGLRenderbuffer | null;\r\n createShader(type: number): WebGLShader | null;\r\n createTexture(): WebGLTexture | null;\r\n cullFace(mode: number): void;\r\n deleteBuffer(buffer: WebGLBuffer | null): void;\r\n deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;\r\n deleteProgram(program: WebGLProgram | null): void;\r\n deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;\r\n deleteShader(shader: WebGLShader | null): void;\r\n deleteTexture(texture: WebGLTexture | null): void;\r\n depthFunc(func: number): void;\r\n depthMask(flag: boolean): void;\r\n depthRange(zNear: number, zFar: number): void;\r\n detachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;\r\n disable(cap: number): void;\r\n disableVertexAttribArray(index: number): void;\r\n drawArrays(mode: number, first: number, count: number): void;\r\n drawElements(mode: number, count: number, type: number, offset: number): void;\r\n enable(cap: number): void;\r\n enableVertexAttribArray(index: number): void;\r\n finish(): void;\r\n flush(): void;\r\n framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: WebGLRenderbuffer | null): void;\r\n framebufferTexture2D(target: number, attachment: number, textarget: number, texture: WebGLTexture | null, level: number): void;\r\n frontFace(mode: number): void;\r\n generateMipmap(target: number): void;\r\n getActiveAttrib(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;\r\n getActiveUniform(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;\r\n getAttachedShaders(program: WebGLProgram | null): WebGLShader[] | null;\r\n getAttribLocation(program: WebGLProgram | null, name: string): number;\r\n getBufferParameter(target: number, pname: number): any;\r\n getContextAttributes(): WebGLContextAttributes;\r\n getError(): number;\r\n getExtension(name: string): any;\r\n getFramebufferAttachmentParameter(target: number, attachment: number, pname: number): any;\r\n getParameter(pname: number): any;\r\n getProgramInfoLog(program: WebGLProgram | null): string | null;\r\n getProgramParameter(program: WebGLProgram | null, pname: number): any;\r\n getRenderbufferParameter(target: number, pname: number): any;\r\n getShaderInfoLog(shader: WebGLShader | null): string | null;\r\n getShaderParameter(shader: WebGLShader | null, pname: number): any;\r\n getShaderPrecisionFormat(shadertype: number, precisiontype: number): WebGLShaderPrecisionFormat | null;\r\n getShaderSource(shader: WebGLShader | null): string | null;\r\n getSupportedExtensions(): string[] | null;\r\n getTexParameter(target: number, pname: number): any;\r\n getUniform(program: WebGLProgram | null, location: WebGLUniformLocation | null): any;\r\n getUniformLocation(program: WebGLProgram | null, name: string): WebGLUniformLocation | null;\r\n getVertexAttrib(index: number, pname: number): any;\r\n getVertexAttribOffset(index: number, pname: number): number;\r\n hint(target: number, mode: number): void;\r\n isBuffer(buffer: WebGLBuffer | null): boolean;\r\n isContextLost(): boolean;\r\n isEnabled(cap: number): boolean;\r\n isFramebuffer(framebuffer: WebGLFramebuffer | null): boolean;\r\n isProgram(program: WebGLProgram | null): boolean;\r\n isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): boolean;\r\n isShader(shader: WebGLShader | null): boolean;\r\n isTexture(texture: WebGLTexture | null): boolean;\r\n lineWidth(width: number): void;\r\n linkProgram(program: WebGLProgram | null): void;\r\n pixelStorei(pname: number, param: number): void;\r\n polygonOffset(factor: number, units: number): void;\r\n readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView | null): void;\r\n renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;\r\n sampleCoverage(value: number, invert: boolean): void;\r\n scissor(x: number, y: number, width: number, height: number): void;\r\n shaderSource(shader: WebGLShader | null, source: string): void;\r\n stencilFunc(func: number, ref: number, mask: number): void;\r\n stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void;\r\n stencilMask(mask: number): void;\r\n stencilMaskSeparate(face: number, mask: number): void;\r\n stencilOp(fail: number, zfail: number, zpass: number): void;\r\n stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void;\r\n texImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, format: number, type: number, pixels?: ArrayBufferView): void;\r\n texImage2D(target: number, level: number, internalformat: number, format: number, type: number, pixels?: ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;\r\n texParameterf(target: number, pname: number, param: number): void;\r\n texParameteri(target: number, pname: number, param: number): void;\r\n texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, type: number, pixels?: ArrayBufferView): void;\r\n texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, pixels?: ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;\r\n uniform1f(location: WebGLUniformLocation | null, x: number): void;\r\n uniform1fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;\r\n uniform1i(location: WebGLUniformLocation | null, x: number): void;\r\n uniform1iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;\r\n uniform2f(location: WebGLUniformLocation | null, x: number, y: number): void;\r\n uniform2fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;\r\n uniform2i(location: WebGLUniformLocation | null, x: number, y: number): void;\r\n uniform2iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;\r\n uniform3f(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;\r\n uniform3fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;\r\n uniform3i(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;\r\n uniform3iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;\r\n uniform4f(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;\r\n uniform4fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;\r\n uniform4i(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;\r\n uniform4iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;\r\n uniformMatrix2fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;\r\n uniformMatrix3fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;\r\n uniformMatrix4fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;\r\n useProgram(program: WebGLProgram | null): void;\r\n validateProgram(program: WebGLProgram | null): void;\r\n vertexAttrib1f(indx: number, x: number): void;\r\n vertexAttrib1fv(indx: number, values: Float32Array | number[]): void;\r\n vertexAttrib2f(indx: number, x: number, y: number): void;\r\n vertexAttrib2fv(indx: number, values: Float32Array | number[]): void;\r\n vertexAttrib3f(indx: number, x: number, y: number, z: number): void;\r\n vertexAttrib3fv(indx: number, values: Float32Array | number[]): void;\r\n vertexAttrib4f(indx: number, x: number, y: number, z: number, w: number): void;\r\n vertexAttrib4fv(indx: number, values: Float32Array | number[]): void;\r\n vertexAttribPointer(indx: number, size: number, type: number, normalized: boolean, stride: number, offset: number): void;\r\n viewport(x: number, y: number, width: number, height: number): void;\r\n readonly ACTIVE_ATTRIBUTES: number;\r\n readonly ACTIVE_TEXTURE: number;\r\n readonly ACTIVE_UNIFORMS: number;\r\n readonly ALIASED_LINE_WIDTH_RANGE: number;\r\n readonly ALIASED_POINT_SIZE_RANGE: number;\r\n readonly ALPHA: number;\r\n readonly ALPHA_BITS: number;\r\n readonly ALWAYS: number;\r\n readonly ARRAY_BUFFER: number;\r\n readonly ARRAY_BUFFER_BINDING: number;\r\n readonly ATTACHED_SHADERS: number;\r\n readonly BACK: number;\r\n readonly BLEND: number;\r\n readonly BLEND_COLOR: number;\r\n readonly BLEND_DST_ALPHA: number;\r\n readonly BLEND_DST_RGB: number;\r\n readonly BLEND_EQUATION: number;\r\n readonly BLEND_EQUATION_ALPHA: number;\r\n readonly BLEND_EQUATION_RGB: number;\r\n readonly BLEND_SRC_ALPHA: number;\r\n readonly BLEND_SRC_RGB: number;\r\n readonly BLUE_BITS: number;\r\n readonly BOOL: number;\r\n readonly BOOL_VEC2: number;\r\n readonly BOOL_VEC3: number;\r\n readonly BOOL_VEC4: number;\r\n readonly BROWSER_DEFAULT_WEBGL: number;\r\n readonly BUFFER_SIZE: number;\r\n readonly BUFFER_USAGE: number;\r\n readonly BYTE: number;\r\n readonly CCW: number;\r\n readonly CLAMP_TO_EDGE: number;\r\n readonly COLOR_ATTACHMENT0: number;\r\n readonly COLOR_BUFFER_BIT: number;\r\n readonly COLOR_CLEAR_VALUE: number;\r\n readonly COLOR_WRITEMASK: number;\r\n readonly COMPILE_STATUS: number;\r\n readonly COMPRESSED_TEXTURE_FORMATS: number;\r\n readonly CONSTANT_ALPHA: number;\r\n readonly CONSTANT_COLOR: number;\r\n readonly CONTEXT_LOST_WEBGL: number;\r\n readonly CULL_FACE: number;\r\n readonly CULL_FACE_MODE: number;\r\n readonly CURRENT_PROGRAM: number;\r\n readonly CURRENT_VERTEX_ATTRIB: number;\r\n readonly CW: number;\r\n readonly DECR: number;\r\n readonly DECR_WRAP: number;\r\n readonly DELETE_STATUS: number;\r\n readonly DEPTH_ATTACHMENT: number;\r\n readonly DEPTH_BITS: number;\r\n readonly DEPTH_BUFFER_BIT: number;\r\n readonly DEPTH_CLEAR_VALUE: number;\r\n readonly DEPTH_COMPONENT: number;\r\n readonly DEPTH_COMPONENT16: number;\r\n readonly DEPTH_FUNC: number;\r\n readonly DEPTH_RANGE: number;\r\n readonly DEPTH_STENCIL: number;\r\n readonly DEPTH_STENCIL_ATTACHMENT: number;\r\n readonly DEPTH_TEST: number;\r\n readonly DEPTH_WRITEMASK: number;\r\n readonly DITHER: number;\r\n readonly DONT_CARE: number;\r\n readonly DST_ALPHA: number;\r\n readonly DST_COLOR: number;\r\n readonly DYNAMIC_DRAW: number;\r\n readonly ELEMENT_ARRAY_BUFFER: number;\r\n readonly ELEMENT_ARRAY_BUFFER_BINDING: number;\r\n readonly EQUAL: number;\r\n readonly FASTEST: number;\r\n readonly FLOAT: number;\r\n readonly FLOAT_MAT2: number;\r\n readonly FLOAT_MAT3: number;\r\n readonly FLOAT_MAT4: number;\r\n readonly FLOAT_VEC2: number;\r\n readonly FLOAT_VEC3: number;\r\n readonly FLOAT_VEC4: number;\r\n readonly FRAGMENT_SHADER: number;\r\n readonly FRAMEBUFFER: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;\r\n readonly FRAMEBUFFER_BINDING: number;\r\n readonly FRAMEBUFFER_COMPLETE: number;\r\n readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;\r\n readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;\r\n readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;\r\n readonly FRAMEBUFFER_UNSUPPORTED: number;\r\n readonly FRONT: number;\r\n readonly FRONT_AND_BACK: number;\r\n readonly FRONT_FACE: number;\r\n readonly FUNC_ADD: number;\r\n readonly FUNC_REVERSE_SUBTRACT: number;\r\n readonly FUNC_SUBTRACT: number;\r\n readonly GENERATE_MIPMAP_HINT: number;\r\n readonly GEQUAL: number;\r\n readonly GREATER: number;\r\n readonly GREEN_BITS: number;\r\n readonly HIGH_FLOAT: number;\r\n readonly HIGH_INT: number;\r\n readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;\r\n readonly IMPLEMENTATION_COLOR_READ_TYPE: number;\r\n readonly INCR: number;\r\n readonly INCR_WRAP: number;\r\n readonly INT: number;\r\n readonly INT_VEC2: number;\r\n readonly INT_VEC3: number;\r\n readonly INT_VEC4: number;\r\n readonly INVALID_ENUM: number;\r\n readonly INVALID_FRAMEBUFFER_OPERATION: number;\r\n readonly INVALID_OPERATION: number;\r\n readonly INVALID_VALUE: number;\r\n readonly INVERT: number;\r\n readonly KEEP: number;\r\n readonly LEQUAL: number;\r\n readonly LESS: number;\r\n readonly LINEAR: number;\r\n readonly LINEAR_MIPMAP_LINEAR: number;\r\n readonly LINEAR_MIPMAP_NEAREST: number;\r\n readonly LINES: number;\r\n readonly LINE_LOOP: number;\r\n readonly LINE_STRIP: number;\r\n readonly LINE_WIDTH: number;\r\n readonly LINK_STATUS: number;\r\n readonly LOW_FLOAT: number;\r\n readonly LOW_INT: number;\r\n readonly LUMINANCE: number;\r\n readonly LUMINANCE_ALPHA: number;\r\n readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;\r\n readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;\r\n readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;\r\n readonly MAX_RENDERBUFFER_SIZE: number;\r\n readonly MAX_TEXTURE_IMAGE_UNITS: number;\r\n readonly MAX_TEXTURE_SIZE: number;\r\n readonly MAX_VARYING_VECTORS: number;\r\n readonly MAX_VERTEX_ATTRIBS: number;\r\n readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;\r\n readonly MAX_VERTEX_UNIFORM_VECTORS: number;\r\n readonly MAX_VIEWPORT_DIMS: number;\r\n readonly MEDIUM_FLOAT: number;\r\n readonly MEDIUM_INT: number;\r\n readonly MIRRORED_REPEAT: number;\r\n readonly NEAREST: number;\r\n readonly NEAREST_MIPMAP_LINEAR: number;\r\n readonly NEAREST_MIPMAP_NEAREST: number;\r\n readonly NEVER: number;\r\n readonly NICEST: number;\r\n readonly NONE: number;\r\n readonly NOTEQUAL: number;\r\n readonly NO_ERROR: number;\r\n readonly ONE: number;\r\n readonly ONE_MINUS_CONSTANT_ALPHA: number;\r\n readonly ONE_MINUS_CONSTANT_COLOR: number;\r\n readonly ONE_MINUS_DST_ALPHA: number;\r\n readonly ONE_MINUS_DST_COLOR: number;\r\n readonly ONE_MINUS_SRC_ALPHA: number;\r\n readonly ONE_MINUS_SRC_COLOR: number;\r\n readonly OUT_OF_MEMORY: number;\r\n readonly PACK_ALIGNMENT: number;\r\n readonly POINTS: number;\r\n readonly POLYGON_OFFSET_FACTOR: number;\r\n readonly POLYGON_OFFSET_FILL: number;\r\n readonly POLYGON_OFFSET_UNITS: number;\r\n readonly RED_BITS: number;\r\n readonly RENDERBUFFER: number;\r\n readonly RENDERBUFFER_ALPHA_SIZE: number;\r\n readonly RENDERBUFFER_BINDING: number;\r\n readonly RENDERBUFFER_BLUE_SIZE: number;\r\n readonly RENDERBUFFER_DEPTH_SIZE: number;\r\n readonly RENDERBUFFER_GREEN_SIZE: number;\r\n readonly RENDERBUFFER_HEIGHT: number;\r\n readonly RENDERBUFFER_INTERNAL_FORMAT: number;\r\n readonly RENDERBUFFER_RED_SIZE: number;\r\n readonly RENDERBUFFER_STENCIL_SIZE: number;\r\n readonly RENDERBUFFER_WIDTH: number;\r\n readonly RENDERER: number;\r\n readonly REPEAT: number;\r\n readonly REPLACE: number;\r\n readonly RGB: number;\r\n readonly RGB565: number;\r\n readonly RGB5_A1: number;\r\n readonly RGBA: number;\r\n readonly RGBA4: number;\r\n readonly SAMPLER_2D: number;\r\n readonly SAMPLER_CUBE: number;\r\n readonly SAMPLES: number;\r\n readonly SAMPLE_ALPHA_TO_COVERAGE: number;\r\n readonly SAMPLE_BUFFERS: number;\r\n readonly SAMPLE_COVERAGE: number;\r\n readonly SAMPLE_COVERAGE_INVERT: number;\r\n readonly SAMPLE_COVERAGE_VALUE: number;\r\n readonly SCISSOR_BOX: number;\r\n readonly SCISSOR_TEST: number;\r\n readonly SHADER_TYPE: number;\r\n readonly SHADING_LANGUAGE_VERSION: number;\r\n readonly SHORT: number;\r\n readonly SRC_ALPHA: number;\r\n readonly SRC_ALPHA_SATURATE: number;\r\n readonly SRC_COLOR: number;\r\n readonly STATIC_DRAW: number;\r\n readonly STENCIL_ATTACHMENT: number;\r\n readonly STENCIL_BACK_FAIL: number;\r\n readonly STENCIL_BACK_FUNC: number;\r\n readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;\r\n readonly STENCIL_BACK_PASS_DEPTH_PASS: number;\r\n readonly STENCIL_BACK_REF: number;\r\n readonly STENCIL_BACK_VALUE_MASK: number;\r\n readonly STENCIL_BACK_WRITEMASK: number;\r\n readonly STENCIL_BITS: number;\r\n readonly STENCIL_BUFFER_BIT: number;\r\n readonly STENCIL_CLEAR_VALUE: number;\r\n readonly STENCIL_FAIL: number;\r\n readonly STENCIL_FUNC: number;\r\n readonly STENCIL_INDEX: number;\r\n readonly STENCIL_INDEX8: number;\r\n readonly STENCIL_PASS_DEPTH_FAIL: number;\r\n readonly STENCIL_PASS_DEPTH_PASS: number;\r\n readonly STENCIL_REF: number;\r\n readonly STENCIL_TEST: number;\r\n readonly STENCIL_VALUE_MASK: number;\r\n readonly STENCIL_WRITEMASK: number;\r\n readonly STREAM_DRAW: number;\r\n readonly SUBPIXEL_BITS: number;\r\n readonly TEXTURE: number;\r\n readonly TEXTURE0: number;\r\n readonly TEXTURE1: number;\r\n readonly TEXTURE10: number;\r\n readonly TEXTURE11: number;\r\n readonly TEXTURE12: number;\r\n readonly TEXTURE13: number;\r\n readonly TEXTURE14: number;\r\n readonly TEXTURE15: number;\r\n readonly TEXTURE16: number;\r\n readonly TEXTURE17: number;\r\n readonly TEXTURE18: number;\r\n readonly TEXTURE19: number;\r\n readonly TEXTURE2: number;\r\n readonly TEXTURE20: number;\r\n readonly TEXTURE21: number;\r\n readonly TEXTURE22: number;\r\n readonly TEXTURE23: number;\r\n readonly TEXTURE24: number;\r\n readonly TEXTURE25: number;\r\n readonly TEXTURE26: number;\r\n readonly TEXTURE27: number;\r\n readonly TEXTURE28: number;\r\n readonly TEXTURE29: number;\r\n readonly TEXTURE3: number;\r\n readonly TEXTURE30: number;\r\n readonly TEXTURE31: number;\r\n readonly TEXTURE4: number;\r\n readonly TEXTURE5: number;\r\n readonly TEXTURE6: number;\r\n readonly TEXTURE7: number;\r\n readonly TEXTURE8: number;\r\n readonly TEXTURE9: number;\r\n readonly TEXTURE_2D: number;\r\n readonly TEXTURE_BINDING_2D: number;\r\n readonly TEXTURE_BINDING_CUBE_MAP: number;\r\n readonly TEXTURE_CUBE_MAP: number;\r\n readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;\r\n readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;\r\n readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;\r\n readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;\r\n readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;\r\n readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;\r\n readonly TEXTURE_MAG_FILTER: number;\r\n readonly TEXTURE_MIN_FILTER: number;\r\n readonly TEXTURE_WRAP_S: number;\r\n readonly TEXTURE_WRAP_T: number;\r\n readonly TRIANGLES: number;\r\n readonly TRIANGLE_FAN: number;\r\n readonly TRIANGLE_STRIP: number;\r\n readonly UNPACK_ALIGNMENT: number;\r\n readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;\r\n readonly UNPACK_FLIP_Y_WEBGL: number;\r\n readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;\r\n readonly UNSIGNED_BYTE: number;\r\n readonly UNSIGNED_INT: number;\r\n readonly UNSIGNED_SHORT: number;\r\n readonly UNSIGNED_SHORT_4_4_4_4: number;\r\n readonly UNSIGNED_SHORT_5_5_5_1: number;\r\n readonly UNSIGNED_SHORT_5_6_5: number;\r\n readonly VALIDATE_STATUS: number;\r\n readonly VENDOR: number;\r\n readonly VERSION: number;\r\n readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;\r\n readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;\r\n readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;\r\n readonly VERTEX_ATTRIB_ARRAY_POINTER: number;\r\n readonly VERTEX_ATTRIB_ARRAY_SIZE: number;\r\n readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;\r\n readonly VERTEX_ATTRIB_ARRAY_TYPE: number;\r\n readonly VERTEX_SHADER: number;\r\n readonly VIEWPORT: number;\r\n readonly ZERO: number;\r\n}\r\n\r\ndeclare var WebGLRenderingContext: {\r\n prototype: WebGLRenderingContext;\r\n new(): WebGLRenderingContext;\r\n readonly ACTIVE_ATTRIBUTES: number;\r\n readonly ACTIVE_TEXTURE: number;\r\n readonly ACTIVE_UNIFORMS: number;\r\n readonly ALIASED_LINE_WIDTH_RANGE: number;\r\n readonly ALIASED_POINT_SIZE_RANGE: number;\r\n readonly ALPHA: number;\r\n readonly ALPHA_BITS: number;\r\n readonly ALWAYS: number;\r\n readonly ARRAY_BUFFER: number;\r\n readonly ARRAY_BUFFER_BINDING: number;\r\n readonly ATTACHED_SHADERS: number;\r\n readonly BACK: number;\r\n readonly BLEND: number;\r\n readonly BLEND_COLOR: number;\r\n readonly BLEND_DST_ALPHA: number;\r\n readonly BLEND_DST_RGB: number;\r\n readonly BLEND_EQUATION: number;\r\n readonly BLEND_EQUATION_ALPHA: number;\r\n readonly BLEND_EQUATION_RGB: number;\r\n readonly BLEND_SRC_ALPHA: number;\r\n readonly BLEND_SRC_RGB: number;\r\n readonly BLUE_BITS: number;\r\n readonly BOOL: number;\r\n readonly BOOL_VEC2: number;\r\n readonly BOOL_VEC3: number;\r\n readonly BOOL_VEC4: number;\r\n readonly BROWSER_DEFAULT_WEBGL: number;\r\n readonly BUFFER_SIZE: number;\r\n readonly BUFFER_USAGE: number;\r\n readonly BYTE: number;\r\n readonly CCW: number;\r\n readonly CLAMP_TO_EDGE: number;\r\n readonly COLOR_ATTACHMENT0: number;\r\n readonly COLOR_BUFFER_BIT: number;\r\n readonly COLOR_CLEAR_VALUE: number;\r\n readonly COLOR_WRITEMASK: number;\r\n readonly COMPILE_STATUS: number;\r\n readonly COMPRESSED_TEXTURE_FORMATS: number;\r\n readonly CONSTANT_ALPHA: number;\r\n readonly CONSTANT_COLOR: number;\r\n readonly CONTEXT_LOST_WEBGL: number;\r\n readonly CULL_FACE: number;\r\n readonly CULL_FACE_MODE: number;\r\n readonly CURRENT_PROGRAM: number;\r\n readonly CURRENT_VERTEX_ATTRIB: number;\r\n readonly CW: number;\r\n readonly DECR: number;\r\n readonly DECR_WRAP: number;\r\n readonly DELETE_STATUS: number;\r\n readonly DEPTH_ATTACHMENT: number;\r\n readonly DEPTH_BITS: number;\r\n readonly DEPTH_BUFFER_BIT: number;\r\n readonly DEPTH_CLEAR_VALUE: number;\r\n readonly DEPTH_COMPONENT: number;\r\n readonly DEPTH_COMPONENT16: number;\r\n readonly DEPTH_FUNC: number;\r\n readonly DEPTH_RANGE: number;\r\n readonly DEPTH_STENCIL: number;\r\n readonly DEPTH_STENCIL_ATTACHMENT: number;\r\n readonly DEPTH_TEST: number;\r\n readonly DEPTH_WRITEMASK: number;\r\n readonly DITHER: number;\r\n readonly DONT_CARE: number;\r\n readonly DST_ALPHA: number;\r\n readonly DST_COLOR: number;\r\n readonly DYNAMIC_DRAW: number;\r\n readonly ELEMENT_ARRAY_BUFFER: number;\r\n readonly ELEMENT_ARRAY_BUFFER_BINDING: number;\r\n readonly EQUAL: number;\r\n readonly FASTEST: number;\r\n readonly FLOAT: number;\r\n readonly FLOAT_MAT2: number;\r\n readonly FLOAT_MAT3: number;\r\n readonly FLOAT_MAT4: number;\r\n readonly FLOAT_VEC2: number;\r\n readonly FLOAT_VEC3: number;\r\n readonly FLOAT_VEC4: number;\r\n readonly FRAGMENT_SHADER: number;\r\n readonly FRAMEBUFFER: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;\r\n readonly FRAMEBUFFER_BINDING: number;\r\n readonly FRAMEBUFFER_COMPLETE: number;\r\n readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;\r\n readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;\r\n readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;\r\n readonly FRAMEBUFFER_UNSUPPORTED: number;\r\n readonly FRONT: number;\r\n readonly FRONT_AND_BACK: number;\r\n readonly FRONT_FACE: number;\r\n readonly FUNC_ADD: number;\r\n readonly FUNC_REVERSE_SUBTRACT: number;\r\n readonly FUNC_SUBTRACT: number;\r\n readonly GENERATE_MIPMAP_HINT: number;\r\n readonly GEQUAL: number;\r\n readonly GREATER: number;\r\n readonly GREEN_BITS: number;\r\n readonly HIGH_FLOAT: number;\r\n readonly HIGH_INT: number;\r\n readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;\r\n readonly IMPLEMENTATION_COLOR_READ_TYPE: number;\r\n readonly INCR: number;\r\n readonly INCR_WRAP: number;\r\n readonly INT: number;\r\n readonly INT_VEC2: number;\r\n readonly INT_VEC3: number;\r\n readonly INT_VEC4: number;\r\n readonly INVALID_ENUM: number;\r\n readonly INVALID_FRAMEBUFFER_OPERATION: number;\r\n readonly INVALID_OPERATION: number;\r\n readonly INVALID_VALUE: number;\r\n readonly INVERT: number;\r\n readonly KEEP: number;\r\n readonly LEQUAL: number;\r\n readonly LESS: number;\r\n readonly LINEAR: number;\r\n readonly LINEAR_MIPMAP_LINEAR: number;\r\n readonly LINEAR_MIPMAP_NEAREST: number;\r\n readonly LINES: number;\r\n readonly LINE_LOOP: number;\r\n readonly LINE_STRIP: number;\r\n readonly LINE_WIDTH: number;\r\n readonly LINK_STATUS: number;\r\n readonly LOW_FLOAT: number;\r\n readonly LOW_INT: number;\r\n readonly LUMINANCE: number;\r\n readonly LUMINANCE_ALPHA: number;\r\n readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;\r\n readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;\r\n readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;\r\n readonly MAX_RENDERBUFFER_SIZE: number;\r\n readonly MAX_TEXTURE_IMAGE_UNITS: number;\r\n readonly MAX_TEXTURE_SIZE: number;\r\n readonly MAX_VARYING_VECTORS: number;\r\n readonly MAX_VERTEX_ATTRIBS: number;\r\n readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;\r\n readonly MAX_VERTEX_UNIFORM_VECTORS: number;\r\n readonly MAX_VIEWPORT_DIMS: number;\r\n readonly MEDIUM_FLOAT: number;\r\n readonly MEDIUM_INT: number;\r\n readonly MIRRORED_REPEAT: number;\r\n readonly NEAREST: number;\r\n readonly NEAREST_MIPMAP_LINEAR: number;\r\n readonly NEAREST_MIPMAP_NEAREST: number;\r\n readonly NEVER: number;\r\n readonly NICEST: number;\r\n readonly NONE: number;\r\n readonly NOTEQUAL: number;\r\n readonly NO_ERROR: number;\r\n readonly ONE: number;\r\n readonly ONE_MINUS_CONSTANT_ALPHA: number;\r\n readonly ONE_MINUS_CONSTANT_COLOR: number;\r\n readonly ONE_MINUS_DST_ALPHA: number;\r\n readonly ONE_MINUS_DST_COLOR: number;\r\n readonly ONE_MINUS_SRC_ALPHA: number;\r\n readonly ONE_MINUS_SRC_COLOR: number;\r\n readonly OUT_OF_MEMORY: number;\r\n readonly PACK_ALIGNMENT: number;\r\n readonly POINTS: number;\r\n readonly POLYGON_OFFSET_FACTOR: number;\r\n readonly POLYGON_OFFSET_FILL: number;\r\n readonly POLYGON_OFFSET_UNITS: number;\r\n readonly RED_BITS: number;\r\n readonly RENDERBUFFER: number;\r\n readonly RENDERBUFFER_ALPHA_SIZE: number;\r\n readonly RENDERBUFFER_BINDING: number;\r\n readonly RENDERBUFFER_BLUE_SIZE: number;\r\n readonly RENDERBUFFER_DEPTH_SIZE: number;\r\n readonly RENDERBUFFER_GREEN_SIZE: number;\r\n readonly RENDERBUFFER_HEIGHT: number;\r\n readonly RENDERBUFFER_INTERNAL_FORMAT: number;\r\n readonly RENDERBUFFER_RED_SIZE: number;\r\n readonly RENDERBUFFER_STENCIL_SIZE: number;\r\n readonly RENDERBUFFER_WIDTH: number;\r\n readonly RENDERER: number;\r\n readonly REPEAT: number;\r\n readonly REPLACE: number;\r\n readonly RGB: number;\r\n readonly RGB565: number;\r\n readonly RGB5_A1: number;\r\n readonly RGBA: number;\r\n readonly RGBA4: number;\r\n readonly SAMPLER_2D: number;\r\n readonly SAMPLER_CUBE: number;\r\n readonly SAMPLES: number;\r\n readonly SAMPLE_ALPHA_TO_COVERAGE: number;\r\n readonly SAMPLE_BUFFERS: number;\r\n readonly SAMPLE_COVERAGE: number;\r\n readonly SAMPLE_COVERAGE_INVERT: number;\r\n readonly SAMPLE_COVERAGE_VALUE: number;\r\n readonly SCISSOR_BOX: number;\r\n readonly SCISSOR_TEST: number;\r\n readonly SHADER_TYPE: number;\r\n readonly SHADING_LANGUAGE_VERSION: number;\r\n readonly SHORT: number;\r\n readonly SRC_ALPHA: number;\r\n readonly SRC_ALPHA_SATURATE: number;\r\n readonly SRC_COLOR: number;\r\n readonly STATIC_DRAW: number;\r\n readonly STENCIL_ATTACHMENT: number;\r\n readonly STENCIL_BACK_FAIL: number;\r\n readonly STENCIL_BACK_FUNC: number;\r\n readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;\r\n readonly STENCIL_BACK_PASS_DEPTH_PASS: number;\r\n readonly STENCIL_BACK_REF: number;\r\n readonly STENCIL_BACK_VALUE_MASK: number;\r\n readonly STENCIL_BACK_WRITEMASK: number;\r\n readonly STENCIL_BITS: number;\r\n readonly STENCIL_BUFFER_BIT: number;\r\n readonly STENCIL_CLEAR_VALUE: number;\r\n readonly STENCIL_FAIL: number;\r\n readonly STENCIL_FUNC: number;\r\n readonly STENCIL_INDEX: number;\r\n readonly STENCIL_INDEX8: number;\r\n readonly STENCIL_PASS_DEPTH_FAIL: number;\r\n readonly STENCIL_PASS_DEPTH_PASS: number;\r\n readonly STENCIL_REF: number;\r\n readonly STENCIL_TEST: number;\r\n readonly STENCIL_VALUE_MASK: number;\r\n readonly STENCIL_WRITEMASK: number;\r\n readonly STREAM_DRAW: number;\r\n readonly SUBPIXEL_BITS: number;\r\n readonly TEXTURE: number;\r\n readonly TEXTURE0: number;\r\n readonly TEXTURE1: number;\r\n readonly TEXTURE10: number;\r\n readonly TEXTURE11: number;\r\n readonly TEXTURE12: number;\r\n readonly TEXTURE13: number;\r\n readonly TEXTURE14: number;\r\n readonly TEXTURE15: number;\r\n readonly TEXTURE16: number;\r\n readonly TEXTURE17: number;\r\n readonly TEXTURE18: number;\r\n readonly TEXTURE19: number;\r\n readonly TEXTURE2: number;\r\n readonly TEXTURE20: number;\r\n readonly TEXTURE21: number;\r\n readonly TEXTURE22: number;\r\n readonly TEXTURE23: number;\r\n readonly TEXTURE24: number;\r\n readonly TEXTURE25: number;\r\n readonly TEXTURE26: number;\r\n readonly TEXTURE27: number;\r\n readonly TEXTURE28: number;\r\n readonly TEXTURE29: number;\r\n readonly TEXTURE3: number;\r\n readonly TEXTURE30: number;\r\n readonly TEXTURE31: number;\r\n readonly TEXTURE4: number;\r\n readonly TEXTURE5: number;\r\n readonly TEXTURE6: number;\r\n readonly TEXTURE7: number;\r\n readonly TEXTURE8: number;\r\n readonly TEXTURE9: number;\r\n readonly TEXTURE_2D: number;\r\n readonly TEXTURE_BINDING_2D: number;\r\n readonly TEXTURE_BINDING_CUBE_MAP: number;\r\n readonly TEXTURE_CUBE_MAP: number;\r\n readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;\r\n readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;\r\n readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;\r\n readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;\r\n readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;\r\n readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;\r\n readonly TEXTURE_MAG_FILTER: number;\r\n readonly TEXTURE_MIN_FILTER: number;\r\n readonly TEXTURE_WRAP_S: number;\r\n readonly TEXTURE_WRAP_T: number;\r\n readonly TRIANGLES: number;\r\n readonly TRIANGLE_FAN: number;\r\n readonly TRIANGLE_STRIP: number;\r\n readonly UNPACK_ALIGNMENT: number;\r\n readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;\r\n readonly UNPACK_FLIP_Y_WEBGL: number;\r\n readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;\r\n readonly UNSIGNED_BYTE: number;\r\n readonly UNSIGNED_INT: number;\r\n readonly UNSIGNED_SHORT: number;\r\n readonly UNSIGNED_SHORT_4_4_4_4: number;\r\n readonly UNSIGNED_SHORT_5_5_5_1: number;\r\n readonly UNSIGNED_SHORT_5_6_5: number;\r\n readonly VALIDATE_STATUS: number;\r\n readonly VENDOR: number;\r\n readonly VERSION: number;\r\n readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;\r\n readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;\r\n readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;\r\n readonly VERTEX_ATTRIB_ARRAY_POINTER: number;\r\n readonly VERTEX_ATTRIB_ARRAY_SIZE: number;\r\n readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;\r\n readonly VERTEX_ATTRIB_ARRAY_TYPE: number;\r\n readonly VERTEX_SHADER: number;\r\n readonly VIEWPORT: number;\r\n readonly ZERO: number;\r\n}\r\n\r\ninterface WebGLShader extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLShader: {\r\n prototype: WebGLShader;\r\n new(): WebGLShader;\r\n}\r\n\r\ninterface WebGLShaderPrecisionFormat {\r\n readonly precision: number;\r\n readonly rangeMax: number;\r\n readonly rangeMin: number;\r\n}\r\n\r\ndeclare var WebGLShaderPrecisionFormat: {\r\n prototype: WebGLShaderPrecisionFormat;\r\n new(): WebGLShaderPrecisionFormat;\r\n}\r\n\r\ninterface WebGLTexture extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLTexture: {\r\n prototype: WebGLTexture;\r\n new(): WebGLTexture;\r\n}\r\n\r\ninterface WebGLUniformLocation {\r\n}\r\n\r\ndeclare var WebGLUniformLocation: {\r\n prototype: WebGLUniformLocation;\r\n new(): WebGLUniformLocation;\r\n}\r\n\r\ninterface WebKitCSSMatrix {\r\n a: number;\r\n b: number;\r\n c: number;\r\n d: number;\r\n e: number;\r\n f: number;\r\n m11: number;\r\n m12: number;\r\n m13: number;\r\n m14: number;\r\n m21: number;\r\n m22: number;\r\n m23: number;\r\n m24: number;\r\n m31: number;\r\n m32: number;\r\n m33: number;\r\n m34: number;\r\n m41: number;\r\n m42: number;\r\n m43: number;\r\n m44: number;\r\n inverse(): WebKitCSSMatrix;\r\n multiply(secondMatrix: WebKitCSSMatrix): WebKitCSSMatrix;\r\n rotate(angleX: number, angleY?: number, angleZ?: number): WebKitCSSMatrix;\r\n rotateAxisAngle(x: number, y: number, z: number, angle: number): WebKitCSSMatrix;\r\n scale(scaleX: number, scaleY?: number, scaleZ?: number): WebKitCSSMatrix;\r\n setMatrixValue(value: string): void;\r\n skewX(angle: number): WebKitCSSMatrix;\r\n skewY(angle: number): WebKitCSSMatrix;\r\n toString(): string;\r\n translate(x: number, y: number, z?: number): WebKitCSSMatrix;\r\n}\r\n\r\ndeclare var WebKitCSSMatrix: {\r\n prototype: WebKitCSSMatrix;\r\n new(text?: string): WebKitCSSMatrix;\r\n}\r\n\r\ninterface WebKitPoint {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var WebKitPoint: {\r\n prototype: WebKitPoint;\r\n new(x?: number, y?: number): WebKitPoint;\r\n}\r\n\r\ninterface WebSocket extends EventTarget {\r\n binaryType: string;\r\n readonly bufferedAmount: number;\r\n readonly extensions: string;\r\n onclose: (this: this, ev: CloseEvent) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onmessage: (this: this, ev: MessageEvent) => any;\r\n onopen: (this: this, ev: Event) => any;\r\n readonly protocol: string;\r\n readonly readyState: number;\r\n readonly url: string;\r\n close(code?: number, reason?: string): void;\r\n send(data: any): void;\r\n readonly CLOSED: number;\r\n readonly CLOSING: number;\r\n readonly CONNECTING: number;\r\n readonly OPEN: number;\r\n addEventListener(type: \"close\", listener: (this: this, ev: CloseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"open\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var WebSocket: {\r\n prototype: WebSocket;\r\n new(url: string, protocols?: string | string[]): WebSocket;\r\n readonly CLOSED: number;\r\n readonly CLOSING: number;\r\n readonly CONNECTING: number;\r\n readonly OPEN: number;\r\n}\r\n\r\ninterface WheelEvent extends MouseEvent {\r\n readonly deltaMode: number;\r\n readonly deltaX: number;\r\n readonly deltaY: number;\r\n readonly deltaZ: number;\r\n readonly wheelDelta: number;\r\n readonly wheelDeltaX: number;\r\n readonly wheelDeltaY: number;\r\n getCurrentPoint(element: Element): void;\r\n initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void;\r\n readonly DOM_DELTA_LINE: number;\r\n readonly DOM_DELTA_PAGE: number;\r\n readonly DOM_DELTA_PIXEL: number;\r\n}\r\n\r\ndeclare var WheelEvent: {\r\n prototype: WheelEvent;\r\n new(typeArg: string, eventInitDict?: WheelEventInit): WheelEvent;\r\n readonly DOM_DELTA_LINE: number;\r\n readonly DOM_DELTA_PAGE: number;\r\n readonly DOM_DELTA_PIXEL: number;\r\n}\r\n\r\ninterface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64 {\r\n readonly applicationCache: ApplicationCache;\r\n readonly clientInformation: Navigator;\r\n readonly closed: boolean;\r\n readonly crypto: Crypto;\r\n defaultStatus: string;\r\n readonly devicePixelRatio: number;\r\n readonly doNotTrack: string;\r\n readonly document: Document;\r\n event: Event;\r\n readonly external: External;\r\n readonly frameElement: Element;\r\n readonly frames: Window;\r\n readonly history: History;\r\n readonly innerHeight: number;\r\n readonly innerWidth: number;\r\n readonly length: number;\r\n readonly location: Location;\r\n readonly locationbar: BarProp;\r\n readonly menubar: BarProp;\r\n readonly msCredentials: MSCredentials;\r\n name: string;\r\n readonly navigator: Navigator;\r\n offscreenBuffering: string | boolean;\r\n onabort: (this: this, ev: UIEvent) => any;\r\n onafterprint: (this: this, ev: Event) => any;\r\n onbeforeprint: (this: this, ev: Event) => any;\r\n onbeforeunload: (this: this, ev: BeforeUnloadEvent) => any;\r\n onblur: (this: this, ev: FocusEvent) => any;\r\n oncanplay: (this: this, ev: Event) => any;\r\n oncanplaythrough: (this: this, ev: Event) => any;\r\n onchange: (this: this, ev: Event) => any;\r\n onclick: (this: this, ev: MouseEvent) => any;\r\n oncompassneedscalibration: (this: this, ev: Event) => any;\r\n oncontextmenu: (this: this, ev: PointerEvent) => any;\r\n ondblclick: (this: this, ev: MouseEvent) => any;\r\n ondevicelight: (this: this, ev: DeviceLightEvent) => any;\r\n ondevicemotion: (this: this, ev: DeviceMotionEvent) => any;\r\n ondeviceorientation: (this: this, ev: DeviceOrientationEvent) => any;\r\n ondrag: (this: this, ev: DragEvent) => any;\r\n ondragend: (this: this, ev: DragEvent) => any;\r\n ondragenter: (this: this, ev: DragEvent) => any;\r\n ondragleave: (this: this, ev: DragEvent) => any;\r\n ondragover: (this: this, ev: DragEvent) => any;\r\n ondragstart: (this: this, ev: DragEvent) => any;\r\n ondrop: (this: this, ev: DragEvent) => any;\r\n ondurationchange: (this: this, ev: Event) => any;\r\n onemptied: (this: this, ev: Event) => any;\r\n onended: (this: this, ev: MediaStreamErrorEvent) => any;\r\n onerror: ErrorEventHandler;\r\n onfocus: (this: this, ev: FocusEvent) => any;\r\n onhashchange: (this: this, ev: HashChangeEvent) => any;\r\n oninput: (this: this, ev: Event) => any;\r\n oninvalid: (this: this, ev: Event) => any;\r\n onkeydown: (this: this, ev: KeyboardEvent) => any;\r\n onkeypress: (this: this, ev: KeyboardEvent) => any;\r\n onkeyup: (this: this, ev: KeyboardEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n onloadeddata: (this: this, ev: Event) => any;\r\n onloadedmetadata: (this: this, ev: Event) => any;\r\n onloadstart: (this: this, ev: Event) => any;\r\n onmessage: (this: this, ev: MessageEvent) => any;\r\n onmousedown: (this: this, ev: MouseEvent) => any;\r\n onmouseenter: (this: this, ev: MouseEvent) => any;\r\n onmouseleave: (this: this, ev: MouseEvent) => any;\r\n onmousemove: (this: this, ev: MouseEvent) => any;\r\n onmouseout: (this: this, ev: MouseEvent) => any;\r\n onmouseover: (this: this, ev: MouseEvent) => any;\r\n onmouseup: (this: this, ev: MouseEvent) => any;\r\n onmousewheel: (this: this, ev: WheelEvent) => any;\r\n onmsgesturechange: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturedoubletap: (this: this, ev: MSGestureEvent) => any;\r\n onmsgestureend: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturehold: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturestart: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturetap: (this: this, ev: MSGestureEvent) => any;\r\n onmsinertiastart: (this: this, ev: MSGestureEvent) => any;\r\n onmspointercancel: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerdown: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerenter: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerleave: (this: this, ev: MSPointerEvent) => any;\r\n onmspointermove: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerout: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerover: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerup: (this: this, ev: MSPointerEvent) => any;\r\n onoffline: (this: this, ev: Event) => any;\r\n ononline: (this: this, ev: Event) => any;\r\n onorientationchange: (this: this, ev: Event) => any;\r\n onpagehide: (this: this, ev: PageTransitionEvent) => any;\r\n onpageshow: (this: this, ev: PageTransitionEvent) => any;\r\n onpause: (this: this, ev: Event) => any;\r\n onplay: (this: this, ev: Event) => any;\r\n onplaying: (this: this, ev: Event) => any;\r\n onpopstate: (this: this, ev: PopStateEvent) => any;\r\n onprogress: (this: this, ev: ProgressEvent) => any;\r\n onratechange: (this: this, ev: Event) => any;\r\n onreadystatechange: (this: this, ev: ProgressEvent) => any;\r\n onreset: (this: this, ev: Event) => any;\r\n onresize: (this: this, ev: UIEvent) => any;\r\n onscroll: (this: this, ev: UIEvent) => any;\r\n onseeked: (this: this, ev: Event) => any;\r\n onseeking: (this: this, ev: Event) => any;\r\n onselect: (this: this, ev: UIEvent) => any;\r\n onstalled: (this: this, ev: Event) => any;\r\n onstorage: (this: this, ev: StorageEvent) => any;\r\n onsubmit: (this: this, ev: Event) => any;\r\n onsuspend: (this: this, ev: Event) => any;\r\n ontimeupdate: (this: this, ev: Event) => any;\r\n ontouchcancel: (ev: TouchEvent) => any;\r\n ontouchend: (ev: TouchEvent) => any;\r\n ontouchmove: (ev: TouchEvent) => any;\r\n ontouchstart: (ev: TouchEvent) => any;\r\n onunload: (this: this, ev: Event) => any;\r\n onvolumechange: (this: this, ev: Event) => any;\r\n onwaiting: (this: this, ev: Event) => any;\r\n opener: any;\r\n orientation: string | number;\r\n readonly outerHeight: number;\r\n readonly outerWidth: number;\r\n readonly pageXOffset: number;\r\n readonly pageYOffset: number;\r\n readonly parent: Window;\r\n readonly performance: Performance;\r\n readonly personalbar: BarProp;\r\n readonly screen: Screen;\r\n readonly screenLeft: number;\r\n readonly screenTop: number;\r\n readonly screenX: number;\r\n readonly screenY: number;\r\n readonly scrollX: number;\r\n readonly scrollY: number;\r\n readonly scrollbars: BarProp;\r\n readonly self: Window;\r\n status: string;\r\n readonly statusbar: BarProp;\r\n readonly styleMedia: StyleMedia;\r\n readonly toolbar: BarProp;\r\n readonly top: Window;\r\n readonly window: Window;\r\n URL: typeof URL;\r\n Blob: typeof Blob;\r\n alert(message?: any): void;\r\n blur(): void;\r\n cancelAnimationFrame(handle: number): void;\r\n captureEvents(): void;\r\n close(): void;\r\n confirm(message?: string): boolean;\r\n focus(): void;\r\n getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;\r\n getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;\r\n getSelection(): Selection;\r\n matchMedia(mediaQuery: string): MediaQueryList;\r\n moveBy(x?: number, y?: number): void;\r\n moveTo(x?: number, y?: number): void;\r\n msWriteProfilerMark(profilerMarkName: string): void;\r\n open(url?: string, target?: string, features?: string, replace?: boolean): Window;\r\n postMessage(message: any, targetOrigin: string, transfer?: any[]): void;\r\n print(): void;\r\n prompt(message?: string, _default?: string): string | null;\r\n releaseEvents(): void;\r\n requestAnimationFrame(callback: FrameRequestCallback): number;\r\n resizeBy(x?: number, y?: number): void;\r\n resizeTo(x?: number, y?: number): void;\r\n scroll(x?: number, y?: number): void;\r\n scrollBy(x?: number, y?: number): void;\r\n scrollTo(x?: number, y?: number): void;\r\n webkitCancelAnimationFrame(handle: number): void;\r\n webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;\r\n webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;\r\n webkitRequestAnimationFrame(callback: FrameRequestCallback): number;\r\n scroll(options?: ScrollToOptions): void;\r\n scrollTo(options?: ScrollToOptions): void;\r\n scrollBy(options?: ScrollToOptions): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"afterprint\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeprint\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeunload\", listener: (this: this, ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"compassneedscalibration\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"devicelight\", listener: (this: this, ev: DeviceLightEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"devicemotion\", listener: (this: this, ev: DeviceMotionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deviceorientation\", listener: (this: this, ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"hashchange\", listener: (this: this, ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"offline\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"online\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"orientationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pagehide\", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pageshow\", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"popstate\", listener: (this: this, ev: PopStateEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"readystatechange\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"storage\", listener: (this: this, ev: StorageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"unload\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: Window;\r\n}\r\n\r\ndeclare var Window: {\r\n prototype: Window;\r\n new(): Window;\r\n}\r\n\r\ninterface Worker extends EventTarget, AbstractWorker {\r\n onmessage: (this: this, ev: MessageEvent) => any;\r\n postMessage(message: any, ports?: any): void;\r\n terminate(): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Worker: {\r\n prototype: Worker;\r\n new(stringUrl: string): Worker;\r\n}\r\n\r\ninterface XMLDocument extends Document {\r\n}\r\n\r\ndeclare var XMLDocument: {\r\n prototype: XMLDocument;\r\n new(): XMLDocument;\r\n}\r\n\r\ninterface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {\r\n onreadystatechange: (this: this, ev: ProgressEvent) => any;\r\n readonly readyState: number;\r\n readonly response: any;\r\n readonly responseText: string;\r\n responseType: string;\r\n readonly responseXML: any;\r\n readonly status: number;\r\n readonly statusText: string;\r\n timeout: number;\r\n readonly upload: XMLHttpRequestUpload;\r\n withCredentials: boolean;\r\n msCaching?: string;\r\n abort(): void;\r\n getAllResponseHeaders(): string;\r\n getResponseHeader(header: string): string | null;\r\n msCachingEnabled(): boolean;\r\n open(method: string, url: string, async?: boolean, user?: string, password?: string): void;\r\n overrideMimeType(mime: string): void;\r\n send(data?: Document): void;\r\n send(data?: string): void;\r\n send(data?: any): void;\r\n setRequestHeader(header: string, value: string): void;\r\n readonly DONE: number;\r\n readonly HEADERS_RECEIVED: number;\r\n readonly LOADING: number;\r\n readonly OPENED: number;\r\n readonly UNSENT: number;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadend\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"readystatechange\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeout\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var XMLHttpRequest: {\r\n prototype: XMLHttpRequest;\r\n new(): XMLHttpRequest;\r\n readonly DONE: number;\r\n readonly HEADERS_RECEIVED: number;\r\n readonly LOADING: number;\r\n readonly OPENED: number;\r\n readonly UNSENT: number;\r\n create(): XMLHttpRequest;\r\n}\r\n\r\ninterface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var XMLHttpRequestUpload: {\r\n prototype: XMLHttpRequestUpload;\r\n new(): XMLHttpRequestUpload;\r\n}\r\n\r\ninterface XMLSerializer {\r\n serializeToString(target: Node): string;\r\n}\r\n\r\ndeclare var XMLSerializer: {\r\n prototype: XMLSerializer;\r\n new(): XMLSerializer;\r\n}\r\n\r\ninterface XPathEvaluator {\r\n createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;\r\n createNSResolver(nodeResolver?: Node): XPathNSResolver;\r\n evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver, type: number, result: XPathResult): XPathResult;\r\n}\r\n\r\ndeclare var XPathEvaluator: {\r\n prototype: XPathEvaluator;\r\n new(): XPathEvaluator;\r\n}\r\n\r\ninterface XPathExpression {\r\n evaluate(contextNode: Node, type: number, result: XPathResult): XPathExpression;\r\n}\r\n\r\ndeclare var XPathExpression: {\r\n prototype: XPathExpression;\r\n new(): XPathExpression;\r\n}\r\n\r\ninterface XPathNSResolver {\r\n lookupNamespaceURI(prefix: string): string;\r\n}\r\n\r\ndeclare var XPathNSResolver: {\r\n prototype: XPathNSResolver;\r\n new(): XPathNSResolver;\r\n}\r\n\r\ninterface XPathResult {\r\n readonly booleanValue: boolean;\r\n readonly invalidIteratorState: boolean;\r\n readonly numberValue: number;\r\n readonly resultType: number;\r\n readonly singleNodeValue: Node;\r\n readonly snapshotLength: number;\r\n readonly stringValue: string;\r\n iterateNext(): Node;\r\n snapshotItem(index: number): Node;\r\n readonly ANY_TYPE: number;\r\n readonly ANY_UNORDERED_NODE_TYPE: number;\r\n readonly BOOLEAN_TYPE: number;\r\n readonly FIRST_ORDERED_NODE_TYPE: number;\r\n readonly NUMBER_TYPE: number;\r\n readonly ORDERED_NODE_ITERATOR_TYPE: number;\r\n readonly ORDERED_NODE_SNAPSHOT_TYPE: number;\r\n readonly STRING_TYPE: number;\r\n readonly UNORDERED_NODE_ITERATOR_TYPE: number;\r\n readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;\r\n}\r\n\r\ndeclare var XPathResult: {\r\n prototype: XPathResult;\r\n new(): XPathResult;\r\n readonly ANY_TYPE: number;\r\n readonly ANY_UNORDERED_NODE_TYPE: number;\r\n readonly BOOLEAN_TYPE: number;\r\n readonly FIRST_ORDERED_NODE_TYPE: number;\r\n readonly NUMBER_TYPE: number;\r\n readonly ORDERED_NODE_ITERATOR_TYPE: number;\r\n readonly ORDERED_NODE_SNAPSHOT_TYPE: number;\r\n readonly STRING_TYPE: number;\r\n readonly UNORDERED_NODE_ITERATOR_TYPE: number;\r\n readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;\r\n}\r\n\r\ninterface XSLTProcessor {\r\n clearParameters(): void;\r\n getParameter(namespaceURI: string, localName: string): any;\r\n importStylesheet(style: Node): void;\r\n removeParameter(namespaceURI: string, localName: string): void;\r\n reset(): void;\r\n setParameter(namespaceURI: string, localName: string, value: any): void;\r\n transformToDocument(source: Node): Document;\r\n transformToFragment(source: Node, document: Document): DocumentFragment;\r\n}\r\n\r\ndeclare var XSLTProcessor: {\r\n prototype: XSLTProcessor;\r\n new(): XSLTProcessor;\r\n}\r\n\r\ninterface AbstractWorker {\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface CanvasPathMethods {\r\n arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\r\n arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;\r\n bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;\r\n closePath(): void;\r\n ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\r\n lineTo(x: number, y: number): void;\r\n moveTo(x: number, y: number): void;\r\n quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;\r\n rect(x: number, y: number, w: number, h: number): void;\r\n}\r\n\r\ninterface ChildNode {\r\n remove(): void;\r\n}\r\n\r\ninterface DOML2DeprecatedColorProperty {\r\n color: string;\r\n}\r\n\r\ninterface DOML2DeprecatedSizeProperty {\r\n size: number;\r\n}\r\n\r\ninterface DocumentEvent {\r\n createEvent(eventInterface:\"AnimationEvent\"): AnimationEvent;\r\n createEvent(eventInterface:\"AriaRequestEvent\"): AriaRequestEvent;\r\n createEvent(eventInterface:\"AudioProcessingEvent\"): AudioProcessingEvent;\r\n createEvent(eventInterface:\"BeforeUnloadEvent\"): BeforeUnloadEvent;\r\n createEvent(eventInterface:\"ClipboardEvent\"): ClipboardEvent;\r\n createEvent(eventInterface:\"CloseEvent\"): CloseEvent;\r\n createEvent(eventInterface:\"CommandEvent\"): CommandEvent;\r\n createEvent(eventInterface:\"CompositionEvent\"): CompositionEvent;\r\n createEvent(eventInterface:\"CustomEvent\"): CustomEvent;\r\n createEvent(eventInterface:\"DeviceLightEvent\"): DeviceLightEvent;\r\n createEvent(eventInterface:\"DeviceMotionEvent\"): DeviceMotionEvent;\r\n createEvent(eventInterface:\"DeviceOrientationEvent\"): DeviceOrientationEvent;\r\n createEvent(eventInterface:\"DragEvent\"): DragEvent;\r\n createEvent(eventInterface:\"ErrorEvent\"): ErrorEvent;\r\n createEvent(eventInterface:\"Event\"): Event;\r\n createEvent(eventInterface:\"Events\"): Event;\r\n createEvent(eventInterface:\"FocusEvent\"): FocusEvent;\r\n createEvent(eventInterface:\"GamepadEvent\"): GamepadEvent;\r\n createEvent(eventInterface:\"HashChangeEvent\"): HashChangeEvent;\r\n createEvent(eventInterface:\"IDBVersionChangeEvent\"): IDBVersionChangeEvent;\r\n createEvent(eventInterface:\"KeyboardEvent\"): KeyboardEvent;\r\n createEvent(eventInterface:\"ListeningStateChangedEvent\"): ListeningStateChangedEvent;\r\n createEvent(eventInterface:\"LongRunningScriptDetectedEvent\"): LongRunningScriptDetectedEvent;\r\n createEvent(eventInterface:\"MSGestureEvent\"): MSGestureEvent;\r\n createEvent(eventInterface:\"MSManipulationEvent\"): MSManipulationEvent;\r\n createEvent(eventInterface:\"MSMediaKeyMessageEvent\"): MSMediaKeyMessageEvent;\r\n createEvent(eventInterface:\"MSMediaKeyNeededEvent\"): MSMediaKeyNeededEvent;\r\n createEvent(eventInterface:\"MSPointerEvent\"): MSPointerEvent;\r\n createEvent(eventInterface:\"MSSiteModeEvent\"): MSSiteModeEvent;\r\n createEvent(eventInterface:\"MediaEncryptedEvent\"): MediaEncryptedEvent;\r\n createEvent(eventInterface:\"MediaKeyMessageEvent\"): MediaKeyMessageEvent;\r\n createEvent(eventInterface:\"MediaStreamErrorEvent\"): MediaStreamErrorEvent;\r\n createEvent(eventInterface:\"MediaStreamTrackEvent\"): MediaStreamTrackEvent;\r\n createEvent(eventInterface:\"MessageEvent\"): MessageEvent;\r\n createEvent(eventInterface:\"MouseEvent\"): MouseEvent;\r\n createEvent(eventInterface:\"MouseEvents\"): MouseEvent;\r\n createEvent(eventInterface:\"MutationEvent\"): MutationEvent;\r\n createEvent(eventInterface:\"MutationEvents\"): MutationEvent;\r\n createEvent(eventInterface:\"NavigationCompletedEvent\"): NavigationCompletedEvent;\r\n createEvent(eventInterface:\"NavigationEvent\"): NavigationEvent;\r\n createEvent(eventInterface:\"NavigationEventWithReferrer\"): NavigationEventWithReferrer;\r\n createEvent(eventInterface:\"OfflineAudioCompletionEvent\"): OfflineAudioCompletionEvent;\r\n createEvent(eventInterface:\"OverflowEvent\"): OverflowEvent;\r\n createEvent(eventInterface:\"PageTransitionEvent\"): PageTransitionEvent;\r\n createEvent(eventInterface:\"PermissionRequestedEvent\"): PermissionRequestedEvent;\r\n createEvent(eventInterface:\"PointerEvent\"): PointerEvent;\r\n createEvent(eventInterface:\"PopStateEvent\"): PopStateEvent;\r\n createEvent(eventInterface:\"ProgressEvent\"): ProgressEvent;\r\n createEvent(eventInterface:\"RTCDTMFToneChangeEvent\"): RTCDTMFToneChangeEvent;\r\n createEvent(eventInterface:\"RTCDtlsTransportStateChangedEvent\"): RTCDtlsTransportStateChangedEvent;\r\n createEvent(eventInterface:\"RTCIceCandidatePairChangedEvent\"): RTCIceCandidatePairChangedEvent;\r\n createEvent(eventInterface:\"RTCIceGathererEvent\"): RTCIceGathererEvent;\r\n createEvent(eventInterface:\"RTCIceTransportStateChangedEvent\"): RTCIceTransportStateChangedEvent;\r\n createEvent(eventInterface:\"RTCSsrcConflictEvent\"): RTCSsrcConflictEvent;\r\n createEvent(eventInterface:\"SVGZoomEvent\"): SVGZoomEvent;\r\n createEvent(eventInterface:\"SVGZoomEvents\"): SVGZoomEvent;\r\n createEvent(eventInterface:\"ScriptNotifyEvent\"): ScriptNotifyEvent;\r\n createEvent(eventInterface:\"StorageEvent\"): StorageEvent;\r\n createEvent(eventInterface:\"TextEvent\"): TextEvent;\r\n createEvent(eventInterface:\"TouchEvent\"): TouchEvent;\r\n createEvent(eventInterface:\"TrackEvent\"): TrackEvent;\r\n createEvent(eventInterface:\"TransitionEvent\"): TransitionEvent;\r\n createEvent(eventInterface:\"UIEvent\"): UIEvent;\r\n createEvent(eventInterface:\"UIEvents\"): UIEvent;\r\n createEvent(eventInterface:\"UnviewableContentIdentifiedEvent\"): UnviewableContentIdentifiedEvent;\r\n createEvent(eventInterface:\"WebGLContextEvent\"): WebGLContextEvent;\r\n createEvent(eventInterface:\"WheelEvent\"): WheelEvent;\r\n createEvent(eventInterface: string): Event;\r\n}\r\n\r\ninterface ElementTraversal {\r\n readonly childElementCount: number;\r\n readonly firstElementChild: Element;\r\n readonly lastElementChild: Element;\r\n readonly nextElementSibling: Element;\r\n readonly previousElementSibling: Element;\r\n}\r\n\r\ninterface GetSVGDocument {\r\n getSVGDocument(): Document;\r\n}\r\n\r\ninterface GlobalEventHandlers {\r\n onpointercancel: (this: this, ev: PointerEvent) => any;\r\n onpointerdown: (this: this, ev: PointerEvent) => any;\r\n onpointerenter: (this: this, ev: PointerEvent) => any;\r\n onpointerleave: (this: this, ev: PointerEvent) => any;\r\n onpointermove: (this: this, ev: PointerEvent) => any;\r\n onpointerout: (this: this, ev: PointerEvent) => any;\r\n onpointerover: (this: this, ev: PointerEvent) => any;\r\n onpointerup: (this: this, ev: PointerEvent) => any;\r\n onwheel: (this: this, ev: WheelEvent) => any;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own ch functionality for the object.\r\n */\r\n ch: string;\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own chOff functionality for the object.\r\n */\r\n chOff: string;\r\n /**\r\n * Sets or retrieves how text and other content are vertically aligned within the object that contains them.\r\n */\r\n vAlign: string;\r\n}\r\n\r\ninterface IDBEnvironment {\r\n readonly indexedDB: IDBFactory;\r\n}\r\n\r\ninterface LinkStyle {\r\n readonly sheet: StyleSheet;\r\n}\r\n\r\ninterface MSBaseReader {\r\n onabort: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n onloadend: (this: this, ev: ProgressEvent) => any;\r\n onloadstart: (this: this, ev: Event) => any;\r\n onprogress: (this: this, ev: ProgressEvent) => any;\r\n readonly readyState: number;\r\n readonly result: any;\r\n abort(): void;\r\n readonly DONE: number;\r\n readonly EMPTY: number;\r\n readonly LOADING: number;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadend\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface MSFileSaver {\r\n msSaveBlob(blob: any, defaultName?: string): boolean;\r\n msSaveOrOpenBlob(blob: any, defaultName?: string): boolean;\r\n}\r\n\r\ninterface MSNavigatorDoNotTrack {\r\n confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean;\r\n confirmWebWideTrackingException(args: ExceptionInformation): boolean;\r\n removeSiteSpecificTrackingException(args: ExceptionInformation): void;\r\n removeWebWideTrackingException(args: ExceptionInformation): void;\r\n storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void;\r\n storeWebWideTrackingException(args: StoreExceptionsInformation): void;\r\n}\r\n\r\ninterface NavigatorContentUtils {\r\n}\r\n\r\ninterface NavigatorGeolocation {\r\n readonly geolocation: Geolocation;\r\n}\r\n\r\ninterface NavigatorID {\r\n readonly appName: string;\r\n readonly appVersion: string;\r\n readonly platform: string;\r\n readonly product: string;\r\n readonly productSub: string;\r\n readonly userAgent: string;\r\n readonly vendor: string;\r\n readonly vendorSub: string;\r\n}\r\n\r\ninterface NavigatorOnLine {\r\n readonly onLine: boolean;\r\n}\r\n\r\ninterface NavigatorStorageUtils {\r\n}\r\n\r\ninterface NavigatorUserMedia {\r\n readonly mediaDevices: MediaDevices;\r\n getUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;\r\n}\r\n\r\ninterface NodeSelector {\r\n querySelector(selectors: \"a\"): HTMLAnchorElement;\r\n querySelector(selectors: \"abbr\"): HTMLElement;\r\n querySelector(selectors: \"acronym\"): HTMLElement;\r\n querySelector(selectors: \"address\"): HTMLElement;\r\n querySelector(selectors: \"applet\"): HTMLAppletElement;\r\n querySelector(selectors: \"area\"): HTMLAreaElement;\r\n querySelector(selectors: \"article\"): HTMLElement;\r\n querySelector(selectors: \"aside\"): HTMLElement;\r\n querySelector(selectors: \"audio\"): HTMLAudioElement;\r\n querySelector(selectors: \"b\"): HTMLElement;\r\n querySelector(selectors: \"base\"): HTMLBaseElement;\r\n querySelector(selectors: \"basefont\"): HTMLBaseFontElement;\r\n querySelector(selectors: \"bdo\"): HTMLElement;\r\n querySelector(selectors: \"big\"): HTMLElement;\r\n querySelector(selectors: \"blockquote\"): HTMLQuoteElement;\r\n querySelector(selectors: \"body\"): HTMLBodyElement;\r\n querySelector(selectors: \"br\"): HTMLBRElement;\r\n querySelector(selectors: \"button\"): HTMLButtonElement;\r\n querySelector(selectors: \"canvas\"): HTMLCanvasElement;\r\n querySelector(selectors: \"caption\"): HTMLTableCaptionElement;\r\n querySelector(selectors: \"center\"): HTMLElement;\r\n querySelector(selectors: \"circle\"): SVGCircleElement;\r\n querySelector(selectors: \"cite\"): HTMLElement;\r\n querySelector(selectors: \"clippath\"): SVGClipPathElement;\r\n querySelector(selectors: \"code\"): HTMLElement;\r\n querySelector(selectors: \"col\"): HTMLTableColElement;\r\n querySelector(selectors: \"colgroup\"): HTMLTableColElement;\r\n querySelector(selectors: \"datalist\"): HTMLDataListElement;\r\n querySelector(selectors: \"dd\"): HTMLElement;\r\n querySelector(selectors: \"defs\"): SVGDefsElement;\r\n querySelector(selectors: \"del\"): HTMLModElement;\r\n querySelector(selectors: \"desc\"): SVGDescElement;\r\n querySelector(selectors: \"dfn\"): HTMLElement;\r\n querySelector(selectors: \"dir\"): HTMLDirectoryElement;\r\n querySelector(selectors: \"div\"): HTMLDivElement;\r\n querySelector(selectors: \"dl\"): HTMLDListElement;\r\n querySelector(selectors: \"dt\"): HTMLElement;\r\n querySelector(selectors: \"ellipse\"): SVGEllipseElement;\r\n querySelector(selectors: \"em\"): HTMLElement;\r\n querySelector(selectors: \"embed\"): HTMLEmbedElement;\r\n querySelector(selectors: \"feblend\"): SVGFEBlendElement;\r\n querySelector(selectors: \"fecolormatrix\"): SVGFEColorMatrixElement;\r\n querySelector(selectors: \"fecomponenttransfer\"): SVGFEComponentTransferElement;\r\n querySelector(selectors: \"fecomposite\"): SVGFECompositeElement;\r\n querySelector(selectors: \"feconvolvematrix\"): SVGFEConvolveMatrixElement;\r\n querySelector(selectors: \"fediffuselighting\"): SVGFEDiffuseLightingElement;\r\n querySelector(selectors: \"fedisplacementmap\"): SVGFEDisplacementMapElement;\r\n querySelector(selectors: \"fedistantlight\"): SVGFEDistantLightElement;\r\n querySelector(selectors: \"feflood\"): SVGFEFloodElement;\r\n querySelector(selectors: \"fefunca\"): SVGFEFuncAElement;\r\n querySelector(selectors: \"fefuncb\"): SVGFEFuncBElement;\r\n querySelector(selectors: \"fefuncg\"): SVGFEFuncGElement;\r\n querySelector(selectors: \"fefuncr\"): SVGFEFuncRElement;\r\n querySelector(selectors: \"fegaussianblur\"): SVGFEGaussianBlurElement;\r\n querySelector(selectors: \"feimage\"): SVGFEImageElement;\r\n querySelector(selectors: \"femerge\"): SVGFEMergeElement;\r\n querySelector(selectors: \"femergenode\"): SVGFEMergeNodeElement;\r\n querySelector(selectors: \"femorphology\"): SVGFEMorphologyElement;\r\n querySelector(selectors: \"feoffset\"): SVGFEOffsetElement;\r\n querySelector(selectors: \"fepointlight\"): SVGFEPointLightElement;\r\n querySelector(selectors: \"fespecularlighting\"): SVGFESpecularLightingElement;\r\n querySelector(selectors: \"fespotlight\"): SVGFESpotLightElement;\r\n querySelector(selectors: \"fetile\"): SVGFETileElement;\r\n querySelector(selectors: \"feturbulence\"): SVGFETurbulenceElement;\r\n querySelector(selectors: \"fieldset\"): HTMLFieldSetElement;\r\n querySelector(selectors: \"figcaption\"): HTMLElement;\r\n querySelector(selectors: \"figure\"): HTMLElement;\r\n querySelector(selectors: \"filter\"): SVGFilterElement;\r\n querySelector(selectors: \"font\"): HTMLFontElement;\r\n querySelector(selectors: \"footer\"): HTMLElement;\r\n querySelector(selectors: \"foreignobject\"): SVGForeignObjectElement;\r\n querySelector(selectors: \"form\"): HTMLFormElement;\r\n querySelector(selectors: \"frame\"): HTMLFrameElement;\r\n querySelector(selectors: \"frameset\"): HTMLFrameSetElement;\r\n querySelector(selectors: \"g\"): SVGGElement;\r\n querySelector(selectors: \"h1\"): HTMLHeadingElement;\r\n querySelector(selectors: \"h2\"): HTMLHeadingElement;\r\n querySelector(selectors: \"h3\"): HTMLHeadingElement;\r\n querySelector(selectors: \"h4\"): HTMLHeadingElement;\r\n querySelector(selectors: \"h5\"): HTMLHeadingElement;\r\n querySelector(selectors: \"h6\"): HTMLHeadingElement;\r\n querySelector(selectors: \"head\"): HTMLHeadElement;\r\n querySelector(selectors: \"header\"): HTMLElement;\r\n querySelector(selectors: \"hgroup\"): HTMLElement;\r\n querySelector(selectors: \"hr\"): HTMLHRElement;\r\n querySelector(selectors: \"html\"): HTMLHtmlElement;\r\n querySelector(selectors: \"i\"): HTMLElement;\r\n querySelector(selectors: \"iframe\"): HTMLIFrameElement;\r\n querySelector(selectors: \"image\"): SVGImageElement;\r\n querySelector(selectors: \"img\"): HTMLImageElement;\r\n querySelector(selectors: \"input\"): HTMLInputElement;\r\n querySelector(selectors: \"ins\"): HTMLModElement;\r\n querySelector(selectors: \"isindex\"): HTMLUnknownElement;\r\n querySelector(selectors: \"kbd\"): HTMLElement;\r\n querySelector(selectors: \"keygen\"): HTMLElement;\r\n querySelector(selectors: \"label\"): HTMLLabelElement;\r\n querySelector(selectors: \"legend\"): HTMLLegendElement;\r\n querySelector(selectors: \"li\"): HTMLLIElement;\r\n querySelector(selectors: \"line\"): SVGLineElement;\r\n querySelector(selectors: \"lineargradient\"): SVGLinearGradientElement;\r\n querySelector(selectors: \"link\"): HTMLLinkElement;\r\n querySelector(selectors: \"listing\"): HTMLPreElement;\r\n querySelector(selectors: \"map\"): HTMLMapElement;\r\n querySelector(selectors: \"mark\"): HTMLElement;\r\n querySelector(selectors: \"marker\"): SVGMarkerElement;\r\n querySelector(selectors: \"marquee\"): HTMLMarqueeElement;\r\n querySelector(selectors: \"mask\"): SVGMaskElement;\r\n querySelector(selectors: \"menu\"): HTMLMenuElement;\r\n querySelector(selectors: \"meta\"): HTMLMetaElement;\r\n querySelector(selectors: \"metadata\"): SVGMetadataElement;\r\n querySelector(selectors: \"meter\"): HTMLMeterElement;\r\n querySelector(selectors: \"nav\"): HTMLElement;\r\n querySelector(selectors: \"nextid\"): HTMLUnknownElement;\r\n querySelector(selectors: \"nobr\"): HTMLElement;\r\n querySelector(selectors: \"noframes\"): HTMLElement;\r\n querySelector(selectors: \"noscript\"): HTMLElement;\r\n querySelector(selectors: \"object\"): HTMLObjectElement;\r\n querySelector(selectors: \"ol\"): HTMLOListElement;\r\n querySelector(selectors: \"optgroup\"): HTMLOptGroupElement;\r\n querySelector(selectors: \"option\"): HTMLOptionElement;\r\n querySelector(selectors: \"p\"): HTMLParagraphElement;\r\n querySelector(selectors: \"param\"): HTMLParamElement;\r\n querySelector(selectors: \"path\"): SVGPathElement;\r\n querySelector(selectors: \"pattern\"): SVGPatternElement;\r\n querySelector(selectors: \"picture\"): HTMLPictureElement;\r\n querySelector(selectors: \"plaintext\"): HTMLElement;\r\n querySelector(selectors: \"polygon\"): SVGPolygonElement;\r\n querySelector(selectors: \"polyline\"): SVGPolylineElement;\r\n querySelector(selectors: \"pre\"): HTMLPreElement;\r\n querySelector(selectors: \"progress\"): HTMLProgressElement;\r\n querySelector(selectors: \"q\"): HTMLQuoteElement;\r\n querySelector(selectors: \"radialgradient\"): SVGRadialGradientElement;\r\n querySelector(selectors: \"rect\"): SVGRectElement;\r\n querySelector(selectors: \"rt\"): HTMLElement;\r\n querySelector(selectors: \"ruby\"): HTMLElement;\r\n querySelector(selectors: \"s\"): HTMLElement;\r\n querySelector(selectors: \"samp\"): HTMLElement;\r\n querySelector(selectors: \"script\"): HTMLScriptElement;\r\n querySelector(selectors: \"section\"): HTMLElement;\r\n querySelector(selectors: \"select\"): HTMLSelectElement;\r\n querySelector(selectors: \"small\"): HTMLElement;\r\n querySelector(selectors: \"source\"): HTMLSourceElement;\r\n querySelector(selectors: \"span\"): HTMLSpanElement;\r\n querySelector(selectors: \"stop\"): SVGStopElement;\r\n querySelector(selectors: \"strike\"): HTMLElement;\r\n querySelector(selectors: \"strong\"): HTMLElement;\r\n querySelector(selectors: \"style\"): HTMLStyleElement;\r\n querySelector(selectors: \"sub\"): HTMLElement;\r\n querySelector(selectors: \"sup\"): HTMLElement;\r\n querySelector(selectors: \"svg\"): SVGSVGElement;\r\n querySelector(selectors: \"switch\"): SVGSwitchElement;\r\n querySelector(selectors: \"symbol\"): SVGSymbolElement;\r\n querySelector(selectors: \"table\"): HTMLTableElement;\r\n querySelector(selectors: \"tbody\"): HTMLTableSectionElement;\r\n querySelector(selectors: \"td\"): HTMLTableDataCellElement;\r\n querySelector(selectors: \"template\"): HTMLTemplateElement;\r\n querySelector(selectors: \"text\"): SVGTextElement;\r\n querySelector(selectors: \"textpath\"): SVGTextPathElement;\r\n querySelector(selectors: \"textarea\"): HTMLTextAreaElement;\r\n querySelector(selectors: \"tfoot\"): HTMLTableSectionElement;\r\n querySelector(selectors: \"th\"): HTMLTableHeaderCellElement;\r\n querySelector(selectors: \"thead\"): HTMLTableSectionElement;\r\n querySelector(selectors: \"title\"): HTMLTitleElement;\r\n querySelector(selectors: \"tr\"): HTMLTableRowElement;\r\n querySelector(selectors: \"track\"): HTMLTrackElement;\r\n querySelector(selectors: \"tspan\"): SVGTSpanElement;\r\n querySelector(selectors: \"tt\"): HTMLElement;\r\n querySelector(selectors: \"u\"): HTMLElement;\r\n querySelector(selectors: \"ul\"): HTMLUListElement;\r\n querySelector(selectors: \"use\"): SVGUseElement;\r\n querySelector(selectors: \"var\"): HTMLElement;\r\n querySelector(selectors: \"video\"): HTMLVideoElement;\r\n querySelector(selectors: \"view\"): SVGViewElement;\r\n querySelector(selectors: \"wbr\"): HTMLElement;\r\n querySelector(selectors: \"x-ms-webview\"): MSHTMLWebViewElement;\r\n querySelector(selectors: \"xmp\"): HTMLPreElement;\r\n querySelector(selectors: string): Element;\r\n querySelectorAll(selectors: \"a\"): NodeListOf;\r\n querySelectorAll(selectors: \"abbr\"): NodeListOf;\r\n querySelectorAll(selectors: \"acronym\"): NodeListOf;\r\n querySelectorAll(selectors: \"address\"): NodeListOf;\r\n querySelectorAll(selectors: \"applet\"): NodeListOf;\r\n querySelectorAll(selectors: \"area\"): NodeListOf;\r\n querySelectorAll(selectors: \"article\"): NodeListOf;\r\n querySelectorAll(selectors: \"aside\"): NodeListOf;\r\n querySelectorAll(selectors: \"audio\"): NodeListOf;\r\n querySelectorAll(selectors: \"b\"): NodeListOf;\r\n querySelectorAll(selectors: \"base\"): NodeListOf;\r\n querySelectorAll(selectors: \"basefont\"): NodeListOf;\r\n querySelectorAll(selectors: \"bdo\"): NodeListOf;\r\n querySelectorAll(selectors: \"big\"): NodeListOf;\r\n querySelectorAll(selectors: \"blockquote\"): NodeListOf;\r\n querySelectorAll(selectors: \"body\"): NodeListOf;\r\n querySelectorAll(selectors: \"br\"): NodeListOf;\r\n querySelectorAll(selectors: \"button\"): NodeListOf;\r\n querySelectorAll(selectors: \"canvas\"): NodeListOf;\r\n querySelectorAll(selectors: \"caption\"): NodeListOf;\r\n querySelectorAll(selectors: \"center\"): NodeListOf;\r\n querySelectorAll(selectors: \"circle\"): NodeListOf;\r\n querySelectorAll(selectors: \"cite\"): NodeListOf;\r\n querySelectorAll(selectors: \"clippath\"): NodeListOf;\r\n querySelectorAll(selectors: \"code\"): NodeListOf;\r\n querySelectorAll(selectors: \"col\"): NodeListOf;\r\n querySelectorAll(selectors: \"colgroup\"): NodeListOf;\r\n querySelectorAll(selectors: \"datalist\"): NodeListOf;\r\n querySelectorAll(selectors: \"dd\"): NodeListOf;\r\n querySelectorAll(selectors: \"defs\"): NodeListOf;\r\n querySelectorAll(selectors: \"del\"): NodeListOf;\r\n querySelectorAll(selectors: \"desc\"): NodeListOf;\r\n querySelectorAll(selectors: \"dfn\"): NodeListOf;\r\n querySelectorAll(selectors: \"dir\"): NodeListOf;\r\n querySelectorAll(selectors: \"div\"): NodeListOf;\r\n querySelectorAll(selectors: \"dl\"): NodeListOf;\r\n querySelectorAll(selectors: \"dt\"): NodeListOf;\r\n querySelectorAll(selectors: \"ellipse\"): NodeListOf;\r\n querySelectorAll(selectors: \"em\"): NodeListOf;\r\n querySelectorAll(selectors: \"embed\"): NodeListOf;\r\n querySelectorAll(selectors: \"feblend\"): NodeListOf;\r\n querySelectorAll(selectors: \"fecolormatrix\"): NodeListOf;\r\n querySelectorAll(selectors: \"fecomponenttransfer\"): NodeListOf;\r\n querySelectorAll(selectors: \"fecomposite\"): NodeListOf;\r\n querySelectorAll(selectors: \"feconvolvematrix\"): NodeListOf;\r\n querySelectorAll(selectors: \"fediffuselighting\"): NodeListOf;\r\n querySelectorAll(selectors: \"fedisplacementmap\"): NodeListOf;\r\n querySelectorAll(selectors: \"fedistantlight\"): NodeListOf;\r\n querySelectorAll(selectors: \"feflood\"): NodeListOf;\r\n querySelectorAll(selectors: \"fefunca\"): NodeListOf;\r\n querySelectorAll(selectors: \"fefuncb\"): NodeListOf;\r\n querySelectorAll(selectors: \"fefuncg\"): NodeListOf;\r\n querySelectorAll(selectors: \"fefuncr\"): NodeListOf;\r\n querySelectorAll(selectors: \"fegaussianblur\"): NodeListOf;\r\n querySelectorAll(selectors: \"feimage\"): NodeListOf;\r\n querySelectorAll(selectors: \"femerge\"): NodeListOf;\r\n querySelectorAll(selectors: \"femergenode\"): NodeListOf;\r\n querySelectorAll(selectors: \"femorphology\"): NodeListOf;\r\n querySelectorAll(selectors: \"feoffset\"): NodeListOf;\r\n querySelectorAll(selectors: \"fepointlight\"): NodeListOf;\r\n querySelectorAll(selectors: \"fespecularlighting\"): NodeListOf;\r\n querySelectorAll(selectors: \"fespotlight\"): NodeListOf;\r\n querySelectorAll(selectors: \"fetile\"): NodeListOf;\r\n querySelectorAll(selectors: \"feturbulence\"): NodeListOf;\r\n querySelectorAll(selectors: \"fieldset\"): NodeListOf;\r\n querySelectorAll(selectors: \"figcaption\"): NodeListOf;\r\n querySelectorAll(selectors: \"figure\"): NodeListOf;\r\n querySelectorAll(selectors: \"filter\"): NodeListOf;\r\n querySelectorAll(selectors: \"font\"): NodeListOf;\r\n querySelectorAll(selectors: \"footer\"): NodeListOf;\r\n querySelectorAll(selectors: \"foreignobject\"): NodeListOf;\r\n querySelectorAll(selectors: \"form\"): NodeListOf;\r\n querySelectorAll(selectors: \"frame\"): NodeListOf;\r\n querySelectorAll(selectors: \"frameset\"): NodeListOf;\r\n querySelectorAll(selectors: \"g\"): NodeListOf;\r\n querySelectorAll(selectors: \"h1\"): NodeListOf;\r\n querySelectorAll(selectors: \"h2\"): NodeListOf;\r\n querySelectorAll(selectors: \"h3\"): NodeListOf;\r\n querySelectorAll(selectors: \"h4\"): NodeListOf;\r\n querySelectorAll(selectors: \"h5\"): NodeListOf;\r\n querySelectorAll(selectors: \"h6\"): NodeListOf;\r\n querySelectorAll(selectors: \"head\"): NodeListOf;\r\n querySelectorAll(selectors: \"header\"): NodeListOf;\r\n querySelectorAll(selectors: \"hgroup\"): NodeListOf;\r\n querySelectorAll(selectors: \"hr\"): NodeListOf;\r\n querySelectorAll(selectors: \"html\"): NodeListOf;\r\n querySelectorAll(selectors: \"i\"): NodeListOf;\r\n querySelectorAll(selectors: \"iframe\"): NodeListOf;\r\n querySelectorAll(selectors: \"image\"): NodeListOf;\r\n querySelectorAll(selectors: \"img\"): NodeListOf;\r\n querySelectorAll(selectors: \"input\"): NodeListOf;\r\n querySelectorAll(selectors: \"ins\"): NodeListOf;\r\n querySelectorAll(selectors: \"isindex\"): NodeListOf;\r\n querySelectorAll(selectors: \"kbd\"): NodeListOf;\r\n querySelectorAll(selectors: \"keygen\"): NodeListOf;\r\n querySelectorAll(selectors: \"label\"): NodeListOf;\r\n querySelectorAll(selectors: \"legend\"): NodeListOf;\r\n querySelectorAll(selectors: \"li\"): NodeListOf;\r\n querySelectorAll(selectors: \"line\"): NodeListOf;\r\n querySelectorAll(selectors: \"lineargradient\"): NodeListOf;\r\n querySelectorAll(selectors: \"link\"): NodeListOf;\r\n querySelectorAll(selectors: \"listing\"): NodeListOf;\r\n querySelectorAll(selectors: \"map\"): NodeListOf;\r\n querySelectorAll(selectors: \"mark\"): NodeListOf;\r\n querySelectorAll(selectors: \"marker\"): NodeListOf;\r\n querySelectorAll(selectors: \"marquee\"): NodeListOf;\r\n querySelectorAll(selectors: \"mask\"): NodeListOf;\r\n querySelectorAll(selectors: \"menu\"): NodeListOf;\r\n querySelectorAll(selectors: \"meta\"): NodeListOf;\r\n querySelectorAll(selectors: \"metadata\"): NodeListOf;\r\n querySelectorAll(selectors: \"meter\"): NodeListOf;\r\n querySelectorAll(selectors: \"nav\"): NodeListOf;\r\n querySelectorAll(selectors: \"nextid\"): NodeListOf;\r\n querySelectorAll(selectors: \"nobr\"): NodeListOf;\r\n querySelectorAll(selectors: \"noframes\"): NodeListOf;\r\n querySelectorAll(selectors: \"noscript\"): NodeListOf;\r\n querySelectorAll(selectors: \"object\"): NodeListOf;\r\n querySelectorAll(selectors: \"ol\"): NodeListOf;\r\n querySelectorAll(selectors: \"optgroup\"): NodeListOf;\r\n querySelectorAll(selectors: \"option\"): NodeListOf;\r\n querySelectorAll(selectors: \"p\"): NodeListOf;\r\n querySelectorAll(selectors: \"param\"): NodeListOf;\r\n querySelectorAll(selectors: \"path\"): NodeListOf;\r\n querySelectorAll(selectors: \"pattern\"): NodeListOf;\r\n querySelectorAll(selectors: \"picture\"): NodeListOf;\r\n querySelectorAll(selectors: \"plaintext\"): NodeListOf;\r\n querySelectorAll(selectors: \"polygon\"): NodeListOf;\r\n querySelectorAll(selectors: \"polyline\"): NodeListOf;\r\n querySelectorAll(selectors: \"pre\"): NodeListOf;\r\n querySelectorAll(selectors: \"progress\"): NodeListOf;\r\n querySelectorAll(selectors: \"q\"): NodeListOf;\r\n querySelectorAll(selectors: \"radialgradient\"): NodeListOf;\r\n querySelectorAll(selectors: \"rect\"): NodeListOf;\r\n querySelectorAll(selectors: \"rt\"): NodeListOf;\r\n querySelectorAll(selectors: \"ruby\"): NodeListOf;\r\n querySelectorAll(selectors: \"s\"): NodeListOf;\r\n querySelectorAll(selectors: \"samp\"): NodeListOf;\r\n querySelectorAll(selectors: \"script\"): NodeListOf;\r\n querySelectorAll(selectors: \"section\"): NodeListOf;\r\n querySelectorAll(selectors: \"select\"): NodeListOf;\r\n querySelectorAll(selectors: \"small\"): NodeListOf;\r\n querySelectorAll(selectors: \"source\"): NodeListOf;\r\n querySelectorAll(selectors: \"span\"): NodeListOf;\r\n querySelectorAll(selectors: \"stop\"): NodeListOf;\r\n querySelectorAll(selectors: \"strike\"): NodeListOf;\r\n querySelectorAll(selectors: \"strong\"): NodeListOf;\r\n querySelectorAll(selectors: \"style\"): NodeListOf;\r\n querySelectorAll(selectors: \"sub\"): NodeListOf;\r\n querySelectorAll(selectors: \"sup\"): NodeListOf;\r\n querySelectorAll(selectors: \"svg\"): NodeListOf;\r\n querySelectorAll(selectors: \"switch\"): NodeListOf;\r\n querySelectorAll(selectors: \"symbol\"): NodeListOf;\r\n querySelectorAll(selectors: \"table\"): NodeListOf;\r\n querySelectorAll(selectors: \"tbody\"): NodeListOf;\r\n querySelectorAll(selectors: \"td\"): NodeListOf;\r\n querySelectorAll(selectors: \"template\"): NodeListOf;\r\n querySelectorAll(selectors: \"text\"): NodeListOf;\r\n querySelectorAll(selectors: \"textpath\"): NodeListOf;\r\n querySelectorAll(selectors: \"textarea\"): NodeListOf;\r\n querySelectorAll(selectors: \"tfoot\"): NodeListOf;\r\n querySelectorAll(selectors: \"th\"): NodeListOf;\r\n querySelectorAll(selectors: \"thead\"): NodeListOf;\r\n querySelectorAll(selectors: \"title\"): NodeListOf;\r\n querySelectorAll(selectors: \"tr\"): NodeListOf;\r\n querySelectorAll(selectors: \"track\"): NodeListOf;\r\n querySelectorAll(selectors: \"tspan\"): NodeListOf;\r\n querySelectorAll(selectors: \"tt\"): NodeListOf;\r\n querySelectorAll(selectors: \"u\"): NodeListOf;\r\n querySelectorAll(selectors: \"ul\"): NodeListOf;\r\n querySelectorAll(selectors: \"use\"): NodeListOf;\r\n querySelectorAll(selectors: \"var\"): NodeListOf;\r\n querySelectorAll(selectors: \"video\"): NodeListOf;\r\n querySelectorAll(selectors: \"view\"): NodeListOf;\r\n querySelectorAll(selectors: \"wbr\"): NodeListOf;\r\n querySelectorAll(selectors: \"x-ms-webview\"): NodeListOf;\r\n querySelectorAll(selectors: \"xmp\"): NodeListOf;\r\n querySelectorAll(selectors: string): NodeListOf;\r\n}\r\n\r\ninterface RandomSource {\r\n getRandomValues(array: ArrayBufferView): ArrayBufferView;\r\n}\r\n\r\ninterface SVGAnimatedPathData {\r\n readonly pathSegList: SVGPathSegList;\r\n}\r\n\r\ninterface SVGAnimatedPoints {\r\n readonly animatedPoints: SVGPointList;\r\n readonly points: SVGPointList;\r\n}\r\n\r\ninterface SVGExternalResourcesRequired {\r\n readonly externalResourcesRequired: SVGAnimatedBoolean;\r\n}\r\n\r\ninterface SVGFilterPrimitiveStandardAttributes extends SVGStylable {\r\n readonly height: SVGAnimatedLength;\r\n readonly result: SVGAnimatedString;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n}\r\n\r\ninterface SVGFitToViewBox {\r\n readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;\r\n readonly viewBox: SVGAnimatedRect;\r\n}\r\n\r\ninterface SVGLangSpace {\r\n xmllang: string;\r\n xmlspace: string;\r\n}\r\n\r\ninterface SVGLocatable {\r\n readonly farthestViewportElement: SVGElement;\r\n readonly nearestViewportElement: SVGElement;\r\n getBBox(): SVGRect;\r\n getCTM(): SVGMatrix;\r\n getScreenCTM(): SVGMatrix;\r\n getTransformToElement(element: SVGElement): SVGMatrix;\r\n}\r\n\r\ninterface SVGStylable {\r\n className: any;\r\n readonly style: CSSStyleDeclaration;\r\n}\r\n\r\ninterface SVGTests {\r\n readonly requiredExtensions: SVGStringList;\r\n readonly requiredFeatures: SVGStringList;\r\n readonly systemLanguage: SVGStringList;\r\n hasExtension(extension: string): boolean;\r\n}\r\n\r\ninterface SVGTransformable extends SVGLocatable {\r\n readonly transform: SVGAnimatedTransformList;\r\n}\r\n\r\ninterface SVGURIReference {\r\n readonly href: SVGAnimatedString;\r\n}\r\n\r\ninterface WindowBase64 {\r\n atob(encodedString: string): string;\r\n btoa(rawString: string): string;\r\n}\r\n\r\ninterface WindowConsole {\r\n readonly console: Console;\r\n}\r\n\r\ninterface WindowLocalStorage {\r\n readonly localStorage: Storage;\r\n}\r\n\r\ninterface WindowSessionStorage {\r\n readonly sessionStorage: Storage;\r\n}\r\n\r\ninterface WindowTimers extends Object, WindowTimersExtension {\r\n clearInterval(handle: number): void;\r\n clearTimeout(handle: number): void;\r\n setInterval(handler: (...args: any[]) => void, timeout: number): number;\r\n setInterval(handler: any, timeout?: any, ...args: any[]): number;\r\n setTimeout(handler: (...args: any[]) => void, timeout: number): number;\r\n setTimeout(handler: any, timeout?: any, ...args: any[]): number;\r\n}\r\n\r\ninterface WindowTimersExtension {\r\n clearImmediate(handle: number): void;\r\n setImmediate(handler: (...args: any[]) => void): number;\r\n setImmediate(handler: any, ...args: any[]): number;\r\n}\r\n\r\ninterface XMLHttpRequestEventTarget {\r\n onabort: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n onloadend: (this: this, ev: ProgressEvent) => any;\r\n onloadstart: (this: this, ev: Event) => any;\r\n onprogress: (this: this, ev: ProgressEvent) => any;\r\n ontimeout: (this: this, ev: ProgressEvent) => any;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadend\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeout\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface StorageEventInit extends EventInit {\r\n key?: string;\r\n oldValue?: string;\r\n newValue?: string;\r\n url: string;\r\n storageArea?: Storage;\r\n}\r\n\r\ninterface Canvas2DContextAttributes {\r\n alpha?: boolean;\r\n willReadFrequently?: boolean;\r\n storage?: boolean;\r\n [attribute: string]: boolean | string | undefined;\r\n}\r\n\r\ninterface NodeListOf extends NodeList {\r\n length: number;\r\n item(index: number): TNode;\r\n [index: number]: TNode;\r\n}\r\n\r\ninterface HTMLCollectionOf extends HTMLCollection {\r\n item(index: number): T;\r\n namedItem(name: string): T;\r\n [index: number]: T;\r\n}\r\n\r\ninterface BlobPropertyBag {\r\n type?: string;\r\n endings?: string;\r\n}\r\n\r\ninterface FilePropertyBag {\r\n type?: string;\r\n lastModified?: number;\r\n}\r\n\r\ninterface EventListenerObject {\r\n handleEvent(evt: Event): void;\r\n}\r\n\r\ninterface MessageEventInit extends EventInit {\r\n data?: any;\r\n origin?: string;\r\n lastEventId?: string;\r\n channel?: string;\r\n source?: any;\r\n ports?: MessagePort[];\r\n}\r\n\r\ninterface ProgressEventInit extends EventInit {\r\n lengthComputable?: boolean;\r\n loaded?: number;\r\n total?: number;\r\n}\r\n\r\ninterface ScrollOptions {\r\n behavior?: ScrollBehavior;\r\n}\r\n\r\ninterface ScrollToOptions extends ScrollOptions {\r\n left?: number;\r\n top?: number;\r\n}\r\n\r\ninterface ScrollIntoViewOptions extends ScrollOptions {\r\n block?: ScrollLogicalPosition;\r\n inline?: ScrollLogicalPosition;\r\n}\r\n\r\ninterface ClipboardEventInit extends EventInit {\r\n data?: string;\r\n dataType?: string;\r\n}\r\n\r\ninterface IDBArrayKey extends Array {\r\n}\r\n\r\ninterface RsaKeyGenParams extends Algorithm {\r\n modulusLength: number;\r\n publicExponent: Uint8Array;\r\n}\r\n\r\ninterface RsaHashedKeyGenParams extends RsaKeyGenParams {\r\n hash: AlgorithmIdentifier;\r\n}\r\n\r\ninterface RsaKeyAlgorithm extends KeyAlgorithm {\r\n modulusLength: number;\r\n publicExponent: Uint8Array;\r\n}\r\n\r\ninterface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {\r\n hash: AlgorithmIdentifier;\r\n}\r\n\r\ninterface RsaHashedImportParams {\r\n hash: AlgorithmIdentifier;\r\n}\r\n\r\ninterface RsaPssParams {\r\n saltLength: number;\r\n}\r\n\r\ninterface RsaOaepParams extends Algorithm {\r\n label?: BufferSource;\r\n}\r\n\r\ninterface EcdsaParams extends Algorithm {\r\n hash: AlgorithmIdentifier;\r\n}\r\n\r\ninterface EcKeyGenParams extends Algorithm {\r\n namedCurve: string;\r\n}\r\n\r\ninterface EcKeyAlgorithm extends KeyAlgorithm {\r\n typedCurve: string;\r\n}\r\n\r\ninterface EcKeyImportParams {\r\n namedCurve: string;\r\n}\r\n\r\ninterface EcdhKeyDeriveParams extends Algorithm {\r\n public: CryptoKey;\r\n}\r\n\r\ninterface AesCtrParams extends Algorithm {\r\n counter: BufferSource;\r\n length: number;\r\n}\r\n\r\ninterface AesKeyAlgorithm extends KeyAlgorithm {\r\n length: number;\r\n}\r\n\r\ninterface AesKeyGenParams extends Algorithm {\r\n length: number;\r\n}\r\n\r\ninterface AesDerivedKeyParams extends Algorithm {\r\n length: number;\r\n}\r\n\r\ninterface AesCbcParams extends Algorithm {\r\n iv: BufferSource;\r\n}\r\n\r\ninterface AesCmacParams extends Algorithm {\r\n length: number;\r\n}\r\n\r\ninterface AesGcmParams extends Algorithm {\r\n iv: BufferSource;\r\n additionalData?: BufferSource;\r\n tagLength?: number;\r\n}\r\n\r\ninterface AesCfbParams extends Algorithm {\r\n iv: BufferSource;\r\n}\r\n\r\ninterface HmacImportParams extends Algorithm {\r\n hash?: AlgorithmIdentifier;\r\n length?: number;\r\n}\r\n\r\ninterface HmacKeyAlgorithm extends KeyAlgorithm {\r\n hash: AlgorithmIdentifier;\r\n length: number;\r\n}\r\n\r\ninterface HmacKeyGenParams extends Algorithm {\r\n hash: AlgorithmIdentifier;\r\n length?: number;\r\n}\r\n\r\ninterface DhKeyGenParams extends Algorithm {\r\n prime: Uint8Array;\r\n generator: Uint8Array;\r\n}\r\n\r\ninterface DhKeyAlgorithm extends KeyAlgorithm {\r\n prime: Uint8Array;\r\n generator: Uint8Array;\r\n}\r\n\r\ninterface DhKeyDeriveParams extends Algorithm {\r\n public: CryptoKey;\r\n}\r\n\r\ninterface DhImportKeyParams extends Algorithm {\r\n prime: Uint8Array;\r\n generator: Uint8Array;\r\n}\r\n\r\ninterface ConcatParams extends Algorithm {\r\n hash?: AlgorithmIdentifier;\r\n algorithmId: Uint8Array;\r\n partyUInfo: Uint8Array;\r\n partyVInfo: Uint8Array;\r\n publicInfo?: Uint8Array;\r\n privateInfo?: Uint8Array;\r\n}\r\n\r\ninterface HkdfCtrParams extends Algorithm {\r\n hash: AlgorithmIdentifier;\r\n label: BufferSource;\r\n context: BufferSource;\r\n}\r\n\r\ninterface Pbkdf2Params extends Algorithm {\r\n salt: BufferSource;\r\n iterations: number;\r\n hash: AlgorithmIdentifier;\r\n}\r\n\r\ninterface RsaOtherPrimesInfo {\r\n r: string;\r\n d: string;\r\n t: string;\r\n}\r\n\r\ninterface JsonWebKey {\r\n kty: string;\r\n use?: string;\r\n key_ops?: string[];\r\n alg?: string;\r\n kid?: string;\r\n x5u?: string;\r\n x5c?: string;\r\n x5t?: string;\r\n ext?: boolean;\r\n crv?: string;\r\n x?: string;\r\n y?: string;\r\n d?: string;\r\n n?: string;\r\n e?: string;\r\n p?: string;\r\n q?: string;\r\n dp?: string;\r\n dq?: string;\r\n qi?: string;\r\n oth?: RsaOtherPrimesInfo[];\r\n k?: string;\r\n}\r\n\r\ninterface ParentNode {\r\n readonly children: HTMLCollection;\r\n readonly firstElementChild: Element;\r\n readonly lastElementChild: Element;\r\n readonly childElementCount: number;\r\n}\r\n\r\ndeclare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;\r\n\r\ninterface ErrorEventHandler {\r\n (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;\r\n}\r\ninterface PositionCallback {\r\n (position: Position): void;\r\n}\r\ninterface PositionErrorCallback {\r\n (error: PositionError): void;\r\n}\r\ninterface MediaQueryListListener {\r\n (mql: MediaQueryList): void;\r\n}\r\ninterface MSLaunchUriCallback {\r\n (): void;\r\n}\r\ninterface FrameRequestCallback {\r\n (time: number): void;\r\n}\r\ninterface MSUnsafeFunctionCallback {\r\n (): any;\r\n}\r\ninterface MSExecAtPriorityFunctionCallback {\r\n (...args: any[]): any;\r\n}\r\ninterface MutationCallback {\r\n (mutations: MutationRecord[], observer: MutationObserver): void;\r\n}\r\ninterface DecodeSuccessCallback {\r\n (decodedData: AudioBuffer): void;\r\n}\r\ninterface DecodeErrorCallback {\r\n (error: DOMException): void;\r\n}\r\ninterface FunctionStringCallback {\r\n (data: string): void;\r\n}\r\ninterface NavigatorUserMediaSuccessCallback {\r\n (stream: MediaStream): void;\r\n}\r\ninterface NavigatorUserMediaErrorCallback {\r\n (error: MediaStreamError): void;\r\n}\r\ninterface ForEachCallback {\r\n (keyId: any, status: string): void;\r\n}\r\ndeclare var Audio: {new(src?: string): HTMLAudioElement; };\r\ndeclare var Image: {new(width?: number, height?: number): HTMLImageElement; };\r\ndeclare var Option: {new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; };\r\ndeclare var applicationCache: ApplicationCache;\r\ndeclare var clientInformation: Navigator;\r\ndeclare var closed: boolean;\r\ndeclare var crypto: Crypto;\r\ndeclare var defaultStatus: string;\r\ndeclare var devicePixelRatio: number;\r\ndeclare var doNotTrack: string;\r\ndeclare var document: Document;\r\ndeclare var event: Event;\r\ndeclare var external: External;\r\ndeclare var frameElement: Element;\r\ndeclare var frames: Window;\r\ndeclare var history: History;\r\ndeclare var innerHeight: number;\r\ndeclare var innerWidth: number;\r\ndeclare var length: number;\r\ndeclare var location: Location;\r\ndeclare var locationbar: BarProp;\r\ndeclare var menubar: BarProp;\r\ndeclare var msCredentials: MSCredentials;\r\ndeclare const name: never;\r\ndeclare var navigator: Navigator;\r\ndeclare var offscreenBuffering: string | boolean;\r\ndeclare var onabort: (this: Window, ev: UIEvent) => any;\r\ndeclare var onafterprint: (this: Window, ev: Event) => any;\r\ndeclare var onbeforeprint: (this: Window, ev: Event) => any;\r\ndeclare var onbeforeunload: (this: Window, ev: BeforeUnloadEvent) => any;\r\ndeclare var onblur: (this: Window, ev: FocusEvent) => any;\r\ndeclare var oncanplay: (this: Window, ev: Event) => any;\r\ndeclare var oncanplaythrough: (this: Window, ev: Event) => any;\r\ndeclare var onchange: (this: Window, ev: Event) => any;\r\ndeclare var onclick: (this: Window, ev: MouseEvent) => any;\r\ndeclare var oncompassneedscalibration: (this: Window, ev: Event) => any;\r\ndeclare var oncontextmenu: (this: Window, ev: PointerEvent) => any;\r\ndeclare var ondblclick: (this: Window, ev: MouseEvent) => any;\r\ndeclare var ondevicelight: (this: Window, ev: DeviceLightEvent) => any;\r\ndeclare var ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any;\r\ndeclare var ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any;\r\ndeclare var ondrag: (this: Window, ev: DragEvent) => any;\r\ndeclare var ondragend: (this: Window, ev: DragEvent) => any;\r\ndeclare var ondragenter: (this: Window, ev: DragEvent) => any;\r\ndeclare var ondragleave: (this: Window, ev: DragEvent) => any;\r\ndeclare var ondragover: (this: Window, ev: DragEvent) => any;\r\ndeclare var ondragstart: (this: Window, ev: DragEvent) => any;\r\ndeclare var ondrop: (this: Window, ev: DragEvent) => any;\r\ndeclare var ondurationchange: (this: Window, ev: Event) => any;\r\ndeclare var onemptied: (this: Window, ev: Event) => any;\r\ndeclare var onended: (this: Window, ev: MediaStreamErrorEvent) => any;\r\ndeclare var onerror: ErrorEventHandler;\r\ndeclare var onfocus: (this: Window, ev: FocusEvent) => any;\r\ndeclare var onhashchange: (this: Window, ev: HashChangeEvent) => any;\r\ndeclare var oninput: (this: Window, ev: Event) => any;\r\ndeclare var oninvalid: (this: Window, ev: Event) => any;\r\ndeclare var onkeydown: (this: Window, ev: KeyboardEvent) => any;\r\ndeclare var onkeypress: (this: Window, ev: KeyboardEvent) => any;\r\ndeclare var onkeyup: (this: Window, ev: KeyboardEvent) => any;\r\ndeclare var onload: (this: Window, ev: Event) => any;\r\ndeclare var onloadeddata: (this: Window, ev: Event) => any;\r\ndeclare var onloadedmetadata: (this: Window, ev: Event) => any;\r\ndeclare var onloadstart: (this: Window, ev: Event) => any;\r\ndeclare var onmessage: (this: Window, ev: MessageEvent) => any;\r\ndeclare var onmousedown: (this: Window, ev: MouseEvent) => any;\r\ndeclare var onmouseenter: (this: Window, ev: MouseEvent) => any;\r\ndeclare var onmouseleave: (this: Window, ev: MouseEvent) => any;\r\ndeclare var onmousemove: (this: Window, ev: MouseEvent) => any;\r\ndeclare var onmouseout: (this: Window, ev: MouseEvent) => any;\r\ndeclare var onmouseover: (this: Window, ev: MouseEvent) => any;\r\ndeclare var onmouseup: (this: Window, ev: MouseEvent) => any;\r\ndeclare var onmousewheel: (this: Window, ev: WheelEvent) => any;\r\ndeclare var onmsgesturechange: (this: Window, ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturedoubletap: (this: Window, ev: MSGestureEvent) => any;\r\ndeclare var onmsgestureend: (this: Window, ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturehold: (this: Window, ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturestart: (this: Window, ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturetap: (this: Window, ev: MSGestureEvent) => any;\r\ndeclare var onmsinertiastart: (this: Window, ev: MSGestureEvent) => any;\r\ndeclare var onmspointercancel: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onmspointerdown: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onmspointerenter: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onmspointerleave: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onmspointermove: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onmspointerout: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onmspointerover: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onmspointerup: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onoffline: (this: Window, ev: Event) => any;\r\ndeclare var ononline: (this: Window, ev: Event) => any;\r\ndeclare var onorientationchange: (this: Window, ev: Event) => any;\r\ndeclare var onpagehide: (this: Window, ev: PageTransitionEvent) => any;\r\ndeclare var onpageshow: (this: Window, ev: PageTransitionEvent) => any;\r\ndeclare var onpause: (this: Window, ev: Event) => any;\r\ndeclare var onplay: (this: Window, ev: Event) => any;\r\ndeclare var onplaying: (this: Window, ev: Event) => any;\r\ndeclare var onpopstate: (this: Window, ev: PopStateEvent) => any;\r\ndeclare var onprogress: (this: Window, ev: ProgressEvent) => any;\r\ndeclare var onratechange: (this: Window, ev: Event) => any;\r\ndeclare var onreadystatechange: (this: Window, ev: ProgressEvent) => any;\r\ndeclare var onreset: (this: Window, ev: Event) => any;\r\ndeclare var onresize: (this: Window, ev: UIEvent) => any;\r\ndeclare var onscroll: (this: Window, ev: UIEvent) => any;\r\ndeclare var onseeked: (this: Window, ev: Event) => any;\r\ndeclare var onseeking: (this: Window, ev: Event) => any;\r\ndeclare var onselect: (this: Window, ev: UIEvent) => any;\r\ndeclare var onstalled: (this: Window, ev: Event) => any;\r\ndeclare var onstorage: (this: Window, ev: StorageEvent) => any;\r\ndeclare var onsubmit: (this: Window, ev: Event) => any;\r\ndeclare var onsuspend: (this: Window, ev: Event) => any;\r\ndeclare var ontimeupdate: (this: Window, ev: Event) => any;\r\ndeclare var ontouchcancel: (ev: TouchEvent) => any;\r\ndeclare var ontouchend: (ev: TouchEvent) => any;\r\ndeclare var ontouchmove: (ev: TouchEvent) => any;\r\ndeclare var ontouchstart: (ev: TouchEvent) => any;\r\ndeclare var onunload: (this: Window, ev: Event) => any;\r\ndeclare var onvolumechange: (this: Window, ev: Event) => any;\r\ndeclare var onwaiting: (this: Window, ev: Event) => any;\r\ndeclare var opener: any;\r\ndeclare var orientation: string | number;\r\ndeclare var outerHeight: number;\r\ndeclare var outerWidth: number;\r\ndeclare var pageXOffset: number;\r\ndeclare var pageYOffset: number;\r\ndeclare var parent: Window;\r\ndeclare var performance: Performance;\r\ndeclare var personalbar: BarProp;\r\ndeclare var screen: Screen;\r\ndeclare var screenLeft: number;\r\ndeclare var screenTop: number;\r\ndeclare var screenX: number;\r\ndeclare var screenY: number;\r\ndeclare var scrollX: number;\r\ndeclare var scrollY: number;\r\ndeclare var scrollbars: BarProp;\r\ndeclare var self: Window;\r\ndeclare var status: string;\r\ndeclare var statusbar: BarProp;\r\ndeclare var styleMedia: StyleMedia;\r\ndeclare var toolbar: BarProp;\r\ndeclare var top: Window;\r\ndeclare var window: Window;\r\ndeclare function alert(message?: any): void;\r\ndeclare function blur(): void;\r\ndeclare function cancelAnimationFrame(handle: number): void;\r\ndeclare function captureEvents(): void;\r\ndeclare function close(): void;\r\ndeclare function confirm(message?: string): boolean;\r\ndeclare function focus(): void;\r\ndeclare function getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;\r\ndeclare function getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;\r\ndeclare function getSelection(): Selection;\r\ndeclare function matchMedia(mediaQuery: string): MediaQueryList;\r\ndeclare function moveBy(x?: number, y?: number): void;\r\ndeclare function moveTo(x?: number, y?: number): void;\r\ndeclare function msWriteProfilerMark(profilerMarkName: string): void;\r\ndeclare function open(url?: string, target?: string, features?: string, replace?: boolean): Window;\r\ndeclare function postMessage(message: any, targetOrigin: string, transfer?: any[]): void;\r\ndeclare function print(): void;\r\ndeclare function prompt(message?: string, _default?: string): string | null;\r\ndeclare function releaseEvents(): void;\r\ndeclare function requestAnimationFrame(callback: FrameRequestCallback): number;\r\ndeclare function resizeBy(x?: number, y?: number): void;\r\ndeclare function resizeTo(x?: number, y?: number): void;\r\ndeclare function scroll(x?: number, y?: number): void;\r\ndeclare function scrollBy(x?: number, y?: number): void;\r\ndeclare function scrollTo(x?: number, y?: number): void;\r\ndeclare function webkitCancelAnimationFrame(handle: number): void;\r\ndeclare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;\r\ndeclare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;\r\ndeclare function webkitRequestAnimationFrame(callback: FrameRequestCallback): number;\r\ndeclare function scroll(options?: ScrollToOptions): void;\r\ndeclare function scrollTo(options?: ScrollToOptions): void;\r\ndeclare function scrollBy(options?: ScrollToOptions): void;\r\ndeclare function toString(): string;\r\ndeclare function addEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\ndeclare function dispatchEvent(evt: Event): boolean;\r\ndeclare function removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\ndeclare function clearInterval(handle: number): void;\r\ndeclare function clearTimeout(handle: number): void;\r\ndeclare function setInterval(handler: (...args: any[]) => void, timeout: number): number;\r\ndeclare function setInterval(handler: any, timeout?: any, ...args: any[]): number;\r\ndeclare function setTimeout(handler: (...args: any[]) => void, timeout: number): number;\r\ndeclare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;\r\ndeclare function clearImmediate(handle: number): void;\r\ndeclare function setImmediate(handler: (...args: any[]) => void): number;\r\ndeclare function setImmediate(handler: any, ...args: any[]): number;\r\ndeclare var sessionStorage: Storage;\r\ndeclare var localStorage: Storage;\r\ndeclare var console: Console;\r\ndeclare var onpointercancel: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onpointerdown: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onpointerenter: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onpointerleave: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onpointermove: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onpointerout: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onpointerover: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onpointerup: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onwheel: (this: Window, ev: WheelEvent) => any;\r\ndeclare var indexedDB: IDBFactory;\r\ndeclare function atob(encodedString: string): string;\r\ndeclare function btoa(rawString: string): string;\r\ndeclare function addEventListener(type: \"MSGestureChange\", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureDoubleTap\", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureEnd\", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureHold\", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureStart\", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureTap\", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSInertiaStart\", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerCancel\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerDown\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerEnter\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerLeave\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerMove\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerOut\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerOver\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerUp\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"abort\", listener: (this: Window, ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"afterprint\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"beforeprint\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"beforeunload\", listener: (this: Window, ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"blur\", listener: (this: Window, ev: FocusEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"canplay\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"canplaythrough\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"change\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"click\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"compassneedscalibration\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"contextmenu\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dblclick\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"devicelight\", listener: (this: Window, ev: DeviceLightEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"devicemotion\", listener: (this: Window, ev: DeviceMotionEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"deviceorientation\", listener: (this: Window, ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"drag\", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragend\", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragenter\", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragleave\", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragover\", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragstart\", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"drop\", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"durationchange\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"emptied\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"ended\", listener: (this: Window, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"focus\", listener: (this: Window, ev: FocusEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"hashchange\", listener: (this: Window, ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"input\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"invalid\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"keydown\", listener: (this: Window, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"keypress\", listener: (this: Window, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"keyup\", listener: (this: Window, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"load\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"loadeddata\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"loadedmetadata\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"loadstart\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"message\", listener: (this: Window, ev: MessageEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mousedown\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseenter\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseleave\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mousemove\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseout\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseover\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseup\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mousewheel\", listener: (this: Window, ev: WheelEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"offline\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"online\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"orientationchange\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pagehide\", listener: (this: Window, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pageshow\", listener: (this: Window, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pause\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"play\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"playing\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointercancel\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerdown\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerenter\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerleave\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointermove\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerout\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerover\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerup\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"popstate\", listener: (this: Window, ev: PopStateEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"progress\", listener: (this: Window, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"ratechange\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"readystatechange\", listener: (this: Window, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"reset\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"resize\", listener: (this: Window, ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"scroll\", listener: (this: Window, ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"seeked\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"seeking\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"select\", listener: (this: Window, ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"stalled\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"storage\", listener: (this: Window, ev: StorageEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"submit\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"suspend\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"timeupdate\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"unload\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"volumechange\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"waiting\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"wheel\", listener: (this: Window, ev: WheelEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\ntype AAGUID = string;\r\ntype AlgorithmIdentifier = string | Algorithm;\r\ntype ConstrainBoolean = boolean | ConstrainBooleanParameters;\r\ntype ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;\r\ntype ConstrainDouble = number | ConstrainDoubleRange;\r\ntype ConstrainLong = number | ConstrainLongRange;\r\ntype CryptoOperationData = ArrayBufferView;\r\ntype GLbitfield = number;\r\ntype GLboolean = boolean;\r\ntype GLbyte = number;\r\ntype GLclampf = number;\r\ntype GLenum = number;\r\ntype GLfloat = number;\r\ntype GLint = number;\r\ntype GLintptr = number;\r\ntype GLshort = number;\r\ntype GLsizei = number;\r\ntype GLsizeiptr = number;\r\ntype GLubyte = number;\r\ntype GLuint = number;\r\ntype GLushort = number;\r\ntype IDBKeyPath = string;\r\ntype KeyFormat = string;\r\ntype KeyType = string;\r\ntype KeyUsage = string;\r\ntype MSInboundPayload = MSVideoRecvPayload | MSAudioRecvPayload;\r\ntype MSLocalClientEvent = MSLocalClientEventBase | MSAudioLocalClientEvent;\r\ntype MSOutboundPayload = MSVideoSendPayload | MSAudioSendPayload;\r\ntype RTCIceGatherCandidate = RTCIceCandidate | RTCIceCandidateComplete;\r\ntype RTCTransport = RTCDtlsTransport | RTCSrtpSdesTransport;\r\ntype payloadtype = number;\r\ntype ScrollBehavior = \"auto\" | \"instant\" | \"smooth\";\r\ntype ScrollLogicalPosition = \"start\" | \"center\" | \"end\" | \"nearest\";\r\ntype IDBValidKey = number | string | Date | IDBArrayKey;\r\ntype BufferSource = ArrayBuffer | ArrayBufferView;\r\ntype MouseWheelEvent = WheelEvent;\r\n/////////////////////////////\r\n/// WorkerGlobalScope APIs \r\n/////////////////////////////\r\n// These are only available in a Web Worker \r\ndeclare function importScripts(...urls: string[]): void;\r\n\r\n\r\n/////////////////////////////\r\n/// Windows Script Host APIS\r\n/////////////////////////////\r\n\r\n\r\ninterface ActiveXObject {\r\n new (s: string): any;\r\n}\r\ndeclare var ActiveXObject: ActiveXObject;\r\n\r\ninterface ITextWriter {\r\n Write(s: string): void;\r\n WriteLine(s: string): void;\r\n Close(): void;\r\n}\r\n\r\ninterface TextStreamBase {\r\n /**\r\n * The column number of the current character position in an input stream.\r\n */\r\n Column: number;\r\n\r\n /**\r\n * The current line number in an input stream.\r\n */\r\n Line: number;\r\n\r\n /**\r\n * Closes a text stream.\r\n * It is not necessary to close standard streams; they close automatically when the process ends. If \r\n * you close a standard stream, be aware that any other pointers to that standard stream become invalid.\r\n */\r\n Close(): void;\r\n}\r\n\r\ninterface TextStreamWriter extends TextStreamBase {\r\n /**\r\n * Sends a string to an output stream.\r\n */\r\n Write(s: string): void;\r\n\r\n /**\r\n * Sends a specified number of blank lines (newline characters) to an output stream.\r\n */\r\n WriteBlankLines(intLines: number): void;\r\n\r\n /**\r\n * Sends a string followed by a newline character to an output stream.\r\n */\r\n WriteLine(s: string): void;\r\n}\r\n\r\ninterface TextStreamReader extends TextStreamBase {\r\n /**\r\n * Returns a specified number of characters from an input stream, starting at the current pointer position.\r\n * Does not return until the ENTER key is pressed.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n */\r\n Read(characters: number): string;\r\n\r\n /**\r\n * Returns all characters from an input stream.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n */\r\n ReadAll(): string;\r\n\r\n /**\r\n * Returns an entire line from an input stream.\r\n * Although this method extracts the newline character, it does not add it to the returned string.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n */\r\n ReadLine(): string;\r\n\r\n /**\r\n * Skips a specified number of characters when reading from an input text stream.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)\r\n */\r\n Skip(characters: number): void;\r\n\r\n /**\r\n * Skips the next line when reading from an input text stream.\r\n * Can only be used on a stream in reading mode, not writing or appending mode.\r\n */\r\n SkipLine(): void;\r\n\r\n /**\r\n * Indicates whether the stream pointer position is at the end of a line.\r\n */\r\n AtEndOfLine: boolean;\r\n\r\n /**\r\n * Indicates whether the stream pointer position is at the end of a stream.\r\n */\r\n AtEndOfStream: boolean;\r\n}\r\n\r\ndeclare var WScript: {\r\n /**\r\n * Outputs text to either a message box (under WScript.exe) or the command console window followed by\r\n * a newline (under CScript.exe).\r\n */\r\n Echo(s: any): void;\r\n\r\n /**\r\n * Exposes the write-only error output stream for the current script.\r\n * Can be accessed only while using CScript.exe.\r\n */\r\n StdErr: TextStreamWriter;\r\n\r\n /**\r\n * Exposes the write-only output stream for the current script.\r\n * Can be accessed only while using CScript.exe.\r\n */\r\n StdOut: TextStreamWriter;\r\n Arguments: { length: number; Item(n: number): string; };\r\n\r\n /**\r\n * The full path of the currently running script.\r\n */\r\n ScriptFullName: string;\r\n\r\n /**\r\n * Forces the script to stop immediately, with an optional exit code.\r\n */\r\n Quit(exitCode?: number): number;\r\n\r\n /**\r\n * The Windows Script Host build version number.\r\n */\r\n BuildVersion: number;\r\n\r\n /**\r\n * Fully qualified path of the host executable.\r\n */\r\n FullName: string;\r\n\r\n /**\r\n * Gets/sets the script mode - interactive(true) or batch(false).\r\n */\r\n Interactive: boolean;\r\n\r\n /**\r\n * The name of the host executable (WScript.exe or CScript.exe).\r\n */\r\n Name: string;\r\n\r\n /**\r\n * Path of the directory containing the host executable.\r\n */\r\n Path: string;\r\n\r\n /**\r\n * The filename of the currently running script.\r\n */\r\n ScriptName: string;\r\n\r\n /**\r\n * Exposes the read-only input stream for the current script.\r\n * Can be accessed only while using CScript.exe.\r\n */\r\n StdIn: TextStreamReader;\r\n\r\n /**\r\n * Windows Script Host version\r\n */\r\n Version: string;\r\n\r\n /**\r\n * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.\r\n */\r\n ConnectObject(objEventSource: any, strPrefix: string): void;\r\n\r\n /**\r\n * Creates a COM object.\r\n * @param strProgiID\r\n * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.\r\n */\r\n CreateObject(strProgID: string, strPrefix?: string): any;\r\n\r\n /**\r\n * Disconnects a COM object from its event sources.\r\n */\r\n DisconnectObject(obj: any): void;\r\n\r\n /**\r\n * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.\r\n * @param strPathname Fully qualified path to the file containing the object persisted to disk.\r\n * For objects in memory, pass a zero-length string.\r\n * @param strProgID\r\n * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.\r\n */\r\n GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;\r\n\r\n /**\r\n * Suspends script execution for a specified length of time, then continues execution.\r\n * @param intTime Interval (in milliseconds) to suspend script execution.\r\n */\r\n Sleep(intTime: number): void;\r\n};\r\n\r\n/**\r\n * Allows enumerating over a COM collection, which may not have indexed item access.\r\n */\r\ninterface Enumerator {\r\n /**\r\n * Returns true if the current item is the last one in the collection, or the collection is empty,\r\n * or the current item is undefined.\r\n */\r\n atEnd(): boolean;\r\n\r\n /**\r\n * Returns the current item in the collection\r\n */\r\n item(): T;\r\n\r\n /**\r\n * Resets the current item in the collection to the first item. If there are no items in the collection,\r\n * the current item is set to undefined.\r\n */\r\n moveFirst(): void;\r\n\r\n /**\r\n * Moves the current item to the next item in the collection. If the enumerator is at the end of\r\n * the collection or the collection is empty, the current item is set to undefined.\r\n */\r\n moveNext(): void;\r\n}\r\n\r\ninterface EnumeratorConstructor {\r\n new (collection: any): Enumerator;\r\n new (collection: any): Enumerator;\r\n}\r\n\r\ndeclare var Enumerator: EnumeratorConstructor;\r\n\r\n/**\r\n * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.\r\n */\r\ninterface VBArray {\r\n /**\r\n * Returns the number of dimensions (1-based).\r\n */\r\n dimensions(): number;\r\n\r\n /**\r\n * Takes an index for each dimension in the array, and returns the item at the corresponding location.\r\n */\r\n getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;\r\n\r\n /**\r\n * Returns the smallest available index for a given dimension.\r\n * @param dimension 1-based dimension (defaults to 1)\r\n */\r\n lbound(dimension?: number): number;\r\n\r\n /**\r\n * Returns the largest available index for a given dimension.\r\n * @param dimension 1-based dimension (defaults to 1)\r\n */\r\n ubound(dimension?: number): number;\r\n\r\n /**\r\n * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,\r\n * each successive dimension is appended to the end of the array.\r\n * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]\r\n */\r\n toArray(): T[];\r\n}\r\n\r\ninterface VBArrayConstructor {\r\n new (safeArray: any): VBArray;\r\n new (safeArray: any): VBArray;\r\n}\r\n\r\ndeclare var VBArray: VBArrayConstructor;\r\n\r\n/**\r\n * Automation date (VT_DATE)\r\n */\r\ninterface VarDate { }\r\n\r\ninterface DateConstructor {\r\n new (vd: VarDate): Date;\r\n}\r\n\r\ninterface Date {\r\n getVarDate: () => VarDate;\r\n}\r\n/// \r\n\r\ninterface DOMTokenList {\r\n [Symbol.iterator](): IterableIterator;\r\n}\r\n\r\ninterface NodeList {\r\n [Symbol.iterator](): IterableIterator\r\n}\r\n\r\ninterface NodeListOf {\r\n [Symbol.iterator](): IterableIterator\r\n}\r\n"}; }); diff --git a/lib/lib-ts.js b/lib/lib-ts.js index c82d8fb4..d0f4d07a 100644 --- a/lib/lib-ts.js +++ b/lib/lib-ts.js @@ -5,5 +5,5 @@ // This is a generated file from lib.d.ts -define([], function() { return { contents: "/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved. \r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0 \r\n \r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, \r\nMERCHANTABLITY OR NON-INFRINGEMENT. \r\n \r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\n/// \r\n/////////////////////////////\r\n/// ECMAScript APIs\r\n/////////////////////////////\r\n\r\ndeclare var NaN: number;\r\ndeclare var Infinity: number;\r\n\r\n/**\r\n * Evaluates JavaScript code and executes it. \r\n * @param x A String value that contains valid JavaScript code.\r\n */\r\ndeclare function eval(x: string): any;\r\n\r\n/**\r\n * Converts A string to an integer.\r\n * @param s A string to convert into a number.\r\n * @param radix A value between 2 and 36 that specifies the base of the number in numString. \r\n * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\n * All other strings are considered decimal.\r\n */\r\ndeclare function parseInt(s: string, radix?: number): number;\r\n\r\n/**\r\n * Converts a string to a floating-point number. \r\n * @param string A string that contains a floating-point number. \r\n */\r\ndeclare function parseFloat(string: string): number;\r\n\r\n/**\r\n * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number). \r\n * @param number A numeric value.\r\n */\r\ndeclare function isNaN(number: number): boolean;\r\n\r\n/** \r\n * Determines whether a supplied number is finite.\r\n * @param number Any numeric value.\r\n */\r\ndeclare function isFinite(number: number): boolean;\r\n\r\n/**\r\n * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).\r\n * @param encodedURI A value representing an encoded URI.\r\n */\r\ndeclare function decodeURI(encodedURI: string): string;\r\n\r\n/**\r\n * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).\r\n * @param encodedURIComponent A value representing an encoded URI component.\r\n */\r\ndeclare function decodeURIComponent(encodedURIComponent: string): string;\r\n\r\n/** \r\n * Encodes a text string as a valid Uniform Resource Identifier (URI)\r\n * @param uri A value representing an encoded URI.\r\n */\r\ndeclare function encodeURI(uri: string): string;\r\n\r\n/**\r\n * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).\r\n * @param uriComponent A value representing an encoded URI component.\r\n */\r\ndeclare function encodeURIComponent(uriComponent: string): string;\r\n\r\ninterface PropertyDescriptor {\r\n configurable?: boolean;\r\n enumerable?: boolean;\r\n value?: any;\r\n writable?: boolean;\r\n get? (): any;\r\n set? (v: any): void;\r\n}\r\n\r\ninterface PropertyDescriptorMap {\r\n [s: string]: PropertyDescriptor;\r\n}\r\n\r\ninterface Object {\r\n /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */\r\n constructor: Function;\r\n\r\n /** Returns a string representation of an object. */\r\n toString(): string;\r\n\r\n /** Returns a date converted to a string using the current locale. */\r\n toLocaleString(): string;\r\n\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): Object;\r\n\r\n /**\r\n * Determines whether an object has a property with the specified name. \r\n * @param v A property name.\r\n */\r\n hasOwnProperty(v: string): boolean;\r\n\r\n /**\r\n * Determines whether an object exists in another object's prototype chain. \r\n * @param v Another object whose prototype chain is to be checked.\r\n */\r\n isPrototypeOf(v: Object): boolean;\r\n\r\n /** \r\n * Determines whether a specified property is enumerable.\r\n * @param v A property name.\r\n */\r\n propertyIsEnumerable(v: string): boolean;\r\n}\r\n\r\ninterface ObjectConstructor {\r\n new (value?: any): Object;\r\n (): any;\r\n (value: any): any;\r\n\r\n /** A reference to the prototype for a class of objects. */\r\n prototype: Object;\r\n\r\n /** \r\n * Returns the prototype of an object. \r\n * @param o The object that references the prototype.\r\n */\r\n getPrototypeOf(o: any): any;\r\n\r\n /**\r\n * Gets the own property descriptor of the specified object. \r\n * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. \r\n * @param o Object that contains the property.\r\n * @param p Name of the property.\r\n */\r\n getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;\r\n\r\n /** \r\n * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly \r\n * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.\r\n * @param o Object that contains the own properties.\r\n */\r\n getOwnPropertyNames(o: any): string[];\r\n\r\n /** \r\n * Creates an object that has the specified prototype, and that optionally contains specified properties.\r\n * @param o Object to use as a prototype. May be null\r\n * @param properties JavaScript object that contains one or more property descriptors. \r\n */\r\n create(o: any, properties?: PropertyDescriptorMap): any;\r\n\r\n /**\r\n * Adds a property to an object, or modifies attributes of an existing property. \r\n * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.\r\n * @param p The property name.\r\n * @param attributes Descriptor for the property. It can be for a data property or an accessor property.\r\n */\r\n defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;\r\n\r\n /**\r\n * Adds one or more properties to an object, and/or modifies attributes of existing properties. \r\n * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.\r\n * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.\r\n */\r\n defineProperties(o: any, properties: PropertyDescriptorMap): any;\r\n\r\n /**\r\n * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.\r\n * @param o Object on which to lock the attributes. \r\n */\r\n seal(o: T): T;\r\n\r\n /**\r\n * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.\r\n * @param o Object on which to lock the attributes.\r\n */\r\n freeze(o: T): T;\r\n\r\n /**\r\n * Prevents the addition of new properties to an object.\r\n * @param o Object to make non-extensible. \r\n */\r\n preventExtensions(o: T): T;\r\n\r\n /**\r\n * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.\r\n * @param o Object to test. \r\n */\r\n isSealed(o: any): boolean;\r\n\r\n /**\r\n * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.\r\n * @param o Object to test. \r\n */\r\n isFrozen(o: any): boolean;\r\n\r\n /**\r\n * Returns a value that indicates whether new properties can be added to an object.\r\n * @param o Object to test. \r\n */\r\n isExtensible(o: any): boolean;\r\n\r\n /**\r\n * Returns the names of the enumerable properties and methods of an object.\r\n * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.\r\n */\r\n keys(o: any): string[];\r\n}\r\n\r\n/**\r\n * Provides functionality common to all JavaScript objects.\r\n */\r\ndeclare var Object: ObjectConstructor;\r\n\r\n/**\r\n * Creates a new function.\r\n */\r\ninterface Function {\r\n /**\r\n * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.\r\n * @param thisArg The object to be used as the this object.\r\n * @param argArray A set of arguments to be passed to the function.\r\n */\r\n apply(thisArg: any, argArray?: any): any;\r\n\r\n /**\r\n * Calls a method of an object, substituting another object for the current object.\r\n * @param thisArg The object to be used as the current object.\r\n * @param argArray A list of arguments to be passed to the method.\r\n */\r\n call(thisArg: any, ...argArray: any[]): any;\r\n\r\n /**\r\n * For a given function, creates a bound function that has the same body as the original function. \r\n * The this object of the bound function is associated with the specified object, and has the specified initial parameters.\r\n * @param thisArg An object to which the this keyword can refer inside the new function.\r\n * @param argArray A list of arguments to be passed to the new function.\r\n */\r\n bind(thisArg: any, ...argArray: any[]): any;\r\n\r\n prototype: any;\r\n length: number;\r\n\r\n // Non-standard extensions\r\n arguments: any;\r\n caller: Function;\r\n}\r\n\r\ninterface FunctionConstructor {\r\n /**\r\n * Creates a new function.\r\n * @param args A list of arguments the function accepts.\r\n */\r\n new (...args: string[]): Function;\r\n (...args: string[]): Function;\r\n prototype: Function;\r\n}\r\n\r\ndeclare var Function: FunctionConstructor;\r\n\r\ninterface IArguments {\r\n [index: number]: any;\r\n length: number;\r\n callee: Function;\r\n}\r\n\r\ninterface String {\r\n /** Returns a string representation of a string. */\r\n toString(): string;\r\n\r\n /**\r\n * Returns the character at the specified index.\r\n * @param pos The zero-based index of the desired character.\r\n */\r\n charAt(pos: number): string;\r\n\r\n /** \r\n * Returns the Unicode value of the character at the specified location.\r\n * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.\r\n */\r\n charCodeAt(index: number): number;\r\n\r\n /**\r\n * Returns a string that contains the concatenation of two or more strings.\r\n * @param strings The strings to append to the end of the string. \r\n */\r\n concat(...strings: string[]): string;\r\n\r\n /**\r\n * Returns the position of the first occurrence of a substring. \r\n * @param searchString The substring to search for in the string\r\n * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.\r\n */\r\n indexOf(searchString: string, position?: number): number;\r\n\r\n /**\r\n * Returns the last occurrence of a substring in the string.\r\n * @param searchString The substring to search for.\r\n * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.\r\n */\r\n lastIndexOf(searchString: string, position?: number): number;\r\n\r\n /**\r\n * Determines whether two strings are equivalent in the current locale.\r\n * @param that String to compare to target string\r\n */\r\n localeCompare(that: string): number;\r\n\r\n /** \r\n * Matches a string with a regular expression, and returns an array containing the results of that search.\r\n * @param regexp A variable name or string literal containing the regular expression pattern and flags.\r\n */\r\n match(regexp: string): RegExpMatchArray;\r\n\r\n /** \r\n * Matches a string with a regular expression, and returns an array containing the results of that search.\r\n * @param regexp A regular expression object that contains the regular expression pattern and applicable flags. \r\n */\r\n match(regexp: RegExp): RegExpMatchArray;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A string that represents the regular expression.\r\n * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.\r\n */\r\n replace(searchValue: string, replaceValue: string): string;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A string that represents the regular expression.\r\n * @param replacer A function that returns the replacement text.\r\n */\r\n replace(searchValue: string, replacer: (substring: string, ...args: any[]) => string): string;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags.\r\n * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.\r\n */\r\n replace(searchValue: RegExp, replaceValue: string): string;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags\r\n * @param replacer A function that returns the replacement text.\r\n */\r\n replace(searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string;\r\n\r\n /**\r\n * Finds the first substring match in a regular expression search.\r\n * @param regexp The regular expression pattern and applicable flags. \r\n */\r\n search(regexp: string): number;\r\n\r\n /**\r\n * Finds the first substring match in a regular expression search.\r\n * @param regexp The regular expression pattern and applicable flags. \r\n */\r\n search(regexp: RegExp): number;\r\n\r\n /**\r\n * Returns a section of a string.\r\n * @param start The index to the beginning of the specified portion of stringObj. \r\n * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. \r\n * If this value is not specified, the substring continues to the end of stringObj.\r\n */\r\n slice(start?: number, end?: number): string;\r\n\r\n /**\r\n * Split a string into substrings using the specified separator and return them as an array.\r\n * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. \r\n * @param limit A value used to limit the number of elements returned in the array.\r\n */\r\n split(separator: string, limit?: number): string[];\r\n\r\n /**\r\n * Split a string into substrings using the specified separator and return them as an array.\r\n * @param separator A Regular Express that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. \r\n * @param limit A value used to limit the number of elements returned in the array.\r\n */\r\n split(separator: RegExp, limit?: number): string[];\r\n\r\n /**\r\n * Returns the substring at the specified location within a String object. \r\n * @param start The zero-based index number indicating the beginning of the substring.\r\n * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.\r\n * If end is omitted, the characters from start through the end of the original string are returned.\r\n */\r\n substring(start: number, end?: number): string;\r\n\r\n /** Converts all the alphabetic characters in a string to lowercase. */\r\n toLowerCase(): string;\r\n\r\n /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */\r\n toLocaleLowerCase(): string;\r\n\r\n /** Converts all the alphabetic characters in a string to uppercase. */\r\n toUpperCase(): string;\r\n\r\n /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */\r\n toLocaleUpperCase(): string;\r\n\r\n /** Removes the leading and trailing white space and line terminator characters from a string. */\r\n trim(): string;\r\n\r\n /** Returns the length of a String object. */\r\n length: number;\r\n\r\n // IE extensions\r\n /**\r\n * Gets a substring beginning at the specified location and having the specified length.\r\n * @param from The starting position of the desired substring. The index of the first character in the string is zero.\r\n * @param length The number of characters to include in the returned substring.\r\n */\r\n substr(from: number, length?: number): string;\r\n\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): string;\r\n\r\n [index: number]: string;\r\n}\r\n\r\ninterface StringConstructor {\r\n new (value?: any): String;\r\n (value?: any): string;\r\n prototype: String;\r\n fromCharCode(...codes: number[]): string;\r\n}\r\n\r\n/** \r\n * Allows manipulation and formatting of text strings and determination and location of substrings within strings. \r\n */\r\ndeclare var String: StringConstructor;\r\n\r\ninterface Boolean {\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): boolean;\r\n}\r\n\r\ninterface BooleanConstructor {\r\n new (value?: any): Boolean;\r\n (value?: any): boolean;\r\n prototype: Boolean;\r\n}\r\n\r\ndeclare var Boolean: BooleanConstructor;\r\n\r\ninterface Number {\r\n /**\r\n * Returns a string representation of an object.\r\n * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.\r\n */\r\n toString(radix?: number): string;\r\n\r\n /** \r\n * Returns a string representing a number in fixed-point notation.\r\n * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.\r\n */\r\n toFixed(fractionDigits?: number): string;\r\n\r\n /**\r\n * Returns a string containing a number represented in exponential notation.\r\n * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.\r\n */\r\n toExponential(fractionDigits?: number): string;\r\n\r\n /**\r\n * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.\r\n * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.\r\n */\r\n toPrecision(precision?: number): string;\r\n\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): number;\r\n}\r\n\r\ninterface NumberConstructor {\r\n new (value?: any): Number;\r\n (value?: any): number;\r\n prototype: Number;\r\n\r\n /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */\r\n MAX_VALUE: number;\r\n\r\n /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */\r\n MIN_VALUE: number;\r\n\r\n /** \r\n * A value that is not a number.\r\n * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.\r\n */\r\n NaN: number;\r\n\r\n /** \r\n * A value that is less than the largest negative number that can be represented in JavaScript.\r\n * JavaScript displays NEGATIVE_INFINITY values as -infinity. \r\n */\r\n NEGATIVE_INFINITY: number;\r\n\r\n /**\r\n * A value greater than the largest number that can be represented in JavaScript. \r\n * JavaScript displays POSITIVE_INFINITY values as infinity. \r\n */\r\n POSITIVE_INFINITY: number;\r\n}\r\n\r\n/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */\r\ndeclare var Number: NumberConstructor;\r\n\r\ninterface TemplateStringsArray extends Array {\r\n raw: string[];\r\n}\r\n\r\ninterface Math {\r\n /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */\r\n E: number;\r\n /** The natural logarithm of 10. */\r\n LN10: number;\r\n /** The natural logarithm of 2. */\r\n LN2: number;\r\n /** The base-2 logarithm of e. */\r\n LOG2E: number;\r\n /** The base-10 logarithm of e. */\r\n LOG10E: number;\r\n /** Pi. This is the ratio of the circumference of a circle to its diameter. */\r\n PI: number;\r\n /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */\r\n SQRT1_2: number;\r\n /** The square root of 2. */\r\n SQRT2: number;\r\n /**\r\n * Returns the absolute value of a number (the value without regard to whether it is positive or negative). \r\n * For example, the absolute value of -5 is the same as the absolute value of 5.\r\n * @param x A numeric expression for which the absolute value is needed.\r\n */\r\n abs(x: number): number;\r\n /**\r\n * Returns the arc cosine (or inverse cosine) of a number. \r\n * @param x A numeric expression.\r\n */\r\n acos(x: number): number;\r\n /** \r\n * Returns the arcsine of a number. \r\n * @param x A numeric expression.\r\n */\r\n asin(x: number): number;\r\n /**\r\n * Returns the arctangent of a number. \r\n * @param x A numeric expression for which the arctangent is needed.\r\n */\r\n atan(x: number): number;\r\n /**\r\n * Returns the angle (in radians) from the X axis to a point.\r\n * @param y A numeric expression representing the cartesian y-coordinate.\r\n * @param x A numeric expression representing the cartesian x-coordinate.\r\n */\r\n atan2(y: number, x: number): number;\r\n /**\r\n * Returns the smallest number greater than or equal to its numeric argument. \r\n * @param x A numeric expression.\r\n */\r\n ceil(x: number): number;\r\n /**\r\n * Returns the cosine of a number. \r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n cos(x: number): number;\r\n /**\r\n * Returns e (the base of natural logarithms) raised to a power. \r\n * @param x A numeric expression representing the power of e.\r\n */\r\n exp(x: number): number;\r\n /**\r\n * Returns the greatest number less than or equal to its numeric argument. \r\n * @param x A numeric expression.\r\n */\r\n floor(x: number): number;\r\n /**\r\n * Returns the natural logarithm (base e) of a number. \r\n * @param x A numeric expression.\r\n */\r\n log(x: number): number;\r\n /**\r\n * Returns the larger of a set of supplied numeric expressions. \r\n * @param values Numeric expressions to be evaluated.\r\n */\r\n max(...values: number[]): number;\r\n /**\r\n * Returns the smaller of a set of supplied numeric expressions. \r\n * @param values Numeric expressions to be evaluated.\r\n */\r\n min(...values: number[]): number;\r\n /**\r\n * Returns the value of a base expression taken to a specified power. \r\n * @param x The base value of the expression.\r\n * @param y The exponent value of the expression.\r\n */\r\n pow(x: number, y: number): number;\r\n /** Returns a pseudorandom number between 0 and 1. */\r\n random(): number;\r\n /** \r\n * Returns a supplied numeric expression rounded to the nearest number.\r\n * @param x The value to be rounded to the nearest number.\r\n */\r\n round(x: number): number;\r\n /**\r\n * Returns the sine of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n sin(x: number): number;\r\n /**\r\n * Returns the square root of a number.\r\n * @param x A numeric expression.\r\n */\r\n sqrt(x: number): number;\r\n /**\r\n * Returns the tangent of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n tan(x: number): number;\r\n}\r\n/** An intrinsic object that provides basic mathematics functionality and constants. */\r\ndeclare var Math: Math;\r\n\r\n/** Enables basic storage and retrieval of dates and times. */\r\ninterface Date {\r\n /** Returns a string representation of a date. The format of the string depends on the locale. */\r\n toString(): string;\r\n /** Returns a date as a string value. */\r\n toDateString(): string;\r\n /** Returns a time as a string value. */\r\n toTimeString(): string;\r\n /** Returns a value as a string value appropriate to the host environment's current locale. */\r\n toLocaleString(): string;\r\n /** Returns a date as a string value appropriate to the host environment's current locale. */\r\n toLocaleDateString(): string;\r\n /** Returns a time as a string value appropriate to the host environment's current locale. */\r\n toLocaleTimeString(): string;\r\n /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */\r\n valueOf(): number;\r\n /** Gets the time value in milliseconds. */\r\n getTime(): number;\r\n /** Gets the year, using local time. */\r\n getFullYear(): number;\r\n /** Gets the year using Universal Coordinated Time (UTC). */\r\n getUTCFullYear(): number;\r\n /** Gets the month, using local time. */\r\n getMonth(): number;\r\n /** Gets the month of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCMonth(): number;\r\n /** Gets the day-of-the-month, using local time. */\r\n getDate(): number;\r\n /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */\r\n getUTCDate(): number;\r\n /** Gets the day of the week, using local time. */\r\n getDay(): number;\r\n /** Gets the day of the week using Universal Coordinated Time (UTC). */\r\n getUTCDay(): number;\r\n /** Gets the hours in a date, using local time. */\r\n getHours(): number;\r\n /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */\r\n getUTCHours(): number;\r\n /** Gets the minutes of a Date object, using local time. */\r\n getMinutes(): number;\r\n /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCMinutes(): number;\r\n /** Gets the seconds of a Date object, using local time. */\r\n getSeconds(): number;\r\n /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCSeconds(): number;\r\n /** Gets the milliseconds of a Date, using local time. */\r\n getMilliseconds(): number;\r\n /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCMilliseconds(): number;\r\n /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */\r\n getTimezoneOffset(): number;\r\n /** \r\n * Sets the date and time value in the Date object.\r\n * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. \r\n */\r\n setTime(time: number): number;\r\n /**\r\n * Sets the milliseconds value in the Date object using local time. \r\n * @param ms A numeric value equal to the millisecond value.\r\n */\r\n setMilliseconds(ms: number): number;\r\n /** \r\n * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).\r\n * @param ms A numeric value equal to the millisecond value. \r\n */\r\n setUTCMilliseconds(ms: number): number;\r\n\r\n /**\r\n * Sets the seconds value in the Date object using local time. \r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setSeconds(sec: number, ms?: number): number;\r\n /**\r\n * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).\r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setUTCSeconds(sec: number, ms?: number): number;\r\n /**\r\n * Sets the minutes value in the Date object using local time. \r\n * @param min A numeric value equal to the minutes value. \r\n * @param sec A numeric value equal to the seconds value. \r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setMinutes(min: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).\r\n * @param min A numeric value equal to the minutes value. \r\n * @param sec A numeric value equal to the seconds value. \r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setUTCMinutes(min: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the hour value in the Date object using local time.\r\n * @param hours A numeric value equal to the hours value.\r\n * @param min A numeric value equal to the minutes value.\r\n * @param sec A numeric value equal to the seconds value. \r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setHours(hours: number, min?: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the hours value in the Date object using Universal Coordinated Time (UTC).\r\n * @param hours A numeric value equal to the hours value.\r\n * @param min A numeric value equal to the minutes value.\r\n * @param sec A numeric value equal to the seconds value. \r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the numeric day-of-the-month value of the Date object using local time. \r\n * @param date A numeric value equal to the day of the month.\r\n */\r\n setDate(date: number): number;\r\n /** \r\n * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).\r\n * @param date A numeric value equal to the day of the month. \r\n */\r\n setUTCDate(date: number): number;\r\n /** \r\n * Sets the month value in the Date object using local time. \r\n * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. \r\n * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.\r\n */\r\n setMonth(month: number, date?: number): number;\r\n /**\r\n * Sets the month value in the Date object using Universal Coordinated Time (UTC).\r\n * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.\r\n * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.\r\n */\r\n setUTCMonth(month: number, date?: number): number;\r\n /**\r\n * Sets the year of the Date object using local time.\r\n * @param year A numeric value for the year.\r\n * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.\r\n * @param date A numeric value equal for the day of the month.\r\n */\r\n setFullYear(year: number, month?: number, date?: number): number;\r\n /**\r\n * Sets the year value in the Date object using Universal Coordinated Time (UTC).\r\n * @param year A numeric value equal to the year.\r\n * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.\r\n * @param date A numeric value equal to the day of the month.\r\n */\r\n setUTCFullYear(year: number, month?: number, date?: number): number;\r\n /** Returns a date converted to a string using Universal Coordinated Time (UTC). */\r\n toUTCString(): string;\r\n /** Returns a date as a string value in ISO format. */\r\n toISOString(): string;\r\n /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */\r\n toJSON(key?: any): string;\r\n}\r\n\r\ninterface DateConstructor {\r\n new (): Date;\r\n new (value: number): Date;\r\n new (value: string): Date;\r\n new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;\r\n (): string;\r\n prototype: Date;\r\n /**\r\n * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.\r\n * @param s A date string\r\n */\r\n parse(s: string): number;\r\n /**\r\n * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. \r\n * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.\r\n * @param month The month as an number between 0 and 11 (January to December).\r\n * @param date The date as an number between 1 and 31.\r\n * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.\r\n * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.\r\n * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.\r\n * @param ms An number from 0 to 999 that specifies the milliseconds.\r\n */\r\n UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;\r\n now(): number;\r\n}\r\n\r\ndeclare var Date: DateConstructor;\r\n\r\ninterface RegExpMatchArray extends Array {\r\n index?: number;\r\n input?: string;\r\n}\r\n\r\ninterface RegExpExecArray extends Array {\r\n index: number;\r\n input: string;\r\n}\r\n\r\ninterface RegExp {\r\n /** \r\n * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.\r\n * @param string The String object or string literal on which to perform the search.\r\n */\r\n exec(string: string): RegExpExecArray;\r\n\r\n /** \r\n * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.\r\n * @param string String on which to perform the search.\r\n */\r\n test(string: string): boolean;\r\n\r\n /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */\r\n source: string;\r\n\r\n /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */\r\n global: boolean;\r\n\r\n /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */\r\n ignoreCase: boolean;\r\n\r\n /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */\r\n multiline: boolean;\r\n\r\n lastIndex: number;\r\n\r\n // Non-standard extensions\r\n compile(): RegExp;\r\n}\r\n\r\ninterface RegExpConstructor {\r\n new (pattern: string, flags?: string): RegExp;\r\n (pattern: string, flags?: string): RegExp;\r\n prototype: RegExp;\r\n\r\n // Non-standard extensions\r\n $1: string;\r\n $2: string;\r\n $3: string;\r\n $4: string;\r\n $5: string;\r\n $6: string;\r\n $7: string;\r\n $8: string;\r\n $9: string;\r\n lastMatch: string;\r\n}\r\n\r\ndeclare var RegExp: RegExpConstructor;\r\n\r\ninterface Error {\r\n name: string;\r\n message: string;\r\n}\r\n\r\ninterface ErrorConstructor {\r\n new (message?: string): Error;\r\n (message?: string): Error;\r\n prototype: Error;\r\n}\r\n\r\ndeclare var Error: ErrorConstructor;\r\n\r\ninterface EvalError extends Error {\r\n}\r\n\r\ninterface EvalErrorConstructor {\r\n new (message?: string): EvalError;\r\n (message?: string): EvalError;\r\n prototype: EvalError;\r\n}\r\n\r\ndeclare var EvalError: EvalErrorConstructor;\r\n\r\ninterface RangeError extends Error {\r\n}\r\n\r\ninterface RangeErrorConstructor {\r\n new (message?: string): RangeError;\r\n (message?: string): RangeError;\r\n prototype: RangeError;\r\n}\r\n\r\ndeclare var RangeError: RangeErrorConstructor;\r\n\r\ninterface ReferenceError extends Error {\r\n}\r\n\r\ninterface ReferenceErrorConstructor {\r\n new (message?: string): ReferenceError;\r\n (message?: string): ReferenceError;\r\n prototype: ReferenceError;\r\n}\r\n\r\ndeclare var ReferenceError: ReferenceErrorConstructor;\r\n\r\ninterface SyntaxError extends Error {\r\n}\r\n\r\ninterface SyntaxErrorConstructor {\r\n new (message?: string): SyntaxError;\r\n (message?: string): SyntaxError;\r\n prototype: SyntaxError;\r\n}\r\n\r\ndeclare var SyntaxError: SyntaxErrorConstructor;\r\n\r\ninterface TypeError extends Error {\r\n}\r\n\r\ninterface TypeErrorConstructor {\r\n new (message?: string): TypeError;\r\n (message?: string): TypeError;\r\n prototype: TypeError;\r\n}\r\n\r\ndeclare var TypeError: TypeErrorConstructor;\r\n\r\ninterface URIError extends Error {\r\n}\r\n\r\ninterface URIErrorConstructor {\r\n new (message?: string): URIError;\r\n (message?: string): URIError;\r\n prototype: URIError;\r\n}\r\n\r\ndeclare var URIError: URIErrorConstructor;\r\n\r\ninterface JSON {\r\n /**\r\n * Converts a JavaScript Object Notation (JSON) string into an object.\r\n * @param text A valid JSON string.\r\n * @param reviver A function that transforms the results. This function is called for each member of the object. \r\n * If a member contains nested objects, the nested objects are transformed before the parent object is. \r\n */\r\n parse(text: string, reviver?: (key: any, value: any) => any): any;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n */\r\n stringify(value: any): string;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer A function that transforms the results.\r\n */\r\n stringify(value: any, replacer: (key: string, value: any) => any): string;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer Array that transforms the results.\r\n */\r\n stringify(value: any, replacer: any[]): string;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer A function that transforms the results.\r\n * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\r\n */\r\n stringify(value: any, replacer: (key: string, value: any) => any, space: string | number): string;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer Array that transforms the results.\r\n * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\r\n */\r\n stringify(value: any, replacer: any[], space: string | number): string;\r\n}\r\n/**\r\n * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.\r\n */\r\ndeclare var JSON: JSON;\r\n\r\n\r\n/////////////////////////////\r\n/// ECMAScript Array API (specially handled by compiler)\r\n/////////////////////////////\r\n\r\ninterface Array {\r\n /**\r\n * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.\r\n */\r\n length: number;\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n toLocaleString(): string;\r\n /**\r\n * Appends new elements to an array, and returns the new length of the array.\r\n * @param items New elements of the Array.\r\n */\r\n push(...items: T[]): number;\r\n /**\r\n * Removes the last element from an array and returns it.\r\n */\r\n pop(): T;\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat(...items: U[]): T[];\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat(...items: T[]): T[];\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): T[];\r\n /**\r\n * Removes the first element from an array and returns it.\r\n */\r\n shift(): T;\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): T[];\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: T, b: T) => number): T[];\r\n\r\n /**\r\n * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.\r\n * @param start The zero-based location in the array from which to start removing elements.\r\n */\r\n splice(start: number): T[];\r\n\r\n /**\r\n * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.\r\n * @param start The zero-based location in the array from which to start removing elements.\r\n * @param deleteCount The number of elements to remove.\r\n * @param items Elements to insert into the array in place of the deleted elements.\r\n */\r\n splice(start: number, deleteCount: number, ...items: T[]): T[];\r\n\r\n /**\r\n * Inserts new elements at the start of an array.\r\n * @param items Elements to insert at the start of the Array.\r\n */\r\n unshift(...items: T[]): number;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.\r\n */\r\n indexOf(searchElement: T, fromIndex?: number): number;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a specified value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.\r\n */\r\n lastIndexOf(searchElement: T, fromIndex?: number): number;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[];\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;\r\n\r\n [n: number]: T;\r\n}\r\n\r\ninterface ArrayConstructor {\r\n new (arrayLength?: number): any[];\r\n new (arrayLength: number): T[];\r\n new (...items: T[]): T[];\r\n (arrayLength?: number): any[];\r\n (arrayLength: number): T[];\r\n (...items: T[]): T[];\r\n isArray(arg: any): arg is Array;\r\n prototype: Array;\r\n}\r\n\r\ndeclare var Array: ArrayConstructor;\r\n\r\ninterface TypedPropertyDescriptor {\r\n enumerable?: boolean;\r\n configurable?: boolean;\r\n writable?: boolean;\r\n value?: T;\r\n get?: () => T;\r\n set?: (value: T) => void;\r\n}\r\n\r\ndeclare type ClassDecorator = (target: TFunction) => TFunction | void;\r\ndeclare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;\r\ndeclare type MethodDecorator = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor | void;\r\ndeclare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;\r\n\r\ndeclare type PromiseConstructorLike = new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike;\r\n\r\ninterface PromiseLike {\r\n /**\r\n * Attaches callbacks for the resolution and/or rejection of the Promise.\r\n * @param onfulfilled The callback to execute when the Promise is resolved.\r\n * @param onrejected The callback to execute when the Promise is rejected.\r\n * @returns A Promise for the completion of which ever callback is executed.\r\n */\r\n then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike;\r\n then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): PromiseLike;\r\n}\r\n\r\ninterface ArrayLike {\r\n length: number;\r\n [n: number]: T;\r\n}\r\n\r\n\r\n/**\r\n * Represents a raw buffer of binary data, which is used to store data for the \r\n * different typed arrays. ArrayBuffers cannot be read from or written to directly, \r\n * but can be passed to a typed array or DataView Object to interpret the raw \r\n * buffer as needed. \r\n */\r\ninterface ArrayBuffer {\r\n /**\r\n * Read-only. The length of the ArrayBuffer (in bytes).\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * Returns a section of an ArrayBuffer.\r\n */\r\n slice(begin:number, end?:number): ArrayBuffer;\r\n}\r\n\r\ninterface ArrayBufferConstructor {\r\n prototype: ArrayBuffer;\r\n new (byteLength: number): ArrayBuffer;\r\n isView(arg: any): arg is ArrayBufferView;\r\n}\r\ndeclare var ArrayBuffer: ArrayBufferConstructor;\r\n\r\ninterface ArrayBufferView {\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n}\r\n\r\ninterface DataView {\r\n buffer: ArrayBuffer;\r\n byteLength: number;\r\n byteOffset: number;\r\n /**\r\n * Gets the Float32 value at the specified byte offset from the start of the view. There is \r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getFloat32(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Float64 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getFloat64(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Int8 value at the specified byte offset from the start of the view. There is \r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getInt8(byteOffset: number): number;\r\n\r\n /**\r\n * Gets the Int16 value at the specified byte offset from the start of the view. There is \r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getInt16(byteOffset: number, littleEndian?: boolean): number;\r\n /**\r\n * Gets the Int32 value at the specified byte offset from the start of the view. There is \r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getInt32(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Uint8 value at the specified byte offset from the start of the view. There is \r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getUint8(byteOffset: number): number;\r\n\r\n /**\r\n * Gets the Uint16 value at the specified byte offset from the start of the view. There is \r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getUint16(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Uint32 value at the specified byte offset from the start of the view. There is \r\n * no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getUint32(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Stores an Float32 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, \r\n * otherwise a little-endian value should be written.\r\n */\r\n setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Float64 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, \r\n * otherwise a little-endian value should be written.\r\n */\r\n setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Int8 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n */\r\n setInt8(byteOffset: number, value: number): void;\r\n\r\n /**\r\n * Stores an Int16 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, \r\n * otherwise a little-endian value should be written.\r\n */\r\n setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Int32 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, \r\n * otherwise a little-endian value should be written.\r\n */\r\n setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Uint8 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n */\r\n setUint8(byteOffset: number, value: number): void;\r\n\r\n /**\r\n * Stores an Uint16 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, \r\n * otherwise a little-endian value should be written.\r\n */\r\n setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Uint32 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, \r\n * otherwise a little-endian value should be written.\r\n */\r\n setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n}\r\n\r\ninterface DataViewConstructor {\r\n new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;\r\n}\r\ndeclare var DataView: DataViewConstructor;\r\n\r\n/**\r\n * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested \r\n * number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int8Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Int8Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Int8Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): Int8Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Int8Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Int8Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Int8Array;\r\n\r\n /**\r\n * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Int8Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\ninterface Int8ArrayConstructor {\r\n prototype: Int8Array;\r\n new (length: number): Int8Array;\r\n new (array: ArrayLike): Int8Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Int8Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;\r\n\r\n}\r\ndeclare var Int8Array: Int8ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint8Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Uint8Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Uint8Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): Uint8Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Uint8Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint8Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Uint8Array;\r\n\r\n /**\r\n * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint8Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint8ArrayConstructor {\r\n prototype: Uint8Array;\r\n new (length: number): Uint8Array;\r\n new (array: ArrayLike): Uint8Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint8Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;\r\n\r\n}\r\ndeclare var Uint8Array: Uint8ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0. \r\n * If the requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint8ClampedArray {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): Uint8ClampedArray;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Uint8ClampedArray;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: Uint8ClampedArray, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Uint8ClampedArray;\r\n\r\n /**\r\n * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint8ClampedArrayConstructor {\r\n prototype: Uint8ClampedArray;\r\n new (length: number): Uint8ClampedArray;\r\n new (array: ArrayLike): Uint8ClampedArray;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint8ClampedArray;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;\r\n}\r\ndeclare var Uint8ClampedArray: Uint8ClampedArrayConstructor;\r\n\r\n/**\r\n * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int16Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Int16Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Int16Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): Int16Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Int16Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Int16Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Int16Array;\r\n\r\n /**\r\n * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Int16Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Int16ArrayConstructor {\r\n prototype: Int16Array;\r\n new (length: number): Int16Array;\r\n new (array: ArrayLike): Int16Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Int16Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;\r\n\r\n}\r\ndeclare var Int16Array: Int16ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint16Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Uint16Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Uint16Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): Uint16Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Uint16Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint16Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Uint16Array;\r\n\r\n /**\r\n * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint16Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint16ArrayConstructor {\r\n prototype: Uint16Array;\r\n new (length: number): Uint16Array;\r\n new (array: ArrayLike): Uint16Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint16Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;\r\n\r\n}\r\ndeclare var Uint16Array: Uint16ArrayConstructor;\r\n/**\r\n * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int32Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Int32Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Int32Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): Int32Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Int32Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Int32Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Int32Array;\r\n\r\n /**\r\n * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Int32Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Int32ArrayConstructor {\r\n prototype: Int32Array;\r\n new (length: number): Int32Array;\r\n new (array: ArrayLike): Int32Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Int32Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;\r\n}\r\ndeclare var Int32Array: Int32ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the \r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint32Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Uint32Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Uint32Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): Uint32Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Uint32Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint32Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Uint32Array;\r\n\r\n /**\r\n * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint32Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint32ArrayConstructor {\r\n prototype: Uint32Array;\r\n new (length: number): Uint32Array;\r\n new (array: ArrayLike): Uint32Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint32Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;\r\n}\r\ndeclare var Uint32Array: Uint32ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number\r\n * of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float32Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Float32Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Float32Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): Float32Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Float32Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Float32Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Float32Array;\r\n\r\n /**\r\n * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Float32Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Float32ArrayConstructor {\r\n prototype: Float32Array;\r\n new (length: number): Float32Array;\r\n new (array: ArrayLike): Float32Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Float32Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;\r\n\r\n}\r\ndeclare var Float32Array: Float32ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 64-bit float values. The contents are initialized to 0. If the requested \r\n * number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float64Array {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array. \r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n\r\n /** \r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the \r\n * length of the array. \r\n * @param start If start is negative, it is treated as length+start. If end is negative, it \r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value. \r\n */\r\n copyWithin(target: number, start: number, end?: number): Float64Array;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls \r\n * the callbackfn function for each element in array1 until the callbackfn returns false, \r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as \r\n * length+start where length is the length of the array. \r\n * @param end index to stop filling the array at. If end is negative, it is treated as \r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): Float64Array;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): Float64Array;\r\n\r\n /** \r\n * Returns the value of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number;\r\n\r\n /** \r\n * Returns the index of the first element in the array where predicate is true, and undefined \r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending \r\n * order, until it finds one where predicate returns true. If such an element is found, find \r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of \r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the \r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the \r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that \r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the \r\n * callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of \r\n * the callback function is the accumulated result, and is provided as an argument in the next \r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the \r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument \r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls \r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an \r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. \r\n * The return value of the callback function is the accumulated result, and is provided as an \r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start \r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): Float64Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Float64Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the \r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until \r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. \r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If \r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): Float64Array;\r\n\r\n /**\r\n * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Float64Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale. \r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Float64ArrayConstructor {\r\n prototype: Float64Array;\r\n new (length: number): Float64Array;\r\n new (array: ArrayLike): Float64Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Float64Array;\r\n \r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;\r\n}\r\ndeclare var Float64Array: Float64ArrayConstructor;\r\n/////////////////////////////\r\n/// ECMAScript Internationalization API \r\n/////////////////////////////\r\n\r\ndeclare module Intl {\r\n interface CollatorOptions {\r\n usage?: string;\r\n localeMatcher?: string;\r\n numeric?: boolean;\r\n caseFirst?: string;\r\n sensitivity?: string;\r\n ignorePunctuation?: boolean;\r\n }\r\n\r\n interface ResolvedCollatorOptions {\r\n locale: string;\r\n usage: string;\r\n sensitivity: string;\r\n ignorePunctuation: boolean;\r\n collation: string;\r\n caseFirst: string;\r\n numeric: boolean;\r\n }\r\n\r\n interface Collator {\r\n compare(x: string, y: string): number;\r\n resolvedOptions(): ResolvedCollatorOptions;\r\n }\r\n var Collator: {\r\n new (locales?: string[], options?: CollatorOptions): Collator;\r\n new (locale?: string, options?: CollatorOptions): Collator;\r\n (locales?: string[], options?: CollatorOptions): Collator;\r\n (locale?: string, options?: CollatorOptions): Collator;\r\n supportedLocalesOf(locales: string[], options?: CollatorOptions): string[];\r\n supportedLocalesOf(locale: string, options?: CollatorOptions): string[];\r\n }\r\n\r\n interface NumberFormatOptions {\r\n localeMatcher?: string;\r\n style?: string;\r\n currency?: string;\r\n currencyDisplay?: string;\r\n useGrouping?: boolean;\r\n minimumIntegerDigits?: number;\r\n minimumFractionDigits?: number;\r\n maximumFractionDigits?: number;\r\n minimumSignificantDigits?: number;\r\n maximumSignificantDigits?: number;\r\n }\r\n\r\n interface ResolvedNumberFormatOptions {\r\n locale: string;\r\n numberingSystem: string;\r\n style: string;\r\n currency?: string;\r\n currencyDisplay?: string;\r\n minimumIntegerDigits: number;\r\n minimumFractionDigits: number;\r\n maximumFractionDigits: number;\r\n minimumSignificantDigits?: number;\r\n maximumSignificantDigits?: number;\r\n useGrouping: boolean;\r\n }\r\n\r\n interface NumberFormat {\r\n format(value: number): string;\r\n resolvedOptions(): ResolvedNumberFormatOptions;\r\n }\r\n var NumberFormat: {\r\n new (locales?: string[], options?: NumberFormatOptions): NumberFormat;\r\n new (locale?: string, options?: NumberFormatOptions): NumberFormat;\r\n (locales?: string[], options?: NumberFormatOptions): NumberFormat;\r\n (locale?: string, options?: NumberFormatOptions): NumberFormat;\r\n supportedLocalesOf(locales: string[], options?: NumberFormatOptions): string[];\r\n supportedLocalesOf(locale: string, options?: NumberFormatOptions): string[];\r\n }\r\n\r\n interface DateTimeFormatOptions {\r\n localeMatcher?: string;\r\n weekday?: string;\r\n era?: string;\r\n year?: string;\r\n month?: string;\r\n day?: string;\r\n hour?: string;\r\n minute?: string;\r\n second?: string;\r\n timeZoneName?: string;\r\n formatMatcher?: string;\r\n hour12?: boolean;\r\n timeZone?: string;\r\n }\r\n\r\n interface ResolvedDateTimeFormatOptions {\r\n locale: string;\r\n calendar: string;\r\n numberingSystem: string;\r\n timeZone: string;\r\n hour12?: boolean;\r\n weekday?: string;\r\n era?: string;\r\n year?: string;\r\n month?: string;\r\n day?: string;\r\n hour?: string;\r\n minute?: string;\r\n second?: string;\r\n timeZoneName?: string;\r\n }\r\n\r\n interface DateTimeFormat {\r\n format(date?: Date | number): string;\r\n resolvedOptions(): ResolvedDateTimeFormatOptions;\r\n }\r\n var DateTimeFormat: {\r\n new (locales?: string[], options?: DateTimeFormatOptions): DateTimeFormat;\r\n new (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat;\r\n (locales?: string[], options?: DateTimeFormatOptions): DateTimeFormat;\r\n (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat;\r\n supportedLocalesOf(locales: string[], options?: DateTimeFormatOptions): string[];\r\n supportedLocalesOf(locale: string, options?: DateTimeFormatOptions): string[];\r\n }\r\n}\r\n\r\ninterface String {\r\n /**\r\n * Determines whether two strings are equivalent in the current locale.\r\n * @param that String to compare to target string\r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.\r\n * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.\r\n */\r\n localeCompare(that: string, locales: string[], options?: Intl.CollatorOptions): number;\r\n\r\n /**\r\n * Determines whether two strings are equivalent in the current locale.\r\n * @param that String to compare to target string\r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.\r\n * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.\r\n */\r\n localeCompare(that: string, locale: string, options?: Intl.CollatorOptions): number;\r\n}\r\n\r\ninterface Number {\r\n /**\r\n * Converts a number to a string by using the current or specified locale. \r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locales?: string[], options?: Intl.NumberFormatOptions): string;\r\n\r\n /**\r\n * Converts a number to a string by using the current or specified locale. \r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locale?: string, options?: Intl.NumberFormatOptions): string;\r\n}\r\n\r\ninterface Date {\r\n /**\r\n * Converts a date and time to a string by using the current or specified locale. \r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;\r\n /**\r\n * Converts a date to a string by using the current or specified locale. \r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;\r\n\r\n /**\r\n * Converts a time to a string by using the current or specified locale. \r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;\r\n \r\n /**\r\n * Converts a date and time to a string by using the current or specified locale. \r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;\r\n \r\n /**\r\n * Converts a date to a string by using the current or specified locale. \r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;\r\n\r\n /**\r\n * Converts a time to a string by using the current or specified locale. \r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;\r\n}\r\n\r\n\r\n/////////////////////////////\r\n/// IE DOM APIs\r\n/////////////////////////////\r\n\r\ninterface Algorithm {\r\n name?: string;\r\n}\r\n\r\ninterface AriaRequestEventInit extends EventInit {\r\n attributeName?: string;\r\n attributeValue?: string;\r\n}\r\n\r\ninterface ClipboardEventInit extends EventInit {\r\n data?: string;\r\n dataType?: string;\r\n}\r\n\r\ninterface CommandEventInit extends EventInit {\r\n commandName?: string;\r\n detail?: string;\r\n}\r\n\r\ninterface CompositionEventInit extends UIEventInit {\r\n data?: string;\r\n}\r\n\r\ninterface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation {\r\n arrayOfDomainStrings?: string[];\r\n}\r\n\r\ninterface CustomEventInit extends EventInit {\r\n detail?: any;\r\n}\r\n\r\ninterface DeviceAccelerationDict {\r\n x?: number;\r\n y?: number;\r\n z?: number;\r\n}\r\n\r\ninterface DeviceRotationRateDict {\r\n alpha?: number;\r\n beta?: number;\r\n gamma?: number;\r\n}\r\n\r\ninterface EventInit {\r\n bubbles?: boolean;\r\n cancelable?: boolean;\r\n}\r\n\r\ninterface ExceptionInformation {\r\n domain?: string;\r\n}\r\n\r\ninterface FocusEventInit extends UIEventInit {\r\n relatedTarget?: EventTarget;\r\n}\r\n\r\ninterface HashChangeEventInit extends EventInit {\r\n newURL?: string;\r\n oldURL?: string;\r\n}\r\n\r\ninterface KeyAlgorithm {\r\n name?: string;\r\n}\r\n\r\ninterface KeyboardEventInit extends SharedKeyboardAndMouseEventInit {\r\n key?: string;\r\n location?: number;\r\n repeat?: boolean;\r\n}\r\n\r\ninterface MouseEventInit extends SharedKeyboardAndMouseEventInit {\r\n screenX?: number;\r\n screenY?: number;\r\n clientX?: number;\r\n clientY?: number;\r\n button?: number;\r\n buttons?: number;\r\n relatedTarget?: EventTarget;\r\n}\r\n\r\ninterface MsZoomToOptions {\r\n contentX?: number;\r\n contentY?: number;\r\n viewportX?: string;\r\n viewportY?: string;\r\n scaleFactor?: number;\r\n animate?: string;\r\n}\r\n\r\ninterface MutationObserverInit {\r\n childList?: boolean;\r\n attributes?: boolean;\r\n characterData?: boolean;\r\n subtree?: boolean;\r\n attributeOldValue?: boolean;\r\n characterDataOldValue?: boolean;\r\n attributeFilter?: string[];\r\n}\r\n\r\ninterface ObjectURLOptions {\r\n oneTimeOnly?: boolean;\r\n}\r\n\r\ninterface PointerEventInit extends MouseEventInit {\r\n pointerId?: number;\r\n width?: number;\r\n height?: number;\r\n pressure?: number;\r\n tiltX?: number;\r\n tiltY?: number;\r\n pointerType?: string;\r\n isPrimary?: boolean;\r\n}\r\n\r\ninterface PositionOptions {\r\n enableHighAccuracy?: boolean;\r\n timeout?: number;\r\n maximumAge?: number;\r\n}\r\n\r\ninterface SharedKeyboardAndMouseEventInit extends UIEventInit {\r\n ctrlKey?: boolean;\r\n shiftKey?: boolean;\r\n altKey?: boolean;\r\n metaKey?: boolean;\r\n keyModifierStateAltGraph?: boolean;\r\n keyModifierStateCapsLock?: boolean;\r\n keyModifierStateFn?: boolean;\r\n keyModifierStateFnLock?: boolean;\r\n keyModifierStateHyper?: boolean;\r\n keyModifierStateNumLock?: boolean;\r\n keyModifierStateOS?: boolean;\r\n keyModifierStateScrollLock?: boolean;\r\n keyModifierStateSuper?: boolean;\r\n keyModifierStateSymbol?: boolean;\r\n keyModifierStateSymbolLock?: boolean;\r\n}\r\n\r\ninterface StoreExceptionsInformation extends ExceptionInformation {\r\n siteName?: string;\r\n explanationString?: string;\r\n detailURI?: string;\r\n}\r\n\r\ninterface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {\r\n arrayOfDomainStrings?: string[];\r\n}\r\n\r\ninterface UIEventInit extends EventInit {\r\n view?: Window;\r\n detail?: number;\r\n}\r\n\r\ninterface WebGLContextAttributes {\r\n alpha?: boolean;\r\n depth?: boolean;\r\n stencil?: boolean;\r\n antialias?: boolean;\r\n premultipliedAlpha?: boolean;\r\n preserveDrawingBuffer?: boolean;\r\n}\r\n\r\ninterface WebGLContextEventInit extends EventInit {\r\n statusMessage?: string;\r\n}\r\n\r\ninterface WheelEventInit extends MouseEventInit {\r\n deltaX?: number;\r\n deltaY?: number;\r\n deltaZ?: number;\r\n deltaMode?: number;\r\n}\r\n\r\ninterface EventListener {\r\n (evt: Event): void;\r\n}\r\n\r\ninterface ANGLE_instanced_arrays {\r\n drawArraysInstancedANGLE(mode: number, first: number, count: number, primcount: number): void;\r\n drawElementsInstancedANGLE(mode: number, count: number, type: number, offset: number, primcount: number): void;\r\n vertexAttribDivisorANGLE(index: number, divisor: number): void;\r\n VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;\r\n}\r\n\r\ndeclare var ANGLE_instanced_arrays: {\r\n prototype: ANGLE_instanced_arrays;\r\n new(): ANGLE_instanced_arrays;\r\n VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;\r\n}\r\n\r\ninterface AnalyserNode extends AudioNode {\r\n fftSize: number;\r\n frequencyBinCount: number;\r\n maxDecibels: number;\r\n minDecibels: number;\r\n smoothingTimeConstant: number;\r\n getByteFrequencyData(array: Uint8Array): void;\r\n getByteTimeDomainData(array: Uint8Array): void;\r\n getFloatFrequencyData(array: Float32Array): void;\r\n getFloatTimeDomainData(array: Float32Array): void;\r\n}\r\n\r\ndeclare var AnalyserNode: {\r\n prototype: AnalyserNode;\r\n new(): AnalyserNode;\r\n}\r\n\r\ninterface AnimationEvent extends Event {\r\n animationName: string;\r\n elapsedTime: number;\r\n initAnimationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, animationNameArg: string, elapsedTimeArg: number): void;\r\n}\r\n\r\ndeclare var AnimationEvent: {\r\n prototype: AnimationEvent;\r\n new(): AnimationEvent;\r\n}\r\n\r\ninterface ApplicationCache extends EventTarget {\r\n oncached: (ev: Event) => any;\r\n onchecking: (ev: Event) => any;\r\n ondownloading: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n onnoupdate: (ev: Event) => any;\r\n onobsolete: (ev: Event) => any;\r\n onprogress: (ev: ProgressEvent) => any;\r\n onupdateready: (ev: Event) => any;\r\n status: number;\r\n abort(): void;\r\n swapCache(): void;\r\n update(): void;\r\n CHECKING: number;\r\n DOWNLOADING: number;\r\n IDLE: number;\r\n OBSOLETE: number;\r\n UNCACHED: number;\r\n UPDATEREADY: number;\r\n addEventListener(type: \"cached\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"checking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"downloading\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"noupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"obsolete\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"updateready\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var ApplicationCache: {\r\n prototype: ApplicationCache;\r\n new(): ApplicationCache;\r\n CHECKING: number;\r\n DOWNLOADING: number;\r\n IDLE: number;\r\n OBSOLETE: number;\r\n UNCACHED: number;\r\n UPDATEREADY: number;\r\n}\r\n\r\ninterface AriaRequestEvent extends Event {\r\n attributeName: string;\r\n attributeValue: string;\r\n}\r\n\r\ndeclare var AriaRequestEvent: {\r\n prototype: AriaRequestEvent;\r\n new(type: string, eventInitDict?: AriaRequestEventInit): AriaRequestEvent;\r\n}\r\n\r\ninterface Attr extends Node {\r\n name: string;\r\n ownerElement: Element;\r\n specified: boolean;\r\n value: string;\r\n}\r\n\r\ndeclare var Attr: {\r\n prototype: Attr;\r\n new(): Attr;\r\n}\r\n\r\ninterface AudioBuffer {\r\n duration: number;\r\n length: number;\r\n numberOfChannels: number;\r\n sampleRate: number;\r\n getChannelData(channel: number): Float32Array;\r\n}\r\n\r\ndeclare var AudioBuffer: {\r\n prototype: AudioBuffer;\r\n new(): AudioBuffer;\r\n}\r\n\r\ninterface AudioBufferSourceNode extends AudioNode {\r\n buffer: AudioBuffer;\r\n loop: boolean;\r\n loopEnd: number;\r\n loopStart: number;\r\n onended: (ev: Event) => any;\r\n playbackRate: AudioParam;\r\n start(when?: number, offset?: number, duration?: number): void;\r\n stop(when?: number): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var AudioBufferSourceNode: {\r\n prototype: AudioBufferSourceNode;\r\n new(): AudioBufferSourceNode;\r\n}\r\n\r\ninterface AudioContext extends EventTarget {\r\n currentTime: number;\r\n destination: AudioDestinationNode;\r\n listener: AudioListener;\r\n sampleRate: number;\r\n state: string;\r\n createAnalyser(): AnalyserNode;\r\n createBiquadFilter(): BiquadFilterNode;\r\n createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;\r\n createBufferSource(): AudioBufferSourceNode;\r\n createChannelMerger(numberOfInputs?: number): ChannelMergerNode;\r\n createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode;\r\n createConvolver(): ConvolverNode;\r\n createDelay(maxDelayTime?: number): DelayNode;\r\n createDynamicsCompressor(): DynamicsCompressorNode;\r\n createGain(): GainNode;\r\n createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;\r\n createOscillator(): OscillatorNode;\r\n createPanner(): PannerNode;\r\n createPeriodicWave(real: Float32Array, imag: Float32Array): PeriodicWave;\r\n createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;\r\n createStereoPanner(): StereoPannerNode;\r\n createWaveShaper(): WaveShaperNode;\r\n decodeAudioData(audioData: ArrayBuffer, successCallback: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): void;\r\n}\r\n\r\ndeclare var AudioContext: {\r\n prototype: AudioContext;\r\n new(): AudioContext;\r\n}\r\n\r\ninterface AudioDestinationNode extends AudioNode {\r\n maxChannelCount: number;\r\n}\r\n\r\ndeclare var AudioDestinationNode: {\r\n prototype: AudioDestinationNode;\r\n new(): AudioDestinationNode;\r\n}\r\n\r\ninterface AudioListener {\r\n dopplerFactor: number;\r\n speedOfSound: number;\r\n setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void;\r\n setPosition(x: number, y: number, z: number): void;\r\n setVelocity(x: number, y: number, z: number): void;\r\n}\r\n\r\ndeclare var AudioListener: {\r\n prototype: AudioListener;\r\n new(): AudioListener;\r\n}\r\n\r\ninterface AudioNode extends EventTarget {\r\n channelCount: number;\r\n channelCountMode: string;\r\n channelInterpretation: string;\r\n context: AudioContext;\r\n numberOfInputs: number;\r\n numberOfOutputs: number;\r\n connect(destination: AudioNode, output?: number, input?: number): void;\r\n disconnect(output?: number): void;\r\n}\r\n\r\ndeclare var AudioNode: {\r\n prototype: AudioNode;\r\n new(): AudioNode;\r\n}\r\n\r\ninterface AudioParam {\r\n defaultValue: number;\r\n value: number;\r\n cancelScheduledValues(startTime: number): void;\r\n exponentialRampToValueAtTime(value: number, endTime: number): void;\r\n linearRampToValueAtTime(value: number, endTime: number): void;\r\n setTargetAtTime(target: number, startTime: number, timeConstant: number): void;\r\n setValueAtTime(value: number, startTime: number): void;\r\n setValueCurveAtTime(values: Float32Array, startTime: number, duration: number): void;\r\n}\r\n\r\ndeclare var AudioParam: {\r\n prototype: AudioParam;\r\n new(): AudioParam;\r\n}\r\n\r\ninterface AudioProcessingEvent extends Event {\r\n inputBuffer: AudioBuffer;\r\n outputBuffer: AudioBuffer;\r\n playbackTime: number;\r\n}\r\n\r\ndeclare var AudioProcessingEvent: {\r\n prototype: AudioProcessingEvent;\r\n new(): AudioProcessingEvent;\r\n}\r\n\r\ninterface AudioTrack {\r\n enabled: boolean;\r\n id: string;\r\n kind: string;\r\n label: string;\r\n language: string;\r\n sourceBuffer: SourceBuffer;\r\n}\r\n\r\ndeclare var AudioTrack: {\r\n prototype: AudioTrack;\r\n new(): AudioTrack;\r\n}\r\n\r\ninterface AudioTrackList extends EventTarget {\r\n length: number;\r\n onaddtrack: (ev: TrackEvent) => any;\r\n onchange: (ev: Event) => any;\r\n onremovetrack: (ev: TrackEvent) => any;\r\n getTrackById(id: string): AudioTrack;\r\n item(index: number): AudioTrack;\r\n addEventListener(type: \"addtrack\", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"removetrack\", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: AudioTrack;\r\n}\r\n\r\ndeclare var AudioTrackList: {\r\n prototype: AudioTrackList;\r\n new(): AudioTrackList;\r\n}\r\n\r\ninterface BarProp {\r\n visible: boolean;\r\n}\r\n\r\ndeclare var BarProp: {\r\n prototype: BarProp;\r\n new(): BarProp;\r\n}\r\n\r\ninterface BeforeUnloadEvent extends Event {\r\n returnValue: any;\r\n}\r\n\r\ndeclare var BeforeUnloadEvent: {\r\n prototype: BeforeUnloadEvent;\r\n new(): BeforeUnloadEvent;\r\n}\r\n\r\ninterface BiquadFilterNode extends AudioNode {\r\n Q: AudioParam;\r\n detune: AudioParam;\r\n frequency: AudioParam;\r\n gain: AudioParam;\r\n type: string;\r\n getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;\r\n}\r\n\r\ndeclare var BiquadFilterNode: {\r\n prototype: BiquadFilterNode;\r\n new(): BiquadFilterNode;\r\n}\r\n\r\ninterface Blob {\r\n size: number;\r\n type: string;\r\n msClose(): void;\r\n msDetachStream(): any;\r\n slice(start?: number, end?: number, contentType?: string): Blob;\r\n}\r\n\r\ndeclare var Blob: {\r\n prototype: Blob;\r\n new (blobParts?: any[], options?: BlobPropertyBag): Blob;\r\n}\r\n\r\ninterface CDATASection extends Text {\r\n}\r\n\r\ndeclare var CDATASection: {\r\n prototype: CDATASection;\r\n new(): CDATASection;\r\n}\r\n\r\ninterface CSS {\r\n supports(property: string, value?: string): boolean;\r\n}\r\ndeclare var CSS: CSS;\r\n\r\ninterface CSSConditionRule extends CSSGroupingRule {\r\n conditionText: string;\r\n}\r\n\r\ndeclare var CSSConditionRule: {\r\n prototype: CSSConditionRule;\r\n new(): CSSConditionRule;\r\n}\r\n\r\ninterface CSSFontFaceRule extends CSSRule {\r\n style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSFontFaceRule: {\r\n prototype: CSSFontFaceRule;\r\n new(): CSSFontFaceRule;\r\n}\r\n\r\ninterface CSSGroupingRule extends CSSRule {\r\n cssRules: CSSRuleList;\r\n deleteRule(index?: number): void;\r\n insertRule(rule: string, index?: number): number;\r\n}\r\n\r\ndeclare var CSSGroupingRule: {\r\n prototype: CSSGroupingRule;\r\n new(): CSSGroupingRule;\r\n}\r\n\r\ninterface CSSImportRule extends CSSRule {\r\n href: string;\r\n media: MediaList;\r\n styleSheet: CSSStyleSheet;\r\n}\r\n\r\ndeclare var CSSImportRule: {\r\n prototype: CSSImportRule;\r\n new(): CSSImportRule;\r\n}\r\n\r\ninterface CSSKeyframeRule extends CSSRule {\r\n keyText: string;\r\n style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSKeyframeRule: {\r\n prototype: CSSKeyframeRule;\r\n new(): CSSKeyframeRule;\r\n}\r\n\r\ninterface CSSKeyframesRule extends CSSRule {\r\n cssRules: CSSRuleList;\r\n name: string;\r\n appendRule(rule: string): void;\r\n deleteRule(rule: string): void;\r\n findRule(rule: string): CSSKeyframeRule;\r\n}\r\n\r\ndeclare var CSSKeyframesRule: {\r\n prototype: CSSKeyframesRule;\r\n new(): CSSKeyframesRule;\r\n}\r\n\r\ninterface CSSMediaRule extends CSSConditionRule {\r\n media: MediaList;\r\n}\r\n\r\ndeclare var CSSMediaRule: {\r\n prototype: CSSMediaRule;\r\n new(): CSSMediaRule;\r\n}\r\n\r\ninterface CSSNamespaceRule extends CSSRule {\r\n namespaceURI: string;\r\n prefix: string;\r\n}\r\n\r\ndeclare var CSSNamespaceRule: {\r\n prototype: CSSNamespaceRule;\r\n new(): CSSNamespaceRule;\r\n}\r\n\r\ninterface CSSPageRule extends CSSRule {\r\n pseudoClass: string;\r\n selector: string;\r\n selectorText: string;\r\n style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSPageRule: {\r\n prototype: CSSPageRule;\r\n new(): CSSPageRule;\r\n}\r\n\r\ninterface CSSRule {\r\n cssText: string;\r\n parentRule: CSSRule;\r\n parentStyleSheet: CSSStyleSheet;\r\n type: number;\r\n CHARSET_RULE: number;\r\n FONT_FACE_RULE: number;\r\n IMPORT_RULE: number;\r\n KEYFRAMES_RULE: number;\r\n KEYFRAME_RULE: number;\r\n MEDIA_RULE: number;\r\n NAMESPACE_RULE: number;\r\n PAGE_RULE: number;\r\n STYLE_RULE: number;\r\n SUPPORTS_RULE: number;\r\n UNKNOWN_RULE: number;\r\n VIEWPORT_RULE: number;\r\n}\r\n\r\ndeclare var CSSRule: {\r\n prototype: CSSRule;\r\n new(): CSSRule;\r\n CHARSET_RULE: number;\r\n FONT_FACE_RULE: number;\r\n IMPORT_RULE: number;\r\n KEYFRAMES_RULE: number;\r\n KEYFRAME_RULE: number;\r\n MEDIA_RULE: number;\r\n NAMESPACE_RULE: number;\r\n PAGE_RULE: number;\r\n STYLE_RULE: number;\r\n SUPPORTS_RULE: number;\r\n UNKNOWN_RULE: number;\r\n VIEWPORT_RULE: number;\r\n}\r\n\r\ninterface CSSRuleList {\r\n length: number;\r\n item(index: number): CSSRule;\r\n [index: number]: CSSRule;\r\n}\r\n\r\ndeclare var CSSRuleList: {\r\n prototype: CSSRuleList;\r\n new(): CSSRuleList;\r\n}\r\n\r\ninterface CSSStyleDeclaration {\r\n alignContent: string;\r\n alignItems: string;\r\n alignSelf: string;\r\n alignmentBaseline: string;\r\n animation: string;\r\n animationDelay: string;\r\n animationDirection: string;\r\n animationDuration: string;\r\n animationFillMode: string;\r\n animationIterationCount: string;\r\n animationName: string;\r\n animationPlayState: string;\r\n animationTimingFunction: string;\r\n backfaceVisibility: string;\r\n background: string;\r\n backgroundAttachment: string;\r\n backgroundClip: string;\r\n backgroundColor: string;\r\n backgroundImage: string;\r\n backgroundOrigin: string;\r\n backgroundPosition: string;\r\n backgroundPositionX: string;\r\n backgroundPositionY: string;\r\n backgroundRepeat: string;\r\n backgroundSize: string;\r\n baselineShift: string;\r\n border: string;\r\n borderBottom: string;\r\n borderBottomColor: string;\r\n borderBottomLeftRadius: string;\r\n borderBottomRightRadius: string;\r\n borderBottomStyle: string;\r\n borderBottomWidth: string;\r\n borderCollapse: string;\r\n borderColor: string;\r\n borderImage: string;\r\n borderImageOutset: string;\r\n borderImageRepeat: string;\r\n borderImageSlice: string;\r\n borderImageSource: string;\r\n borderImageWidth: string;\r\n borderLeft: string;\r\n borderLeftColor: string;\r\n borderLeftStyle: string;\r\n borderLeftWidth: string;\r\n borderRadius: string;\r\n borderRight: string;\r\n borderRightColor: string;\r\n borderRightStyle: string;\r\n borderRightWidth: string;\r\n borderSpacing: string;\r\n borderStyle: string;\r\n borderTop: string;\r\n borderTopColor: string;\r\n borderTopLeftRadius: string;\r\n borderTopRightRadius: string;\r\n borderTopStyle: string;\r\n borderTopWidth: string;\r\n borderWidth: string;\r\n bottom: string;\r\n boxShadow: string;\r\n boxSizing: string;\r\n breakAfter: string;\r\n breakBefore: string;\r\n breakInside: string;\r\n captionSide: string;\r\n clear: string;\r\n clip: string;\r\n clipPath: string;\r\n clipRule: string;\r\n color: string;\r\n colorInterpolationFilters: string;\r\n columnCount: any;\r\n columnFill: string;\r\n columnGap: any;\r\n columnRule: string;\r\n columnRuleColor: any;\r\n columnRuleStyle: string;\r\n columnRuleWidth: any;\r\n columnSpan: string;\r\n columnWidth: any;\r\n columns: string;\r\n content: string;\r\n counterIncrement: string;\r\n counterReset: string;\r\n cssFloat: string;\r\n cssText: string;\r\n cursor: string;\r\n direction: string;\r\n display: string;\r\n dominantBaseline: string;\r\n emptyCells: string;\r\n enableBackground: string;\r\n fill: string;\r\n fillOpacity: string;\r\n fillRule: string;\r\n filter: string;\r\n flex: string;\r\n flexBasis: string;\r\n flexDirection: string;\r\n flexFlow: string;\r\n flexGrow: string;\r\n flexShrink: string;\r\n flexWrap: string;\r\n floodColor: string;\r\n floodOpacity: string;\r\n font: string;\r\n fontFamily: string;\r\n fontFeatureSettings: string;\r\n fontSize: string;\r\n fontSizeAdjust: string;\r\n fontStretch: string;\r\n fontStyle: string;\r\n fontVariant: string;\r\n fontWeight: string;\r\n glyphOrientationHorizontal: string;\r\n glyphOrientationVertical: string;\r\n height: string;\r\n imeMode: string;\r\n justifyContent: string;\r\n kerning: string;\r\n left: string;\r\n length: number;\r\n letterSpacing: string;\r\n lightingColor: string;\r\n lineHeight: string;\r\n listStyle: string;\r\n listStyleImage: string;\r\n listStylePosition: string;\r\n listStyleType: string;\r\n margin: string;\r\n marginBottom: string;\r\n marginLeft: string;\r\n marginRight: string;\r\n marginTop: string;\r\n marker: string;\r\n markerEnd: string;\r\n markerMid: string;\r\n markerStart: string;\r\n mask: string;\r\n maxHeight: string;\r\n maxWidth: string;\r\n minHeight: string;\r\n minWidth: string;\r\n msContentZoomChaining: string;\r\n msContentZoomLimit: string;\r\n msContentZoomLimitMax: any;\r\n msContentZoomLimitMin: any;\r\n msContentZoomSnap: string;\r\n msContentZoomSnapPoints: string;\r\n msContentZoomSnapType: string;\r\n msContentZooming: string;\r\n msFlowFrom: string;\r\n msFlowInto: string;\r\n msFontFeatureSettings: string;\r\n msGridColumn: any;\r\n msGridColumnAlign: string;\r\n msGridColumnSpan: any;\r\n msGridColumns: string;\r\n msGridRow: any;\r\n msGridRowAlign: string;\r\n msGridRowSpan: any;\r\n msGridRows: string;\r\n msHighContrastAdjust: string;\r\n msHyphenateLimitChars: string;\r\n msHyphenateLimitLines: any;\r\n msHyphenateLimitZone: any;\r\n msHyphens: string;\r\n msImeAlign: string;\r\n msOverflowStyle: string;\r\n msScrollChaining: string;\r\n msScrollLimit: string;\r\n msScrollLimitXMax: any;\r\n msScrollLimitXMin: any;\r\n msScrollLimitYMax: any;\r\n msScrollLimitYMin: any;\r\n msScrollRails: string;\r\n msScrollSnapPointsX: string;\r\n msScrollSnapPointsY: string;\r\n msScrollSnapType: string;\r\n msScrollSnapX: string;\r\n msScrollSnapY: string;\r\n msScrollTranslation: string;\r\n msTextCombineHorizontal: string;\r\n msTextSizeAdjust: any;\r\n msTouchAction: string;\r\n msTouchSelect: string;\r\n msUserSelect: string;\r\n msWrapFlow: string;\r\n msWrapMargin: any;\r\n msWrapThrough: string;\r\n opacity: string;\r\n order: string;\r\n orphans: string;\r\n outline: string;\r\n outlineColor: string;\r\n outlineStyle: string;\r\n outlineWidth: string;\r\n overflow: string;\r\n overflowX: string;\r\n overflowY: string;\r\n padding: string;\r\n paddingBottom: string;\r\n paddingLeft: string;\r\n paddingRight: string;\r\n paddingTop: string;\r\n pageBreakAfter: string;\r\n pageBreakBefore: string;\r\n pageBreakInside: string;\r\n parentRule: CSSRule;\r\n perspective: string;\r\n perspectiveOrigin: string;\r\n pointerEvents: string;\r\n position: string;\r\n quotes: string;\r\n right: string;\r\n rubyAlign: string;\r\n rubyOverhang: string;\r\n rubyPosition: string;\r\n stopColor: string;\r\n stopOpacity: string;\r\n stroke: string;\r\n strokeDasharray: string;\r\n strokeDashoffset: string;\r\n strokeLinecap: string;\r\n strokeLinejoin: string;\r\n strokeMiterlimit: string;\r\n strokeOpacity: string;\r\n strokeWidth: string;\r\n tableLayout: string;\r\n textAlign: string;\r\n textAlignLast: string;\r\n textAnchor: string;\r\n textDecoration: string;\r\n textFillColor: string;\r\n textIndent: string;\r\n textJustify: string;\r\n textKashida: string;\r\n textKashidaSpace: string;\r\n textOverflow: string;\r\n textShadow: string;\r\n textTransform: string;\r\n textUnderlinePosition: string;\r\n top: string;\r\n touchAction: string;\r\n transform: string;\r\n transformOrigin: string;\r\n transformStyle: string;\r\n transition: string;\r\n transitionDelay: string;\r\n transitionDuration: string;\r\n transitionProperty: string;\r\n transitionTimingFunction: string;\r\n unicodeBidi: string;\r\n verticalAlign: string;\r\n visibility: string;\r\n webkitAlignContent: string;\r\n webkitAlignItems: string;\r\n webkitAlignSelf: string;\r\n webkitAnimation: string;\r\n webkitAnimationDelay: string;\r\n webkitAnimationDirection: string;\r\n webkitAnimationDuration: string;\r\n webkitAnimationFillMode: string;\r\n webkitAnimationIterationCount: string;\r\n webkitAnimationName: string;\r\n webkitAnimationPlayState: string;\r\n webkitAnimationTimingFunction: string;\r\n webkitAppearance: string;\r\n webkitBackfaceVisibility: string;\r\n webkitBackground: string;\r\n webkitBackgroundAttachment: string;\r\n webkitBackgroundClip: string;\r\n webkitBackgroundColor: string;\r\n webkitBackgroundImage: string;\r\n webkitBackgroundOrigin: string;\r\n webkitBackgroundPosition: string;\r\n webkitBackgroundPositionX: string;\r\n webkitBackgroundPositionY: string;\r\n webkitBackgroundRepeat: string;\r\n webkitBackgroundSize: string;\r\n webkitBorderBottomLeftRadius: string;\r\n webkitBorderBottomRightRadius: string;\r\n webkitBorderImage: string;\r\n webkitBorderImageOutset: string;\r\n webkitBorderImageRepeat: string;\r\n webkitBorderImageSlice: string;\r\n webkitBorderImageSource: string;\r\n webkitBorderImageWidth: string;\r\n webkitBorderRadius: string;\r\n webkitBorderTopLeftRadius: string;\r\n webkitBorderTopRightRadius: string;\r\n webkitBoxAlign: string;\r\n webkitBoxDirection: string;\r\n webkitBoxFlex: string;\r\n webkitBoxOrdinalGroup: string;\r\n webkitBoxOrient: string;\r\n webkitBoxPack: string;\r\n webkitBoxSizing: string;\r\n webkitColumnBreakAfter: string;\r\n webkitColumnBreakBefore: string;\r\n webkitColumnBreakInside: string;\r\n webkitColumnCount: any;\r\n webkitColumnGap: any;\r\n webkitColumnRule: string;\r\n webkitColumnRuleColor: any;\r\n webkitColumnRuleStyle: string;\r\n webkitColumnRuleWidth: any;\r\n webkitColumnSpan: string;\r\n webkitColumnWidth: any;\r\n webkitColumns: string;\r\n webkitFilter: string;\r\n webkitFlex: string;\r\n webkitFlexBasis: string;\r\n webkitFlexDirection: string;\r\n webkitFlexFlow: string;\r\n webkitFlexGrow: string;\r\n webkitFlexShrink: string;\r\n webkitFlexWrap: string;\r\n webkitJustifyContent: string;\r\n webkitOrder: string;\r\n webkitPerspective: string;\r\n webkitPerspectiveOrigin: string;\r\n webkitTapHighlightColor: string;\r\n webkitTextFillColor: string;\r\n webkitTextSizeAdjust: any;\r\n webkitTransform: string;\r\n webkitTransformOrigin: string;\r\n webkitTransformStyle: string;\r\n webkitTransition: string;\r\n webkitTransitionDelay: string;\r\n webkitTransitionDuration: string;\r\n webkitTransitionProperty: string;\r\n webkitTransitionTimingFunction: string;\r\n webkitUserSelect: string;\r\n webkitWritingMode: string;\r\n whiteSpace: string;\r\n widows: string;\r\n width: string;\r\n wordBreak: string;\r\n wordSpacing: string;\r\n wordWrap: string;\r\n writingMode: string;\r\n zIndex: string;\r\n zoom: string;\r\n getPropertyPriority(propertyName: string): string;\r\n getPropertyValue(propertyName: string): string;\r\n item(index: number): string;\r\n removeProperty(propertyName: string): string;\r\n setProperty(propertyName: string, value: string, priority?: string): void;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var CSSStyleDeclaration: {\r\n prototype: CSSStyleDeclaration;\r\n new(): CSSStyleDeclaration;\r\n}\r\n\r\ninterface CSSStyleRule extends CSSRule {\r\n readOnly: boolean;\r\n selectorText: string;\r\n style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSStyleRule: {\r\n prototype: CSSStyleRule;\r\n new(): CSSStyleRule;\r\n}\r\n\r\ninterface CSSStyleSheet extends StyleSheet {\r\n cssRules: CSSRuleList;\r\n cssText: string;\r\n href: string;\r\n id: string;\r\n imports: StyleSheetList;\r\n isAlternate: boolean;\r\n isPrefAlternate: boolean;\r\n ownerRule: CSSRule;\r\n owningElement: Element;\r\n pages: StyleSheetPageList;\r\n readOnly: boolean;\r\n rules: CSSRuleList;\r\n addImport(bstrURL: string, lIndex?: number): number;\r\n addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number;\r\n addRule(bstrSelector: string, bstrStyle?: string, lIndex?: number): number;\r\n deleteRule(index?: number): void;\r\n insertRule(rule: string, index?: number): number;\r\n removeImport(lIndex: number): void;\r\n removeRule(lIndex: number): void;\r\n}\r\n\r\ndeclare var CSSStyleSheet: {\r\n prototype: CSSStyleSheet;\r\n new(): CSSStyleSheet;\r\n}\r\n\r\ninterface CSSSupportsRule extends CSSConditionRule {\r\n}\r\n\r\ndeclare var CSSSupportsRule: {\r\n prototype: CSSSupportsRule;\r\n new(): CSSSupportsRule;\r\n}\r\n\r\ninterface CanvasGradient {\r\n addColorStop(offset: number, color: string): void;\r\n}\r\n\r\ndeclare var CanvasGradient: {\r\n prototype: CanvasGradient;\r\n new(): CanvasGradient;\r\n}\r\n\r\ninterface CanvasPattern {\r\n}\r\n\r\ndeclare var CanvasPattern: {\r\n prototype: CanvasPattern;\r\n new(): CanvasPattern;\r\n}\r\n\r\ninterface CanvasRenderingContext2D {\r\n canvas: HTMLCanvasElement;\r\n fillStyle: string | CanvasGradient | CanvasPattern;\r\n font: string;\r\n globalAlpha: number;\r\n globalCompositeOperation: string;\r\n lineCap: string;\r\n lineDashOffset: number;\r\n lineJoin: string;\r\n lineWidth: number;\r\n miterLimit: number;\r\n msFillRule: string;\r\n msImageSmoothingEnabled: boolean;\r\n shadowBlur: number;\r\n shadowColor: string;\r\n shadowOffsetX: number;\r\n shadowOffsetY: number;\r\n strokeStyle: string | CanvasGradient | CanvasPattern;\r\n textAlign: string;\r\n textBaseline: string;\r\n arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\r\n arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;\r\n beginPath(): void;\r\n bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;\r\n clearRect(x: number, y: number, w: number, h: number): void;\r\n clip(fillRule?: string): void;\r\n closePath(): void;\r\n createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;\r\n createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;\r\n createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;\r\n createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;\r\n drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;\r\n fill(fillRule?: string): void;\r\n fillRect(x: number, y: number, w: number, h: number): void;\r\n fillText(text: string, x: number, y: number, maxWidth?: number): void;\r\n getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;\r\n getLineDash(): number[];\r\n isPointInPath(x: number, y: number, fillRule?: string): boolean;\r\n lineTo(x: number, y: number): void;\r\n measureText(text: string): TextMetrics;\r\n moveTo(x: number, y: number): void;\r\n putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void;\r\n quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;\r\n rect(x: number, y: number, w: number, h: number): void;\r\n restore(): void;\r\n rotate(angle: number): void;\r\n save(): void;\r\n scale(x: number, y: number): void;\r\n setLineDash(segments: number[]): void;\r\n setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;\r\n stroke(): void;\r\n strokeRect(x: number, y: number, w: number, h: number): void;\r\n strokeText(text: string, x: number, y: number, maxWidth?: number): void;\r\n transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;\r\n translate(x: number, y: number): void;\r\n}\r\n\r\ndeclare var CanvasRenderingContext2D: {\r\n prototype: CanvasRenderingContext2D;\r\n new(): CanvasRenderingContext2D;\r\n}\r\n\r\ninterface ChannelMergerNode extends AudioNode {\r\n}\r\n\r\ndeclare var ChannelMergerNode: {\r\n prototype: ChannelMergerNode;\r\n new(): ChannelMergerNode;\r\n}\r\n\r\ninterface ChannelSplitterNode extends AudioNode {\r\n}\r\n\r\ndeclare var ChannelSplitterNode: {\r\n prototype: ChannelSplitterNode;\r\n new(): ChannelSplitterNode;\r\n}\r\n\r\ninterface CharacterData extends Node, ChildNode {\r\n data: string;\r\n length: number;\r\n appendData(arg: string): void;\r\n deleteData(offset: number, count: number): void;\r\n insertData(offset: number, arg: string): void;\r\n replaceData(offset: number, count: number, arg: string): void;\r\n substringData(offset: number, count: number): string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var CharacterData: {\r\n prototype: CharacterData;\r\n new(): CharacterData;\r\n}\r\n\r\ninterface ClientRect {\r\n bottom: number;\r\n height: number;\r\n left: number;\r\n right: number;\r\n top: number;\r\n width: number;\r\n}\r\n\r\ndeclare var ClientRect: {\r\n prototype: ClientRect;\r\n new(): ClientRect;\r\n}\r\n\r\ninterface ClientRectList {\r\n length: number;\r\n item(index: number): ClientRect;\r\n [index: number]: ClientRect;\r\n}\r\n\r\ndeclare var ClientRectList: {\r\n prototype: ClientRectList;\r\n new(): ClientRectList;\r\n}\r\n\r\ninterface ClipboardEvent extends Event {\r\n clipboardData: DataTransfer;\r\n}\r\n\r\ndeclare var ClipboardEvent: {\r\n prototype: ClipboardEvent;\r\n new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent;\r\n}\r\n\r\ninterface CloseEvent extends Event {\r\n code: number;\r\n reason: string;\r\n wasClean: boolean;\r\n initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;\r\n}\r\n\r\ndeclare var CloseEvent: {\r\n prototype: CloseEvent;\r\n new(): CloseEvent;\r\n}\r\n\r\ninterface CommandEvent extends Event {\r\n commandName: string;\r\n detail: string;\r\n}\r\n\r\ndeclare var CommandEvent: {\r\n prototype: CommandEvent;\r\n new(type: string, eventInitDict?: CommandEventInit): CommandEvent;\r\n}\r\n\r\ninterface Comment extends CharacterData {\r\n text: string;\r\n}\r\n\r\ndeclare var Comment: {\r\n prototype: Comment;\r\n new(): Comment;\r\n}\r\n\r\ninterface CompositionEvent extends UIEvent {\r\n data: string;\r\n locale: string;\r\n initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void;\r\n}\r\n\r\ndeclare var CompositionEvent: {\r\n prototype: CompositionEvent;\r\n new(typeArg: string, eventInitDict?: CompositionEventInit): CompositionEvent;\r\n}\r\n\r\ninterface Console {\r\n assert(test?: boolean, message?: string, ...optionalParams: any[]): void;\r\n clear(): void;\r\n count(countTitle?: string): void;\r\n debug(message?: string, ...optionalParams: any[]): void;\r\n dir(value?: any, ...optionalParams: any[]): void;\r\n dirxml(value: any): void;\r\n error(message?: any, ...optionalParams: any[]): void;\r\n group(groupTitle?: string): void;\r\n groupCollapsed(groupTitle?: string): void;\r\n groupEnd(): void;\r\n info(message?: any, ...optionalParams: any[]): void;\r\n log(message?: any, ...optionalParams: any[]): void;\r\n msIsIndependentlyComposed(element: Element): boolean;\r\n profile(reportName?: string): void;\r\n profileEnd(): void;\r\n select(element: Element): void;\r\n time(timerName?: string): void;\r\n timeEnd(timerName?: string): void;\r\n trace(message?: any, ...optionalParams: any[]): void;\r\n warn(message?: any, ...optionalParams: any[]): void;\r\n}\r\n\r\ndeclare var Console: {\r\n prototype: Console;\r\n new(): Console;\r\n}\r\n\r\ninterface ConvolverNode extends AudioNode {\r\n buffer: AudioBuffer;\r\n normalize: boolean;\r\n}\r\n\r\ndeclare var ConvolverNode: {\r\n prototype: ConvolverNode;\r\n new(): ConvolverNode;\r\n}\r\n\r\ninterface Coordinates {\r\n accuracy: number;\r\n altitude: number;\r\n altitudeAccuracy: number;\r\n heading: number;\r\n latitude: number;\r\n longitude: number;\r\n speed: number;\r\n}\r\n\r\ndeclare var Coordinates: {\r\n prototype: Coordinates;\r\n new(): Coordinates;\r\n}\r\n\r\ninterface Crypto extends Object, RandomSource {\r\n subtle: SubtleCrypto;\r\n}\r\n\r\ndeclare var Crypto: {\r\n prototype: Crypto;\r\n new(): Crypto;\r\n}\r\n\r\ninterface CryptoKey {\r\n algorithm: KeyAlgorithm;\r\n extractable: boolean;\r\n type: string;\r\n usages: string[];\r\n}\r\n\r\ndeclare var CryptoKey: {\r\n prototype: CryptoKey;\r\n new(): CryptoKey;\r\n}\r\n\r\ninterface CryptoKeyPair {\r\n privateKey: CryptoKey;\r\n publicKey: CryptoKey;\r\n}\r\n\r\ndeclare var CryptoKeyPair: {\r\n prototype: CryptoKeyPair;\r\n new(): CryptoKeyPair;\r\n}\r\n\r\ninterface CustomEvent extends Event {\r\n detail: any;\r\n initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any): void;\r\n}\r\n\r\ndeclare var CustomEvent: {\r\n prototype: CustomEvent;\r\n new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent;\r\n}\r\n\r\ninterface DOMError {\r\n name: string;\r\n toString(): string;\r\n}\r\n\r\ndeclare var DOMError: {\r\n prototype: DOMError;\r\n new(): DOMError;\r\n}\r\n\r\ninterface DOMException {\r\n code: number;\r\n message: string;\r\n name: string;\r\n toString(): string;\r\n ABORT_ERR: number;\r\n DATA_CLONE_ERR: number;\r\n DOMSTRING_SIZE_ERR: number;\r\n HIERARCHY_REQUEST_ERR: number;\r\n INDEX_SIZE_ERR: number;\r\n INUSE_ATTRIBUTE_ERR: number;\r\n INVALID_ACCESS_ERR: number;\r\n INVALID_CHARACTER_ERR: number;\r\n INVALID_MODIFICATION_ERR: number;\r\n INVALID_NODE_TYPE_ERR: number;\r\n INVALID_STATE_ERR: number;\r\n NAMESPACE_ERR: number;\r\n NETWORK_ERR: number;\r\n NOT_FOUND_ERR: number;\r\n NOT_SUPPORTED_ERR: number;\r\n NO_DATA_ALLOWED_ERR: number;\r\n NO_MODIFICATION_ALLOWED_ERR: number;\r\n PARSE_ERR: number;\r\n QUOTA_EXCEEDED_ERR: number;\r\n SECURITY_ERR: number;\r\n SERIALIZE_ERR: number;\r\n SYNTAX_ERR: number;\r\n TIMEOUT_ERR: number;\r\n TYPE_MISMATCH_ERR: number;\r\n URL_MISMATCH_ERR: number;\r\n VALIDATION_ERR: number;\r\n WRONG_DOCUMENT_ERR: number;\r\n}\r\n\r\ndeclare var DOMException: {\r\n prototype: DOMException;\r\n new(): DOMException;\r\n ABORT_ERR: number;\r\n DATA_CLONE_ERR: number;\r\n DOMSTRING_SIZE_ERR: number;\r\n HIERARCHY_REQUEST_ERR: number;\r\n INDEX_SIZE_ERR: number;\r\n INUSE_ATTRIBUTE_ERR: number;\r\n INVALID_ACCESS_ERR: number;\r\n INVALID_CHARACTER_ERR: number;\r\n INVALID_MODIFICATION_ERR: number;\r\n INVALID_NODE_TYPE_ERR: number;\r\n INVALID_STATE_ERR: number;\r\n NAMESPACE_ERR: number;\r\n NETWORK_ERR: number;\r\n NOT_FOUND_ERR: number;\r\n NOT_SUPPORTED_ERR: number;\r\n NO_DATA_ALLOWED_ERR: number;\r\n NO_MODIFICATION_ALLOWED_ERR: number;\r\n PARSE_ERR: number;\r\n QUOTA_EXCEEDED_ERR: number;\r\n SECURITY_ERR: number;\r\n SERIALIZE_ERR: number;\r\n SYNTAX_ERR: number;\r\n TIMEOUT_ERR: number;\r\n TYPE_MISMATCH_ERR: number;\r\n URL_MISMATCH_ERR: number;\r\n VALIDATION_ERR: number;\r\n WRONG_DOCUMENT_ERR: number;\r\n}\r\n\r\ninterface DOMImplementation {\r\n createDocument(namespaceURI: string, qualifiedName: string, doctype: DocumentType): Document;\r\n createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType;\r\n createHTMLDocument(title: string): Document;\r\n hasFeature(feature: string, version: string): boolean;\r\n}\r\n\r\ndeclare var DOMImplementation: {\r\n prototype: DOMImplementation;\r\n new(): DOMImplementation;\r\n}\r\n\r\ninterface DOMParser {\r\n parseFromString(source: string, mimeType: string): Document;\r\n}\r\n\r\ndeclare var DOMParser: {\r\n prototype: DOMParser;\r\n new(): DOMParser;\r\n}\r\n\r\ninterface DOMSettableTokenList extends DOMTokenList {\r\n value: string;\r\n}\r\n\r\ndeclare var DOMSettableTokenList: {\r\n prototype: DOMSettableTokenList;\r\n new(): DOMSettableTokenList;\r\n}\r\n\r\ninterface DOMStringList {\r\n length: number;\r\n contains(str: string): boolean;\r\n item(index: number): string;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var DOMStringList: {\r\n prototype: DOMStringList;\r\n new(): DOMStringList;\r\n}\r\n\r\ninterface DOMStringMap {\r\n [name: string]: string;\r\n}\r\n\r\ndeclare var DOMStringMap: {\r\n prototype: DOMStringMap;\r\n new(): DOMStringMap;\r\n}\r\n\r\ninterface DOMTokenList {\r\n length: number;\r\n add(...token: string[]): void;\r\n contains(token: string): boolean;\r\n item(index: number): string;\r\n remove(...token: string[]): void;\r\n toString(): string;\r\n toggle(token: string, force?: boolean): boolean;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var DOMTokenList: {\r\n prototype: DOMTokenList;\r\n new(): DOMTokenList;\r\n}\r\n\r\ninterface DataCue extends TextTrackCue {\r\n data: ArrayBuffer;\r\n}\r\n\r\ndeclare var DataCue: {\r\n prototype: DataCue;\r\n new(): DataCue;\r\n}\r\n\r\ninterface DataTransfer {\r\n dropEffect: string;\r\n effectAllowed: string;\r\n files: FileList;\r\n items: DataTransferItemList;\r\n types: DOMStringList;\r\n clearData(format?: string): boolean;\r\n getData(format: string): string;\r\n setData(format: string, data: string): boolean;\r\n}\r\n\r\ndeclare var DataTransfer: {\r\n prototype: DataTransfer;\r\n new(): DataTransfer;\r\n}\r\n\r\ninterface DataTransferItem {\r\n kind: string;\r\n type: string;\r\n getAsFile(): File;\r\n getAsString(_callback: FunctionStringCallback): void;\r\n}\r\n\r\ndeclare var DataTransferItem: {\r\n prototype: DataTransferItem;\r\n new(): DataTransferItem;\r\n}\r\n\r\ninterface DataTransferItemList {\r\n length: number;\r\n add(data: File): DataTransferItem;\r\n clear(): void;\r\n item(index: number): DataTransferItem;\r\n remove(index: number): void;\r\n [index: number]: DataTransferItem;\r\n}\r\n\r\ndeclare var DataTransferItemList: {\r\n prototype: DataTransferItemList;\r\n new(): DataTransferItemList;\r\n}\r\n\r\ninterface DeferredPermissionRequest {\r\n id: number;\r\n type: string;\r\n uri: string;\r\n allow(): void;\r\n deny(): void;\r\n}\r\n\r\ndeclare var DeferredPermissionRequest: {\r\n prototype: DeferredPermissionRequest;\r\n new(): DeferredPermissionRequest;\r\n}\r\n\r\ninterface DelayNode extends AudioNode {\r\n delayTime: AudioParam;\r\n}\r\n\r\ndeclare var DelayNode: {\r\n prototype: DelayNode;\r\n new(): DelayNode;\r\n}\r\n\r\ninterface DeviceAcceleration {\r\n x: number;\r\n y: number;\r\n z: number;\r\n}\r\n\r\ndeclare var DeviceAcceleration: {\r\n prototype: DeviceAcceleration;\r\n new(): DeviceAcceleration;\r\n}\r\n\r\ninterface DeviceMotionEvent extends Event {\r\n acceleration: DeviceAcceleration;\r\n accelerationIncludingGravity: DeviceAcceleration;\r\n interval: number;\r\n rotationRate: DeviceRotationRate;\r\n initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict, accelerationIncludingGravity: DeviceAccelerationDict, rotationRate: DeviceRotationRateDict, interval: number): void;\r\n}\r\n\r\ndeclare var DeviceMotionEvent: {\r\n prototype: DeviceMotionEvent;\r\n new(): DeviceMotionEvent;\r\n}\r\n\r\ninterface DeviceOrientationEvent extends Event {\r\n absolute: boolean;\r\n alpha: number;\r\n beta: number;\r\n gamma: number;\r\n initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number, beta: number, gamma: number, absolute: boolean): void;\r\n}\r\n\r\ndeclare var DeviceOrientationEvent: {\r\n prototype: DeviceOrientationEvent;\r\n new(): DeviceOrientationEvent;\r\n}\r\n\r\ninterface DeviceRotationRate {\r\n alpha: number;\r\n beta: number;\r\n gamma: number;\r\n}\r\n\r\ndeclare var DeviceRotationRate: {\r\n prototype: DeviceRotationRate;\r\n new(): DeviceRotationRate;\r\n}\r\n\r\ninterface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent {\r\n /**\r\n * Sets or gets the URL for the current document. \r\n */\r\n URL: string;\r\n /**\r\n * Gets the URL for the document, stripped of any character encoding.\r\n */\r\n URLUnencoded: string;\r\n /**\r\n * Gets the object that has the focus when the parent document has focus.\r\n */\r\n activeElement: Element;\r\n /**\r\n * Sets or gets the color of all active links in the document.\r\n */\r\n alinkColor: string;\r\n /**\r\n * Returns a reference to the collection of elements contained by the object.\r\n */\r\n all: HTMLCollection;\r\n /**\r\n * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.\r\n */\r\n anchors: HTMLCollection;\r\n /**\r\n * Retrieves a collection of all applet objects in the document.\r\n */\r\n applets: HTMLCollection;\r\n /**\r\n * Deprecated. Sets or retrieves a value that indicates the background color behind the object. \r\n */\r\n bgColor: string;\r\n /**\r\n * Specifies the beginning and end of the document body.\r\n */\r\n body: HTMLElement;\r\n characterSet: string;\r\n /**\r\n * Gets or sets the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Gets a value that indicates whether standards-compliant mode is switched on for the object.\r\n */\r\n compatMode: string;\r\n cookie: string;\r\n /**\r\n * Gets the default character set from the current regional language settings.\r\n */\r\n defaultCharset: string;\r\n defaultView: Window;\r\n /**\r\n * Sets or gets a value that indicates whether the document can be edited.\r\n */\r\n designMode: string;\r\n /**\r\n * Sets or retrieves a value that indicates the reading order of the object. \r\n */\r\n dir: string;\r\n /**\r\n * Gets an object representing the document type declaration associated with the current document. \r\n */\r\n doctype: DocumentType;\r\n /**\r\n * Gets a reference to the root node of the document. \r\n */\r\n documentElement: HTMLElement;\r\n /**\r\n * Sets or gets the security domain of the document. \r\n */\r\n domain: string;\r\n /**\r\n * Retrieves a collection of all embed objects in the document.\r\n */\r\n embeds: HTMLCollection;\r\n /**\r\n * Sets or gets the foreground (text) color of the document.\r\n */\r\n fgColor: string;\r\n /**\r\n * Retrieves a collection, in source order, of all form objects in the document.\r\n */\r\n forms: HTMLCollection;\r\n fullscreenElement: Element;\r\n fullscreenEnabled: boolean;\r\n head: HTMLHeadElement;\r\n hidden: boolean;\r\n /**\r\n * Retrieves a collection, in source order, of img objects in the document.\r\n */\r\n images: HTMLCollection;\r\n /**\r\n * Gets the implementation object of the current document. \r\n */\r\n implementation: DOMImplementation;\r\n /**\r\n * Returns the character encoding used to create the webpage that is loaded into the document object.\r\n */\r\n inputEncoding: string;\r\n /**\r\n * Gets the date that the page was last modified, if the page supplies one. \r\n */\r\n lastModified: string;\r\n /**\r\n * Sets or gets the color of the document links. \r\n */\r\n linkColor: string;\r\n /**\r\n * Retrieves a collection of all a objects that specify the href property and all area objects in the document.\r\n */\r\n links: HTMLCollection;\r\n /**\r\n * Contains information about the current URL. \r\n */\r\n location: Location;\r\n media: string;\r\n msCSSOMElementFloatMetrics: boolean;\r\n msCapsLockWarningOff: boolean;\r\n msHidden: boolean;\r\n msVisibilityState: string;\r\n /**\r\n * Fires when the user aborts the download.\r\n * @param ev The event.\r\n */\r\n onabort: (ev: Event) => any;\r\n /**\r\n * Fires when the object is set as the active element.\r\n * @param ev The event.\r\n */\r\n onactivate: (ev: UIEvent) => any;\r\n /**\r\n * Fires immediately before the object is set as the active element.\r\n * @param ev The event.\r\n */\r\n onbeforeactivate: (ev: UIEvent) => any;\r\n /**\r\n * Fires immediately before the activeElement is changed from the current object to another object in the parent document.\r\n * @param ev The event.\r\n */\r\n onbeforedeactivate: (ev: UIEvent) => any;\r\n /** \r\n * Fires when the object loses the input focus. \r\n * @param ev The focus event.\r\n */\r\n onblur: (ev: FocusEvent) => any;\r\n /**\r\n * Occurs when playback is possible, but would require further buffering. \r\n * @param ev The event.\r\n */\r\n oncanplay: (ev: Event) => any;\r\n oncanplaythrough: (ev: Event) => any;\r\n /**\r\n * Fires when the contents of the object or selection have changed. \r\n * @param ev The event.\r\n */\r\n onchange: (ev: Event) => any;\r\n /**\r\n * Fires when the user clicks the left mouse button on the object\r\n * @param ev The mouse event.\r\n */\r\n onclick: (ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user clicks the right mouse button in the client area, opening the context menu. \r\n * @param ev The mouse event.\r\n */\r\n oncontextmenu: (ev: PointerEvent) => any;\r\n /**\r\n * Fires when the user double-clicks the object.\r\n * @param ev The mouse event.\r\n */\r\n ondblclick: (ev: MouseEvent) => any;\r\n /**\r\n * Fires when the activeElement is changed from the current object to another object in the parent document.\r\n * @param ev The UI Event\r\n */\r\n ondeactivate: (ev: UIEvent) => any;\r\n /**\r\n * Fires on the source object continuously during a drag operation.\r\n * @param ev The event.\r\n */\r\n ondrag: (ev: DragEvent) => any;\r\n /**\r\n * Fires on the source object when the user releases the mouse at the close of a drag operation.\r\n * @param ev The event.\r\n */\r\n ondragend: (ev: DragEvent) => any;\r\n /** \r\n * Fires on the target element when the user drags the object to a valid drop target.\r\n * @param ev The drag event.\r\n */\r\n ondragenter: (ev: DragEvent) => any;\r\n /** \r\n * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.\r\n * @param ev The drag event.\r\n */\r\n ondragleave: (ev: DragEvent) => any;\r\n /**\r\n * Fires on the target element continuously while the user drags the object over a valid drop target.\r\n * @param ev The event.\r\n */\r\n ondragover: (ev: DragEvent) => any;\r\n /**\r\n * Fires on the source object when the user starts to drag a text selection or selected object. \r\n * @param ev The event.\r\n */\r\n ondragstart: (ev: DragEvent) => any;\r\n ondrop: (ev: DragEvent) => any;\r\n /**\r\n * Occurs when the duration attribute is updated. \r\n * @param ev The event.\r\n */\r\n ondurationchange: (ev: Event) => any;\r\n /**\r\n * Occurs when the media element is reset to its initial state. \r\n * @param ev The event.\r\n */\r\n onemptied: (ev: Event) => any;\r\n /**\r\n * Occurs when the end of playback is reached. \r\n * @param ev The event\r\n */\r\n onended: (ev: Event) => any;\r\n /**\r\n * Fires when an error occurs during object loading.\r\n * @param ev The event.\r\n */\r\n onerror: (ev: Event) => any;\r\n /**\r\n * Fires when the object receives focus. \r\n * @param ev The event.\r\n */\r\n onfocus: (ev: FocusEvent) => any;\r\n onfullscreenchange: (ev: Event) => any;\r\n onfullscreenerror: (ev: Event) => any;\r\n oninput: (ev: Event) => any;\r\n /**\r\n * Fires when the user presses a key.\r\n * @param ev The keyboard event\r\n */\r\n onkeydown: (ev: KeyboardEvent) => any;\r\n /**\r\n * Fires when the user presses an alphanumeric key.\r\n * @param ev The event.\r\n */\r\n onkeypress: (ev: KeyboardEvent) => any;\r\n /**\r\n * Fires when the user releases a key.\r\n * @param ev The keyboard event\r\n */\r\n onkeyup: (ev: KeyboardEvent) => any;\r\n /**\r\n * Fires immediately after the browser loads the object. \r\n * @param ev The event.\r\n */\r\n onload: (ev: Event) => any;\r\n /**\r\n * Occurs when media data is loaded at the current playback position. \r\n * @param ev The event.\r\n */\r\n onloadeddata: (ev: Event) => any;\r\n /**\r\n * Occurs when the duration and dimensions of the media have been determined.\r\n * @param ev The event.\r\n */\r\n onloadedmetadata: (ev: Event) => any;\r\n /**\r\n * Occurs when Internet Explorer begins looking for media data. \r\n * @param ev The event.\r\n */\r\n onloadstart: (ev: Event) => any;\r\n /**\r\n * Fires when the user clicks the object with either mouse button. \r\n * @param ev The mouse event.\r\n */\r\n onmousedown: (ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user moves the mouse over the object. \r\n * @param ev The mouse event.\r\n */\r\n onmousemove: (ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user moves the mouse pointer outside the boundaries of the object. \r\n * @param ev The mouse event.\r\n */\r\n onmouseout: (ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user moves the mouse pointer into the object.\r\n * @param ev The mouse event.\r\n */\r\n onmouseover: (ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user releases a mouse button while the mouse is over the object. \r\n * @param ev The mouse event.\r\n */\r\n onmouseup: (ev: MouseEvent) => any;\r\n /**\r\n * Fires when the wheel button is rotated. \r\n * @param ev The mouse event\r\n */\r\n onmousewheel: (ev: MouseWheelEvent) => any;\r\n onmscontentzoom: (ev: UIEvent) => any;\r\n onmsgesturechange: (ev: MSGestureEvent) => any;\r\n onmsgesturedoubletap: (ev: MSGestureEvent) => any;\r\n onmsgestureend: (ev: MSGestureEvent) => any;\r\n onmsgesturehold: (ev: MSGestureEvent) => any;\r\n onmsgesturestart: (ev: MSGestureEvent) => any;\r\n onmsgesturetap: (ev: MSGestureEvent) => any;\r\n onmsinertiastart: (ev: MSGestureEvent) => any;\r\n onmsmanipulationstatechanged: (ev: MSManipulationEvent) => any;\r\n onmspointercancel: (ev: MSPointerEvent) => any;\r\n onmspointerdown: (ev: MSPointerEvent) => any;\r\n onmspointerenter: (ev: MSPointerEvent) => any;\r\n onmspointerleave: (ev: MSPointerEvent) => any;\r\n onmspointermove: (ev: MSPointerEvent) => any;\r\n onmspointerout: (ev: MSPointerEvent) => any;\r\n onmspointerover: (ev: MSPointerEvent) => any;\r\n onmspointerup: (ev: MSPointerEvent) => any;\r\n /**\r\n * Occurs when an item is removed from a Jump List of a webpage running in Site Mode. \r\n * @param ev The event.\r\n */\r\n onmssitemodejumplistitemremoved: (ev: MSSiteModeEvent) => any;\r\n /**\r\n * Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode.\r\n * @param ev The event.\r\n */\r\n onmsthumbnailclick: (ev: MSSiteModeEvent) => any;\r\n /**\r\n * Occurs when playback is paused.\r\n * @param ev The event.\r\n */\r\n onpause: (ev: Event) => any;\r\n /**\r\n * Occurs when the play method is requested. \r\n * @param ev The event.\r\n */\r\n onplay: (ev: Event) => any;\r\n /**\r\n * Occurs when the audio or video has started playing. \r\n * @param ev The event.\r\n */\r\n onplaying: (ev: Event) => any;\r\n onpointerlockchange: (ev: Event) => any;\r\n onpointerlockerror: (ev: Event) => any;\r\n /**\r\n * Occurs to indicate progress while downloading media data. \r\n * @param ev The event.\r\n */\r\n onprogress: (ev: ProgressEvent) => any;\r\n /**\r\n * Occurs when the playback rate is increased or decreased. \r\n * @param ev The event.\r\n */\r\n onratechange: (ev: Event) => any;\r\n /**\r\n * Fires when the state of the object has changed.\r\n * @param ev The event\r\n */\r\n onreadystatechange: (ev: ProgressEvent) => any;\r\n /**\r\n * Fires when the user resets a form. \r\n * @param ev The event.\r\n */\r\n onreset: (ev: Event) => any;\r\n /**\r\n * Fires when the user repositions the scroll box in the scroll bar on the object. \r\n * @param ev The event.\r\n */\r\n onscroll: (ev: UIEvent) => any;\r\n /**\r\n * Occurs when the seek operation ends. \r\n * @param ev The event.\r\n */\r\n onseeked: (ev: Event) => any;\r\n /**\r\n * Occurs when the current playback position is moved. \r\n * @param ev The event.\r\n */\r\n onseeking: (ev: Event) => any;\r\n /**\r\n * Fires when the current selection changes.\r\n * @param ev The event.\r\n */\r\n onselect: (ev: UIEvent) => any;\r\n onselectstart: (ev: Event) => any;\r\n /**\r\n * Occurs when the download has stopped. \r\n * @param ev The event.\r\n */\r\n onstalled: (ev: Event) => any;\r\n /**\r\n * Fires when the user clicks the Stop button or leaves the Web page.\r\n * @param ev The event.\r\n */\r\n onstop: (ev: Event) => any;\r\n onsubmit: (ev: Event) => any;\r\n /**\r\n * Occurs if the load operation has been intentionally halted. \r\n * @param ev The event.\r\n */\r\n onsuspend: (ev: Event) => any;\r\n /**\r\n * Occurs to indicate the current playback position.\r\n * @param ev The event.\r\n */\r\n ontimeupdate: (ev: Event) => any;\r\n ontouchcancel: (ev: TouchEvent) => any;\r\n ontouchend: (ev: TouchEvent) => any;\r\n ontouchmove: (ev: TouchEvent) => any;\r\n ontouchstart: (ev: TouchEvent) => any;\r\n /**\r\n * Occurs when the volume is changed, or playback is muted or unmuted.\r\n * @param ev The event.\r\n */\r\n onvolumechange: (ev: Event) => any;\r\n /**\r\n * Occurs when playback stops because the next frame of a video resource is not available. \r\n * @param ev The event.\r\n */\r\n onwaiting: (ev: Event) => any;\r\n onwebkitfullscreenchange: (ev: Event) => any;\r\n onwebkitfullscreenerror: (ev: Event) => any;\r\n plugins: HTMLCollection;\r\n pointerLockElement: Element;\r\n /**\r\n * Retrieves a value that indicates the current state of the object.\r\n */\r\n readyState: string;\r\n /**\r\n * Gets the URL of the location that referred the user to the current page.\r\n */\r\n referrer: string;\r\n /**\r\n * Gets the root svg element in the document hierarchy.\r\n */\r\n rootElement: SVGSVGElement;\r\n /**\r\n * Retrieves a collection of all script objects in the document.\r\n */\r\n scripts: HTMLCollection;\r\n security: string;\r\n /**\r\n * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.\r\n */\r\n styleSheets: StyleSheetList;\r\n /**\r\n * Contains the title of the document.\r\n */\r\n title: string;\r\n visibilityState: string;\r\n /** \r\n * Sets or gets the color of the links that the user has visited.\r\n */\r\n vlinkColor: string;\r\n webkitCurrentFullScreenElement: Element;\r\n webkitFullscreenElement: Element;\r\n webkitFullscreenEnabled: boolean;\r\n webkitIsFullScreen: boolean;\r\n xmlEncoding: string;\r\n xmlStandalone: boolean;\r\n /**\r\n * Gets or sets the version attribute specified in the declaration of an XML document.\r\n */\r\n xmlVersion: string;\r\n currentScript: HTMLScriptElement;\r\n adoptNode(source: Node): Node;\r\n captureEvents(): void;\r\n clear(): void;\r\n /**\r\n * Closes an output stream and forces the sent data to display.\r\n */\r\n close(): void;\r\n /**\r\n * Creates an attribute object with a specified name.\r\n * @param name String that sets the attribute object's name.\r\n */\r\n createAttribute(name: string): Attr;\r\n createAttributeNS(namespaceURI: string, qualifiedName: string): Attr;\r\n createCDATASection(data: string): CDATASection;\r\n /**\r\n * Creates a comment object with the specified data.\r\n * @param data Sets the comment object's data.\r\n */\r\n createComment(data: string): Comment;\r\n /**\r\n * Creates a new document.\r\n */\r\n createDocumentFragment(): DocumentFragment;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: \"a\"): HTMLAnchorElement;\r\n createElement(tagName: \"abbr\"): HTMLPhraseElement;\r\n createElement(tagName: \"acronym\"): HTMLPhraseElement;\r\n createElement(tagName: \"address\"): HTMLBlockElement;\r\n createElement(tagName: \"applet\"): HTMLAppletElement;\r\n createElement(tagName: \"area\"): HTMLAreaElement;\r\n createElement(tagName: \"audio\"): HTMLAudioElement;\r\n createElement(tagName: \"b\"): HTMLPhraseElement;\r\n createElement(tagName: \"base\"): HTMLBaseElement;\r\n createElement(tagName: \"basefont\"): HTMLBaseFontElement;\r\n createElement(tagName: \"bdo\"): HTMLPhraseElement;\r\n createElement(tagName: \"big\"): HTMLPhraseElement;\r\n createElement(tagName: \"blockquote\"): HTMLBlockElement;\r\n createElement(tagName: \"body\"): HTMLBodyElement;\r\n createElement(tagName: \"br\"): HTMLBRElement;\r\n createElement(tagName: \"button\"): HTMLButtonElement;\r\n createElement(tagName: \"canvas\"): HTMLCanvasElement;\r\n createElement(tagName: \"caption\"): HTMLTableCaptionElement;\r\n createElement(tagName: \"center\"): HTMLBlockElement;\r\n createElement(tagName: \"cite\"): HTMLPhraseElement;\r\n createElement(tagName: \"code\"): HTMLPhraseElement;\r\n createElement(tagName: \"col\"): HTMLTableColElement;\r\n createElement(tagName: \"colgroup\"): HTMLTableColElement;\r\n createElement(tagName: \"datalist\"): HTMLDataListElement;\r\n createElement(tagName: \"dd\"): HTMLDDElement;\r\n createElement(tagName: \"del\"): HTMLModElement;\r\n createElement(tagName: \"dfn\"): HTMLPhraseElement;\r\n createElement(tagName: \"dir\"): HTMLDirectoryElement;\r\n createElement(tagName: \"div\"): HTMLDivElement;\r\n createElement(tagName: \"dl\"): HTMLDListElement;\r\n createElement(tagName: \"dt\"): HTMLDTElement;\r\n createElement(tagName: \"em\"): HTMLPhraseElement;\r\n createElement(tagName: \"embed\"): HTMLEmbedElement;\r\n createElement(tagName: \"fieldset\"): HTMLFieldSetElement;\r\n createElement(tagName: \"font\"): HTMLFontElement;\r\n createElement(tagName: \"form\"): HTMLFormElement;\r\n createElement(tagName: \"frame\"): HTMLFrameElement;\r\n createElement(tagName: \"frameset\"): HTMLFrameSetElement;\r\n createElement(tagName: \"h1\"): HTMLHeadingElement;\r\n createElement(tagName: \"h2\"): HTMLHeadingElement;\r\n createElement(tagName: \"h3\"): HTMLHeadingElement;\r\n createElement(tagName: \"h4\"): HTMLHeadingElement;\r\n createElement(tagName: \"h5\"): HTMLHeadingElement;\r\n createElement(tagName: \"h6\"): HTMLHeadingElement;\r\n createElement(tagName: \"head\"): HTMLHeadElement;\r\n createElement(tagName: \"hr\"): HTMLHRElement;\r\n createElement(tagName: \"html\"): HTMLHtmlElement;\r\n createElement(tagName: \"i\"): HTMLPhraseElement;\r\n createElement(tagName: \"iframe\"): HTMLIFrameElement;\r\n createElement(tagName: \"img\"): HTMLImageElement;\r\n createElement(tagName: \"input\"): HTMLInputElement;\r\n createElement(tagName: \"ins\"): HTMLModElement;\r\n createElement(tagName: \"isindex\"): HTMLIsIndexElement;\r\n createElement(tagName: \"kbd\"): HTMLPhraseElement;\r\n createElement(tagName: \"keygen\"): HTMLBlockElement;\r\n createElement(tagName: \"label\"): HTMLLabelElement;\r\n createElement(tagName: \"legend\"): HTMLLegendElement;\r\n createElement(tagName: \"li\"): HTMLLIElement;\r\n createElement(tagName: \"link\"): HTMLLinkElement;\r\n createElement(tagName: \"listing\"): HTMLBlockElement;\r\n createElement(tagName: \"map\"): HTMLMapElement;\r\n createElement(tagName: \"marquee\"): HTMLMarqueeElement;\r\n createElement(tagName: \"menu\"): HTMLMenuElement;\r\n createElement(tagName: \"meta\"): HTMLMetaElement;\r\n createElement(tagName: \"nextid\"): HTMLNextIdElement;\r\n createElement(tagName: \"nobr\"): HTMLPhraseElement;\r\n createElement(tagName: \"object\"): HTMLObjectElement;\r\n createElement(tagName: \"ol\"): HTMLOListElement;\r\n createElement(tagName: \"optgroup\"): HTMLOptGroupElement;\r\n createElement(tagName: \"option\"): HTMLOptionElement;\r\n createElement(tagName: \"p\"): HTMLParagraphElement;\r\n createElement(tagName: \"param\"): HTMLParamElement;\r\n createElement(tagName: \"plaintext\"): HTMLBlockElement;\r\n createElement(tagName: \"pre\"): HTMLPreElement;\r\n createElement(tagName: \"progress\"): HTMLProgressElement;\r\n createElement(tagName: \"q\"): HTMLQuoteElement;\r\n createElement(tagName: \"rt\"): HTMLPhraseElement;\r\n createElement(tagName: \"ruby\"): HTMLPhraseElement;\r\n createElement(tagName: \"s\"): HTMLPhraseElement;\r\n createElement(tagName: \"samp\"): HTMLPhraseElement;\r\n createElement(tagName: \"script\"): HTMLScriptElement;\r\n createElement(tagName: \"select\"): HTMLSelectElement;\r\n createElement(tagName: \"small\"): HTMLPhraseElement;\r\n createElement(tagName: \"source\"): HTMLSourceElement;\r\n createElement(tagName: \"span\"): HTMLSpanElement;\r\n createElement(tagName: \"strike\"): HTMLPhraseElement;\r\n createElement(tagName: \"strong\"): HTMLPhraseElement;\r\n createElement(tagName: \"style\"): HTMLStyleElement;\r\n createElement(tagName: \"sub\"): HTMLPhraseElement;\r\n createElement(tagName: \"sup\"): HTMLPhraseElement;\r\n createElement(tagName: \"table\"): HTMLTableElement;\r\n createElement(tagName: \"tbody\"): HTMLTableSectionElement;\r\n createElement(tagName: \"td\"): HTMLTableDataCellElement;\r\n createElement(tagName: \"textarea\"): HTMLTextAreaElement;\r\n createElement(tagName: \"tfoot\"): HTMLTableSectionElement;\r\n createElement(tagName: \"th\"): HTMLTableHeaderCellElement;\r\n createElement(tagName: \"thead\"): HTMLTableSectionElement;\r\n createElement(tagName: \"title\"): HTMLTitleElement;\r\n createElement(tagName: \"tr\"): HTMLTableRowElement;\r\n createElement(tagName: \"track\"): HTMLTrackElement;\r\n createElement(tagName: \"tt\"): HTMLPhraseElement;\r\n createElement(tagName: \"u\"): HTMLPhraseElement;\r\n createElement(tagName: \"ul\"): HTMLUListElement;\r\n createElement(tagName: \"var\"): HTMLPhraseElement;\r\n createElement(tagName: \"video\"): HTMLVideoElement;\r\n createElement(tagName: \"x-ms-webview\"): MSHTMLWebViewElement;\r\n createElement(tagName: \"xmp\"): HTMLBlockElement;\r\n createElement(tagName: string): HTMLElement;\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"a\"): SVGAElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"circle\"): SVGCircleElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"clipPath\"): SVGClipPathElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"componentTransferFunction\"): SVGComponentTransferFunctionElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"defs\"): SVGDefsElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"desc\"): SVGDescElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"ellipse\"): SVGEllipseElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feBlend\"): SVGFEBlendElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feColorMatrix\"): SVGFEColorMatrixElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feComponentTransfer\"): SVGFEComponentTransferElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feComposite\"): SVGFECompositeElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feConvolveMatrix\"): SVGFEConvolveMatrixElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feDiffuseLighting\"): SVGFEDiffuseLightingElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feDisplacementMap\"): SVGFEDisplacementMapElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feDistantLight\"): SVGFEDistantLightElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFlood\"): SVGFEFloodElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncA\"): SVGFEFuncAElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncB\"): SVGFEFuncBElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncG\"): SVGFEFuncGElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncR\"): SVGFEFuncRElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feGaussianBlur\"): SVGFEGaussianBlurElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feImage\"): SVGFEImageElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feMerge\"): SVGFEMergeElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feMergeNode\"): SVGFEMergeNodeElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feMorphology\"): SVGFEMorphologyElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feOffset\"): SVGFEOffsetElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"fePointLight\"): SVGFEPointLightElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feSpecularLighting\"): SVGFESpecularLightingElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feSpotLight\"): SVGFESpotLightElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feTile\"): SVGFETileElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feTurbulence\"): SVGFETurbulenceElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"filter\"): SVGFilterElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"foreignObject\"): SVGForeignObjectElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"g\"): SVGGElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"image\"): SVGImageElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"gradient\"): SVGGradientElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"line\"): SVGLineElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"linearGradient\"): SVGLinearGradientElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"marker\"): SVGMarkerElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"mask\"): SVGMaskElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"path\"): SVGPathElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"metadata\"): SVGMetadataElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"pattern\"): SVGPatternElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"polygon\"): SVGPolygonElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"polyline\"): SVGPolylineElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"radialGradient\"): SVGRadialGradientElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"rect\"): SVGRectElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"svg\"): SVGSVGElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"script\"): SVGScriptElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"stop\"): SVGStopElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"style\"): SVGStyleElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"switch\"): SVGSwitchElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"symbol\"): SVGSymbolElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"tspan\"): SVGTSpanElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"textContent\"): SVGTextContentElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"text\"): SVGTextElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"textPath\"): SVGTextPathElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"textPositioning\"): SVGTextPositioningElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"title\"): SVGTitleElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"use\"): SVGUseElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"view\"): SVGViewElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: string): SVGElement\r\n createElementNS(namespaceURI: string, qualifiedName: string): Element;\r\n createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;\r\n createNSResolver(nodeResolver: Node): XPathNSResolver;\r\n /**\r\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document. \r\n * @param root The root element or node to start traversing on.\r\n * @param whatToShow The type of nodes or elements to appear in the node list\r\n * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter.\r\n * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.\r\n */\r\n createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): NodeIterator;\r\n createProcessingInstruction(target: string, data: string): ProcessingInstruction;\r\n /**\r\n * Returns an empty range object that has both of its boundary points positioned at the beginning of the document. \r\n */\r\n createRange(): Range;\r\n /**\r\n * Creates a text string from the specified value. \r\n * @param data String that specifies the nodeValue property of the text node.\r\n */\r\n createTextNode(data: string): Text;\r\n createTouch(view: any, target: EventTarget, identifier: number, pageX: number, pageY: number, screenX: number, screenY: number): Touch;\r\n createTouchList(...touches: Touch[]): TouchList;\r\n /**\r\n * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.\r\n * @param root The root element or node to start traversing on.\r\n * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow.\r\n * @param filter A custom NodeFilter function to use.\r\n * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.\r\n */\r\n createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): TreeWalker;\r\n /**\r\n * Returns the element for the specified x coordinate and the specified y coordinate. \r\n * @param x The x-offset\r\n * @param y The y-offset\r\n */\r\n elementFromPoint(x: number, y: number): Element;\r\n evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver, type: number, result: XPathResult): XPathResult;\r\n /**\r\n * Executes a command on the current document, current selection, or the given range.\r\n * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.\r\n * @param showUI Display the user interface, defaults to false.\r\n * @param value Value to assign.\r\n */\r\n execCommand(commandId: string, showUI?: boolean, value?: any): boolean;\r\n /**\r\n * Displays help information for the given command identifier.\r\n * @param commandId Displays help information for the given command identifier.\r\n */\r\n execCommandShowHelp(commandId: string): boolean;\r\n exitFullscreen(): void;\r\n exitPointerLock(): void;\r\n /**\r\n * Causes the element to receive the focus and executes the code specified by the onfocus event.\r\n */\r\n focus(): void;\r\n /**\r\n * Returns a reference to the first object with the specified value of the ID or NAME attribute.\r\n * @param elementId String that specifies the ID value. Case-insensitive.\r\n */\r\n getElementById(elementId: string): HTMLElement;\r\n getElementsByClassName(classNames: string): NodeListOf;\r\n /**\r\n * Gets a collection of objects based on the value of the NAME or ID attribute.\r\n * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.\r\n */\r\n getElementsByName(elementName: string): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(tagname: \"a\"): NodeListOf;\r\n getElementsByTagName(tagname: \"abbr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"acronym\"): NodeListOf;\r\n getElementsByTagName(tagname: \"address\"): NodeListOf;\r\n getElementsByTagName(tagname: \"applet\"): NodeListOf;\r\n getElementsByTagName(tagname: \"area\"): NodeListOf;\r\n getElementsByTagName(tagname: \"article\"): NodeListOf;\r\n getElementsByTagName(tagname: \"aside\"): NodeListOf;\r\n getElementsByTagName(tagname: \"audio\"): NodeListOf;\r\n getElementsByTagName(tagname: \"b\"): NodeListOf;\r\n getElementsByTagName(tagname: \"base\"): NodeListOf;\r\n getElementsByTagName(tagname: \"basefont\"): NodeListOf;\r\n getElementsByTagName(tagname: \"bdo\"): NodeListOf;\r\n getElementsByTagName(tagname: \"big\"): NodeListOf;\r\n getElementsByTagName(tagname: \"blockquote\"): NodeListOf;\r\n getElementsByTagName(tagname: \"body\"): NodeListOf;\r\n getElementsByTagName(tagname: \"br\"): NodeListOf;\r\n getElementsByTagName(tagname: \"button\"): NodeListOf;\r\n getElementsByTagName(tagname: \"canvas\"): NodeListOf;\r\n getElementsByTagName(tagname: \"caption\"): NodeListOf;\r\n getElementsByTagName(tagname: \"center\"): NodeListOf;\r\n getElementsByTagName(tagname: \"circle\"): NodeListOf;\r\n getElementsByTagName(tagname: \"cite\"): NodeListOf;\r\n getElementsByTagName(tagname: \"clippath\"): NodeListOf;\r\n getElementsByTagName(tagname: \"code\"): NodeListOf;\r\n getElementsByTagName(tagname: \"col\"): NodeListOf;\r\n getElementsByTagName(tagname: \"colgroup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"datalist\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dd\"): NodeListOf;\r\n getElementsByTagName(tagname: \"defs\"): NodeListOf;\r\n getElementsByTagName(tagname: \"del\"): NodeListOf;\r\n getElementsByTagName(tagname: \"desc\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dfn\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dir\"): NodeListOf;\r\n getElementsByTagName(tagname: \"div\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dl\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dt\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ellipse\"): NodeListOf;\r\n getElementsByTagName(tagname: \"em\"): NodeListOf;\r\n getElementsByTagName(tagname: \"embed\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feblend\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fecolormatrix\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fecomponenttransfer\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fecomposite\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feconvolvematrix\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fediffuselighting\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fedisplacementmap\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fedistantlight\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feflood\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefunca\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefuncb\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefuncg\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefuncr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fegaussianblur\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feimage\"): NodeListOf;\r\n getElementsByTagName(tagname: \"femerge\"): NodeListOf;\r\n getElementsByTagName(tagname: \"femergenode\"): NodeListOf;\r\n getElementsByTagName(tagname: \"femorphology\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feoffset\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fepointlight\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fespecularlighting\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fespotlight\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fetile\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feturbulence\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fieldset\"): NodeListOf;\r\n getElementsByTagName(tagname: \"figcaption\"): NodeListOf;\r\n getElementsByTagName(tagname: \"figure\"): NodeListOf;\r\n getElementsByTagName(tagname: \"filter\"): NodeListOf;\r\n getElementsByTagName(tagname: \"font\"): NodeListOf;\r\n getElementsByTagName(tagname: \"footer\"): NodeListOf;\r\n getElementsByTagName(tagname: \"foreignobject\"): NodeListOf;\r\n getElementsByTagName(tagname: \"form\"): NodeListOf;\r\n getElementsByTagName(tagname: \"frame\"): NodeListOf;\r\n getElementsByTagName(tagname: \"frameset\"): NodeListOf;\r\n getElementsByTagName(tagname: \"g\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h1\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h2\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h3\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h4\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h5\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h6\"): NodeListOf;\r\n getElementsByTagName(tagname: \"head\"): NodeListOf;\r\n getElementsByTagName(tagname: \"header\"): NodeListOf;\r\n getElementsByTagName(tagname: \"hgroup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"hr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"html\"): NodeListOf;\r\n getElementsByTagName(tagname: \"i\"): NodeListOf;\r\n getElementsByTagName(tagname: \"iframe\"): NodeListOf;\r\n getElementsByTagName(tagname: \"image\"): NodeListOf;\r\n getElementsByTagName(tagname: \"img\"): NodeListOf;\r\n getElementsByTagName(tagname: \"input\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ins\"): NodeListOf;\r\n getElementsByTagName(tagname: \"isindex\"): NodeListOf;\r\n getElementsByTagName(tagname: \"kbd\"): NodeListOf;\r\n getElementsByTagName(tagname: \"keygen\"): NodeListOf;\r\n getElementsByTagName(tagname: \"label\"): NodeListOf;\r\n getElementsByTagName(tagname: \"legend\"): NodeListOf;\r\n getElementsByTagName(tagname: \"li\"): NodeListOf;\r\n getElementsByTagName(tagname: \"line\"): NodeListOf;\r\n getElementsByTagName(tagname: \"lineargradient\"): NodeListOf;\r\n getElementsByTagName(tagname: \"link\"): NodeListOf;\r\n getElementsByTagName(tagname: \"listing\"): NodeListOf;\r\n getElementsByTagName(tagname: \"map\"): NodeListOf;\r\n getElementsByTagName(tagname: \"mark\"): NodeListOf;\r\n getElementsByTagName(tagname: \"marker\"): NodeListOf;\r\n getElementsByTagName(tagname: \"marquee\"): NodeListOf;\r\n getElementsByTagName(tagname: \"mask\"): NodeListOf;\r\n getElementsByTagName(tagname: \"menu\"): NodeListOf;\r\n getElementsByTagName(tagname: \"meta\"): NodeListOf;\r\n getElementsByTagName(tagname: \"metadata\"): NodeListOf;\r\n getElementsByTagName(tagname: \"nav\"): NodeListOf;\r\n getElementsByTagName(tagname: \"nextid\"): NodeListOf;\r\n getElementsByTagName(tagname: \"nobr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"noframes\"): NodeListOf;\r\n getElementsByTagName(tagname: \"noscript\"): NodeListOf;\r\n getElementsByTagName(tagname: \"object\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ol\"): NodeListOf;\r\n getElementsByTagName(tagname: \"optgroup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"option\"): NodeListOf;\r\n getElementsByTagName(tagname: \"p\"): NodeListOf;\r\n getElementsByTagName(tagname: \"param\"): NodeListOf;\r\n getElementsByTagName(tagname: \"path\"): NodeListOf;\r\n getElementsByTagName(tagname: \"pattern\"): NodeListOf;\r\n getElementsByTagName(tagname: \"plaintext\"): NodeListOf;\r\n getElementsByTagName(tagname: \"polygon\"): NodeListOf;\r\n getElementsByTagName(tagname: \"polyline\"): NodeListOf;\r\n getElementsByTagName(tagname: \"pre\"): NodeListOf;\r\n getElementsByTagName(tagname: \"progress\"): NodeListOf;\r\n getElementsByTagName(tagname: \"q\"): NodeListOf;\r\n getElementsByTagName(tagname: \"radialgradient\"): NodeListOf;\r\n getElementsByTagName(tagname: \"rect\"): NodeListOf;\r\n getElementsByTagName(tagname: \"rt\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ruby\"): NodeListOf;\r\n getElementsByTagName(tagname: \"s\"): NodeListOf;\r\n getElementsByTagName(tagname: \"samp\"): NodeListOf;\r\n getElementsByTagName(tagname: \"script\"): NodeListOf;\r\n getElementsByTagName(tagname: \"section\"): NodeListOf;\r\n getElementsByTagName(tagname: \"select\"): NodeListOf;\r\n getElementsByTagName(tagname: \"small\"): NodeListOf;\r\n getElementsByTagName(tagname: \"source\"): NodeListOf;\r\n getElementsByTagName(tagname: \"span\"): NodeListOf;\r\n getElementsByTagName(tagname: \"stop\"): NodeListOf;\r\n getElementsByTagName(tagname: \"strike\"): NodeListOf;\r\n getElementsByTagName(tagname: \"strong\"): NodeListOf;\r\n getElementsByTagName(tagname: \"style\"): NodeListOf;\r\n getElementsByTagName(tagname: \"sub\"): NodeListOf;\r\n getElementsByTagName(tagname: \"sup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"svg\"): NodeListOf;\r\n getElementsByTagName(tagname: \"switch\"): NodeListOf;\r\n getElementsByTagName(tagname: \"symbol\"): NodeListOf;\r\n getElementsByTagName(tagname: \"table\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tbody\"): NodeListOf;\r\n getElementsByTagName(tagname: \"td\"): NodeListOf;\r\n getElementsByTagName(tagname: \"text\"): NodeListOf;\r\n getElementsByTagName(tagname: \"textpath\"): NodeListOf;\r\n getElementsByTagName(tagname: \"textarea\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tfoot\"): NodeListOf;\r\n getElementsByTagName(tagname: \"th\"): NodeListOf;\r\n getElementsByTagName(tagname: \"thead\"): NodeListOf;\r\n getElementsByTagName(tagname: \"title\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"track\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tspan\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tt\"): NodeListOf;\r\n getElementsByTagName(tagname: \"u\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ul\"): NodeListOf;\r\n getElementsByTagName(tagname: \"use\"): NodeListOf;\r\n getElementsByTagName(tagname: \"var\"): NodeListOf;\r\n getElementsByTagName(tagname: \"video\"): NodeListOf;\r\n getElementsByTagName(tagname: \"view\"): NodeListOf;\r\n getElementsByTagName(tagname: \"wbr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"x-ms-webview\"): NodeListOf;\r\n getElementsByTagName(tagname: \"xmp\"): NodeListOf;\r\n getElementsByTagName(tagname: string): NodeListOf;\r\n getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf;\r\n /**\r\n * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.\r\n */\r\n getSelection(): Selection;\r\n /**\r\n * Gets a value indicating whether the object currently has focus.\r\n */\r\n hasFocus(): boolean;\r\n importNode(importedNode: Node, deep: boolean): Node;\r\n msElementsFromPoint(x: number, y: number): NodeList;\r\n msElementsFromRect(left: number, top: number, width: number, height: number): NodeList;\r\n /**\r\n * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.\r\n * @param url Specifies a MIME type for the document.\r\n * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.\r\n * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, \"fullscreen=yes, toolbar=yes\"). The following values are supported.\r\n * @param replace Specifies whether the existing entry for the document is replaced in the history list.\r\n */\r\n open(url?: string, name?: string, features?: string, replace?: boolean): Document;\r\n /** \r\n * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.\r\n * @param commandId Specifies a command identifier.\r\n */\r\n queryCommandEnabled(commandId: string): boolean;\r\n /**\r\n * Returns a Boolean value that indicates whether the specified command is in the indeterminate state.\r\n * @param commandId String that specifies a command identifier.\r\n */\r\n queryCommandIndeterm(commandId: string): boolean;\r\n /**\r\n * Returns a Boolean value that indicates the current state of the command.\r\n * @param commandId String that specifies a command identifier.\r\n */\r\n queryCommandState(commandId: string): boolean;\r\n /**\r\n * Returns a Boolean value that indicates whether the current command is supported on the current range.\r\n * @param commandId Specifies a command identifier.\r\n */\r\n queryCommandSupported(commandId: string): boolean;\r\n /**\r\n * Retrieves the string associated with a command.\r\n * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers. \r\n */\r\n queryCommandText(commandId: string): string;\r\n /**\r\n * Returns the current value of the document, range, or current selection for the given command.\r\n * @param commandId String that specifies a command identifier.\r\n */\r\n queryCommandValue(commandId: string): string;\r\n releaseEvents(): void;\r\n /**\r\n * Allows updating the print settings for the page.\r\n */\r\n updateSettings(): void;\r\n webkitCancelFullScreen(): void;\r\n webkitExitFullscreen(): void;\r\n /**\r\n * Writes one or more HTML expressions to a document in the specified window. \r\n * @param content Specifies the text and HTML tags to write.\r\n */\r\n write(...content: string[]): void;\r\n /**\r\n * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window. \r\n * @param content The text and HTML tags to write.\r\n */\r\n writeln(...content: string[]): void;\r\n createElement(tagName: \"picture\"): HTMLPictureElement;\r\n getElementsByTagName(tagname: \"picture\"): NodeListOf;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"fullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"fullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mssitemodejumplistitemremoved\", listener: (ev: MSSiteModeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"msthumbnailclick\", listener: (ev: MSSiteModeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerlockchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerlockerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"readystatechange\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stop\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Document: {\r\n prototype: Document;\r\n new(): Document;\r\n}\r\n\r\ninterface DocumentFragment extends Node, NodeSelector {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var DocumentFragment: {\r\n prototype: DocumentFragment;\r\n new(): DocumentFragment;\r\n}\r\n\r\ninterface DocumentType extends Node, ChildNode {\r\n entities: NamedNodeMap;\r\n internalSubset: string;\r\n name: string;\r\n notations: NamedNodeMap;\r\n publicId: string;\r\n systemId: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var DocumentType: {\r\n prototype: DocumentType;\r\n new(): DocumentType;\r\n}\r\n\r\ninterface DragEvent extends MouseEvent {\r\n dataTransfer: DataTransfer;\r\n initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void;\r\n msConvertURL(file: File, targetType: string, targetURL?: string): void;\r\n}\r\n\r\ndeclare var DragEvent: {\r\n prototype: DragEvent;\r\n new(): DragEvent;\r\n}\r\n\r\ninterface DynamicsCompressorNode extends AudioNode {\r\n attack: AudioParam;\r\n knee: AudioParam;\r\n ratio: AudioParam;\r\n reduction: AudioParam;\r\n release: AudioParam;\r\n threshold: AudioParam;\r\n}\r\n\r\ndeclare var DynamicsCompressorNode: {\r\n prototype: DynamicsCompressorNode;\r\n new(): DynamicsCompressorNode;\r\n}\r\n\r\ninterface EXT_texture_filter_anisotropic {\r\n MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n}\r\n\r\ndeclare var EXT_texture_filter_anisotropic: {\r\n prototype: EXT_texture_filter_anisotropic;\r\n new(): EXT_texture_filter_anisotropic;\r\n MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n}\r\n\r\ninterface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelector, ChildNode {\r\n classList: DOMTokenList;\r\n clientHeight: number;\r\n clientLeft: number;\r\n clientTop: number;\r\n clientWidth: number;\r\n msContentZoomFactor: number;\r\n msRegionOverflow: string;\r\n onariarequest: (ev: AriaRequestEvent) => any;\r\n oncommand: (ev: CommandEvent) => any;\r\n ongotpointercapture: (ev: PointerEvent) => any;\r\n onlostpointercapture: (ev: PointerEvent) => any;\r\n onmsgesturechange: (ev: MSGestureEvent) => any;\r\n onmsgesturedoubletap: (ev: MSGestureEvent) => any;\r\n onmsgestureend: (ev: MSGestureEvent) => any;\r\n onmsgesturehold: (ev: MSGestureEvent) => any;\r\n onmsgesturestart: (ev: MSGestureEvent) => any;\r\n onmsgesturetap: (ev: MSGestureEvent) => any;\r\n onmsgotpointercapture: (ev: MSPointerEvent) => any;\r\n onmsinertiastart: (ev: MSGestureEvent) => any;\r\n onmslostpointercapture: (ev: MSPointerEvent) => any;\r\n onmspointercancel: (ev: MSPointerEvent) => any;\r\n onmspointerdown: (ev: MSPointerEvent) => any;\r\n onmspointerenter: (ev: MSPointerEvent) => any;\r\n onmspointerleave: (ev: MSPointerEvent) => any;\r\n onmspointermove: (ev: MSPointerEvent) => any;\r\n onmspointerout: (ev: MSPointerEvent) => any;\r\n onmspointerover: (ev: MSPointerEvent) => any;\r\n onmspointerup: (ev: MSPointerEvent) => any;\r\n ontouchcancel: (ev: TouchEvent) => any;\r\n ontouchend: (ev: TouchEvent) => any;\r\n ontouchmove: (ev: TouchEvent) => any;\r\n ontouchstart: (ev: TouchEvent) => any;\r\n onwebkitfullscreenchange: (ev: Event) => any;\r\n onwebkitfullscreenerror: (ev: Event) => any;\r\n scrollHeight: number;\r\n scrollLeft: number;\r\n scrollTop: number;\r\n scrollWidth: number;\r\n tagName: string;\r\n id: string;\r\n className: string;\r\n innerHTML: string;\r\n getAttribute(name?: string): string;\r\n getAttributeNS(namespaceURI: string, localName: string): string;\r\n getAttributeNode(name: string): Attr;\r\n getAttributeNodeNS(namespaceURI: string, localName: string): Attr;\r\n getBoundingClientRect(): ClientRect;\r\n getClientRects(): ClientRectList;\r\n getElementsByTagName(name: \"a\"): NodeListOf;\r\n getElementsByTagName(name: \"abbr\"): NodeListOf;\r\n getElementsByTagName(name: \"acronym\"): NodeListOf;\r\n getElementsByTagName(name: \"address\"): NodeListOf;\r\n getElementsByTagName(name: \"applet\"): NodeListOf;\r\n getElementsByTagName(name: \"area\"): NodeListOf;\r\n getElementsByTagName(name: \"article\"): NodeListOf;\r\n getElementsByTagName(name: \"aside\"): NodeListOf;\r\n getElementsByTagName(name: \"audio\"): NodeListOf;\r\n getElementsByTagName(name: \"b\"): NodeListOf;\r\n getElementsByTagName(name: \"base\"): NodeListOf;\r\n getElementsByTagName(name: \"basefont\"): NodeListOf;\r\n getElementsByTagName(name: \"bdo\"): NodeListOf;\r\n getElementsByTagName(name: \"big\"): NodeListOf;\r\n getElementsByTagName(name: \"blockquote\"): NodeListOf;\r\n getElementsByTagName(name: \"body\"): NodeListOf;\r\n getElementsByTagName(name: \"br\"): NodeListOf;\r\n getElementsByTagName(name: \"button\"): NodeListOf;\r\n getElementsByTagName(name: \"canvas\"): NodeListOf;\r\n getElementsByTagName(name: \"caption\"): NodeListOf;\r\n getElementsByTagName(name: \"center\"): NodeListOf;\r\n getElementsByTagName(name: \"circle\"): NodeListOf;\r\n getElementsByTagName(name: \"cite\"): NodeListOf;\r\n getElementsByTagName(name: \"clippath\"): NodeListOf;\r\n getElementsByTagName(name: \"code\"): NodeListOf;\r\n getElementsByTagName(name: \"col\"): NodeListOf;\r\n getElementsByTagName(name: \"colgroup\"): NodeListOf;\r\n getElementsByTagName(name: \"datalist\"): NodeListOf;\r\n getElementsByTagName(name: \"dd\"): NodeListOf;\r\n getElementsByTagName(name: \"defs\"): NodeListOf;\r\n getElementsByTagName(name: \"del\"): NodeListOf;\r\n getElementsByTagName(name: \"desc\"): NodeListOf;\r\n getElementsByTagName(name: \"dfn\"): NodeListOf;\r\n getElementsByTagName(name: \"dir\"): NodeListOf;\r\n getElementsByTagName(name: \"div\"): NodeListOf;\r\n getElementsByTagName(name: \"dl\"): NodeListOf;\r\n getElementsByTagName(name: \"dt\"): NodeListOf;\r\n getElementsByTagName(name: \"ellipse\"): NodeListOf;\r\n getElementsByTagName(name: \"em\"): NodeListOf;\r\n getElementsByTagName(name: \"embed\"): NodeListOf;\r\n getElementsByTagName(name: \"feblend\"): NodeListOf;\r\n getElementsByTagName(name: \"fecolormatrix\"): NodeListOf;\r\n getElementsByTagName(name: \"fecomponenttransfer\"): NodeListOf;\r\n getElementsByTagName(name: \"fecomposite\"): NodeListOf;\r\n getElementsByTagName(name: \"feconvolvematrix\"): NodeListOf;\r\n getElementsByTagName(name: \"fediffuselighting\"): NodeListOf;\r\n getElementsByTagName(name: \"fedisplacementmap\"): NodeListOf;\r\n getElementsByTagName(name: \"fedistantlight\"): NodeListOf;\r\n getElementsByTagName(name: \"feflood\"): NodeListOf;\r\n getElementsByTagName(name: \"fefunca\"): NodeListOf;\r\n getElementsByTagName(name: \"fefuncb\"): NodeListOf;\r\n getElementsByTagName(name: \"fefuncg\"): NodeListOf;\r\n getElementsByTagName(name: \"fefuncr\"): NodeListOf;\r\n getElementsByTagName(name: \"fegaussianblur\"): NodeListOf;\r\n getElementsByTagName(name: \"feimage\"): NodeListOf;\r\n getElementsByTagName(name: \"femerge\"): NodeListOf;\r\n getElementsByTagName(name: \"femergenode\"): NodeListOf;\r\n getElementsByTagName(name: \"femorphology\"): NodeListOf;\r\n getElementsByTagName(name: \"feoffset\"): NodeListOf;\r\n getElementsByTagName(name: \"fepointlight\"): NodeListOf;\r\n getElementsByTagName(name: \"fespecularlighting\"): NodeListOf;\r\n getElementsByTagName(name: \"fespotlight\"): NodeListOf;\r\n getElementsByTagName(name: \"fetile\"): NodeListOf;\r\n getElementsByTagName(name: \"feturbulence\"): NodeListOf;\r\n getElementsByTagName(name: \"fieldset\"): NodeListOf;\r\n getElementsByTagName(name: \"figcaption\"): NodeListOf;\r\n getElementsByTagName(name: \"figure\"): NodeListOf;\r\n getElementsByTagName(name: \"filter\"): NodeListOf;\r\n getElementsByTagName(name: \"font\"): NodeListOf;\r\n getElementsByTagName(name: \"footer\"): NodeListOf;\r\n getElementsByTagName(name: \"foreignobject\"): NodeListOf;\r\n getElementsByTagName(name: \"form\"): NodeListOf;\r\n getElementsByTagName(name: \"frame\"): NodeListOf;\r\n getElementsByTagName(name: \"frameset\"): NodeListOf;\r\n getElementsByTagName(name: \"g\"): NodeListOf;\r\n getElementsByTagName(name: \"h1\"): NodeListOf;\r\n getElementsByTagName(name: \"h2\"): NodeListOf;\r\n getElementsByTagName(name: \"h3\"): NodeListOf;\r\n getElementsByTagName(name: \"h4\"): NodeListOf;\r\n getElementsByTagName(name: \"h5\"): NodeListOf;\r\n getElementsByTagName(name: \"h6\"): NodeListOf;\r\n getElementsByTagName(name: \"head\"): NodeListOf;\r\n getElementsByTagName(name: \"header\"): NodeListOf;\r\n getElementsByTagName(name: \"hgroup\"): NodeListOf;\r\n getElementsByTagName(name: \"hr\"): NodeListOf;\r\n getElementsByTagName(name: \"html\"): NodeListOf;\r\n getElementsByTagName(name: \"i\"): NodeListOf;\r\n getElementsByTagName(name: \"iframe\"): NodeListOf;\r\n getElementsByTagName(name: \"image\"): NodeListOf;\r\n getElementsByTagName(name: \"img\"): NodeListOf;\r\n getElementsByTagName(name: \"input\"): NodeListOf;\r\n getElementsByTagName(name: \"ins\"): NodeListOf;\r\n getElementsByTagName(name: \"isindex\"): NodeListOf;\r\n getElementsByTagName(name: \"kbd\"): NodeListOf;\r\n getElementsByTagName(name: \"keygen\"): NodeListOf;\r\n getElementsByTagName(name: \"label\"): NodeListOf;\r\n getElementsByTagName(name: \"legend\"): NodeListOf;\r\n getElementsByTagName(name: \"li\"): NodeListOf;\r\n getElementsByTagName(name: \"line\"): NodeListOf;\r\n getElementsByTagName(name: \"lineargradient\"): NodeListOf;\r\n getElementsByTagName(name: \"link\"): NodeListOf;\r\n getElementsByTagName(name: \"listing\"): NodeListOf;\r\n getElementsByTagName(name: \"map\"): NodeListOf;\r\n getElementsByTagName(name: \"mark\"): NodeListOf;\r\n getElementsByTagName(name: \"marker\"): NodeListOf;\r\n getElementsByTagName(name: \"marquee\"): NodeListOf;\r\n getElementsByTagName(name: \"mask\"): NodeListOf;\r\n getElementsByTagName(name: \"menu\"): NodeListOf;\r\n getElementsByTagName(name: \"meta\"): NodeListOf;\r\n getElementsByTagName(name: \"metadata\"): NodeListOf;\r\n getElementsByTagName(name: \"nav\"): NodeListOf;\r\n getElementsByTagName(name: \"nextid\"): NodeListOf;\r\n getElementsByTagName(name: \"nobr\"): NodeListOf;\r\n getElementsByTagName(name: \"noframes\"): NodeListOf;\r\n getElementsByTagName(name: \"noscript\"): NodeListOf;\r\n getElementsByTagName(name: \"object\"): NodeListOf;\r\n getElementsByTagName(name: \"ol\"): NodeListOf;\r\n getElementsByTagName(name: \"optgroup\"): NodeListOf;\r\n getElementsByTagName(name: \"option\"): NodeListOf;\r\n getElementsByTagName(name: \"p\"): NodeListOf;\r\n getElementsByTagName(name: \"param\"): NodeListOf;\r\n getElementsByTagName(name: \"path\"): NodeListOf;\r\n getElementsByTagName(name: \"pattern\"): NodeListOf;\r\n getElementsByTagName(name: \"plaintext\"): NodeListOf;\r\n getElementsByTagName(name: \"polygon\"): NodeListOf;\r\n getElementsByTagName(name: \"polyline\"): NodeListOf;\r\n getElementsByTagName(name: \"pre\"): NodeListOf;\r\n getElementsByTagName(name: \"progress\"): NodeListOf;\r\n getElementsByTagName(name: \"q\"): NodeListOf;\r\n getElementsByTagName(name: \"radialgradient\"): NodeListOf;\r\n getElementsByTagName(name: \"rect\"): NodeListOf;\r\n getElementsByTagName(name: \"rt\"): NodeListOf;\r\n getElementsByTagName(name: \"ruby\"): NodeListOf;\r\n getElementsByTagName(name: \"s\"): NodeListOf;\r\n getElementsByTagName(name: \"samp\"): NodeListOf;\r\n getElementsByTagName(name: \"script\"): NodeListOf;\r\n getElementsByTagName(name: \"section\"): NodeListOf;\r\n getElementsByTagName(name: \"select\"): NodeListOf;\r\n getElementsByTagName(name: \"small\"): NodeListOf;\r\n getElementsByTagName(name: \"source\"): NodeListOf;\r\n getElementsByTagName(name: \"span\"): NodeListOf;\r\n getElementsByTagName(name: \"stop\"): NodeListOf;\r\n getElementsByTagName(name: \"strike\"): NodeListOf;\r\n getElementsByTagName(name: \"strong\"): NodeListOf;\r\n getElementsByTagName(name: \"style\"): NodeListOf;\r\n getElementsByTagName(name: \"sub\"): NodeListOf;\r\n getElementsByTagName(name: \"sup\"): NodeListOf;\r\n getElementsByTagName(name: \"svg\"): NodeListOf;\r\n getElementsByTagName(name: \"switch\"): NodeListOf;\r\n getElementsByTagName(name: \"symbol\"): NodeListOf;\r\n getElementsByTagName(name: \"table\"): NodeListOf;\r\n getElementsByTagName(name: \"tbody\"): NodeListOf;\r\n getElementsByTagName(name: \"td\"): NodeListOf;\r\n getElementsByTagName(name: \"text\"): NodeListOf;\r\n getElementsByTagName(name: \"textpath\"): NodeListOf;\r\n getElementsByTagName(name: \"textarea\"): NodeListOf;\r\n getElementsByTagName(name: \"tfoot\"): NodeListOf;\r\n getElementsByTagName(name: \"th\"): NodeListOf;\r\n getElementsByTagName(name: \"thead\"): NodeListOf;\r\n getElementsByTagName(name: \"title\"): NodeListOf;\r\n getElementsByTagName(name: \"tr\"): NodeListOf;\r\n getElementsByTagName(name: \"track\"): NodeListOf;\r\n getElementsByTagName(name: \"tspan\"): NodeListOf;\r\n getElementsByTagName(name: \"tt\"): NodeListOf;\r\n getElementsByTagName(name: \"u\"): NodeListOf;\r\n getElementsByTagName(name: \"ul\"): NodeListOf;\r\n getElementsByTagName(name: \"use\"): NodeListOf;\r\n getElementsByTagName(name: \"var\"): NodeListOf;\r\n getElementsByTagName(name: \"video\"): NodeListOf;\r\n getElementsByTagName(name: \"view\"): NodeListOf;\r\n getElementsByTagName(name: \"wbr\"): NodeListOf;\r\n getElementsByTagName(name: \"x-ms-webview\"): NodeListOf;\r\n getElementsByTagName(name: \"xmp\"): NodeListOf;\r\n getElementsByTagName(name: string): NodeListOf;\r\n getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf;\r\n hasAttribute(name: string): boolean;\r\n hasAttributeNS(namespaceURI: string, localName: string): boolean;\r\n msGetRegionContent(): MSRangeCollection;\r\n msGetUntransformedBounds(): ClientRect;\r\n msMatchesSelector(selectors: string): boolean;\r\n msReleasePointerCapture(pointerId: number): void;\r\n msSetPointerCapture(pointerId: number): void;\r\n msZoomTo(args: MsZoomToOptions): void;\r\n releasePointerCapture(pointerId: number): void;\r\n removeAttribute(name?: string): void;\r\n removeAttributeNS(namespaceURI: string, localName: string): void;\r\n removeAttributeNode(oldAttr: Attr): Attr;\r\n requestFullscreen(): void;\r\n requestPointerLock(): void;\r\n setAttribute(name: string, value: string): void;\r\n setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;\r\n setAttributeNode(newAttr: Attr): Attr;\r\n setAttributeNodeNS(newAttr: Attr): Attr;\r\n setPointerCapture(pointerId: number): void;\r\n webkitMatchesSelector(selectors: string): boolean;\r\n webkitRequestFullScreen(): void;\r\n webkitRequestFullscreen(): void;\r\n getElementsByClassName(classNames: string): NodeListOf;\r\n matches(selector: string): boolean;\r\n getElementsByTagName(tagname: \"picture\"): NodeListOf;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Element: {\r\n prototype: Element;\r\n new(): Element;\r\n}\r\n\r\ninterface ErrorEvent extends Event {\r\n colno: number;\r\n error: any;\r\n filename: string;\r\n lineno: number;\r\n message: string;\r\n initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;\r\n}\r\n\r\ndeclare var ErrorEvent: {\r\n prototype: ErrorEvent;\r\n new(): ErrorEvent;\r\n}\r\n\r\ninterface Event {\r\n bubbles: boolean;\r\n cancelBubble: boolean;\r\n cancelable: boolean;\r\n currentTarget: EventTarget;\r\n defaultPrevented: boolean;\r\n eventPhase: number;\r\n isTrusted: boolean;\r\n returnValue: boolean;\r\n srcElement: Element;\r\n target: EventTarget;\r\n timeStamp: number;\r\n type: string;\r\n initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;\r\n preventDefault(): void;\r\n stopImmediatePropagation(): void;\r\n stopPropagation(): void;\r\n AT_TARGET: number;\r\n BUBBLING_PHASE: number;\r\n CAPTURING_PHASE: number;\r\n}\r\n\r\ndeclare var Event: {\r\n prototype: Event;\r\n new(type: string, eventInitDict?: EventInit): Event;\r\n AT_TARGET: number;\r\n BUBBLING_PHASE: number;\r\n CAPTURING_PHASE: number;\r\n}\r\n\r\ninterface EventTarget {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n dispatchEvent(evt: Event): boolean;\r\n removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var EventTarget: {\r\n prototype: EventTarget;\r\n new(): EventTarget;\r\n}\r\n\r\ninterface External {\r\n}\r\n\r\ndeclare var External: {\r\n prototype: External;\r\n new(): External;\r\n}\r\n\r\ninterface File extends Blob {\r\n lastModifiedDate: any;\r\n name: string;\r\n}\r\n\r\ndeclare var File: {\r\n prototype: File;\r\n new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;\r\n}\r\n\r\ninterface FileList {\r\n length: number;\r\n item(index: number): File;\r\n [index: number]: File;\r\n}\r\n\r\ndeclare var FileList: {\r\n prototype: FileList;\r\n new(): FileList;\r\n}\r\n\r\ninterface FileReader extends EventTarget, MSBaseReader {\r\n error: DOMError;\r\n readAsArrayBuffer(blob: Blob): void;\r\n readAsBinaryString(blob: Blob): void;\r\n readAsDataURL(blob: Blob): void;\r\n readAsText(blob: Blob, encoding?: string): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var FileReader: {\r\n prototype: FileReader;\r\n new(): FileReader;\r\n}\r\n\r\ninterface FocusEvent extends UIEvent {\r\n relatedTarget: EventTarget;\r\n initFocusEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, relatedTargetArg: EventTarget): void;\r\n}\r\n\r\ndeclare var FocusEvent: {\r\n prototype: FocusEvent;\r\n new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;\r\n}\r\n\r\ninterface FormData {\r\n append(name: any, value: any, blobName?: string): void;\r\n}\r\n\r\ndeclare var FormData: {\r\n prototype: FormData;\r\n new (form?: HTMLFormElement): FormData;\r\n}\r\n\r\ninterface GainNode extends AudioNode {\r\n gain: AudioParam;\r\n}\r\n\r\ndeclare var GainNode: {\r\n prototype: GainNode;\r\n new(): GainNode;\r\n}\r\n\r\ninterface Gamepad {\r\n axes: number[];\r\n buttons: GamepadButton[];\r\n connected: boolean;\r\n id: string;\r\n index: number;\r\n mapping: string;\r\n timestamp: number;\r\n}\r\n\r\ndeclare var Gamepad: {\r\n prototype: Gamepad;\r\n new(): Gamepad;\r\n}\r\n\r\ninterface GamepadButton {\r\n pressed: boolean;\r\n value: number;\r\n}\r\n\r\ndeclare var GamepadButton: {\r\n prototype: GamepadButton;\r\n new(): GamepadButton;\r\n}\r\n\r\ninterface GamepadEvent extends Event {\r\n gamepad: Gamepad;\r\n}\r\n\r\ndeclare var GamepadEvent: {\r\n prototype: GamepadEvent;\r\n new(): GamepadEvent;\r\n}\r\n\r\ninterface Geolocation {\r\n clearWatch(watchId: number): void;\r\n getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void;\r\n watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number;\r\n}\r\n\r\ndeclare var Geolocation: {\r\n prototype: Geolocation;\r\n new(): Geolocation;\r\n}\r\n\r\ninterface HTMLAllCollection extends HTMLCollection {\r\n namedItem(name: string): Element;\r\n}\r\n\r\ndeclare var HTMLAllCollection: {\r\n prototype: HTMLAllCollection;\r\n new(): HTMLAllCollection;\r\n}\r\n\r\ninterface HTMLAnchorElement extends HTMLElement {\r\n Methods: string;\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Sets or retrieves the coordinates of the object.\r\n */\r\n coords: string;\r\n /**\r\n * Contains the anchor portion of the URL including the hash sign (#).\r\n */\r\n hash: string;\r\n /**\r\n * Contains the hostname and port values of the URL.\r\n */\r\n host: string;\r\n /**\r\n * Contains the hostname of a URL.\r\n */\r\n hostname: string;\r\n /**\r\n * Sets or retrieves a destination URL or an anchor point.\r\n */\r\n href: string;\r\n /**\r\n * Sets or retrieves the language code of the object.\r\n */\r\n hreflang: string;\r\n mimeType: string;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n name: string;\r\n nameProp: string;\r\n /**\r\n * Contains the pathname of the URL.\r\n */\r\n pathname: string;\r\n /**\r\n * Sets or retrieves the port number associated with a URL.\r\n */\r\n port: string;\r\n /**\r\n * Contains the protocol of the URL.\r\n */\r\n protocol: string;\r\n protocolLong: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rel: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rev: string;\r\n /**\r\n * Sets or retrieves the substring of the href property that follows the question mark.\r\n */\r\n search: string;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n shape: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Retrieves or sets the text of the object as a string. \r\n */\r\n text: string;\r\n type: string;\r\n urn: string;\r\n /** \r\n * Returns a string representation of an object.\r\n */\r\n toString(): string;\r\n}\r\n\r\ndeclare var HTMLAnchorElement: {\r\n prototype: HTMLAnchorElement;\r\n new(): HTMLAnchorElement;\r\n}\r\n\r\ninterface HTMLAppletElement extends HTMLElement {\r\n /**\r\n * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.\r\n */\r\n BaseHref: string;\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Gets or sets the optional alternative HTML script to execute if the object fails to load.\r\n */\r\n altHtml: string;\r\n /**\r\n * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.\r\n */\r\n archive: string;\r\n border: string;\r\n code: string;\r\n /**\r\n * Sets or retrieves the URL of the component.\r\n */\r\n codeBase: string;\r\n /**\r\n * Sets or retrieves the Internet media type for the code associated with the object.\r\n */\r\n codeType: string;\r\n /**\r\n * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned.\r\n */\r\n contentDocument: Document;\r\n /**\r\n * Sets or retrieves the URL that references the data of the object.\r\n */\r\n data: string;\r\n /**\r\n * Sets or retrieves a character string that can be used to implement your own declare functionality for the object.\r\n */\r\n declare: boolean;\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n hspace: number;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n name: string;\r\n object: string;\r\n /**\r\n * Sets or retrieves a message to be displayed while an object is loading.\r\n */\r\n standby: string;\r\n /**\r\n * Returns the content type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n vspace: number;\r\n width: number;\r\n}\r\n\r\ndeclare var HTMLAppletElement: {\r\n prototype: HTMLAppletElement;\r\n new(): HTMLAppletElement;\r\n}\r\n\r\ninterface HTMLAreaElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Sets or retrieves the coordinates of the object.\r\n */\r\n coords: string;\r\n /**\r\n * Sets or retrieves the subsection of the href property that follows the number sign (#).\r\n */\r\n hash: string;\r\n /**\r\n * Sets or retrieves the hostname and port number of the location or URL.\r\n */\r\n host: string;\r\n /**\r\n * Sets or retrieves the host name part of the location or URL. \r\n */\r\n hostname: string;\r\n /**\r\n * Sets or retrieves a destination URL or an anchor point.\r\n */\r\n href: string;\r\n /**\r\n * Sets or gets whether clicks in this region cause action.\r\n */\r\n noHref: boolean;\r\n /**\r\n * Sets or retrieves the file name or path specified by the object.\r\n */\r\n pathname: string;\r\n /**\r\n * Sets or retrieves the port number associated with a URL.\r\n */\r\n port: string;\r\n /**\r\n * Sets or retrieves the protocol portion of a URL.\r\n */\r\n protocol: string;\r\n rel: string;\r\n /**\r\n * Sets or retrieves the substring of the href property that follows the question mark.\r\n */\r\n search: string;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n shape: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /** \r\n * Returns a string representation of an object.\r\n */\r\n toString(): string;\r\n}\r\n\r\ndeclare var HTMLAreaElement: {\r\n prototype: HTMLAreaElement;\r\n new(): HTMLAreaElement;\r\n}\r\n\r\ninterface HTMLAreasCollection extends HTMLCollection {\r\n /**\r\n * Adds an element to the areas, controlRange, or options collection.\r\n */\r\n add(element: HTMLElement, before?: HTMLElement | number): void;\r\n /**\r\n * Removes an element from the collection.\r\n */\r\n remove(index?: number): void;\r\n}\r\n\r\ndeclare var HTMLAreasCollection: {\r\n prototype: HTMLAreasCollection;\r\n new(): HTMLAreasCollection;\r\n}\r\n\r\ninterface HTMLAudioElement extends HTMLMediaElement {\r\n}\r\n\r\ndeclare var HTMLAudioElement: {\r\n prototype: HTMLAudioElement;\r\n new(): HTMLAudioElement;\r\n}\r\n\r\ninterface HTMLBRElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.\r\n */\r\n clear: string;\r\n}\r\n\r\ndeclare var HTMLBRElement: {\r\n prototype: HTMLBRElement;\r\n new(): HTMLBRElement;\r\n}\r\n\r\ninterface HTMLBaseElement extends HTMLElement {\r\n /**\r\n * Gets or sets the baseline URL on which relative links are based.\r\n */\r\n href: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n}\r\n\r\ndeclare var HTMLBaseElement: {\r\n prototype: HTMLBaseElement;\r\n new(): HTMLBaseElement;\r\n}\r\n\r\ninterface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {\r\n /**\r\n * Sets or retrieves the current typeface family.\r\n */\r\n face: string;\r\n /**\r\n * Sets or retrieves the font size of the object.\r\n */\r\n size: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLBaseFontElement: {\r\n prototype: HTMLBaseFontElement;\r\n new(): HTMLBaseFontElement;\r\n}\r\n\r\ninterface HTMLBlockElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n clear: string;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: number;\r\n}\r\n\r\ndeclare var HTMLBlockElement: {\r\n prototype: HTMLBlockElement;\r\n new(): HTMLBlockElement;\r\n}\r\n\r\ninterface HTMLBodyElement extends HTMLElement {\r\n aLink: any;\r\n background: string;\r\n bgColor: any;\r\n bgProperties: string;\r\n link: any;\r\n noWrap: boolean;\r\n onafterprint: (ev: Event) => any;\r\n onbeforeprint: (ev: Event) => any;\r\n onbeforeunload: (ev: BeforeUnloadEvent) => any;\r\n onblur: (ev: FocusEvent) => any;\r\n onerror: (ev: Event) => any;\r\n onfocus: (ev: FocusEvent) => any;\r\n onhashchange: (ev: HashChangeEvent) => any;\r\n onload: (ev: Event) => any;\r\n onmessage: (ev: MessageEvent) => any;\r\n onoffline: (ev: Event) => any;\r\n ononline: (ev: Event) => any;\r\n onorientationchange: (ev: Event) => any;\r\n onpagehide: (ev: PageTransitionEvent) => any;\r\n onpageshow: (ev: PageTransitionEvent) => any;\r\n onpopstate: (ev: PopStateEvent) => any;\r\n onresize: (ev: UIEvent) => any;\r\n onstorage: (ev: StorageEvent) => any;\r\n onunload: (ev: Event) => any;\r\n text: any;\r\n vLink: any;\r\n createTextRange(): TextRange;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"afterprint\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeprint\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeunload\", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"hashchange\", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"offline\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"online\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"orientationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pagehide\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pageshow\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"popstate\", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"storage\", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"unload\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLBodyElement: {\r\n prototype: HTMLBodyElement;\r\n new(): HTMLBodyElement;\r\n}\r\n\r\ninterface HTMLButtonElement extends HTMLElement {\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Overrides the action attribute (where the data on a form is sent) on the parent form element.\r\n */\r\n formAction: string;\r\n /**\r\n * Used to override the encoding (formEnctype attribute) specified on the form element.\r\n */\r\n formEnctype: string;\r\n /**\r\n * Overrides the submit method attribute previously specified on a form element.\r\n */\r\n formMethod: string;\r\n /**\r\n * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a \"save draft\"-type submit option.\r\n */\r\n formNoValidate: string;\r\n /**\r\n * Overrides the target attribute on a form element.\r\n */\r\n formTarget: string;\r\n /** \r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n status: any;\r\n /**\r\n * Gets the classification and default behavior of the button.\r\n */\r\n type: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /** \r\n * Sets or retrieves the default or selected value of the control.\r\n */\r\n value: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Creates a TextRange object for the element.\r\n */\r\n createTextRange(): TextRange;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n}\r\n\r\ndeclare var HTMLButtonElement: {\r\n prototype: HTMLButtonElement;\r\n new(): HTMLButtonElement;\r\n}\r\n\r\ninterface HTMLCanvasElement extends HTMLElement {\r\n /**\r\n * Gets or sets the height of a canvas element on a document.\r\n */\r\n height: number;\r\n /**\r\n * Gets or sets the width of a canvas element on a document.\r\n */\r\n width: number;\r\n /**\r\n * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.\r\n * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext(\"2d\"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext(\"experimental-webgl\");\r\n */\r\n getContext(contextId: \"2d\"): CanvasRenderingContext2D;\r\n getContext(contextId: \"experimental-webgl\"): WebGLRenderingContext;\r\n getContext(contextId: string, ...args: any[]): CanvasRenderingContext2D | WebGLRenderingContext;\r\n /**\r\n * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.\r\n */\r\n msToBlob(): Blob;\r\n /**\r\n * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.\r\n * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.\r\n */\r\n toDataURL(type?: string, ...args: any[]): string;\r\n toBlob(): Blob;\r\n}\r\n\r\ndeclare var HTMLCanvasElement: {\r\n prototype: HTMLCanvasElement;\r\n new(): HTMLCanvasElement;\r\n}\r\n\r\ninterface HTMLCollection {\r\n /**\r\n * Sets or retrieves the number of objects in a collection.\r\n */\r\n length: number;\r\n /**\r\n * Retrieves an object from various collections.\r\n */\r\n item(nameOrIndex?: any, optionalIndex?: any): Element;\r\n /**\r\n * Retrieves a select object or an object from an options collection.\r\n */\r\n namedItem(name: string): Element;\r\n [index: number]: Element;\r\n}\r\n\r\ndeclare var HTMLCollection: {\r\n prototype: HTMLCollection;\r\n new(): HTMLCollection;\r\n}\r\n\r\ninterface HTMLDDElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n}\r\n\r\ndeclare var HTMLDDElement: {\r\n prototype: HTMLDDElement;\r\n new(): HTMLDDElement;\r\n}\r\n\r\ninterface HTMLDListElement extends HTMLElement {\r\n compact: boolean;\r\n}\r\n\r\ndeclare var HTMLDListElement: {\r\n prototype: HTMLDListElement;\r\n new(): HTMLDListElement;\r\n}\r\n\r\ninterface HTMLDTElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n}\r\n\r\ndeclare var HTMLDTElement: {\r\n prototype: HTMLDTElement;\r\n new(): HTMLDTElement;\r\n}\r\n\r\ninterface HTMLDataListElement extends HTMLElement {\r\n options: HTMLCollection;\r\n}\r\n\r\ndeclare var HTMLDataListElement: {\r\n prototype: HTMLDataListElement;\r\n new(): HTMLDataListElement;\r\n}\r\n\r\ninterface HTMLDirectoryElement extends HTMLElement {\r\n compact: boolean;\r\n}\r\n\r\ndeclare var HTMLDirectoryElement: {\r\n prototype: HTMLDirectoryElement;\r\n new(): HTMLDirectoryElement;\r\n}\r\n\r\ninterface HTMLDivElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text. \r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n}\r\n\r\ndeclare var HTMLDivElement: {\r\n prototype: HTMLDivElement;\r\n new(): HTMLDivElement;\r\n}\r\n\r\ninterface HTMLDocument extends Document {\r\n}\r\n\r\ndeclare var HTMLDocument: {\r\n prototype: HTMLDocument;\r\n new(): HTMLDocument;\r\n}\r\n\r\ninterface HTMLElement extends Element {\r\n accessKey: string;\r\n children: HTMLCollection;\r\n contentEditable: string;\r\n dataset: DOMStringMap;\r\n dir: string;\r\n draggable: boolean;\r\n hidden: boolean;\r\n hideFocus: boolean;\r\n innerHTML: string;\r\n innerText: string;\r\n isContentEditable: boolean;\r\n lang: string;\r\n offsetHeight: number;\r\n offsetLeft: number;\r\n offsetParent: Element;\r\n offsetTop: number;\r\n offsetWidth: number;\r\n onabort: (ev: Event) => any;\r\n onactivate: (ev: UIEvent) => any;\r\n onbeforeactivate: (ev: UIEvent) => any;\r\n onbeforecopy: (ev: DragEvent) => any;\r\n onbeforecut: (ev: DragEvent) => any;\r\n onbeforedeactivate: (ev: UIEvent) => any;\r\n onbeforepaste: (ev: DragEvent) => any;\r\n onblur: (ev: FocusEvent) => any;\r\n oncanplay: (ev: Event) => any;\r\n oncanplaythrough: (ev: Event) => any;\r\n onchange: (ev: Event) => any;\r\n onclick: (ev: MouseEvent) => any;\r\n oncontextmenu: (ev: PointerEvent) => any;\r\n oncopy: (ev: DragEvent) => any;\r\n oncuechange: (ev: Event) => any;\r\n oncut: (ev: DragEvent) => any;\r\n ondblclick: (ev: MouseEvent) => any;\r\n ondeactivate: (ev: UIEvent) => any;\r\n ondrag: (ev: DragEvent) => any;\r\n ondragend: (ev: DragEvent) => any;\r\n ondragenter: (ev: DragEvent) => any;\r\n ondragleave: (ev: DragEvent) => any;\r\n ondragover: (ev: DragEvent) => any;\r\n ondragstart: (ev: DragEvent) => any;\r\n ondrop: (ev: DragEvent) => any;\r\n ondurationchange: (ev: Event) => any;\r\n onemptied: (ev: Event) => any;\r\n onended: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n onfocus: (ev: FocusEvent) => any;\r\n oninput: (ev: Event) => any;\r\n onkeydown: (ev: KeyboardEvent) => any;\r\n onkeypress: (ev: KeyboardEvent) => any;\r\n onkeyup: (ev: KeyboardEvent) => any;\r\n onload: (ev: Event) => any;\r\n onloadeddata: (ev: Event) => any;\r\n onloadedmetadata: (ev: Event) => any;\r\n onloadstart: (ev: Event) => any;\r\n onmousedown: (ev: MouseEvent) => any;\r\n onmouseenter: (ev: MouseEvent) => any;\r\n onmouseleave: (ev: MouseEvent) => any;\r\n onmousemove: (ev: MouseEvent) => any;\r\n onmouseout: (ev: MouseEvent) => any;\r\n onmouseover: (ev: MouseEvent) => any;\r\n onmouseup: (ev: MouseEvent) => any;\r\n onmousewheel: (ev: MouseWheelEvent) => any;\r\n onmscontentzoom: (ev: UIEvent) => any;\r\n onmsmanipulationstatechanged: (ev: MSManipulationEvent) => any;\r\n onpaste: (ev: DragEvent) => any;\r\n onpause: (ev: Event) => any;\r\n onplay: (ev: Event) => any;\r\n onplaying: (ev: Event) => any;\r\n onprogress: (ev: ProgressEvent) => any;\r\n onratechange: (ev: Event) => any;\r\n onreset: (ev: Event) => any;\r\n onscroll: (ev: UIEvent) => any;\r\n onseeked: (ev: Event) => any;\r\n onseeking: (ev: Event) => any;\r\n onselect: (ev: UIEvent) => any;\r\n onselectstart: (ev: Event) => any;\r\n onstalled: (ev: Event) => any;\r\n onsubmit: (ev: Event) => any;\r\n onsuspend: (ev: Event) => any;\r\n ontimeupdate: (ev: Event) => any;\r\n onvolumechange: (ev: Event) => any;\r\n onwaiting: (ev: Event) => any;\r\n outerHTML: string;\r\n outerText: string;\r\n spellcheck: boolean;\r\n style: CSSStyleDeclaration;\r\n tabIndex: number;\r\n title: string;\r\n blur(): void;\r\n click(): void;\r\n dragDrop(): boolean;\r\n focus(): void;\r\n insertAdjacentElement(position: string, insertedElement: Element): Element;\r\n insertAdjacentHTML(where: string, html: string): void;\r\n insertAdjacentText(where: string, text: string): void;\r\n msGetInputContext(): MSInputMethodContext;\r\n scrollIntoView(top?: boolean): void;\r\n setActive(): void;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLElement: {\r\n prototype: HTMLElement;\r\n new(): HTMLElement;\r\n}\r\n\r\ninterface HTMLEmbedElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n hidden: any;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.\r\n */\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n msPlayToSource: any;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Retrieves the palette used for the embedded document.\r\n */\r\n palette: string;\r\n /**\r\n * Retrieves the URL of the plug-in used to view an embedded document.\r\n */\r\n pluginspage: string;\r\n readyState: string;\r\n /**\r\n * Sets or retrieves a URL to be loaded by the object.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the height and width units of the embed object.\r\n */\r\n units: string;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLEmbedElement: {\r\n prototype: HTMLEmbedElement;\r\n new(): HTMLEmbedElement;\r\n}\r\n\r\ninterface HTMLFieldSetElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n}\r\n\r\ndeclare var HTMLFieldSetElement: {\r\n prototype: HTMLFieldSetElement;\r\n new(): HTMLFieldSetElement;\r\n}\r\n\r\ninterface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {\r\n /**\r\n * Sets or retrieves the current typeface family.\r\n */\r\n face: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLFontElement: {\r\n prototype: HTMLFontElement;\r\n new(): HTMLFontElement;\r\n}\r\n\r\ninterface HTMLFormElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.\r\n */\r\n acceptCharset: string;\r\n /**\r\n * Sets or retrieves the URL to which the form content is sent for processing.\r\n */\r\n action: string;\r\n /**\r\n * Specifies whether autocomplete is applied to an editable text field.\r\n */\r\n autocomplete: string;\r\n /**\r\n * Retrieves a collection, in source order, of all controls in a given form.\r\n */\r\n elements: HTMLCollection;\r\n /**\r\n * Sets or retrieves the MIME encoding for the form.\r\n */\r\n encoding: string;\r\n /**\r\n * Sets or retrieves the encoding type for the form.\r\n */\r\n enctype: string;\r\n /**\r\n * Sets or retrieves the number of objects in a collection.\r\n */\r\n length: number;\r\n /**\r\n * Sets or retrieves how to send the form data to the server.\r\n */\r\n method: string;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Designates a form that is not validated when submitted.\r\n */\r\n noValidate: boolean;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Retrieves a form object or an object from an elements collection.\r\n * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.\r\n * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.\r\n */\r\n item(name?: any, index?: any): any;\r\n /**\r\n * Retrieves a form object or an object from an elements collection.\r\n */\r\n namedItem(name: string): any;\r\n /**\r\n * Fires when the user resets a form.\r\n */\r\n reset(): void;\r\n /**\r\n * Fires when a FORM is about to be submitted.\r\n */\r\n submit(): void;\r\n [name: string]: any;\r\n}\r\n\r\ndeclare var HTMLFormElement: {\r\n prototype: HTMLFormElement;\r\n new(): HTMLFormElement;\r\n}\r\n\r\ninterface HTMLFrameElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Specifies the properties of a border drawn around an object.\r\n */\r\n border: string;\r\n /**\r\n * Sets or retrieves the border color of the object.\r\n */\r\n borderColor: any;\r\n /**\r\n * Retrieves the document object of the page or frame.\r\n */\r\n contentDocument: Document;\r\n /**\r\n * Retrieves the object of the specified.\r\n */\r\n contentWindow: Window;\r\n /**\r\n * Sets or retrieves whether to display a border for the frame.\r\n */\r\n frameBorder: string;\r\n /**\r\n * Sets or retrieves the amount of additional space between the frames.\r\n */\r\n frameSpacing: any;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string | number;\r\n /**\r\n * Sets or retrieves a URI to a long description of the object.\r\n */\r\n longDesc: string;\r\n /**\r\n * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.\r\n */\r\n marginHeight: string;\r\n /**\r\n * Sets or retrieves the left and right margin widths before displaying the text in a frame.\r\n */\r\n marginWidth: string;\r\n /**\r\n * Sets or retrieves the frame name.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves whether the user can resize the frame.\r\n */\r\n noResize: boolean;\r\n /**\r\n * Raised when the object has been completely received from the server.\r\n */\r\n onload: (ev: Event) => any;\r\n /**\r\n * Sets or retrieves whether the frame can be scrolled.\r\n */\r\n scrolling: string;\r\n /**\r\n * Sets the value indicating whether the source file of a frame or iframe has specific security restrictions applied.\r\n */\r\n security: any;\r\n /**\r\n * Sets or retrieves a URL to be loaded by the object.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string | number;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLFrameElement: {\r\n prototype: HTMLFrameElement;\r\n new(): HTMLFrameElement;\r\n}\r\n\r\ninterface HTMLFrameSetElement extends HTMLElement {\r\n border: string;\r\n /**\r\n * Sets or retrieves the border color of the object.\r\n */\r\n borderColor: any;\r\n /**\r\n * Sets or retrieves the frame widths of the object.\r\n */\r\n cols: string;\r\n /**\r\n * Sets or retrieves whether to display a border for the frame.\r\n */\r\n frameBorder: string;\r\n /**\r\n * Sets or retrieves the amount of additional space between the frames.\r\n */\r\n frameSpacing: any;\r\n name: string;\r\n onafterprint: (ev: Event) => any;\r\n onbeforeprint: (ev: Event) => any;\r\n onbeforeunload: (ev: BeforeUnloadEvent) => any;\r\n /**\r\n * Fires when the object loses the input focus.\r\n */\r\n onblur: (ev: FocusEvent) => any;\r\n onerror: (ev: Event) => any;\r\n /**\r\n * Fires when the object receives focus.\r\n */\r\n onfocus: (ev: FocusEvent) => any;\r\n onhashchange: (ev: HashChangeEvent) => any;\r\n onload: (ev: Event) => any;\r\n onmessage: (ev: MessageEvent) => any;\r\n onoffline: (ev: Event) => any;\r\n ononline: (ev: Event) => any;\r\n onorientationchange: (ev: Event) => any;\r\n onpagehide: (ev: PageTransitionEvent) => any;\r\n onpageshow: (ev: PageTransitionEvent) => any;\r\n onresize: (ev: UIEvent) => any;\r\n onstorage: (ev: StorageEvent) => any;\r\n onunload: (ev: Event) => any;\r\n /**\r\n * Sets or retrieves the frame heights of the object.\r\n */\r\n rows: string;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeprint\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeunload\", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"hashchange\", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"offline\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"online\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"orientationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pagehide\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pageshow\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"storage\", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"unload\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLFrameSetElement: {\r\n prototype: HTMLFrameSetElement;\r\n new(): HTMLFrameSetElement;\r\n}\r\n\r\ninterface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves whether the horizontal rule is drawn with 3-D shading.\r\n */\r\n noShade: boolean;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLHRElement: {\r\n prototype: HTMLHRElement;\r\n new(): HTMLHRElement;\r\n}\r\n\r\ninterface HTMLHeadElement extends HTMLElement {\r\n profile: string;\r\n}\r\n\r\ndeclare var HTMLHeadElement: {\r\n prototype: HTMLHeadElement;\r\n new(): HTMLHeadElement;\r\n}\r\n\r\ninterface HTMLHeadingElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a value that indicates the table alignment.\r\n */\r\n align: string;\r\n clear: string;\r\n}\r\n\r\ndeclare var HTMLHeadingElement: {\r\n prototype: HTMLHeadingElement;\r\n new(): HTMLHeadingElement;\r\n}\r\n\r\ninterface HTMLHtmlElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the DTD version that governs the current document.\r\n */\r\n version: string;\r\n}\r\n\r\ndeclare var HTMLHtmlElement: {\r\n prototype: HTMLHtmlElement;\r\n new(): HTMLHtmlElement;\r\n}\r\n\r\ninterface HTMLIFrameElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n allowFullscreen: boolean;\r\n /**\r\n * Specifies the properties of a border drawn around an object.\r\n */\r\n border: string;\r\n /**\r\n * Retrieves the document object of the page or frame.\r\n */\r\n contentDocument: Document;\r\n /**\r\n * Retrieves the object of the specified.\r\n */\r\n contentWindow: Window;\r\n /**\r\n * Sets or retrieves whether to display a border for the frame.\r\n */\r\n frameBorder: string;\r\n /**\r\n * Sets or retrieves the amount of additional space between the frames.\r\n */\r\n frameSpacing: any;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n /**\r\n * Sets or retrieves the horizontal margin for the object.\r\n */\r\n hspace: number;\r\n /**\r\n * Sets or retrieves a URI to a long description of the object.\r\n */\r\n longDesc: string;\r\n /**\r\n * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.\r\n */\r\n marginHeight: string;\r\n /**\r\n * Sets or retrieves the left and right margin widths before displaying the text in a frame.\r\n */\r\n marginWidth: string;\r\n /**\r\n * Sets or retrieves the frame name.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves whether the user can resize the frame.\r\n */\r\n noResize: boolean;\r\n /**\r\n * Raised when the object has been completely received from the server.\r\n */\r\n onload: (ev: Event) => any;\r\n sandbox: DOMSettableTokenList;\r\n /**\r\n * Sets or retrieves whether the frame can be scrolled.\r\n */\r\n scrolling: string;\r\n /**\r\n * Sets the value indicating whether the source file of a frame or iframe has specific security restrictions applied.\r\n */\r\n security: any;\r\n /**\r\n * Sets or retrieves a URL to be loaded by the object.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the vertical margin for the object.\r\n */\r\n vspace: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLIFrameElement: {\r\n prototype: HTMLIFrameElement;\r\n new(): HTMLIFrameElement;\r\n}\r\n\r\ninterface HTMLImageElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Specifies the properties of a border drawn around an object.\r\n */\r\n border: string;\r\n /**\r\n * Retrieves whether the object is fully loaded.\r\n */\r\n complete: boolean;\r\n crossOrigin: string;\r\n currentSrc: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: number;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n hspace: number;\r\n /**\r\n * Sets or retrieves whether the image is a server-side image map.\r\n */\r\n isMap: boolean;\r\n /**\r\n * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.\r\n */\r\n longDesc: string;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n msPlayToSource: any;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * The original height of the image resource before sizing.\r\n */\r\n naturalHeight: number;\r\n /**\r\n * The original width of the image resource before sizing.\r\n */\r\n naturalWidth: number;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n srcset: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * Sets or retrieves the vertical margin for the object.\r\n */\r\n vspace: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: number;\r\n x: number;\r\n y: number;\r\n msGetAsCastingSource(): any;\r\n}\r\n\r\ndeclare var HTMLImageElement: {\r\n prototype: HTMLImageElement;\r\n new(): HTMLImageElement;\r\n create(): HTMLImageElement;\r\n}\r\n\r\ninterface HTMLInputElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a comma-separated list of content types.\r\n */\r\n accept: string;\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Specifies whether autocomplete is applied to an editable text field.\r\n */\r\n autocomplete: string;\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n border: string;\r\n /**\r\n * Sets or retrieves the state of the check box or radio button.\r\n */\r\n checked: boolean;\r\n /**\r\n * Retrieves whether the object is fully loaded.\r\n */\r\n complete: boolean;\r\n /**\r\n * Sets or retrieves the state of the check box or radio button.\r\n */\r\n defaultChecked: boolean;\r\n /**\r\n * Sets or retrieves the initial contents of the object.\r\n */\r\n defaultValue: string;\r\n disabled: boolean;\r\n /**\r\n * Returns a FileList object on a file type input object.\r\n */\r\n files: FileList;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in. \r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Overrides the action attribute (where the data on a form is sent) on the parent form element.\r\n */\r\n formAction: string;\r\n /**\r\n * Used to override the encoding (formEnctype attribute) specified on the form element.\r\n */\r\n formEnctype: string;\r\n /**\r\n * Overrides the submit method attribute previously specified on a form element.\r\n */\r\n formMethod: string;\r\n /**\r\n * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a \"save draft\"-type submit option.\r\n */\r\n formNoValidate: string;\r\n /**\r\n * Overrides the target attribute on a form element.\r\n */\r\n formTarget: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n hspace: number;\r\n indeterminate: boolean;\r\n /**\r\n * Specifies the ID of a pre-defined datalist of options for an input element.\r\n */\r\n list: HTMLElement;\r\n /**\r\n * Defines the maximum acceptable value for an input element with type=\"number\".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.\r\n */\r\n max: string;\r\n /**\r\n * Sets or retrieves the maximum number of characters that the user can enter in a text control.\r\n */\r\n maxLength: number;\r\n /**\r\n * Defines the minimum acceptable value for an input element with type=\"number\". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.\r\n */\r\n min: string;\r\n /**\r\n * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.\r\n */\r\n multiple: boolean;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Gets or sets a string containing a regular expression that the user's input must match.\r\n */\r\n pattern: string;\r\n /**\r\n * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.\r\n */\r\n placeholder: string;\r\n readOnly: boolean;\r\n /**\r\n * When present, marks an element that can't be submitted without a value.\r\n */\r\n required: boolean;\r\n /**\r\n * Gets or sets the end position or offset of a text selection.\r\n */\r\n selectionEnd: number;\r\n /**\r\n * Gets or sets the starting position or offset of a text selection.\r\n */\r\n selectionStart: number;\r\n size: number;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n status: boolean;\r\n /**\r\n * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.\r\n */\r\n step: string;\r\n /**\r\n * Returns the content type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /**\r\n * Returns the value of the data at the cursor's current position.\r\n */\r\n value: string;\r\n valueAsDate: Date;\r\n /**\r\n * Returns the input field value as a number.\r\n */\r\n valueAsNumber: number;\r\n /**\r\n * Sets or retrieves the vertical margin for the object.\r\n */\r\n vspace: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Creates a TextRange object for the element.\r\n */\r\n createTextRange(): TextRange;\r\n /**\r\n * Makes the selection equal to the current object.\r\n */\r\n select(): void;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n /**\r\n * Sets the start and end positions of a selection in a text field.\r\n * @param start The offset into the text field for the start of the selection.\r\n * @param end The offset into the text field for the end of the selection.\r\n */\r\n setSelectionRange(start: number, end: number): void;\r\n /**\r\n * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.\r\n * @param n Value to decrement the value by.\r\n */\r\n stepDown(n?: number): void;\r\n /**\r\n * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.\r\n * @param n Value to increment the value by.\r\n */\r\n stepUp(n?: number): void;\r\n}\r\n\r\ndeclare var HTMLInputElement: {\r\n prototype: HTMLInputElement;\r\n new(): HTMLInputElement;\r\n}\r\n\r\ninterface HTMLIsIndexElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the URL to which the form content is sent for processing.\r\n */\r\n action: string;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in. \r\n */\r\n form: HTMLFormElement;\r\n prompt: string;\r\n}\r\n\r\ndeclare var HTMLIsIndexElement: {\r\n prototype: HTMLIsIndexElement;\r\n new(): HTMLIsIndexElement;\r\n}\r\n\r\ninterface HTMLLIElement extends HTMLElement {\r\n type: string;\r\n /**\r\n * Sets or retrieves the value of a list item.\r\n */\r\n value: number;\r\n}\r\n\r\ndeclare var HTMLLIElement: {\r\n prototype: HTMLLIElement;\r\n new(): HTMLLIElement;\r\n}\r\n\r\ninterface HTMLLabelElement extends HTMLElement {\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the object to which the given label object is assigned.\r\n */\r\n htmlFor: string;\r\n}\r\n\r\ndeclare var HTMLLabelElement: {\r\n prototype: HTMLLabelElement;\r\n new(): HTMLLabelElement;\r\n}\r\n\r\ninterface HTMLLegendElement extends HTMLElement {\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n align: string;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n}\r\n\r\ndeclare var HTMLLegendElement: {\r\n prototype: HTMLLegendElement;\r\n new(): HTMLLegendElement;\r\n}\r\n\r\ninterface HTMLLinkElement extends HTMLElement, LinkStyle {\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n disabled: boolean;\r\n /**\r\n * Sets or retrieves a destination URL or an anchor point.\r\n */\r\n href: string;\r\n /**\r\n * Sets or retrieves the language code of the object.\r\n */\r\n hreflang: string;\r\n /**\r\n * Sets or retrieves the media type.\r\n */\r\n media: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rel: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rev: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Sets or retrieves the MIME type of the object.\r\n */\r\n type: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLLinkElement: {\r\n prototype: HTMLLinkElement;\r\n new(): HTMLLinkElement;\r\n}\r\n\r\ninterface HTMLMapElement extends HTMLElement {\r\n /**\r\n * Retrieves a collection of the area objects defined for the given map object.\r\n */\r\n areas: HTMLAreasCollection;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n}\r\n\r\ndeclare var HTMLMapElement: {\r\n prototype: HTMLMapElement;\r\n new(): HTMLMapElement;\r\n}\r\n\r\ninterface HTMLMarqueeElement extends HTMLElement {\r\n behavior: string;\r\n bgColor: any;\r\n direction: string;\r\n height: string;\r\n hspace: number;\r\n loop: number;\r\n onbounce: (ev: Event) => any;\r\n onfinish: (ev: Event) => any;\r\n onstart: (ev: Event) => any;\r\n scrollAmount: number;\r\n scrollDelay: number;\r\n trueSpeed: boolean;\r\n vspace: number;\r\n width: string;\r\n start(): void;\r\n stop(): void;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"bounce\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"finish\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"start\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLMarqueeElement: {\r\n prototype: HTMLMarqueeElement;\r\n new(): HTMLMarqueeElement;\r\n}\r\n\r\ninterface HTMLMediaElement extends HTMLElement {\r\n /**\r\n * Returns an AudioTrackList object with the audio tracks for a given video element.\r\n */\r\n audioTracks: AudioTrackList;\r\n /**\r\n * Gets or sets a value that indicates whether to start playing the media automatically.\r\n */\r\n autoplay: boolean;\r\n /**\r\n * Gets a collection of buffered time ranges.\r\n */\r\n buffered: TimeRanges;\r\n /**\r\n * Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).\r\n */\r\n controls: boolean;\r\n /**\r\n * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.\r\n */\r\n currentSrc: string;\r\n /**\r\n * Gets or sets the current playback position, in seconds.\r\n */\r\n currentTime: number;\r\n defaultMuted: boolean;\r\n /**\r\n * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.\r\n */\r\n defaultPlaybackRate: number;\r\n /**\r\n * Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.\r\n */\r\n duration: number;\r\n /**\r\n * Gets information about whether the playback has ended or not.\r\n */\r\n ended: boolean;\r\n /**\r\n * Returns an object representing the current error state of the audio or video element.\r\n */\r\n error: MediaError;\r\n /**\r\n * Gets or sets a flag to specify whether playback should restart after it completes.\r\n */\r\n loop: boolean;\r\n /**\r\n * Specifies the purpose of the audio or video media, such as background audio or alerts.\r\n */\r\n msAudioCategory: string;\r\n /**\r\n * Specifies the output device id that the audio will be sent to.\r\n */\r\n msAudioDeviceType: string;\r\n msGraphicsTrustStatus: MSGraphicsTrust;\r\n /**\r\n * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element.\r\n */\r\n msKeys: MSMediaKeys;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.\r\n */\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n msPlayToSource: any;\r\n /**\r\n * Specifies whether or not to enable low-latency playback on the media element.\r\n */\r\n msRealTime: boolean;\r\n /**\r\n * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.\r\n */\r\n muted: boolean;\r\n /**\r\n * Gets the current network activity for the element.\r\n */\r\n networkState: number;\r\n onmsneedkey: (ev: MSMediaKeyNeededEvent) => any;\r\n /**\r\n * Gets a flag that specifies whether playback is paused.\r\n */\r\n paused: boolean;\r\n /**\r\n * Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.\r\n */\r\n playbackRate: number;\r\n /**\r\n * Gets TimeRanges for the current media resource that has been played.\r\n */\r\n played: TimeRanges;\r\n /**\r\n * Gets or sets the current playback position, in seconds.\r\n */\r\n preload: string;\r\n readyState: number;\r\n /**\r\n * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.\r\n */\r\n seekable: TimeRanges;\r\n /**\r\n * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource.\r\n */\r\n seeking: boolean;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n textTracks: TextTrackList;\r\n videoTracks: VideoTrackList;\r\n /**\r\n * Gets or sets the volume level for audio portions of the media element.\r\n */\r\n volume: number;\r\n addTextTrack(kind: string, label?: string, language?: string): TextTrack;\r\n /**\r\n * Returns a string that specifies whether the client can play a given media resource type.\r\n */\r\n canPlayType(type: string): string;\r\n /**\r\n * Fires immediately after the client loads the object.\r\n */\r\n load(): void;\r\n /**\r\n * Clears all effects from the media pipeline.\r\n */\r\n msClearEffects(): void;\r\n msGetAsCastingSource(): any;\r\n /**\r\n * Inserts the specified audio effect into media pipeline.\r\n */\r\n msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;\r\n msSetMediaKeys(mediaKeys: MSMediaKeys): void;\r\n /**\r\n * Specifies the media protection manager for a given media pipeline.\r\n */\r\n msSetMediaProtectionManager(mediaProtectionManager?: any): void;\r\n /**\r\n * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.\r\n */\r\n pause(): void;\r\n /**\r\n * Loads and starts playback of a media resource.\r\n */\r\n play(): void;\r\n HAVE_CURRENT_DATA: number;\r\n HAVE_ENOUGH_DATA: number;\r\n HAVE_FUTURE_DATA: number;\r\n HAVE_METADATA: number;\r\n HAVE_NOTHING: number;\r\n NETWORK_EMPTY: number;\r\n NETWORK_IDLE: number;\r\n NETWORK_LOADING: number;\r\n NETWORK_NO_SOURCE: number;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"msneedkey\", listener: (ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLMediaElement: {\r\n prototype: HTMLMediaElement;\r\n new(): HTMLMediaElement;\r\n HAVE_CURRENT_DATA: number;\r\n HAVE_ENOUGH_DATA: number;\r\n HAVE_FUTURE_DATA: number;\r\n HAVE_METADATA: number;\r\n HAVE_NOTHING: number;\r\n NETWORK_EMPTY: number;\r\n NETWORK_IDLE: number;\r\n NETWORK_LOADING: number;\r\n NETWORK_NO_SOURCE: number;\r\n}\r\n\r\ninterface HTMLMenuElement extends HTMLElement {\r\n compact: boolean;\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLMenuElement: {\r\n prototype: HTMLMenuElement;\r\n new(): HTMLMenuElement;\r\n}\r\n\r\ninterface HTMLMetaElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Gets or sets meta-information to associate with httpEquiv or name.\r\n */\r\n content: string;\r\n /**\r\n * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.\r\n */\r\n httpEquiv: string;\r\n /**\r\n * Sets or retrieves the value specified in the content attribute of the meta object.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.\r\n */\r\n scheme: string;\r\n /**\r\n * Sets or retrieves the URL property that will be loaded after the specified time has elapsed. \r\n */\r\n url: string;\r\n}\r\n\r\ndeclare var HTMLMetaElement: {\r\n prototype: HTMLMetaElement;\r\n new(): HTMLMetaElement;\r\n}\r\n\r\ninterface HTMLModElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n /**\r\n * Sets or retrieves the date and time of a modification to the object.\r\n */\r\n dateTime: string;\r\n}\r\n\r\ndeclare var HTMLModElement: {\r\n prototype: HTMLModElement;\r\n new(): HTMLModElement;\r\n}\r\n\r\ninterface HTMLNextIdElement extends HTMLElement {\r\n n: string;\r\n}\r\n\r\ndeclare var HTMLNextIdElement: {\r\n prototype: HTMLNextIdElement;\r\n new(): HTMLNextIdElement;\r\n}\r\n\r\ninterface HTMLOListElement extends HTMLElement {\r\n compact: boolean;\r\n /**\r\n * The starting number.\r\n */\r\n start: number;\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLOListElement: {\r\n prototype: HTMLOListElement;\r\n new(): HTMLOListElement;\r\n}\r\n\r\ninterface HTMLObjectElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.\r\n */\r\n BaseHref: string;\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Gets or sets the optional alternative HTML script to execute if the object fails to load.\r\n */\r\n altHtml: string;\r\n /**\r\n * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.\r\n */\r\n archive: string;\r\n border: string;\r\n /**\r\n * Sets or retrieves the URL of the file containing the compiled Java class.\r\n */\r\n code: string;\r\n /**\r\n * Sets or retrieves the URL of the component.\r\n */\r\n codeBase: string;\r\n /**\r\n * Sets or retrieves the Internet media type for the code associated with the object.\r\n */\r\n codeType: string;\r\n /**\r\n * Retrieves the document object of the page or frame.\r\n */\r\n contentDocument: Document;\r\n /**\r\n * Sets or retrieves the URL that references the data of the object.\r\n */\r\n data: string;\r\n declare: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n hspace: number;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.\r\n */\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n msPlayToSource: any;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Retrieves the contained object.\r\n */\r\n object: any;\r\n readyState: number;\r\n /**\r\n * Sets or retrieves a message to be displayed while an object is loading.\r\n */\r\n standby: string;\r\n /**\r\n * Sets or retrieves the MIME type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n vspace: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLObjectElement: {\r\n prototype: HTMLObjectElement;\r\n new(): HTMLObjectElement;\r\n}\r\n\r\ninterface HTMLOptGroupElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the status of an option.\r\n */\r\n defaultSelected: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the ordinal position of an option in a list box.\r\n */\r\n index: number;\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own label functionality for the object.\r\n */\r\n label: string;\r\n /**\r\n * Sets or retrieves whether the option in the list box is the default item.\r\n */\r\n selected: boolean;\r\n /**\r\n * Sets or retrieves the text string specified by the option tag.\r\n */\r\n text: string;\r\n /**\r\n * Sets or retrieves the value which is returned to the server when the form control is submitted.\r\n */\r\n value: string;\r\n}\r\n\r\ndeclare var HTMLOptGroupElement: {\r\n prototype: HTMLOptGroupElement;\r\n new(): HTMLOptGroupElement;\r\n}\r\n\r\ninterface HTMLOptionElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the status of an option.\r\n */\r\n defaultSelected: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the ordinal position of an option in a list box.\r\n */\r\n index: number;\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own label functionality for the object.\r\n */\r\n label: string;\r\n /**\r\n * Sets or retrieves whether the option in the list box is the default item.\r\n */\r\n selected: boolean;\r\n /**\r\n * Sets or retrieves the text string specified by the option tag.\r\n */\r\n text: string;\r\n /**\r\n * Sets or retrieves the value which is returned to the server when the form control is submitted.\r\n */\r\n value: string;\r\n}\r\n\r\ndeclare var HTMLOptionElement: {\r\n prototype: HTMLOptionElement;\r\n new(): HTMLOptionElement;\r\n create(): HTMLOptionElement;\r\n}\r\n\r\ninterface HTMLParagraphElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text. \r\n */\r\n align: string;\r\n clear: string;\r\n}\r\n\r\ndeclare var HTMLParagraphElement: {\r\n prototype: HTMLParagraphElement;\r\n new(): HTMLParagraphElement;\r\n}\r\n\r\ninterface HTMLParamElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the name of an input parameter for an element.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves the content type of the resource designated by the value attribute.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the value of an input parameter for an element.\r\n */\r\n value: string;\r\n /**\r\n * Sets or retrieves the data type of the value attribute.\r\n */\r\n valueType: string;\r\n}\r\n\r\ndeclare var HTMLParamElement: {\r\n prototype: HTMLParamElement;\r\n new(): HTMLParamElement;\r\n}\r\n\r\ninterface HTMLPhraseElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n /**\r\n * Sets or retrieves the date and time of a modification to the object.\r\n */\r\n dateTime: string;\r\n}\r\n\r\ndeclare var HTMLPhraseElement: {\r\n prototype: HTMLPhraseElement;\r\n new(): HTMLPhraseElement;\r\n}\r\n\r\ninterface HTMLPreElement extends HTMLElement {\r\n /**\r\n * Indicates a citation by rendering text in italic type.\r\n */\r\n cite: string;\r\n clear: string;\r\n /**\r\n * Sets or gets a value that you can use to implement your own width functionality for the object.\r\n */\r\n width: number;\r\n}\r\n\r\ndeclare var HTMLPreElement: {\r\n prototype: HTMLPreElement;\r\n new(): HTMLPreElement;\r\n}\r\n\r\ninterface HTMLProgressElement extends HTMLElement {\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Defines the maximum, or \"done\" value for a progress element.\r\n */\r\n max: number;\r\n /**\r\n * Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).\r\n */\r\n position: number;\r\n /**\r\n * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.\r\n */\r\n value: number;\r\n}\r\n\r\ndeclare var HTMLProgressElement: {\r\n prototype: HTMLProgressElement;\r\n new(): HTMLProgressElement;\r\n}\r\n\r\ninterface HTMLQuoteElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n /**\r\n * Sets or retrieves the date and time of a modification to the object.\r\n */\r\n dateTime: string;\r\n}\r\n\r\ndeclare var HTMLQuoteElement: {\r\n prototype: HTMLQuoteElement;\r\n new(): HTMLQuoteElement;\r\n}\r\n\r\ninterface HTMLScriptElement extends HTMLElement {\r\n async: boolean;\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Sets or retrieves the status of the script.\r\n */\r\n defer: boolean;\r\n /**\r\n * Sets or retrieves the event for which the script is written. \r\n */\r\n event: string;\r\n /** \r\n * Sets or retrieves the object that is bound to the event script.\r\n */\r\n htmlFor: string;\r\n /**\r\n * Retrieves the URL to an external file that contains the source code or data.\r\n */\r\n src: string;\r\n /**\r\n * Retrieves or sets the text of the object as a string. \r\n */\r\n text: string;\r\n /**\r\n * Sets or retrieves the MIME type for the associated scripting engine.\r\n */\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLScriptElement: {\r\n prototype: HTMLScriptElement;\r\n new(): HTMLScriptElement;\r\n}\r\n\r\ninterface HTMLSelectElement extends HTMLElement {\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in. \r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the number of objects in a collection.\r\n */\r\n length: number;\r\n /**\r\n * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.\r\n */\r\n multiple: boolean;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n options: HTMLCollection;\r\n /**\r\n * When present, marks an element that can't be submitted without a value.\r\n */\r\n required: boolean;\r\n /**\r\n * Sets or retrieves the index of the selected option in a select object.\r\n */\r\n selectedIndex: number;\r\n /**\r\n * Sets or retrieves the number of rows in the list box. \r\n */\r\n size: number;\r\n /**\r\n * Retrieves the type of select control based on the value of the MULTIPLE attribute.\r\n */\r\n type: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /**\r\n * Sets or retrieves the value which is returned to the server when the form control is submitted.\r\n */\r\n value: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n selectedOptions: HTMLCollection;\r\n /**\r\n * Adds an element to the areas, controlRange, or options collection.\r\n * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.\r\n * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection. \r\n */\r\n add(element: HTMLElement, before?: HTMLElement | number): void;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Retrieves a select object or an object from an options collection.\r\n * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.\r\n * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.\r\n */\r\n item(name?: any, index?: any): any;\r\n /**\r\n * Retrieves a select object or an object from an options collection.\r\n * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.\r\n */\r\n namedItem(name: string): any;\r\n /**\r\n * Removes an element from the collection.\r\n * @param index Number that specifies the zero-based index of the element to remove from the collection.\r\n */\r\n remove(index?: number): void;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n [name: string]: any;\r\n}\r\n\r\ndeclare var HTMLSelectElement: {\r\n prototype: HTMLSelectElement;\r\n new(): HTMLSelectElement;\r\n}\r\n\r\ninterface HTMLSourceElement extends HTMLElement {\r\n /**\r\n * Gets or sets the intended media type of the media source.\r\n */\r\n media: string;\r\n msKeySystem: string;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n /**\r\n * Gets or sets the MIME type of a media resource.\r\n */\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLSourceElement: {\r\n prototype: HTMLSourceElement;\r\n new(): HTMLSourceElement;\r\n}\r\n\r\ninterface HTMLSpanElement extends HTMLElement {\r\n}\r\n\r\ndeclare var HTMLSpanElement: {\r\n prototype: HTMLSpanElement;\r\n new(): HTMLSpanElement;\r\n}\r\n\r\ninterface HTMLStyleElement extends HTMLElement, LinkStyle {\r\n /**\r\n * Sets or retrieves the media type.\r\n */\r\n media: string;\r\n /**\r\n * Retrieves the CSS language in which the style sheet is written.\r\n */\r\n type: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLStyleElement: {\r\n prototype: HTMLStyleElement;\r\n new(): HTMLStyleElement;\r\n}\r\n\r\ninterface HTMLTableCaptionElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the alignment of the caption or legend.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves whether the caption appears at the top or bottom of the table.\r\n */\r\n vAlign: string;\r\n}\r\n\r\ndeclare var HTMLTableCaptionElement: {\r\n prototype: HTMLTableCaptionElement;\r\n new(): HTMLTableCaptionElement;\r\n}\r\n\r\ninterface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves abbreviated text for the object.\r\n */\r\n abbr: string;\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves a comma-delimited list of conceptual categories associated with the object.\r\n */\r\n axis: string;\r\n bgColor: any;\r\n /**\r\n * Retrieves the position of the object in the cells collection of a row.\r\n */\r\n cellIndex: number;\r\n /**\r\n * Sets or retrieves the number columns in the table that the object should span.\r\n */\r\n colSpan: number;\r\n /**\r\n * Sets or retrieves a list of header cells that provide information for the object.\r\n */\r\n headers: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n /**\r\n * Sets or retrieves how many rows in a table the cell should span.\r\n */\r\n rowSpan: number;\r\n /**\r\n * Sets or retrieves the group of cells in a table to which the object's information applies.\r\n */\r\n scope: string;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableCellElement: {\r\n prototype: HTMLTableCellElement;\r\n new(): HTMLTableCellElement;\r\n}\r\n\r\ninterface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves the alignment of the object relative to the display or table.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves the number of columns in the group.\r\n */\r\n span: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: any;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableColElement: {\r\n prototype: HTMLTableColElement;\r\n new(): HTMLTableColElement;\r\n}\r\n\r\ninterface HTMLTableDataCellElement extends HTMLTableCellElement {\r\n}\r\n\r\ndeclare var HTMLTableDataCellElement: {\r\n prototype: HTMLTableDataCellElement;\r\n new(): HTMLTableDataCellElement;\r\n}\r\n\r\ninterface HTMLTableElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a value that indicates the table alignment.\r\n */\r\n align: string;\r\n bgColor: any;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n border: string;\r\n /**\r\n * Sets or retrieves the border color of the object. \r\n */\r\n borderColor: any;\r\n /**\r\n * Retrieves the caption object of a table.\r\n */\r\n caption: HTMLTableCaptionElement;\r\n /**\r\n * Sets or retrieves the amount of space between the border of the cell and the content of the cell.\r\n */\r\n cellPadding: string;\r\n /**\r\n * Sets or retrieves the amount of space between cells in a table.\r\n */\r\n cellSpacing: string;\r\n /**\r\n * Sets or retrieves the number of columns in the table.\r\n */\r\n cols: number;\r\n /**\r\n * Sets or retrieves the way the border frame around the table is displayed.\r\n */\r\n frame: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Sets or retrieves the number of horizontal rows contained in the object.\r\n */\r\n rows: HTMLCollection;\r\n /**\r\n * Sets or retrieves which dividing lines (inner borders) are displayed.\r\n */\r\n rules: string;\r\n /**\r\n * Sets or retrieves a description and/or structure of the object.\r\n */\r\n summary: string;\r\n /**\r\n * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.\r\n */\r\n tBodies: HTMLCollection;\r\n /**\r\n * Retrieves the tFoot object of the table.\r\n */\r\n tFoot: HTMLTableSectionElement;\r\n /**\r\n * Retrieves the tHead object of the table.\r\n */\r\n tHead: HTMLTableSectionElement;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Creates an empty caption element in the table.\r\n */\r\n createCaption(): HTMLTableCaptionElement;\r\n /**\r\n * Creates an empty tBody element in the table.\r\n */\r\n createTBody(): HTMLTableSectionElement;\r\n /**\r\n * Creates an empty tFoot element in the table.\r\n */\r\n createTFoot(): HTMLTableSectionElement;\r\n /**\r\n * Returns the tHead element object if successful, or null otherwise.\r\n */\r\n createTHead(): HTMLTableSectionElement;\r\n /**\r\n * Deletes the caption element and its contents from the table.\r\n */\r\n deleteCaption(): void;\r\n /**\r\n * Removes the specified row (tr) from the element and from the rows collection.\r\n * @param index Number that specifies the zero-based position in the rows collection of the row to remove.\r\n */\r\n deleteRow(index?: number): void;\r\n /**\r\n * Deletes the tFoot element and its contents from the table.\r\n */\r\n deleteTFoot(): void;\r\n /**\r\n * Deletes the tHead element and its contents from the table.\r\n */\r\n deleteTHead(): void;\r\n /**\r\n * Creates a new row (tr) in the table, and adds the row to the rows collection.\r\n * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.\r\n */\r\n insertRow(index?: number): HTMLTableRowElement;\r\n}\r\n\r\ndeclare var HTMLTableElement: {\r\n prototype: HTMLTableElement;\r\n new(): HTMLTableElement;\r\n}\r\n\r\ninterface HTMLTableHeaderCellElement extends HTMLTableCellElement {\r\n /**\r\n * Sets or retrieves the group of cells in a table to which the object's information applies.\r\n */\r\n scope: string;\r\n}\r\n\r\ndeclare var HTMLTableHeaderCellElement: {\r\n prototype: HTMLTableHeaderCellElement;\r\n new(): HTMLTableHeaderCellElement;\r\n}\r\n\r\ninterface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n bgColor: any;\r\n /**\r\n * Retrieves a collection of all cells in the table row.\r\n */\r\n cells: HTMLCollection;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Retrieves the position of the object in the rows collection for the table.\r\n */\r\n rowIndex: number;\r\n /**\r\n * Retrieves the position of the object in the collection.\r\n */\r\n sectionRowIndex: number;\r\n /**\r\n * Removes the specified cell from the table row, as well as from the cells collection.\r\n * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.\r\n */\r\n deleteCell(index?: number): void;\r\n /**\r\n * Creates a new cell in the table row, and adds the cell to the cells collection.\r\n * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.\r\n */\r\n insertCell(index?: number): HTMLTableCellElement;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableRowElement: {\r\n prototype: HTMLTableRowElement;\r\n new(): HTMLTableRowElement;\r\n}\r\n\r\ninterface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves a value that indicates the table alignment.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves the number of horizontal rows contained in the object.\r\n */\r\n rows: HTMLCollection;\r\n /**\r\n * Removes the specified row (tr) from the element and from the rows collection.\r\n * @param index Number that specifies the zero-based position in the rows collection of the row to remove.\r\n */\r\n deleteRow(index?: number): void;\r\n /**\r\n * Creates a new row (tr) in the table, and adds the row to the rows collection.\r\n * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.\r\n */\r\n insertRow(index?: number): HTMLTableRowElement;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableSectionElement: {\r\n prototype: HTMLTableSectionElement;\r\n new(): HTMLTableSectionElement;\r\n}\r\n\r\ninterface HTMLTextAreaElement extends HTMLElement {\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n cols: number;\r\n /**\r\n * Sets or retrieves the initial contents of the object.\r\n */\r\n defaultValue: string;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the maximum number of characters that the user can enter in a text control.\r\n */\r\n maxLength: number;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.\r\n */\r\n placeholder: string;\r\n /**\r\n * Sets or retrieves the value indicated whether the content of the object is read-only.\r\n */\r\n readOnly: boolean;\r\n /**\r\n * When present, marks an element that can't be submitted without a value.\r\n */\r\n required: boolean;\r\n /**\r\n * Sets or retrieves the number of horizontal rows contained in the object.\r\n */\r\n rows: number;\r\n /**\r\n * Gets or sets the end position or offset of a text selection.\r\n */\r\n selectionEnd: number;\r\n /**\r\n * Gets or sets the starting position or offset of a text selection.\r\n */\r\n selectionStart: number;\r\n /**\r\n * Sets or retrieves the value indicating whether the control is selected.\r\n */\r\n status: any;\r\n /**\r\n * Retrieves the type of control.\r\n */\r\n type: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /**\r\n * Retrieves or sets the text in the entry field of the textArea element.\r\n */\r\n value: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Sets or retrieves how to handle wordwrapping in the object.\r\n */\r\n wrap: string;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Creates a TextRange object for the element.\r\n */\r\n createTextRange(): TextRange;\r\n /**\r\n * Highlights the input area of a form element.\r\n */\r\n select(): void;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n /**\r\n * Sets the start and end positions of a selection in a text field.\r\n * @param start The offset into the text field for the start of the selection.\r\n * @param end The offset into the text field for the end of the selection.\r\n */\r\n setSelectionRange(start: number, end: number): void;\r\n}\r\n\r\ndeclare var HTMLTextAreaElement: {\r\n prototype: HTMLTextAreaElement;\r\n new(): HTMLTextAreaElement;\r\n}\r\n\r\ninterface HTMLTitleElement extends HTMLElement {\r\n /**\r\n * Retrieves or sets the text of the object as a string. \r\n */\r\n text: string;\r\n}\r\n\r\ndeclare var HTMLTitleElement: {\r\n prototype: HTMLTitleElement;\r\n new(): HTMLTitleElement;\r\n}\r\n\r\ninterface HTMLTrackElement extends HTMLElement {\r\n default: boolean;\r\n kind: string;\r\n label: string;\r\n readyState: number;\r\n src: string;\r\n srclang: string;\r\n track: TextTrack;\r\n ERROR: number;\r\n LOADED: number;\r\n LOADING: number;\r\n NONE: number;\r\n}\r\n\r\ndeclare var HTMLTrackElement: {\r\n prototype: HTMLTrackElement;\r\n new(): HTMLTrackElement;\r\n ERROR: number;\r\n LOADED: number;\r\n LOADING: number;\r\n NONE: number;\r\n}\r\n\r\ninterface HTMLUListElement extends HTMLElement {\r\n compact: boolean;\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLUListElement: {\r\n prototype: HTMLUListElement;\r\n new(): HTMLUListElement;\r\n}\r\n\r\ninterface HTMLUnknownElement extends HTMLElement {\r\n}\r\n\r\ndeclare var HTMLUnknownElement: {\r\n prototype: HTMLUnknownElement;\r\n new(): HTMLUnknownElement;\r\n}\r\n\r\ninterface HTMLVideoElement extends HTMLMediaElement {\r\n /**\r\n * Gets or sets the height of the video element.\r\n */\r\n height: number;\r\n msHorizontalMirror: boolean;\r\n msIsLayoutOptimalForPlayback: boolean;\r\n msIsStereo3D: boolean;\r\n msStereo3DPackingMode: string;\r\n msStereo3DRenderMode: string;\r\n msZoom: boolean;\r\n onMSVideoFormatChanged: (ev: Event) => any;\r\n onMSVideoFrameStepCompleted: (ev: Event) => any;\r\n onMSVideoOptimalLayoutChanged: (ev: Event) => any;\r\n /**\r\n * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.\r\n */\r\n poster: string;\r\n /**\r\n * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.\r\n */\r\n videoHeight: number;\r\n /**\r\n * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.\r\n */\r\n videoWidth: number;\r\n webkitDisplayingFullscreen: boolean;\r\n webkitSupportsFullscreen: boolean;\r\n /**\r\n * Gets or sets the width of the video element.\r\n */\r\n width: number;\r\n getVideoPlaybackQuality(): VideoPlaybackQuality;\r\n msFrameStep(forward: boolean): void;\r\n msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;\r\n msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void;\r\n webkitEnterFullScreen(): void;\r\n webkitEnterFullscreen(): void;\r\n webkitExitFullScreen(): void;\r\n webkitExitFullscreen(): void;\r\n addEventListener(type: \"MSContentZoom\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSVideoFormatChanged\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSVideoFrameStepCompleted\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSVideoOptimalLayoutChanged\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"msneedkey\", listener: (ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLVideoElement: {\r\n prototype: HTMLVideoElement;\r\n new(): HTMLVideoElement;\r\n}\r\n\r\ninterface HashChangeEvent extends Event {\r\n newURL: string;\r\n oldURL: string;\r\n}\r\n\r\ndeclare var HashChangeEvent: {\r\n prototype: HashChangeEvent;\r\n new(type: string, eventInitDict?: HashChangeEventInit): HashChangeEvent;\r\n}\r\n\r\ninterface History {\r\n length: number;\r\n state: any;\r\n back(distance?: any): void;\r\n forward(distance?: any): void;\r\n go(delta?: any): void;\r\n pushState(statedata: any, title?: string, url?: string): void;\r\n replaceState(statedata: any, title?: string, url?: string): void;\r\n}\r\n\r\ndeclare var History: {\r\n prototype: History;\r\n new(): History;\r\n}\r\n\r\ninterface IDBCursor {\r\n direction: string;\r\n key: any;\r\n primaryKey: any;\r\n source: any;\r\n advance(count: number): void;\r\n continue(key?: any): void;\r\n delete(): IDBRequest;\r\n update(value: any): IDBRequest;\r\n NEXT: string;\r\n NEXT_NO_DUPLICATE: string;\r\n PREV: string;\r\n PREV_NO_DUPLICATE: string;\r\n}\r\n\r\ndeclare var IDBCursor: {\r\n prototype: IDBCursor;\r\n new(): IDBCursor;\r\n NEXT: string;\r\n NEXT_NO_DUPLICATE: string;\r\n PREV: string;\r\n PREV_NO_DUPLICATE: string;\r\n}\r\n\r\ninterface IDBCursorWithValue extends IDBCursor {\r\n value: any;\r\n}\r\n\r\ndeclare var IDBCursorWithValue: {\r\n prototype: IDBCursorWithValue;\r\n new(): IDBCursorWithValue;\r\n}\r\n\r\ninterface IDBDatabase extends EventTarget {\r\n name: string;\r\n objectStoreNames: DOMStringList;\r\n onabort: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n version: number;\r\n close(): void;\r\n createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;\r\n deleteObjectStore(name: string): void;\r\n transaction(storeNames: any, mode?: string): IDBTransaction;\r\n addEventListener(type: \"abort\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBDatabase: {\r\n prototype: IDBDatabase;\r\n new(): IDBDatabase;\r\n}\r\n\r\ninterface IDBFactory {\r\n cmp(first: any, second: any): number;\r\n deleteDatabase(name: string): IDBOpenDBRequest;\r\n open(name: string, version?: number): IDBOpenDBRequest;\r\n}\r\n\r\ndeclare var IDBFactory: {\r\n prototype: IDBFactory;\r\n new(): IDBFactory;\r\n}\r\n\r\ninterface IDBIndex {\r\n keyPath: string | string[];\r\n name: string;\r\n objectStore: IDBObjectStore;\r\n unique: boolean;\r\n multiEntry: boolean;\r\n count(key?: any): IDBRequest;\r\n get(key: any): IDBRequest;\r\n getKey(key: any): IDBRequest;\r\n openCursor(range?: IDBKeyRange, direction?: string): IDBRequest;\r\n openKeyCursor(range?: IDBKeyRange, direction?: string): IDBRequest;\r\n}\r\n\r\ndeclare var IDBIndex: {\r\n prototype: IDBIndex;\r\n new(): IDBIndex;\r\n}\r\n\r\ninterface IDBKeyRange {\r\n lower: any;\r\n lowerOpen: boolean;\r\n upper: any;\r\n upperOpen: boolean;\r\n}\r\n\r\ndeclare var IDBKeyRange: {\r\n prototype: IDBKeyRange;\r\n new(): IDBKeyRange;\r\n bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;\r\n lowerBound(bound: any, open?: boolean): IDBKeyRange;\r\n only(value: any): IDBKeyRange;\r\n upperBound(bound: any, open?: boolean): IDBKeyRange;\r\n}\r\n\r\ninterface IDBObjectStore {\r\n indexNames: DOMStringList;\r\n keyPath: string;\r\n name: string;\r\n transaction: IDBTransaction;\r\n add(value: any, key?: any): IDBRequest;\r\n clear(): IDBRequest;\r\n count(key?: any): IDBRequest;\r\n createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;\r\n delete(key: any): IDBRequest;\r\n deleteIndex(indexName: string): void;\r\n get(key: any): IDBRequest;\r\n index(name: string): IDBIndex;\r\n openCursor(range?: any, direction?: string): IDBRequest;\r\n put(value: any, key?: any): IDBRequest;\r\n}\r\n\r\ndeclare var IDBObjectStore: {\r\n prototype: IDBObjectStore;\r\n new(): IDBObjectStore;\r\n}\r\n\r\ninterface IDBOpenDBRequest extends IDBRequest {\r\n onblocked: (ev: Event) => any;\r\n onupgradeneeded: (ev: IDBVersionChangeEvent) => any;\r\n addEventListener(type: \"blocked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"success\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"upgradeneeded\", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBOpenDBRequest: {\r\n prototype: IDBOpenDBRequest;\r\n new(): IDBOpenDBRequest;\r\n}\r\n\r\ninterface IDBRequest extends EventTarget {\r\n error: DOMError;\r\n onerror: (ev: Event) => any;\r\n onsuccess: (ev: Event) => any;\r\n readyState: string;\r\n result: any;\r\n source: any;\r\n transaction: IDBTransaction;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"success\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBRequest: {\r\n prototype: IDBRequest;\r\n new(): IDBRequest;\r\n}\r\n\r\ninterface IDBTransaction extends EventTarget {\r\n db: IDBDatabase;\r\n error: DOMError;\r\n mode: string;\r\n onabort: (ev: Event) => any;\r\n oncomplete: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n abort(): void;\r\n objectStore(name: string): IDBObjectStore;\r\n READ_ONLY: string;\r\n READ_WRITE: string;\r\n VERSION_CHANGE: string;\r\n addEventListener(type: \"abort\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"complete\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBTransaction: {\r\n prototype: IDBTransaction;\r\n new(): IDBTransaction;\r\n READ_ONLY: string;\r\n READ_WRITE: string;\r\n VERSION_CHANGE: string;\r\n}\r\n\r\ninterface IDBVersionChangeEvent extends Event {\r\n newVersion: number;\r\n oldVersion: number;\r\n}\r\n\r\ndeclare var IDBVersionChangeEvent: {\r\n prototype: IDBVersionChangeEvent;\r\n new(): IDBVersionChangeEvent;\r\n}\r\n\r\ninterface ImageData {\r\n data: Uint8ClampedArray;\r\n height: number;\r\n width: number;\r\n}\r\n\r\ndeclare var ImageData: {\r\n prototype: ImageData;\r\n new(width: number, height: number): ImageData;\r\n new(array: Uint8ClampedArray, width: number, height: number): ImageData;\r\n}\r\n\r\ninterface KeyboardEvent extends UIEvent {\r\n altKey: boolean;\r\n char: string;\r\n charCode: number;\r\n ctrlKey: boolean;\r\n key: string;\r\n keyCode: number;\r\n locale: string;\r\n location: number;\r\n metaKey: boolean;\r\n repeat: boolean;\r\n shiftKey: boolean;\r\n which: number;\r\n getModifierState(keyArg: string): boolean;\r\n initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void;\r\n DOM_KEY_LOCATION_JOYSTICK: number;\r\n DOM_KEY_LOCATION_LEFT: number;\r\n DOM_KEY_LOCATION_MOBILE: number;\r\n DOM_KEY_LOCATION_NUMPAD: number;\r\n DOM_KEY_LOCATION_RIGHT: number;\r\n DOM_KEY_LOCATION_STANDARD: number;\r\n}\r\n\r\ndeclare var KeyboardEvent: {\r\n prototype: KeyboardEvent;\r\n new(typeArg: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;\r\n DOM_KEY_LOCATION_JOYSTICK: number;\r\n DOM_KEY_LOCATION_LEFT: number;\r\n DOM_KEY_LOCATION_MOBILE: number;\r\n DOM_KEY_LOCATION_NUMPAD: number;\r\n DOM_KEY_LOCATION_RIGHT: number;\r\n DOM_KEY_LOCATION_STANDARD: number;\r\n}\r\n\r\ninterface Location {\r\n hash: string;\r\n host: string;\r\n hostname: string;\r\n href: string;\r\n origin: string;\r\n pathname: string;\r\n port: string;\r\n protocol: string;\r\n search: string;\r\n assign(url: string): void;\r\n reload(forcedReload?: boolean): void;\r\n replace(url: string): void;\r\n toString(): string;\r\n}\r\n\r\ndeclare var Location: {\r\n prototype: Location;\r\n new(): Location;\r\n}\r\n\r\ninterface LongRunningScriptDetectedEvent extends Event {\r\n executionTime: number;\r\n stopPageScriptExecution: boolean;\r\n}\r\n\r\ndeclare var LongRunningScriptDetectedEvent: {\r\n prototype: LongRunningScriptDetectedEvent;\r\n new(): LongRunningScriptDetectedEvent;\r\n}\r\n\r\ninterface MSApp {\r\n clearTemporaryWebDataAsync(): MSAppAsyncOperation;\r\n createBlobFromRandomAccessStream(type: string, seeker: any): Blob;\r\n createDataPackage(object: any): any;\r\n createDataPackageFromSelection(): any;\r\n createFileFromStorageFile(storageFile: any): File;\r\n createStreamFromInputStream(type: string, inputStream: any): MSStream;\r\n execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;\r\n execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;\r\n getCurrentPriority(): string;\r\n getHtmlPrintDocumentSourceAsync(htmlDoc: any): any;\r\n getViewId(view: any): any;\r\n isTaskScheduledAtPriorityOrHigher(priority: string): boolean;\r\n pageHandlesAllApplicationActivations(enabled: boolean): void;\r\n suppressSubdownloadCredentialPrompts(suppress: boolean): void;\r\n terminateApp(exceptionObject: any): void;\r\n CURRENT: string;\r\n HIGH: string;\r\n IDLE: string;\r\n NORMAL: string;\r\n}\r\ndeclare var MSApp: MSApp;\r\n\r\ninterface MSAppAsyncOperation extends EventTarget {\r\n error: DOMError;\r\n oncomplete: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n readyState: number;\r\n result: any;\r\n start(): void;\r\n COMPLETED: number;\r\n ERROR: number;\r\n STARTED: number;\r\n addEventListener(type: \"complete\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSAppAsyncOperation: {\r\n prototype: MSAppAsyncOperation;\r\n new(): MSAppAsyncOperation;\r\n COMPLETED: number;\r\n ERROR: number;\r\n STARTED: number;\r\n}\r\n\r\ninterface MSBlobBuilder {\r\n append(data: any, endings?: string): void;\r\n getBlob(contentType?: string): Blob;\r\n}\r\n\r\ndeclare var MSBlobBuilder: {\r\n prototype: MSBlobBuilder;\r\n new(): MSBlobBuilder;\r\n}\r\n\r\ninterface MSCSSMatrix {\r\n a: number;\r\n b: number;\r\n c: number;\r\n d: number;\r\n e: number;\r\n f: number;\r\n m11: number;\r\n m12: number;\r\n m13: number;\r\n m14: number;\r\n m21: number;\r\n m22: number;\r\n m23: number;\r\n m24: number;\r\n m31: number;\r\n m32: number;\r\n m33: number;\r\n m34: number;\r\n m41: number;\r\n m42: number;\r\n m43: number;\r\n m44: number;\r\n inverse(): MSCSSMatrix;\r\n multiply(secondMatrix: MSCSSMatrix): MSCSSMatrix;\r\n rotate(angleX: number, angleY?: number, angleZ?: number): MSCSSMatrix;\r\n rotateAxisAngle(x: number, y: number, z: number, angle: number): MSCSSMatrix;\r\n scale(scaleX: number, scaleY?: number, scaleZ?: number): MSCSSMatrix;\r\n setMatrixValue(value: string): void;\r\n skewX(angle: number): MSCSSMatrix;\r\n skewY(angle: number): MSCSSMatrix;\r\n toString(): string;\r\n translate(x: number, y: number, z?: number): MSCSSMatrix;\r\n}\r\n\r\ndeclare var MSCSSMatrix: {\r\n prototype: MSCSSMatrix;\r\n new(text?: string): MSCSSMatrix;\r\n}\r\n\r\ninterface MSGesture {\r\n target: Element;\r\n addPointer(pointerId: number): void;\r\n stop(): void;\r\n}\r\n\r\ndeclare var MSGesture: {\r\n prototype: MSGesture;\r\n new(): MSGesture;\r\n}\r\n\r\ninterface MSGestureEvent extends UIEvent {\r\n clientX: number;\r\n clientY: number;\r\n expansion: number;\r\n gestureObject: any;\r\n hwTimestamp: number;\r\n offsetX: number;\r\n offsetY: number;\r\n rotation: number;\r\n scale: number;\r\n screenX: number;\r\n screenY: number;\r\n translationX: number;\r\n translationY: number;\r\n velocityAngular: number;\r\n velocityExpansion: number;\r\n velocityX: number;\r\n velocityY: number;\r\n initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void;\r\n MSGESTURE_FLAG_BEGIN: number;\r\n MSGESTURE_FLAG_CANCEL: number;\r\n MSGESTURE_FLAG_END: number;\r\n MSGESTURE_FLAG_INERTIA: number;\r\n MSGESTURE_FLAG_NONE: number;\r\n}\r\n\r\ndeclare var MSGestureEvent: {\r\n prototype: MSGestureEvent;\r\n new(): MSGestureEvent;\r\n MSGESTURE_FLAG_BEGIN: number;\r\n MSGESTURE_FLAG_CANCEL: number;\r\n MSGESTURE_FLAG_END: number;\r\n MSGESTURE_FLAG_INERTIA: number;\r\n MSGESTURE_FLAG_NONE: number;\r\n}\r\n\r\ninterface MSGraphicsTrust {\r\n constrictionActive: boolean;\r\n status: string;\r\n}\r\n\r\ndeclare var MSGraphicsTrust: {\r\n prototype: MSGraphicsTrust;\r\n new(): MSGraphicsTrust;\r\n}\r\n\r\ninterface MSHTMLWebViewElement extends HTMLElement {\r\n canGoBack: boolean;\r\n canGoForward: boolean;\r\n containsFullScreenElement: boolean;\r\n documentTitle: string;\r\n height: number;\r\n settings: MSWebViewSettings;\r\n src: string;\r\n width: number;\r\n addWebAllowedObject(name: string, applicationObject: any): void;\r\n buildLocalStreamUri(contentIdentifier: string, relativePath: string): string;\r\n capturePreviewToBlobAsync(): MSWebViewAsyncOperation;\r\n captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation;\r\n getDeferredPermissionRequestById(id: number): DeferredPermissionRequest;\r\n getDeferredPermissionRequests(): DeferredPermissionRequest[];\r\n goBack(): void;\r\n goForward(): void;\r\n invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation;\r\n navigate(uri: string): void;\r\n navigateToLocalStreamUri(source: string, streamResolver: any): void;\r\n navigateToString(contents: string): void;\r\n navigateWithHttpRequestMessage(requestMessage: any): void;\r\n refresh(): void;\r\n stop(): void;\r\n}\r\n\r\ndeclare var MSHTMLWebViewElement: {\r\n prototype: MSHTMLWebViewElement;\r\n new(): MSHTMLWebViewElement;\r\n}\r\n\r\ninterface MSInputMethodContext extends EventTarget {\r\n compositionEndOffset: number;\r\n compositionStartOffset: number;\r\n oncandidatewindowhide: (ev: Event) => any;\r\n oncandidatewindowshow: (ev: Event) => any;\r\n oncandidatewindowupdate: (ev: Event) => any;\r\n target: HTMLElement;\r\n getCandidateWindowClientRect(): ClientRect;\r\n getCompositionAlternatives(): string[];\r\n hasComposition(): boolean;\r\n isCandidateWindowVisible(): boolean;\r\n addEventListener(type: \"MSCandidateWindowHide\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSCandidateWindowShow\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSCandidateWindowUpdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSInputMethodContext: {\r\n prototype: MSInputMethodContext;\r\n new(): MSInputMethodContext;\r\n}\r\n\r\ninterface MSManipulationEvent extends UIEvent {\r\n currentState: number;\r\n inertiaDestinationX: number;\r\n inertiaDestinationY: number;\r\n lastState: number;\r\n initMSManipulationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, lastState: number, currentState: number): void;\r\n MS_MANIPULATION_STATE_ACTIVE: number;\r\n MS_MANIPULATION_STATE_CANCELLED: number;\r\n MS_MANIPULATION_STATE_COMMITTED: number;\r\n MS_MANIPULATION_STATE_DRAGGING: number;\r\n MS_MANIPULATION_STATE_INERTIA: number;\r\n MS_MANIPULATION_STATE_PRESELECT: number;\r\n MS_MANIPULATION_STATE_SELECTING: number;\r\n MS_MANIPULATION_STATE_STOPPED: number;\r\n}\r\n\r\ndeclare var MSManipulationEvent: {\r\n prototype: MSManipulationEvent;\r\n new(): MSManipulationEvent;\r\n MS_MANIPULATION_STATE_ACTIVE: number;\r\n MS_MANIPULATION_STATE_CANCELLED: number;\r\n MS_MANIPULATION_STATE_COMMITTED: number;\r\n MS_MANIPULATION_STATE_DRAGGING: number;\r\n MS_MANIPULATION_STATE_INERTIA: number;\r\n MS_MANIPULATION_STATE_PRESELECT: number;\r\n MS_MANIPULATION_STATE_SELECTING: number;\r\n MS_MANIPULATION_STATE_STOPPED: number;\r\n}\r\n\r\ninterface MSMediaKeyError {\r\n code: number;\r\n systemCode: number;\r\n MS_MEDIA_KEYERR_CLIENT: number;\r\n MS_MEDIA_KEYERR_DOMAIN: number;\r\n MS_MEDIA_KEYERR_HARDWARECHANGE: number;\r\n MS_MEDIA_KEYERR_OUTPUT: number;\r\n MS_MEDIA_KEYERR_SERVICE: number;\r\n MS_MEDIA_KEYERR_UNKNOWN: number;\r\n}\r\n\r\ndeclare var MSMediaKeyError: {\r\n prototype: MSMediaKeyError;\r\n new(): MSMediaKeyError;\r\n MS_MEDIA_KEYERR_CLIENT: number;\r\n MS_MEDIA_KEYERR_DOMAIN: number;\r\n MS_MEDIA_KEYERR_HARDWARECHANGE: number;\r\n MS_MEDIA_KEYERR_OUTPUT: number;\r\n MS_MEDIA_KEYERR_SERVICE: number;\r\n MS_MEDIA_KEYERR_UNKNOWN: number;\r\n}\r\n\r\ninterface MSMediaKeyMessageEvent extends Event {\r\n destinationURL: string;\r\n message: Uint8Array;\r\n}\r\n\r\ndeclare var MSMediaKeyMessageEvent: {\r\n prototype: MSMediaKeyMessageEvent;\r\n new(): MSMediaKeyMessageEvent;\r\n}\r\n\r\ninterface MSMediaKeyNeededEvent extends Event {\r\n initData: Uint8Array;\r\n}\r\n\r\ndeclare var MSMediaKeyNeededEvent: {\r\n prototype: MSMediaKeyNeededEvent;\r\n new(): MSMediaKeyNeededEvent;\r\n}\r\n\r\ninterface MSMediaKeySession extends EventTarget {\r\n error: MSMediaKeyError;\r\n keySystem: string;\r\n sessionId: string;\r\n close(): void;\r\n update(key: Uint8Array): void;\r\n}\r\n\r\ndeclare var MSMediaKeySession: {\r\n prototype: MSMediaKeySession;\r\n new(): MSMediaKeySession;\r\n}\r\n\r\ninterface MSMediaKeys {\r\n keySystem: string;\r\n createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession;\r\n}\r\n\r\ndeclare var MSMediaKeys: {\r\n prototype: MSMediaKeys;\r\n new(keySystem: string): MSMediaKeys;\r\n isTypeSupported(keySystem: string, type?: string): boolean;\r\n}\r\n\r\ninterface MSMimeTypesCollection {\r\n length: number;\r\n}\r\n\r\ndeclare var MSMimeTypesCollection: {\r\n prototype: MSMimeTypesCollection;\r\n new(): MSMimeTypesCollection;\r\n}\r\n\r\ninterface MSPluginsCollection {\r\n length: number;\r\n refresh(reload?: boolean): void;\r\n}\r\n\r\ndeclare var MSPluginsCollection: {\r\n prototype: MSPluginsCollection;\r\n new(): MSPluginsCollection;\r\n}\r\n\r\ninterface MSPointerEvent extends MouseEvent {\r\n currentPoint: any;\r\n height: number;\r\n hwTimestamp: number;\r\n intermediatePoints: any;\r\n isPrimary: boolean;\r\n pointerId: number;\r\n pointerType: any;\r\n pressure: number;\r\n rotation: number;\r\n tiltX: number;\r\n tiltY: number;\r\n width: number;\r\n getCurrentPoint(element: Element): void;\r\n getIntermediatePoints(element: Element): void;\r\n initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;\r\n}\r\n\r\ndeclare var MSPointerEvent: {\r\n prototype: MSPointerEvent;\r\n new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;\r\n}\r\n\r\ninterface MSRangeCollection {\r\n length: number;\r\n item(index: number): Range;\r\n [index: number]: Range;\r\n}\r\n\r\ndeclare var MSRangeCollection: {\r\n prototype: MSRangeCollection;\r\n new(): MSRangeCollection;\r\n}\r\n\r\ninterface MSSiteModeEvent extends Event {\r\n actionURL: string;\r\n buttonID: number;\r\n}\r\n\r\ndeclare var MSSiteModeEvent: {\r\n prototype: MSSiteModeEvent;\r\n new(): MSSiteModeEvent;\r\n}\r\n\r\ninterface MSStream {\r\n type: string;\r\n msClose(): void;\r\n msDetachStream(): any;\r\n}\r\n\r\ndeclare var MSStream: {\r\n prototype: MSStream;\r\n new(): MSStream;\r\n}\r\n\r\ninterface MSStreamReader extends EventTarget, MSBaseReader {\r\n error: DOMError;\r\n readAsArrayBuffer(stream: MSStream, size?: number): void;\r\n readAsBinaryString(stream: MSStream, size?: number): void;\r\n readAsBlob(stream: MSStream, size?: number): void;\r\n readAsDataURL(stream: MSStream, size?: number): void;\r\n readAsText(stream: MSStream, encoding?: string, size?: number): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSStreamReader: {\r\n prototype: MSStreamReader;\r\n new(): MSStreamReader;\r\n}\r\n\r\ninterface MSWebViewAsyncOperation extends EventTarget {\r\n error: DOMError;\r\n oncomplete: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n readyState: number;\r\n result: any;\r\n target: MSHTMLWebViewElement;\r\n type: number;\r\n start(): void;\r\n COMPLETED: number;\r\n ERROR: number;\r\n STARTED: number;\r\n TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;\r\n TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;\r\n TYPE_INVOKE_SCRIPT: number;\r\n addEventListener(type: \"complete\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSWebViewAsyncOperation: {\r\n prototype: MSWebViewAsyncOperation;\r\n new(): MSWebViewAsyncOperation;\r\n COMPLETED: number;\r\n ERROR: number;\r\n STARTED: number;\r\n TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;\r\n TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;\r\n TYPE_INVOKE_SCRIPT: number;\r\n}\r\n\r\ninterface MSWebViewSettings {\r\n isIndexedDBEnabled: boolean;\r\n isJavaScriptEnabled: boolean;\r\n}\r\n\r\ndeclare var MSWebViewSettings: {\r\n prototype: MSWebViewSettings;\r\n new(): MSWebViewSettings;\r\n}\r\n\r\ninterface MediaElementAudioSourceNode extends AudioNode {\r\n}\r\n\r\ndeclare var MediaElementAudioSourceNode: {\r\n prototype: MediaElementAudioSourceNode;\r\n new(): MediaElementAudioSourceNode;\r\n}\r\n\r\ninterface MediaError {\r\n code: number;\r\n msExtendedCode: number;\r\n MEDIA_ERR_ABORTED: number;\r\n MEDIA_ERR_DECODE: number;\r\n MEDIA_ERR_NETWORK: number;\r\n MEDIA_ERR_SRC_NOT_SUPPORTED: number;\r\n MS_MEDIA_ERR_ENCRYPTED: number;\r\n}\r\n\r\ndeclare var MediaError: {\r\n prototype: MediaError;\r\n new(): MediaError;\r\n MEDIA_ERR_ABORTED: number;\r\n MEDIA_ERR_DECODE: number;\r\n MEDIA_ERR_NETWORK: number;\r\n MEDIA_ERR_SRC_NOT_SUPPORTED: number;\r\n MS_MEDIA_ERR_ENCRYPTED: number;\r\n}\r\n\r\ninterface MediaList {\r\n length: number;\r\n mediaText: string;\r\n appendMedium(newMedium: string): void;\r\n deleteMedium(oldMedium: string): void;\r\n item(index: number): string;\r\n toString(): string;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var MediaList: {\r\n prototype: MediaList;\r\n new(): MediaList;\r\n}\r\n\r\ninterface MediaQueryList {\r\n matches: boolean;\r\n media: string;\r\n addListener(listener: MediaQueryListListener): void;\r\n removeListener(listener: MediaQueryListListener): void;\r\n}\r\n\r\ndeclare var MediaQueryList: {\r\n prototype: MediaQueryList;\r\n new(): MediaQueryList;\r\n}\r\n\r\ninterface MediaSource extends EventTarget {\r\n activeSourceBuffers: SourceBufferList;\r\n duration: number;\r\n readyState: string;\r\n sourceBuffers: SourceBufferList;\r\n addSourceBuffer(type: string): SourceBuffer;\r\n endOfStream(error?: number): void;\r\n removeSourceBuffer(sourceBuffer: SourceBuffer): void;\r\n}\r\n\r\ndeclare var MediaSource: {\r\n prototype: MediaSource;\r\n new(): MediaSource;\r\n isTypeSupported(type: string): boolean;\r\n}\r\n\r\ninterface MessageChannel {\r\n port1: MessagePort;\r\n port2: MessagePort;\r\n}\r\n\r\ndeclare var MessageChannel: {\r\n prototype: MessageChannel;\r\n new(): MessageChannel;\r\n}\r\n\r\ninterface MessageEvent extends Event {\r\n data: any;\r\n origin: string;\r\n ports: any;\r\n source: Window;\r\n initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: Window): void;\r\n}\r\n\r\ndeclare var MessageEvent: {\r\n prototype: MessageEvent;\r\n new(type: string, eventInitDict?: MessageEventInit): MessageEvent;\r\n}\r\n\r\ninterface MessagePort extends EventTarget {\r\n onmessage: (ev: MessageEvent) => any;\r\n close(): void;\r\n postMessage(message?: any, ports?: any): void;\r\n start(): void;\r\n addEventListener(type: \"message\", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MessagePort: {\r\n prototype: MessagePort;\r\n new(): MessagePort;\r\n}\r\n\r\ninterface MimeType {\r\n description: string;\r\n enabledPlugin: Plugin;\r\n suffixes: string;\r\n type: string;\r\n}\r\n\r\ndeclare var MimeType: {\r\n prototype: MimeType;\r\n new(): MimeType;\r\n}\r\n\r\ninterface MimeTypeArray {\r\n length: number;\r\n item(index: number): Plugin;\r\n namedItem(type: string): Plugin;\r\n [index: number]: Plugin;\r\n}\r\n\r\ndeclare var MimeTypeArray: {\r\n prototype: MimeTypeArray;\r\n new(): MimeTypeArray;\r\n}\r\n\r\ninterface MouseEvent extends UIEvent {\r\n altKey: boolean;\r\n button: number;\r\n buttons: number;\r\n clientX: number;\r\n clientY: number;\r\n ctrlKey: boolean;\r\n fromElement: Element;\r\n layerX: number;\r\n layerY: number;\r\n metaKey: boolean;\r\n movementX: number;\r\n movementY: number;\r\n offsetX: number;\r\n offsetY: number;\r\n pageX: number;\r\n pageY: number;\r\n relatedTarget: EventTarget;\r\n screenX: number;\r\n screenY: number;\r\n shiftKey: boolean;\r\n toElement: Element;\r\n which: number;\r\n x: number;\r\n y: number;\r\n getModifierState(keyArg: string): boolean;\r\n initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget): void;\r\n}\r\n\r\ndeclare var MouseEvent: {\r\n prototype: MouseEvent;\r\n new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;\r\n}\r\n\r\ninterface MouseWheelEvent extends MouseEvent {\r\n wheelDelta: number;\r\n wheelDeltaX: number;\r\n wheelDeltaY: number;\r\n initMouseWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, wheelDeltaArg: number): void;\r\n}\r\n\r\ndeclare var MouseWheelEvent: {\r\n prototype: MouseWheelEvent;\r\n new(): MouseWheelEvent;\r\n}\r\n\r\ninterface MutationEvent extends Event {\r\n attrChange: number;\r\n attrName: string;\r\n newValue: string;\r\n prevValue: string;\r\n relatedNode: Node;\r\n initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void;\r\n ADDITION: number;\r\n MODIFICATION: number;\r\n REMOVAL: number;\r\n}\r\n\r\ndeclare var MutationEvent: {\r\n prototype: MutationEvent;\r\n new(): MutationEvent;\r\n ADDITION: number;\r\n MODIFICATION: number;\r\n REMOVAL: number;\r\n}\r\n\r\ninterface MutationObserver {\r\n disconnect(): void;\r\n observe(target: Node, options: MutationObserverInit): void;\r\n takeRecords(): MutationRecord[];\r\n}\r\n\r\ndeclare var MutationObserver: {\r\n prototype: MutationObserver;\r\n new(callback: MutationCallback): MutationObserver;\r\n}\r\n\r\ninterface MutationRecord {\r\n addedNodes: NodeList;\r\n attributeName: string;\r\n attributeNamespace: string;\r\n nextSibling: Node;\r\n oldValue: string;\r\n previousSibling: Node;\r\n removedNodes: NodeList;\r\n target: Node;\r\n type: string;\r\n}\r\n\r\ndeclare var MutationRecord: {\r\n prototype: MutationRecord;\r\n new(): MutationRecord;\r\n}\r\n\r\ninterface NamedNodeMap {\r\n length: number;\r\n getNamedItem(name: string): Attr;\r\n getNamedItemNS(namespaceURI: string, localName: string): Attr;\r\n item(index: number): Attr;\r\n removeNamedItem(name: string): Attr;\r\n removeNamedItemNS(namespaceURI: string, localName: string): Attr;\r\n setNamedItem(arg: Attr): Attr;\r\n setNamedItemNS(arg: Attr): Attr;\r\n [index: number]: Attr;\r\n}\r\n\r\ndeclare var NamedNodeMap: {\r\n prototype: NamedNodeMap;\r\n new(): NamedNodeMap;\r\n}\r\n\r\ninterface NavigationCompletedEvent extends NavigationEvent {\r\n isSuccess: boolean;\r\n webErrorStatus: number;\r\n}\r\n\r\ndeclare var NavigationCompletedEvent: {\r\n prototype: NavigationCompletedEvent;\r\n new(): NavigationCompletedEvent;\r\n}\r\n\r\ninterface NavigationEvent extends Event {\r\n uri: string;\r\n}\r\n\r\ndeclare var NavigationEvent: {\r\n prototype: NavigationEvent;\r\n new(): NavigationEvent;\r\n}\r\n\r\ninterface NavigationEventWithReferrer extends NavigationEvent {\r\n referer: string;\r\n}\r\n\r\ndeclare var NavigationEventWithReferrer: {\r\n prototype: NavigationEventWithReferrer;\r\n new(): NavigationEventWithReferrer;\r\n}\r\n\r\ninterface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver {\r\n appCodeName: string;\r\n appMinorVersion: string;\r\n browserLanguage: string;\r\n connectionSpeed: number;\r\n cookieEnabled: boolean;\r\n cpuClass: string;\r\n language: string;\r\n maxTouchPoints: number;\r\n mimeTypes: MSMimeTypesCollection;\r\n msManipulationViewsEnabled: boolean;\r\n msMaxTouchPoints: number;\r\n msPointerEnabled: boolean;\r\n plugins: MSPluginsCollection;\r\n pointerEnabled: boolean;\r\n systemLanguage: string;\r\n userLanguage: string;\r\n webdriver: boolean;\r\n getGamepads(): Gamepad[];\r\n javaEnabled(): boolean;\r\n msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;\r\n vibrate(pattern: number | number[]): boolean;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Navigator: {\r\n prototype: Navigator;\r\n new(): Navigator;\r\n}\r\n\r\ninterface Node extends EventTarget {\r\n attributes: NamedNodeMap;\r\n baseURI: string;\r\n childNodes: NodeList;\r\n firstChild: Node;\r\n lastChild: Node;\r\n localName: string;\r\n namespaceURI: string;\r\n nextSibling: Node;\r\n nodeName: string;\r\n nodeType: number;\r\n nodeValue: string;\r\n ownerDocument: Document;\r\n parentElement: HTMLElement;\r\n parentNode: Node;\r\n prefix: string;\r\n previousSibling: Node;\r\n textContent: string;\r\n appendChild(newChild: Node): Node;\r\n cloneNode(deep?: boolean): Node;\r\n compareDocumentPosition(other: Node): number;\r\n hasAttributes(): boolean;\r\n hasChildNodes(): boolean;\r\n insertBefore(newChild: Node, refChild?: Node): Node;\r\n isDefaultNamespace(namespaceURI: string): boolean;\r\n isEqualNode(arg: Node): boolean;\r\n isSameNode(other: Node): boolean;\r\n lookupNamespaceURI(prefix: string): string;\r\n lookupPrefix(namespaceURI: string): string;\r\n normalize(): void;\r\n removeChild(oldChild: Node): Node;\r\n replaceChild(newChild: Node, oldChild: Node): Node;\r\n contains(node: Node): boolean;\r\n ATTRIBUTE_NODE: number;\r\n CDATA_SECTION_NODE: number;\r\n COMMENT_NODE: number;\r\n DOCUMENT_FRAGMENT_NODE: number;\r\n DOCUMENT_NODE: number;\r\n DOCUMENT_POSITION_CONTAINED_BY: number;\r\n DOCUMENT_POSITION_CONTAINS: number;\r\n DOCUMENT_POSITION_DISCONNECTED: number;\r\n DOCUMENT_POSITION_FOLLOWING: number;\r\n DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;\r\n DOCUMENT_POSITION_PRECEDING: number;\r\n DOCUMENT_TYPE_NODE: number;\r\n ELEMENT_NODE: number;\r\n ENTITY_NODE: number;\r\n ENTITY_REFERENCE_NODE: number;\r\n NOTATION_NODE: number;\r\n PROCESSING_INSTRUCTION_NODE: number;\r\n TEXT_NODE: number;\r\n}\r\n\r\ndeclare var Node: {\r\n prototype: Node;\r\n new(): Node;\r\n ATTRIBUTE_NODE: number;\r\n CDATA_SECTION_NODE: number;\r\n COMMENT_NODE: number;\r\n DOCUMENT_FRAGMENT_NODE: number;\r\n DOCUMENT_NODE: number;\r\n DOCUMENT_POSITION_CONTAINED_BY: number;\r\n DOCUMENT_POSITION_CONTAINS: number;\r\n DOCUMENT_POSITION_DISCONNECTED: number;\r\n DOCUMENT_POSITION_FOLLOWING: number;\r\n DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;\r\n DOCUMENT_POSITION_PRECEDING: number;\r\n DOCUMENT_TYPE_NODE: number;\r\n ELEMENT_NODE: number;\r\n ENTITY_NODE: number;\r\n ENTITY_REFERENCE_NODE: number;\r\n NOTATION_NODE: number;\r\n PROCESSING_INSTRUCTION_NODE: number;\r\n TEXT_NODE: number;\r\n}\r\n\r\ninterface NodeFilter {\r\n acceptNode(n: Node): number;\r\n}\r\n\r\ndeclare var NodeFilter: {\r\n FILTER_ACCEPT: number;\r\n FILTER_REJECT: number;\r\n FILTER_SKIP: number;\r\n SHOW_ALL: number;\r\n SHOW_ATTRIBUTE: number;\r\n SHOW_CDATA_SECTION: number;\r\n SHOW_COMMENT: number;\r\n SHOW_DOCUMENT: number;\r\n SHOW_DOCUMENT_FRAGMENT: number;\r\n SHOW_DOCUMENT_TYPE: number;\r\n SHOW_ELEMENT: number;\r\n SHOW_ENTITY: number;\r\n SHOW_ENTITY_REFERENCE: number;\r\n SHOW_NOTATION: number;\r\n SHOW_PROCESSING_INSTRUCTION: number;\r\n SHOW_TEXT: number;\r\n}\r\n\r\ninterface NodeIterator {\r\n expandEntityReferences: boolean;\r\n filter: NodeFilter;\r\n root: Node;\r\n whatToShow: number;\r\n detach(): void;\r\n nextNode(): Node;\r\n previousNode(): Node;\r\n}\r\n\r\ndeclare var NodeIterator: {\r\n prototype: NodeIterator;\r\n new(): NodeIterator;\r\n}\r\n\r\ninterface NodeList {\r\n length: number;\r\n item(index: number): Node;\r\n [index: number]: Node;\r\n}\r\n\r\ndeclare var NodeList: {\r\n prototype: NodeList;\r\n new(): NodeList;\r\n}\r\n\r\ninterface OES_element_index_uint {\r\n}\r\n\r\ndeclare var OES_element_index_uint: {\r\n prototype: OES_element_index_uint;\r\n new(): OES_element_index_uint;\r\n}\r\n\r\ninterface OES_standard_derivatives {\r\n FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;\r\n}\r\n\r\ndeclare var OES_standard_derivatives: {\r\n prototype: OES_standard_derivatives;\r\n new(): OES_standard_derivatives;\r\n FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;\r\n}\r\n\r\ninterface OES_texture_float {\r\n}\r\n\r\ndeclare var OES_texture_float: {\r\n prototype: OES_texture_float;\r\n new(): OES_texture_float;\r\n}\r\n\r\ninterface OES_texture_float_linear {\r\n}\r\n\r\ndeclare var OES_texture_float_linear: {\r\n prototype: OES_texture_float_linear;\r\n new(): OES_texture_float_linear;\r\n}\r\n\r\ninterface OfflineAudioCompletionEvent extends Event {\r\n renderedBuffer: AudioBuffer;\r\n}\r\n\r\ndeclare var OfflineAudioCompletionEvent: {\r\n prototype: OfflineAudioCompletionEvent;\r\n new(): OfflineAudioCompletionEvent;\r\n}\r\n\r\ninterface OfflineAudioContext extends AudioContext {\r\n oncomplete: (ev: Event) => any;\r\n startRendering(): void;\r\n addEventListener(type: \"complete\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var OfflineAudioContext: {\r\n prototype: OfflineAudioContext;\r\n new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;\r\n}\r\n\r\ninterface OscillatorNode extends AudioNode {\r\n detune: AudioParam;\r\n frequency: AudioParam;\r\n onended: (ev: Event) => any;\r\n type: string;\r\n setPeriodicWave(periodicWave: PeriodicWave): void;\r\n start(when?: number): void;\r\n stop(when?: number): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var OscillatorNode: {\r\n prototype: OscillatorNode;\r\n new(): OscillatorNode;\r\n}\r\n\r\ninterface PageTransitionEvent extends Event {\r\n persisted: boolean;\r\n}\r\n\r\ndeclare var PageTransitionEvent: {\r\n prototype: PageTransitionEvent;\r\n new(): PageTransitionEvent;\r\n}\r\n\r\ninterface PannerNode extends AudioNode {\r\n coneInnerAngle: number;\r\n coneOuterAngle: number;\r\n coneOuterGain: number;\r\n distanceModel: string;\r\n maxDistance: number;\r\n panningModel: string;\r\n refDistance: number;\r\n rolloffFactor: number;\r\n setOrientation(x: number, y: number, z: number): void;\r\n setPosition(x: number, y: number, z: number): void;\r\n setVelocity(x: number, y: number, z: number): void;\r\n}\r\n\r\ndeclare var PannerNode: {\r\n prototype: PannerNode;\r\n new(): PannerNode;\r\n}\r\n\r\ninterface PerfWidgetExternal {\r\n activeNetworkRequestCount: number;\r\n averageFrameTime: number;\r\n averagePaintTime: number;\r\n extraInformationEnabled: boolean;\r\n independentRenderingEnabled: boolean;\r\n irDisablingContentString: string;\r\n irStatusAvailable: boolean;\r\n maxCpuSpeed: number;\r\n paintRequestsPerSecond: number;\r\n performanceCounter: number;\r\n performanceCounterFrequency: number;\r\n addEventListener(eventType: string, callback: Function): void;\r\n getMemoryUsage(): number;\r\n getProcessCpuUsage(): number;\r\n getRecentCpuUsage(last: number): any;\r\n getRecentFrames(last: number): any;\r\n getRecentMemoryUsage(last: number): any;\r\n getRecentPaintRequests(last: number): any;\r\n removeEventListener(eventType: string, callback: Function): void;\r\n repositionWindow(x: number, y: number): void;\r\n resizeWindow(width: number, height: number): void;\r\n}\r\n\r\ndeclare var PerfWidgetExternal: {\r\n prototype: PerfWidgetExternal;\r\n new(): PerfWidgetExternal;\r\n}\r\n\r\ninterface Performance {\r\n navigation: PerformanceNavigation;\r\n timing: PerformanceTiming;\r\n clearMarks(markName?: string): void;\r\n clearMeasures(measureName?: string): void;\r\n clearResourceTimings(): void;\r\n getEntries(): any;\r\n getEntriesByName(name: string, entryType?: string): any;\r\n getEntriesByType(entryType: string): any;\r\n getMarks(markName?: string): any;\r\n getMeasures(measureName?: string): any;\r\n mark(markName: string): void;\r\n measure(measureName: string, startMarkName?: string, endMarkName?: string): void;\r\n now(): number;\r\n setResourceTimingBufferSize(maxSize: number): void;\r\n toJSON(): any;\r\n}\r\n\r\ndeclare var Performance: {\r\n prototype: Performance;\r\n new(): Performance;\r\n}\r\n\r\ninterface PerformanceEntry {\r\n duration: number;\r\n entryType: string;\r\n name: string;\r\n startTime: number;\r\n}\r\n\r\ndeclare var PerformanceEntry: {\r\n prototype: PerformanceEntry;\r\n new(): PerformanceEntry;\r\n}\r\n\r\ninterface PerformanceMark extends PerformanceEntry {\r\n}\r\n\r\ndeclare var PerformanceMark: {\r\n prototype: PerformanceMark;\r\n new(): PerformanceMark;\r\n}\r\n\r\ninterface PerformanceMeasure extends PerformanceEntry {\r\n}\r\n\r\ndeclare var PerformanceMeasure: {\r\n prototype: PerformanceMeasure;\r\n new(): PerformanceMeasure;\r\n}\r\n\r\ninterface PerformanceNavigation {\r\n redirectCount: number;\r\n type: number;\r\n toJSON(): any;\r\n TYPE_BACK_FORWARD: number;\r\n TYPE_NAVIGATE: number;\r\n TYPE_RELOAD: number;\r\n TYPE_RESERVED: number;\r\n}\r\n\r\ndeclare var PerformanceNavigation: {\r\n prototype: PerformanceNavigation;\r\n new(): PerformanceNavigation;\r\n TYPE_BACK_FORWARD: number;\r\n TYPE_NAVIGATE: number;\r\n TYPE_RELOAD: number;\r\n TYPE_RESERVED: number;\r\n}\r\n\r\ninterface PerformanceNavigationTiming extends PerformanceEntry {\r\n connectEnd: number;\r\n connectStart: number;\r\n domComplete: number;\r\n domContentLoadedEventEnd: number;\r\n domContentLoadedEventStart: number;\r\n domInteractive: number;\r\n domLoading: number;\r\n domainLookupEnd: number;\r\n domainLookupStart: number;\r\n fetchStart: number;\r\n loadEventEnd: number;\r\n loadEventStart: number;\r\n navigationStart: number;\r\n redirectCount: number;\r\n redirectEnd: number;\r\n redirectStart: number;\r\n requestStart: number;\r\n responseEnd: number;\r\n responseStart: number;\r\n type: string;\r\n unloadEventEnd: number;\r\n unloadEventStart: number;\r\n}\r\n\r\ndeclare var PerformanceNavigationTiming: {\r\n prototype: PerformanceNavigationTiming;\r\n new(): PerformanceNavigationTiming;\r\n}\r\n\r\ninterface PerformanceResourceTiming extends PerformanceEntry {\r\n connectEnd: number;\r\n connectStart: number;\r\n domainLookupEnd: number;\r\n domainLookupStart: number;\r\n fetchStart: number;\r\n initiatorType: string;\r\n redirectEnd: number;\r\n redirectStart: number;\r\n requestStart: number;\r\n responseEnd: number;\r\n responseStart: number;\r\n}\r\n\r\ndeclare var PerformanceResourceTiming: {\r\n prototype: PerformanceResourceTiming;\r\n new(): PerformanceResourceTiming;\r\n}\r\n\r\ninterface PerformanceTiming {\r\n connectEnd: number;\r\n connectStart: number;\r\n domComplete: number;\r\n domContentLoadedEventEnd: number;\r\n domContentLoadedEventStart: number;\r\n domInteractive: number;\r\n domLoading: number;\r\n domainLookupEnd: number;\r\n domainLookupStart: number;\r\n fetchStart: number;\r\n loadEventEnd: number;\r\n loadEventStart: number;\r\n msFirstPaint: number;\r\n navigationStart: number;\r\n redirectEnd: number;\r\n redirectStart: number;\r\n requestStart: number;\r\n responseEnd: number;\r\n responseStart: number;\r\n unloadEventEnd: number;\r\n unloadEventStart: number;\r\n toJSON(): any;\r\n}\r\n\r\ndeclare var PerformanceTiming: {\r\n prototype: PerformanceTiming;\r\n new(): PerformanceTiming;\r\n}\r\n\r\ninterface PeriodicWave {\r\n}\r\n\r\ndeclare var PeriodicWave: {\r\n prototype: PeriodicWave;\r\n new(): PeriodicWave;\r\n}\r\n\r\ninterface PermissionRequest extends DeferredPermissionRequest {\r\n state: string;\r\n defer(): void;\r\n}\r\n\r\ndeclare var PermissionRequest: {\r\n prototype: PermissionRequest;\r\n new(): PermissionRequest;\r\n}\r\n\r\ninterface PermissionRequestedEvent extends Event {\r\n permissionRequest: PermissionRequest;\r\n}\r\n\r\ndeclare var PermissionRequestedEvent: {\r\n prototype: PermissionRequestedEvent;\r\n new(): PermissionRequestedEvent;\r\n}\r\n\r\ninterface Plugin {\r\n description: string;\r\n filename: string;\r\n length: number;\r\n name: string;\r\n version: string;\r\n item(index: number): MimeType;\r\n namedItem(type: string): MimeType;\r\n [index: number]: MimeType;\r\n}\r\n\r\ndeclare var Plugin: {\r\n prototype: Plugin;\r\n new(): Plugin;\r\n}\r\n\r\ninterface PluginArray {\r\n length: number;\r\n item(index: number): Plugin;\r\n namedItem(name: string): Plugin;\r\n refresh(reload?: boolean): void;\r\n [index: number]: Plugin;\r\n}\r\n\r\ndeclare var PluginArray: {\r\n prototype: PluginArray;\r\n new(): PluginArray;\r\n}\r\n\r\ninterface PointerEvent extends MouseEvent {\r\n currentPoint: any;\r\n height: number;\r\n hwTimestamp: number;\r\n intermediatePoints: any;\r\n isPrimary: boolean;\r\n pointerId: number;\r\n pointerType: any;\r\n pressure: number;\r\n rotation: number;\r\n tiltX: number;\r\n tiltY: number;\r\n width: number;\r\n getCurrentPoint(element: Element): void;\r\n getIntermediatePoints(element: Element): void;\r\n initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;\r\n}\r\n\r\ndeclare var PointerEvent: {\r\n prototype: PointerEvent;\r\n new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;\r\n}\r\n\r\ninterface PopStateEvent extends Event {\r\n state: any;\r\n initPopStateEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, stateArg: any): void;\r\n}\r\n\r\ndeclare var PopStateEvent: {\r\n prototype: PopStateEvent;\r\n new(): PopStateEvent;\r\n}\r\n\r\ninterface Position {\r\n coords: Coordinates;\r\n timestamp: number;\r\n}\r\n\r\ndeclare var Position: {\r\n prototype: Position;\r\n new(): Position;\r\n}\r\n\r\ninterface PositionError {\r\n code: number;\r\n message: string;\r\n toString(): string;\r\n PERMISSION_DENIED: number;\r\n POSITION_UNAVAILABLE: number;\r\n TIMEOUT: number;\r\n}\r\n\r\ndeclare var PositionError: {\r\n prototype: PositionError;\r\n new(): PositionError;\r\n PERMISSION_DENIED: number;\r\n POSITION_UNAVAILABLE: number;\r\n TIMEOUT: number;\r\n}\r\n\r\ninterface ProcessingInstruction extends CharacterData {\r\n target: string;\r\n}\r\n\r\ndeclare var ProcessingInstruction: {\r\n prototype: ProcessingInstruction;\r\n new(): ProcessingInstruction;\r\n}\r\n\r\ninterface ProgressEvent extends Event {\r\n lengthComputable: boolean;\r\n loaded: number;\r\n total: number;\r\n initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;\r\n}\r\n\r\ndeclare var ProgressEvent: {\r\n prototype: ProgressEvent;\r\n new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;\r\n}\r\n\r\ninterface Range {\r\n collapsed: boolean;\r\n commonAncestorContainer: Node;\r\n endContainer: Node;\r\n endOffset: number;\r\n startContainer: Node;\r\n startOffset: number;\r\n cloneContents(): DocumentFragment;\r\n cloneRange(): Range;\r\n collapse(toStart: boolean): void;\r\n compareBoundaryPoints(how: number, sourceRange: Range): number;\r\n createContextualFragment(fragment: string): DocumentFragment;\r\n deleteContents(): void;\r\n detach(): void;\r\n expand(Unit: string): boolean;\r\n extractContents(): DocumentFragment;\r\n getBoundingClientRect(): ClientRect;\r\n getClientRects(): ClientRectList;\r\n insertNode(newNode: Node): void;\r\n selectNode(refNode: Node): void;\r\n selectNodeContents(refNode: Node): void;\r\n setEnd(refNode: Node, offset: number): void;\r\n setEndAfter(refNode: Node): void;\r\n setEndBefore(refNode: Node): void;\r\n setStart(refNode: Node, offset: number): void;\r\n setStartAfter(refNode: Node): void;\r\n setStartBefore(refNode: Node): void;\r\n surroundContents(newParent: Node): void;\r\n toString(): string;\r\n END_TO_END: number;\r\n END_TO_START: number;\r\n START_TO_END: number;\r\n START_TO_START: number;\r\n}\r\n\r\ndeclare var Range: {\r\n prototype: Range;\r\n new(): Range;\r\n END_TO_END: number;\r\n END_TO_START: number;\r\n START_TO_END: number;\r\n START_TO_START: number;\r\n}\r\n\r\ninterface SVGAElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {\r\n target: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGAElement: {\r\n prototype: SVGAElement;\r\n new(): SVGAElement;\r\n}\r\n\r\ninterface SVGAngle {\r\n unitType: number;\r\n value: number;\r\n valueAsString: string;\r\n valueInSpecifiedUnits: number;\r\n convertToSpecifiedUnits(unitType: number): void;\r\n newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;\r\n SVG_ANGLETYPE_DEG: number;\r\n SVG_ANGLETYPE_GRAD: number;\r\n SVG_ANGLETYPE_RAD: number;\r\n SVG_ANGLETYPE_UNKNOWN: number;\r\n SVG_ANGLETYPE_UNSPECIFIED: number;\r\n}\r\n\r\ndeclare var SVGAngle: {\r\n prototype: SVGAngle;\r\n new(): SVGAngle;\r\n SVG_ANGLETYPE_DEG: number;\r\n SVG_ANGLETYPE_GRAD: number;\r\n SVG_ANGLETYPE_RAD: number;\r\n SVG_ANGLETYPE_UNKNOWN: number;\r\n SVG_ANGLETYPE_UNSPECIFIED: number;\r\n}\r\n\r\ninterface SVGAnimatedAngle {\r\n animVal: SVGAngle;\r\n baseVal: SVGAngle;\r\n}\r\n\r\ndeclare var SVGAnimatedAngle: {\r\n prototype: SVGAnimatedAngle;\r\n new(): SVGAnimatedAngle;\r\n}\r\n\r\ninterface SVGAnimatedBoolean {\r\n animVal: boolean;\r\n baseVal: boolean;\r\n}\r\n\r\ndeclare var SVGAnimatedBoolean: {\r\n prototype: SVGAnimatedBoolean;\r\n new(): SVGAnimatedBoolean;\r\n}\r\n\r\ninterface SVGAnimatedEnumeration {\r\n animVal: number;\r\n baseVal: number;\r\n}\r\n\r\ndeclare var SVGAnimatedEnumeration: {\r\n prototype: SVGAnimatedEnumeration;\r\n new(): SVGAnimatedEnumeration;\r\n}\r\n\r\ninterface SVGAnimatedInteger {\r\n animVal: number;\r\n baseVal: number;\r\n}\r\n\r\ndeclare var SVGAnimatedInteger: {\r\n prototype: SVGAnimatedInteger;\r\n new(): SVGAnimatedInteger;\r\n}\r\n\r\ninterface SVGAnimatedLength {\r\n animVal: SVGLength;\r\n baseVal: SVGLength;\r\n}\r\n\r\ndeclare var SVGAnimatedLength: {\r\n prototype: SVGAnimatedLength;\r\n new(): SVGAnimatedLength;\r\n}\r\n\r\ninterface SVGAnimatedLengthList {\r\n animVal: SVGLengthList;\r\n baseVal: SVGLengthList;\r\n}\r\n\r\ndeclare var SVGAnimatedLengthList: {\r\n prototype: SVGAnimatedLengthList;\r\n new(): SVGAnimatedLengthList;\r\n}\r\n\r\ninterface SVGAnimatedNumber {\r\n animVal: number;\r\n baseVal: number;\r\n}\r\n\r\ndeclare var SVGAnimatedNumber: {\r\n prototype: SVGAnimatedNumber;\r\n new(): SVGAnimatedNumber;\r\n}\r\n\r\ninterface SVGAnimatedNumberList {\r\n animVal: SVGNumberList;\r\n baseVal: SVGNumberList;\r\n}\r\n\r\ndeclare var SVGAnimatedNumberList: {\r\n prototype: SVGAnimatedNumberList;\r\n new(): SVGAnimatedNumberList;\r\n}\r\n\r\ninterface SVGAnimatedPreserveAspectRatio {\r\n animVal: SVGPreserveAspectRatio;\r\n baseVal: SVGPreserveAspectRatio;\r\n}\r\n\r\ndeclare var SVGAnimatedPreserveAspectRatio: {\r\n prototype: SVGAnimatedPreserveAspectRatio;\r\n new(): SVGAnimatedPreserveAspectRatio;\r\n}\r\n\r\ninterface SVGAnimatedRect {\r\n animVal: SVGRect;\r\n baseVal: SVGRect;\r\n}\r\n\r\ndeclare var SVGAnimatedRect: {\r\n prototype: SVGAnimatedRect;\r\n new(): SVGAnimatedRect;\r\n}\r\n\r\ninterface SVGAnimatedString {\r\n animVal: string;\r\n baseVal: string;\r\n}\r\n\r\ndeclare var SVGAnimatedString: {\r\n prototype: SVGAnimatedString;\r\n new(): SVGAnimatedString;\r\n}\r\n\r\ninterface SVGAnimatedTransformList {\r\n animVal: SVGTransformList;\r\n baseVal: SVGTransformList;\r\n}\r\n\r\ndeclare var SVGAnimatedTransformList: {\r\n prototype: SVGAnimatedTransformList;\r\n new(): SVGAnimatedTransformList;\r\n}\r\n\r\ninterface SVGCircleElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n cx: SVGAnimatedLength;\r\n cy: SVGAnimatedLength;\r\n r: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGCircleElement: {\r\n prototype: SVGCircleElement;\r\n new(): SVGCircleElement;\r\n}\r\n\r\ninterface SVGClipPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {\r\n clipPathUnits: SVGAnimatedEnumeration;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGClipPathElement: {\r\n prototype: SVGClipPathElement;\r\n new(): SVGClipPathElement;\r\n}\r\n\r\ninterface SVGComponentTransferFunctionElement extends SVGElement {\r\n amplitude: SVGAnimatedNumber;\r\n exponent: SVGAnimatedNumber;\r\n intercept: SVGAnimatedNumber;\r\n offset: SVGAnimatedNumber;\r\n slope: SVGAnimatedNumber;\r\n tableValues: SVGAnimatedNumberList;\r\n type: SVGAnimatedEnumeration;\r\n SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGComponentTransferFunctionElement: {\r\n prototype: SVGComponentTransferFunctionElement;\r\n new(): SVGComponentTransferFunctionElement;\r\n SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGDefsElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGDefsElement: {\r\n prototype: SVGDefsElement;\r\n new(): SVGDefsElement;\r\n}\r\n\r\ninterface SVGDescElement extends SVGElement, SVGStylable, SVGLangSpace {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGDescElement: {\r\n prototype: SVGDescElement;\r\n new(): SVGDescElement;\r\n}\r\n\r\ninterface SVGElement extends Element {\r\n id: string;\r\n onclick: (ev: MouseEvent) => any;\r\n ondblclick: (ev: MouseEvent) => any;\r\n onfocusin: (ev: FocusEvent) => any;\r\n onfocusout: (ev: FocusEvent) => any;\r\n onload: (ev: Event) => any;\r\n onmousedown: (ev: MouseEvent) => any;\r\n onmousemove: (ev: MouseEvent) => any;\r\n onmouseout: (ev: MouseEvent) => any;\r\n onmouseover: (ev: MouseEvent) => any;\r\n onmouseup: (ev: MouseEvent) => any;\r\n ownerSVGElement: SVGSVGElement;\r\n viewportElement: SVGElement;\r\n xmlbase: string;\r\n className: any;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusin\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusout\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGElement: {\r\n prototype: SVGElement;\r\n new(): SVGElement;\r\n}\r\n\r\ninterface SVGElementInstance extends EventTarget {\r\n childNodes: SVGElementInstanceList;\r\n correspondingElement: SVGElement;\r\n correspondingUseElement: SVGUseElement;\r\n firstChild: SVGElementInstance;\r\n lastChild: SVGElementInstance;\r\n nextSibling: SVGElementInstance;\r\n parentNode: SVGElementInstance;\r\n previousSibling: SVGElementInstance;\r\n}\r\n\r\ndeclare var SVGElementInstance: {\r\n prototype: SVGElementInstance;\r\n new(): SVGElementInstance;\r\n}\r\n\r\ninterface SVGElementInstanceList {\r\n length: number;\r\n item(index: number): SVGElementInstance;\r\n}\r\n\r\ndeclare var SVGElementInstanceList: {\r\n prototype: SVGElementInstanceList;\r\n new(): SVGElementInstanceList;\r\n}\r\n\r\ninterface SVGEllipseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n cx: SVGAnimatedLength;\r\n cy: SVGAnimatedLength;\r\n rx: SVGAnimatedLength;\r\n ry: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGEllipseElement: {\r\n prototype: SVGEllipseElement;\r\n new(): SVGEllipseElement;\r\n}\r\n\r\ninterface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n in2: SVGAnimatedString;\r\n mode: SVGAnimatedEnumeration;\r\n SVG_FEBLEND_MODE_COLOR: number;\r\n SVG_FEBLEND_MODE_COLOR_BURN: number;\r\n SVG_FEBLEND_MODE_COLOR_DODGE: number;\r\n SVG_FEBLEND_MODE_DARKEN: number;\r\n SVG_FEBLEND_MODE_DIFFERENCE: number;\r\n SVG_FEBLEND_MODE_EXCLUSION: number;\r\n SVG_FEBLEND_MODE_HARD_LIGHT: number;\r\n SVG_FEBLEND_MODE_HUE: number;\r\n SVG_FEBLEND_MODE_LIGHTEN: number;\r\n SVG_FEBLEND_MODE_LUMINOSITY: number;\r\n SVG_FEBLEND_MODE_MULTIPLY: number;\r\n SVG_FEBLEND_MODE_NORMAL: number;\r\n SVG_FEBLEND_MODE_OVERLAY: number;\r\n SVG_FEBLEND_MODE_SATURATION: number;\r\n SVG_FEBLEND_MODE_SCREEN: number;\r\n SVG_FEBLEND_MODE_SOFT_LIGHT: number;\r\n SVG_FEBLEND_MODE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEBlendElement: {\r\n prototype: SVGFEBlendElement;\r\n new(): SVGFEBlendElement;\r\n SVG_FEBLEND_MODE_COLOR: number;\r\n SVG_FEBLEND_MODE_COLOR_BURN: number;\r\n SVG_FEBLEND_MODE_COLOR_DODGE: number;\r\n SVG_FEBLEND_MODE_DARKEN: number;\r\n SVG_FEBLEND_MODE_DIFFERENCE: number;\r\n SVG_FEBLEND_MODE_EXCLUSION: number;\r\n SVG_FEBLEND_MODE_HARD_LIGHT: number;\r\n SVG_FEBLEND_MODE_HUE: number;\r\n SVG_FEBLEND_MODE_LIGHTEN: number;\r\n SVG_FEBLEND_MODE_LUMINOSITY: number;\r\n SVG_FEBLEND_MODE_MULTIPLY: number;\r\n SVG_FEBLEND_MODE_NORMAL: number;\r\n SVG_FEBLEND_MODE_OVERLAY: number;\r\n SVG_FEBLEND_MODE_SATURATION: number;\r\n SVG_FEBLEND_MODE_SCREEN: number;\r\n SVG_FEBLEND_MODE_SOFT_LIGHT: number;\r\n SVG_FEBLEND_MODE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n type: SVGAnimatedEnumeration;\r\n values: SVGAnimatedNumberList;\r\n SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;\r\n SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;\r\n SVG_FECOLORMATRIX_TYPE_MATRIX: number;\r\n SVG_FECOLORMATRIX_TYPE_SATURATE: number;\r\n SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEColorMatrixElement: {\r\n prototype: SVGFEColorMatrixElement;\r\n new(): SVGFEColorMatrixElement;\r\n SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;\r\n SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;\r\n SVG_FECOLORMATRIX_TYPE_MATRIX: number;\r\n SVG_FECOLORMATRIX_TYPE_SATURATE: number;\r\n SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEComponentTransferElement: {\r\n prototype: SVGFEComponentTransferElement;\r\n new(): SVGFEComponentTransferElement;\r\n}\r\n\r\ninterface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n in2: SVGAnimatedString;\r\n k1: SVGAnimatedNumber;\r\n k2: SVGAnimatedNumber;\r\n k3: SVGAnimatedNumber;\r\n k4: SVGAnimatedNumber;\r\n operator: SVGAnimatedEnumeration;\r\n SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;\r\n SVG_FECOMPOSITE_OPERATOR_ATOP: number;\r\n SVG_FECOMPOSITE_OPERATOR_IN: number;\r\n SVG_FECOMPOSITE_OPERATOR_OUT: number;\r\n SVG_FECOMPOSITE_OPERATOR_OVER: number;\r\n SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;\r\n SVG_FECOMPOSITE_OPERATOR_XOR: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFECompositeElement: {\r\n prototype: SVGFECompositeElement;\r\n new(): SVGFECompositeElement;\r\n SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;\r\n SVG_FECOMPOSITE_OPERATOR_ATOP: number;\r\n SVG_FECOMPOSITE_OPERATOR_IN: number;\r\n SVG_FECOMPOSITE_OPERATOR_OUT: number;\r\n SVG_FECOMPOSITE_OPERATOR_OVER: number;\r\n SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;\r\n SVG_FECOMPOSITE_OPERATOR_XOR: number;\r\n}\r\n\r\ninterface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n bias: SVGAnimatedNumber;\r\n divisor: SVGAnimatedNumber;\r\n edgeMode: SVGAnimatedEnumeration;\r\n in1: SVGAnimatedString;\r\n kernelMatrix: SVGAnimatedNumberList;\r\n kernelUnitLengthX: SVGAnimatedNumber;\r\n kernelUnitLengthY: SVGAnimatedNumber;\r\n orderX: SVGAnimatedInteger;\r\n orderY: SVGAnimatedInteger;\r\n preserveAlpha: SVGAnimatedBoolean;\r\n targetX: SVGAnimatedInteger;\r\n targetY: SVGAnimatedInteger;\r\n SVG_EDGEMODE_DUPLICATE: number;\r\n SVG_EDGEMODE_NONE: number;\r\n SVG_EDGEMODE_UNKNOWN: number;\r\n SVG_EDGEMODE_WRAP: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEConvolveMatrixElement: {\r\n prototype: SVGFEConvolveMatrixElement;\r\n new(): SVGFEConvolveMatrixElement;\r\n SVG_EDGEMODE_DUPLICATE: number;\r\n SVG_EDGEMODE_NONE: number;\r\n SVG_EDGEMODE_UNKNOWN: number;\r\n SVG_EDGEMODE_WRAP: number;\r\n}\r\n\r\ninterface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n diffuseConstant: SVGAnimatedNumber;\r\n in1: SVGAnimatedString;\r\n kernelUnitLengthX: SVGAnimatedNumber;\r\n kernelUnitLengthY: SVGAnimatedNumber;\r\n surfaceScale: SVGAnimatedNumber;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEDiffuseLightingElement: {\r\n prototype: SVGFEDiffuseLightingElement;\r\n new(): SVGFEDiffuseLightingElement;\r\n}\r\n\r\ninterface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n in2: SVGAnimatedString;\r\n scale: SVGAnimatedNumber;\r\n xChannelSelector: SVGAnimatedEnumeration;\r\n yChannelSelector: SVGAnimatedEnumeration;\r\n SVG_CHANNEL_A: number;\r\n SVG_CHANNEL_B: number;\r\n SVG_CHANNEL_G: number;\r\n SVG_CHANNEL_R: number;\r\n SVG_CHANNEL_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEDisplacementMapElement: {\r\n prototype: SVGFEDisplacementMapElement;\r\n new(): SVGFEDisplacementMapElement;\r\n SVG_CHANNEL_A: number;\r\n SVG_CHANNEL_B: number;\r\n SVG_CHANNEL_G: number;\r\n SVG_CHANNEL_R: number;\r\n SVG_CHANNEL_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEDistantLightElement extends SVGElement {\r\n azimuth: SVGAnimatedNumber;\r\n elevation: SVGAnimatedNumber;\r\n}\r\n\r\ndeclare var SVGFEDistantLightElement: {\r\n prototype: SVGFEDistantLightElement;\r\n new(): SVGFEDistantLightElement;\r\n}\r\n\r\ninterface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEFloodElement: {\r\n prototype: SVGFEFloodElement;\r\n new(): SVGFEFloodElement;\r\n}\r\n\r\ninterface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncAElement: {\r\n prototype: SVGFEFuncAElement;\r\n new(): SVGFEFuncAElement;\r\n}\r\n\r\ninterface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncBElement: {\r\n prototype: SVGFEFuncBElement;\r\n new(): SVGFEFuncBElement;\r\n}\r\n\r\ninterface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncGElement: {\r\n prototype: SVGFEFuncGElement;\r\n new(): SVGFEFuncGElement;\r\n}\r\n\r\ninterface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncRElement: {\r\n prototype: SVGFEFuncRElement;\r\n new(): SVGFEFuncRElement;\r\n}\r\n\r\ninterface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n stdDeviationX: SVGAnimatedNumber;\r\n stdDeviationY: SVGAnimatedNumber;\r\n setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEGaussianBlurElement: {\r\n prototype: SVGFEGaussianBlurElement;\r\n new(): SVGFEGaussianBlurElement;\r\n}\r\n\r\ninterface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {\r\n preserveAspectRatio: SVGAnimatedPreserveAspectRatio;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEImageElement: {\r\n prototype: SVGFEImageElement;\r\n new(): SVGFEImageElement;\r\n}\r\n\r\ninterface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEMergeElement: {\r\n prototype: SVGFEMergeElement;\r\n new(): SVGFEMergeElement;\r\n}\r\n\r\ninterface SVGFEMergeNodeElement extends SVGElement {\r\n in1: SVGAnimatedString;\r\n}\r\n\r\ndeclare var SVGFEMergeNodeElement: {\r\n prototype: SVGFEMergeNodeElement;\r\n new(): SVGFEMergeNodeElement;\r\n}\r\n\r\ninterface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n operator: SVGAnimatedEnumeration;\r\n radiusX: SVGAnimatedNumber;\r\n radiusY: SVGAnimatedNumber;\r\n SVG_MORPHOLOGY_OPERATOR_DILATE: number;\r\n SVG_MORPHOLOGY_OPERATOR_ERODE: number;\r\n SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEMorphologyElement: {\r\n prototype: SVGFEMorphologyElement;\r\n new(): SVGFEMorphologyElement;\r\n SVG_MORPHOLOGY_OPERATOR_DILATE: number;\r\n SVG_MORPHOLOGY_OPERATOR_ERODE: number;\r\n SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n dx: SVGAnimatedNumber;\r\n dy: SVGAnimatedNumber;\r\n in1: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEOffsetElement: {\r\n prototype: SVGFEOffsetElement;\r\n new(): SVGFEOffsetElement;\r\n}\r\n\r\ninterface SVGFEPointLightElement extends SVGElement {\r\n x: SVGAnimatedNumber;\r\n y: SVGAnimatedNumber;\r\n z: SVGAnimatedNumber;\r\n}\r\n\r\ndeclare var SVGFEPointLightElement: {\r\n prototype: SVGFEPointLightElement;\r\n new(): SVGFEPointLightElement;\r\n}\r\n\r\ninterface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n kernelUnitLengthX: SVGAnimatedNumber;\r\n kernelUnitLengthY: SVGAnimatedNumber;\r\n specularConstant: SVGAnimatedNumber;\r\n specularExponent: SVGAnimatedNumber;\r\n surfaceScale: SVGAnimatedNumber;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFESpecularLightingElement: {\r\n prototype: SVGFESpecularLightingElement;\r\n new(): SVGFESpecularLightingElement;\r\n}\r\n\r\ninterface SVGFESpotLightElement extends SVGElement {\r\n limitingConeAngle: SVGAnimatedNumber;\r\n pointsAtX: SVGAnimatedNumber;\r\n pointsAtY: SVGAnimatedNumber;\r\n pointsAtZ: SVGAnimatedNumber;\r\n specularExponent: SVGAnimatedNumber;\r\n x: SVGAnimatedNumber;\r\n y: SVGAnimatedNumber;\r\n z: SVGAnimatedNumber;\r\n}\r\n\r\ndeclare var SVGFESpotLightElement: {\r\n prototype: SVGFESpotLightElement;\r\n new(): SVGFESpotLightElement;\r\n}\r\n\r\ninterface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFETileElement: {\r\n prototype: SVGFETileElement;\r\n new(): SVGFETileElement;\r\n}\r\n\r\ninterface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n baseFrequencyX: SVGAnimatedNumber;\r\n baseFrequencyY: SVGAnimatedNumber;\r\n numOctaves: SVGAnimatedInteger;\r\n seed: SVGAnimatedNumber;\r\n stitchTiles: SVGAnimatedEnumeration;\r\n type: SVGAnimatedEnumeration;\r\n SVG_STITCHTYPE_NOSTITCH: number;\r\n SVG_STITCHTYPE_STITCH: number;\r\n SVG_STITCHTYPE_UNKNOWN: number;\r\n SVG_TURBULENCE_TYPE_FRACTALNOISE: number;\r\n SVG_TURBULENCE_TYPE_TURBULENCE: number;\r\n SVG_TURBULENCE_TYPE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFETurbulenceElement: {\r\n prototype: SVGFETurbulenceElement;\r\n new(): SVGFETurbulenceElement;\r\n SVG_STITCHTYPE_NOSTITCH: number;\r\n SVG_STITCHTYPE_STITCH: number;\r\n SVG_STITCHTYPE_UNKNOWN: number;\r\n SVG_TURBULENCE_TYPE_FRACTALNOISE: number;\r\n SVG_TURBULENCE_TYPE_TURBULENCE: number;\r\n SVG_TURBULENCE_TYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {\r\n filterResX: SVGAnimatedInteger;\r\n filterResY: SVGAnimatedInteger;\r\n filterUnits: SVGAnimatedEnumeration;\r\n height: SVGAnimatedLength;\r\n primitiveUnits: SVGAnimatedEnumeration;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n setFilterRes(filterResX: number, filterResY: number): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFilterElement: {\r\n prototype: SVGFilterElement;\r\n new(): SVGFilterElement;\r\n}\r\n\r\ninterface SVGForeignObjectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n height: SVGAnimatedLength;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGForeignObjectElement: {\r\n prototype: SVGForeignObjectElement;\r\n new(): SVGForeignObjectElement;\r\n}\r\n\r\ninterface SVGGElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGGElement: {\r\n prototype: SVGGElement;\r\n new(): SVGGElement;\r\n}\r\n\r\ninterface SVGGradientElement extends SVGElement, SVGStylable, SVGExternalResourcesRequired, SVGURIReference, SVGUnitTypes {\r\n gradientTransform: SVGAnimatedTransformList;\r\n gradientUnits: SVGAnimatedEnumeration;\r\n spreadMethod: SVGAnimatedEnumeration;\r\n SVG_SPREADMETHOD_PAD: number;\r\n SVG_SPREADMETHOD_REFLECT: number;\r\n SVG_SPREADMETHOD_REPEAT: number;\r\n SVG_SPREADMETHOD_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGGradientElement: {\r\n prototype: SVGGradientElement;\r\n new(): SVGGradientElement;\r\n SVG_SPREADMETHOD_PAD: number;\r\n SVG_SPREADMETHOD_REFLECT: number;\r\n SVG_SPREADMETHOD_REPEAT: number;\r\n SVG_SPREADMETHOD_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGImageElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {\r\n height: SVGAnimatedLength;\r\n preserveAspectRatio: SVGAnimatedPreserveAspectRatio;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGImageElement: {\r\n prototype: SVGImageElement;\r\n new(): SVGImageElement;\r\n}\r\n\r\ninterface SVGLength {\r\n unitType: number;\r\n value: number;\r\n valueAsString: string;\r\n valueInSpecifiedUnits: number;\r\n convertToSpecifiedUnits(unitType: number): void;\r\n newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;\r\n SVG_LENGTHTYPE_CM: number;\r\n SVG_LENGTHTYPE_EMS: number;\r\n SVG_LENGTHTYPE_EXS: number;\r\n SVG_LENGTHTYPE_IN: number;\r\n SVG_LENGTHTYPE_MM: number;\r\n SVG_LENGTHTYPE_NUMBER: number;\r\n SVG_LENGTHTYPE_PC: number;\r\n SVG_LENGTHTYPE_PERCENTAGE: number;\r\n SVG_LENGTHTYPE_PT: number;\r\n SVG_LENGTHTYPE_PX: number;\r\n SVG_LENGTHTYPE_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGLength: {\r\n prototype: SVGLength;\r\n new(): SVGLength;\r\n SVG_LENGTHTYPE_CM: number;\r\n SVG_LENGTHTYPE_EMS: number;\r\n SVG_LENGTHTYPE_EXS: number;\r\n SVG_LENGTHTYPE_IN: number;\r\n SVG_LENGTHTYPE_MM: number;\r\n SVG_LENGTHTYPE_NUMBER: number;\r\n SVG_LENGTHTYPE_PC: number;\r\n SVG_LENGTHTYPE_PERCENTAGE: number;\r\n SVG_LENGTHTYPE_PT: number;\r\n SVG_LENGTHTYPE_PX: number;\r\n SVG_LENGTHTYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGLengthList {\r\n numberOfItems: number;\r\n appendItem(newItem: SVGLength): SVGLength;\r\n clear(): void;\r\n getItem(index: number): SVGLength;\r\n initialize(newItem: SVGLength): SVGLength;\r\n insertItemBefore(newItem: SVGLength, index: number): SVGLength;\r\n removeItem(index: number): SVGLength;\r\n replaceItem(newItem: SVGLength, index: number): SVGLength;\r\n}\r\n\r\ndeclare var SVGLengthList: {\r\n prototype: SVGLengthList;\r\n new(): SVGLengthList;\r\n}\r\n\r\ninterface SVGLineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n x1: SVGAnimatedLength;\r\n x2: SVGAnimatedLength;\r\n y1: SVGAnimatedLength;\r\n y2: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGLineElement: {\r\n prototype: SVGLineElement;\r\n new(): SVGLineElement;\r\n}\r\n\r\ninterface SVGLinearGradientElement extends SVGGradientElement {\r\n x1: SVGAnimatedLength;\r\n x2: SVGAnimatedLength;\r\n y1: SVGAnimatedLength;\r\n y2: SVGAnimatedLength;\r\n}\r\n\r\ndeclare var SVGLinearGradientElement: {\r\n prototype: SVGLinearGradientElement;\r\n new(): SVGLinearGradientElement;\r\n}\r\n\r\ninterface SVGMarkerElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {\r\n markerHeight: SVGAnimatedLength;\r\n markerUnits: SVGAnimatedEnumeration;\r\n markerWidth: SVGAnimatedLength;\r\n orientAngle: SVGAnimatedAngle;\r\n orientType: SVGAnimatedEnumeration;\r\n refX: SVGAnimatedLength;\r\n refY: SVGAnimatedLength;\r\n setOrientToAngle(angle: SVGAngle): void;\r\n setOrientToAuto(): void;\r\n SVG_MARKERUNITS_STROKEWIDTH: number;\r\n SVG_MARKERUNITS_UNKNOWN: number;\r\n SVG_MARKERUNITS_USERSPACEONUSE: number;\r\n SVG_MARKER_ORIENT_ANGLE: number;\r\n SVG_MARKER_ORIENT_AUTO: number;\r\n SVG_MARKER_ORIENT_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGMarkerElement: {\r\n prototype: SVGMarkerElement;\r\n new(): SVGMarkerElement;\r\n SVG_MARKERUNITS_STROKEWIDTH: number;\r\n SVG_MARKERUNITS_UNKNOWN: number;\r\n SVG_MARKERUNITS_USERSPACEONUSE: number;\r\n SVG_MARKER_ORIENT_ANGLE: number;\r\n SVG_MARKER_ORIENT_AUTO: number;\r\n SVG_MARKER_ORIENT_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGMaskElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {\r\n height: SVGAnimatedLength;\r\n maskContentUnits: SVGAnimatedEnumeration;\r\n maskUnits: SVGAnimatedEnumeration;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGMaskElement: {\r\n prototype: SVGMaskElement;\r\n new(): SVGMaskElement;\r\n}\r\n\r\ninterface SVGMatrix {\r\n a: number;\r\n b: number;\r\n c: number;\r\n d: number;\r\n e: number;\r\n f: number;\r\n flipX(): SVGMatrix;\r\n flipY(): SVGMatrix;\r\n inverse(): SVGMatrix;\r\n multiply(secondMatrix: SVGMatrix): SVGMatrix;\r\n rotate(angle: number): SVGMatrix;\r\n rotateFromVector(x: number, y: number): SVGMatrix;\r\n scale(scaleFactor: number): SVGMatrix;\r\n scaleNonUniform(scaleFactorX: number, scaleFactorY: number): SVGMatrix;\r\n skewX(angle: number): SVGMatrix;\r\n skewY(angle: number): SVGMatrix;\r\n translate(x: number, y: number): SVGMatrix;\r\n}\r\n\r\ndeclare var SVGMatrix: {\r\n prototype: SVGMatrix;\r\n new(): SVGMatrix;\r\n}\r\n\r\ninterface SVGMetadataElement extends SVGElement {\r\n}\r\n\r\ndeclare var SVGMetadataElement: {\r\n prototype: SVGMetadataElement;\r\n new(): SVGMetadataElement;\r\n}\r\n\r\ninterface SVGNumber {\r\n value: number;\r\n}\r\n\r\ndeclare var SVGNumber: {\r\n prototype: SVGNumber;\r\n new(): SVGNumber;\r\n}\r\n\r\ninterface SVGNumberList {\r\n numberOfItems: number;\r\n appendItem(newItem: SVGNumber): SVGNumber;\r\n clear(): void;\r\n getItem(index: number): SVGNumber;\r\n initialize(newItem: SVGNumber): SVGNumber;\r\n insertItemBefore(newItem: SVGNumber, index: number): SVGNumber;\r\n removeItem(index: number): SVGNumber;\r\n replaceItem(newItem: SVGNumber, index: number): SVGNumber;\r\n}\r\n\r\ndeclare var SVGNumberList: {\r\n prototype: SVGNumberList;\r\n new(): SVGNumberList;\r\n}\r\n\r\ninterface SVGPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPathData {\r\n createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs;\r\n createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel;\r\n createSVGPathSegClosePath(): SVGPathSegClosePath;\r\n createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs;\r\n createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel;\r\n createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs;\r\n createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel;\r\n createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs;\r\n createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel;\r\n createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs;\r\n createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel;\r\n createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs;\r\n createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs;\r\n createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel;\r\n createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel;\r\n createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs;\r\n createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel;\r\n createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs;\r\n createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel;\r\n getPathSegAtLength(distance: number): number;\r\n getPointAtLength(distance: number): SVGPoint;\r\n getTotalLength(): number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPathElement: {\r\n prototype: SVGPathElement;\r\n new(): SVGPathElement;\r\n}\r\n\r\ninterface SVGPathSeg {\r\n pathSegType: number;\r\n pathSegTypeAsLetter: string;\r\n PATHSEG_ARC_ABS: number;\r\n PATHSEG_ARC_REL: number;\r\n PATHSEG_CLOSEPATH: number;\r\n PATHSEG_CURVETO_CUBIC_ABS: number;\r\n PATHSEG_CURVETO_CUBIC_REL: number;\r\n PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;\r\n PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;\r\n PATHSEG_CURVETO_QUADRATIC_ABS: number;\r\n PATHSEG_CURVETO_QUADRATIC_REL: number;\r\n PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;\r\n PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;\r\n PATHSEG_LINETO_ABS: number;\r\n PATHSEG_LINETO_HORIZONTAL_ABS: number;\r\n PATHSEG_LINETO_HORIZONTAL_REL: number;\r\n PATHSEG_LINETO_REL: number;\r\n PATHSEG_LINETO_VERTICAL_ABS: number;\r\n PATHSEG_LINETO_VERTICAL_REL: number;\r\n PATHSEG_MOVETO_ABS: number;\r\n PATHSEG_MOVETO_REL: number;\r\n PATHSEG_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGPathSeg: {\r\n prototype: SVGPathSeg;\r\n new(): SVGPathSeg;\r\n PATHSEG_ARC_ABS: number;\r\n PATHSEG_ARC_REL: number;\r\n PATHSEG_CLOSEPATH: number;\r\n PATHSEG_CURVETO_CUBIC_ABS: number;\r\n PATHSEG_CURVETO_CUBIC_REL: number;\r\n PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;\r\n PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;\r\n PATHSEG_CURVETO_QUADRATIC_ABS: number;\r\n PATHSEG_CURVETO_QUADRATIC_REL: number;\r\n PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;\r\n PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;\r\n PATHSEG_LINETO_ABS: number;\r\n PATHSEG_LINETO_HORIZONTAL_ABS: number;\r\n PATHSEG_LINETO_HORIZONTAL_REL: number;\r\n PATHSEG_LINETO_REL: number;\r\n PATHSEG_LINETO_VERTICAL_ABS: number;\r\n PATHSEG_LINETO_VERTICAL_REL: number;\r\n PATHSEG_MOVETO_ABS: number;\r\n PATHSEG_MOVETO_REL: number;\r\n PATHSEG_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGPathSegArcAbs extends SVGPathSeg {\r\n angle: number;\r\n largeArcFlag: boolean;\r\n r1: number;\r\n r2: number;\r\n sweepFlag: boolean;\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegArcAbs: {\r\n prototype: SVGPathSegArcAbs;\r\n new(): SVGPathSegArcAbs;\r\n}\r\n\r\ninterface SVGPathSegArcRel extends SVGPathSeg {\r\n angle: number;\r\n largeArcFlag: boolean;\r\n r1: number;\r\n r2: number;\r\n sweepFlag: boolean;\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegArcRel: {\r\n prototype: SVGPathSegArcRel;\r\n new(): SVGPathSegArcRel;\r\n}\r\n\r\ninterface SVGPathSegClosePath extends SVGPathSeg {\r\n}\r\n\r\ndeclare var SVGPathSegClosePath: {\r\n prototype: SVGPathSegClosePath;\r\n new(): SVGPathSegClosePath;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n x2: number;\r\n y: number;\r\n y1: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicAbs: {\r\n prototype: SVGPathSegCurvetoCubicAbs;\r\n new(): SVGPathSegCurvetoCubicAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicRel extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n x2: number;\r\n y: number;\r\n y1: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicRel: {\r\n prototype: SVGPathSegCurvetoCubicRel;\r\n new(): SVGPathSegCurvetoCubicRel;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {\r\n x: number;\r\n x2: number;\r\n y: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicSmoothAbs: {\r\n prototype: SVGPathSegCurvetoCubicSmoothAbs;\r\n new(): SVGPathSegCurvetoCubicSmoothAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {\r\n x: number;\r\n x2: number;\r\n y: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicSmoothRel: {\r\n prototype: SVGPathSegCurvetoCubicSmoothRel;\r\n new(): SVGPathSegCurvetoCubicSmoothRel;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n y: number;\r\n y1: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticAbs: {\r\n prototype: SVGPathSegCurvetoQuadraticAbs;\r\n new(): SVGPathSegCurvetoQuadraticAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n y: number;\r\n y1: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticRel: {\r\n prototype: SVGPathSegCurvetoQuadraticRel;\r\n new(): SVGPathSegCurvetoQuadraticRel;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticSmoothAbs: {\r\n prototype: SVGPathSegCurvetoQuadraticSmoothAbs;\r\n new(): SVGPathSegCurvetoQuadraticSmoothAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticSmoothRel: {\r\n prototype: SVGPathSegCurvetoQuadraticSmoothRel;\r\n new(): SVGPathSegCurvetoQuadraticSmoothRel;\r\n}\r\n\r\ninterface SVGPathSegLinetoAbs extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoAbs: {\r\n prototype: SVGPathSegLinetoAbs;\r\n new(): SVGPathSegLinetoAbs;\r\n}\r\n\r\ninterface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {\r\n x: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoHorizontalAbs: {\r\n prototype: SVGPathSegLinetoHorizontalAbs;\r\n new(): SVGPathSegLinetoHorizontalAbs;\r\n}\r\n\r\ninterface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {\r\n x: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoHorizontalRel: {\r\n prototype: SVGPathSegLinetoHorizontalRel;\r\n new(): SVGPathSegLinetoHorizontalRel;\r\n}\r\n\r\ninterface SVGPathSegLinetoRel extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoRel: {\r\n prototype: SVGPathSegLinetoRel;\r\n new(): SVGPathSegLinetoRel;\r\n}\r\n\r\ninterface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoVerticalAbs: {\r\n prototype: SVGPathSegLinetoVerticalAbs;\r\n new(): SVGPathSegLinetoVerticalAbs;\r\n}\r\n\r\ninterface SVGPathSegLinetoVerticalRel extends SVGPathSeg {\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoVerticalRel: {\r\n prototype: SVGPathSegLinetoVerticalRel;\r\n new(): SVGPathSegLinetoVerticalRel;\r\n}\r\n\r\ninterface SVGPathSegList {\r\n numberOfItems: number;\r\n appendItem(newItem: SVGPathSeg): SVGPathSeg;\r\n clear(): void;\r\n getItem(index: number): SVGPathSeg;\r\n initialize(newItem: SVGPathSeg): SVGPathSeg;\r\n insertItemBefore(newItem: SVGPathSeg, index: number): SVGPathSeg;\r\n removeItem(index: number): SVGPathSeg;\r\n replaceItem(newItem: SVGPathSeg, index: number): SVGPathSeg;\r\n}\r\n\r\ndeclare var SVGPathSegList: {\r\n prototype: SVGPathSegList;\r\n new(): SVGPathSegList;\r\n}\r\n\r\ninterface SVGPathSegMovetoAbs extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegMovetoAbs: {\r\n prototype: SVGPathSegMovetoAbs;\r\n new(): SVGPathSegMovetoAbs;\r\n}\r\n\r\ninterface SVGPathSegMovetoRel extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegMovetoRel: {\r\n prototype: SVGPathSegMovetoRel;\r\n new(): SVGPathSegMovetoRel;\r\n}\r\n\r\ninterface SVGPatternElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGURIReference, SVGUnitTypes {\r\n height: SVGAnimatedLength;\r\n patternContentUnits: SVGAnimatedEnumeration;\r\n patternTransform: SVGAnimatedTransformList;\r\n patternUnits: SVGAnimatedEnumeration;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPatternElement: {\r\n prototype: SVGPatternElement;\r\n new(): SVGPatternElement;\r\n}\r\n\r\ninterface SVGPoint {\r\n x: number;\r\n y: number;\r\n matrixTransform(matrix: SVGMatrix): SVGPoint;\r\n}\r\n\r\ndeclare var SVGPoint: {\r\n prototype: SVGPoint;\r\n new(): SVGPoint;\r\n}\r\n\r\ninterface SVGPointList {\r\n numberOfItems: number;\r\n appendItem(newItem: SVGPoint): SVGPoint;\r\n clear(): void;\r\n getItem(index: number): SVGPoint;\r\n initialize(newItem: SVGPoint): SVGPoint;\r\n insertItemBefore(newItem: SVGPoint, index: number): SVGPoint;\r\n removeItem(index: number): SVGPoint;\r\n replaceItem(newItem: SVGPoint, index: number): SVGPoint;\r\n}\r\n\r\ndeclare var SVGPointList: {\r\n prototype: SVGPointList;\r\n new(): SVGPointList;\r\n}\r\n\r\ninterface SVGPolygonElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPolygonElement: {\r\n prototype: SVGPolygonElement;\r\n new(): SVGPolygonElement;\r\n}\r\n\r\ninterface SVGPolylineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPolylineElement: {\r\n prototype: SVGPolylineElement;\r\n new(): SVGPolylineElement;\r\n}\r\n\r\ninterface SVGPreserveAspectRatio {\r\n align: number;\r\n meetOrSlice: number;\r\n SVG_MEETORSLICE_MEET: number;\r\n SVG_MEETORSLICE_SLICE: number;\r\n SVG_MEETORSLICE_UNKNOWN: number;\r\n SVG_PRESERVEASPECTRATIO_NONE: number;\r\n SVG_PRESERVEASPECTRATIO_UNKNOWN: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMIN: number;\r\n}\r\n\r\ndeclare var SVGPreserveAspectRatio: {\r\n prototype: SVGPreserveAspectRatio;\r\n new(): SVGPreserveAspectRatio;\r\n SVG_MEETORSLICE_MEET: number;\r\n SVG_MEETORSLICE_SLICE: number;\r\n SVG_MEETORSLICE_UNKNOWN: number;\r\n SVG_PRESERVEASPECTRATIO_NONE: number;\r\n SVG_PRESERVEASPECTRATIO_UNKNOWN: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMIN: number;\r\n}\r\n\r\ninterface SVGRadialGradientElement extends SVGGradientElement {\r\n cx: SVGAnimatedLength;\r\n cy: SVGAnimatedLength;\r\n fx: SVGAnimatedLength;\r\n fy: SVGAnimatedLength;\r\n r: SVGAnimatedLength;\r\n}\r\n\r\ndeclare var SVGRadialGradientElement: {\r\n prototype: SVGRadialGradientElement;\r\n new(): SVGRadialGradientElement;\r\n}\r\n\r\ninterface SVGRect {\r\n height: number;\r\n width: number;\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGRect: {\r\n prototype: SVGRect;\r\n new(): SVGRect;\r\n}\r\n\r\ninterface SVGRectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n height: SVGAnimatedLength;\r\n rx: SVGAnimatedLength;\r\n ry: SVGAnimatedLength;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGRectElement: {\r\n prototype: SVGRectElement;\r\n new(): SVGRectElement;\r\n}\r\n\r\ninterface SVGSVGElement extends SVGElement, DocumentEvent, SVGLocatable, SVGTests, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {\r\n contentScriptType: string;\r\n contentStyleType: string;\r\n currentScale: number;\r\n currentTranslate: SVGPoint;\r\n height: SVGAnimatedLength;\r\n onabort: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n onresize: (ev: UIEvent) => any;\r\n onscroll: (ev: UIEvent) => any;\r\n onunload: (ev: Event) => any;\r\n onzoom: (ev: SVGZoomEvent) => any;\r\n pixelUnitToMillimeterX: number;\r\n pixelUnitToMillimeterY: number;\r\n screenPixelToMillimeterX: number;\r\n screenPixelToMillimeterY: number;\r\n viewport: SVGRect;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n checkEnclosure(element: SVGElement, rect: SVGRect): boolean;\r\n checkIntersection(element: SVGElement, rect: SVGRect): boolean;\r\n createSVGAngle(): SVGAngle;\r\n createSVGLength(): SVGLength;\r\n createSVGMatrix(): SVGMatrix;\r\n createSVGNumber(): SVGNumber;\r\n createSVGPoint(): SVGPoint;\r\n createSVGRect(): SVGRect;\r\n createSVGTransform(): SVGTransform;\r\n createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;\r\n deselectAll(): void;\r\n forceRedraw(): void;\r\n getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;\r\n getCurrentTime(): number;\r\n getElementById(elementId: string): Element;\r\n getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeList;\r\n getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeList;\r\n pauseAnimations(): void;\r\n setCurrentTime(seconds: number): void;\r\n suspendRedraw(maxWaitMilliseconds: number): number;\r\n unpauseAnimations(): void;\r\n unsuspendRedraw(suspendHandleID: number): void;\r\n unsuspendRedrawAll(): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGAbort\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGError\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGUnload\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGZoom\", listener: (ev: SVGZoomEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusin\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusout\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGSVGElement: {\r\n prototype: SVGSVGElement;\r\n new(): SVGSVGElement;\r\n}\r\n\r\ninterface SVGScriptElement extends SVGElement, SVGExternalResourcesRequired, SVGURIReference {\r\n type: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGScriptElement: {\r\n prototype: SVGScriptElement;\r\n new(): SVGScriptElement;\r\n}\r\n\r\ninterface SVGStopElement extends SVGElement, SVGStylable {\r\n offset: SVGAnimatedNumber;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGStopElement: {\r\n prototype: SVGStopElement;\r\n new(): SVGStopElement;\r\n}\r\n\r\ninterface SVGStringList {\r\n numberOfItems: number;\r\n appendItem(newItem: string): string;\r\n clear(): void;\r\n getItem(index: number): string;\r\n initialize(newItem: string): string;\r\n insertItemBefore(newItem: string, index: number): string;\r\n removeItem(index: number): string;\r\n replaceItem(newItem: string, index: number): string;\r\n}\r\n\r\ndeclare var SVGStringList: {\r\n prototype: SVGStringList;\r\n new(): SVGStringList;\r\n}\r\n\r\ninterface SVGStyleElement extends SVGElement, SVGLangSpace {\r\n media: string;\r\n title: string;\r\n type: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGStyleElement: {\r\n prototype: SVGStyleElement;\r\n new(): SVGStyleElement;\r\n}\r\n\r\ninterface SVGSwitchElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGSwitchElement: {\r\n prototype: SVGSwitchElement;\r\n new(): SVGSwitchElement;\r\n}\r\n\r\ninterface SVGSymbolElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGSymbolElement: {\r\n prototype: SVGSymbolElement;\r\n new(): SVGSymbolElement;\r\n}\r\n\r\ninterface SVGTSpanElement extends SVGTextPositioningElement {\r\n}\r\n\r\ndeclare var SVGTSpanElement: {\r\n prototype: SVGTSpanElement;\r\n new(): SVGTSpanElement;\r\n}\r\n\r\ninterface SVGTextContentElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n lengthAdjust: SVGAnimatedEnumeration;\r\n textLength: SVGAnimatedLength;\r\n getCharNumAtPosition(point: SVGPoint): number;\r\n getComputedTextLength(): number;\r\n getEndPositionOfChar(charnum: number): SVGPoint;\r\n getExtentOfChar(charnum: number): SVGRect;\r\n getNumberOfChars(): number;\r\n getRotationOfChar(charnum: number): number;\r\n getStartPositionOfChar(charnum: number): SVGPoint;\r\n getSubStringLength(charnum: number, nchars: number): number;\r\n selectSubString(charnum: number, nchars: number): void;\r\n LENGTHADJUST_SPACING: number;\r\n LENGTHADJUST_SPACINGANDGLYPHS: number;\r\n LENGTHADJUST_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTextContentElement: {\r\n prototype: SVGTextContentElement;\r\n new(): SVGTextContentElement;\r\n LENGTHADJUST_SPACING: number;\r\n LENGTHADJUST_SPACINGANDGLYPHS: number;\r\n LENGTHADJUST_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGTextElement extends SVGTextPositioningElement, SVGTransformable {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTextElement: {\r\n prototype: SVGTextElement;\r\n new(): SVGTextElement;\r\n}\r\n\r\ninterface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {\r\n method: SVGAnimatedEnumeration;\r\n spacing: SVGAnimatedEnumeration;\r\n startOffset: SVGAnimatedLength;\r\n TEXTPATH_METHODTYPE_ALIGN: number;\r\n TEXTPATH_METHODTYPE_STRETCH: number;\r\n TEXTPATH_METHODTYPE_UNKNOWN: number;\r\n TEXTPATH_SPACINGTYPE_AUTO: number;\r\n TEXTPATH_SPACINGTYPE_EXACT: number;\r\n TEXTPATH_SPACINGTYPE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTextPathElement: {\r\n prototype: SVGTextPathElement;\r\n new(): SVGTextPathElement;\r\n TEXTPATH_METHODTYPE_ALIGN: number;\r\n TEXTPATH_METHODTYPE_STRETCH: number;\r\n TEXTPATH_METHODTYPE_UNKNOWN: number;\r\n TEXTPATH_SPACINGTYPE_AUTO: number;\r\n TEXTPATH_SPACINGTYPE_EXACT: number;\r\n TEXTPATH_SPACINGTYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGTextPositioningElement extends SVGTextContentElement {\r\n dx: SVGAnimatedLengthList;\r\n dy: SVGAnimatedLengthList;\r\n rotate: SVGAnimatedNumberList;\r\n x: SVGAnimatedLengthList;\r\n y: SVGAnimatedLengthList;\r\n}\r\n\r\ndeclare var SVGTextPositioningElement: {\r\n prototype: SVGTextPositioningElement;\r\n new(): SVGTextPositioningElement;\r\n}\r\n\r\ninterface SVGTitleElement extends SVGElement, SVGStylable, SVGLangSpace {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTitleElement: {\r\n prototype: SVGTitleElement;\r\n new(): SVGTitleElement;\r\n}\r\n\r\ninterface SVGTransform {\r\n angle: number;\r\n matrix: SVGMatrix;\r\n type: number;\r\n setMatrix(matrix: SVGMatrix): void;\r\n setRotate(angle: number, cx: number, cy: number): void;\r\n setScale(sx: number, sy: number): void;\r\n setSkewX(angle: number): void;\r\n setSkewY(angle: number): void;\r\n setTranslate(tx: number, ty: number): void;\r\n SVG_TRANSFORM_MATRIX: number;\r\n SVG_TRANSFORM_ROTATE: number;\r\n SVG_TRANSFORM_SCALE: number;\r\n SVG_TRANSFORM_SKEWX: number;\r\n SVG_TRANSFORM_SKEWY: number;\r\n SVG_TRANSFORM_TRANSLATE: number;\r\n SVG_TRANSFORM_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGTransform: {\r\n prototype: SVGTransform;\r\n new(): SVGTransform;\r\n SVG_TRANSFORM_MATRIX: number;\r\n SVG_TRANSFORM_ROTATE: number;\r\n SVG_TRANSFORM_SCALE: number;\r\n SVG_TRANSFORM_SKEWX: number;\r\n SVG_TRANSFORM_SKEWY: number;\r\n SVG_TRANSFORM_TRANSLATE: number;\r\n SVG_TRANSFORM_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGTransformList {\r\n numberOfItems: number;\r\n appendItem(newItem: SVGTransform): SVGTransform;\r\n clear(): void;\r\n consolidate(): SVGTransform;\r\n createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;\r\n getItem(index: number): SVGTransform;\r\n initialize(newItem: SVGTransform): SVGTransform;\r\n insertItemBefore(newItem: SVGTransform, index: number): SVGTransform;\r\n removeItem(index: number): SVGTransform;\r\n replaceItem(newItem: SVGTransform, index: number): SVGTransform;\r\n}\r\n\r\ndeclare var SVGTransformList: {\r\n prototype: SVGTransformList;\r\n new(): SVGTransformList;\r\n}\r\n\r\ninterface SVGUnitTypes {\r\n SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;\r\n SVG_UNIT_TYPE_UNKNOWN: number;\r\n SVG_UNIT_TYPE_USERSPACEONUSE: number;\r\n}\r\ndeclare var SVGUnitTypes: SVGUnitTypes;\r\n\r\ninterface SVGUseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {\r\n animatedInstanceRoot: SVGElementInstance;\r\n height: SVGAnimatedLength;\r\n instanceRoot: SVGElementInstance;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGUseElement: {\r\n prototype: SVGUseElement;\r\n new(): SVGUseElement;\r\n}\r\n\r\ninterface SVGViewElement extends SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {\r\n viewTarget: SVGStringList;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGViewElement: {\r\n prototype: SVGViewElement;\r\n new(): SVGViewElement;\r\n}\r\n\r\ninterface SVGZoomAndPan {\r\n SVG_ZOOMANDPAN_DISABLE: number;\r\n SVG_ZOOMANDPAN_MAGNIFY: number;\r\n SVG_ZOOMANDPAN_UNKNOWN: number;\r\n}\r\ndeclare var SVGZoomAndPan: SVGZoomAndPan;\r\n\r\ninterface SVGZoomEvent extends UIEvent {\r\n newScale: number;\r\n newTranslate: SVGPoint;\r\n previousScale: number;\r\n previousTranslate: SVGPoint;\r\n zoomRectScreen: SVGRect;\r\n}\r\n\r\ndeclare var SVGZoomEvent: {\r\n prototype: SVGZoomEvent;\r\n new(): SVGZoomEvent;\r\n}\r\n\r\ninterface Screen extends EventTarget {\r\n availHeight: number;\r\n availWidth: number;\r\n bufferDepth: number;\r\n colorDepth: number;\r\n deviceXDPI: number;\r\n deviceYDPI: number;\r\n fontSmoothingEnabled: boolean;\r\n height: number;\r\n logicalXDPI: number;\r\n logicalYDPI: number;\r\n msOrientation: string;\r\n onmsorientationchange: (ev: Event) => any;\r\n pixelDepth: number;\r\n systemXDPI: number;\r\n systemYDPI: number;\r\n width: number;\r\n msLockOrientation(orientations: string | string[]): boolean;\r\n msUnlockOrientation(): void;\r\n addEventListener(type: \"MSOrientationChange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Screen: {\r\n prototype: Screen;\r\n new(): Screen;\r\n}\r\n\r\ninterface ScriptNotifyEvent extends Event {\r\n callingUri: string;\r\n value: string;\r\n}\r\n\r\ndeclare var ScriptNotifyEvent: {\r\n prototype: ScriptNotifyEvent;\r\n new(): ScriptNotifyEvent;\r\n}\r\n\r\ninterface ScriptProcessorNode extends AudioNode {\r\n bufferSize: number;\r\n onaudioprocess: (ev: AudioProcessingEvent) => any;\r\n addEventListener(type: \"audioprocess\", listener: (ev: AudioProcessingEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var ScriptProcessorNode: {\r\n prototype: ScriptProcessorNode;\r\n new(): ScriptProcessorNode;\r\n}\r\n\r\ninterface Selection {\r\n anchorNode: Node;\r\n anchorOffset: number;\r\n focusNode: Node;\r\n focusOffset: number;\r\n isCollapsed: boolean;\r\n rangeCount: number;\r\n type: string;\r\n addRange(range: Range): void;\r\n collapse(parentNode: Node, offset: number): void;\r\n collapseToEnd(): void;\r\n collapseToStart(): void;\r\n containsNode(node: Node, partlyContained: boolean): boolean;\r\n deleteFromDocument(): void;\r\n empty(): void;\r\n extend(newNode: Node, offset: number): void;\r\n getRangeAt(index: number): Range;\r\n removeAllRanges(): void;\r\n removeRange(range: Range): void;\r\n selectAllChildren(parentNode: Node): void;\r\n setBaseAndExtent(baseNode: Node, baseOffset: number, extentNode: Node, extentOffset: number): void;\r\n toString(): string;\r\n}\r\n\r\ndeclare var Selection: {\r\n prototype: Selection;\r\n new(): Selection;\r\n}\r\n\r\ninterface SourceBuffer extends EventTarget {\r\n appendWindowEnd: number;\r\n appendWindowStart: number;\r\n audioTracks: AudioTrackList;\r\n buffered: TimeRanges;\r\n mode: string;\r\n timestampOffset: number;\r\n updating: boolean;\r\n videoTracks: VideoTrackList;\r\n abort(): void;\r\n appendBuffer(data: ArrayBuffer | ArrayBufferView): void;\r\n appendStream(stream: MSStream, maxSize?: number): void;\r\n remove(start: number, end: number): void;\r\n}\r\n\r\ndeclare var SourceBuffer: {\r\n prototype: SourceBuffer;\r\n new(): SourceBuffer;\r\n}\r\n\r\ninterface SourceBufferList extends EventTarget {\r\n length: number;\r\n item(index: number): SourceBuffer;\r\n [index: number]: SourceBuffer;\r\n}\r\n\r\ndeclare var SourceBufferList: {\r\n prototype: SourceBufferList;\r\n new(): SourceBufferList;\r\n}\r\n\r\ninterface StereoPannerNode extends AudioNode {\r\n pan: AudioParam;\r\n}\r\n\r\ndeclare var StereoPannerNode: {\r\n prototype: StereoPannerNode;\r\n new(): StereoPannerNode;\r\n}\r\n\r\ninterface Storage {\r\n length: number;\r\n clear(): void;\r\n getItem(key: string): any;\r\n key(index: number): string;\r\n removeItem(key: string): void;\r\n setItem(key: string, data: string): void;\r\n [key: string]: any;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var Storage: {\r\n prototype: Storage;\r\n new(): Storage;\r\n}\r\n\r\ninterface StorageEvent extends Event {\r\n url: string;\r\n key?: string;\r\n oldValue?: string;\r\n newValue?: string;\r\n storageArea?: Storage;\r\n}\r\n\r\ndeclare var StorageEvent: {\r\n prototype: StorageEvent;\r\n new (type: string, eventInitDict?: StorageEventInit): StorageEvent;\r\n}\r\n\r\ninterface StyleMedia {\r\n type: string;\r\n matchMedium(mediaquery: string): boolean;\r\n}\r\n\r\ndeclare var StyleMedia: {\r\n prototype: StyleMedia;\r\n new(): StyleMedia;\r\n}\r\n\r\ninterface StyleSheet {\r\n disabled: boolean;\r\n href: string;\r\n media: MediaList;\r\n ownerNode: Node;\r\n parentStyleSheet: StyleSheet;\r\n title: string;\r\n type: string;\r\n}\r\n\r\ndeclare var StyleSheet: {\r\n prototype: StyleSheet;\r\n new(): StyleSheet;\r\n}\r\n\r\ninterface StyleSheetList {\r\n length: number;\r\n item(index?: number): StyleSheet;\r\n [index: number]: StyleSheet;\r\n}\r\n\r\ndeclare var StyleSheetList: {\r\n prototype: StyleSheetList;\r\n new(): StyleSheetList;\r\n}\r\n\r\ninterface StyleSheetPageList {\r\n length: number;\r\n item(index: number): CSSPageRule;\r\n [index: number]: CSSPageRule;\r\n}\r\n\r\ndeclare var StyleSheetPageList: {\r\n prototype: StyleSheetPageList;\r\n new(): StyleSheetPageList;\r\n}\r\n\r\ninterface SubtleCrypto {\r\n decrypt(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;\r\n deriveBits(algorithm: string | Algorithm, baseKey: CryptoKey, length: number): any;\r\n deriveKey(algorithm: string | Algorithm, baseKey: CryptoKey, derivedKeyType: string | Algorithm, extractable: boolean, keyUsages: string[]): any;\r\n digest(algorithm: string | Algorithm, data: ArrayBufferView): any;\r\n encrypt(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;\r\n exportKey(format: string, key: CryptoKey): any;\r\n generateKey(algorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;\r\n importKey(format: string, keyData: ArrayBufferView, algorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;\r\n sign(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;\r\n unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string | Algorithm, unwrappedKeyAlgorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;\r\n verify(algorithm: string | Algorithm, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;\r\n wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string | Algorithm): any;\r\n}\r\n\r\ndeclare var SubtleCrypto: {\r\n prototype: SubtleCrypto;\r\n new(): SubtleCrypto;\r\n}\r\n\r\ninterface Text extends CharacterData {\r\n wholeText: string;\r\n replaceWholeText(content: string): Text;\r\n splitText(offset: number): Text;\r\n}\r\n\r\ndeclare var Text: {\r\n prototype: Text;\r\n new(): Text;\r\n}\r\n\r\ninterface TextEvent extends UIEvent {\r\n data: string;\r\n inputMethod: number;\r\n locale: string;\r\n initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void;\r\n DOM_INPUT_METHOD_DROP: number;\r\n DOM_INPUT_METHOD_HANDWRITING: number;\r\n DOM_INPUT_METHOD_IME: number;\r\n DOM_INPUT_METHOD_KEYBOARD: number;\r\n DOM_INPUT_METHOD_MULTIMODAL: number;\r\n DOM_INPUT_METHOD_OPTION: number;\r\n DOM_INPUT_METHOD_PASTE: number;\r\n DOM_INPUT_METHOD_SCRIPT: number;\r\n DOM_INPUT_METHOD_UNKNOWN: number;\r\n DOM_INPUT_METHOD_VOICE: number;\r\n}\r\n\r\ndeclare var TextEvent: {\r\n prototype: TextEvent;\r\n new(): TextEvent;\r\n DOM_INPUT_METHOD_DROP: number;\r\n DOM_INPUT_METHOD_HANDWRITING: number;\r\n DOM_INPUT_METHOD_IME: number;\r\n DOM_INPUT_METHOD_KEYBOARD: number;\r\n DOM_INPUT_METHOD_MULTIMODAL: number;\r\n DOM_INPUT_METHOD_OPTION: number;\r\n DOM_INPUT_METHOD_PASTE: number;\r\n DOM_INPUT_METHOD_SCRIPT: number;\r\n DOM_INPUT_METHOD_UNKNOWN: number;\r\n DOM_INPUT_METHOD_VOICE: number;\r\n}\r\n\r\ninterface TextMetrics {\r\n width: number;\r\n}\r\n\r\ndeclare var TextMetrics: {\r\n prototype: TextMetrics;\r\n new(): TextMetrics;\r\n}\r\n\r\ninterface TextRange {\r\n boundingHeight: number;\r\n boundingLeft: number;\r\n boundingTop: number;\r\n boundingWidth: number;\r\n htmlText: string;\r\n offsetLeft: number;\r\n offsetTop: number;\r\n text: string;\r\n collapse(start?: boolean): void;\r\n compareEndPoints(how: string, sourceRange: TextRange): number;\r\n duplicate(): TextRange;\r\n execCommand(cmdID: string, showUI?: boolean, value?: any): boolean;\r\n execCommandShowHelp(cmdID: string): boolean;\r\n expand(Unit: string): boolean;\r\n findText(string: string, count?: number, flags?: number): boolean;\r\n getBookmark(): string;\r\n getBoundingClientRect(): ClientRect;\r\n getClientRects(): ClientRectList;\r\n inRange(range: TextRange): boolean;\r\n isEqual(range: TextRange): boolean;\r\n move(unit: string, count?: number): number;\r\n moveEnd(unit: string, count?: number): number;\r\n moveStart(unit: string, count?: number): number;\r\n moveToBookmark(bookmark: string): boolean;\r\n moveToElementText(element: Element): void;\r\n moveToPoint(x: number, y: number): void;\r\n parentElement(): Element;\r\n pasteHTML(html: string): void;\r\n queryCommandEnabled(cmdID: string): boolean;\r\n queryCommandIndeterm(cmdID: string): boolean;\r\n queryCommandState(cmdID: string): boolean;\r\n queryCommandSupported(cmdID: string): boolean;\r\n queryCommandText(cmdID: string): string;\r\n queryCommandValue(cmdID: string): any;\r\n scrollIntoView(fStart?: boolean): void;\r\n select(): void;\r\n setEndPoint(how: string, SourceRange: TextRange): void;\r\n}\r\n\r\ndeclare var TextRange: {\r\n prototype: TextRange;\r\n new(): TextRange;\r\n}\r\n\r\ninterface TextRangeCollection {\r\n length: number;\r\n item(index: number): TextRange;\r\n [index: number]: TextRange;\r\n}\r\n\r\ndeclare var TextRangeCollection: {\r\n prototype: TextRangeCollection;\r\n new(): TextRangeCollection;\r\n}\r\n\r\ninterface TextTrack extends EventTarget {\r\n activeCues: TextTrackCueList;\r\n cues: TextTrackCueList;\r\n inBandMetadataTrackDispatchType: string;\r\n kind: string;\r\n label: string;\r\n language: string;\r\n mode: any;\r\n oncuechange: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n onload: (ev: Event) => any;\r\n readyState: number;\r\n addCue(cue: TextTrackCue): void;\r\n removeCue(cue: TextTrackCue): void;\r\n DISABLED: number;\r\n ERROR: number;\r\n HIDDEN: number;\r\n LOADED: number;\r\n LOADING: number;\r\n NONE: number;\r\n SHOWING: number;\r\n addEventListener(type: \"cuechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var TextTrack: {\r\n prototype: TextTrack;\r\n new(): TextTrack;\r\n DISABLED: number;\r\n ERROR: number;\r\n HIDDEN: number;\r\n LOADED: number;\r\n LOADING: number;\r\n NONE: number;\r\n SHOWING: number;\r\n}\r\n\r\ninterface TextTrackCue extends EventTarget {\r\n endTime: number;\r\n id: string;\r\n onenter: (ev: Event) => any;\r\n onexit: (ev: Event) => any;\r\n pauseOnExit: boolean;\r\n startTime: number;\r\n text: string;\r\n track: TextTrack;\r\n getCueAsHTML(): DocumentFragment;\r\n addEventListener(type: \"enter\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"exit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var TextTrackCue: {\r\n prototype: TextTrackCue;\r\n new(startTime: number, endTime: number, text: string): TextTrackCue;\r\n}\r\n\r\ninterface TextTrackCueList {\r\n length: number;\r\n getCueById(id: string): TextTrackCue;\r\n item(index: number): TextTrackCue;\r\n [index: number]: TextTrackCue;\r\n}\r\n\r\ndeclare var TextTrackCueList: {\r\n prototype: TextTrackCueList;\r\n new(): TextTrackCueList;\r\n}\r\n\r\ninterface TextTrackList extends EventTarget {\r\n length: number;\r\n onaddtrack: (ev: TrackEvent) => any;\r\n item(index: number): TextTrack;\r\n addEventListener(type: \"addtrack\", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: TextTrack;\r\n}\r\n\r\ndeclare var TextTrackList: {\r\n prototype: TextTrackList;\r\n new(): TextTrackList;\r\n}\r\n\r\ninterface TimeRanges {\r\n length: number;\r\n end(index: number): number;\r\n start(index: number): number;\r\n}\r\n\r\ndeclare var TimeRanges: {\r\n prototype: TimeRanges;\r\n new(): TimeRanges;\r\n}\r\n\r\ninterface Touch {\r\n clientX: number;\r\n clientY: number;\r\n identifier: number;\r\n pageX: number;\r\n pageY: number;\r\n screenX: number;\r\n screenY: number;\r\n target: EventTarget;\r\n}\r\n\r\ndeclare var Touch: {\r\n prototype: Touch;\r\n new(): Touch;\r\n}\r\n\r\ninterface TouchEvent extends UIEvent {\r\n altKey: boolean;\r\n changedTouches: TouchList;\r\n ctrlKey: boolean;\r\n metaKey: boolean;\r\n shiftKey: boolean;\r\n targetTouches: TouchList;\r\n touches: TouchList;\r\n}\r\n\r\ndeclare var TouchEvent: {\r\n prototype: TouchEvent;\r\n new(): TouchEvent;\r\n}\r\n\r\ninterface TouchList {\r\n length: number;\r\n item(index: number): Touch;\r\n [index: number]: Touch;\r\n}\r\n\r\ndeclare var TouchList: {\r\n prototype: TouchList;\r\n new(): TouchList;\r\n}\r\n\r\ninterface TrackEvent extends Event {\r\n track: any;\r\n}\r\n\r\ndeclare var TrackEvent: {\r\n prototype: TrackEvent;\r\n new(): TrackEvent;\r\n}\r\n\r\ninterface TransitionEvent extends Event {\r\n elapsedTime: number;\r\n propertyName: string;\r\n initTransitionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, propertyNameArg: string, elapsedTimeArg: number): void;\r\n}\r\n\r\ndeclare var TransitionEvent: {\r\n prototype: TransitionEvent;\r\n new(): TransitionEvent;\r\n}\r\n\r\ninterface TreeWalker {\r\n currentNode: Node;\r\n expandEntityReferences: boolean;\r\n filter: NodeFilter;\r\n root: Node;\r\n whatToShow: number;\r\n firstChild(): Node;\r\n lastChild(): Node;\r\n nextNode(): Node;\r\n nextSibling(): Node;\r\n parentNode(): Node;\r\n previousNode(): Node;\r\n previousSibling(): Node;\r\n}\r\n\r\ndeclare var TreeWalker: {\r\n prototype: TreeWalker;\r\n new(): TreeWalker;\r\n}\r\n\r\ninterface UIEvent extends Event {\r\n detail: number;\r\n view: Window;\r\n initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number): void;\r\n}\r\n\r\ndeclare var UIEvent: {\r\n prototype: UIEvent;\r\n new(type: string, eventInitDict?: UIEventInit): UIEvent;\r\n}\r\n\r\ninterface URL {\r\n createObjectURL(object: any, options?: ObjectURLOptions): string;\r\n revokeObjectURL(url: string): void;\r\n}\r\ndeclare var URL: URL;\r\n\r\ninterface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {\r\n mediaType: string;\r\n}\r\n\r\ndeclare var UnviewableContentIdentifiedEvent: {\r\n prototype: UnviewableContentIdentifiedEvent;\r\n new(): UnviewableContentIdentifiedEvent;\r\n}\r\n\r\ninterface ValidityState {\r\n badInput: boolean;\r\n customError: boolean;\r\n patternMismatch: boolean;\r\n rangeOverflow: boolean;\r\n rangeUnderflow: boolean;\r\n stepMismatch: boolean;\r\n tooLong: boolean;\r\n typeMismatch: boolean;\r\n valid: boolean;\r\n valueMissing: boolean;\r\n}\r\n\r\ndeclare var ValidityState: {\r\n prototype: ValidityState;\r\n new(): ValidityState;\r\n}\r\n\r\ninterface VideoPlaybackQuality {\r\n corruptedVideoFrames: number;\r\n creationTime: number;\r\n droppedVideoFrames: number;\r\n totalFrameDelay: number;\r\n totalVideoFrames: number;\r\n}\r\n\r\ndeclare var VideoPlaybackQuality: {\r\n prototype: VideoPlaybackQuality;\r\n new(): VideoPlaybackQuality;\r\n}\r\n\r\ninterface VideoTrack {\r\n id: string;\r\n kind: string;\r\n label: string;\r\n language: string;\r\n selected: boolean;\r\n sourceBuffer: SourceBuffer;\r\n}\r\n\r\ndeclare var VideoTrack: {\r\n prototype: VideoTrack;\r\n new(): VideoTrack;\r\n}\r\n\r\ninterface VideoTrackList extends EventTarget {\r\n length: number;\r\n onaddtrack: (ev: TrackEvent) => any;\r\n onchange: (ev: Event) => any;\r\n onremovetrack: (ev: TrackEvent) => any;\r\n selectedIndex: number;\r\n getTrackById(id: string): VideoTrack;\r\n item(index: number): VideoTrack;\r\n addEventListener(type: \"addtrack\", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"removetrack\", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: VideoTrack;\r\n}\r\n\r\ndeclare var VideoTrackList: {\r\n prototype: VideoTrackList;\r\n new(): VideoTrackList;\r\n}\r\n\r\ninterface WEBGL_compressed_texture_s3tc {\r\n COMPRESSED_RGBA_S3TC_DXT1_EXT: number;\r\n COMPRESSED_RGBA_S3TC_DXT3_EXT: number;\r\n COMPRESSED_RGBA_S3TC_DXT5_EXT: number;\r\n COMPRESSED_RGB_S3TC_DXT1_EXT: number;\r\n}\r\n\r\ndeclare var WEBGL_compressed_texture_s3tc: {\r\n prototype: WEBGL_compressed_texture_s3tc;\r\n new(): WEBGL_compressed_texture_s3tc;\r\n COMPRESSED_RGBA_S3TC_DXT1_EXT: number;\r\n COMPRESSED_RGBA_S3TC_DXT3_EXT: number;\r\n COMPRESSED_RGBA_S3TC_DXT5_EXT: number;\r\n COMPRESSED_RGB_S3TC_DXT1_EXT: number;\r\n}\r\n\r\ninterface WEBGL_debug_renderer_info {\r\n UNMASKED_RENDERER_WEBGL: number;\r\n UNMASKED_VENDOR_WEBGL: number;\r\n}\r\n\r\ndeclare var WEBGL_debug_renderer_info: {\r\n prototype: WEBGL_debug_renderer_info;\r\n new(): WEBGL_debug_renderer_info;\r\n UNMASKED_RENDERER_WEBGL: number;\r\n UNMASKED_VENDOR_WEBGL: number;\r\n}\r\n\r\ninterface WEBGL_depth_texture {\r\n UNSIGNED_INT_24_8_WEBGL: number;\r\n}\r\n\r\ndeclare var WEBGL_depth_texture: {\r\n prototype: WEBGL_depth_texture;\r\n new(): WEBGL_depth_texture;\r\n UNSIGNED_INT_24_8_WEBGL: number;\r\n}\r\n\r\ninterface WaveShaperNode extends AudioNode {\r\n curve: Float32Array;\r\n oversample: string;\r\n}\r\n\r\ndeclare var WaveShaperNode: {\r\n prototype: WaveShaperNode;\r\n new(): WaveShaperNode;\r\n}\r\n\r\ninterface WebGLActiveInfo {\r\n name: string;\r\n size: number;\r\n type: number;\r\n}\r\n\r\ndeclare var WebGLActiveInfo: {\r\n prototype: WebGLActiveInfo;\r\n new(): WebGLActiveInfo;\r\n}\r\n\r\ninterface WebGLBuffer extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLBuffer: {\r\n prototype: WebGLBuffer;\r\n new(): WebGLBuffer;\r\n}\r\n\r\ninterface WebGLContextEvent extends Event {\r\n statusMessage: string;\r\n}\r\n\r\ndeclare var WebGLContextEvent: {\r\n prototype: WebGLContextEvent;\r\n new(): WebGLContextEvent;\r\n}\r\n\r\ninterface WebGLFramebuffer extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLFramebuffer: {\r\n prototype: WebGLFramebuffer;\r\n new(): WebGLFramebuffer;\r\n}\r\n\r\ninterface WebGLObject {\r\n}\r\n\r\ndeclare var WebGLObject: {\r\n prototype: WebGLObject;\r\n new(): WebGLObject;\r\n}\r\n\r\ninterface WebGLProgram extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLProgram: {\r\n prototype: WebGLProgram;\r\n new(): WebGLProgram;\r\n}\r\n\r\ninterface WebGLRenderbuffer extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLRenderbuffer: {\r\n prototype: WebGLRenderbuffer;\r\n new(): WebGLRenderbuffer;\r\n}\r\n\r\ninterface WebGLRenderingContext {\r\n canvas: HTMLCanvasElement;\r\n drawingBufferHeight: number;\r\n drawingBufferWidth: number;\r\n activeTexture(texture: number): void;\r\n attachShader(program: WebGLProgram, shader: WebGLShader): void;\r\n bindAttribLocation(program: WebGLProgram, index: number, name: string): void;\r\n bindBuffer(target: number, buffer: WebGLBuffer): void;\r\n bindFramebuffer(target: number, framebuffer: WebGLFramebuffer): void;\r\n bindRenderbuffer(target: number, renderbuffer: WebGLRenderbuffer): void;\r\n bindTexture(target: number, texture: WebGLTexture): void;\r\n blendColor(red: number, green: number, blue: number, alpha: number): void;\r\n blendEquation(mode: number): void;\r\n blendEquationSeparate(modeRGB: number, modeAlpha: number): void;\r\n blendFunc(sfactor: number, dfactor: number): void;\r\n blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;\r\n bufferData(target: number, size: number | ArrayBufferView | ArrayBuffer, usage: number): void;\r\n bufferSubData(target: number, offset: number, data: ArrayBufferView | ArrayBuffer): void;\r\n checkFramebufferStatus(target: number): number;\r\n clear(mask: number): void;\r\n clearColor(red: number, green: number, blue: number, alpha: number): void;\r\n clearDepth(depth: number): void;\r\n clearStencil(s: number): void;\r\n colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;\r\n compileShader(shader: WebGLShader): void;\r\n compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;\r\n compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;\r\n copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;\r\n copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;\r\n createBuffer(): WebGLBuffer;\r\n createFramebuffer(): WebGLFramebuffer;\r\n createProgram(): WebGLProgram;\r\n createRenderbuffer(): WebGLRenderbuffer;\r\n createShader(type: number): WebGLShader;\r\n createTexture(): WebGLTexture;\r\n cullFace(mode: number): void;\r\n deleteBuffer(buffer: WebGLBuffer): void;\r\n deleteFramebuffer(framebuffer: WebGLFramebuffer): void;\r\n deleteProgram(program: WebGLProgram): void;\r\n deleteRenderbuffer(renderbuffer: WebGLRenderbuffer): void;\r\n deleteShader(shader: WebGLShader): void;\r\n deleteTexture(texture: WebGLTexture): void;\r\n depthFunc(func: number): void;\r\n depthMask(flag: boolean): void;\r\n depthRange(zNear: number, zFar: number): void;\r\n detachShader(program: WebGLProgram, shader: WebGLShader): void;\r\n disable(cap: number): void;\r\n disableVertexAttribArray(index: number): void;\r\n drawArrays(mode: number, first: number, count: number): void;\r\n drawElements(mode: number, count: number, type: number, offset: number): void;\r\n enable(cap: number): void;\r\n enableVertexAttribArray(index: number): void;\r\n finish(): void;\r\n flush(): void;\r\n framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: WebGLRenderbuffer): void;\r\n framebufferTexture2D(target: number, attachment: number, textarget: number, texture: WebGLTexture, level: number): void;\r\n frontFace(mode: number): void;\r\n generateMipmap(target: number): void;\r\n getActiveAttrib(program: WebGLProgram, index: number): WebGLActiveInfo;\r\n getActiveUniform(program: WebGLProgram, index: number): WebGLActiveInfo;\r\n getAttachedShaders(program: WebGLProgram): WebGLShader[];\r\n getAttribLocation(program: WebGLProgram, name: string): number;\r\n getBufferParameter(target: number, pname: number): any;\r\n getContextAttributes(): WebGLContextAttributes;\r\n getError(): number;\r\n getExtension(name: string): any;\r\n getFramebufferAttachmentParameter(target: number, attachment: number, pname: number): any;\r\n getParameter(pname: number): any;\r\n getProgramInfoLog(program: WebGLProgram): string;\r\n getProgramParameter(program: WebGLProgram, pname: number): any;\r\n getRenderbufferParameter(target: number, pname: number): any;\r\n getShaderInfoLog(shader: WebGLShader): string;\r\n getShaderParameter(shader: WebGLShader, pname: number): any;\r\n getShaderPrecisionFormat(shadertype: number, precisiontype: number): WebGLShaderPrecisionFormat;\r\n getShaderSource(shader: WebGLShader): string;\r\n getSupportedExtensions(): string[];\r\n getTexParameter(target: number, pname: number): any;\r\n getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;\r\n getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation;\r\n getVertexAttrib(index: number, pname: number): any;\r\n getVertexAttribOffset(index: number, pname: number): number;\r\n hint(target: number, mode: number): void;\r\n isBuffer(buffer: WebGLBuffer): boolean;\r\n isContextLost(): boolean;\r\n isEnabled(cap: number): boolean;\r\n isFramebuffer(framebuffer: WebGLFramebuffer): boolean;\r\n isProgram(program: WebGLProgram): boolean;\r\n isRenderbuffer(renderbuffer: WebGLRenderbuffer): boolean;\r\n isShader(shader: WebGLShader): boolean;\r\n isTexture(texture: WebGLTexture): boolean;\r\n lineWidth(width: number): void;\r\n linkProgram(program: WebGLProgram): void;\r\n pixelStorei(pname: number, param: number): void;\r\n polygonOffset(factor: number, units: number): void;\r\n readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView): void;\r\n renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;\r\n sampleCoverage(value: number, invert: boolean): void;\r\n scissor(x: number, y: number, width: number, height: number): void;\r\n shaderSource(shader: WebGLShader, source: string): void;\r\n stencilFunc(func: number, ref: number, mask: number): void;\r\n stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void;\r\n stencilMask(mask: number): void;\r\n stencilMaskSeparate(face: number, mask: number): void;\r\n stencilOp(fail: number, zfail: number, zpass: number): void;\r\n stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void;\r\n texImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, format: number, type: number, pixels: ArrayBufferView): void;\r\n texImage2D(target: number, level: number, internalformat: number, format: number, type: number, image: HTMLImageElement): void;\r\n texImage2D(target: number, level: number, internalformat: number, format: number, type: number, canvas: HTMLCanvasElement): void;\r\n texImage2D(target: number, level: number, internalformat: number, format: number, type: number, video: HTMLVideoElement): void;\r\n texImage2D(target: number, level: number, internalformat: number, format: number, type: number, pixels: ImageData): void;\r\n texParameterf(target: number, pname: number, param: number): void;\r\n texParameteri(target: number, pname: number, param: number): void;\r\n texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView): void;\r\n texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, image: HTMLImageElement): void;\r\n texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, canvas: HTMLCanvasElement): void;\r\n texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, video: HTMLVideoElement): void;\r\n texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, pixels: ImageData): void;\r\n uniform1f(location: WebGLUniformLocation, x: number): void;\r\n uniform1fv(location: WebGLUniformLocation, v: Float32Array): void;\r\n uniform1i(location: WebGLUniformLocation, x: number): void;\r\n uniform1iv(location: WebGLUniformLocation, v: Int32Array): void;\r\n uniform2f(location: WebGLUniformLocation, x: number, y: number): void;\r\n uniform2fv(location: WebGLUniformLocation, v: Float32Array): void;\r\n uniform2i(location: WebGLUniformLocation, x: number, y: number): void;\r\n uniform2iv(location: WebGLUniformLocation, v: Int32Array): void;\r\n uniform3f(location: WebGLUniformLocation, x: number, y: number, z: number): void;\r\n uniform3fv(location: WebGLUniformLocation, v: Float32Array): void;\r\n uniform3i(location: WebGLUniformLocation, x: number, y: number, z: number): void;\r\n uniform3iv(location: WebGLUniformLocation, v: Int32Array): void;\r\n uniform4f(location: WebGLUniformLocation, x: number, y: number, z: number, w: number): void;\r\n uniform4fv(location: WebGLUniformLocation, v: Float32Array): void;\r\n uniform4i(location: WebGLUniformLocation, x: number, y: number, z: number, w: number): void;\r\n uniform4iv(location: WebGLUniformLocation, v: Int32Array): void;\r\n uniformMatrix2fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array): void;\r\n uniformMatrix3fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array): void;\r\n uniformMatrix4fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array): void;\r\n useProgram(program: WebGLProgram): void;\r\n validateProgram(program: WebGLProgram): void;\r\n vertexAttrib1f(indx: number, x: number): void;\r\n vertexAttrib1fv(indx: number, values: Float32Array): void;\r\n vertexAttrib2f(indx: number, x: number, y: number): void;\r\n vertexAttrib2fv(indx: number, values: Float32Array): void;\r\n vertexAttrib3f(indx: number, x: number, y: number, z: number): void;\r\n vertexAttrib3fv(indx: number, values: Float32Array): void;\r\n vertexAttrib4f(indx: number, x: number, y: number, z: number, w: number): void;\r\n vertexAttrib4fv(indx: number, values: Float32Array): void;\r\n vertexAttribPointer(indx: number, size: number, type: number, normalized: boolean, stride: number, offset: number): void;\r\n viewport(x: number, y: number, width: number, height: number): void;\r\n ACTIVE_ATTRIBUTES: number;\r\n ACTIVE_TEXTURE: number;\r\n ACTIVE_UNIFORMS: number;\r\n ALIASED_LINE_WIDTH_RANGE: number;\r\n ALIASED_POINT_SIZE_RANGE: number;\r\n ALPHA: number;\r\n ALPHA_BITS: number;\r\n ALWAYS: number;\r\n ARRAY_BUFFER: number;\r\n ARRAY_BUFFER_BINDING: number;\r\n ATTACHED_SHADERS: number;\r\n BACK: number;\r\n BLEND: number;\r\n BLEND_COLOR: number;\r\n BLEND_DST_ALPHA: number;\r\n BLEND_DST_RGB: number;\r\n BLEND_EQUATION: number;\r\n BLEND_EQUATION_ALPHA: number;\r\n BLEND_EQUATION_RGB: number;\r\n BLEND_SRC_ALPHA: number;\r\n BLEND_SRC_RGB: number;\r\n BLUE_BITS: number;\r\n BOOL: number;\r\n BOOL_VEC2: number;\r\n BOOL_VEC3: number;\r\n BOOL_VEC4: number;\r\n BROWSER_DEFAULT_WEBGL: number;\r\n BUFFER_SIZE: number;\r\n BUFFER_USAGE: number;\r\n BYTE: number;\r\n CCW: number;\r\n CLAMP_TO_EDGE: number;\r\n COLOR_ATTACHMENT0: number;\r\n COLOR_BUFFER_BIT: number;\r\n COLOR_CLEAR_VALUE: number;\r\n COLOR_WRITEMASK: number;\r\n COMPILE_STATUS: number;\r\n COMPRESSED_TEXTURE_FORMATS: number;\r\n CONSTANT_ALPHA: number;\r\n CONSTANT_COLOR: number;\r\n CONTEXT_LOST_WEBGL: number;\r\n CULL_FACE: number;\r\n CULL_FACE_MODE: number;\r\n CURRENT_PROGRAM: number;\r\n CURRENT_VERTEX_ATTRIB: number;\r\n CW: number;\r\n DECR: number;\r\n DECR_WRAP: number;\r\n DELETE_STATUS: number;\r\n DEPTH_ATTACHMENT: number;\r\n DEPTH_BITS: number;\r\n DEPTH_BUFFER_BIT: number;\r\n DEPTH_CLEAR_VALUE: number;\r\n DEPTH_COMPONENT: number;\r\n DEPTH_COMPONENT16: number;\r\n DEPTH_FUNC: number;\r\n DEPTH_RANGE: number;\r\n DEPTH_STENCIL: number;\r\n DEPTH_STENCIL_ATTACHMENT: number;\r\n DEPTH_TEST: number;\r\n DEPTH_WRITEMASK: number;\r\n DITHER: number;\r\n DONT_CARE: number;\r\n DST_ALPHA: number;\r\n DST_COLOR: number;\r\n DYNAMIC_DRAW: number;\r\n ELEMENT_ARRAY_BUFFER: number;\r\n ELEMENT_ARRAY_BUFFER_BINDING: number;\r\n EQUAL: number;\r\n FASTEST: number;\r\n FLOAT: number;\r\n FLOAT_MAT2: number;\r\n FLOAT_MAT3: number;\r\n FLOAT_MAT4: number;\r\n FLOAT_VEC2: number;\r\n FLOAT_VEC3: number;\r\n FLOAT_VEC4: number;\r\n FRAGMENT_SHADER: number;\r\n FRAMEBUFFER: number;\r\n FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;\r\n FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;\r\n FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;\r\n FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;\r\n FRAMEBUFFER_BINDING: number;\r\n FRAMEBUFFER_COMPLETE: number;\r\n FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;\r\n FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;\r\n FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;\r\n FRAMEBUFFER_UNSUPPORTED: number;\r\n FRONT: number;\r\n FRONT_AND_BACK: number;\r\n FRONT_FACE: number;\r\n FUNC_ADD: number;\r\n FUNC_REVERSE_SUBTRACT: number;\r\n FUNC_SUBTRACT: number;\r\n GENERATE_MIPMAP_HINT: number;\r\n GEQUAL: number;\r\n GREATER: number;\r\n GREEN_BITS: number;\r\n HIGH_FLOAT: number;\r\n HIGH_INT: number;\r\n IMPLEMENTATION_COLOR_READ_FORMAT: number;\r\n IMPLEMENTATION_COLOR_READ_TYPE: number;\r\n INCR: number;\r\n INCR_WRAP: number;\r\n INT: number;\r\n INT_VEC2: number;\r\n INT_VEC3: number;\r\n INT_VEC4: number;\r\n INVALID_ENUM: number;\r\n INVALID_FRAMEBUFFER_OPERATION: number;\r\n INVALID_OPERATION: number;\r\n INVALID_VALUE: number;\r\n INVERT: number;\r\n KEEP: number;\r\n LEQUAL: number;\r\n LESS: number;\r\n LINEAR: number;\r\n LINEAR_MIPMAP_LINEAR: number;\r\n LINEAR_MIPMAP_NEAREST: number;\r\n LINES: number;\r\n LINE_LOOP: number;\r\n LINE_STRIP: number;\r\n LINE_WIDTH: number;\r\n LINK_STATUS: number;\r\n LOW_FLOAT: number;\r\n LOW_INT: number;\r\n LUMINANCE: number;\r\n LUMINANCE_ALPHA: number;\r\n MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;\r\n MAX_CUBE_MAP_TEXTURE_SIZE: number;\r\n MAX_FRAGMENT_UNIFORM_VECTORS: number;\r\n MAX_RENDERBUFFER_SIZE: number;\r\n MAX_TEXTURE_IMAGE_UNITS: number;\r\n MAX_TEXTURE_SIZE: number;\r\n MAX_VARYING_VECTORS: number;\r\n MAX_VERTEX_ATTRIBS: number;\r\n MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;\r\n MAX_VERTEX_UNIFORM_VECTORS: number;\r\n MAX_VIEWPORT_DIMS: number;\r\n MEDIUM_FLOAT: number;\r\n MEDIUM_INT: number;\r\n MIRRORED_REPEAT: number;\r\n NEAREST: number;\r\n NEAREST_MIPMAP_LINEAR: number;\r\n NEAREST_MIPMAP_NEAREST: number;\r\n NEVER: number;\r\n NICEST: number;\r\n NONE: number;\r\n NOTEQUAL: number;\r\n NO_ERROR: number;\r\n ONE: number;\r\n ONE_MINUS_CONSTANT_ALPHA: number;\r\n ONE_MINUS_CONSTANT_COLOR: number;\r\n ONE_MINUS_DST_ALPHA: number;\r\n ONE_MINUS_DST_COLOR: number;\r\n ONE_MINUS_SRC_ALPHA: number;\r\n ONE_MINUS_SRC_COLOR: number;\r\n OUT_OF_MEMORY: number;\r\n PACK_ALIGNMENT: number;\r\n POINTS: number;\r\n POLYGON_OFFSET_FACTOR: number;\r\n POLYGON_OFFSET_FILL: number;\r\n POLYGON_OFFSET_UNITS: number;\r\n RED_BITS: number;\r\n RENDERBUFFER: number;\r\n RENDERBUFFER_ALPHA_SIZE: number;\r\n RENDERBUFFER_BINDING: number;\r\n RENDERBUFFER_BLUE_SIZE: number;\r\n RENDERBUFFER_DEPTH_SIZE: number;\r\n RENDERBUFFER_GREEN_SIZE: number;\r\n RENDERBUFFER_HEIGHT: number;\r\n RENDERBUFFER_INTERNAL_FORMAT: number;\r\n RENDERBUFFER_RED_SIZE: number;\r\n RENDERBUFFER_STENCIL_SIZE: number;\r\n RENDERBUFFER_WIDTH: number;\r\n RENDERER: number;\r\n REPEAT: number;\r\n REPLACE: number;\r\n RGB: number;\r\n RGB565: number;\r\n RGB5_A1: number;\r\n RGBA: number;\r\n RGBA4: number;\r\n SAMPLER_2D: number;\r\n SAMPLER_CUBE: number;\r\n SAMPLES: number;\r\n SAMPLE_ALPHA_TO_COVERAGE: number;\r\n SAMPLE_BUFFERS: number;\r\n SAMPLE_COVERAGE: number;\r\n SAMPLE_COVERAGE_INVERT: number;\r\n SAMPLE_COVERAGE_VALUE: number;\r\n SCISSOR_BOX: number;\r\n SCISSOR_TEST: number;\r\n SHADER_TYPE: number;\r\n SHADING_LANGUAGE_VERSION: number;\r\n SHORT: number;\r\n SRC_ALPHA: number;\r\n SRC_ALPHA_SATURATE: number;\r\n SRC_COLOR: number;\r\n STATIC_DRAW: number;\r\n STENCIL_ATTACHMENT: number;\r\n STENCIL_BACK_FAIL: number;\r\n STENCIL_BACK_FUNC: number;\r\n STENCIL_BACK_PASS_DEPTH_FAIL: number;\r\n STENCIL_BACK_PASS_DEPTH_PASS: number;\r\n STENCIL_BACK_REF: number;\r\n STENCIL_BACK_VALUE_MASK: number;\r\n STENCIL_BACK_WRITEMASK: number;\r\n STENCIL_BITS: number;\r\n STENCIL_BUFFER_BIT: number;\r\n STENCIL_CLEAR_VALUE: number;\r\n STENCIL_FAIL: number;\r\n STENCIL_FUNC: number;\r\n STENCIL_INDEX: number;\r\n STENCIL_INDEX8: number;\r\n STENCIL_PASS_DEPTH_FAIL: number;\r\n STENCIL_PASS_DEPTH_PASS: number;\r\n STENCIL_REF: number;\r\n STENCIL_TEST: number;\r\n STENCIL_VALUE_MASK: number;\r\n STENCIL_WRITEMASK: number;\r\n STREAM_DRAW: number;\r\n SUBPIXEL_BITS: number;\r\n TEXTURE: number;\r\n TEXTURE0: number;\r\n TEXTURE1: number;\r\n TEXTURE10: number;\r\n TEXTURE11: number;\r\n TEXTURE12: number;\r\n TEXTURE13: number;\r\n TEXTURE14: number;\r\n TEXTURE15: number;\r\n TEXTURE16: number;\r\n TEXTURE17: number;\r\n TEXTURE18: number;\r\n TEXTURE19: number;\r\n TEXTURE2: number;\r\n TEXTURE20: number;\r\n TEXTURE21: number;\r\n TEXTURE22: number;\r\n TEXTURE23: number;\r\n TEXTURE24: number;\r\n TEXTURE25: number;\r\n TEXTURE26: number;\r\n TEXTURE27: number;\r\n TEXTURE28: number;\r\n TEXTURE29: number;\r\n TEXTURE3: number;\r\n TEXTURE30: number;\r\n TEXTURE31: number;\r\n TEXTURE4: number;\r\n TEXTURE5: number;\r\n TEXTURE6: number;\r\n TEXTURE7: number;\r\n TEXTURE8: number;\r\n TEXTURE9: number;\r\n TEXTURE_2D: number;\r\n TEXTURE_BINDING_2D: number;\r\n TEXTURE_BINDING_CUBE_MAP: number;\r\n TEXTURE_CUBE_MAP: number;\r\n TEXTURE_CUBE_MAP_NEGATIVE_X: number;\r\n TEXTURE_CUBE_MAP_NEGATIVE_Y: number;\r\n TEXTURE_CUBE_MAP_NEGATIVE_Z: number;\r\n TEXTURE_CUBE_MAP_POSITIVE_X: number;\r\n TEXTURE_CUBE_MAP_POSITIVE_Y: number;\r\n TEXTURE_CUBE_MAP_POSITIVE_Z: number;\r\n TEXTURE_MAG_FILTER: number;\r\n TEXTURE_MIN_FILTER: number;\r\n TEXTURE_WRAP_S: number;\r\n TEXTURE_WRAP_T: number;\r\n TRIANGLES: number;\r\n TRIANGLE_FAN: number;\r\n TRIANGLE_STRIP: number;\r\n UNPACK_ALIGNMENT: number;\r\n UNPACK_COLORSPACE_CONVERSION_WEBGL: number;\r\n UNPACK_FLIP_Y_WEBGL: number;\r\n UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;\r\n UNSIGNED_BYTE: number;\r\n UNSIGNED_INT: number;\r\n UNSIGNED_SHORT: number;\r\n UNSIGNED_SHORT_4_4_4_4: number;\r\n UNSIGNED_SHORT_5_5_5_1: number;\r\n UNSIGNED_SHORT_5_6_5: number;\r\n VALIDATE_STATUS: number;\r\n VENDOR: number;\r\n VERSION: number;\r\n VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;\r\n VERTEX_ATTRIB_ARRAY_ENABLED: number;\r\n VERTEX_ATTRIB_ARRAY_NORMALIZED: number;\r\n VERTEX_ATTRIB_ARRAY_POINTER: number;\r\n VERTEX_ATTRIB_ARRAY_SIZE: number;\r\n VERTEX_ATTRIB_ARRAY_STRIDE: number;\r\n VERTEX_ATTRIB_ARRAY_TYPE: number;\r\n VERTEX_SHADER: number;\r\n VIEWPORT: number;\r\n ZERO: number;\r\n}\r\n\r\ndeclare var WebGLRenderingContext: {\r\n prototype: WebGLRenderingContext;\r\n new(): WebGLRenderingContext;\r\n ACTIVE_ATTRIBUTES: number;\r\n ACTIVE_TEXTURE: number;\r\n ACTIVE_UNIFORMS: number;\r\n ALIASED_LINE_WIDTH_RANGE: number;\r\n ALIASED_POINT_SIZE_RANGE: number;\r\n ALPHA: number;\r\n ALPHA_BITS: number;\r\n ALWAYS: number;\r\n ARRAY_BUFFER: number;\r\n ARRAY_BUFFER_BINDING: number;\r\n ATTACHED_SHADERS: number;\r\n BACK: number;\r\n BLEND: number;\r\n BLEND_COLOR: number;\r\n BLEND_DST_ALPHA: number;\r\n BLEND_DST_RGB: number;\r\n BLEND_EQUATION: number;\r\n BLEND_EQUATION_ALPHA: number;\r\n BLEND_EQUATION_RGB: number;\r\n BLEND_SRC_ALPHA: number;\r\n BLEND_SRC_RGB: number;\r\n BLUE_BITS: number;\r\n BOOL: number;\r\n BOOL_VEC2: number;\r\n BOOL_VEC3: number;\r\n BOOL_VEC4: number;\r\n BROWSER_DEFAULT_WEBGL: number;\r\n BUFFER_SIZE: number;\r\n BUFFER_USAGE: number;\r\n BYTE: number;\r\n CCW: number;\r\n CLAMP_TO_EDGE: number;\r\n COLOR_ATTACHMENT0: number;\r\n COLOR_BUFFER_BIT: number;\r\n COLOR_CLEAR_VALUE: number;\r\n COLOR_WRITEMASK: number;\r\n COMPILE_STATUS: number;\r\n COMPRESSED_TEXTURE_FORMATS: number;\r\n CONSTANT_ALPHA: number;\r\n CONSTANT_COLOR: number;\r\n CONTEXT_LOST_WEBGL: number;\r\n CULL_FACE: number;\r\n CULL_FACE_MODE: number;\r\n CURRENT_PROGRAM: number;\r\n CURRENT_VERTEX_ATTRIB: number;\r\n CW: number;\r\n DECR: number;\r\n DECR_WRAP: number;\r\n DELETE_STATUS: number;\r\n DEPTH_ATTACHMENT: number;\r\n DEPTH_BITS: number;\r\n DEPTH_BUFFER_BIT: number;\r\n DEPTH_CLEAR_VALUE: number;\r\n DEPTH_COMPONENT: number;\r\n DEPTH_COMPONENT16: number;\r\n DEPTH_FUNC: number;\r\n DEPTH_RANGE: number;\r\n DEPTH_STENCIL: number;\r\n DEPTH_STENCIL_ATTACHMENT: number;\r\n DEPTH_TEST: number;\r\n DEPTH_WRITEMASK: number;\r\n DITHER: number;\r\n DONT_CARE: number;\r\n DST_ALPHA: number;\r\n DST_COLOR: number;\r\n DYNAMIC_DRAW: number;\r\n ELEMENT_ARRAY_BUFFER: number;\r\n ELEMENT_ARRAY_BUFFER_BINDING: number;\r\n EQUAL: number;\r\n FASTEST: number;\r\n FLOAT: number;\r\n FLOAT_MAT2: number;\r\n FLOAT_MAT3: number;\r\n FLOAT_MAT4: number;\r\n FLOAT_VEC2: number;\r\n FLOAT_VEC3: number;\r\n FLOAT_VEC4: number;\r\n FRAGMENT_SHADER: number;\r\n FRAMEBUFFER: number;\r\n FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;\r\n FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;\r\n FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;\r\n FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;\r\n FRAMEBUFFER_BINDING: number;\r\n FRAMEBUFFER_COMPLETE: number;\r\n FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;\r\n FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;\r\n FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;\r\n FRAMEBUFFER_UNSUPPORTED: number;\r\n FRONT: number;\r\n FRONT_AND_BACK: number;\r\n FRONT_FACE: number;\r\n FUNC_ADD: number;\r\n FUNC_REVERSE_SUBTRACT: number;\r\n FUNC_SUBTRACT: number;\r\n GENERATE_MIPMAP_HINT: number;\r\n GEQUAL: number;\r\n GREATER: number;\r\n GREEN_BITS: number;\r\n HIGH_FLOAT: number;\r\n HIGH_INT: number;\r\n IMPLEMENTATION_COLOR_READ_FORMAT: number;\r\n IMPLEMENTATION_COLOR_READ_TYPE: number;\r\n INCR: number;\r\n INCR_WRAP: number;\r\n INT: number;\r\n INT_VEC2: number;\r\n INT_VEC3: number;\r\n INT_VEC4: number;\r\n INVALID_ENUM: number;\r\n INVALID_FRAMEBUFFER_OPERATION: number;\r\n INVALID_OPERATION: number;\r\n INVALID_VALUE: number;\r\n INVERT: number;\r\n KEEP: number;\r\n LEQUAL: number;\r\n LESS: number;\r\n LINEAR: number;\r\n LINEAR_MIPMAP_LINEAR: number;\r\n LINEAR_MIPMAP_NEAREST: number;\r\n LINES: number;\r\n LINE_LOOP: number;\r\n LINE_STRIP: number;\r\n LINE_WIDTH: number;\r\n LINK_STATUS: number;\r\n LOW_FLOAT: number;\r\n LOW_INT: number;\r\n LUMINANCE: number;\r\n LUMINANCE_ALPHA: number;\r\n MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;\r\n MAX_CUBE_MAP_TEXTURE_SIZE: number;\r\n MAX_FRAGMENT_UNIFORM_VECTORS: number;\r\n MAX_RENDERBUFFER_SIZE: number;\r\n MAX_TEXTURE_IMAGE_UNITS: number;\r\n MAX_TEXTURE_SIZE: number;\r\n MAX_VARYING_VECTORS: number;\r\n MAX_VERTEX_ATTRIBS: number;\r\n MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;\r\n MAX_VERTEX_UNIFORM_VECTORS: number;\r\n MAX_VIEWPORT_DIMS: number;\r\n MEDIUM_FLOAT: number;\r\n MEDIUM_INT: number;\r\n MIRRORED_REPEAT: number;\r\n NEAREST: number;\r\n NEAREST_MIPMAP_LINEAR: number;\r\n NEAREST_MIPMAP_NEAREST: number;\r\n NEVER: number;\r\n NICEST: number;\r\n NONE: number;\r\n NOTEQUAL: number;\r\n NO_ERROR: number;\r\n ONE: number;\r\n ONE_MINUS_CONSTANT_ALPHA: number;\r\n ONE_MINUS_CONSTANT_COLOR: number;\r\n ONE_MINUS_DST_ALPHA: number;\r\n ONE_MINUS_DST_COLOR: number;\r\n ONE_MINUS_SRC_ALPHA: number;\r\n ONE_MINUS_SRC_COLOR: number;\r\n OUT_OF_MEMORY: number;\r\n PACK_ALIGNMENT: number;\r\n POINTS: number;\r\n POLYGON_OFFSET_FACTOR: number;\r\n POLYGON_OFFSET_FILL: number;\r\n POLYGON_OFFSET_UNITS: number;\r\n RED_BITS: number;\r\n RENDERBUFFER: number;\r\n RENDERBUFFER_ALPHA_SIZE: number;\r\n RENDERBUFFER_BINDING: number;\r\n RENDERBUFFER_BLUE_SIZE: number;\r\n RENDERBUFFER_DEPTH_SIZE: number;\r\n RENDERBUFFER_GREEN_SIZE: number;\r\n RENDERBUFFER_HEIGHT: number;\r\n RENDERBUFFER_INTERNAL_FORMAT: number;\r\n RENDERBUFFER_RED_SIZE: number;\r\n RENDERBUFFER_STENCIL_SIZE: number;\r\n RENDERBUFFER_WIDTH: number;\r\n RENDERER: number;\r\n REPEAT: number;\r\n REPLACE: number;\r\n RGB: number;\r\n RGB565: number;\r\n RGB5_A1: number;\r\n RGBA: number;\r\n RGBA4: number;\r\n SAMPLER_2D: number;\r\n SAMPLER_CUBE: number;\r\n SAMPLES: number;\r\n SAMPLE_ALPHA_TO_COVERAGE: number;\r\n SAMPLE_BUFFERS: number;\r\n SAMPLE_COVERAGE: number;\r\n SAMPLE_COVERAGE_INVERT: number;\r\n SAMPLE_COVERAGE_VALUE: number;\r\n SCISSOR_BOX: number;\r\n SCISSOR_TEST: number;\r\n SHADER_TYPE: number;\r\n SHADING_LANGUAGE_VERSION: number;\r\n SHORT: number;\r\n SRC_ALPHA: number;\r\n SRC_ALPHA_SATURATE: number;\r\n SRC_COLOR: number;\r\n STATIC_DRAW: number;\r\n STENCIL_ATTACHMENT: number;\r\n STENCIL_BACK_FAIL: number;\r\n STENCIL_BACK_FUNC: number;\r\n STENCIL_BACK_PASS_DEPTH_FAIL: number;\r\n STENCIL_BACK_PASS_DEPTH_PASS: number;\r\n STENCIL_BACK_REF: number;\r\n STENCIL_BACK_VALUE_MASK: number;\r\n STENCIL_BACK_WRITEMASK: number;\r\n STENCIL_BITS: number;\r\n STENCIL_BUFFER_BIT: number;\r\n STENCIL_CLEAR_VALUE: number;\r\n STENCIL_FAIL: number;\r\n STENCIL_FUNC: number;\r\n STENCIL_INDEX: number;\r\n STENCIL_INDEX8: number;\r\n STENCIL_PASS_DEPTH_FAIL: number;\r\n STENCIL_PASS_DEPTH_PASS: number;\r\n STENCIL_REF: number;\r\n STENCIL_TEST: number;\r\n STENCIL_VALUE_MASK: number;\r\n STENCIL_WRITEMASK: number;\r\n STREAM_DRAW: number;\r\n SUBPIXEL_BITS: number;\r\n TEXTURE: number;\r\n TEXTURE0: number;\r\n TEXTURE1: number;\r\n TEXTURE10: number;\r\n TEXTURE11: number;\r\n TEXTURE12: number;\r\n TEXTURE13: number;\r\n TEXTURE14: number;\r\n TEXTURE15: number;\r\n TEXTURE16: number;\r\n TEXTURE17: number;\r\n TEXTURE18: number;\r\n TEXTURE19: number;\r\n TEXTURE2: number;\r\n TEXTURE20: number;\r\n TEXTURE21: number;\r\n TEXTURE22: number;\r\n TEXTURE23: number;\r\n TEXTURE24: number;\r\n TEXTURE25: number;\r\n TEXTURE26: number;\r\n TEXTURE27: number;\r\n TEXTURE28: number;\r\n TEXTURE29: number;\r\n TEXTURE3: number;\r\n TEXTURE30: number;\r\n TEXTURE31: number;\r\n TEXTURE4: number;\r\n TEXTURE5: number;\r\n TEXTURE6: number;\r\n TEXTURE7: number;\r\n TEXTURE8: number;\r\n TEXTURE9: number;\r\n TEXTURE_2D: number;\r\n TEXTURE_BINDING_2D: number;\r\n TEXTURE_BINDING_CUBE_MAP: number;\r\n TEXTURE_CUBE_MAP: number;\r\n TEXTURE_CUBE_MAP_NEGATIVE_X: number;\r\n TEXTURE_CUBE_MAP_NEGATIVE_Y: number;\r\n TEXTURE_CUBE_MAP_NEGATIVE_Z: number;\r\n TEXTURE_CUBE_MAP_POSITIVE_X: number;\r\n TEXTURE_CUBE_MAP_POSITIVE_Y: number;\r\n TEXTURE_CUBE_MAP_POSITIVE_Z: number;\r\n TEXTURE_MAG_FILTER: number;\r\n TEXTURE_MIN_FILTER: number;\r\n TEXTURE_WRAP_S: number;\r\n TEXTURE_WRAP_T: number;\r\n TRIANGLES: number;\r\n TRIANGLE_FAN: number;\r\n TRIANGLE_STRIP: number;\r\n UNPACK_ALIGNMENT: number;\r\n UNPACK_COLORSPACE_CONVERSION_WEBGL: number;\r\n UNPACK_FLIP_Y_WEBGL: number;\r\n UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;\r\n UNSIGNED_BYTE: number;\r\n UNSIGNED_INT: number;\r\n UNSIGNED_SHORT: number;\r\n UNSIGNED_SHORT_4_4_4_4: number;\r\n UNSIGNED_SHORT_5_5_5_1: number;\r\n UNSIGNED_SHORT_5_6_5: number;\r\n VALIDATE_STATUS: number;\r\n VENDOR: number;\r\n VERSION: number;\r\n VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;\r\n VERTEX_ATTRIB_ARRAY_ENABLED: number;\r\n VERTEX_ATTRIB_ARRAY_NORMALIZED: number;\r\n VERTEX_ATTRIB_ARRAY_POINTER: number;\r\n VERTEX_ATTRIB_ARRAY_SIZE: number;\r\n VERTEX_ATTRIB_ARRAY_STRIDE: number;\r\n VERTEX_ATTRIB_ARRAY_TYPE: number;\r\n VERTEX_SHADER: number;\r\n VIEWPORT: number;\r\n ZERO: number;\r\n}\r\n\r\ninterface WebGLShader extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLShader: {\r\n prototype: WebGLShader;\r\n new(): WebGLShader;\r\n}\r\n\r\ninterface WebGLShaderPrecisionFormat {\r\n precision: number;\r\n rangeMax: number;\r\n rangeMin: number;\r\n}\r\n\r\ndeclare var WebGLShaderPrecisionFormat: {\r\n prototype: WebGLShaderPrecisionFormat;\r\n new(): WebGLShaderPrecisionFormat;\r\n}\r\n\r\ninterface WebGLTexture extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLTexture: {\r\n prototype: WebGLTexture;\r\n new(): WebGLTexture;\r\n}\r\n\r\ninterface WebGLUniformLocation {\r\n}\r\n\r\ndeclare var WebGLUniformLocation: {\r\n prototype: WebGLUniformLocation;\r\n new(): WebGLUniformLocation;\r\n}\r\n\r\ninterface WebKitCSSMatrix {\r\n a: number;\r\n b: number;\r\n c: number;\r\n d: number;\r\n e: number;\r\n f: number;\r\n m11: number;\r\n m12: number;\r\n m13: number;\r\n m14: number;\r\n m21: number;\r\n m22: number;\r\n m23: number;\r\n m24: number;\r\n m31: number;\r\n m32: number;\r\n m33: number;\r\n m34: number;\r\n m41: number;\r\n m42: number;\r\n m43: number;\r\n m44: number;\r\n inverse(): WebKitCSSMatrix;\r\n multiply(secondMatrix: WebKitCSSMatrix): WebKitCSSMatrix;\r\n rotate(angleX: number, angleY?: number, angleZ?: number): WebKitCSSMatrix;\r\n rotateAxisAngle(x: number, y: number, z: number, angle: number): WebKitCSSMatrix;\r\n scale(scaleX: number, scaleY?: number, scaleZ?: number): WebKitCSSMatrix;\r\n setMatrixValue(value: string): void;\r\n skewX(angle: number): WebKitCSSMatrix;\r\n skewY(angle: number): WebKitCSSMatrix;\r\n toString(): string;\r\n translate(x: number, y: number, z?: number): WebKitCSSMatrix;\r\n}\r\n\r\ndeclare var WebKitCSSMatrix: {\r\n prototype: WebKitCSSMatrix;\r\n new(text?: string): WebKitCSSMatrix;\r\n}\r\n\r\ninterface WebKitPoint {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var WebKitPoint: {\r\n prototype: WebKitPoint;\r\n new(x?: number, y?: number): WebKitPoint;\r\n}\r\n\r\ninterface WebSocket extends EventTarget {\r\n binaryType: string;\r\n bufferedAmount: number;\r\n extensions: string;\r\n onclose: (ev: CloseEvent) => any;\r\n onerror: (ev: Event) => any;\r\n onmessage: (ev: MessageEvent) => any;\r\n onopen: (ev: Event) => any;\r\n protocol: string;\r\n readyState: number;\r\n url: string;\r\n close(code?: number, reason?: string): void;\r\n send(data: any): void;\r\n CLOSED: number;\r\n CLOSING: number;\r\n CONNECTING: number;\r\n OPEN: number;\r\n addEventListener(type: \"close\", listener: (ev: CloseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"open\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var WebSocket: {\r\n prototype: WebSocket;\r\n new(url: string, protocols?: string | string[]): WebSocket;\r\n CLOSED: number;\r\n CLOSING: number;\r\n CONNECTING: number;\r\n OPEN: number;\r\n}\r\n\r\ninterface WheelEvent extends MouseEvent {\r\n deltaMode: number;\r\n deltaX: number;\r\n deltaY: number;\r\n deltaZ: number;\r\n getCurrentPoint(element: Element): void;\r\n initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void;\r\n DOM_DELTA_LINE: number;\r\n DOM_DELTA_PAGE: number;\r\n DOM_DELTA_PIXEL: number;\r\n}\r\n\r\ndeclare var WheelEvent: {\r\n prototype: WheelEvent;\r\n new(typeArg: string, eventInitDict?: WheelEventInit): WheelEvent;\r\n DOM_DELTA_LINE: number;\r\n DOM_DELTA_PAGE: number;\r\n DOM_DELTA_PIXEL: number;\r\n}\r\n\r\ninterface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64 {\r\n animationStartTime: number;\r\n applicationCache: ApplicationCache;\r\n clientInformation: Navigator;\r\n closed: boolean;\r\n crypto: Crypto;\r\n defaultStatus: string;\r\n devicePixelRatio: number;\r\n doNotTrack: string;\r\n document: Document;\r\n event: Event;\r\n external: External;\r\n frameElement: Element;\r\n frames: Window;\r\n history: History;\r\n innerHeight: number;\r\n innerWidth: number;\r\n length: number;\r\n location: Location;\r\n locationbar: BarProp;\r\n menubar: BarProp;\r\n msAnimationStartTime: number;\r\n name: string;\r\n navigator: Navigator;\r\n offscreenBuffering: string | boolean;\r\n onabort: (ev: Event) => any;\r\n onafterprint: (ev: Event) => any;\r\n onbeforeprint: (ev: Event) => any;\r\n onbeforeunload: (ev: BeforeUnloadEvent) => any;\r\n onblur: (ev: FocusEvent) => any;\r\n oncanplay: (ev: Event) => any;\r\n oncanplaythrough: (ev: Event) => any;\r\n onchange: (ev: Event) => any;\r\n onclick: (ev: MouseEvent) => any;\r\n oncompassneedscalibration: (ev: Event) => any;\r\n oncontextmenu: (ev: PointerEvent) => any;\r\n ondblclick: (ev: MouseEvent) => any;\r\n ondevicemotion: (ev: DeviceMotionEvent) => any;\r\n ondeviceorientation: (ev: DeviceOrientationEvent) => any;\r\n ondrag: (ev: DragEvent) => any;\r\n ondragend: (ev: DragEvent) => any;\r\n ondragenter: (ev: DragEvent) => any;\r\n ondragleave: (ev: DragEvent) => any;\r\n ondragover: (ev: DragEvent) => any;\r\n ondragstart: (ev: DragEvent) => any;\r\n ondrop: (ev: DragEvent) => any;\r\n ondurationchange: (ev: Event) => any;\r\n onemptied: (ev: Event) => any;\r\n onended: (ev: Event) => any;\r\n onerror: ErrorEventHandler;\r\n onfocus: (ev: FocusEvent) => any;\r\n onhashchange: (ev: HashChangeEvent) => any;\r\n oninput: (ev: Event) => any;\r\n onkeydown: (ev: KeyboardEvent) => any;\r\n onkeypress: (ev: KeyboardEvent) => any;\r\n onkeyup: (ev: KeyboardEvent) => any;\r\n onload: (ev: Event) => any;\r\n onloadeddata: (ev: Event) => any;\r\n onloadedmetadata: (ev: Event) => any;\r\n onloadstart: (ev: Event) => any;\r\n onmessage: (ev: MessageEvent) => any;\r\n onmousedown: (ev: MouseEvent) => any;\r\n onmouseenter: (ev: MouseEvent) => any;\r\n onmouseleave: (ev: MouseEvent) => any;\r\n onmousemove: (ev: MouseEvent) => any;\r\n onmouseout: (ev: MouseEvent) => any;\r\n onmouseover: (ev: MouseEvent) => any;\r\n onmouseup: (ev: MouseEvent) => any;\r\n onmousewheel: (ev: MouseWheelEvent) => any;\r\n onmsgesturechange: (ev: MSGestureEvent) => any;\r\n onmsgesturedoubletap: (ev: MSGestureEvent) => any;\r\n onmsgestureend: (ev: MSGestureEvent) => any;\r\n onmsgesturehold: (ev: MSGestureEvent) => any;\r\n onmsgesturestart: (ev: MSGestureEvent) => any;\r\n onmsgesturetap: (ev: MSGestureEvent) => any;\r\n onmsinertiastart: (ev: MSGestureEvent) => any;\r\n onmspointercancel: (ev: MSPointerEvent) => any;\r\n onmspointerdown: (ev: MSPointerEvent) => any;\r\n onmspointerenter: (ev: MSPointerEvent) => any;\r\n onmspointerleave: (ev: MSPointerEvent) => any;\r\n onmspointermove: (ev: MSPointerEvent) => any;\r\n onmspointerout: (ev: MSPointerEvent) => any;\r\n onmspointerover: (ev: MSPointerEvent) => any;\r\n onmspointerup: (ev: MSPointerEvent) => any;\r\n onoffline: (ev: Event) => any;\r\n ononline: (ev: Event) => any;\r\n onorientationchange: (ev: Event) => any;\r\n onpagehide: (ev: PageTransitionEvent) => any;\r\n onpageshow: (ev: PageTransitionEvent) => any;\r\n onpause: (ev: Event) => any;\r\n onplay: (ev: Event) => any;\r\n onplaying: (ev: Event) => any;\r\n onpopstate: (ev: PopStateEvent) => any;\r\n onprogress: (ev: ProgressEvent) => any;\r\n onratechange: (ev: Event) => any;\r\n onreadystatechange: (ev: ProgressEvent) => any;\r\n onreset: (ev: Event) => any;\r\n onresize: (ev: UIEvent) => any;\r\n onscroll: (ev: UIEvent) => any;\r\n onseeked: (ev: Event) => any;\r\n onseeking: (ev: Event) => any;\r\n onselect: (ev: UIEvent) => any;\r\n onstalled: (ev: Event) => any;\r\n onstorage: (ev: StorageEvent) => any;\r\n onsubmit: (ev: Event) => any;\r\n onsuspend: (ev: Event) => any;\r\n ontimeupdate: (ev: Event) => any;\r\n ontouchcancel: any;\r\n ontouchend: any;\r\n ontouchmove: any;\r\n ontouchstart: any;\r\n onunload: (ev: Event) => any;\r\n onvolumechange: (ev: Event) => any;\r\n onwaiting: (ev: Event) => any;\r\n opener: Window;\r\n orientation: string | number;\r\n outerHeight: number;\r\n outerWidth: number;\r\n pageXOffset: number;\r\n pageYOffset: number;\r\n parent: Window;\r\n performance: Performance;\r\n personalbar: BarProp;\r\n screen: Screen;\r\n screenLeft: number;\r\n screenTop: number;\r\n screenX: number;\r\n screenY: number;\r\n scrollX: number;\r\n scrollY: number;\r\n scrollbars: BarProp;\r\n self: Window;\r\n status: string;\r\n statusbar: BarProp;\r\n styleMedia: StyleMedia;\r\n toolbar: BarProp;\r\n top: Window;\r\n window: Window;\r\n URL: URL;\r\n alert(message?: any): void;\r\n blur(): void;\r\n cancelAnimationFrame(handle: number): void;\r\n captureEvents(): void;\r\n close(): void;\r\n confirm(message?: string): boolean;\r\n focus(): void;\r\n getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;\r\n getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;\r\n getSelection(): Selection;\r\n matchMedia(mediaQuery: string): MediaQueryList;\r\n moveBy(x?: number, y?: number): void;\r\n moveTo(x?: number, y?: number): void;\r\n msCancelRequestAnimationFrame(handle: number): void;\r\n msMatchMedia(mediaQuery: string): MediaQueryList;\r\n msRequestAnimationFrame(callback: FrameRequestCallback): number;\r\n msWriteProfilerMark(profilerMarkName: string): void;\r\n open(url?: string, target?: string, features?: string, replace?: boolean): Window;\r\n postMessage(message: any, targetOrigin: string, ports?: any): void;\r\n print(): void;\r\n prompt(message?: string, _default?: string): string;\r\n releaseEvents(): void;\r\n requestAnimationFrame(callback: FrameRequestCallback): number;\r\n resizeBy(x?: number, y?: number): void;\r\n resizeTo(x?: number, y?: number): void;\r\n scroll(x?: number, y?: number): void;\r\n scrollBy(x?: number, y?: number): void;\r\n scrollTo(x?: number, y?: number): void;\r\n webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;\r\n webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;\r\n addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"afterprint\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeprint\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeunload\", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"compassneedscalibration\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"devicemotion\", listener: (ev: DeviceMotionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deviceorientation\", listener: (ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"hashchange\", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"offline\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"online\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"orientationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pagehide\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pageshow\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"popstate\", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"readystatechange\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"storage\", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"unload\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: Window;\r\n}\r\n\r\ndeclare var Window: {\r\n prototype: Window;\r\n new(): Window;\r\n}\r\n\r\ninterface Worker extends EventTarget, AbstractWorker {\r\n onmessage: (ev: MessageEvent) => any;\r\n postMessage(message: any, ports?: any): void;\r\n terminate(): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Worker: {\r\n prototype: Worker;\r\n new(stringUrl: string): Worker;\r\n}\r\n\r\ninterface XMLDocument extends Document {\r\n}\r\n\r\ndeclare var XMLDocument: {\r\n prototype: XMLDocument;\r\n new(): XMLDocument;\r\n}\r\n\r\ninterface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {\r\n msCaching: string;\r\n onreadystatechange: (ev: ProgressEvent) => any;\r\n readyState: number;\r\n response: any;\r\n responseBody: any;\r\n responseText: string;\r\n responseType: string;\r\n responseXML: any;\r\n status: number;\r\n statusText: string;\r\n timeout: number;\r\n upload: XMLHttpRequestUpload;\r\n withCredentials: boolean;\r\n abort(): void;\r\n getAllResponseHeaders(): string;\r\n getResponseHeader(header: string): string;\r\n msCachingEnabled(): boolean;\r\n open(method: string, url: string, async?: boolean, user?: string, password?: string): void;\r\n overrideMimeType(mime: string): void;\r\n send(data?: Document): void;\r\n send(data?: string): void;\r\n send(data?: any): void;\r\n setRequestHeader(header: string, value: string): void;\r\n DONE: number;\r\n HEADERS_RECEIVED: number;\r\n LOADING: number;\r\n OPENED: number;\r\n UNSENT: number;\r\n addEventListener(type: \"abort\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadend\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"readystatechange\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeout\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var XMLHttpRequest: {\r\n prototype: XMLHttpRequest;\r\n new(): XMLHttpRequest;\r\n DONE: number;\r\n HEADERS_RECEIVED: number;\r\n LOADING: number;\r\n OPENED: number;\r\n UNSENT: number;\r\n create(): XMLHttpRequest;\r\n}\r\n\r\ninterface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var XMLHttpRequestUpload: {\r\n prototype: XMLHttpRequestUpload;\r\n new(): XMLHttpRequestUpload;\r\n}\r\n\r\ninterface XMLSerializer {\r\n serializeToString(target: Node): string;\r\n}\r\n\r\ndeclare var XMLSerializer: {\r\n prototype: XMLSerializer;\r\n new(): XMLSerializer;\r\n}\r\n\r\ninterface XPathEvaluator {\r\n createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;\r\n createNSResolver(nodeResolver?: Node): XPathNSResolver;\r\n evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver, type: number, result: XPathResult): XPathResult;\r\n}\r\n\r\ndeclare var XPathEvaluator: {\r\n prototype: XPathEvaluator;\r\n new(): XPathEvaluator;\r\n}\r\n\r\ninterface XPathExpression {\r\n evaluate(contextNode: Node, type: number, result: XPathResult): XPathExpression;\r\n}\r\n\r\ndeclare var XPathExpression: {\r\n prototype: XPathExpression;\r\n new(): XPathExpression;\r\n}\r\n\r\ninterface XPathNSResolver {\r\n lookupNamespaceURI(prefix: string): string;\r\n}\r\n\r\ndeclare var XPathNSResolver: {\r\n prototype: XPathNSResolver;\r\n new(): XPathNSResolver;\r\n}\r\n\r\ninterface XPathResult {\r\n booleanValue: boolean;\r\n invalidIteratorState: boolean;\r\n numberValue: number;\r\n resultType: number;\r\n singleNodeValue: Node;\r\n snapshotLength: number;\r\n stringValue: string;\r\n iterateNext(): Node;\r\n snapshotItem(index: number): Node;\r\n ANY_TYPE: number;\r\n ANY_UNORDERED_NODE_TYPE: number;\r\n BOOLEAN_TYPE: number;\r\n FIRST_ORDERED_NODE_TYPE: number;\r\n NUMBER_TYPE: number;\r\n ORDERED_NODE_ITERATOR_TYPE: number;\r\n ORDERED_NODE_SNAPSHOT_TYPE: number;\r\n STRING_TYPE: number;\r\n UNORDERED_NODE_ITERATOR_TYPE: number;\r\n UNORDERED_NODE_SNAPSHOT_TYPE: number;\r\n}\r\n\r\ndeclare var XPathResult: {\r\n prototype: XPathResult;\r\n new(): XPathResult;\r\n ANY_TYPE: number;\r\n ANY_UNORDERED_NODE_TYPE: number;\r\n BOOLEAN_TYPE: number;\r\n FIRST_ORDERED_NODE_TYPE: number;\r\n NUMBER_TYPE: number;\r\n ORDERED_NODE_ITERATOR_TYPE: number;\r\n ORDERED_NODE_SNAPSHOT_TYPE: number;\r\n STRING_TYPE: number;\r\n UNORDERED_NODE_ITERATOR_TYPE: number;\r\n UNORDERED_NODE_SNAPSHOT_TYPE: number;\r\n}\r\n\r\ninterface XSLTProcessor {\r\n clearParameters(): void;\r\n getParameter(namespaceURI: string, localName: string): any;\r\n importStylesheet(style: Node): void;\r\n removeParameter(namespaceURI: string, localName: string): void;\r\n reset(): void;\r\n setParameter(namespaceURI: string, localName: string, value: any): void;\r\n transformToDocument(source: Node): Document;\r\n transformToFragment(source: Node, document: Document): DocumentFragment;\r\n}\r\n\r\ndeclare var XSLTProcessor: {\r\n prototype: XSLTProcessor;\r\n new(): XSLTProcessor;\r\n}\r\n\r\ninterface AbstractWorker {\r\n onerror: (ev: Event) => any;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface ChildNode {\r\n remove(): void;\r\n}\r\n\r\ninterface DOML2DeprecatedColorProperty {\r\n color: string;\r\n}\r\n\r\ninterface DOML2DeprecatedSizeProperty {\r\n size: number;\r\n}\r\n\r\ninterface DocumentEvent {\r\n createEvent(eventInterface:\"AnimationEvent\"): AnimationEvent;\r\n createEvent(eventInterface:\"AriaRequestEvent\"): AriaRequestEvent;\r\n createEvent(eventInterface:\"AudioProcessingEvent\"): AudioProcessingEvent;\r\n createEvent(eventInterface:\"BeforeUnloadEvent\"): BeforeUnloadEvent;\r\n createEvent(eventInterface:\"ClipboardEvent\"): ClipboardEvent;\r\n createEvent(eventInterface:\"CloseEvent\"): CloseEvent;\r\n createEvent(eventInterface:\"CommandEvent\"): CommandEvent;\r\n createEvent(eventInterface:\"CompositionEvent\"): CompositionEvent;\r\n createEvent(eventInterface:\"CustomEvent\"): CustomEvent;\r\n createEvent(eventInterface:\"DeviceMotionEvent\"): DeviceMotionEvent;\r\n createEvent(eventInterface:\"DeviceOrientationEvent\"): DeviceOrientationEvent;\r\n createEvent(eventInterface:\"DragEvent\"): DragEvent;\r\n createEvent(eventInterface:\"ErrorEvent\"): ErrorEvent;\r\n createEvent(eventInterface:\"Event\"): Event;\r\n createEvent(eventInterface:\"Events\"): Event;\r\n createEvent(eventInterface:\"FocusEvent\"): FocusEvent;\r\n createEvent(eventInterface:\"GamepadEvent\"): GamepadEvent;\r\n createEvent(eventInterface:\"HashChangeEvent\"): HashChangeEvent;\r\n createEvent(eventInterface:\"IDBVersionChangeEvent\"): IDBVersionChangeEvent;\r\n createEvent(eventInterface:\"KeyboardEvent\"): KeyboardEvent;\r\n createEvent(eventInterface:\"LongRunningScriptDetectedEvent\"): LongRunningScriptDetectedEvent;\r\n createEvent(eventInterface:\"MSGestureEvent\"): MSGestureEvent;\r\n createEvent(eventInterface:\"MSManipulationEvent\"): MSManipulationEvent;\r\n createEvent(eventInterface:\"MSMediaKeyMessageEvent\"): MSMediaKeyMessageEvent;\r\n createEvent(eventInterface:\"MSMediaKeyNeededEvent\"): MSMediaKeyNeededEvent;\r\n createEvent(eventInterface:\"MSPointerEvent\"): MSPointerEvent;\r\n createEvent(eventInterface:\"MSSiteModeEvent\"): MSSiteModeEvent;\r\n createEvent(eventInterface:\"MessageEvent\"): MessageEvent;\r\n createEvent(eventInterface:\"MouseEvent\"): MouseEvent;\r\n createEvent(eventInterface:\"MouseEvents\"): MouseEvent;\r\n createEvent(eventInterface:\"MouseWheelEvent\"): MouseWheelEvent;\r\n createEvent(eventInterface:\"MutationEvent\"): MutationEvent;\r\n createEvent(eventInterface:\"MutationEvents\"): MutationEvent;\r\n createEvent(eventInterface:\"NavigationCompletedEvent\"): NavigationCompletedEvent;\r\n createEvent(eventInterface:\"NavigationEvent\"): NavigationEvent;\r\n createEvent(eventInterface:\"NavigationEventWithReferrer\"): NavigationEventWithReferrer;\r\n createEvent(eventInterface:\"OfflineAudioCompletionEvent\"): OfflineAudioCompletionEvent;\r\n createEvent(eventInterface:\"PageTransitionEvent\"): PageTransitionEvent;\r\n createEvent(eventInterface:\"PermissionRequestedEvent\"): PermissionRequestedEvent;\r\n createEvent(eventInterface:\"PointerEvent\"): PointerEvent;\r\n createEvent(eventInterface:\"PopStateEvent\"): PopStateEvent;\r\n createEvent(eventInterface:\"ProgressEvent\"): ProgressEvent;\r\n createEvent(eventInterface:\"SVGZoomEvent\"): SVGZoomEvent;\r\n createEvent(eventInterface:\"SVGZoomEvents\"): SVGZoomEvent;\r\n createEvent(eventInterface:\"ScriptNotifyEvent\"): ScriptNotifyEvent;\r\n createEvent(eventInterface:\"StorageEvent\"): StorageEvent;\r\n createEvent(eventInterface:\"TextEvent\"): TextEvent;\r\n createEvent(eventInterface:\"TouchEvent\"): TouchEvent;\r\n createEvent(eventInterface:\"TrackEvent\"): TrackEvent;\r\n createEvent(eventInterface:\"TransitionEvent\"): TransitionEvent;\r\n createEvent(eventInterface:\"UIEvent\"): UIEvent;\r\n createEvent(eventInterface:\"UIEvents\"): UIEvent;\r\n createEvent(eventInterface:\"UnviewableContentIdentifiedEvent\"): UnviewableContentIdentifiedEvent;\r\n createEvent(eventInterface:\"WebGLContextEvent\"): WebGLContextEvent;\r\n createEvent(eventInterface:\"WheelEvent\"): WheelEvent;\r\n createEvent(eventInterface: string): Event;\r\n}\r\n\r\ninterface ElementTraversal {\r\n childElementCount: number;\r\n firstElementChild: Element;\r\n lastElementChild: Element;\r\n nextElementSibling: Element;\r\n previousElementSibling: Element;\r\n}\r\n\r\ninterface GetSVGDocument {\r\n getSVGDocument(): Document;\r\n}\r\n\r\ninterface GlobalEventHandlers {\r\n onpointercancel: (ev: PointerEvent) => any;\r\n onpointerdown: (ev: PointerEvent) => any;\r\n onpointerenter: (ev: PointerEvent) => any;\r\n onpointerleave: (ev: PointerEvent) => any;\r\n onpointermove: (ev: PointerEvent) => any;\r\n onpointerout: (ev: PointerEvent) => any;\r\n onpointerover: (ev: PointerEvent) => any;\r\n onpointerup: (ev: PointerEvent) => any;\r\n onwheel: (ev: WheelEvent) => any;\r\n addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own ch functionality for the object.\r\n */\r\n ch: string;\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own chOff functionality for the object.\r\n */\r\n chOff: string;\r\n /**\r\n * Sets or retrieves how text and other content are vertically aligned within the object that contains them.\r\n */\r\n vAlign: string;\r\n}\r\n\r\ninterface IDBEnvironment {\r\n indexedDB: IDBFactory;\r\n msIndexedDB: IDBFactory;\r\n}\r\n\r\ninterface LinkStyle {\r\n sheet: StyleSheet;\r\n}\r\n\r\ninterface MSBaseReader {\r\n onabort: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n onload: (ev: Event) => any;\r\n onloadend: (ev: ProgressEvent) => any;\r\n onloadstart: (ev: Event) => any;\r\n onprogress: (ev: ProgressEvent) => any;\r\n readyState: number;\r\n result: any;\r\n abort(): void;\r\n DONE: number;\r\n EMPTY: number;\r\n LOADING: number;\r\n addEventListener(type: \"abort\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadend\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface MSFileSaver {\r\n msSaveBlob(blob: any, defaultName?: string): boolean;\r\n msSaveOrOpenBlob(blob: any, defaultName?: string): boolean;\r\n}\r\n\r\ninterface MSNavigatorDoNotTrack {\r\n confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean;\r\n confirmWebWideTrackingException(args: ExceptionInformation): boolean;\r\n removeSiteSpecificTrackingException(args: ExceptionInformation): void;\r\n removeWebWideTrackingException(args: ExceptionInformation): void;\r\n storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void;\r\n storeWebWideTrackingException(args: StoreExceptionsInformation): void;\r\n}\r\n\r\ninterface NavigatorContentUtils {\r\n}\r\n\r\ninterface NavigatorGeolocation {\r\n geolocation: Geolocation;\r\n}\r\n\r\ninterface NavigatorID {\r\n appName: string;\r\n appVersion: string;\r\n platform: string;\r\n product: string;\r\n productSub: string;\r\n userAgent: string;\r\n vendor: string;\r\n vendorSub: string;\r\n}\r\n\r\ninterface NavigatorOnLine {\r\n onLine: boolean;\r\n}\r\n\r\ninterface NavigatorStorageUtils {\r\n}\r\n\r\ninterface NodeSelector {\r\n querySelector(selectors: string): Element;\r\n querySelectorAll(selectors: string): NodeListOf;\r\n}\r\n\r\ninterface RandomSource {\r\n getRandomValues(array: ArrayBufferView): ArrayBufferView;\r\n}\r\n\r\ninterface SVGAnimatedPathData {\r\n pathSegList: SVGPathSegList;\r\n}\r\n\r\ninterface SVGAnimatedPoints {\r\n animatedPoints: SVGPointList;\r\n points: SVGPointList;\r\n}\r\n\r\ninterface SVGExternalResourcesRequired {\r\n externalResourcesRequired: SVGAnimatedBoolean;\r\n}\r\n\r\ninterface SVGFilterPrimitiveStandardAttributes extends SVGStylable {\r\n height: SVGAnimatedLength;\r\n result: SVGAnimatedString;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n y: SVGAnimatedLength;\r\n}\r\n\r\ninterface SVGFitToViewBox {\r\n preserveAspectRatio: SVGAnimatedPreserveAspectRatio;\r\n viewBox: SVGAnimatedRect;\r\n}\r\n\r\ninterface SVGLangSpace {\r\n xmllang: string;\r\n xmlspace: string;\r\n}\r\n\r\ninterface SVGLocatable {\r\n farthestViewportElement: SVGElement;\r\n nearestViewportElement: SVGElement;\r\n getBBox(): SVGRect;\r\n getCTM(): SVGMatrix;\r\n getScreenCTM(): SVGMatrix;\r\n getTransformToElement(element: SVGElement): SVGMatrix;\r\n}\r\n\r\ninterface SVGStylable {\r\n className: any;\r\n style: CSSStyleDeclaration;\r\n}\r\n\r\ninterface SVGTests {\r\n requiredExtensions: SVGStringList;\r\n requiredFeatures: SVGStringList;\r\n systemLanguage: SVGStringList;\r\n hasExtension(extension: string): boolean;\r\n}\r\n\r\ninterface SVGTransformable extends SVGLocatable {\r\n transform: SVGAnimatedTransformList;\r\n}\r\n\r\ninterface SVGURIReference {\r\n href: SVGAnimatedString;\r\n}\r\n\r\ninterface WindowBase64 {\r\n atob(encodedString: string): string;\r\n btoa(rawString: string): string;\r\n}\r\n\r\ninterface WindowConsole {\r\n console: Console;\r\n}\r\n\r\ninterface WindowLocalStorage {\r\n localStorage: Storage;\r\n}\r\n\r\ninterface WindowSessionStorage {\r\n sessionStorage: Storage;\r\n}\r\n\r\ninterface WindowTimers extends Object, WindowTimersExtension {\r\n clearInterval(handle: number): void;\r\n clearTimeout(handle: number): void;\r\n setInterval(handler: any, timeout?: any, ...args: any[]): number;\r\n setTimeout(handler: any, timeout?: any, ...args: any[]): number;\r\n}\r\n\r\ninterface WindowTimersExtension {\r\n clearImmediate(handle: number): void;\r\n msClearImmediate(handle: number): void;\r\n msSetImmediate(expression: any, ...args: any[]): number;\r\n setImmediate(expression: any, ...args: any[]): number;\r\n}\r\n\r\ninterface XMLHttpRequestEventTarget {\r\n onabort: (ev: Event) => any;\r\n onerror: (ev: Event) => any;\r\n onload: (ev: Event) => any;\r\n onloadend: (ev: ProgressEvent) => any;\r\n onloadstart: (ev: Event) => any;\r\n onprogress: (ev: ProgressEvent) => any;\r\n ontimeout: (ev: ProgressEvent) => any;\r\n addEventListener(type: \"abort\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadend\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeout\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface StorageEventInit extends EventInit {\r\n key?: string;\r\n oldValue?: string;\r\n newValue?: string;\r\n url: string;\r\n storageArea?: Storage;\r\n}\r\n\r\ninterface IDBObjectStoreParameters {\r\n keyPath?: string | string[];\r\n autoIncrement?: boolean;\r\n}\r\n\r\ninterface IDBIndexParameters {\r\n unique?: boolean;\r\n multiEntry?: boolean;\r\n}\r\n\r\ninterface NodeListOf extends NodeList {\r\n length: number;\r\n item(index: number): TNode;\r\n [index: number]: TNode;\r\n}\r\n\r\ninterface BlobPropertyBag {\r\n type?: string;\r\n endings?: string;\r\n}\r\n\r\ninterface FilePropertyBag {\r\n type?: string;\r\n lastModified?: number;\r\n}\r\n\r\ninterface EventListenerObject {\r\n handleEvent(evt: Event): void;\r\n}\r\n\r\ninterface MessageEventInit extends EventInit {\r\n data?: any;\r\n origin?: string;\r\n lastEventId?: string;\r\n channel?: string;\r\n source?: any;\r\n ports?: MessagePort[];\r\n}\r\n\r\ninterface ProgressEventInit extends EventInit {\r\n lengthComputable?: boolean;\r\n loaded?: number;\r\n total?: number;\r\n}\r\n\r\ninterface HTMLTemplateElement extends HTMLElement {\r\n content: DocumentFragment;\r\n}\r\n\r\ndeclare var HTMLTemplateElement: {\r\n prototype: HTMLTemplateElement;\r\n new(): HTMLTemplateElement;\r\n}\r\n\r\ninterface HTMLPictureElement extends HTMLElement {\r\n}\r\n\r\ndeclare var HTMLPictureElement: {\r\n prototype: HTMLPictureElement;\r\n new(): HTMLPictureElement;\r\n}\r\n\r\ndeclare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;\r\n\r\ninterface ErrorEventHandler {\r\n (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;\r\n}\r\ninterface PositionCallback {\r\n (position: Position): void;\r\n}\r\ninterface PositionErrorCallback {\r\n (error: PositionError): void;\r\n}\r\ninterface MediaQueryListListener {\r\n (mql: MediaQueryList): void;\r\n}\r\ninterface MSLaunchUriCallback {\r\n (): void;\r\n}\r\ninterface FrameRequestCallback {\r\n (time: number): void;\r\n}\r\ninterface MSUnsafeFunctionCallback {\r\n (): any;\r\n}\r\ninterface MSExecAtPriorityFunctionCallback {\r\n (...args: any[]): any;\r\n}\r\ninterface MutationCallback {\r\n (mutations: MutationRecord[], observer: MutationObserver): void;\r\n}\r\ninterface DecodeSuccessCallback {\r\n (decodedData: AudioBuffer): void;\r\n}\r\ninterface DecodeErrorCallback {\r\n (): void;\r\n}\r\ninterface FunctionStringCallback {\r\n (data: string): void;\r\n}\r\ndeclare var Audio: {new(src?: string): HTMLAudioElement; };\r\ndeclare var Image: {new(width?: number, height?: number): HTMLImageElement; };\r\ndeclare var Option: {new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; };\r\ndeclare var animationStartTime: number;\r\ndeclare var applicationCache: ApplicationCache;\r\ndeclare var clientInformation: Navigator;\r\ndeclare var closed: boolean;\r\ndeclare var crypto: Crypto;\r\ndeclare var defaultStatus: string;\r\ndeclare var devicePixelRatio: number;\r\ndeclare var doNotTrack: string;\r\ndeclare var document: Document;\r\ndeclare var event: Event;\r\ndeclare var external: External;\r\ndeclare var frameElement: Element;\r\ndeclare var frames: Window;\r\ndeclare var history: History;\r\ndeclare var innerHeight: number;\r\ndeclare var innerWidth: number;\r\ndeclare var length: number;\r\ndeclare var location: Location;\r\ndeclare var locationbar: BarProp;\r\ndeclare var menubar: BarProp;\r\ndeclare var msAnimationStartTime: number;\r\ndeclare var name: string;\r\ndeclare var navigator: Navigator;\r\ndeclare var offscreenBuffering: string | boolean;\r\ndeclare var onabort: (ev: Event) => any;\r\ndeclare var onafterprint: (ev: Event) => any;\r\ndeclare var onbeforeprint: (ev: Event) => any;\r\ndeclare var onbeforeunload: (ev: BeforeUnloadEvent) => any;\r\ndeclare var onblur: (ev: FocusEvent) => any;\r\ndeclare var oncanplay: (ev: Event) => any;\r\ndeclare var oncanplaythrough: (ev: Event) => any;\r\ndeclare var onchange: (ev: Event) => any;\r\ndeclare var onclick: (ev: MouseEvent) => any;\r\ndeclare var oncompassneedscalibration: (ev: Event) => any;\r\ndeclare var oncontextmenu: (ev: PointerEvent) => any;\r\ndeclare var ondblclick: (ev: MouseEvent) => any;\r\ndeclare var ondevicemotion: (ev: DeviceMotionEvent) => any;\r\ndeclare var ondeviceorientation: (ev: DeviceOrientationEvent) => any;\r\ndeclare var ondrag: (ev: DragEvent) => any;\r\ndeclare var ondragend: (ev: DragEvent) => any;\r\ndeclare var ondragenter: (ev: DragEvent) => any;\r\ndeclare var ondragleave: (ev: DragEvent) => any;\r\ndeclare var ondragover: (ev: DragEvent) => any;\r\ndeclare var ondragstart: (ev: DragEvent) => any;\r\ndeclare var ondrop: (ev: DragEvent) => any;\r\ndeclare var ondurationchange: (ev: Event) => any;\r\ndeclare var onemptied: (ev: Event) => any;\r\ndeclare var onended: (ev: Event) => any;\r\ndeclare var onerror: ErrorEventHandler;\r\ndeclare var onfocus: (ev: FocusEvent) => any;\r\ndeclare var onhashchange: (ev: HashChangeEvent) => any;\r\ndeclare var oninput: (ev: Event) => any;\r\ndeclare var onkeydown: (ev: KeyboardEvent) => any;\r\ndeclare var onkeypress: (ev: KeyboardEvent) => any;\r\ndeclare var onkeyup: (ev: KeyboardEvent) => any;\r\ndeclare var onload: (ev: Event) => any;\r\ndeclare var onloadeddata: (ev: Event) => any;\r\ndeclare var onloadedmetadata: (ev: Event) => any;\r\ndeclare var onloadstart: (ev: Event) => any;\r\ndeclare var onmessage: (ev: MessageEvent) => any;\r\ndeclare var onmousedown: (ev: MouseEvent) => any;\r\ndeclare var onmouseenter: (ev: MouseEvent) => any;\r\ndeclare var onmouseleave: (ev: MouseEvent) => any;\r\ndeclare var onmousemove: (ev: MouseEvent) => any;\r\ndeclare var onmouseout: (ev: MouseEvent) => any;\r\ndeclare var onmouseover: (ev: MouseEvent) => any;\r\ndeclare var onmouseup: (ev: MouseEvent) => any;\r\ndeclare var onmousewheel: (ev: MouseWheelEvent) => any;\r\ndeclare var onmsgesturechange: (ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturedoubletap: (ev: MSGestureEvent) => any;\r\ndeclare var onmsgestureend: (ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturehold: (ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturestart: (ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturetap: (ev: MSGestureEvent) => any;\r\ndeclare var onmsinertiastart: (ev: MSGestureEvent) => any;\r\ndeclare var onmspointercancel: (ev: MSPointerEvent) => any;\r\ndeclare var onmspointerdown: (ev: MSPointerEvent) => any;\r\ndeclare var onmspointerenter: (ev: MSPointerEvent) => any;\r\ndeclare var onmspointerleave: (ev: MSPointerEvent) => any;\r\ndeclare var onmspointermove: (ev: MSPointerEvent) => any;\r\ndeclare var onmspointerout: (ev: MSPointerEvent) => any;\r\ndeclare var onmspointerover: (ev: MSPointerEvent) => any;\r\ndeclare var onmspointerup: (ev: MSPointerEvent) => any;\r\ndeclare var onoffline: (ev: Event) => any;\r\ndeclare var ononline: (ev: Event) => any;\r\ndeclare var onorientationchange: (ev: Event) => any;\r\ndeclare var onpagehide: (ev: PageTransitionEvent) => any;\r\ndeclare var onpageshow: (ev: PageTransitionEvent) => any;\r\ndeclare var onpause: (ev: Event) => any;\r\ndeclare var onplay: (ev: Event) => any;\r\ndeclare var onplaying: (ev: Event) => any;\r\ndeclare var onpopstate: (ev: PopStateEvent) => any;\r\ndeclare var onprogress: (ev: ProgressEvent) => any;\r\ndeclare var onratechange: (ev: Event) => any;\r\ndeclare var onreadystatechange: (ev: ProgressEvent) => any;\r\ndeclare var onreset: (ev: Event) => any;\r\ndeclare var onresize: (ev: UIEvent) => any;\r\ndeclare var onscroll: (ev: UIEvent) => any;\r\ndeclare var onseeked: (ev: Event) => any;\r\ndeclare var onseeking: (ev: Event) => any;\r\ndeclare var onselect: (ev: UIEvent) => any;\r\ndeclare var onstalled: (ev: Event) => any;\r\ndeclare var onstorage: (ev: StorageEvent) => any;\r\ndeclare var onsubmit: (ev: Event) => any;\r\ndeclare var onsuspend: (ev: Event) => any;\r\ndeclare var ontimeupdate: (ev: Event) => any;\r\ndeclare var ontouchcancel: any;\r\ndeclare var ontouchend: any;\r\ndeclare var ontouchmove: any;\r\ndeclare var ontouchstart: any;\r\ndeclare var onunload: (ev: Event) => any;\r\ndeclare var onvolumechange: (ev: Event) => any;\r\ndeclare var onwaiting: (ev: Event) => any;\r\ndeclare var opener: Window;\r\ndeclare var orientation: string | number;\r\ndeclare var outerHeight: number;\r\ndeclare var outerWidth: number;\r\ndeclare var pageXOffset: number;\r\ndeclare var pageYOffset: number;\r\ndeclare var parent: Window;\r\ndeclare var performance: Performance;\r\ndeclare var personalbar: BarProp;\r\ndeclare var screen: Screen;\r\ndeclare var screenLeft: number;\r\ndeclare var screenTop: number;\r\ndeclare var screenX: number;\r\ndeclare var screenY: number;\r\ndeclare var scrollX: number;\r\ndeclare var scrollY: number;\r\ndeclare var scrollbars: BarProp;\r\ndeclare var self: Window;\r\ndeclare var status: string;\r\ndeclare var statusbar: BarProp;\r\ndeclare var styleMedia: StyleMedia;\r\ndeclare var toolbar: BarProp;\r\ndeclare var top: Window;\r\ndeclare var window: Window;\r\ndeclare var URL: URL;\r\ndeclare function alert(message?: any): void;\r\ndeclare function blur(): void;\r\ndeclare function cancelAnimationFrame(handle: number): void;\r\ndeclare function captureEvents(): void;\r\ndeclare function close(): void;\r\ndeclare function confirm(message?: string): boolean;\r\ndeclare function focus(): void;\r\ndeclare function getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;\r\ndeclare function getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;\r\ndeclare function getSelection(): Selection;\r\ndeclare function matchMedia(mediaQuery: string): MediaQueryList;\r\ndeclare function moveBy(x?: number, y?: number): void;\r\ndeclare function moveTo(x?: number, y?: number): void;\r\ndeclare function msCancelRequestAnimationFrame(handle: number): void;\r\ndeclare function msMatchMedia(mediaQuery: string): MediaQueryList;\r\ndeclare function msRequestAnimationFrame(callback: FrameRequestCallback): number;\r\ndeclare function msWriteProfilerMark(profilerMarkName: string): void;\r\ndeclare function open(url?: string, target?: string, features?: string, replace?: boolean): Window;\r\ndeclare function postMessage(message: any, targetOrigin: string, ports?: any): void;\r\ndeclare function print(): void;\r\ndeclare function prompt(message?: string, _default?: string): string;\r\ndeclare function releaseEvents(): void;\r\ndeclare function requestAnimationFrame(callback: FrameRequestCallback): number;\r\ndeclare function resizeBy(x?: number, y?: number): void;\r\ndeclare function resizeTo(x?: number, y?: number): void;\r\ndeclare function scroll(x?: number, y?: number): void;\r\ndeclare function scrollBy(x?: number, y?: number): void;\r\ndeclare function scrollTo(x?: number, y?: number): void;\r\ndeclare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;\r\ndeclare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;\r\ndeclare function toString(): string;\r\ndeclare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\ndeclare function dispatchEvent(evt: Event): boolean;\r\ndeclare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\ndeclare function clearInterval(handle: number): void;\r\ndeclare function clearTimeout(handle: number): void;\r\ndeclare function setInterval(handler: any, timeout?: any, ...args: any[]): number;\r\ndeclare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;\r\ndeclare function clearImmediate(handle: number): void;\r\ndeclare function msClearImmediate(handle: number): void;\r\ndeclare function msSetImmediate(expression: any, ...args: any[]): number;\r\ndeclare function setImmediate(expression: any, ...args: any[]): number;\r\ndeclare var sessionStorage: Storage;\r\ndeclare var localStorage: Storage;\r\ndeclare var console: Console;\r\ndeclare var onpointercancel: (ev: PointerEvent) => any;\r\ndeclare var onpointerdown: (ev: PointerEvent) => any;\r\ndeclare var onpointerenter: (ev: PointerEvent) => any;\r\ndeclare var onpointerleave: (ev: PointerEvent) => any;\r\ndeclare var onpointermove: (ev: PointerEvent) => any;\r\ndeclare var onpointerout: (ev: PointerEvent) => any;\r\ndeclare var onpointerover: (ev: PointerEvent) => any;\r\ndeclare var onpointerup: (ev: PointerEvent) => any;\r\ndeclare var onwheel: (ev: WheelEvent) => any;\r\ndeclare var indexedDB: IDBFactory;\r\ndeclare var msIndexedDB: IDBFactory;\r\ndeclare function atob(encodedString: string): string;\r\ndeclare function btoa(rawString: string): string;\r\ndeclare function addEventListener(type: \"MSGestureChange\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureDoubleTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureEnd\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureHold\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureTap\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSInertiaStart\", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerCancel\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerDown\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerEnter\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerLeave\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerMove\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerOut\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerOver\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerUp\", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"abort\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"afterprint\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"beforeprint\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"beforeunload\", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"blur\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"canplay\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"canplaythrough\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"change\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"click\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"compassneedscalibration\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"contextmenu\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dblclick\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"devicemotion\", listener: (ev: DeviceMotionEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"deviceorientation\", listener: (ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"drag\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragend\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragenter\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragleave\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragover\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragstart\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"drop\", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"durationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"emptied\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"ended\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"focus\", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"hashchange\", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"input\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"keydown\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"keypress\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"keyup\", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"load\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"loadeddata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"loadedmetadata\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"loadstart\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"message\", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mousedown\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseenter\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseleave\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mousemove\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseout\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseover\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseup\", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mousewheel\", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"offline\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"online\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"orientationchange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pagehide\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pageshow\", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pause\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"play\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"playing\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointercancel\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerdown\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerenter\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerleave\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointermove\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerout\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerover\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerup\", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"popstate\", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"progress\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"ratechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"readystatechange\", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"reset\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"resize\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"scroll\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"seeked\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"seeking\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"select\", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"stalled\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"storage\", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"submit\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"suspend\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"timeupdate\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"unload\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"volumechange\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"waiting\", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"wheel\", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n/////////////////////////////\r\n/// WorkerGlobalScope APIs \r\n/////////////////////////////\r\n// These are only available in a Web Worker \r\ndeclare function importScripts(...urls: string[]): void;\r\n\r\n\r\n/////////////////////////////\r\n/// Windows Script Host APIS\r\n/////////////////////////////\r\n\r\n\r\ninterface ActiveXObject {\r\n new (s: string): any;\r\n}\r\ndeclare var ActiveXObject: ActiveXObject;\r\n\r\ninterface ITextWriter {\r\n Write(s: string): void;\r\n WriteLine(s: string): void;\r\n Close(): void;\r\n}\r\n\r\ninterface TextStreamBase {\r\n /**\r\n * The column number of the current character position in an input stream.\r\n */\r\n Column: number;\r\n\r\n /**\r\n * The current line number in an input stream.\r\n */\r\n Line: number;\r\n\r\n /**\r\n * Closes a text stream.\r\n * It is not necessary to close standard streams; they close automatically when the process ends. If \r\n * you close a standard stream, be aware that any other pointers to that standard stream become invalid.\r\n */\r\n Close(): void;\r\n}\r\n\r\ninterface TextStreamWriter extends TextStreamBase {\r\n /**\r\n * Sends a string to an output stream.\r\n */\r\n Write(s: string): void;\r\n\r\n /**\r\n * Sends a specified number of blank lines (newline characters) to an output stream.\r\n */\r\n WriteBlankLines(intLines: number): void;\r\n\r\n /**\r\n * Sends a string followed by a newline character to an output stream.\r\n */\r\n WriteLine(s: string): void;\r\n}\r\n\r\ninterface TextStreamReader extends TextStreamBase {\r\n /**\r\n * Returns a specified number of characters from an input stream, starting at the current pointer position.\r\n * Does not return until the ENTER key is pressed.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n */\r\n Read(characters: number): string;\r\n\r\n /**\r\n * Returns all characters from an input stream.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n */\r\n ReadAll(): string;\r\n\r\n /**\r\n * Returns an entire line from an input stream.\r\n * Although this method extracts the newline character, it does not add it to the returned string.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n */\r\n ReadLine(): string;\r\n\r\n /**\r\n * Skips a specified number of characters when reading from an input text stream.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)\r\n */\r\n Skip(characters: number): void;\r\n\r\n /**\r\n * Skips the next line when reading from an input text stream.\r\n * Can only be used on a stream in reading mode, not writing or appending mode.\r\n */\r\n SkipLine(): void;\r\n\r\n /**\r\n * Indicates whether the stream pointer position is at the end of a line.\r\n */\r\n AtEndOfLine: boolean;\r\n\r\n /**\r\n * Indicates whether the stream pointer position is at the end of a stream.\r\n */\r\n AtEndOfStream: boolean;\r\n}\r\n\r\ndeclare var WScript: {\r\n /**\r\n * Outputs text to either a message box (under WScript.exe) or the command console window followed by\r\n * a newline (under CScript.exe).\r\n */\r\n Echo(s: any): void;\r\n\r\n /**\r\n * Exposes the write-only error output stream for the current script.\r\n * Can be accessed only while using CScript.exe.\r\n */\r\n StdErr: TextStreamWriter;\r\n\r\n /**\r\n * Exposes the write-only output stream for the current script.\r\n * Can be accessed only while using CScript.exe.\r\n */\r\n StdOut: TextStreamWriter;\r\n Arguments: { length: number; Item(n: number): string; };\r\n\r\n /**\r\n * The full path of the currently running script.\r\n */\r\n ScriptFullName: string;\r\n\r\n /**\r\n * Forces the script to stop immediately, with an optional exit code.\r\n */\r\n Quit(exitCode?: number): number;\r\n\r\n /**\r\n * The Windows Script Host build version number.\r\n */\r\n BuildVersion: number;\r\n\r\n /**\r\n * Fully qualified path of the host executable.\r\n */\r\n FullName: string;\r\n\r\n /**\r\n * Gets/sets the script mode - interactive(true) or batch(false).\r\n */\r\n Interactive: boolean;\r\n\r\n /**\r\n * The name of the host executable (WScript.exe or CScript.exe).\r\n */\r\n Name: string;\r\n\r\n /**\r\n * Path of the directory containing the host executable.\r\n */\r\n Path: string;\r\n\r\n /**\r\n * The filename of the currently running script.\r\n */\r\n ScriptName: string;\r\n\r\n /**\r\n * Exposes the read-only input stream for the current script.\r\n * Can be accessed only while using CScript.exe.\r\n */\r\n StdIn: TextStreamReader;\r\n\r\n /**\r\n * Windows Script Host version\r\n */\r\n Version: string;\r\n\r\n /**\r\n * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.\r\n */\r\n ConnectObject(objEventSource: any, strPrefix: string): void;\r\n\r\n /**\r\n * Creates a COM object.\r\n * @param strProgiID\r\n * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.\r\n */\r\n CreateObject(strProgID: string, strPrefix?: string): any;\r\n\r\n /**\r\n * Disconnects a COM object from its event sources.\r\n */\r\n DisconnectObject(obj: any): void;\r\n\r\n /**\r\n * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.\r\n * @param strPathname Fully qualified path to the file containing the object persisted to disk.\r\n * For objects in memory, pass a zero-length string.\r\n * @param strProgID\r\n * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.\r\n */\r\n GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;\r\n\r\n /**\r\n * Suspends script execution for a specified length of time, then continues execution.\r\n * @param intTime Interval (in milliseconds) to suspend script execution.\r\n */\r\n Sleep(intTime: number): void;\r\n};\r\n\r\n/**\r\n * Allows enumerating over a COM collection, which may not have indexed item access.\r\n */\r\ninterface Enumerator {\r\n /**\r\n * Returns true if the current item is the last one in the collection, or the collection is empty,\r\n * or the current item is undefined.\r\n */\r\n atEnd(): boolean;\r\n\r\n /**\r\n * Returns the current item in the collection\r\n */\r\n item(): T;\r\n\r\n /**\r\n * Resets the current item in the collection to the first item. If there are no items in the collection,\r\n * the current item is set to undefined.\r\n */\r\n moveFirst(): void;\r\n\r\n /**\r\n * Moves the current item to the next item in the collection. If the enumerator is at the end of\r\n * the collection or the collection is empty, the current item is set to undefined.\r\n */\r\n moveNext(): void;\r\n}\r\n\r\ninterface EnumeratorConstructor {\r\n new (collection: any): Enumerator;\r\n new (collection: any): Enumerator;\r\n}\r\n\r\ndeclare var Enumerator: EnumeratorConstructor;\r\n\r\n/**\r\n * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.\r\n */\r\ninterface VBArray {\r\n /**\r\n * Returns the number of dimensions (1-based).\r\n */\r\n dimensions(): number;\r\n\r\n /**\r\n * Takes an index for each dimension in the array, and returns the item at the corresponding location.\r\n */\r\n getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;\r\n\r\n /**\r\n * Returns the smallest available index for a given dimension.\r\n * @param dimension 1-based dimension (defaults to 1)\r\n */\r\n lbound(dimension?: number): number;\r\n\r\n /**\r\n * Returns the largest available index for a given dimension.\r\n * @param dimension 1-based dimension (defaults to 1)\r\n */\r\n ubound(dimension?: number): number;\r\n\r\n /**\r\n * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,\r\n * each successive dimension is appended to the end of the array.\r\n * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]\r\n */\r\n toArray(): T[];\r\n}\r\n\r\ninterface VBArrayConstructor {\r\n new (safeArray: any): VBArray;\r\n new (safeArray: any): VBArray;\r\n}\r\n\r\ndeclare var VBArray: VBArrayConstructor;\r\n"}; }); +define([], function() { return { contents: "/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved. \r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0 \r\n \r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, \r\nMERCHANTABLITY OR NON-INFRINGEMENT. \r\n \r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\n/// \r\n/////////////////////////////\r\n/// ECMAScript APIs\r\n/////////////////////////////\r\n\r\ndeclare const NaN: number;\r\ndeclare const Infinity: number;\r\n\r\n/**\r\n * Evaluates JavaScript code and executes it.\r\n * @param x A String value that contains valid JavaScript code.\r\n */\r\ndeclare function eval(x: string): any;\r\n\r\n/**\r\n * Converts A string to an integer.\r\n * @param s A string to convert into a number.\r\n * @param radix A value between 2 and 36 that specifies the base of the number in numString.\r\n * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.\r\n * All other strings are considered decimal.\r\n */\r\ndeclare function parseInt(s: string, radix?: number): number;\r\n\r\n/**\r\n * Converts a string to a floating-point number.\r\n * @param string A string that contains a floating-point number.\r\n */\r\ndeclare function parseFloat(string: string): number;\r\n\r\n/**\r\n * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).\r\n * @param number A numeric value.\r\n */\r\ndeclare function isNaN(number: number): boolean;\r\n\r\n/**\r\n * Determines whether a supplied number is finite.\r\n * @param number Any numeric value.\r\n */\r\ndeclare function isFinite(number: number): boolean;\r\n\r\n/**\r\n * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).\r\n * @param encodedURI A value representing an encoded URI.\r\n */\r\ndeclare function decodeURI(encodedURI: string): string;\r\n\r\n/**\r\n * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).\r\n * @param encodedURIComponent A value representing an encoded URI component.\r\n */\r\ndeclare function decodeURIComponent(encodedURIComponent: string): string;\r\n\r\n/**\r\n * Encodes a text string as a valid Uniform Resource Identifier (URI)\r\n * @param uri A value representing an encoded URI.\r\n */\r\ndeclare function encodeURI(uri: string): string;\r\n\r\n/**\r\n * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).\r\n * @param uriComponent A value representing an encoded URI component.\r\n */\r\ndeclare function encodeURIComponent(uriComponent: string): string;\r\n\r\ninterface PropertyDescriptor {\r\n configurable?: boolean;\r\n enumerable?: boolean;\r\n value?: any;\r\n writable?: boolean;\r\n get? (): any;\r\n set? (v: any): void;\r\n}\r\n\r\ninterface PropertyDescriptorMap {\r\n [s: string]: PropertyDescriptor;\r\n}\r\n\r\ninterface Object {\r\n /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */\r\n constructor: Function;\r\n\r\n /** Returns a string representation of an object. */\r\n toString(): string;\r\n\r\n /** Returns a date converted to a string using the current locale. */\r\n toLocaleString(): string;\r\n\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): Object;\r\n\r\n /**\r\n * Determines whether an object has a property with the specified name.\r\n * @param v A property name.\r\n */\r\n hasOwnProperty(v: string): boolean;\r\n\r\n /**\r\n * Determines whether an object exists in another object's prototype chain.\r\n * @param v Another object whose prototype chain is to be checked.\r\n */\r\n isPrototypeOf(v: Object): boolean;\r\n\r\n /**\r\n * Determines whether a specified property is enumerable.\r\n * @param v A property name.\r\n */\r\n propertyIsEnumerable(v: string): boolean;\r\n}\r\n\r\ninterface ObjectConstructor {\r\n new (value?: any): Object;\r\n (): any;\r\n (value: any): any;\r\n\r\n /** A reference to the prototype for a class of objects. */\r\n readonly prototype: Object;\r\n\r\n /**\r\n * Returns the prototype of an object.\r\n * @param o The object that references the prototype.\r\n */\r\n getPrototypeOf(o: any): any;\r\n\r\n /**\r\n * Gets the own property descriptor of the specified object.\r\n * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.\r\n * @param o Object that contains the property.\r\n * @param p Name of the property.\r\n */\r\n getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;\r\n\r\n /**\r\n * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly\r\n * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.\r\n * @param o Object that contains the own properties.\r\n */\r\n getOwnPropertyNames(o: any): string[];\r\n\r\n /**\r\n * Creates an object that has null prototype.\r\n * @param o Object to use as a prototype. May be null\r\n */\r\n create(o: null): any;\r\n\r\n /**\r\n * Creates an object that has the specified prototype, and that optionally contains specified properties.\r\n * @param o Object to use as a prototype. May be null\r\n */\r\n create(o: T): T;\r\n\r\n /**\r\n * Creates an object that has the specified prototype, and that optionally contains specified properties.\r\n * @param o Object to use as a prototype. May be null\r\n * @param properties JavaScript object that contains one or more property descriptors.\r\n */\r\n create(o: any, properties: PropertyDescriptorMap): any;\r\n\r\n /**\r\n * Adds a property to an object, or modifies attributes of an existing property.\r\n * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.\r\n * @param p The property name.\r\n * @param attributes Descriptor for the property. It can be for a data property or an accessor property.\r\n */\r\n defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;\r\n\r\n /**\r\n * Adds one or more properties to an object, and/or modifies attributes of existing properties.\r\n * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.\r\n * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.\r\n */\r\n defineProperties(o: any, properties: PropertyDescriptorMap): any;\r\n\r\n /**\r\n * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.\r\n * @param o Object on which to lock the attributes.\r\n */\r\n seal(o: T): T;\r\n\r\n /**\r\n * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.\r\n * @param o Object on which to lock the attributes.\r\n */\r\n freeze(o: T): T;\r\n\r\n /**\r\n * Prevents the addition of new properties to an object.\r\n * @param o Object to make non-extensible.\r\n */\r\n preventExtensions(o: T): T;\r\n\r\n /**\r\n * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.\r\n * @param o Object to test.\r\n */\r\n isSealed(o: any): boolean;\r\n\r\n /**\r\n * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.\r\n * @param o Object to test.\r\n */\r\n isFrozen(o: any): boolean;\r\n\r\n /**\r\n * Returns a value that indicates whether new properties can be added to an object.\r\n * @param o Object to test.\r\n */\r\n isExtensible(o: any): boolean;\r\n\r\n /**\r\n * Returns the names of the enumerable properties and methods of an object.\r\n * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.\r\n */\r\n keys(o: any): string[];\r\n}\r\n\r\n/**\r\n * Provides functionality common to all JavaScript objects.\r\n */\r\ndeclare const Object: ObjectConstructor;\r\n\r\n/**\r\n * Creates a new function.\r\n */\r\ninterface Function {\r\n /**\r\n * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.\r\n * @param thisArg The object to be used as the this object.\r\n * @param argArray A set of arguments to be passed to the function.\r\n */\r\n apply(this: Function, thisArg: any, argArray?: any): any;\r\n\r\n /**\r\n * Calls a method of an object, substituting another object for the current object.\r\n * @param thisArg The object to be used as the current object.\r\n * @param argArray A list of arguments to be passed to the method.\r\n */\r\n call(this: Function, thisArg: any, ...argArray: any[]): any;\r\n\r\n /**\r\n * For a given function, creates a bound function that has the same body as the original function.\r\n * The this object of the bound function is associated with the specified object, and has the specified initial parameters.\r\n * @param thisArg An object to which the this keyword can refer inside the new function.\r\n * @param argArray A list of arguments to be passed to the new function.\r\n */\r\n bind(this: Function, thisArg: any, ...argArray: any[]): any;\r\n\r\n prototype: any;\r\n readonly length: number;\r\n\r\n // Non-standard extensions\r\n arguments: any;\r\n caller: Function;\r\n}\r\n\r\ninterface FunctionConstructor {\r\n /**\r\n * Creates a new function.\r\n * @param args A list of arguments the function accepts.\r\n */\r\n new (...args: string[]): Function;\r\n (...args: string[]): Function;\r\n readonly prototype: Function;\r\n}\r\n\r\ndeclare const Function: FunctionConstructor;\r\n\r\ninterface IArguments {\r\n [index: number]: any;\r\n length: number;\r\n callee: Function;\r\n}\r\n\r\ninterface String {\r\n /** Returns a string representation of a string. */\r\n toString(): string;\r\n\r\n /**\r\n * Returns the character at the specified index.\r\n * @param pos The zero-based index of the desired character.\r\n */\r\n charAt(pos: number): string;\r\n\r\n /**\r\n * Returns the Unicode value of the character at the specified location.\r\n * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.\r\n */\r\n charCodeAt(index: number): number;\r\n\r\n /**\r\n * Returns a string that contains the concatenation of two or more strings.\r\n * @param strings The strings to append to the end of the string.\r\n */\r\n concat(...strings: string[]): string;\r\n\r\n /**\r\n * Returns the position of the first occurrence of a substring.\r\n * @param searchString The substring to search for in the string\r\n * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.\r\n */\r\n indexOf(searchString: string, position?: number): number;\r\n\r\n /**\r\n * Returns the last occurrence of a substring in the string.\r\n * @param searchString The substring to search for.\r\n * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.\r\n */\r\n lastIndexOf(searchString: string, position?: number): number;\r\n\r\n /**\r\n * Determines whether two strings are equivalent in the current locale.\r\n * @param that String to compare to target string\r\n */\r\n localeCompare(that: string): number;\r\n\r\n /**\r\n * Matches a string with a regular expression, and returns an array containing the results of that search.\r\n * @param regexp A variable name or string literal containing the regular expression pattern and flags.\r\n */\r\n match(regexp: string): RegExpMatchArray | null;\r\n\r\n /**\r\n * Matches a string with a regular expression, and returns an array containing the results of that search.\r\n * @param regexp A regular expression object that contains the regular expression pattern and applicable flags.\r\n */\r\n match(regexp: RegExp): RegExpMatchArray | null;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A string that represents the regular expression.\r\n * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.\r\n */\r\n replace(searchValue: string, replaceValue: string): string;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A string that represents the regular expression.\r\n * @param replacer A function that returns the replacement text.\r\n */\r\n replace(searchValue: string, replacer: (substring: string, ...args: any[]) => string): string;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags.\r\n * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.\r\n */\r\n replace(searchValue: RegExp, replaceValue: string): string;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags\r\n * @param replacer A function that returns the replacement text.\r\n */\r\n replace(searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string;\r\n\r\n /**\r\n * Finds the first substring match in a regular expression search.\r\n * @param regexp The regular expression pattern and applicable flags.\r\n */\r\n search(regexp: string): number;\r\n\r\n /**\r\n * Finds the first substring match in a regular expression search.\r\n * @param regexp The regular expression pattern and applicable flags.\r\n */\r\n search(regexp: RegExp): number;\r\n\r\n /**\r\n * Returns a section of a string.\r\n * @param start The index to the beginning of the specified portion of stringObj.\r\n * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.\r\n * If this value is not specified, the substring continues to the end of stringObj.\r\n */\r\n slice(start?: number, end?: number): string;\r\n\r\n /**\r\n * Split a string into substrings using the specified separator and return them as an array.\r\n * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.\r\n * @param limit A value used to limit the number of elements returned in the array.\r\n */\r\n split(separator: string, limit?: number): string[];\r\n\r\n /**\r\n * Split a string into substrings using the specified separator and return them as an array.\r\n * @param separator A Regular Express that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.\r\n * @param limit A value used to limit the number of elements returned in the array.\r\n */\r\n split(separator: RegExp, limit?: number): string[];\r\n\r\n /**\r\n * Returns the substring at the specified location within a String object.\r\n * @param start The zero-based index number indicating the beginning of the substring.\r\n * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.\r\n * If end is omitted, the characters from start through the end of the original string are returned.\r\n */\r\n substring(start: number, end?: number): string;\r\n\r\n /** Converts all the alphabetic characters in a string to lowercase. */\r\n toLowerCase(): string;\r\n\r\n /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */\r\n toLocaleLowerCase(): string;\r\n\r\n /** Converts all the alphabetic characters in a string to uppercase. */\r\n toUpperCase(): string;\r\n\r\n /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */\r\n toLocaleUpperCase(): string;\r\n\r\n /** Removes the leading and trailing white space and line terminator characters from a string. */\r\n trim(): string;\r\n\r\n /** Returns the length of a String object. */\r\n readonly length: number;\r\n\r\n // IE extensions\r\n /**\r\n * Gets a substring beginning at the specified location and having the specified length.\r\n * @param from The starting position of the desired substring. The index of the first character in the string is zero.\r\n * @param length The number of characters to include in the returned substring.\r\n */\r\n substr(from: number, length?: number): string;\r\n\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): string;\r\n\r\n readonly [index: number]: string;\r\n}\r\n\r\ninterface StringConstructor {\r\n new (value?: any): String;\r\n (value?: any): string;\r\n readonly prototype: String;\r\n fromCharCode(...codes: number[]): string;\r\n}\r\n\r\n/**\r\n * Allows manipulation and formatting of text strings and determination and location of substrings within strings.\r\n */\r\ndeclare const String: StringConstructor;\r\n\r\ninterface Boolean {\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): boolean;\r\n}\r\n\r\ninterface BooleanConstructor {\r\n new (value?: any): Boolean;\r\n (value?: any): boolean;\r\n readonly prototype: Boolean;\r\n}\r\n\r\ndeclare const Boolean: BooleanConstructor;\r\n\r\ninterface Number {\r\n /**\r\n * Returns a string representation of an object.\r\n * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.\r\n */\r\n toString(radix?: number): string;\r\n\r\n /**\r\n * Returns a string representing a number in fixed-point notation.\r\n * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.\r\n */\r\n toFixed(fractionDigits?: number): string;\r\n\r\n /**\r\n * Returns a string containing a number represented in exponential notation.\r\n * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.\r\n */\r\n toExponential(fractionDigits?: number): string;\r\n\r\n /**\r\n * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.\r\n * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.\r\n */\r\n toPrecision(precision?: number): string;\r\n\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): number;\r\n}\r\n\r\ninterface NumberConstructor {\r\n new (value?: any): Number;\r\n (value?: any): number;\r\n readonly prototype: Number;\r\n\r\n /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */\r\n readonly MAX_VALUE: number;\r\n\r\n /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */\r\n readonly MIN_VALUE: number;\r\n\r\n /**\r\n * A value that is not a number.\r\n * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.\r\n */\r\n readonly NaN: number;\r\n\r\n /**\r\n * A value that is less than the largest negative number that can be represented in JavaScript.\r\n * JavaScript displays NEGATIVE_INFINITY values as -infinity.\r\n */\r\n readonly NEGATIVE_INFINITY: number;\r\n\r\n /**\r\n * A value greater than the largest number that can be represented in JavaScript.\r\n * JavaScript displays POSITIVE_INFINITY values as infinity.\r\n */\r\n readonly POSITIVE_INFINITY: number;\r\n}\r\n\r\n/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */\r\ndeclare const Number: NumberConstructor;\r\n\r\ninterface TemplateStringsArray extends ReadonlyArray {\r\n readonly raw: ReadonlyArray\r\n}\r\n\r\ninterface Math {\r\n /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */\r\n readonly E: number;\r\n /** The natural logarithm of 10. */\r\n readonly LN10: number;\r\n /** The natural logarithm of 2. */\r\n readonly LN2: number;\r\n /** The base-2 logarithm of e. */\r\n readonly LOG2E: number;\r\n /** The base-10 logarithm of e. */\r\n readonly LOG10E: number;\r\n /** Pi. This is the ratio of the circumference of a circle to its diameter. */\r\n readonly PI: number;\r\n /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */\r\n readonly SQRT1_2: number;\r\n /** The square root of 2. */\r\n readonly SQRT2: number;\r\n /**\r\n * Returns the absolute value of a number (the value without regard to whether it is positive or negative).\r\n * For example, the absolute value of -5 is the same as the absolute value of 5.\r\n * @param x A numeric expression for which the absolute value is needed.\r\n */\r\n abs(x: number): number;\r\n /**\r\n * Returns the arc cosine (or inverse cosine) of a number.\r\n * @param x A numeric expression.\r\n */\r\n acos(x: number): number;\r\n /**\r\n * Returns the arcsine of a number.\r\n * @param x A numeric expression.\r\n */\r\n asin(x: number): number;\r\n /**\r\n * Returns the arctangent of a number.\r\n * @param x A numeric expression for which the arctangent is needed.\r\n */\r\n atan(x: number): number;\r\n /**\r\n * Returns the angle (in radians) from the X axis to a point.\r\n * @param y A numeric expression representing the cartesian y-coordinate.\r\n * @param x A numeric expression representing the cartesian x-coordinate.\r\n */\r\n atan2(y: number, x: number): number;\r\n /**\r\n * Returns the smallest number greater than or equal to its numeric argument.\r\n * @param x A numeric expression.\r\n */\r\n ceil(x: number): number;\r\n /**\r\n * Returns the cosine of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n cos(x: number): number;\r\n /**\r\n * Returns e (the base of natural logarithms) raised to a power.\r\n * @param x A numeric expression representing the power of e.\r\n */\r\n exp(x: number): number;\r\n /**\r\n * Returns the greatest number less than or equal to its numeric argument.\r\n * @param x A numeric expression.\r\n */\r\n floor(x: number): number;\r\n /**\r\n * Returns the natural logarithm (base e) of a number.\r\n * @param x A numeric expression.\r\n */\r\n log(x: number): number;\r\n /**\r\n * Returns the larger of a set of supplied numeric expressions.\r\n * @param values Numeric expressions to be evaluated.\r\n */\r\n max(...values: number[]): number;\r\n /**\r\n * Returns the smaller of a set of supplied numeric expressions.\r\n * @param values Numeric expressions to be evaluated.\r\n */\r\n min(...values: number[]): number;\r\n /**\r\n * Returns the value of a base expression taken to a specified power.\r\n * @param x The base value of the expression.\r\n * @param y The exponent value of the expression.\r\n */\r\n pow(x: number, y: number): number;\r\n /** Returns a pseudorandom number between 0 and 1. */\r\n random(): number;\r\n /**\r\n * Returns a supplied numeric expression rounded to the nearest number.\r\n * @param x The value to be rounded to the nearest number.\r\n */\r\n round(x: number): number;\r\n /**\r\n * Returns the sine of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n sin(x: number): number;\r\n /**\r\n * Returns the square root of a number.\r\n * @param x A numeric expression.\r\n */\r\n sqrt(x: number): number;\r\n /**\r\n * Returns the tangent of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n tan(x: number): number;\r\n}\r\n/** An intrinsic object that provides basic mathematics functionality and constants. */\r\ndeclare const Math: Math;\r\n\r\n/** Enables basic storage and retrieval of dates and times. */\r\ninterface Date {\r\n /** Returns a string representation of a date. The format of the string depends on the locale. */\r\n toString(): string;\r\n /** Returns a date as a string value. */\r\n toDateString(): string;\r\n /** Returns a time as a string value. */\r\n toTimeString(): string;\r\n /** Returns a value as a string value appropriate to the host environment's current locale. */\r\n toLocaleString(): string;\r\n /** Returns a date as a string value appropriate to the host environment's current locale. */\r\n toLocaleDateString(): string;\r\n /** Returns a time as a string value appropriate to the host environment's current locale. */\r\n toLocaleTimeString(): string;\r\n /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */\r\n valueOf(): number;\r\n /** Gets the time value in milliseconds. */\r\n getTime(): number;\r\n /** Gets the year, using local time. */\r\n getFullYear(): number;\r\n /** Gets the year using Universal Coordinated Time (UTC). */\r\n getUTCFullYear(): number;\r\n /** Gets the month, using local time. */\r\n getMonth(): number;\r\n /** Gets the month of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCMonth(): number;\r\n /** Gets the day-of-the-month, using local time. */\r\n getDate(): number;\r\n /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */\r\n getUTCDate(): number;\r\n /** Gets the day of the week, using local time. */\r\n getDay(): number;\r\n /** Gets the day of the week using Universal Coordinated Time (UTC). */\r\n getUTCDay(): number;\r\n /** Gets the hours in a date, using local time. */\r\n getHours(): number;\r\n /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */\r\n getUTCHours(): number;\r\n /** Gets the minutes of a Date object, using local time. */\r\n getMinutes(): number;\r\n /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCMinutes(): number;\r\n /** Gets the seconds of a Date object, using local time. */\r\n getSeconds(): number;\r\n /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCSeconds(): number;\r\n /** Gets the milliseconds of a Date, using local time. */\r\n getMilliseconds(): number;\r\n /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCMilliseconds(): number;\r\n /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */\r\n getTimezoneOffset(): number;\r\n /**\r\n * Sets the date and time value in the Date object.\r\n * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.\r\n */\r\n setTime(time: number): number;\r\n /**\r\n * Sets the milliseconds value in the Date object using local time.\r\n * @param ms A numeric value equal to the millisecond value.\r\n */\r\n setMilliseconds(ms: number): number;\r\n /**\r\n * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).\r\n * @param ms A numeric value equal to the millisecond value.\r\n */\r\n setUTCMilliseconds(ms: number): number;\r\n\r\n /**\r\n * Sets the seconds value in the Date object using local time.\r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setSeconds(sec: number, ms?: number): number;\r\n /**\r\n * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).\r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setUTCSeconds(sec: number, ms?: number): number;\r\n /**\r\n * Sets the minutes value in the Date object using local time.\r\n * @param min A numeric value equal to the minutes value.\r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setMinutes(min: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).\r\n * @param min A numeric value equal to the minutes value.\r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setUTCMinutes(min: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the hour value in the Date object using local time.\r\n * @param hours A numeric value equal to the hours value.\r\n * @param min A numeric value equal to the minutes value.\r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setHours(hours: number, min?: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the hours value in the Date object using Universal Coordinated Time (UTC).\r\n * @param hours A numeric value equal to the hours value.\r\n * @param min A numeric value equal to the minutes value.\r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;\r\n /**\r\n * Sets the numeric day-of-the-month value of the Date object using local time.\r\n * @param date A numeric value equal to the day of the month.\r\n */\r\n setDate(date: number): number;\r\n /**\r\n * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).\r\n * @param date A numeric value equal to the day of the month.\r\n */\r\n setUTCDate(date: number): number;\r\n /**\r\n * Sets the month value in the Date object using local time.\r\n * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.\r\n * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.\r\n */\r\n setMonth(month: number, date?: number): number;\r\n /**\r\n * Sets the month value in the Date object using Universal Coordinated Time (UTC).\r\n * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.\r\n * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.\r\n */\r\n setUTCMonth(month: number, date?: number): number;\r\n /**\r\n * Sets the year of the Date object using local time.\r\n * @param year A numeric value for the year.\r\n * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.\r\n * @param date A numeric value equal for the day of the month.\r\n */\r\n setFullYear(year: number, month?: number, date?: number): number;\r\n /**\r\n * Sets the year value in the Date object using Universal Coordinated Time (UTC).\r\n * @param year A numeric value equal to the year.\r\n * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.\r\n * @param date A numeric value equal to the day of the month.\r\n */\r\n setUTCFullYear(year: number, month?: number, date?: number): number;\r\n /** Returns a date converted to a string using Universal Coordinated Time (UTC). */\r\n toUTCString(): string;\r\n /** Returns a date as a string value in ISO format. */\r\n toISOString(): string;\r\n /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */\r\n toJSON(key?: any): string;\r\n}\r\n\r\ninterface DateConstructor {\r\n new (): Date;\r\n new (value: number): Date;\r\n new (value: string): Date;\r\n new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;\r\n (): string;\r\n readonly prototype: Date;\r\n /**\r\n * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.\r\n * @param s A date string\r\n */\r\n parse(s: string): number;\r\n /**\r\n * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.\r\n * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.\r\n * @param month The month as an number between 0 and 11 (January to December).\r\n * @param date The date as an number between 1 and 31.\r\n * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.\r\n * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.\r\n * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.\r\n * @param ms An number from 0 to 999 that specifies the milliseconds.\r\n */\r\n UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;\r\n now(): number;\r\n}\r\n\r\ndeclare const Date: DateConstructor;\r\n\r\ninterface RegExpMatchArray extends Array {\r\n index?: number;\r\n input?: string;\r\n}\r\n\r\ninterface RegExpExecArray extends Array {\r\n index: number;\r\n input: string;\r\n}\r\n\r\ninterface RegExp {\r\n /**\r\n * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.\r\n * @param string The String object or string literal on which to perform the search.\r\n */\r\n exec(string: string): RegExpExecArray | null;\r\n\r\n /**\r\n * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.\r\n * @param string String on which to perform the search.\r\n */\r\n test(string: string): boolean;\r\n\r\n /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */\r\n readonly source: string;\r\n\r\n /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */\r\n readonly global: boolean;\r\n\r\n /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */\r\n readonly ignoreCase: boolean;\r\n\r\n /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */\r\n readonly multiline: boolean;\r\n\r\n lastIndex: number;\r\n\r\n // Non-standard extensions\r\n compile(): this;\r\n}\r\n\r\ninterface RegExpConstructor {\r\n new (pattern: RegExp): RegExp;\r\n new (pattern: string, flags?: string): RegExp;\r\n (pattern: RegExp): RegExp;\r\n (pattern: string, flags?: string): RegExp;\r\n readonly prototype: RegExp;\r\n\r\n // Non-standard extensions\r\n $1: string;\r\n $2: string;\r\n $3: string;\r\n $4: string;\r\n $5: string;\r\n $6: string;\r\n $7: string;\r\n $8: string;\r\n $9: string;\r\n lastMatch: string;\r\n}\r\n\r\ndeclare const RegExp: RegExpConstructor;\r\n\r\ninterface Error {\r\n name: string;\r\n message: string;\r\n stack?: string;\r\n}\r\n\r\ninterface ErrorConstructor {\r\n new (message?: string): Error;\r\n (message?: string): Error;\r\n readonly prototype: Error;\r\n}\r\n\r\ndeclare const Error: ErrorConstructor;\r\n\r\ninterface EvalError extends Error {\r\n}\r\n\r\ninterface EvalErrorConstructor {\r\n new (message?: string): EvalError;\r\n (message?: string): EvalError;\r\n readonly prototype: EvalError;\r\n}\r\n\r\ndeclare const EvalError: EvalErrorConstructor;\r\n\r\ninterface RangeError extends Error {\r\n}\r\n\r\ninterface RangeErrorConstructor {\r\n new (message?: string): RangeError;\r\n (message?: string): RangeError;\r\n readonly prototype: RangeError;\r\n}\r\n\r\ndeclare const RangeError: RangeErrorConstructor;\r\n\r\ninterface ReferenceError extends Error {\r\n}\r\n\r\ninterface ReferenceErrorConstructor {\r\n new (message?: string): ReferenceError;\r\n (message?: string): ReferenceError;\r\n readonly prototype: ReferenceError;\r\n}\r\n\r\ndeclare const ReferenceError: ReferenceErrorConstructor;\r\n\r\ninterface SyntaxError extends Error {\r\n}\r\n\r\ninterface SyntaxErrorConstructor {\r\n new (message?: string): SyntaxError;\r\n (message?: string): SyntaxError;\r\n readonly prototype: SyntaxError;\r\n}\r\n\r\ndeclare const SyntaxError: SyntaxErrorConstructor;\r\n\r\ninterface TypeError extends Error {\r\n}\r\n\r\ninterface TypeErrorConstructor {\r\n new (message?: string): TypeError;\r\n (message?: string): TypeError;\r\n readonly prototype: TypeError;\r\n}\r\n\r\ndeclare const TypeError: TypeErrorConstructor;\r\n\r\ninterface URIError extends Error {\r\n}\r\n\r\ninterface URIErrorConstructor {\r\n new (message?: string): URIError;\r\n (message?: string): URIError;\r\n readonly prototype: URIError;\r\n}\r\n\r\ndeclare const URIError: URIErrorConstructor;\r\n\r\ninterface JSON {\r\n /**\r\n * Converts a JavaScript Object Notation (JSON) string into an object.\r\n * @param text A valid JSON string.\r\n * @param reviver A function that transforms the results. This function is called for each member of the object.\r\n * If a member contains nested objects, the nested objects are transformed before the parent object is.\r\n */\r\n parse(text: string, reviver?: (key: any, value: any) => any): any;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer A function that transforms the results.\r\n * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\r\n */\r\n stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified.\r\n * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\r\n */\r\n stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;\r\n}\r\n\r\n/**\r\n * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.\r\n */\r\ndeclare const JSON: JSON;\r\n\r\n\r\n/////////////////////////////\r\n/// ECMAScript Array API (specially handled by compiler)\r\n/////////////////////////////\r\n\r\ninterface ReadonlyArray {\r\n /**\r\n * Gets the length of the array. This is a number one higher than the highest element defined in an array.\r\n */\r\n readonly length: number;\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n toLocaleString(): string;\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat>(...items: U[]): T[];\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat(...items: T[][]): T[];\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat(...items: (T | T[])[]): T[];\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): T[];\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.\r\n */\r\n indexOf(searchElement: T, fromIndex?: number): number;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a specified value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.\r\n */\r\n lastIndexOf(searchElement: T, fromIndex?: number): number;\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: T, index: number, array: ReadonlyArray) => boolean, thisArg?: any): boolean;\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: T, index: number, array: ReadonlyArray) => boolean, thisArg?: any): boolean;\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: T, index: number, array: ReadonlyArray) => void, thisArg?: any): void;\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: T, index: number, array: ReadonlyArray) => U, thisArg?: any): U[];\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: T, index: number, array: ReadonlyArray) => any, thisArg?: any): T[];\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray) => T, initialValue?: T): T;\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray) => U, initialValue: U): U;\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray) => T, initialValue?: T): T;\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray) => U, initialValue: U): U;\r\n\r\n readonly [n: number]: T;\r\n}\r\n\r\ninterface Array {\r\n /**\r\n * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.\r\n */\r\n length: number;\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n toLocaleString(): string;\r\n /**\r\n * Appends new elements to an array, and returns the new length of the array.\r\n * @param items New elements of the Array.\r\n */\r\n push(...items: T[]): number;\r\n /**\r\n * Removes the last element from an array and returns it.\r\n */\r\n pop(): T | undefined;\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat(...items: T[][]): T[];\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat(...items: (T | T[])[]): T[];\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): T[];\r\n /**\r\n * Removes the first element from an array and returns it.\r\n */\r\n shift(): T | undefined;\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): T[];\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: T, b: T) => number): this;\r\n /**\r\n * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.\r\n * @param start The zero-based location in the array from which to start removing elements.\r\n */\r\n splice(start: number): T[];\r\n /**\r\n * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.\r\n * @param start The zero-based location in the array from which to start removing elements.\r\n * @param deleteCount The number of elements to remove.\r\n * @param items Elements to insert into the array in place of the deleted elements.\r\n */\r\n splice(start: number, deleteCount: number, ...items: T[]): T[];\r\n /**\r\n * Inserts new elements at the start of an array.\r\n * @param items Elements to insert at the start of the Array.\r\n */\r\n unshift(...items: T[]): number;\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.\r\n */\r\n indexOf(searchElement: T, fromIndex?: number): number;\r\n /**\r\n * Returns the index of the last occurrence of a specified value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.\r\n */\r\n lastIndexOf(searchElement: T, fromIndex?: number): number;\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[];\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;\r\n\r\n [n: number]: T;\r\n}\r\n\r\ninterface ArrayConstructor {\r\n new (arrayLength?: number): any[];\r\n new (arrayLength: number): T[];\r\n new (...items: T[]): T[];\r\n (arrayLength?: number): any[];\r\n (arrayLength: number): T[];\r\n (...items: T[]): T[];\r\n isArray(arg: any): arg is Array;\r\n readonly prototype: Array;\r\n}\r\n\r\ndeclare const Array: ArrayConstructor;\r\n\r\ninterface TypedPropertyDescriptor {\r\n enumerable?: boolean;\r\n configurable?: boolean;\r\n writable?: boolean;\r\n value?: T;\r\n get?: () => T;\r\n set?: (value: T) => void;\r\n}\r\n\r\ndeclare type ClassDecorator = (target: TFunction) => TFunction | void;\r\ndeclare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;\r\ndeclare type MethodDecorator = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor | void;\r\ndeclare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;\r\n\r\ndeclare type PromiseConstructorLike = new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike;\r\n\r\ninterface PromiseLike {\r\n /**\r\n * Attaches callbacks for the resolution and/or rejection of the Promise.\r\n * @param onfulfilled The callback to execute when the Promise is resolved.\r\n * @param onrejected The callback to execute when the Promise is rejected.\r\n * @returns A Promise for the completion of which ever callback is executed.\r\n */\r\n then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike;\r\n then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): PromiseLike;\r\n}\r\n\r\ninterface ArrayLike {\r\n readonly length: number;\r\n readonly [n: number]: T;\r\n}\r\n\r\n/**\r\n * Represents a raw buffer of binary data, which is used to store data for the\r\n * different typed arrays. ArrayBuffers cannot be read from or written to directly,\r\n * but can be passed to a typed array or DataView Object to interpret the raw\r\n * buffer as needed.\r\n */\r\ninterface ArrayBuffer {\r\n /**\r\n * Read-only. The length of the ArrayBuffer (in bytes).\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * Returns a section of an ArrayBuffer.\r\n */\r\n slice(begin:number, end?:number): ArrayBuffer;\r\n}\r\n\r\ninterface ArrayBufferConstructor {\r\n readonly prototype: ArrayBuffer;\r\n new (byteLength: number): ArrayBuffer;\r\n isView(arg: any): arg is ArrayBufferView;\r\n}\r\ndeclare const ArrayBuffer: ArrayBufferConstructor;\r\n\r\ninterface ArrayBufferView {\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n byteOffset: number;\r\n}\r\n\r\ninterface DataView {\r\n readonly buffer: ArrayBuffer;\r\n readonly byteLength: number;\r\n readonly byteOffset: number;\r\n /**\r\n * Gets the Float32 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getFloat32(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Float64 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getFloat64(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Int8 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getInt8(byteOffset: number): number;\r\n\r\n /**\r\n * Gets the Int16 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getInt16(byteOffset: number, littleEndian?: boolean): number;\r\n /**\r\n * Gets the Int32 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getInt32(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Uint8 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getUint8(byteOffset: number): number;\r\n\r\n /**\r\n * Gets the Uint16 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getUint16(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Uint32 value at the specified byte offset from the start of the view. There is\r\n * no alignment constraint; multi-byte values may be fetched from any offset.\r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getUint32(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Stores an Float32 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written,\r\n * otherwise a little-endian value should be written.\r\n */\r\n setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Float64 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written,\r\n * otherwise a little-endian value should be written.\r\n */\r\n setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Int8 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n */\r\n setInt8(byteOffset: number, value: number): void;\r\n\r\n /**\r\n * Stores an Int16 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written,\r\n * otherwise a little-endian value should be written.\r\n */\r\n setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Int32 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written,\r\n * otherwise a little-endian value should be written.\r\n */\r\n setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Uint8 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n */\r\n setUint8(byteOffset: number, value: number): void;\r\n\r\n /**\r\n * Stores an Uint16 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written,\r\n * otherwise a little-endian value should be written.\r\n */\r\n setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Uint32 value at the specified byte offset from the start of the view.\r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written,\r\n * otherwise a little-endian value should be written.\r\n */\r\n setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n}\r\n\r\ninterface DataViewConstructor {\r\n new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;\r\n}\r\ndeclare const DataView: DataViewConstructor;\r\n\r\n/**\r\n * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested\r\n * number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int8Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Int8Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Int8Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Int8Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\ninterface Int8ArrayConstructor {\r\n readonly prototype: Int8Array;\r\n new (length: number): Int8Array;\r\n new (array: ArrayLike): Int8Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Int8Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;\r\n\r\n}\r\ndeclare const Int8Array: Int8ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the\r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint8Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Uint8Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint8Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint8Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint8ArrayConstructor {\r\n readonly prototype: Uint8Array;\r\n new (length: number): Uint8Array;\r\n new (array: ArrayLike): Uint8Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint8Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;\r\n\r\n}\r\ndeclare const Uint8Array: Uint8ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.\r\n * If the requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint8ClampedArray {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Uint8ClampedArray;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: Uint8ClampedArray, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint8ClampedArrayConstructor {\r\n readonly prototype: Uint8ClampedArray;\r\n new (length: number): Uint8ClampedArray;\r\n new (array: ArrayLike): Uint8ClampedArray;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint8ClampedArray;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;\r\n}\r\ndeclare const Uint8ClampedArray: Uint8ClampedArrayConstructor;\r\n\r\n/**\r\n * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the\r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int16Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Int16Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Int16Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Int16Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Int16ArrayConstructor {\r\n readonly prototype: Int16Array;\r\n new (length: number): Int16Array;\r\n new (array: ArrayLike): Int16Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Int16Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;\r\n\r\n}\r\ndeclare const Int16Array: Int16ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the\r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint16Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Uint16Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint16Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint16Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint16ArrayConstructor {\r\n readonly prototype: Uint16Array;\r\n new (length: number): Uint16Array;\r\n new (array: ArrayLike): Uint16Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint16Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;\r\n\r\n}\r\ndeclare const Uint16Array: Uint16ArrayConstructor;\r\n/**\r\n * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the\r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int32Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Int32Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Int32Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Int32Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Int32ArrayConstructor {\r\n readonly prototype: Int32Array;\r\n new (length: number): Int32Array;\r\n new (array: ArrayLike): Int32Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Int32Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;\r\n}\r\ndeclare const Int32Array: Int32ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the\r\n * requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint32Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Uint32Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Uint32Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint32Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Uint32ArrayConstructor {\r\n readonly prototype: Uint32Array;\r\n new (length: number): Uint32Array;\r\n new (array: ArrayLike): Uint32Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Uint32Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;\r\n}\r\ndeclare const Uint32Array: Uint32ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number\r\n * of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float32Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Float32Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Float32Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Float32Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Float32ArrayConstructor {\r\n readonly prototype: Float32Array;\r\n new (length: number): Float32Array;\r\n new (array: ArrayLike): Float32Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Float32Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;\r\n\r\n}\r\ndeclare const Float32Array: Float32ArrayConstructor;\r\n\r\n/**\r\n * A typed array of 64-bit float values. The contents are initialized to 0. If the requested\r\n * number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float64Array {\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The ArrayBuffer instance referenced by the array.\r\n */\r\n readonly buffer: ArrayBuffer;\r\n\r\n /**\r\n * The length in bytes of the array.\r\n */\r\n readonly byteLength: number;\r\n\r\n /**\r\n * The offset in bytes of the array.\r\n */\r\n readonly byteOffset: number;\r\n\r\n /**\r\n * Returns the this object after copying a section of the array identified by start and end\r\n * to the same array starting at position target\r\n * @param target If target is negative, it is treated as length+target where length is the\r\n * length of the array.\r\n * @param start If start is negative, it is treated as length+start. If end is negative, it\r\n * is treated as length+end.\r\n * @param end If not specified, length of the this object is used as its default value.\r\n */\r\n copyWithin(target: number, start: number, end?: number): this;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls\r\n * the callbackfn function for each element in array1 until the callbackfn returns false,\r\n * or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Returns the this object after filling the section identified by start and end with value\r\n * @param value value to fill array section with\r\n * @param start index to start filling the array at. If start is negative, it is treated as\r\n * length+start where length is the length of the array.\r\n * @param end index to stop filling the array at. If end is negative, it is treated as\r\n * length+end.\r\n */\r\n fill(value: number, start?: number, end?: number): this;\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function.\r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array;\r\n\r\n /**\r\n * Returns the value of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found, find\r\n * immediately returns that element value. Otherwise, find returns undefined.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined;\r\n\r\n /**\r\n * Returns the index of the first element in the array where predicate is true, and undefined\r\n * otherwise.\r\n * @param predicate find calls predicate once for each element of the array, in ascending\r\n * order, until it finds one where predicate returns true. If such an element is found,\r\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r\n * @param thisArg If provided, it will be used as the this value for each invocation of\r\n * predicate. If it is not provided, undefined is used instead.\r\n */\r\n findIndex(predicate: (value: number) => boolean, thisArg?: any): number;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n indexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the\r\n * resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r\n * search starts at index 0.\r\n */\r\n lastIndexOf(searchElement: number, fromIndex?: number): number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n readonly length: number;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that\r\n * contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of\r\n * the callback function is the accumulated result, and is provided as an argument in the next\r\n * call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r\n * callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an\r\n * argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array, in descending order.\r\n * The return value of the callback function is the accumulated result, and is provided as an\r\n * argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r\n * the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start\r\n * the accumulation. The first call to the callbackfn function provides this value as an argument\r\n * instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;\r\n\r\n /**\r\n * Reverses the elements in an Array.\r\n */\r\n reverse(): Float64Array;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param array A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: ArrayLike, offset?: number): void;\r\n\r\n /**\r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start?: number, end?: number): Float64Array;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the\r\n * callbackfn function for each element in array1 until the callbackfn returns true, or until\r\n * the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r\n * If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If\r\n * omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: number, b: number) => number): this;\r\n\r\n /**\r\n * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements\r\n * at begin, inclusive, up to end, exclusive.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Float64Array;\r\n\r\n /**\r\n * Converts a number to a string by using the current locale.\r\n */\r\n toLocaleString(): string;\r\n\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n\r\n [index: number]: number;\r\n}\r\n\r\ninterface Float64ArrayConstructor {\r\n readonly prototype: Float64Array;\r\n new (length: number): Float64Array;\r\n new (array: ArrayLike): Float64Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;\r\n\r\n /**\r\n * The size in bytes of each element in the array.\r\n */\r\n readonly BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * Returns a new array from a set of elements.\r\n * @param items A set of elements to include in the new array object.\r\n */\r\n of(...items: number[]): Float64Array;\r\n\r\n /**\r\n * Creates an array from an array-like or iterable object.\r\n * @param arrayLike An array-like or iterable object to convert to an array.\r\n * @param mapfn A mapping function to call on every element of the array.\r\n * @param thisArg Value of 'this' used to invoke the mapfn.\r\n */\r\n from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;\r\n}\r\ndeclare const Float64Array: Float64ArrayConstructor;\r\n\r\n/////////////////////////////\r\n/// ECMAScript Internationalization API\r\n/////////////////////////////\r\n\r\ndeclare module Intl {\r\n interface CollatorOptions {\r\n usage?: string;\r\n localeMatcher?: string;\r\n numeric?: boolean;\r\n caseFirst?: string;\r\n sensitivity?: string;\r\n ignorePunctuation?: boolean;\r\n }\r\n\r\n interface ResolvedCollatorOptions {\r\n locale: string;\r\n usage: string;\r\n sensitivity: string;\r\n ignorePunctuation: boolean;\r\n collation: string;\r\n caseFirst: string;\r\n numeric: boolean;\r\n }\r\n\r\n interface Collator {\r\n compare(x: string, y: string): number;\r\n resolvedOptions(): ResolvedCollatorOptions;\r\n }\r\n var Collator: {\r\n new (locales?: string[], options?: CollatorOptions): Collator;\r\n new (locale?: string, options?: CollatorOptions): Collator;\r\n (locales?: string[], options?: CollatorOptions): Collator;\r\n (locale?: string, options?: CollatorOptions): Collator;\r\n supportedLocalesOf(locales: string[], options?: CollatorOptions): string[];\r\n supportedLocalesOf(locale: string, options?: CollatorOptions): string[];\r\n }\r\n\r\n interface NumberFormatOptions {\r\n localeMatcher?: string;\r\n style?: string;\r\n currency?: string;\r\n currencyDisplay?: string;\r\n useGrouping?: boolean;\r\n minimumIntegerDigits?: number;\r\n minimumFractionDigits?: number;\r\n maximumFractionDigits?: number;\r\n minimumSignificantDigits?: number;\r\n maximumSignificantDigits?: number;\r\n }\r\n\r\n interface ResolvedNumberFormatOptions {\r\n locale: string;\r\n numberingSystem: string;\r\n style: string;\r\n currency?: string;\r\n currencyDisplay?: string;\r\n minimumIntegerDigits: number;\r\n minimumFractionDigits: number;\r\n maximumFractionDigits: number;\r\n minimumSignificantDigits?: number;\r\n maximumSignificantDigits?: number;\r\n useGrouping: boolean;\r\n }\r\n\r\n interface NumberFormat {\r\n format(value: number): string;\r\n resolvedOptions(): ResolvedNumberFormatOptions;\r\n }\r\n var NumberFormat: {\r\n new (locales?: string[], options?: NumberFormatOptions): NumberFormat;\r\n new (locale?: string, options?: NumberFormatOptions): NumberFormat;\r\n (locales?: string[], options?: NumberFormatOptions): NumberFormat;\r\n (locale?: string, options?: NumberFormatOptions): NumberFormat;\r\n supportedLocalesOf(locales: string[], options?: NumberFormatOptions): string[];\r\n supportedLocalesOf(locale: string, options?: NumberFormatOptions): string[];\r\n }\r\n\r\n interface DateTimeFormatOptions {\r\n localeMatcher?: string;\r\n weekday?: string;\r\n era?: string;\r\n year?: string;\r\n month?: string;\r\n day?: string;\r\n hour?: string;\r\n minute?: string;\r\n second?: string;\r\n timeZoneName?: string;\r\n formatMatcher?: string;\r\n hour12?: boolean;\r\n timeZone?: string;\r\n }\r\n\r\n interface ResolvedDateTimeFormatOptions {\r\n locale: string;\r\n calendar: string;\r\n numberingSystem: string;\r\n timeZone: string;\r\n hour12?: boolean;\r\n weekday?: string;\r\n era?: string;\r\n year?: string;\r\n month?: string;\r\n day?: string;\r\n hour?: string;\r\n minute?: string;\r\n second?: string;\r\n timeZoneName?: string;\r\n }\r\n\r\n interface DateTimeFormat {\r\n format(date?: Date | number): string;\r\n resolvedOptions(): ResolvedDateTimeFormatOptions;\r\n }\r\n var DateTimeFormat: {\r\n new (locales?: string[], options?: DateTimeFormatOptions): DateTimeFormat;\r\n new (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat;\r\n (locales?: string[], options?: DateTimeFormatOptions): DateTimeFormat;\r\n (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat;\r\n supportedLocalesOf(locales: string[], options?: DateTimeFormatOptions): string[];\r\n supportedLocalesOf(locale: string, options?: DateTimeFormatOptions): string[];\r\n }\r\n}\r\n\r\ninterface String {\r\n /**\r\n * Determines whether two strings are equivalent in the current locale.\r\n * @param that String to compare to target string\r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.\r\n * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.\r\n */\r\n localeCompare(that: string, locales: string[], options?: Intl.CollatorOptions): number;\r\n\r\n /**\r\n * Determines whether two strings are equivalent in the current locale.\r\n * @param that String to compare to target string\r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.\r\n * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.\r\n */\r\n localeCompare(that: string, locale: string, options?: Intl.CollatorOptions): number;\r\n}\r\n\r\ninterface Number {\r\n /**\r\n * Converts a number to a string by using the current or specified locale.\r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locales?: string[], options?: Intl.NumberFormatOptions): string;\r\n\r\n /**\r\n * Converts a number to a string by using the current or specified locale.\r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locale?: string, options?: Intl.NumberFormatOptions): string;\r\n}\r\n\r\ninterface Date {\r\n /**\r\n * Converts a date and time to a string by using the current or specified locale.\r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;\r\n /**\r\n * Converts a date to a string by using the current or specified locale.\r\n * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;\r\n\r\n /**\r\n * Converts a time to a string by using the current or specified locale.\r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;\r\n\r\n /**\r\n * Converts a date and time to a string by using the current or specified locale.\r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;\r\n\r\n /**\r\n * Converts a date to a string by using the current or specified locale.\r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;\r\n\r\n /**\r\n * Converts a time to a string by using the current or specified locale.\r\n * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.\r\n * @param options An object that contains one or more properties that specify comparison options.\r\n */\r\n toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;\r\n}\r\n\r\n/////////////////////////////\r\n/// IE DOM APIs\r\n/////////////////////////////\r\n\r\ninterface Algorithm {\r\n name: string;\r\n}\r\n\r\ninterface AriaRequestEventInit extends EventInit {\r\n attributeName?: string;\r\n attributeValue?: string;\r\n}\r\n\r\ninterface CommandEventInit extends EventInit {\r\n commandName?: string;\r\n detail?: string;\r\n}\r\n\r\ninterface CompositionEventInit extends UIEventInit {\r\n data?: string;\r\n}\r\n\r\ninterface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation {\r\n arrayOfDomainStrings?: string[];\r\n}\r\n\r\ninterface ConstrainBooleanParameters {\r\n exact?: boolean;\r\n ideal?: boolean;\r\n}\r\n\r\ninterface ConstrainDOMStringParameters {\r\n exact?: string | string[];\r\n ideal?: string | string[];\r\n}\r\n\r\ninterface ConstrainDoubleRange extends DoubleRange {\r\n exact?: number;\r\n ideal?: number;\r\n}\r\n\r\ninterface ConstrainLongRange extends LongRange {\r\n exact?: number;\r\n ideal?: number;\r\n}\r\n\r\ninterface ConstrainVideoFacingModeParameters {\r\n exact?: string | string[];\r\n ideal?: string | string[];\r\n}\r\n\r\ninterface CustomEventInit extends EventInit {\r\n detail?: any;\r\n}\r\n\r\ninterface DeviceAccelerationDict {\r\n x?: number;\r\n y?: number;\r\n z?: number;\r\n}\r\n\r\ninterface DeviceLightEventInit extends EventInit {\r\n value?: number;\r\n}\r\n\r\ninterface DeviceRotationRateDict {\r\n alpha?: number;\r\n beta?: number;\r\n gamma?: number;\r\n}\r\n\r\ninterface DoubleRange {\r\n max?: number;\r\n min?: number;\r\n}\r\n\r\ninterface EventInit {\r\n bubbles?: boolean;\r\n cancelable?: boolean;\r\n}\r\n\r\ninterface EventModifierInit extends UIEventInit {\r\n ctrlKey?: boolean;\r\n shiftKey?: boolean;\r\n altKey?: boolean;\r\n metaKey?: boolean;\r\n modifierAltGraph?: boolean;\r\n modifierCapsLock?: boolean;\r\n modifierFn?: boolean;\r\n modifierFnLock?: boolean;\r\n modifierHyper?: boolean;\r\n modifierNumLock?: boolean;\r\n modifierOS?: boolean;\r\n modifierScrollLock?: boolean;\r\n modifierSuper?: boolean;\r\n modifierSymbol?: boolean;\r\n modifierSymbolLock?: boolean;\r\n}\r\n\r\ninterface ExceptionInformation {\r\n domain?: string;\r\n}\r\n\r\ninterface FocusEventInit extends UIEventInit {\r\n relatedTarget?: EventTarget;\r\n}\r\n\r\ninterface HashChangeEventInit extends EventInit {\r\n newURL?: string;\r\n oldURL?: string;\r\n}\r\n\r\ninterface IDBIndexParameters {\r\n multiEntry?: boolean;\r\n unique?: boolean;\r\n}\r\n\r\ninterface IDBObjectStoreParameters {\r\n autoIncrement?: boolean;\r\n keyPath?: IDBKeyPath;\r\n}\r\n\r\ninterface KeyAlgorithm {\r\n name?: string;\r\n}\r\n\r\ninterface KeyboardEventInit extends EventModifierInit {\r\n code?: string;\r\n key?: string;\r\n location?: number;\r\n repeat?: boolean;\r\n}\r\n\r\ninterface LongRange {\r\n max?: number;\r\n min?: number;\r\n}\r\n\r\ninterface MSAccountInfo {\r\n rpDisplayName?: string;\r\n userDisplayName?: string;\r\n accountName?: string;\r\n userId?: string;\r\n accountImageUri?: string;\r\n}\r\n\r\ninterface MSAudioLocalClientEvent extends MSLocalClientEventBase {\r\n networkSendQualityEventRatio?: number;\r\n networkDelayEventRatio?: number;\r\n cpuInsufficientEventRatio?: number;\r\n deviceHalfDuplexAECEventRatio?: number;\r\n deviceRenderNotFunctioningEventRatio?: number;\r\n deviceCaptureNotFunctioningEventRatio?: number;\r\n deviceGlitchesEventRatio?: number;\r\n deviceLowSNREventRatio?: number;\r\n deviceLowSpeechLevelEventRatio?: number;\r\n deviceClippingEventRatio?: number;\r\n deviceEchoEventRatio?: number;\r\n deviceNearEndToEchoRatioEventRatio?: number;\r\n deviceRenderZeroVolumeEventRatio?: number;\r\n deviceRenderMuteEventRatio?: number;\r\n deviceMultipleEndpointsEventCount?: number;\r\n deviceHowlingEventCount?: number;\r\n}\r\n\r\ninterface MSAudioRecvPayload extends MSPayloadBase {\r\n samplingRate?: number;\r\n signal?: MSAudioRecvSignal;\r\n packetReorderRatio?: number;\r\n packetReorderDepthAvg?: number;\r\n packetReorderDepthMax?: number;\r\n burstLossLength1?: number;\r\n burstLossLength2?: number;\r\n burstLossLength3?: number;\r\n burstLossLength4?: number;\r\n burstLossLength5?: number;\r\n burstLossLength6?: number;\r\n burstLossLength7?: number;\r\n burstLossLength8OrHigher?: number;\r\n fecRecvDistance1?: number;\r\n fecRecvDistance2?: number;\r\n fecRecvDistance3?: number;\r\n ratioConcealedSamplesAvg?: number;\r\n ratioStretchedSamplesAvg?: number;\r\n ratioCompressedSamplesAvg?: number;\r\n}\r\n\r\ninterface MSAudioRecvSignal {\r\n initialSignalLevelRMS?: number;\r\n recvSignalLevelCh1?: number;\r\n recvNoiseLevelCh1?: number;\r\n renderSignalLevel?: number;\r\n renderNoiseLevel?: number;\r\n renderLoopbackSignalLevel?: number;\r\n}\r\n\r\ninterface MSAudioSendPayload extends MSPayloadBase {\r\n samplingRate?: number;\r\n signal?: MSAudioSendSignal;\r\n audioFECUsed?: boolean;\r\n sendMutePercent?: number;\r\n}\r\n\r\ninterface MSAudioSendSignal {\r\n noiseLevel?: number;\r\n sendSignalLevelCh1?: number;\r\n sendNoiseLevelCh1?: number;\r\n}\r\n\r\ninterface MSConnectivity {\r\n iceType?: string;\r\n iceWarningFlags?: MSIceWarningFlags;\r\n relayAddress?: MSRelayAddress;\r\n}\r\n\r\ninterface MSCredentialFilter {\r\n accept?: MSCredentialSpec[];\r\n}\r\n\r\ninterface MSCredentialParameters {\r\n type?: string;\r\n}\r\n\r\ninterface MSCredentialSpec {\r\n type?: string;\r\n id?: string;\r\n}\r\n\r\ninterface MSDelay {\r\n roundTrip?: number;\r\n roundTripMax?: number;\r\n}\r\n\r\ninterface MSDescription extends RTCStats {\r\n connectivity?: MSConnectivity;\r\n transport?: string;\r\n networkconnectivity?: MSNetworkConnectivityInfo;\r\n localAddr?: MSIPAddressInfo;\r\n remoteAddr?: MSIPAddressInfo;\r\n deviceDevName?: string;\r\n reflexiveLocalIPAddr?: MSIPAddressInfo;\r\n}\r\n\r\ninterface MSFIDOCredentialParameters extends MSCredentialParameters {\r\n algorithm?: string | Algorithm;\r\n authenticators?: AAGUID[];\r\n}\r\n\r\ninterface MSIPAddressInfo {\r\n ipAddr?: string;\r\n port?: number;\r\n manufacturerMacAddrMask?: string;\r\n}\r\n\r\ninterface MSIceWarningFlags {\r\n turnTcpTimedOut?: boolean;\r\n turnUdpAllocateFailed?: boolean;\r\n turnUdpSendFailed?: boolean;\r\n turnTcpAllocateFailed?: boolean;\r\n turnTcpSendFailed?: boolean;\r\n udpLocalConnectivityFailed?: boolean;\r\n udpNatConnectivityFailed?: boolean;\r\n udpRelayConnectivityFailed?: boolean;\r\n tcpNatConnectivityFailed?: boolean;\r\n tcpRelayConnectivityFailed?: boolean;\r\n connCheckMessageIntegrityFailed?: boolean;\r\n allocationMessageIntegrityFailed?: boolean;\r\n connCheckOtherError?: boolean;\r\n turnAuthUnknownUsernameError?: boolean;\r\n noRelayServersConfigured?: boolean;\r\n multipleRelayServersAttempted?: boolean;\r\n portRangeExhausted?: boolean;\r\n alternateServerReceived?: boolean;\r\n pseudoTLSFailure?: boolean;\r\n turnTurnTcpConnectivityFailed?: boolean;\r\n useCandidateChecksFailed?: boolean;\r\n fipsAllocationFailure?: boolean;\r\n}\r\n\r\ninterface MSJitter {\r\n interArrival?: number;\r\n interArrivalMax?: number;\r\n interArrivalSD?: number;\r\n}\r\n\r\ninterface MSLocalClientEventBase extends RTCStats {\r\n networkReceiveQualityEventRatio?: number;\r\n networkBandwidthLowEventRatio?: number;\r\n}\r\n\r\ninterface MSNetwork extends RTCStats {\r\n jitter?: MSJitter;\r\n delay?: MSDelay;\r\n packetLoss?: MSPacketLoss;\r\n utilization?: MSUtilization;\r\n}\r\n\r\ninterface MSNetworkConnectivityInfo {\r\n vpn?: boolean;\r\n linkspeed?: number;\r\n networkConnectionDetails?: string;\r\n}\r\n\r\ninterface MSNetworkInterfaceType {\r\n interfaceTypeEthernet?: boolean;\r\n interfaceTypeWireless?: boolean;\r\n interfaceTypePPP?: boolean;\r\n interfaceTypeTunnel?: boolean;\r\n interfaceTypeWWAN?: boolean;\r\n}\r\n\r\ninterface MSOutboundNetwork extends MSNetwork {\r\n appliedBandwidthLimit?: number;\r\n}\r\n\r\ninterface MSPacketLoss {\r\n lossRate?: number;\r\n lossRateMax?: number;\r\n}\r\n\r\ninterface MSPayloadBase extends RTCStats {\r\n payloadDescription?: string;\r\n}\r\n\r\ninterface MSRelayAddress {\r\n relayAddress?: string;\r\n port?: number;\r\n}\r\n\r\ninterface MSSignatureParameters {\r\n userPrompt?: string;\r\n}\r\n\r\ninterface MSTransportDiagnosticsStats extends RTCStats {\r\n baseAddress?: string;\r\n localAddress?: string;\r\n localSite?: string;\r\n networkName?: string;\r\n remoteAddress?: string;\r\n remoteSite?: string;\r\n localMR?: string;\r\n remoteMR?: string;\r\n iceWarningFlags?: MSIceWarningFlags;\r\n portRangeMin?: number;\r\n portRangeMax?: number;\r\n localMRTCPPort?: number;\r\n remoteMRTCPPort?: number;\r\n stunVer?: number;\r\n numConsentReqSent?: number;\r\n numConsentReqReceived?: number;\r\n numConsentRespSent?: number;\r\n numConsentRespReceived?: number;\r\n interfaces?: MSNetworkInterfaceType;\r\n baseInterface?: MSNetworkInterfaceType;\r\n protocol?: string;\r\n localInterface?: MSNetworkInterfaceType;\r\n localAddrType?: string;\r\n remoteAddrType?: string;\r\n iceRole?: string;\r\n rtpRtcpMux?: boolean;\r\n allocationTimeInMs?: number;\r\n msRtcEngineVersion?: string;\r\n}\r\n\r\ninterface MSUtilization {\r\n packets?: number;\r\n bandwidthEstimation?: number;\r\n bandwidthEstimationMin?: number;\r\n bandwidthEstimationMax?: number;\r\n bandwidthEstimationStdDev?: number;\r\n bandwidthEstimationAvg?: number;\r\n}\r\n\r\ninterface MSVideoPayload extends MSPayloadBase {\r\n resoluton?: string;\r\n videoBitRateAvg?: number;\r\n videoBitRateMax?: number;\r\n videoFrameRateAvg?: number;\r\n videoPacketLossRate?: number;\r\n durationSeconds?: number;\r\n}\r\n\r\ninterface MSVideoRecvPayload extends MSVideoPayload {\r\n videoFrameLossRate?: number;\r\n recvCodecType?: string;\r\n recvResolutionWidth?: number;\r\n recvResolutionHeight?: number;\r\n videoResolutions?: MSVideoResolutionDistribution;\r\n recvFrameRateAverage?: number;\r\n recvBitRateMaximum?: number;\r\n recvBitRateAverage?: number;\r\n recvVideoStreamsMax?: number;\r\n recvVideoStreamsMin?: number;\r\n recvVideoStreamsMode?: number;\r\n videoPostFECPLR?: number;\r\n lowBitRateCallPercent?: number;\r\n lowFrameRateCallPercent?: number;\r\n reorderBufferTotalPackets?: number;\r\n recvReorderBufferReorderedPackets?: number;\r\n recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number;\r\n recvReorderBufferMaxSuccessfullyOrderedExtent?: number;\r\n recvReorderBufferMaxSuccessfullyOrderedLateTime?: number;\r\n recvReorderBufferPacketsDroppedDueToTimeout?: number;\r\n recvFpsHarmonicAverage?: number;\r\n recvNumResSwitches?: number;\r\n}\r\n\r\ninterface MSVideoResolutionDistribution {\r\n cifQuality?: number;\r\n vgaQuality?: number;\r\n h720Quality?: number;\r\n h1080Quality?: number;\r\n h1440Quality?: number;\r\n h2160Quality?: number;\r\n}\r\n\r\ninterface MSVideoSendPayload extends MSVideoPayload {\r\n sendFrameRateAverage?: number;\r\n sendBitRateMaximum?: number;\r\n sendBitRateAverage?: number;\r\n sendVideoStreamsMax?: number;\r\n sendResolutionWidth?: number;\r\n sendResolutionHeight?: number;\r\n}\r\n\r\ninterface MediaEncryptedEventInit extends EventInit {\r\n initDataType?: string;\r\n initData?: ArrayBuffer;\r\n}\r\n\r\ninterface MediaKeyMessageEventInit extends EventInit {\r\n messageType?: string;\r\n message?: ArrayBuffer;\r\n}\r\n\r\ninterface MediaKeySystemConfiguration {\r\n initDataTypes?: string[];\r\n audioCapabilities?: MediaKeySystemMediaCapability[];\r\n videoCapabilities?: MediaKeySystemMediaCapability[];\r\n distinctiveIdentifier?: string;\r\n persistentState?: string;\r\n}\r\n\r\ninterface MediaKeySystemMediaCapability {\r\n contentType?: string;\r\n robustness?: string;\r\n}\r\n\r\ninterface MediaStreamConstraints {\r\n video?: boolean | MediaTrackConstraints;\r\n audio?: boolean | MediaTrackConstraints;\r\n}\r\n\r\ninterface MediaStreamErrorEventInit extends EventInit {\r\n error?: MediaStreamError;\r\n}\r\n\r\ninterface MediaStreamTrackEventInit extends EventInit {\r\n track?: MediaStreamTrack;\r\n}\r\n\r\ninterface MediaTrackCapabilities {\r\n width?: number | LongRange;\r\n height?: number | LongRange;\r\n aspectRatio?: number | DoubleRange;\r\n frameRate?: number | DoubleRange;\r\n facingMode?: string;\r\n volume?: number | DoubleRange;\r\n sampleRate?: number | LongRange;\r\n sampleSize?: number | LongRange;\r\n echoCancellation?: boolean[];\r\n deviceId?: string;\r\n groupId?: string;\r\n}\r\n\r\ninterface MediaTrackConstraintSet {\r\n width?: number | ConstrainLongRange;\r\n height?: number | ConstrainLongRange;\r\n aspectRatio?: number | ConstrainDoubleRange;\r\n frameRate?: number | ConstrainDoubleRange;\r\n facingMode?: string | string[] | ConstrainDOMStringParameters;\r\n volume?: number | ConstrainDoubleRange;\r\n sampleRate?: number | ConstrainLongRange;\r\n sampleSize?: number | ConstrainLongRange;\r\n echoCancelation?: boolean | ConstrainBooleanParameters;\r\n deviceId?: string | string[] | ConstrainDOMStringParameters;\r\n groupId?: string | string[] | ConstrainDOMStringParameters;\r\n}\r\n\r\ninterface MediaTrackConstraints extends MediaTrackConstraintSet {\r\n advanced?: MediaTrackConstraintSet[];\r\n}\r\n\r\ninterface MediaTrackSettings {\r\n width?: number;\r\n height?: number;\r\n aspectRatio?: number;\r\n frameRate?: number;\r\n facingMode?: string;\r\n volume?: number;\r\n sampleRate?: number;\r\n sampleSize?: number;\r\n echoCancellation?: boolean;\r\n deviceId?: string;\r\n groupId?: string;\r\n}\r\n\r\ninterface MediaTrackSupportedConstraints {\r\n width?: boolean;\r\n height?: boolean;\r\n aspectRatio?: boolean;\r\n frameRate?: boolean;\r\n facingMode?: boolean;\r\n volume?: boolean;\r\n sampleRate?: boolean;\r\n sampleSize?: boolean;\r\n echoCancellation?: boolean;\r\n deviceId?: boolean;\r\n groupId?: boolean;\r\n}\r\n\r\ninterface MouseEventInit extends EventModifierInit {\r\n screenX?: number;\r\n screenY?: number;\r\n clientX?: number;\r\n clientY?: number;\r\n button?: number;\r\n buttons?: number;\r\n relatedTarget?: EventTarget;\r\n}\r\n\r\ninterface MsZoomToOptions {\r\n contentX?: number;\r\n contentY?: number;\r\n viewportX?: string;\r\n viewportY?: string;\r\n scaleFactor?: number;\r\n animate?: string;\r\n}\r\n\r\ninterface MutationObserverInit {\r\n childList?: boolean;\r\n attributes?: boolean;\r\n characterData?: boolean;\r\n subtree?: boolean;\r\n attributeOldValue?: boolean;\r\n characterDataOldValue?: boolean;\r\n attributeFilter?: string[];\r\n}\r\n\r\ninterface ObjectURLOptions {\r\n oneTimeOnly?: boolean;\r\n}\r\n\r\ninterface PeriodicWaveConstraints {\r\n disableNormalization?: boolean;\r\n}\r\n\r\ninterface PointerEventInit extends MouseEventInit {\r\n pointerId?: number;\r\n width?: number;\r\n height?: number;\r\n pressure?: number;\r\n tiltX?: number;\r\n tiltY?: number;\r\n pointerType?: string;\r\n isPrimary?: boolean;\r\n}\r\n\r\ninterface PositionOptions {\r\n enableHighAccuracy?: boolean;\r\n timeout?: number;\r\n maximumAge?: number;\r\n}\r\n\r\ninterface RTCDTMFToneChangeEventInit extends EventInit {\r\n tone?: string;\r\n}\r\n\r\ninterface RTCDtlsFingerprint {\r\n algorithm?: string;\r\n value?: string;\r\n}\r\n\r\ninterface RTCDtlsParameters {\r\n role?: string;\r\n fingerprints?: RTCDtlsFingerprint[];\r\n}\r\n\r\ninterface RTCIceCandidate {\r\n foundation?: string;\r\n priority?: number;\r\n ip?: string;\r\n protocol?: string;\r\n port?: number;\r\n type?: string;\r\n tcpType?: string;\r\n relatedAddress?: string;\r\n relatedPort?: number;\r\n}\r\n\r\ninterface RTCIceCandidateAttributes extends RTCStats {\r\n ipAddress?: string;\r\n portNumber?: number;\r\n transport?: string;\r\n candidateType?: string;\r\n priority?: number;\r\n addressSourceUrl?: string;\r\n}\r\n\r\ninterface RTCIceCandidateComplete {\r\n}\r\n\r\ninterface RTCIceCandidatePair {\r\n local?: RTCIceCandidate;\r\n remote?: RTCIceCandidate;\r\n}\r\n\r\ninterface RTCIceCandidatePairStats extends RTCStats {\r\n transportId?: string;\r\n localCandidateId?: string;\r\n remoteCandidateId?: string;\r\n state?: string;\r\n priority?: number;\r\n nominated?: boolean;\r\n writable?: boolean;\r\n readable?: boolean;\r\n bytesSent?: number;\r\n bytesReceived?: number;\r\n roundTripTime?: number;\r\n availableOutgoingBitrate?: number;\r\n availableIncomingBitrate?: number;\r\n}\r\n\r\ninterface RTCIceGatherOptions {\r\n gatherPolicy?: string;\r\n iceservers?: RTCIceServer[];\r\n}\r\n\r\ninterface RTCIceParameters {\r\n usernameFragment?: string;\r\n password?: string;\r\n}\r\n\r\ninterface RTCIceServer {\r\n urls?: any;\r\n username?: string;\r\n credential?: string;\r\n}\r\n\r\ninterface RTCInboundRTPStreamStats extends RTCRTPStreamStats {\r\n packetsReceived?: number;\r\n bytesReceived?: number;\r\n packetsLost?: number;\r\n jitter?: number;\r\n fractionLost?: number;\r\n}\r\n\r\ninterface RTCMediaStreamTrackStats extends RTCStats {\r\n trackIdentifier?: string;\r\n remoteSource?: boolean;\r\n ssrcIds?: string[];\r\n frameWidth?: number;\r\n frameHeight?: number;\r\n framesPerSecond?: number;\r\n framesSent?: number;\r\n framesReceived?: number;\r\n framesDecoded?: number;\r\n framesDropped?: number;\r\n framesCorrupted?: number;\r\n audioLevel?: number;\r\n echoReturnLoss?: number;\r\n echoReturnLossEnhancement?: number;\r\n}\r\n\r\ninterface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {\r\n packetsSent?: number;\r\n bytesSent?: number;\r\n targetBitrate?: number;\r\n roundTripTime?: number;\r\n}\r\n\r\ninterface RTCRTPStreamStats extends RTCStats {\r\n ssrc?: string;\r\n associateStatsId?: string;\r\n isRemote?: boolean;\r\n mediaTrackId?: string;\r\n transportId?: string;\r\n codecId?: string;\r\n firCount?: number;\r\n pliCount?: number;\r\n nackCount?: number;\r\n sliCount?: number;\r\n}\r\n\r\ninterface RTCRtcpFeedback {\r\n type?: string;\r\n parameter?: string;\r\n}\r\n\r\ninterface RTCRtcpParameters {\r\n ssrc?: number;\r\n cname?: string;\r\n reducedSize?: boolean;\r\n mux?: boolean;\r\n}\r\n\r\ninterface RTCRtpCapabilities {\r\n codecs?: RTCRtpCodecCapability[];\r\n headerExtensions?: RTCRtpHeaderExtension[];\r\n fecMechanisms?: string[];\r\n}\r\n\r\ninterface RTCRtpCodecCapability {\r\n name?: string;\r\n kind?: string;\r\n clockRate?: number;\r\n preferredPayloadType?: number;\r\n maxptime?: number;\r\n numChannels?: number;\r\n rtcpFeedback?: RTCRtcpFeedback[];\r\n parameters?: any;\r\n options?: any;\r\n maxTemporalLayers?: number;\r\n maxSpatialLayers?: number;\r\n svcMultiStreamSupport?: boolean;\r\n}\r\n\r\ninterface RTCRtpCodecParameters {\r\n name?: string;\r\n payloadType?: any;\r\n clockRate?: number;\r\n maxptime?: number;\r\n numChannels?: number;\r\n rtcpFeedback?: RTCRtcpFeedback[];\r\n parameters?: any;\r\n}\r\n\r\ninterface RTCRtpContributingSource {\r\n timestamp?: number;\r\n csrc?: number;\r\n audioLevel?: number;\r\n}\r\n\r\ninterface RTCRtpEncodingParameters {\r\n ssrc?: number;\r\n codecPayloadType?: number;\r\n fec?: RTCRtpFecParameters;\r\n rtx?: RTCRtpRtxParameters;\r\n priority?: number;\r\n maxBitrate?: number;\r\n minQuality?: number;\r\n framerateBias?: number;\r\n resolutionScale?: number;\r\n framerateScale?: number;\r\n active?: boolean;\r\n encodingId?: string;\r\n dependencyEncodingIds?: string[];\r\n ssrcRange?: RTCSsrcRange;\r\n}\r\n\r\ninterface RTCRtpFecParameters {\r\n ssrc?: number;\r\n mechanism?: string;\r\n}\r\n\r\ninterface RTCRtpHeaderExtension {\r\n kind?: string;\r\n uri?: string;\r\n preferredId?: number;\r\n preferredEncrypt?: boolean;\r\n}\r\n\r\ninterface RTCRtpHeaderExtensionParameters {\r\n uri?: string;\r\n id?: number;\r\n encrypt?: boolean;\r\n}\r\n\r\ninterface RTCRtpParameters {\r\n muxId?: string;\r\n codecs?: RTCRtpCodecParameters[];\r\n headerExtensions?: RTCRtpHeaderExtensionParameters[];\r\n encodings?: RTCRtpEncodingParameters[];\r\n rtcp?: RTCRtcpParameters;\r\n}\r\n\r\ninterface RTCRtpRtxParameters {\r\n ssrc?: number;\r\n}\r\n\r\ninterface RTCRtpUnhandled {\r\n ssrc?: number;\r\n payloadType?: number;\r\n muxId?: string;\r\n}\r\n\r\ninterface RTCSrtpKeyParam {\r\n keyMethod?: string;\r\n keySalt?: string;\r\n lifetime?: string;\r\n mkiValue?: number;\r\n mkiLength?: number;\r\n}\r\n\r\ninterface RTCSrtpSdesParameters {\r\n tag?: number;\r\n cryptoSuite?: string;\r\n keyParams?: RTCSrtpKeyParam[];\r\n sessionParams?: string[];\r\n}\r\n\r\ninterface RTCSsrcRange {\r\n min?: number;\r\n max?: number;\r\n}\r\n\r\ninterface RTCStats {\r\n timestamp?: number;\r\n type?: string;\r\n id?: string;\r\n msType?: string;\r\n}\r\n\r\ninterface RTCStatsReport {\r\n}\r\n\r\ninterface RTCTransportStats extends RTCStats {\r\n bytesSent?: number;\r\n bytesReceived?: number;\r\n rtcpTransportStatsId?: string;\r\n activeConnection?: boolean;\r\n selectedCandidatePairId?: string;\r\n localCertificateId?: string;\r\n remoteCertificateId?: string;\r\n}\r\n\r\ninterface StoreExceptionsInformation extends ExceptionInformation {\r\n siteName?: string;\r\n explanationString?: string;\r\n detailURI?: string;\r\n}\r\n\r\ninterface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {\r\n arrayOfDomainStrings?: string[];\r\n}\r\n\r\ninterface UIEventInit extends EventInit {\r\n view?: Window;\r\n detail?: number;\r\n}\r\n\r\ninterface WebGLContextAttributes {\r\n failIfMajorPerformanceCaveat?: boolean;\r\n alpha?: boolean;\r\n depth?: boolean;\r\n stencil?: boolean;\r\n antialias?: boolean;\r\n premultipliedAlpha?: boolean;\r\n preserveDrawingBuffer?: boolean;\r\n}\r\n\r\ninterface WebGLContextEventInit extends EventInit {\r\n statusMessage?: string;\r\n}\r\n\r\ninterface WheelEventInit extends MouseEventInit {\r\n deltaX?: number;\r\n deltaY?: number;\r\n deltaZ?: number;\r\n deltaMode?: number;\r\n}\r\n\r\ninterface EventListener {\r\n (evt: Event): void;\r\n}\r\n\r\ninterface ANGLE_instanced_arrays {\r\n drawArraysInstancedANGLE(mode: number, first: number, count: number, primcount: number): void;\r\n drawElementsInstancedANGLE(mode: number, count: number, type: number, offset: number, primcount: number): void;\r\n vertexAttribDivisorANGLE(index: number, divisor: number): void;\r\n readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;\r\n}\r\n\r\ndeclare var ANGLE_instanced_arrays: {\r\n prototype: ANGLE_instanced_arrays;\r\n new(): ANGLE_instanced_arrays;\r\n readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;\r\n}\r\n\r\ninterface AnalyserNode extends AudioNode {\r\n fftSize: number;\r\n readonly frequencyBinCount: number;\r\n maxDecibels: number;\r\n minDecibels: number;\r\n smoothingTimeConstant: number;\r\n getByteFrequencyData(array: Uint8Array): void;\r\n getByteTimeDomainData(array: Uint8Array): void;\r\n getFloatFrequencyData(array: Float32Array): void;\r\n getFloatTimeDomainData(array: Float32Array): void;\r\n}\r\n\r\ndeclare var AnalyserNode: {\r\n prototype: AnalyserNode;\r\n new(): AnalyserNode;\r\n}\r\n\r\ninterface AnimationEvent extends Event {\r\n readonly animationName: string;\r\n readonly elapsedTime: number;\r\n initAnimationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, animationNameArg: string, elapsedTimeArg: number): void;\r\n}\r\n\r\ndeclare var AnimationEvent: {\r\n prototype: AnimationEvent;\r\n new(): AnimationEvent;\r\n}\r\n\r\ninterface ApplicationCache extends EventTarget {\r\n oncached: (this: this, ev: Event) => any;\r\n onchecking: (this: this, ev: Event) => any;\r\n ondownloading: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onnoupdate: (this: this, ev: Event) => any;\r\n onobsolete: (this: this, ev: Event) => any;\r\n onprogress: (this: this, ev: ProgressEvent) => any;\r\n onupdateready: (this: this, ev: Event) => any;\r\n readonly status: number;\r\n abort(): void;\r\n swapCache(): void;\r\n update(): void;\r\n readonly CHECKING: number;\r\n readonly DOWNLOADING: number;\r\n readonly IDLE: number;\r\n readonly OBSOLETE: number;\r\n readonly UNCACHED: number;\r\n readonly UPDATEREADY: number;\r\n addEventListener(type: \"cached\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"checking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"downloading\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"noupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"obsolete\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"updateready\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var ApplicationCache: {\r\n prototype: ApplicationCache;\r\n new(): ApplicationCache;\r\n readonly CHECKING: number;\r\n readonly DOWNLOADING: number;\r\n readonly IDLE: number;\r\n readonly OBSOLETE: number;\r\n readonly UNCACHED: number;\r\n readonly UPDATEREADY: number;\r\n}\r\n\r\ninterface AriaRequestEvent extends Event {\r\n readonly attributeName: string;\r\n attributeValue: string | null;\r\n}\r\n\r\ndeclare var AriaRequestEvent: {\r\n prototype: AriaRequestEvent;\r\n new(type: string, eventInitDict?: AriaRequestEventInit): AriaRequestEvent;\r\n}\r\n\r\ninterface Attr extends Node {\r\n readonly name: string;\r\n readonly ownerElement: Element;\r\n readonly prefix: string | null;\r\n readonly specified: boolean;\r\n value: string;\r\n}\r\n\r\ndeclare var Attr: {\r\n prototype: Attr;\r\n new(): Attr;\r\n}\r\n\r\ninterface AudioBuffer {\r\n readonly duration: number;\r\n readonly length: number;\r\n readonly numberOfChannels: number;\r\n readonly sampleRate: number;\r\n copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void;\r\n copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void;\r\n getChannelData(channel: number): Float32Array;\r\n}\r\n\r\ndeclare var AudioBuffer: {\r\n prototype: AudioBuffer;\r\n new(): AudioBuffer;\r\n}\r\n\r\ninterface AudioBufferSourceNode extends AudioNode {\r\n buffer: AudioBuffer | null;\r\n readonly detune: AudioParam;\r\n loop: boolean;\r\n loopEnd: number;\r\n loopStart: number;\r\n onended: (this: this, ev: MediaStreamErrorEvent) => any;\r\n readonly playbackRate: AudioParam;\r\n start(when?: number, offset?: number, duration?: number): void;\r\n stop(when?: number): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var AudioBufferSourceNode: {\r\n prototype: AudioBufferSourceNode;\r\n new(): AudioBufferSourceNode;\r\n}\r\n\r\ninterface AudioContext extends EventTarget {\r\n readonly currentTime: number;\r\n readonly destination: AudioDestinationNode;\r\n readonly listener: AudioListener;\r\n readonly sampleRate: number;\r\n state: string;\r\n createAnalyser(): AnalyserNode;\r\n createBiquadFilter(): BiquadFilterNode;\r\n createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;\r\n createBufferSource(): AudioBufferSourceNode;\r\n createChannelMerger(numberOfInputs?: number): ChannelMergerNode;\r\n createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode;\r\n createConvolver(): ConvolverNode;\r\n createDelay(maxDelayTime?: number): DelayNode;\r\n createDynamicsCompressor(): DynamicsCompressorNode;\r\n createGain(): GainNode;\r\n createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;\r\n createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode;\r\n createOscillator(): OscillatorNode;\r\n createPanner(): PannerNode;\r\n createPeriodicWave(real: Float32Array, imag: Float32Array, constraints?: PeriodicWaveConstraints): PeriodicWave;\r\n createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;\r\n createStereoPanner(): StereoPannerNode;\r\n createWaveShaper(): WaveShaperNode;\r\n decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): PromiseLike;\r\n}\r\n\r\ndeclare var AudioContext: {\r\n prototype: AudioContext;\r\n new(): AudioContext;\r\n}\r\n\r\ninterface AudioDestinationNode extends AudioNode {\r\n readonly maxChannelCount: number;\r\n}\r\n\r\ndeclare var AudioDestinationNode: {\r\n prototype: AudioDestinationNode;\r\n new(): AudioDestinationNode;\r\n}\r\n\r\ninterface AudioListener {\r\n dopplerFactor: number;\r\n speedOfSound: number;\r\n setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void;\r\n setPosition(x: number, y: number, z: number): void;\r\n setVelocity(x: number, y: number, z: number): void;\r\n}\r\n\r\ndeclare var AudioListener: {\r\n prototype: AudioListener;\r\n new(): AudioListener;\r\n}\r\n\r\ninterface AudioNode extends EventTarget {\r\n channelCount: number;\r\n channelCountMode: string;\r\n channelInterpretation: string;\r\n readonly context: AudioContext;\r\n readonly numberOfInputs: number;\r\n readonly numberOfOutputs: number;\r\n connect(destination: AudioNode, output?: number, input?: number): void;\r\n disconnect(output?: number): void;\r\n disconnect(destination: AudioNode, output?: number, input?: number): void;\r\n disconnect(destination: AudioParam, output?: number): void;\r\n}\r\n\r\ndeclare var AudioNode: {\r\n prototype: AudioNode;\r\n new(): AudioNode;\r\n}\r\n\r\ninterface AudioParam {\r\n readonly defaultValue: number;\r\n value: number;\r\n cancelScheduledValues(startTime: number): void;\r\n exponentialRampToValueAtTime(value: number, endTime: number): void;\r\n linearRampToValueAtTime(value: number, endTime: number): void;\r\n setTargetAtTime(target: number, startTime: number, timeConstant: number): void;\r\n setValueAtTime(value: number, startTime: number): void;\r\n setValueCurveAtTime(values: Float32Array, startTime: number, duration: number): void;\r\n}\r\n\r\ndeclare var AudioParam: {\r\n prototype: AudioParam;\r\n new(): AudioParam;\r\n}\r\n\r\ninterface AudioProcessingEvent extends Event {\r\n readonly inputBuffer: AudioBuffer;\r\n readonly outputBuffer: AudioBuffer;\r\n readonly playbackTime: number;\r\n}\r\n\r\ndeclare var AudioProcessingEvent: {\r\n prototype: AudioProcessingEvent;\r\n new(): AudioProcessingEvent;\r\n}\r\n\r\ninterface AudioTrack {\r\n enabled: boolean;\r\n readonly id: string;\r\n kind: string;\r\n readonly label: string;\r\n language: string;\r\n readonly sourceBuffer: SourceBuffer;\r\n}\r\n\r\ndeclare var AudioTrack: {\r\n prototype: AudioTrack;\r\n new(): AudioTrack;\r\n}\r\n\r\ninterface AudioTrackList extends EventTarget {\r\n readonly length: number;\r\n onaddtrack: (this: this, ev: TrackEvent) => any;\r\n onchange: (this: this, ev: Event) => any;\r\n onremovetrack: (this: this, ev: TrackEvent) => any;\r\n getTrackById(id: string): AudioTrack | null;\r\n item(index: number): AudioTrack;\r\n addEventListener(type: \"addtrack\", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"removetrack\", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: AudioTrack;\r\n}\r\n\r\ndeclare var AudioTrackList: {\r\n prototype: AudioTrackList;\r\n new(): AudioTrackList;\r\n}\r\n\r\ninterface BarProp {\r\n readonly visible: boolean;\r\n}\r\n\r\ndeclare var BarProp: {\r\n prototype: BarProp;\r\n new(): BarProp;\r\n}\r\n\r\ninterface BeforeUnloadEvent extends Event {\r\n returnValue: any;\r\n}\r\n\r\ndeclare var BeforeUnloadEvent: {\r\n prototype: BeforeUnloadEvent;\r\n new(): BeforeUnloadEvent;\r\n}\r\n\r\ninterface BiquadFilterNode extends AudioNode {\r\n readonly Q: AudioParam;\r\n readonly detune: AudioParam;\r\n readonly frequency: AudioParam;\r\n readonly gain: AudioParam;\r\n type: string;\r\n getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;\r\n}\r\n\r\ndeclare var BiquadFilterNode: {\r\n prototype: BiquadFilterNode;\r\n new(): BiquadFilterNode;\r\n}\r\n\r\ninterface Blob {\r\n readonly size: number;\r\n readonly type: string;\r\n msClose(): void;\r\n msDetachStream(): any;\r\n slice(start?: number, end?: number, contentType?: string): Blob;\r\n}\r\n\r\ndeclare var Blob: {\r\n prototype: Blob;\r\n new (blobParts?: any[], options?: BlobPropertyBag): Blob;\r\n}\r\n\r\ninterface CDATASection extends Text {\r\n}\r\n\r\ndeclare var CDATASection: {\r\n prototype: CDATASection;\r\n new(): CDATASection;\r\n}\r\n\r\ninterface CSS {\r\n supports(property: string, value?: string): boolean;\r\n}\r\ndeclare var CSS: CSS;\r\n\r\ninterface CSSConditionRule extends CSSGroupingRule {\r\n conditionText: string;\r\n}\r\n\r\ndeclare var CSSConditionRule: {\r\n prototype: CSSConditionRule;\r\n new(): CSSConditionRule;\r\n}\r\n\r\ninterface CSSFontFaceRule extends CSSRule {\r\n readonly style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSFontFaceRule: {\r\n prototype: CSSFontFaceRule;\r\n new(): CSSFontFaceRule;\r\n}\r\n\r\ninterface CSSGroupingRule extends CSSRule {\r\n readonly cssRules: CSSRuleList;\r\n deleteRule(index: number): void;\r\n insertRule(rule: string, index: number): number;\r\n}\r\n\r\ndeclare var CSSGroupingRule: {\r\n prototype: CSSGroupingRule;\r\n new(): CSSGroupingRule;\r\n}\r\n\r\ninterface CSSImportRule extends CSSRule {\r\n readonly href: string;\r\n readonly media: MediaList;\r\n readonly styleSheet: CSSStyleSheet;\r\n}\r\n\r\ndeclare var CSSImportRule: {\r\n prototype: CSSImportRule;\r\n new(): CSSImportRule;\r\n}\r\n\r\ninterface CSSKeyframeRule extends CSSRule {\r\n keyText: string;\r\n readonly style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSKeyframeRule: {\r\n prototype: CSSKeyframeRule;\r\n new(): CSSKeyframeRule;\r\n}\r\n\r\ninterface CSSKeyframesRule extends CSSRule {\r\n readonly cssRules: CSSRuleList;\r\n name: string;\r\n appendRule(rule: string): void;\r\n deleteRule(rule: string): void;\r\n findRule(rule: string): CSSKeyframeRule;\r\n}\r\n\r\ndeclare var CSSKeyframesRule: {\r\n prototype: CSSKeyframesRule;\r\n new(): CSSKeyframesRule;\r\n}\r\n\r\ninterface CSSMediaRule extends CSSConditionRule {\r\n readonly media: MediaList;\r\n}\r\n\r\ndeclare var CSSMediaRule: {\r\n prototype: CSSMediaRule;\r\n new(): CSSMediaRule;\r\n}\r\n\r\ninterface CSSNamespaceRule extends CSSRule {\r\n readonly namespaceURI: string;\r\n readonly prefix: string;\r\n}\r\n\r\ndeclare var CSSNamespaceRule: {\r\n prototype: CSSNamespaceRule;\r\n new(): CSSNamespaceRule;\r\n}\r\n\r\ninterface CSSPageRule extends CSSRule {\r\n readonly pseudoClass: string;\r\n readonly selector: string;\r\n selectorText: string;\r\n readonly style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSPageRule: {\r\n prototype: CSSPageRule;\r\n new(): CSSPageRule;\r\n}\r\n\r\ninterface CSSRule {\r\n cssText: string;\r\n readonly parentRule: CSSRule;\r\n readonly parentStyleSheet: CSSStyleSheet;\r\n readonly type: number;\r\n readonly CHARSET_RULE: number;\r\n readonly FONT_FACE_RULE: number;\r\n readonly IMPORT_RULE: number;\r\n readonly KEYFRAMES_RULE: number;\r\n readonly KEYFRAME_RULE: number;\r\n readonly MEDIA_RULE: number;\r\n readonly NAMESPACE_RULE: number;\r\n readonly PAGE_RULE: number;\r\n readonly STYLE_RULE: number;\r\n readonly SUPPORTS_RULE: number;\r\n readonly UNKNOWN_RULE: number;\r\n readonly VIEWPORT_RULE: number;\r\n}\r\n\r\ndeclare var CSSRule: {\r\n prototype: CSSRule;\r\n new(): CSSRule;\r\n readonly CHARSET_RULE: number;\r\n readonly FONT_FACE_RULE: number;\r\n readonly IMPORT_RULE: number;\r\n readonly KEYFRAMES_RULE: number;\r\n readonly KEYFRAME_RULE: number;\r\n readonly MEDIA_RULE: number;\r\n readonly NAMESPACE_RULE: number;\r\n readonly PAGE_RULE: number;\r\n readonly STYLE_RULE: number;\r\n readonly SUPPORTS_RULE: number;\r\n readonly UNKNOWN_RULE: number;\r\n readonly VIEWPORT_RULE: number;\r\n}\r\n\r\ninterface CSSRuleList {\r\n readonly length: number;\r\n item(index: number): CSSRule;\r\n [index: number]: CSSRule;\r\n}\r\n\r\ndeclare var CSSRuleList: {\r\n prototype: CSSRuleList;\r\n new(): CSSRuleList;\r\n}\r\n\r\ninterface CSSStyleDeclaration {\r\n alignContent: string | null;\r\n alignItems: string | null;\r\n alignSelf: string | null;\r\n alignmentBaseline: string | null;\r\n animation: string | null;\r\n animationDelay: string | null;\r\n animationDirection: string | null;\r\n animationDuration: string | null;\r\n animationFillMode: string | null;\r\n animationIterationCount: string | null;\r\n animationName: string | null;\r\n animationPlayState: string | null;\r\n animationTimingFunction: string | null;\r\n backfaceVisibility: string | null;\r\n background: string | null;\r\n backgroundAttachment: string | null;\r\n backgroundClip: string | null;\r\n backgroundColor: string | null;\r\n backgroundImage: string | null;\r\n backgroundOrigin: string | null;\r\n backgroundPosition: string | null;\r\n backgroundPositionX: string | null;\r\n backgroundPositionY: string | null;\r\n backgroundRepeat: string | null;\r\n backgroundSize: string | null;\r\n baselineShift: string | null;\r\n border: string | null;\r\n borderBottom: string | null;\r\n borderBottomColor: string | null;\r\n borderBottomLeftRadius: string | null;\r\n borderBottomRightRadius: string | null;\r\n borderBottomStyle: string | null;\r\n borderBottomWidth: string | null;\r\n borderCollapse: string | null;\r\n borderColor: string | null;\r\n borderImage: string | null;\r\n borderImageOutset: string | null;\r\n borderImageRepeat: string | null;\r\n borderImageSlice: string | null;\r\n borderImageSource: string | null;\r\n borderImageWidth: string | null;\r\n borderLeft: string | null;\r\n borderLeftColor: string | null;\r\n borderLeftStyle: string | null;\r\n borderLeftWidth: string | null;\r\n borderRadius: string | null;\r\n borderRight: string | null;\r\n borderRightColor: string | null;\r\n borderRightStyle: string | null;\r\n borderRightWidth: string | null;\r\n borderSpacing: string | null;\r\n borderStyle: string | null;\r\n borderTop: string | null;\r\n borderTopColor: string | null;\r\n borderTopLeftRadius: string | null;\r\n borderTopRightRadius: string | null;\r\n borderTopStyle: string | null;\r\n borderTopWidth: string | null;\r\n borderWidth: string | null;\r\n bottom: string | null;\r\n boxShadow: string | null;\r\n boxSizing: string | null;\r\n breakAfter: string | null;\r\n breakBefore: string | null;\r\n breakInside: string | null;\r\n captionSide: string | null;\r\n clear: string | null;\r\n clip: string | null;\r\n clipPath: string | null;\r\n clipRule: string | null;\r\n color: string | null;\r\n colorInterpolationFilters: string | null;\r\n columnCount: any;\r\n columnFill: string | null;\r\n columnGap: any;\r\n columnRule: string | null;\r\n columnRuleColor: any;\r\n columnRuleStyle: string | null;\r\n columnRuleWidth: any;\r\n columnSpan: string | null;\r\n columnWidth: any;\r\n columns: string | null;\r\n content: string | null;\r\n counterIncrement: string | null;\r\n counterReset: string | null;\r\n cssFloat: string | null;\r\n cssText: string;\r\n cursor: string | null;\r\n direction: string | null;\r\n display: string | null;\r\n dominantBaseline: string | null;\r\n emptyCells: string | null;\r\n enableBackground: string | null;\r\n fill: string | null;\r\n fillOpacity: string | null;\r\n fillRule: string | null;\r\n filter: string | null;\r\n flex: string | null;\r\n flexBasis: string | null;\r\n flexDirection: string | null;\r\n flexFlow: string | null;\r\n flexGrow: string | null;\r\n flexShrink: string | null;\r\n flexWrap: string | null;\r\n floodColor: string | null;\r\n floodOpacity: string | null;\r\n font: string | null;\r\n fontFamily: string | null;\r\n fontFeatureSettings: string | null;\r\n fontSize: string | null;\r\n fontSizeAdjust: string | null;\r\n fontStretch: string | null;\r\n fontStyle: string | null;\r\n fontVariant: string | null;\r\n fontWeight: string | null;\r\n glyphOrientationHorizontal: string | null;\r\n glyphOrientationVertical: string | null;\r\n height: string | null;\r\n imeMode: string | null;\r\n justifyContent: string | null;\r\n kerning: string | null;\r\n left: string | null;\r\n readonly length: number;\r\n letterSpacing: string | null;\r\n lightingColor: string | null;\r\n lineHeight: string | null;\r\n listStyle: string | null;\r\n listStyleImage: string | null;\r\n listStylePosition: string | null;\r\n listStyleType: string | null;\r\n margin: string | null;\r\n marginBottom: string | null;\r\n marginLeft: string | null;\r\n marginRight: string | null;\r\n marginTop: string | null;\r\n marker: string | null;\r\n markerEnd: string | null;\r\n markerMid: string | null;\r\n markerStart: string | null;\r\n mask: string | null;\r\n maxHeight: string | null;\r\n maxWidth: string | null;\r\n minHeight: string | null;\r\n minWidth: string | null;\r\n msContentZoomChaining: string | null;\r\n msContentZoomLimit: string | null;\r\n msContentZoomLimitMax: any;\r\n msContentZoomLimitMin: any;\r\n msContentZoomSnap: string | null;\r\n msContentZoomSnapPoints: string | null;\r\n msContentZoomSnapType: string | null;\r\n msContentZooming: string | null;\r\n msFlowFrom: string | null;\r\n msFlowInto: string | null;\r\n msFontFeatureSettings: string | null;\r\n msGridColumn: any;\r\n msGridColumnAlign: string | null;\r\n msGridColumnSpan: any;\r\n msGridColumns: string | null;\r\n msGridRow: any;\r\n msGridRowAlign: string | null;\r\n msGridRowSpan: any;\r\n msGridRows: string | null;\r\n msHighContrastAdjust: string | null;\r\n msHyphenateLimitChars: string | null;\r\n msHyphenateLimitLines: any;\r\n msHyphenateLimitZone: any;\r\n msHyphens: string | null;\r\n msImeAlign: string | null;\r\n msOverflowStyle: string | null;\r\n msScrollChaining: string | null;\r\n msScrollLimit: string | null;\r\n msScrollLimitXMax: any;\r\n msScrollLimitXMin: any;\r\n msScrollLimitYMax: any;\r\n msScrollLimitYMin: any;\r\n msScrollRails: string | null;\r\n msScrollSnapPointsX: string | null;\r\n msScrollSnapPointsY: string | null;\r\n msScrollSnapType: string | null;\r\n msScrollSnapX: string | null;\r\n msScrollSnapY: string | null;\r\n msScrollTranslation: string | null;\r\n msTextCombineHorizontal: string | null;\r\n msTextSizeAdjust: any;\r\n msTouchAction: string | null;\r\n msTouchSelect: string | null;\r\n msUserSelect: string | null;\r\n msWrapFlow: string;\r\n msWrapMargin: any;\r\n msWrapThrough: string;\r\n opacity: string | null;\r\n order: string | null;\r\n orphans: string | null;\r\n outline: string | null;\r\n outlineColor: string | null;\r\n outlineStyle: string | null;\r\n outlineWidth: string | null;\r\n overflow: string | null;\r\n overflowX: string | null;\r\n overflowY: string | null;\r\n padding: string | null;\r\n paddingBottom: string | null;\r\n paddingLeft: string | null;\r\n paddingRight: string | null;\r\n paddingTop: string | null;\r\n pageBreakAfter: string | null;\r\n pageBreakBefore: string | null;\r\n pageBreakInside: string | null;\r\n readonly parentRule: CSSRule;\r\n perspective: string | null;\r\n perspectiveOrigin: string | null;\r\n pointerEvents: string | null;\r\n position: string | null;\r\n quotes: string | null;\r\n right: string | null;\r\n rubyAlign: string | null;\r\n rubyOverhang: string | null;\r\n rubyPosition: string | null;\r\n stopColor: string | null;\r\n stopOpacity: string | null;\r\n stroke: string | null;\r\n strokeDasharray: string | null;\r\n strokeDashoffset: string | null;\r\n strokeLinecap: string | null;\r\n strokeLinejoin: string | null;\r\n strokeMiterlimit: string | null;\r\n strokeOpacity: string | null;\r\n strokeWidth: string | null;\r\n tableLayout: string | null;\r\n textAlign: string | null;\r\n textAlignLast: string | null;\r\n textAnchor: string | null;\r\n textDecoration: string | null;\r\n textIndent: string | null;\r\n textJustify: string | null;\r\n textKashida: string | null;\r\n textKashidaSpace: string | null;\r\n textOverflow: string | null;\r\n textShadow: string | null;\r\n textTransform: string | null;\r\n textUnderlinePosition: string | null;\r\n top: string | null;\r\n touchAction: string | null;\r\n transform: string | null;\r\n transformOrigin: string | null;\r\n transformStyle: string | null;\r\n transition: string | null;\r\n transitionDelay: string | null;\r\n transitionDuration: string | null;\r\n transitionProperty: string | null;\r\n transitionTimingFunction: string | null;\r\n unicodeBidi: string | null;\r\n verticalAlign: string | null;\r\n visibility: string | null;\r\n webkitAlignContent: string | null;\r\n webkitAlignItems: string | null;\r\n webkitAlignSelf: string | null;\r\n webkitAnimation: string | null;\r\n webkitAnimationDelay: string | null;\r\n webkitAnimationDirection: string | null;\r\n webkitAnimationDuration: string | null;\r\n webkitAnimationFillMode: string | null;\r\n webkitAnimationIterationCount: string | null;\r\n webkitAnimationName: string | null;\r\n webkitAnimationPlayState: string | null;\r\n webkitAnimationTimingFunction: string | null;\r\n webkitAppearance: string | null;\r\n webkitBackfaceVisibility: string | null;\r\n webkitBackgroundClip: string | null;\r\n webkitBackgroundOrigin: string | null;\r\n webkitBackgroundSize: string | null;\r\n webkitBorderBottomLeftRadius: string | null;\r\n webkitBorderBottomRightRadius: string | null;\r\n webkitBorderImage: string | null;\r\n webkitBorderRadius: string | null;\r\n webkitBorderTopLeftRadius: string | null;\r\n webkitBorderTopRightRadius: string | null;\r\n webkitBoxAlign: string | null;\r\n webkitBoxDirection: string | null;\r\n webkitBoxFlex: string | null;\r\n webkitBoxOrdinalGroup: string | null;\r\n webkitBoxOrient: string | null;\r\n webkitBoxPack: string | null;\r\n webkitBoxSizing: string | null;\r\n webkitColumnBreakAfter: string | null;\r\n webkitColumnBreakBefore: string | null;\r\n webkitColumnBreakInside: string | null;\r\n webkitColumnCount: any;\r\n webkitColumnGap: any;\r\n webkitColumnRule: string | null;\r\n webkitColumnRuleColor: any;\r\n webkitColumnRuleStyle: string | null;\r\n webkitColumnRuleWidth: any;\r\n webkitColumnSpan: string | null;\r\n webkitColumnWidth: any;\r\n webkitColumns: string | null;\r\n webkitFilter: string | null;\r\n webkitFlex: string | null;\r\n webkitFlexBasis: string | null;\r\n webkitFlexDirection: string | null;\r\n webkitFlexFlow: string | null;\r\n webkitFlexGrow: string | null;\r\n webkitFlexShrink: string | null;\r\n webkitFlexWrap: string | null;\r\n webkitJustifyContent: string | null;\r\n webkitOrder: string | null;\r\n webkitPerspective: string | null;\r\n webkitPerspectiveOrigin: string | null;\r\n webkitTapHighlightColor: string | null;\r\n webkitTextFillColor: string | null;\r\n webkitTextSizeAdjust: any;\r\n webkitTransform: string | null;\r\n webkitTransformOrigin: string | null;\r\n webkitTransformStyle: string | null;\r\n webkitTransition: string | null;\r\n webkitTransitionDelay: string | null;\r\n webkitTransitionDuration: string | null;\r\n webkitTransitionProperty: string | null;\r\n webkitTransitionTimingFunction: string | null;\r\n webkitUserModify: string | null;\r\n webkitUserSelect: string | null;\r\n webkitWritingMode: string | null;\r\n whiteSpace: string | null;\r\n widows: string | null;\r\n width: string | null;\r\n wordBreak: string | null;\r\n wordSpacing: string | null;\r\n wordWrap: string | null;\r\n writingMode: string | null;\r\n zIndex: string | null;\r\n zoom: string | null;\r\n getPropertyPriority(propertyName: string): string;\r\n getPropertyValue(propertyName: string): string;\r\n item(index: number): string;\r\n removeProperty(propertyName: string): string;\r\n setProperty(propertyName: string, value: string | null, priority?: string): void;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var CSSStyleDeclaration: {\r\n prototype: CSSStyleDeclaration;\r\n new(): CSSStyleDeclaration;\r\n}\r\n\r\ninterface CSSStyleRule extends CSSRule {\r\n readonly readOnly: boolean;\r\n selectorText: string;\r\n readonly style: CSSStyleDeclaration;\r\n}\r\n\r\ndeclare var CSSStyleRule: {\r\n prototype: CSSStyleRule;\r\n new(): CSSStyleRule;\r\n}\r\n\r\ninterface CSSStyleSheet extends StyleSheet {\r\n readonly cssRules: CSSRuleList;\r\n cssText: string;\r\n readonly href: string;\r\n readonly id: string;\r\n readonly imports: StyleSheetList;\r\n readonly isAlternate: boolean;\r\n readonly isPrefAlternate: boolean;\r\n readonly ownerRule: CSSRule;\r\n readonly owningElement: Element;\r\n readonly pages: StyleSheetPageList;\r\n readonly readOnly: boolean;\r\n readonly rules: CSSRuleList;\r\n addImport(bstrURL: string, lIndex?: number): number;\r\n addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number;\r\n addRule(bstrSelector: string, bstrStyle?: string, lIndex?: number): number;\r\n deleteRule(index?: number): void;\r\n insertRule(rule: string, index?: number): number;\r\n removeImport(lIndex: number): void;\r\n removeRule(lIndex: number): void;\r\n}\r\n\r\ndeclare var CSSStyleSheet: {\r\n prototype: CSSStyleSheet;\r\n new(): CSSStyleSheet;\r\n}\r\n\r\ninterface CSSSupportsRule extends CSSConditionRule {\r\n}\r\n\r\ndeclare var CSSSupportsRule: {\r\n prototype: CSSSupportsRule;\r\n new(): CSSSupportsRule;\r\n}\r\n\r\ninterface CanvasGradient {\r\n addColorStop(offset: number, color: string): void;\r\n}\r\n\r\ndeclare var CanvasGradient: {\r\n prototype: CanvasGradient;\r\n new(): CanvasGradient;\r\n}\r\n\r\ninterface CanvasPattern {\r\n}\r\n\r\ndeclare var CanvasPattern: {\r\n prototype: CanvasPattern;\r\n new(): CanvasPattern;\r\n}\r\n\r\ninterface CanvasRenderingContext2D extends Object, CanvasPathMethods {\r\n readonly canvas: HTMLCanvasElement;\r\n fillStyle: string | CanvasGradient | CanvasPattern;\r\n font: string;\r\n globalAlpha: number;\r\n globalCompositeOperation: string;\r\n lineCap: string;\r\n lineDashOffset: number;\r\n lineJoin: string;\r\n lineWidth: number;\r\n miterLimit: number;\r\n msFillRule: string;\r\n msImageSmoothingEnabled: boolean;\r\n shadowBlur: number;\r\n shadowColor: string;\r\n shadowOffsetX: number;\r\n shadowOffsetY: number;\r\n strokeStyle: string | CanvasGradient | CanvasPattern;\r\n textAlign: string;\r\n textBaseline: string;\r\n mozImageSmoothingEnabled: boolean;\r\n webkitImageSmoothingEnabled: boolean;\r\n oImageSmoothingEnabled: boolean;\r\n beginPath(): void;\r\n clearRect(x: number, y: number, w: number, h: number): void;\r\n clip(fillRule?: string): void;\r\n createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;\r\n createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;\r\n createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;\r\n createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;\r\n drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;\r\n fill(fillRule?: string): void;\r\n fillRect(x: number, y: number, w: number, h: number): void;\r\n fillText(text: string, x: number, y: number, maxWidth?: number): void;\r\n getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;\r\n getLineDash(): number[];\r\n isPointInPath(x: number, y: number, fillRule?: string): boolean;\r\n measureText(text: string): TextMetrics;\r\n putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void;\r\n restore(): void;\r\n rotate(angle: number): void;\r\n save(): void;\r\n scale(x: number, y: number): void;\r\n setLineDash(segments: number[]): void;\r\n setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;\r\n stroke(): void;\r\n strokeRect(x: number, y: number, w: number, h: number): void;\r\n strokeText(text: string, x: number, y: number, maxWidth?: number): void;\r\n transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;\r\n translate(x: number, y: number): void;\r\n}\r\n\r\ndeclare var CanvasRenderingContext2D: {\r\n prototype: CanvasRenderingContext2D;\r\n new(): CanvasRenderingContext2D;\r\n}\r\n\r\ninterface ChannelMergerNode extends AudioNode {\r\n}\r\n\r\ndeclare var ChannelMergerNode: {\r\n prototype: ChannelMergerNode;\r\n new(): ChannelMergerNode;\r\n}\r\n\r\ninterface ChannelSplitterNode extends AudioNode {\r\n}\r\n\r\ndeclare var ChannelSplitterNode: {\r\n prototype: ChannelSplitterNode;\r\n new(): ChannelSplitterNode;\r\n}\r\n\r\ninterface CharacterData extends Node, ChildNode {\r\n data: string;\r\n readonly length: number;\r\n appendData(arg: string): void;\r\n deleteData(offset: number, count: number): void;\r\n insertData(offset: number, arg: string): void;\r\n replaceData(offset: number, count: number, arg: string): void;\r\n substringData(offset: number, count: number): string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var CharacterData: {\r\n prototype: CharacterData;\r\n new(): CharacterData;\r\n}\r\n\r\ninterface ClientRect {\r\n bottom: number;\r\n readonly height: number;\r\n left: number;\r\n right: number;\r\n top: number;\r\n readonly width: number;\r\n}\r\n\r\ndeclare var ClientRect: {\r\n prototype: ClientRect;\r\n new(): ClientRect;\r\n}\r\n\r\ninterface ClientRectList {\r\n readonly length: number;\r\n item(index: number): ClientRect;\r\n [index: number]: ClientRect;\r\n}\r\n\r\ndeclare var ClientRectList: {\r\n prototype: ClientRectList;\r\n new(): ClientRectList;\r\n}\r\n\r\ninterface ClipboardEvent extends Event {\r\n readonly clipboardData: DataTransfer;\r\n}\r\n\r\ndeclare var ClipboardEvent: {\r\n prototype: ClipboardEvent;\r\n new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent;\r\n}\r\n\r\ninterface CloseEvent extends Event {\r\n readonly code: number;\r\n readonly reason: string;\r\n readonly wasClean: boolean;\r\n initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;\r\n}\r\n\r\ndeclare var CloseEvent: {\r\n prototype: CloseEvent;\r\n new(): CloseEvent;\r\n}\r\n\r\ninterface CommandEvent extends Event {\r\n readonly commandName: string;\r\n readonly detail: string | null;\r\n}\r\n\r\ndeclare var CommandEvent: {\r\n prototype: CommandEvent;\r\n new(type: string, eventInitDict?: CommandEventInit): CommandEvent;\r\n}\r\n\r\ninterface Comment extends CharacterData {\r\n text: string;\r\n}\r\n\r\ndeclare var Comment: {\r\n prototype: Comment;\r\n new(): Comment;\r\n}\r\n\r\ninterface CompositionEvent extends UIEvent {\r\n readonly data: string;\r\n readonly locale: string;\r\n initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void;\r\n}\r\n\r\ndeclare var CompositionEvent: {\r\n prototype: CompositionEvent;\r\n new(typeArg: string, eventInitDict?: CompositionEventInit): CompositionEvent;\r\n}\r\n\r\ninterface Console {\r\n assert(test?: boolean, message?: string, ...optionalParams: any[]): void;\r\n clear(): void;\r\n count(countTitle?: string): void;\r\n debug(message?: string, ...optionalParams: any[]): void;\r\n dir(value?: any, ...optionalParams: any[]): void;\r\n dirxml(value: any): void;\r\n error(message?: any, ...optionalParams: any[]): void;\r\n exception(message?: string, ...optionalParams: any[]): void;\r\n group(groupTitle?: string): void;\r\n groupCollapsed(groupTitle?: string): void;\r\n groupEnd(): void;\r\n info(message?: any, ...optionalParams: any[]): void;\r\n log(message?: any, ...optionalParams: any[]): void;\r\n msIsIndependentlyComposed(element: Element): boolean;\r\n profile(reportName?: string): void;\r\n profileEnd(): void;\r\n select(element: Element): void;\r\n table(...data: any[]): void;\r\n time(timerName?: string): void;\r\n timeEnd(timerName?: string): void;\r\n trace(message?: any, ...optionalParams: any[]): void;\r\n warn(message?: any, ...optionalParams: any[]): void;\r\n}\r\n\r\ndeclare var Console: {\r\n prototype: Console;\r\n new(): Console;\r\n}\r\n\r\ninterface ConvolverNode extends AudioNode {\r\n buffer: AudioBuffer | null;\r\n normalize: boolean;\r\n}\r\n\r\ndeclare var ConvolverNode: {\r\n prototype: ConvolverNode;\r\n new(): ConvolverNode;\r\n}\r\n\r\ninterface Coordinates {\r\n readonly accuracy: number;\r\n readonly altitude: number | null;\r\n readonly altitudeAccuracy: number | null;\r\n readonly heading: number | null;\r\n readonly latitude: number;\r\n readonly longitude: number;\r\n readonly speed: number | null;\r\n}\r\n\r\ndeclare var Coordinates: {\r\n prototype: Coordinates;\r\n new(): Coordinates;\r\n}\r\n\r\ninterface Crypto extends Object, RandomSource {\r\n readonly subtle: SubtleCrypto;\r\n}\r\n\r\ndeclare var Crypto: {\r\n prototype: Crypto;\r\n new(): Crypto;\r\n}\r\n\r\ninterface CryptoKey {\r\n readonly algorithm: KeyAlgorithm;\r\n readonly extractable: boolean;\r\n readonly type: string;\r\n readonly usages: string[];\r\n}\r\n\r\ndeclare var CryptoKey: {\r\n prototype: CryptoKey;\r\n new(): CryptoKey;\r\n}\r\n\r\ninterface CryptoKeyPair {\r\n privateKey: CryptoKey;\r\n publicKey: CryptoKey;\r\n}\r\n\r\ndeclare var CryptoKeyPair: {\r\n prototype: CryptoKeyPair;\r\n new(): CryptoKeyPair;\r\n}\r\n\r\ninterface CustomEvent extends Event {\r\n readonly detail: any;\r\n initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any): void;\r\n}\r\n\r\ndeclare var CustomEvent: {\r\n prototype: CustomEvent;\r\n new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent;\r\n}\r\n\r\ninterface DOMError {\r\n readonly name: string;\r\n toString(): string;\r\n}\r\n\r\ndeclare var DOMError: {\r\n prototype: DOMError;\r\n new(): DOMError;\r\n}\r\n\r\ninterface DOMException {\r\n readonly code: number;\r\n readonly message: string;\r\n readonly name: string;\r\n toString(): string;\r\n readonly ABORT_ERR: number;\r\n readonly DATA_CLONE_ERR: number;\r\n readonly DOMSTRING_SIZE_ERR: number;\r\n readonly HIERARCHY_REQUEST_ERR: number;\r\n readonly INDEX_SIZE_ERR: number;\r\n readonly INUSE_ATTRIBUTE_ERR: number;\r\n readonly INVALID_ACCESS_ERR: number;\r\n readonly INVALID_CHARACTER_ERR: number;\r\n readonly INVALID_MODIFICATION_ERR: number;\r\n readonly INVALID_NODE_TYPE_ERR: number;\r\n readonly INVALID_STATE_ERR: number;\r\n readonly NAMESPACE_ERR: number;\r\n readonly NETWORK_ERR: number;\r\n readonly NOT_FOUND_ERR: number;\r\n readonly NOT_SUPPORTED_ERR: number;\r\n readonly NO_DATA_ALLOWED_ERR: number;\r\n readonly NO_MODIFICATION_ALLOWED_ERR: number;\r\n readonly PARSE_ERR: number;\r\n readonly QUOTA_EXCEEDED_ERR: number;\r\n readonly SECURITY_ERR: number;\r\n readonly SERIALIZE_ERR: number;\r\n readonly SYNTAX_ERR: number;\r\n readonly TIMEOUT_ERR: number;\r\n readonly TYPE_MISMATCH_ERR: number;\r\n readonly URL_MISMATCH_ERR: number;\r\n readonly VALIDATION_ERR: number;\r\n readonly WRONG_DOCUMENT_ERR: number;\r\n}\r\n\r\ndeclare var DOMException: {\r\n prototype: DOMException;\r\n new(): DOMException;\r\n readonly ABORT_ERR: number;\r\n readonly DATA_CLONE_ERR: number;\r\n readonly DOMSTRING_SIZE_ERR: number;\r\n readonly HIERARCHY_REQUEST_ERR: number;\r\n readonly INDEX_SIZE_ERR: number;\r\n readonly INUSE_ATTRIBUTE_ERR: number;\r\n readonly INVALID_ACCESS_ERR: number;\r\n readonly INVALID_CHARACTER_ERR: number;\r\n readonly INVALID_MODIFICATION_ERR: number;\r\n readonly INVALID_NODE_TYPE_ERR: number;\r\n readonly INVALID_STATE_ERR: number;\r\n readonly NAMESPACE_ERR: number;\r\n readonly NETWORK_ERR: number;\r\n readonly NOT_FOUND_ERR: number;\r\n readonly NOT_SUPPORTED_ERR: number;\r\n readonly NO_DATA_ALLOWED_ERR: number;\r\n readonly NO_MODIFICATION_ALLOWED_ERR: number;\r\n readonly PARSE_ERR: number;\r\n readonly QUOTA_EXCEEDED_ERR: number;\r\n readonly SECURITY_ERR: number;\r\n readonly SERIALIZE_ERR: number;\r\n readonly SYNTAX_ERR: number;\r\n readonly TIMEOUT_ERR: number;\r\n readonly TYPE_MISMATCH_ERR: number;\r\n readonly URL_MISMATCH_ERR: number;\r\n readonly VALIDATION_ERR: number;\r\n readonly WRONG_DOCUMENT_ERR: number;\r\n}\r\n\r\ninterface DOMImplementation {\r\n createDocument(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType): Document;\r\n createDocumentType(qualifiedName: string, publicId: string | null, systemId: string | null): DocumentType;\r\n createHTMLDocument(title: string): Document;\r\n hasFeature(feature: string | null, version: string | null): boolean;\r\n}\r\n\r\ndeclare var DOMImplementation: {\r\n prototype: DOMImplementation;\r\n new(): DOMImplementation;\r\n}\r\n\r\ninterface DOMParser {\r\n parseFromString(source: string, mimeType: string): Document;\r\n}\r\n\r\ndeclare var DOMParser: {\r\n prototype: DOMParser;\r\n new(): DOMParser;\r\n}\r\n\r\ninterface DOMSettableTokenList extends DOMTokenList {\r\n value: string;\r\n}\r\n\r\ndeclare var DOMSettableTokenList: {\r\n prototype: DOMSettableTokenList;\r\n new(): DOMSettableTokenList;\r\n}\r\n\r\ninterface DOMStringList {\r\n readonly length: number;\r\n contains(str: string): boolean;\r\n item(index: number): string | null;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var DOMStringList: {\r\n prototype: DOMStringList;\r\n new(): DOMStringList;\r\n}\r\n\r\ninterface DOMStringMap {\r\n [name: string]: string;\r\n}\r\n\r\ndeclare var DOMStringMap: {\r\n prototype: DOMStringMap;\r\n new(): DOMStringMap;\r\n}\r\n\r\ninterface DOMTokenList {\r\n readonly length: number;\r\n add(...token: string[]): void;\r\n contains(token: string): boolean;\r\n item(index: number): string;\r\n remove(...token: string[]): void;\r\n toString(): string;\r\n toggle(token: string, force?: boolean): boolean;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var DOMTokenList: {\r\n prototype: DOMTokenList;\r\n new(): DOMTokenList;\r\n}\r\n\r\ninterface DataCue extends TextTrackCue {\r\n data: ArrayBuffer;\r\n}\r\n\r\ndeclare var DataCue: {\r\n prototype: DataCue;\r\n new(): DataCue;\r\n}\r\n\r\ninterface DataTransfer {\r\n dropEffect: string;\r\n effectAllowed: string;\r\n readonly files: FileList;\r\n readonly items: DataTransferItemList;\r\n readonly types: DOMStringList;\r\n clearData(format?: string): boolean;\r\n getData(format: string): string;\r\n setData(format: string, data: string): boolean;\r\n}\r\n\r\ndeclare var DataTransfer: {\r\n prototype: DataTransfer;\r\n new(): DataTransfer;\r\n}\r\n\r\ninterface DataTransferItem {\r\n readonly kind: string;\r\n readonly type: string;\r\n getAsFile(): File | null;\r\n getAsString(_callback: FunctionStringCallback | null): void;\r\n}\r\n\r\ndeclare var DataTransferItem: {\r\n prototype: DataTransferItem;\r\n new(): DataTransferItem;\r\n}\r\n\r\ninterface DataTransferItemList {\r\n readonly length: number;\r\n add(data: File): DataTransferItem | null;\r\n clear(): void;\r\n item(index: number): DataTransferItem;\r\n remove(index: number): void;\r\n [index: number]: DataTransferItem;\r\n}\r\n\r\ndeclare var DataTransferItemList: {\r\n prototype: DataTransferItemList;\r\n new(): DataTransferItemList;\r\n}\r\n\r\ninterface DeferredPermissionRequest {\r\n readonly id: number;\r\n readonly type: string;\r\n readonly uri: string;\r\n allow(): void;\r\n deny(): void;\r\n}\r\n\r\ndeclare var DeferredPermissionRequest: {\r\n prototype: DeferredPermissionRequest;\r\n new(): DeferredPermissionRequest;\r\n}\r\n\r\ninterface DelayNode extends AudioNode {\r\n readonly delayTime: AudioParam;\r\n}\r\n\r\ndeclare var DelayNode: {\r\n prototype: DelayNode;\r\n new(): DelayNode;\r\n}\r\n\r\ninterface DeviceAcceleration {\r\n readonly x: number | null;\r\n readonly y: number | null;\r\n readonly z: number | null;\r\n}\r\n\r\ndeclare var DeviceAcceleration: {\r\n prototype: DeviceAcceleration;\r\n new(): DeviceAcceleration;\r\n}\r\n\r\ninterface DeviceLightEvent extends Event {\r\n readonly value: number;\r\n}\r\n\r\ndeclare var DeviceLightEvent: {\r\n prototype: DeviceLightEvent;\r\n new(type: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;\r\n}\r\n\r\ninterface DeviceMotionEvent extends Event {\r\n readonly acceleration: DeviceAcceleration | null;\r\n readonly accelerationIncludingGravity: DeviceAcceleration | null;\r\n readonly interval: number | null;\r\n readonly rotationRate: DeviceRotationRate | null;\r\n initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict | null, accelerationIncludingGravity: DeviceAccelerationDict | null, rotationRate: DeviceRotationRateDict | null, interval: number | null): void;\r\n}\r\n\r\ndeclare var DeviceMotionEvent: {\r\n prototype: DeviceMotionEvent;\r\n new(): DeviceMotionEvent;\r\n}\r\n\r\ninterface DeviceOrientationEvent extends Event {\r\n readonly absolute: boolean;\r\n readonly alpha: number | null;\r\n readonly beta: number | null;\r\n readonly gamma: number | null;\r\n initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number | null, beta: number | null, gamma: number | null, absolute: boolean): void;\r\n}\r\n\r\ndeclare var DeviceOrientationEvent: {\r\n prototype: DeviceOrientationEvent;\r\n new(): DeviceOrientationEvent;\r\n}\r\n\r\ninterface DeviceRotationRate {\r\n readonly alpha: number | null;\r\n readonly beta: number | null;\r\n readonly gamma: number | null;\r\n}\r\n\r\ndeclare var DeviceRotationRate: {\r\n prototype: DeviceRotationRate;\r\n new(): DeviceRotationRate;\r\n}\r\n\r\ninterface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent, ParentNode {\r\n /**\r\n * Sets or gets the URL for the current document. \r\n */\r\n readonly URL: string;\r\n /**\r\n * Gets the URL for the document, stripped of any character encoding.\r\n */\r\n readonly URLUnencoded: string;\r\n /**\r\n * Gets the object that has the focus when the parent document has focus.\r\n */\r\n readonly activeElement: Element;\r\n /**\r\n * Sets or gets the color of all active links in the document.\r\n */\r\n alinkColor: string;\r\n /**\r\n * Returns a reference to the collection of elements contained by the object.\r\n */\r\n readonly all: HTMLAllCollection;\r\n /**\r\n * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.\r\n */\r\n anchors: HTMLCollectionOf;\r\n /**\r\n * Retrieves a collection of all applet objects in the document.\r\n */\r\n applets: HTMLCollectionOf;\r\n /**\r\n * Deprecated. Sets or retrieves a value that indicates the background color behind the object. \r\n */\r\n bgColor: string;\r\n /**\r\n * Specifies the beginning and end of the document body.\r\n */\r\n body: HTMLElement;\r\n readonly characterSet: string;\r\n /**\r\n * Gets or sets the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Gets a value that indicates whether standards-compliant mode is switched on for the object.\r\n */\r\n readonly compatMode: string;\r\n cookie: string;\r\n readonly currentScript: HTMLScriptElement | SVGScriptElement;\r\n /**\r\n * Gets the default character set from the current regional language settings.\r\n */\r\n readonly defaultCharset: string;\r\n readonly defaultView: Window;\r\n /**\r\n * Sets or gets a value that indicates whether the document can be edited.\r\n */\r\n designMode: string;\r\n /**\r\n * Sets or retrieves a value that indicates the reading order of the object. \r\n */\r\n dir: string;\r\n /**\r\n * Gets an object representing the document type declaration associated with the current document. \r\n */\r\n readonly doctype: DocumentType;\r\n /**\r\n * Gets a reference to the root node of the document. \r\n */\r\n documentElement: HTMLElement;\r\n /**\r\n * Sets or gets the security domain of the document. \r\n */\r\n domain: string;\r\n /**\r\n * Retrieves a collection of all embed objects in the document.\r\n */\r\n embeds: HTMLCollectionOf;\r\n /**\r\n * Sets or gets the foreground (text) color of the document.\r\n */\r\n fgColor: string;\r\n /**\r\n * Retrieves a collection, in source order, of all form objects in the document.\r\n */\r\n forms: HTMLCollectionOf;\r\n readonly fullscreenElement: Element | null;\r\n readonly fullscreenEnabled: boolean;\r\n readonly head: HTMLHeadElement;\r\n readonly hidden: boolean;\r\n /**\r\n * Retrieves a collection, in source order, of img objects in the document.\r\n */\r\n images: HTMLCollectionOf;\r\n /**\r\n * Gets the implementation object of the current document. \r\n */\r\n readonly implementation: DOMImplementation;\r\n /**\r\n * Returns the character encoding used to create the webpage that is loaded into the document object.\r\n */\r\n readonly inputEncoding: string | null;\r\n /**\r\n * Gets the date that the page was last modified, if the page supplies one. \r\n */\r\n readonly lastModified: string;\r\n /**\r\n * Sets or gets the color of the document links. \r\n */\r\n linkColor: string;\r\n /**\r\n * Retrieves a collection of all a objects that specify the href property and all area objects in the document.\r\n */\r\n links: HTMLCollectionOf;\r\n /**\r\n * Contains information about the current URL. \r\n */\r\n readonly location: Location;\r\n msCSSOMElementFloatMetrics: boolean;\r\n msCapsLockWarningOff: boolean;\r\n /**\r\n * Fires when the user aborts the download.\r\n * @param ev The event.\r\n */\r\n onabort: (this: this, ev: UIEvent) => any;\r\n /**\r\n * Fires when the object is set as the active element.\r\n * @param ev The event.\r\n */\r\n onactivate: (this: this, ev: UIEvent) => any;\r\n /**\r\n * Fires immediately before the object is set as the active element.\r\n * @param ev The event.\r\n */\r\n onbeforeactivate: (this: this, ev: UIEvent) => any;\r\n /**\r\n * Fires immediately before the activeElement is changed from the current object to another object in the parent document.\r\n * @param ev The event.\r\n */\r\n onbeforedeactivate: (this: this, ev: UIEvent) => any;\r\n /** \r\n * Fires when the object loses the input focus. \r\n * @param ev The focus event.\r\n */\r\n onblur: (this: this, ev: FocusEvent) => any;\r\n /**\r\n * Occurs when playback is possible, but would require further buffering. \r\n * @param ev The event.\r\n */\r\n oncanplay: (this: this, ev: Event) => any;\r\n oncanplaythrough: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the contents of the object or selection have changed. \r\n * @param ev The event.\r\n */\r\n onchange: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the user clicks the left mouse button on the object\r\n * @param ev The mouse event.\r\n */\r\n onclick: (this: this, ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user clicks the right mouse button in the client area, opening the context menu. \r\n * @param ev The mouse event.\r\n */\r\n oncontextmenu: (this: this, ev: PointerEvent) => any;\r\n /**\r\n * Fires when the user double-clicks the object.\r\n * @param ev The mouse event.\r\n */\r\n ondblclick: (this: this, ev: MouseEvent) => any;\r\n /**\r\n * Fires when the activeElement is changed from the current object to another object in the parent document.\r\n * @param ev The UI Event\r\n */\r\n ondeactivate: (this: this, ev: UIEvent) => any;\r\n /**\r\n * Fires on the source object continuously during a drag operation.\r\n * @param ev The event.\r\n */\r\n ondrag: (this: this, ev: DragEvent) => any;\r\n /**\r\n * Fires on the source object when the user releases the mouse at the close of a drag operation.\r\n * @param ev The event.\r\n */\r\n ondragend: (this: this, ev: DragEvent) => any;\r\n /** \r\n * Fires on the target element when the user drags the object to a valid drop target.\r\n * @param ev The drag event.\r\n */\r\n ondragenter: (this: this, ev: DragEvent) => any;\r\n /** \r\n * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.\r\n * @param ev The drag event.\r\n */\r\n ondragleave: (this: this, ev: DragEvent) => any;\r\n /**\r\n * Fires on the target element continuously while the user drags the object over a valid drop target.\r\n * @param ev The event.\r\n */\r\n ondragover: (this: this, ev: DragEvent) => any;\r\n /**\r\n * Fires on the source object when the user starts to drag a text selection or selected object. \r\n * @param ev The event.\r\n */\r\n ondragstart: (this: this, ev: DragEvent) => any;\r\n ondrop: (this: this, ev: DragEvent) => any;\r\n /**\r\n * Occurs when the duration attribute is updated. \r\n * @param ev The event.\r\n */\r\n ondurationchange: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when the media element is reset to its initial state. \r\n * @param ev The event.\r\n */\r\n onemptied: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when the end of playback is reached. \r\n * @param ev The event\r\n */\r\n onended: (this: this, ev: MediaStreamErrorEvent) => any;\r\n /**\r\n * Fires when an error occurs during object loading.\r\n * @param ev The event.\r\n */\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n /**\r\n * Fires when the object receives focus. \r\n * @param ev The event.\r\n */\r\n onfocus: (this: this, ev: FocusEvent) => any;\r\n onfullscreenchange: (this: this, ev: Event) => any;\r\n onfullscreenerror: (this: this, ev: Event) => any;\r\n oninput: (this: this, ev: Event) => any;\r\n oninvalid: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the user presses a key.\r\n * @param ev The keyboard event\r\n */\r\n onkeydown: (this: this, ev: KeyboardEvent) => any;\r\n /**\r\n * Fires when the user presses an alphanumeric key.\r\n * @param ev The event.\r\n */\r\n onkeypress: (this: this, ev: KeyboardEvent) => any;\r\n /**\r\n * Fires when the user releases a key.\r\n * @param ev The keyboard event\r\n */\r\n onkeyup: (this: this, ev: KeyboardEvent) => any;\r\n /**\r\n * Fires immediately after the browser loads the object. \r\n * @param ev The event.\r\n */\r\n onload: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when media data is loaded at the current playback position. \r\n * @param ev The event.\r\n */\r\n onloadeddata: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when the duration and dimensions of the media have been determined.\r\n * @param ev The event.\r\n */\r\n onloadedmetadata: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when Internet Explorer begins looking for media data. \r\n * @param ev The event.\r\n */\r\n onloadstart: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the user clicks the object with either mouse button. \r\n * @param ev The mouse event.\r\n */\r\n onmousedown: (this: this, ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user moves the mouse over the object. \r\n * @param ev The mouse event.\r\n */\r\n onmousemove: (this: this, ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user moves the mouse pointer outside the boundaries of the object. \r\n * @param ev The mouse event.\r\n */\r\n onmouseout: (this: this, ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user moves the mouse pointer into the object.\r\n * @param ev The mouse event.\r\n */\r\n onmouseover: (this: this, ev: MouseEvent) => any;\r\n /**\r\n * Fires when the user releases a mouse button while the mouse is over the object. \r\n * @param ev The mouse event.\r\n */\r\n onmouseup: (this: this, ev: MouseEvent) => any;\r\n /**\r\n * Fires when the wheel button is rotated. \r\n * @param ev The mouse event\r\n */\r\n onmousewheel: (this: this, ev: WheelEvent) => any;\r\n onmscontentzoom: (this: this, ev: UIEvent) => any;\r\n onmsgesturechange: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturedoubletap: (this: this, ev: MSGestureEvent) => any;\r\n onmsgestureend: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturehold: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturestart: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturetap: (this: this, ev: MSGestureEvent) => any;\r\n onmsinertiastart: (this: this, ev: MSGestureEvent) => any;\r\n onmsmanipulationstatechanged: (this: this, ev: MSManipulationEvent) => any;\r\n onmspointercancel: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerdown: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerenter: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerleave: (this: this, ev: MSPointerEvent) => any;\r\n onmspointermove: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerout: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerover: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerup: (this: this, ev: MSPointerEvent) => any;\r\n /**\r\n * Occurs when an item is removed from a Jump List of a webpage running in Site Mode. \r\n * @param ev The event.\r\n */\r\n onmssitemodejumplistitemremoved: (this: this, ev: MSSiteModeEvent) => any;\r\n /**\r\n * Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode.\r\n * @param ev The event.\r\n */\r\n onmsthumbnailclick: (this: this, ev: MSSiteModeEvent) => any;\r\n /**\r\n * Occurs when playback is paused.\r\n * @param ev The event.\r\n */\r\n onpause: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when the play method is requested. \r\n * @param ev The event.\r\n */\r\n onplay: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when the audio or video has started playing. \r\n * @param ev The event.\r\n */\r\n onplaying: (this: this, ev: Event) => any;\r\n onpointerlockchange: (this: this, ev: Event) => any;\r\n onpointerlockerror: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs to indicate progress while downloading media data. \r\n * @param ev The event.\r\n */\r\n onprogress: (this: this, ev: ProgressEvent) => any;\r\n /**\r\n * Occurs when the playback rate is increased or decreased. \r\n * @param ev The event.\r\n */\r\n onratechange: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the state of the object has changed.\r\n * @param ev The event\r\n */\r\n onreadystatechange: (this: this, ev: ProgressEvent) => any;\r\n /**\r\n * Fires when the user resets a form. \r\n * @param ev The event.\r\n */\r\n onreset: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the user repositions the scroll box in the scroll bar on the object. \r\n * @param ev The event.\r\n */\r\n onscroll: (this: this, ev: UIEvent) => any;\r\n /**\r\n * Occurs when the seek operation ends. \r\n * @param ev The event.\r\n */\r\n onseeked: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when the current playback position is moved. \r\n * @param ev The event.\r\n */\r\n onseeking: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the current selection changes.\r\n * @param ev The event.\r\n */\r\n onselect: (this: this, ev: UIEvent) => any;\r\n /**\r\n * Fires when the selection state of a document changes.\r\n * @param ev The event.\r\n */\r\n onselectionchange: (this: this, ev: Event) => any;\r\n onselectstart: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when the download has stopped. \r\n * @param ev The event.\r\n */\r\n onstalled: (this: this, ev: Event) => any;\r\n /**\r\n * Fires when the user clicks the Stop button or leaves the Web page.\r\n * @param ev The event.\r\n */\r\n onstop: (this: this, ev: Event) => any;\r\n onsubmit: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs if the load operation has been intentionally halted. \r\n * @param ev The event.\r\n */\r\n onsuspend: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs to indicate the current playback position.\r\n * @param ev The event.\r\n */\r\n ontimeupdate: (this: this, ev: Event) => any;\r\n ontouchcancel: (ev: TouchEvent) => any;\r\n ontouchend: (ev: TouchEvent) => any;\r\n ontouchmove: (ev: TouchEvent) => any;\r\n ontouchstart: (ev: TouchEvent) => any;\r\n /**\r\n * Occurs when the volume is changed, or playback is muted or unmuted.\r\n * @param ev The event.\r\n */\r\n onvolumechange: (this: this, ev: Event) => any;\r\n /**\r\n * Occurs when playback stops because the next frame of a video resource is not available. \r\n * @param ev The event.\r\n */\r\n onwaiting: (this: this, ev: Event) => any;\r\n onwebkitfullscreenchange: (this: this, ev: Event) => any;\r\n onwebkitfullscreenerror: (this: this, ev: Event) => any;\r\n plugins: HTMLCollectionOf;\r\n readonly pointerLockElement: Element;\r\n /**\r\n * Retrieves a value that indicates the current state of the object.\r\n */\r\n readonly readyState: string;\r\n /**\r\n * Gets the URL of the location that referred the user to the current page.\r\n */\r\n readonly referrer: string;\r\n /**\r\n * Gets the root svg element in the document hierarchy.\r\n */\r\n readonly rootElement: SVGSVGElement;\r\n /**\r\n * Retrieves a collection of all script objects in the document.\r\n */\r\n scripts: HTMLCollectionOf;\r\n readonly scrollingElement: Element | null;\r\n /**\r\n * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.\r\n */\r\n readonly styleSheets: StyleSheetList;\r\n /**\r\n * Contains the title of the document.\r\n */\r\n title: string;\r\n readonly visibilityState: string;\r\n /** \r\n * Sets or gets the color of the links that the user has visited.\r\n */\r\n vlinkColor: string;\r\n readonly webkitCurrentFullScreenElement: Element | null;\r\n readonly webkitFullscreenElement: Element | null;\r\n readonly webkitFullscreenEnabled: boolean;\r\n readonly webkitIsFullScreen: boolean;\r\n readonly xmlEncoding: string | null;\r\n xmlStandalone: boolean;\r\n /**\r\n * Gets or sets the version attribute specified in the declaration of an XML document.\r\n */\r\n xmlVersion: string | null;\r\n adoptNode(source: Node): Node;\r\n captureEvents(): void;\r\n caretRangeFromPoint(x: number, y: number): Range;\r\n clear(): void;\r\n /**\r\n * Closes an output stream and forces the sent data to display.\r\n */\r\n close(): void;\r\n /**\r\n * Creates an attribute object with a specified name.\r\n * @param name String that sets the attribute object's name.\r\n */\r\n createAttribute(name: string): Attr;\r\n createAttributeNS(namespaceURI: string | null, qualifiedName: string): Attr;\r\n createCDATASection(data: string): CDATASection;\r\n /**\r\n * Creates a comment object with the specified data.\r\n * @param data Sets the comment object's data.\r\n */\r\n createComment(data: string): Comment;\r\n /**\r\n * Creates a new document.\r\n */\r\n createDocumentFragment(): DocumentFragment;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: \"a\"): HTMLAnchorElement;\r\n createElement(tagName: \"applet\"): HTMLAppletElement;\r\n createElement(tagName: \"area\"): HTMLAreaElement;\r\n createElement(tagName: \"audio\"): HTMLAudioElement;\r\n createElement(tagName: \"base\"): HTMLBaseElement;\r\n createElement(tagName: \"basefont\"): HTMLBaseFontElement;\r\n createElement(tagName: \"blockquote\"): HTMLQuoteElement;\r\n createElement(tagName: \"body\"): HTMLBodyElement;\r\n createElement(tagName: \"br\"): HTMLBRElement;\r\n createElement(tagName: \"button\"): HTMLButtonElement;\r\n createElement(tagName: \"canvas\"): HTMLCanvasElement;\r\n createElement(tagName: \"caption\"): HTMLTableCaptionElement;\r\n createElement(tagName: \"col\"): HTMLTableColElement;\r\n createElement(tagName: \"colgroup\"): HTMLTableColElement;\r\n createElement(tagName: \"datalist\"): HTMLDataListElement;\r\n createElement(tagName: \"del\"): HTMLModElement;\r\n createElement(tagName: \"dir\"): HTMLDirectoryElement;\r\n createElement(tagName: \"div\"): HTMLDivElement;\r\n createElement(tagName: \"dl\"): HTMLDListElement;\r\n createElement(tagName: \"embed\"): HTMLEmbedElement;\r\n createElement(tagName: \"fieldset\"): HTMLFieldSetElement;\r\n createElement(tagName: \"font\"): HTMLFontElement;\r\n createElement(tagName: \"form\"): HTMLFormElement;\r\n createElement(tagName: \"frame\"): HTMLFrameElement;\r\n createElement(tagName: \"frameset\"): HTMLFrameSetElement;\r\n createElement(tagName: \"h1\"): HTMLHeadingElement;\r\n createElement(tagName: \"h2\"): HTMLHeadingElement;\r\n createElement(tagName: \"h3\"): HTMLHeadingElement;\r\n createElement(tagName: \"h4\"): HTMLHeadingElement;\r\n createElement(tagName: \"h5\"): HTMLHeadingElement;\r\n createElement(tagName: \"h6\"): HTMLHeadingElement;\r\n createElement(tagName: \"head\"): HTMLHeadElement;\r\n createElement(tagName: \"hr\"): HTMLHRElement;\r\n createElement(tagName: \"html\"): HTMLHtmlElement;\r\n createElement(tagName: \"iframe\"): HTMLIFrameElement;\r\n createElement(tagName: \"img\"): HTMLImageElement;\r\n createElement(tagName: \"input\"): HTMLInputElement;\r\n createElement(tagName: \"ins\"): HTMLModElement;\r\n createElement(tagName: \"isindex\"): HTMLUnknownElement;\r\n createElement(tagName: \"label\"): HTMLLabelElement;\r\n createElement(tagName: \"legend\"): HTMLLegendElement;\r\n createElement(tagName: \"li\"): HTMLLIElement;\r\n createElement(tagName: \"link\"): HTMLLinkElement;\r\n createElement(tagName: \"listing\"): HTMLPreElement;\r\n createElement(tagName: \"map\"): HTMLMapElement;\r\n createElement(tagName: \"marquee\"): HTMLMarqueeElement;\r\n createElement(tagName: \"menu\"): HTMLMenuElement;\r\n createElement(tagName: \"meta\"): HTMLMetaElement;\r\n createElement(tagName: \"meter\"): HTMLMeterElement;\r\n createElement(tagName: \"nextid\"): HTMLUnknownElement;\r\n createElement(tagName: \"object\"): HTMLObjectElement;\r\n createElement(tagName: \"ol\"): HTMLOListElement;\r\n createElement(tagName: \"optgroup\"): HTMLOptGroupElement;\r\n createElement(tagName: \"option\"): HTMLOptionElement;\r\n createElement(tagName: \"p\"): HTMLParagraphElement;\r\n createElement(tagName: \"param\"): HTMLParamElement;\r\n createElement(tagName: \"picture\"): HTMLPictureElement;\r\n createElement(tagName: \"pre\"): HTMLPreElement;\r\n createElement(tagName: \"progress\"): HTMLProgressElement;\r\n createElement(tagName: \"q\"): HTMLQuoteElement;\r\n createElement(tagName: \"script\"): HTMLScriptElement;\r\n createElement(tagName: \"select\"): HTMLSelectElement;\r\n createElement(tagName: \"source\"): HTMLSourceElement;\r\n createElement(tagName: \"span\"): HTMLSpanElement;\r\n createElement(tagName: \"style\"): HTMLStyleElement;\r\n createElement(tagName: \"table\"): HTMLTableElement;\r\n createElement(tagName: \"tbody\"): HTMLTableSectionElement;\r\n createElement(tagName: \"td\"): HTMLTableDataCellElement;\r\n createElement(tagName: \"template\"): HTMLTemplateElement;\r\n createElement(tagName: \"textarea\"): HTMLTextAreaElement;\r\n createElement(tagName: \"tfoot\"): HTMLTableSectionElement;\r\n createElement(tagName: \"th\"): HTMLTableHeaderCellElement;\r\n createElement(tagName: \"thead\"): HTMLTableSectionElement;\r\n createElement(tagName: \"title\"): HTMLTitleElement;\r\n createElement(tagName: \"tr\"): HTMLTableRowElement;\r\n createElement(tagName: \"track\"): HTMLTrackElement;\r\n createElement(tagName: \"ul\"): HTMLUListElement;\r\n createElement(tagName: \"video\"): HTMLVideoElement;\r\n createElement(tagName: \"x-ms-webview\"): MSHTMLWebViewElement;\r\n createElement(tagName: \"xmp\"): HTMLPreElement;\r\n createElement(tagName: string): HTMLElement;\r\n createElementNS(namespaceURI: \"http://www.w3.org/1999/xhtml\", qualifiedName: string): HTMLElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"a\"): SVGAElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"circle\"): SVGCircleElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"clipPath\"): SVGClipPathElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"componentTransferFunction\"): SVGComponentTransferFunctionElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"defs\"): SVGDefsElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"desc\"): SVGDescElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"ellipse\"): SVGEllipseElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feBlend\"): SVGFEBlendElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feColorMatrix\"): SVGFEColorMatrixElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feComponentTransfer\"): SVGFEComponentTransferElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feComposite\"): SVGFECompositeElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feConvolveMatrix\"): SVGFEConvolveMatrixElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feDiffuseLighting\"): SVGFEDiffuseLightingElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feDisplacementMap\"): SVGFEDisplacementMapElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feDistantLight\"): SVGFEDistantLightElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFlood\"): SVGFEFloodElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncA\"): SVGFEFuncAElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncB\"): SVGFEFuncBElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncG\"): SVGFEFuncGElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feFuncR\"): SVGFEFuncRElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feGaussianBlur\"): SVGFEGaussianBlurElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feImage\"): SVGFEImageElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feMerge\"): SVGFEMergeElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feMergeNode\"): SVGFEMergeNodeElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feMorphology\"): SVGFEMorphologyElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feOffset\"): SVGFEOffsetElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"fePointLight\"): SVGFEPointLightElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feSpecularLighting\"): SVGFESpecularLightingElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feSpotLight\"): SVGFESpotLightElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feTile\"): SVGFETileElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"feTurbulence\"): SVGFETurbulenceElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"filter\"): SVGFilterElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"foreignObject\"): SVGForeignObjectElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"g\"): SVGGElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"image\"): SVGImageElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"gradient\"): SVGGradientElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"line\"): SVGLineElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"linearGradient\"): SVGLinearGradientElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"marker\"): SVGMarkerElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"mask\"): SVGMaskElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"path\"): SVGPathElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"metadata\"): SVGMetadataElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"pattern\"): SVGPatternElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"polygon\"): SVGPolygonElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"polyline\"): SVGPolylineElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"radialGradient\"): SVGRadialGradientElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"rect\"): SVGRectElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"svg\"): SVGSVGElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"script\"): SVGScriptElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"stop\"): SVGStopElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"style\"): SVGStyleElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"switch\"): SVGSwitchElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"symbol\"): SVGSymbolElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"tspan\"): SVGTSpanElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"textContent\"): SVGTextContentElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"text\"): SVGTextElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"textPath\"): SVGTextPathElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"textPositioning\"): SVGTextPositioningElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"title\"): SVGTitleElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"use\"): SVGUseElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: \"view\"): SVGViewElement\r\n createElementNS(namespaceURI: \"http://www.w3.org/2000/svg\", qualifiedName: string): SVGElement\r\n createElementNS(namespaceURI: string | null, qualifiedName: string): Element;\r\n createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;\r\n createNSResolver(nodeResolver: Node): XPathNSResolver;\r\n /**\r\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document. \r\n * @param root The root element or node to start traversing on.\r\n * @param whatToShow The type of nodes or elements to appear in the node list\r\n * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter.\r\n * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.\r\n */\r\n createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): NodeIterator;\r\n createProcessingInstruction(target: string, data: string): ProcessingInstruction;\r\n /**\r\n * Returns an empty range object that has both of its boundary points positioned at the beginning of the document. \r\n */\r\n createRange(): Range;\r\n /**\r\n * Creates a text string from the specified value. \r\n * @param data String that specifies the nodeValue property of the text node.\r\n */\r\n createTextNode(data: string): Text;\r\n createTouch(view: Window, target: EventTarget, identifier: number, pageX: number, pageY: number, screenX: number, screenY: number): Touch;\r\n createTouchList(...touches: Touch[]): TouchList;\r\n /**\r\n * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.\r\n * @param root The root element or node to start traversing on.\r\n * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow.\r\n * @param filter A custom NodeFilter function to use.\r\n * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.\r\n */\r\n createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): TreeWalker;\r\n /**\r\n * Returns the element for the specified x coordinate and the specified y coordinate. \r\n * @param x The x-offset\r\n * @param y The y-offset\r\n */\r\n elementFromPoint(x: number, y: number): Element;\r\n evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver, type: number, result: XPathResult): XPathResult;\r\n /**\r\n * Executes a command on the current document, current selection, or the given range.\r\n * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.\r\n * @param showUI Display the user interface, defaults to false.\r\n * @param value Value to assign.\r\n */\r\n execCommand(commandId: string, showUI?: boolean, value?: any): boolean;\r\n /**\r\n * Displays help information for the given command identifier.\r\n * @param commandId Displays help information for the given command identifier.\r\n */\r\n execCommandShowHelp(commandId: string): boolean;\r\n exitFullscreen(): void;\r\n exitPointerLock(): void;\r\n /**\r\n * Causes the element to receive the focus and executes the code specified by the onfocus event.\r\n */\r\n focus(): void;\r\n /**\r\n * Returns a reference to the first object with the specified value of the ID or NAME attribute.\r\n * @param elementId String that specifies the ID value. Case-insensitive.\r\n */\r\n getElementById(elementId: string): HTMLElement | null;\r\n getElementsByClassName(classNames: string): HTMLCollectionOf;\r\n /**\r\n * Gets a collection of objects based on the value of the NAME or ID attribute.\r\n * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.\r\n */\r\n getElementsByName(elementName: string): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(tagname: \"a\"): NodeListOf;\r\n getElementsByTagName(tagname: \"abbr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"acronym\"): NodeListOf;\r\n getElementsByTagName(tagname: \"address\"): NodeListOf;\r\n getElementsByTagName(tagname: \"applet\"): NodeListOf;\r\n getElementsByTagName(tagname: \"area\"): NodeListOf;\r\n getElementsByTagName(tagname: \"article\"): NodeListOf;\r\n getElementsByTagName(tagname: \"aside\"): NodeListOf;\r\n getElementsByTagName(tagname: \"audio\"): NodeListOf;\r\n getElementsByTagName(tagname: \"b\"): NodeListOf;\r\n getElementsByTagName(tagname: \"base\"): NodeListOf;\r\n getElementsByTagName(tagname: \"basefont\"): NodeListOf;\r\n getElementsByTagName(tagname: \"bdo\"): NodeListOf;\r\n getElementsByTagName(tagname: \"big\"): NodeListOf;\r\n getElementsByTagName(tagname: \"blockquote\"): NodeListOf;\r\n getElementsByTagName(tagname: \"body\"): NodeListOf;\r\n getElementsByTagName(tagname: \"br\"): NodeListOf;\r\n getElementsByTagName(tagname: \"button\"): NodeListOf;\r\n getElementsByTagName(tagname: \"canvas\"): NodeListOf;\r\n getElementsByTagName(tagname: \"caption\"): NodeListOf;\r\n getElementsByTagName(tagname: \"center\"): NodeListOf;\r\n getElementsByTagName(tagname: \"circle\"): NodeListOf;\r\n getElementsByTagName(tagname: \"cite\"): NodeListOf;\r\n getElementsByTagName(tagname: \"clippath\"): NodeListOf;\r\n getElementsByTagName(tagname: \"code\"): NodeListOf;\r\n getElementsByTagName(tagname: \"col\"): NodeListOf;\r\n getElementsByTagName(tagname: \"colgroup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"datalist\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dd\"): NodeListOf;\r\n getElementsByTagName(tagname: \"defs\"): NodeListOf;\r\n getElementsByTagName(tagname: \"del\"): NodeListOf;\r\n getElementsByTagName(tagname: \"desc\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dfn\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dir\"): NodeListOf;\r\n getElementsByTagName(tagname: \"div\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dl\"): NodeListOf;\r\n getElementsByTagName(tagname: \"dt\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ellipse\"): NodeListOf;\r\n getElementsByTagName(tagname: \"em\"): NodeListOf;\r\n getElementsByTagName(tagname: \"embed\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feblend\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fecolormatrix\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fecomponenttransfer\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fecomposite\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feconvolvematrix\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fediffuselighting\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fedisplacementmap\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fedistantlight\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feflood\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefunca\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefuncb\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefuncg\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fefuncr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fegaussianblur\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feimage\"): NodeListOf;\r\n getElementsByTagName(tagname: \"femerge\"): NodeListOf;\r\n getElementsByTagName(tagname: \"femergenode\"): NodeListOf;\r\n getElementsByTagName(tagname: \"femorphology\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feoffset\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fepointlight\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fespecularlighting\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fespotlight\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fetile\"): NodeListOf;\r\n getElementsByTagName(tagname: \"feturbulence\"): NodeListOf;\r\n getElementsByTagName(tagname: \"fieldset\"): NodeListOf;\r\n getElementsByTagName(tagname: \"figcaption\"): NodeListOf;\r\n getElementsByTagName(tagname: \"figure\"): NodeListOf;\r\n getElementsByTagName(tagname: \"filter\"): NodeListOf;\r\n getElementsByTagName(tagname: \"font\"): NodeListOf;\r\n getElementsByTagName(tagname: \"footer\"): NodeListOf;\r\n getElementsByTagName(tagname: \"foreignobject\"): NodeListOf;\r\n getElementsByTagName(tagname: \"form\"): NodeListOf;\r\n getElementsByTagName(tagname: \"frame\"): NodeListOf;\r\n getElementsByTagName(tagname: \"frameset\"): NodeListOf;\r\n getElementsByTagName(tagname: \"g\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h1\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h2\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h3\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h4\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h5\"): NodeListOf;\r\n getElementsByTagName(tagname: \"h6\"): NodeListOf;\r\n getElementsByTagName(tagname: \"head\"): NodeListOf;\r\n getElementsByTagName(tagname: \"header\"): NodeListOf;\r\n getElementsByTagName(tagname: \"hgroup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"hr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"html\"): NodeListOf;\r\n getElementsByTagName(tagname: \"i\"): NodeListOf;\r\n getElementsByTagName(tagname: \"iframe\"): NodeListOf;\r\n getElementsByTagName(tagname: \"image\"): NodeListOf;\r\n getElementsByTagName(tagname: \"img\"): NodeListOf;\r\n getElementsByTagName(tagname: \"input\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ins\"): NodeListOf;\r\n getElementsByTagName(tagname: \"isindex\"): NodeListOf;\r\n getElementsByTagName(tagname: \"kbd\"): NodeListOf;\r\n getElementsByTagName(tagname: \"keygen\"): NodeListOf;\r\n getElementsByTagName(tagname: \"label\"): NodeListOf;\r\n getElementsByTagName(tagname: \"legend\"): NodeListOf;\r\n getElementsByTagName(tagname: \"li\"): NodeListOf;\r\n getElementsByTagName(tagname: \"line\"): NodeListOf;\r\n getElementsByTagName(tagname: \"lineargradient\"): NodeListOf;\r\n getElementsByTagName(tagname: \"link\"): NodeListOf;\r\n getElementsByTagName(tagname: \"listing\"): NodeListOf;\r\n getElementsByTagName(tagname: \"map\"): NodeListOf;\r\n getElementsByTagName(tagname: \"mark\"): NodeListOf;\r\n getElementsByTagName(tagname: \"marker\"): NodeListOf;\r\n getElementsByTagName(tagname: \"marquee\"): NodeListOf;\r\n getElementsByTagName(tagname: \"mask\"): NodeListOf;\r\n getElementsByTagName(tagname: \"menu\"): NodeListOf;\r\n getElementsByTagName(tagname: \"meta\"): NodeListOf;\r\n getElementsByTagName(tagname: \"metadata\"): NodeListOf;\r\n getElementsByTagName(tagname: \"meter\"): NodeListOf;\r\n getElementsByTagName(tagname: \"nav\"): NodeListOf;\r\n getElementsByTagName(tagname: \"nextid\"): NodeListOf;\r\n getElementsByTagName(tagname: \"nobr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"noframes\"): NodeListOf;\r\n getElementsByTagName(tagname: \"noscript\"): NodeListOf;\r\n getElementsByTagName(tagname: \"object\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ol\"): NodeListOf;\r\n getElementsByTagName(tagname: \"optgroup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"option\"): NodeListOf;\r\n getElementsByTagName(tagname: \"p\"): NodeListOf;\r\n getElementsByTagName(tagname: \"param\"): NodeListOf;\r\n getElementsByTagName(tagname: \"path\"): NodeListOf;\r\n getElementsByTagName(tagname: \"pattern\"): NodeListOf;\r\n getElementsByTagName(tagname: \"picture\"): NodeListOf;\r\n getElementsByTagName(tagname: \"plaintext\"): NodeListOf;\r\n getElementsByTagName(tagname: \"polygon\"): NodeListOf;\r\n getElementsByTagName(tagname: \"polyline\"): NodeListOf;\r\n getElementsByTagName(tagname: \"pre\"): NodeListOf;\r\n getElementsByTagName(tagname: \"progress\"): NodeListOf;\r\n getElementsByTagName(tagname: \"q\"): NodeListOf;\r\n getElementsByTagName(tagname: \"radialgradient\"): NodeListOf;\r\n getElementsByTagName(tagname: \"rect\"): NodeListOf;\r\n getElementsByTagName(tagname: \"rt\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ruby\"): NodeListOf;\r\n getElementsByTagName(tagname: \"s\"): NodeListOf;\r\n getElementsByTagName(tagname: \"samp\"): NodeListOf;\r\n getElementsByTagName(tagname: \"script\"): NodeListOf;\r\n getElementsByTagName(tagname: \"section\"): NodeListOf;\r\n getElementsByTagName(tagname: \"select\"): NodeListOf;\r\n getElementsByTagName(tagname: \"small\"): NodeListOf;\r\n getElementsByTagName(tagname: \"source\"): NodeListOf;\r\n getElementsByTagName(tagname: \"span\"): NodeListOf;\r\n getElementsByTagName(tagname: \"stop\"): NodeListOf;\r\n getElementsByTagName(tagname: \"strike\"): NodeListOf;\r\n getElementsByTagName(tagname: \"strong\"): NodeListOf;\r\n getElementsByTagName(tagname: \"style\"): NodeListOf;\r\n getElementsByTagName(tagname: \"sub\"): NodeListOf;\r\n getElementsByTagName(tagname: \"sup\"): NodeListOf;\r\n getElementsByTagName(tagname: \"svg\"): NodeListOf;\r\n getElementsByTagName(tagname: \"switch\"): NodeListOf;\r\n getElementsByTagName(tagname: \"symbol\"): NodeListOf;\r\n getElementsByTagName(tagname: \"table\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tbody\"): NodeListOf;\r\n getElementsByTagName(tagname: \"td\"): NodeListOf;\r\n getElementsByTagName(tagname: \"template\"): NodeListOf;\r\n getElementsByTagName(tagname: \"text\"): NodeListOf;\r\n getElementsByTagName(tagname: \"textpath\"): NodeListOf;\r\n getElementsByTagName(tagname: \"textarea\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tfoot\"): NodeListOf;\r\n getElementsByTagName(tagname: \"th\"): NodeListOf;\r\n getElementsByTagName(tagname: \"thead\"): NodeListOf;\r\n getElementsByTagName(tagname: \"title\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"track\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tspan\"): NodeListOf;\r\n getElementsByTagName(tagname: \"tt\"): NodeListOf;\r\n getElementsByTagName(tagname: \"u\"): NodeListOf;\r\n getElementsByTagName(tagname: \"ul\"): NodeListOf;\r\n getElementsByTagName(tagname: \"use\"): NodeListOf;\r\n getElementsByTagName(tagname: \"var\"): NodeListOf;\r\n getElementsByTagName(tagname: \"video\"): NodeListOf;\r\n getElementsByTagName(tagname: \"view\"): NodeListOf;\r\n getElementsByTagName(tagname: \"wbr\"): NodeListOf;\r\n getElementsByTagName(tagname: \"x-ms-webview\"): NodeListOf;\r\n getElementsByTagName(tagname: \"xmp\"): NodeListOf;\r\n getElementsByTagName(tagname: string): NodeListOf;\r\n getElementsByTagNameNS(namespaceURI: \"http://www.w3.org/1999/xhtml\", localName: string): HTMLCollectionOf;\r\n getElementsByTagNameNS(namespaceURI: \"http://www.w3.org/2000/svg\", localName: string): HTMLCollectionOf;\r\n getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf;\r\n /**\r\n * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.\r\n */\r\n getSelection(): Selection;\r\n /**\r\n * Gets a value indicating whether the object currently has focus.\r\n */\r\n hasFocus(): boolean;\r\n importNode(importedNode: Node, deep: boolean): Node;\r\n msElementsFromPoint(x: number, y: number): NodeListOf;\r\n msElementsFromRect(left: number, top: number, width: number, height: number): NodeListOf;\r\n /**\r\n * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.\r\n * @param url Specifies a MIME type for the document.\r\n * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.\r\n * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, \"fullscreen=yes, toolbar=yes\"). The following values are supported.\r\n * @param replace Specifies whether the existing entry for the document is replaced in the history list.\r\n */\r\n open(url?: string, name?: string, features?: string, replace?: boolean): Document;\r\n /** \r\n * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.\r\n * @param commandId Specifies a command identifier.\r\n */\r\n queryCommandEnabled(commandId: string): boolean;\r\n /**\r\n * Returns a Boolean value that indicates whether the specified command is in the indeterminate state.\r\n * @param commandId String that specifies a command identifier.\r\n */\r\n queryCommandIndeterm(commandId: string): boolean;\r\n /**\r\n * Returns a Boolean value that indicates the current state of the command.\r\n * @param commandId String that specifies a command identifier.\r\n */\r\n queryCommandState(commandId: string): boolean;\r\n /**\r\n * Returns a Boolean value that indicates whether the current command is supported on the current range.\r\n * @param commandId Specifies a command identifier.\r\n */\r\n queryCommandSupported(commandId: string): boolean;\r\n /**\r\n * Retrieves the string associated with a command.\r\n * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers. \r\n */\r\n queryCommandText(commandId: string): string;\r\n /**\r\n * Returns the current value of the document, range, or current selection for the given command.\r\n * @param commandId String that specifies a command identifier.\r\n */\r\n queryCommandValue(commandId: string): string;\r\n releaseEvents(): void;\r\n /**\r\n * Allows updating the print settings for the page.\r\n */\r\n updateSettings(): void;\r\n webkitCancelFullScreen(): void;\r\n webkitExitFullscreen(): void;\r\n /**\r\n * Writes one or more HTML expressions to a document in the specified window. \r\n * @param content Specifies the text and HTML tags to write.\r\n */\r\n write(...content: string[]): void;\r\n /**\r\n * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window. \r\n * @param content The text and HTML tags to write.\r\n */\r\n writeln(...content: string[]): void;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"fullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"fullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mssitemodejumplistitemremoved\", listener: (this: this, ev: MSSiteModeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"msthumbnailclick\", listener: (this: this, ev: MSSiteModeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerlockchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerlockerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"readystatechange\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectionchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stop\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Document: {\r\n prototype: Document;\r\n new(): Document;\r\n}\r\n\r\ninterface DocumentFragment extends Node, NodeSelector, ParentNode {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var DocumentFragment: {\r\n prototype: DocumentFragment;\r\n new(): DocumentFragment;\r\n}\r\n\r\ninterface DocumentType extends Node, ChildNode {\r\n readonly entities: NamedNodeMap;\r\n readonly internalSubset: string | null;\r\n readonly name: string;\r\n readonly notations: NamedNodeMap;\r\n readonly publicId: string | null;\r\n readonly systemId: string | null;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var DocumentType: {\r\n prototype: DocumentType;\r\n new(): DocumentType;\r\n}\r\n\r\ninterface DragEvent extends MouseEvent {\r\n readonly dataTransfer: DataTransfer;\r\n initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void;\r\n msConvertURL(file: File, targetType: string, targetURL?: string): void;\r\n}\r\n\r\ndeclare var DragEvent: {\r\n prototype: DragEvent;\r\n new(): DragEvent;\r\n}\r\n\r\ninterface DynamicsCompressorNode extends AudioNode {\r\n readonly attack: AudioParam;\r\n readonly knee: AudioParam;\r\n readonly ratio: AudioParam;\r\n readonly reduction: AudioParam;\r\n readonly release: AudioParam;\r\n readonly threshold: AudioParam;\r\n}\r\n\r\ndeclare var DynamicsCompressorNode: {\r\n prototype: DynamicsCompressorNode;\r\n new(): DynamicsCompressorNode;\r\n}\r\n\r\ninterface EXT_frag_depth {\r\n}\r\n\r\ndeclare var EXT_frag_depth: {\r\n prototype: EXT_frag_depth;\r\n new(): EXT_frag_depth;\r\n}\r\n\r\ninterface EXT_texture_filter_anisotropic {\r\n readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n readonly TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n}\r\n\r\ndeclare var EXT_texture_filter_anisotropic: {\r\n prototype: EXT_texture_filter_anisotropic;\r\n new(): EXT_texture_filter_anisotropic;\r\n readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n readonly TEXTURE_MAX_ANISOTROPY_EXT: number;\r\n}\r\n\r\ninterface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelector, ChildNode, ParentNode {\r\n readonly classList: DOMTokenList;\r\n className: string;\r\n readonly clientHeight: number;\r\n readonly clientLeft: number;\r\n readonly clientTop: number;\r\n readonly clientWidth: number;\r\n id: string;\r\n msContentZoomFactor: number;\r\n readonly msRegionOverflow: string;\r\n onariarequest: (this: this, ev: AriaRequestEvent) => any;\r\n oncommand: (this: this, ev: CommandEvent) => any;\r\n ongotpointercapture: (this: this, ev: PointerEvent) => any;\r\n onlostpointercapture: (this: this, ev: PointerEvent) => any;\r\n onmsgesturechange: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturedoubletap: (this: this, ev: MSGestureEvent) => any;\r\n onmsgestureend: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturehold: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturestart: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturetap: (this: this, ev: MSGestureEvent) => any;\r\n onmsgotpointercapture: (this: this, ev: MSPointerEvent) => any;\r\n onmsinertiastart: (this: this, ev: MSGestureEvent) => any;\r\n onmslostpointercapture: (this: this, ev: MSPointerEvent) => any;\r\n onmspointercancel: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerdown: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerenter: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerleave: (this: this, ev: MSPointerEvent) => any;\r\n onmspointermove: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerout: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerover: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerup: (this: this, ev: MSPointerEvent) => any;\r\n ontouchcancel: (ev: TouchEvent) => any;\r\n ontouchend: (ev: TouchEvent) => any;\r\n ontouchmove: (ev: TouchEvent) => any;\r\n ontouchstart: (ev: TouchEvent) => any;\r\n onwebkitfullscreenchange: (this: this, ev: Event) => any;\r\n onwebkitfullscreenerror: (this: this, ev: Event) => any;\r\n readonly prefix: string | null;\r\n readonly scrollHeight: number;\r\n scrollLeft: number;\r\n scrollTop: number;\r\n readonly scrollWidth: number;\r\n readonly tagName: string;\r\n innerHTML: string;\r\n getAttribute(name: string): string | null;\r\n getAttributeNS(namespaceURI: string, localName: string): string;\r\n getAttributeNode(name: string): Attr;\r\n getAttributeNodeNS(namespaceURI: string, localName: string): Attr;\r\n getBoundingClientRect(): ClientRect;\r\n getClientRects(): ClientRectList;\r\n getElementsByTagName(name: \"a\"): NodeListOf;\r\n getElementsByTagName(name: \"abbr\"): NodeListOf;\r\n getElementsByTagName(name: \"acronym\"): NodeListOf;\r\n getElementsByTagName(name: \"address\"): NodeListOf;\r\n getElementsByTagName(name: \"applet\"): NodeListOf;\r\n getElementsByTagName(name: \"area\"): NodeListOf;\r\n getElementsByTagName(name: \"article\"): NodeListOf;\r\n getElementsByTagName(name: \"aside\"): NodeListOf;\r\n getElementsByTagName(name: \"audio\"): NodeListOf;\r\n getElementsByTagName(name: \"b\"): NodeListOf;\r\n getElementsByTagName(name: \"base\"): NodeListOf;\r\n getElementsByTagName(name: \"basefont\"): NodeListOf;\r\n getElementsByTagName(name: \"bdo\"): NodeListOf;\r\n getElementsByTagName(name: \"big\"): NodeListOf;\r\n getElementsByTagName(name: \"blockquote\"): NodeListOf;\r\n getElementsByTagName(name: \"body\"): NodeListOf;\r\n getElementsByTagName(name: \"br\"): NodeListOf;\r\n getElementsByTagName(name: \"button\"): NodeListOf;\r\n getElementsByTagName(name: \"canvas\"): NodeListOf;\r\n getElementsByTagName(name: \"caption\"): NodeListOf;\r\n getElementsByTagName(name: \"center\"): NodeListOf;\r\n getElementsByTagName(name: \"circle\"): NodeListOf;\r\n getElementsByTagName(name: \"cite\"): NodeListOf;\r\n getElementsByTagName(name: \"clippath\"): NodeListOf;\r\n getElementsByTagName(name: \"code\"): NodeListOf;\r\n getElementsByTagName(name: \"col\"): NodeListOf;\r\n getElementsByTagName(name: \"colgroup\"): NodeListOf;\r\n getElementsByTagName(name: \"datalist\"): NodeListOf;\r\n getElementsByTagName(name: \"dd\"): NodeListOf;\r\n getElementsByTagName(name: \"defs\"): NodeListOf;\r\n getElementsByTagName(name: \"del\"): NodeListOf;\r\n getElementsByTagName(name: \"desc\"): NodeListOf;\r\n getElementsByTagName(name: \"dfn\"): NodeListOf;\r\n getElementsByTagName(name: \"dir\"): NodeListOf;\r\n getElementsByTagName(name: \"div\"): NodeListOf;\r\n getElementsByTagName(name: \"dl\"): NodeListOf;\r\n getElementsByTagName(name: \"dt\"): NodeListOf;\r\n getElementsByTagName(name: \"ellipse\"): NodeListOf;\r\n getElementsByTagName(name: \"em\"): NodeListOf;\r\n getElementsByTagName(name: \"embed\"): NodeListOf;\r\n getElementsByTagName(name: \"feblend\"): NodeListOf;\r\n getElementsByTagName(name: \"fecolormatrix\"): NodeListOf;\r\n getElementsByTagName(name: \"fecomponenttransfer\"): NodeListOf;\r\n getElementsByTagName(name: \"fecomposite\"): NodeListOf;\r\n getElementsByTagName(name: \"feconvolvematrix\"): NodeListOf;\r\n getElementsByTagName(name: \"fediffuselighting\"): NodeListOf;\r\n getElementsByTagName(name: \"fedisplacementmap\"): NodeListOf;\r\n getElementsByTagName(name: \"fedistantlight\"): NodeListOf;\r\n getElementsByTagName(name: \"feflood\"): NodeListOf;\r\n getElementsByTagName(name: \"fefunca\"): NodeListOf;\r\n getElementsByTagName(name: \"fefuncb\"): NodeListOf;\r\n getElementsByTagName(name: \"fefuncg\"): NodeListOf;\r\n getElementsByTagName(name: \"fefuncr\"): NodeListOf;\r\n getElementsByTagName(name: \"fegaussianblur\"): NodeListOf;\r\n getElementsByTagName(name: \"feimage\"): NodeListOf;\r\n getElementsByTagName(name: \"femerge\"): NodeListOf;\r\n getElementsByTagName(name: \"femergenode\"): NodeListOf;\r\n getElementsByTagName(name: \"femorphology\"): NodeListOf;\r\n getElementsByTagName(name: \"feoffset\"): NodeListOf;\r\n getElementsByTagName(name: \"fepointlight\"): NodeListOf;\r\n getElementsByTagName(name: \"fespecularlighting\"): NodeListOf;\r\n getElementsByTagName(name: \"fespotlight\"): NodeListOf;\r\n getElementsByTagName(name: \"fetile\"): NodeListOf;\r\n getElementsByTagName(name: \"feturbulence\"): NodeListOf;\r\n getElementsByTagName(name: \"fieldset\"): NodeListOf;\r\n getElementsByTagName(name: \"figcaption\"): NodeListOf;\r\n getElementsByTagName(name: \"figure\"): NodeListOf;\r\n getElementsByTagName(name: \"filter\"): NodeListOf;\r\n getElementsByTagName(name: \"font\"): NodeListOf;\r\n getElementsByTagName(name: \"footer\"): NodeListOf;\r\n getElementsByTagName(name: \"foreignobject\"): NodeListOf;\r\n getElementsByTagName(name: \"form\"): NodeListOf;\r\n getElementsByTagName(name: \"frame\"): NodeListOf;\r\n getElementsByTagName(name: \"frameset\"): NodeListOf;\r\n getElementsByTagName(name: \"g\"): NodeListOf;\r\n getElementsByTagName(name: \"h1\"): NodeListOf;\r\n getElementsByTagName(name: \"h2\"): NodeListOf;\r\n getElementsByTagName(name: \"h3\"): NodeListOf;\r\n getElementsByTagName(name: \"h4\"): NodeListOf;\r\n getElementsByTagName(name: \"h5\"): NodeListOf;\r\n getElementsByTagName(name: \"h6\"): NodeListOf;\r\n getElementsByTagName(name: \"head\"): NodeListOf;\r\n getElementsByTagName(name: \"header\"): NodeListOf;\r\n getElementsByTagName(name: \"hgroup\"): NodeListOf;\r\n getElementsByTagName(name: \"hr\"): NodeListOf;\r\n getElementsByTagName(name: \"html\"): NodeListOf;\r\n getElementsByTagName(name: \"i\"): NodeListOf;\r\n getElementsByTagName(name: \"iframe\"): NodeListOf;\r\n getElementsByTagName(name: \"image\"): NodeListOf;\r\n getElementsByTagName(name: \"img\"): NodeListOf;\r\n getElementsByTagName(name: \"input\"): NodeListOf;\r\n getElementsByTagName(name: \"ins\"): NodeListOf;\r\n getElementsByTagName(name: \"isindex\"): NodeListOf;\r\n getElementsByTagName(name: \"kbd\"): NodeListOf;\r\n getElementsByTagName(name: \"keygen\"): NodeListOf;\r\n getElementsByTagName(name: \"label\"): NodeListOf;\r\n getElementsByTagName(name: \"legend\"): NodeListOf;\r\n getElementsByTagName(name: \"li\"): NodeListOf;\r\n getElementsByTagName(name: \"line\"): NodeListOf;\r\n getElementsByTagName(name: \"lineargradient\"): NodeListOf;\r\n getElementsByTagName(name: \"link\"): NodeListOf;\r\n getElementsByTagName(name: \"listing\"): NodeListOf;\r\n getElementsByTagName(name: \"map\"): NodeListOf;\r\n getElementsByTagName(name: \"mark\"): NodeListOf;\r\n getElementsByTagName(name: \"marker\"): NodeListOf;\r\n getElementsByTagName(name: \"marquee\"): NodeListOf;\r\n getElementsByTagName(name: \"mask\"): NodeListOf;\r\n getElementsByTagName(name: \"menu\"): NodeListOf;\r\n getElementsByTagName(name: \"meta\"): NodeListOf;\r\n getElementsByTagName(name: \"metadata\"): NodeListOf;\r\n getElementsByTagName(name: \"meter\"): NodeListOf;\r\n getElementsByTagName(name: \"nav\"): NodeListOf;\r\n getElementsByTagName(name: \"nextid\"): NodeListOf;\r\n getElementsByTagName(name: \"nobr\"): NodeListOf;\r\n getElementsByTagName(name: \"noframes\"): NodeListOf;\r\n getElementsByTagName(name: \"noscript\"): NodeListOf;\r\n getElementsByTagName(name: \"object\"): NodeListOf;\r\n getElementsByTagName(name: \"ol\"): NodeListOf;\r\n getElementsByTagName(name: \"optgroup\"): NodeListOf;\r\n getElementsByTagName(name: \"option\"): NodeListOf;\r\n getElementsByTagName(name: \"p\"): NodeListOf;\r\n getElementsByTagName(name: \"param\"): NodeListOf;\r\n getElementsByTagName(name: \"path\"): NodeListOf;\r\n getElementsByTagName(name: \"pattern\"): NodeListOf;\r\n getElementsByTagName(name: \"picture\"): NodeListOf;\r\n getElementsByTagName(name: \"plaintext\"): NodeListOf;\r\n getElementsByTagName(name: \"polygon\"): NodeListOf;\r\n getElementsByTagName(name: \"polyline\"): NodeListOf;\r\n getElementsByTagName(name: \"pre\"): NodeListOf;\r\n getElementsByTagName(name: \"progress\"): NodeListOf;\r\n getElementsByTagName(name: \"q\"): NodeListOf;\r\n getElementsByTagName(name: \"radialgradient\"): NodeListOf;\r\n getElementsByTagName(name: \"rect\"): NodeListOf;\r\n getElementsByTagName(name: \"rt\"): NodeListOf;\r\n getElementsByTagName(name: \"ruby\"): NodeListOf;\r\n getElementsByTagName(name: \"s\"): NodeListOf;\r\n getElementsByTagName(name: \"samp\"): NodeListOf;\r\n getElementsByTagName(name: \"script\"): NodeListOf;\r\n getElementsByTagName(name: \"section\"): NodeListOf;\r\n getElementsByTagName(name: \"select\"): NodeListOf;\r\n getElementsByTagName(name: \"small\"): NodeListOf;\r\n getElementsByTagName(name: \"source\"): NodeListOf;\r\n getElementsByTagName(name: \"span\"): NodeListOf;\r\n getElementsByTagName(name: \"stop\"): NodeListOf;\r\n getElementsByTagName(name: \"strike\"): NodeListOf;\r\n getElementsByTagName(name: \"strong\"): NodeListOf;\r\n getElementsByTagName(name: \"style\"): NodeListOf;\r\n getElementsByTagName(name: \"sub\"): NodeListOf;\r\n getElementsByTagName(name: \"sup\"): NodeListOf;\r\n getElementsByTagName(name: \"svg\"): NodeListOf;\r\n getElementsByTagName(name: \"switch\"): NodeListOf;\r\n getElementsByTagName(name: \"symbol\"): NodeListOf;\r\n getElementsByTagName(name: \"table\"): NodeListOf;\r\n getElementsByTagName(name: \"tbody\"): NodeListOf;\r\n getElementsByTagName(name: \"td\"): NodeListOf;\r\n getElementsByTagName(name: \"template\"): NodeListOf;\r\n getElementsByTagName(name: \"text\"): NodeListOf;\r\n getElementsByTagName(name: \"textpath\"): NodeListOf;\r\n getElementsByTagName(name: \"textarea\"): NodeListOf;\r\n getElementsByTagName(name: \"tfoot\"): NodeListOf;\r\n getElementsByTagName(name: \"th\"): NodeListOf;\r\n getElementsByTagName(name: \"thead\"): NodeListOf;\r\n getElementsByTagName(name: \"title\"): NodeListOf;\r\n getElementsByTagName(name: \"tr\"): NodeListOf;\r\n getElementsByTagName(name: \"track\"): NodeListOf;\r\n getElementsByTagName(name: \"tspan\"): NodeListOf;\r\n getElementsByTagName(name: \"tt\"): NodeListOf;\r\n getElementsByTagName(name: \"u\"): NodeListOf;\r\n getElementsByTagName(name: \"ul\"): NodeListOf;\r\n getElementsByTagName(name: \"use\"): NodeListOf;\r\n getElementsByTagName(name: \"var\"): NodeListOf;\r\n getElementsByTagName(name: \"video\"): NodeListOf;\r\n getElementsByTagName(name: \"view\"): NodeListOf;\r\n getElementsByTagName(name: \"wbr\"): NodeListOf;\r\n getElementsByTagName(name: \"x-ms-webview\"): NodeListOf;\r\n getElementsByTagName(name: \"xmp\"): NodeListOf;\r\n getElementsByTagName(name: string): NodeListOf;\r\n getElementsByTagNameNS(namespaceURI: \"http://www.w3.org/1999/xhtml\", localName: string): HTMLCollectionOf;\r\n getElementsByTagNameNS(namespaceURI: \"http://www.w3.org/2000/svg\", localName: string): HTMLCollectionOf;\r\n getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf;\r\n hasAttribute(name: string): boolean;\r\n hasAttributeNS(namespaceURI: string, localName: string): boolean;\r\n msGetRegionContent(): MSRangeCollection;\r\n msGetUntransformedBounds(): ClientRect;\r\n msMatchesSelector(selectors: string): boolean;\r\n msReleasePointerCapture(pointerId: number): void;\r\n msSetPointerCapture(pointerId: number): void;\r\n msZoomTo(args: MsZoomToOptions): void;\r\n releasePointerCapture(pointerId: number): void;\r\n removeAttribute(name?: string): void;\r\n removeAttributeNS(namespaceURI: string, localName: string): void;\r\n removeAttributeNode(oldAttr: Attr): Attr;\r\n requestFullscreen(): void;\r\n requestPointerLock(): void;\r\n setAttribute(name: string, value: string): void;\r\n setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;\r\n setAttributeNode(newAttr: Attr): Attr;\r\n setAttributeNodeNS(newAttr: Attr): Attr;\r\n setPointerCapture(pointerId: number): void;\r\n webkitMatchesSelector(selectors: string): boolean;\r\n webkitRequestFullScreen(): void;\r\n webkitRequestFullscreen(): void;\r\n getElementsByClassName(classNames: string): NodeListOf;\r\n matches(selector: string): boolean;\r\n closest(selector: string): Element | null;\r\n scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;\r\n scroll(options?: ScrollToOptions): void;\r\n scroll(x: number, y: number): void;\r\n scrollTo(options?: ScrollToOptions): void;\r\n scrollTo(x: number, y: number): void;\r\n scrollBy(options?: ScrollToOptions): void;\r\n scrollBy(x: number, y: number): void;\r\n insertAdjacentElement(position: string, insertedElement: Element): Element | null;\r\n insertAdjacentHTML(where: string, html: string): void;\r\n insertAdjacentText(where: string, text: string): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Element: {\r\n prototype: Element;\r\n new(): Element;\r\n}\r\n\r\ninterface ErrorEvent extends Event {\r\n readonly colno: number;\r\n readonly error: any;\r\n readonly filename: string;\r\n readonly lineno: number;\r\n readonly message: string;\r\n initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;\r\n}\r\n\r\ndeclare var ErrorEvent: {\r\n prototype: ErrorEvent;\r\n new(): ErrorEvent;\r\n}\r\n\r\ninterface Event {\r\n readonly bubbles: boolean;\r\n cancelBubble: boolean;\r\n readonly cancelable: boolean;\r\n readonly currentTarget: EventTarget;\r\n readonly defaultPrevented: boolean;\r\n readonly eventPhase: number;\r\n readonly isTrusted: boolean;\r\n returnValue: boolean;\r\n readonly srcElement: Element | null;\r\n readonly target: EventTarget;\r\n readonly timeStamp: number;\r\n readonly type: string;\r\n initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;\r\n preventDefault(): void;\r\n stopImmediatePropagation(): void;\r\n stopPropagation(): void;\r\n readonly AT_TARGET: number;\r\n readonly BUBBLING_PHASE: number;\r\n readonly CAPTURING_PHASE: number;\r\n}\r\n\r\ndeclare var Event: {\r\n prototype: Event;\r\n new(type: string, eventInitDict?: EventInit): Event;\r\n readonly AT_TARGET: number;\r\n readonly BUBBLING_PHASE: number;\r\n readonly CAPTURING_PHASE: number;\r\n}\r\n\r\ninterface EventTarget {\r\n addEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n dispatchEvent(evt: Event): boolean;\r\n removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var EventTarget: {\r\n prototype: EventTarget;\r\n new(): EventTarget;\r\n}\r\n\r\ninterface External {\r\n}\r\n\r\ndeclare var External: {\r\n prototype: External;\r\n new(): External;\r\n}\r\n\r\ninterface File extends Blob {\r\n readonly lastModifiedDate: any;\r\n readonly name: string;\r\n readonly webkitRelativePath: string;\r\n}\r\n\r\ndeclare var File: {\r\n prototype: File;\r\n new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;\r\n}\r\n\r\ninterface FileList {\r\n readonly length: number;\r\n item(index: number): File;\r\n [index: number]: File;\r\n}\r\n\r\ndeclare var FileList: {\r\n prototype: FileList;\r\n new(): FileList;\r\n}\r\n\r\ninterface FileReader extends EventTarget, MSBaseReader {\r\n readonly error: DOMError;\r\n readAsArrayBuffer(blob: Blob): void;\r\n readAsBinaryString(blob: Blob): void;\r\n readAsDataURL(blob: Blob): void;\r\n readAsText(blob: Blob, encoding?: string): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var FileReader: {\r\n prototype: FileReader;\r\n new(): FileReader;\r\n}\r\n\r\ninterface FocusEvent extends UIEvent {\r\n readonly relatedTarget: EventTarget;\r\n initFocusEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, relatedTargetArg: EventTarget): void;\r\n}\r\n\r\ndeclare var FocusEvent: {\r\n prototype: FocusEvent;\r\n new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;\r\n}\r\n\r\ninterface FormData {\r\n append(name: any, value: any, blobName?: string): void;\r\n}\r\n\r\ndeclare var FormData: {\r\n prototype: FormData;\r\n new (form?: HTMLFormElement): FormData;\r\n}\r\n\r\ninterface GainNode extends AudioNode {\r\n readonly gain: AudioParam;\r\n}\r\n\r\ndeclare var GainNode: {\r\n prototype: GainNode;\r\n new(): GainNode;\r\n}\r\n\r\ninterface Gamepad {\r\n readonly axes: number[];\r\n readonly buttons: GamepadButton[];\r\n readonly connected: boolean;\r\n readonly id: string;\r\n readonly index: number;\r\n readonly mapping: string;\r\n readonly timestamp: number;\r\n}\r\n\r\ndeclare var Gamepad: {\r\n prototype: Gamepad;\r\n new(): Gamepad;\r\n}\r\n\r\ninterface GamepadButton {\r\n readonly pressed: boolean;\r\n readonly value: number;\r\n}\r\n\r\ndeclare var GamepadButton: {\r\n prototype: GamepadButton;\r\n new(): GamepadButton;\r\n}\r\n\r\ninterface GamepadEvent extends Event {\r\n readonly gamepad: Gamepad;\r\n}\r\n\r\ndeclare var GamepadEvent: {\r\n prototype: GamepadEvent;\r\n new(): GamepadEvent;\r\n}\r\n\r\ninterface Geolocation {\r\n clearWatch(watchId: number): void;\r\n getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void;\r\n watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number;\r\n}\r\n\r\ndeclare var Geolocation: {\r\n prototype: Geolocation;\r\n new(): Geolocation;\r\n}\r\n\r\ninterface HTMLAllCollection extends HTMLCollection {\r\n namedItem(name: string): Element;\r\n}\r\n\r\ndeclare var HTMLAllCollection: {\r\n prototype: HTMLAllCollection;\r\n new(): HTMLAllCollection;\r\n}\r\n\r\ninterface HTMLAnchorElement extends HTMLElement {\r\n Methods: string;\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Sets or retrieves the coordinates of the object.\r\n */\r\n coords: string;\r\n download: string;\r\n /**\r\n * Contains the anchor portion of the URL including the hash sign (#).\r\n */\r\n hash: string;\r\n /**\r\n * Contains the hostname and port values of the URL.\r\n */\r\n host: string;\r\n /**\r\n * Contains the hostname of a URL.\r\n */\r\n hostname: string;\r\n /**\r\n * Sets or retrieves a destination URL or an anchor point.\r\n */\r\n href: string;\r\n /**\r\n * Sets or retrieves the language code of the object.\r\n */\r\n hreflang: string;\r\n readonly mimeType: string;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n name: string;\r\n readonly nameProp: string;\r\n /**\r\n * Contains the pathname of the URL.\r\n */\r\n pathname: string;\r\n /**\r\n * Sets or retrieves the port number associated with a URL.\r\n */\r\n port: string;\r\n /**\r\n * Contains the protocol of the URL.\r\n */\r\n protocol: string;\r\n readonly protocolLong: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rel: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rev: string;\r\n /**\r\n * Sets or retrieves the substring of the href property that follows the question mark.\r\n */\r\n search: string;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n shape: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Retrieves or sets the text of the object as a string. \r\n */\r\n text: string;\r\n type: string;\r\n urn: string;\r\n /** \r\n * Returns a string representation of an object.\r\n */\r\n toString(): string;\r\n}\r\n\r\ndeclare var HTMLAnchorElement: {\r\n prototype: HTMLAnchorElement;\r\n new(): HTMLAnchorElement;\r\n}\r\n\r\ninterface HTMLAppletElement extends HTMLElement {\r\n /**\r\n * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.\r\n */\r\n readonly BaseHref: string;\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Gets or sets the optional alternative HTML script to execute if the object fails to load.\r\n */\r\n altHtml: string;\r\n /**\r\n * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.\r\n */\r\n archive: string;\r\n border: string;\r\n code: string;\r\n /**\r\n * Sets or retrieves the URL of the component.\r\n */\r\n codeBase: string;\r\n /**\r\n * Sets or retrieves the Internet media type for the code associated with the object.\r\n */\r\n codeType: string;\r\n /**\r\n * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned.\r\n */\r\n readonly contentDocument: Document;\r\n /**\r\n * Sets or retrieves the URL that references the data of the object.\r\n */\r\n data: string;\r\n /**\r\n * Sets or retrieves a character string that can be used to implement your own declare functionality for the object.\r\n */\r\n declare: boolean;\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n hspace: number;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n name: string;\r\n object: string | null;\r\n /**\r\n * Sets or retrieves a message to be displayed while an object is loading.\r\n */\r\n standby: string;\r\n /**\r\n * Returns the content type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n vspace: number;\r\n width: number;\r\n}\r\n\r\ndeclare var HTMLAppletElement: {\r\n prototype: HTMLAppletElement;\r\n new(): HTMLAppletElement;\r\n}\r\n\r\ninterface HTMLAreaElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Sets or retrieves the coordinates of the object.\r\n */\r\n coords: string;\r\n download: string;\r\n /**\r\n * Sets or retrieves the subsection of the href property that follows the number sign (#).\r\n */\r\n hash: string;\r\n /**\r\n * Sets or retrieves the hostname and port number of the location or URL.\r\n */\r\n host: string;\r\n /**\r\n * Sets or retrieves the host name part of the location or URL. \r\n */\r\n hostname: string;\r\n /**\r\n * Sets or retrieves a destination URL or an anchor point.\r\n */\r\n href: string;\r\n /**\r\n * Sets or gets whether clicks in this region cause action.\r\n */\r\n noHref: boolean;\r\n /**\r\n * Sets or retrieves the file name or path specified by the object.\r\n */\r\n pathname: string;\r\n /**\r\n * Sets or retrieves the port number associated with a URL.\r\n */\r\n port: string;\r\n /**\r\n * Sets or retrieves the protocol portion of a URL.\r\n */\r\n protocol: string;\r\n rel: string;\r\n /**\r\n * Sets or retrieves the substring of the href property that follows the question mark.\r\n */\r\n search: string;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n shape: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /** \r\n * Returns a string representation of an object.\r\n */\r\n toString(): string;\r\n}\r\n\r\ndeclare var HTMLAreaElement: {\r\n prototype: HTMLAreaElement;\r\n new(): HTMLAreaElement;\r\n}\r\n\r\ninterface HTMLAreasCollection extends HTMLCollection {\r\n /**\r\n * Adds an element to the areas, controlRange, or options collection.\r\n */\r\n add(element: HTMLElement, before?: HTMLElement | number): void;\r\n /**\r\n * Removes an element from the collection.\r\n */\r\n remove(index?: number): void;\r\n}\r\n\r\ndeclare var HTMLAreasCollection: {\r\n prototype: HTMLAreasCollection;\r\n new(): HTMLAreasCollection;\r\n}\r\n\r\ninterface HTMLAudioElement extends HTMLMediaElement {\r\n}\r\n\r\ndeclare var HTMLAudioElement: {\r\n prototype: HTMLAudioElement;\r\n new(): HTMLAudioElement;\r\n}\r\n\r\ninterface HTMLBRElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.\r\n */\r\n clear: string;\r\n}\r\n\r\ndeclare var HTMLBRElement: {\r\n prototype: HTMLBRElement;\r\n new(): HTMLBRElement;\r\n}\r\n\r\ninterface HTMLBaseElement extends HTMLElement {\r\n /**\r\n * Gets or sets the baseline URL on which relative links are based.\r\n */\r\n href: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n}\r\n\r\ndeclare var HTMLBaseElement: {\r\n prototype: HTMLBaseElement;\r\n new(): HTMLBaseElement;\r\n}\r\n\r\ninterface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {\r\n /**\r\n * Sets or retrieves the current typeface family.\r\n */\r\n face: string;\r\n /**\r\n * Sets or retrieves the font size of the object.\r\n */\r\n size: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLBaseFontElement: {\r\n prototype: HTMLBaseFontElement;\r\n new(): HTMLBaseFontElement;\r\n}\r\n\r\ninterface HTMLBodyElement extends HTMLElement {\r\n aLink: any;\r\n background: string;\r\n bgColor: any;\r\n bgProperties: string;\r\n link: any;\r\n noWrap: boolean;\r\n onafterprint: (this: this, ev: Event) => any;\r\n onbeforeprint: (this: this, ev: Event) => any;\r\n onbeforeunload: (this: this, ev: BeforeUnloadEvent) => any;\r\n onblur: (this: this, ev: FocusEvent) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onfocus: (this: this, ev: FocusEvent) => any;\r\n onhashchange: (this: this, ev: HashChangeEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n onmessage: (this: this, ev: MessageEvent) => any;\r\n onoffline: (this: this, ev: Event) => any;\r\n ononline: (this: this, ev: Event) => any;\r\n onorientationchange: (this: this, ev: Event) => any;\r\n onpagehide: (this: this, ev: PageTransitionEvent) => any;\r\n onpageshow: (this: this, ev: PageTransitionEvent) => any;\r\n onpopstate: (this: this, ev: PopStateEvent) => any;\r\n onresize: (this: this, ev: UIEvent) => any;\r\n onstorage: (this: this, ev: StorageEvent) => any;\r\n onunload: (this: this, ev: Event) => any;\r\n text: any;\r\n vLink: any;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"afterprint\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeprint\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeunload\", listener: (this: this, ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"hashchange\", listener: (this: this, ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"offline\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"online\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"orientationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pagehide\", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pageshow\", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"popstate\", listener: (this: this, ev: PopStateEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"storage\", listener: (this: this, ev: StorageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"unload\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLBodyElement: {\r\n prototype: HTMLBodyElement;\r\n new(): HTMLBodyElement;\r\n}\r\n\r\ninterface HTMLButtonElement extends HTMLElement {\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Overrides the action attribute (where the data on a form is sent) on the parent form element.\r\n */\r\n formAction: string;\r\n /**\r\n * Used to override the encoding (formEnctype attribute) specified on the form element.\r\n */\r\n formEnctype: string;\r\n /**\r\n * Overrides the submit method attribute previously specified on a form element.\r\n */\r\n formMethod: string;\r\n /**\r\n * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a \"save draft\"-type submit option.\r\n */\r\n formNoValidate: string;\r\n /**\r\n * Overrides the target attribute on a form element.\r\n */\r\n formTarget: string;\r\n /** \r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n status: any;\r\n /**\r\n * Gets the classification and default behavior of the button.\r\n */\r\n type: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n readonly validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n readonly validity: ValidityState;\r\n /** \r\n * Sets or retrieves the default or selected value of the control.\r\n */\r\n value: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n readonly willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n}\r\n\r\ndeclare var HTMLButtonElement: {\r\n prototype: HTMLButtonElement;\r\n new(): HTMLButtonElement;\r\n}\r\n\r\ninterface HTMLCanvasElement extends HTMLElement {\r\n /**\r\n * Gets or sets the height of a canvas element on a document.\r\n */\r\n height: number;\r\n /**\r\n * Gets or sets the width of a canvas element on a document.\r\n */\r\n width: number;\r\n /**\r\n * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.\r\n * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext(\"2d\"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext(\"experimental-webgl\");\r\n */\r\n getContext(contextId: \"2d\", contextAttributes?: Canvas2DContextAttributes): CanvasRenderingContext2D | null;\r\n getContext(contextId: \"webgl\" | \"experimental-webgl\", contextAttributes?: WebGLContextAttributes): WebGLRenderingContext | null;\r\n getContext(contextId: string, contextAttributes?: {}): CanvasRenderingContext2D | WebGLRenderingContext | null;\r\n /**\r\n * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.\r\n */\r\n msToBlob(): Blob;\r\n /**\r\n * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.\r\n * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.\r\n */\r\n toDataURL(type?: string, ...args: any[]): string;\r\n toBlob(callback: (result: Blob | null) => void, type?: string, ...arguments: any[]): void;\r\n}\r\n\r\ndeclare var HTMLCanvasElement: {\r\n prototype: HTMLCanvasElement;\r\n new(): HTMLCanvasElement;\r\n}\r\n\r\ninterface HTMLCollection {\r\n /**\r\n * Sets or retrieves the number of objects in a collection.\r\n */\r\n readonly length: number;\r\n /**\r\n * Retrieves an object from various collections.\r\n */\r\n item(index: number): Element;\r\n /**\r\n * Retrieves a select object or an object from an options collection.\r\n */\r\n namedItem(name: string): Element;\r\n [index: number]: Element;\r\n}\r\n\r\ndeclare var HTMLCollection: {\r\n prototype: HTMLCollection;\r\n new(): HTMLCollection;\r\n}\r\n\r\ninterface HTMLDListElement extends HTMLElement {\r\n compact: boolean;\r\n}\r\n\r\ndeclare var HTMLDListElement: {\r\n prototype: HTMLDListElement;\r\n new(): HTMLDListElement;\r\n}\r\n\r\ninterface HTMLDataListElement extends HTMLElement {\r\n options: HTMLCollectionOf;\r\n}\r\n\r\ndeclare var HTMLDataListElement: {\r\n prototype: HTMLDataListElement;\r\n new(): HTMLDataListElement;\r\n}\r\n\r\ninterface HTMLDirectoryElement extends HTMLElement {\r\n compact: boolean;\r\n}\r\n\r\ndeclare var HTMLDirectoryElement: {\r\n prototype: HTMLDirectoryElement;\r\n new(): HTMLDirectoryElement;\r\n}\r\n\r\ninterface HTMLDivElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text. \r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n}\r\n\r\ndeclare var HTMLDivElement: {\r\n prototype: HTMLDivElement;\r\n new(): HTMLDivElement;\r\n}\r\n\r\ninterface HTMLDocument extends Document {\r\n}\r\n\r\ndeclare var HTMLDocument: {\r\n prototype: HTMLDocument;\r\n new(): HTMLDocument;\r\n}\r\n\r\ninterface HTMLElement extends Element {\r\n accessKey: string;\r\n readonly children: HTMLCollection;\r\n contentEditable: string;\r\n readonly dataset: DOMStringMap;\r\n dir: string;\r\n draggable: boolean;\r\n hidden: boolean;\r\n hideFocus: boolean;\r\n innerHTML: string;\r\n innerText: string;\r\n readonly isContentEditable: boolean;\r\n lang: string;\r\n readonly offsetHeight: number;\r\n readonly offsetLeft: number;\r\n readonly offsetParent: Element;\r\n readonly offsetTop: number;\r\n readonly offsetWidth: number;\r\n onabort: (this: this, ev: UIEvent) => any;\r\n onactivate: (this: this, ev: UIEvent) => any;\r\n onbeforeactivate: (this: this, ev: UIEvent) => any;\r\n onbeforecopy: (this: this, ev: ClipboardEvent) => any;\r\n onbeforecut: (this: this, ev: ClipboardEvent) => any;\r\n onbeforedeactivate: (this: this, ev: UIEvent) => any;\r\n onbeforepaste: (this: this, ev: ClipboardEvent) => any;\r\n onblur: (this: this, ev: FocusEvent) => any;\r\n oncanplay: (this: this, ev: Event) => any;\r\n oncanplaythrough: (this: this, ev: Event) => any;\r\n onchange: (this: this, ev: Event) => any;\r\n onclick: (this: this, ev: MouseEvent) => any;\r\n oncontextmenu: (this: this, ev: PointerEvent) => any;\r\n oncopy: (this: this, ev: ClipboardEvent) => any;\r\n oncuechange: (this: this, ev: Event) => any;\r\n oncut: (this: this, ev: ClipboardEvent) => any;\r\n ondblclick: (this: this, ev: MouseEvent) => any;\r\n ondeactivate: (this: this, ev: UIEvent) => any;\r\n ondrag: (this: this, ev: DragEvent) => any;\r\n ondragend: (this: this, ev: DragEvent) => any;\r\n ondragenter: (this: this, ev: DragEvent) => any;\r\n ondragleave: (this: this, ev: DragEvent) => any;\r\n ondragover: (this: this, ev: DragEvent) => any;\r\n ondragstart: (this: this, ev: DragEvent) => any;\r\n ondrop: (this: this, ev: DragEvent) => any;\r\n ondurationchange: (this: this, ev: Event) => any;\r\n onemptied: (this: this, ev: Event) => any;\r\n onended: (this: this, ev: MediaStreamErrorEvent) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onfocus: (this: this, ev: FocusEvent) => any;\r\n oninput: (this: this, ev: Event) => any;\r\n oninvalid: (this: this, ev: Event) => any;\r\n onkeydown: (this: this, ev: KeyboardEvent) => any;\r\n onkeypress: (this: this, ev: KeyboardEvent) => any;\r\n onkeyup: (this: this, ev: KeyboardEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n onloadeddata: (this: this, ev: Event) => any;\r\n onloadedmetadata: (this: this, ev: Event) => any;\r\n onloadstart: (this: this, ev: Event) => any;\r\n onmousedown: (this: this, ev: MouseEvent) => any;\r\n onmouseenter: (this: this, ev: MouseEvent) => any;\r\n onmouseleave: (this: this, ev: MouseEvent) => any;\r\n onmousemove: (this: this, ev: MouseEvent) => any;\r\n onmouseout: (this: this, ev: MouseEvent) => any;\r\n onmouseover: (this: this, ev: MouseEvent) => any;\r\n onmouseup: (this: this, ev: MouseEvent) => any;\r\n onmousewheel: (this: this, ev: WheelEvent) => any;\r\n onmscontentzoom: (this: this, ev: UIEvent) => any;\r\n onmsmanipulationstatechanged: (this: this, ev: MSManipulationEvent) => any;\r\n onpaste: (this: this, ev: ClipboardEvent) => any;\r\n onpause: (this: this, ev: Event) => any;\r\n onplay: (this: this, ev: Event) => any;\r\n onplaying: (this: this, ev: Event) => any;\r\n onprogress: (this: this, ev: ProgressEvent) => any;\r\n onratechange: (this: this, ev: Event) => any;\r\n onreset: (this: this, ev: Event) => any;\r\n onscroll: (this: this, ev: UIEvent) => any;\r\n onseeked: (this: this, ev: Event) => any;\r\n onseeking: (this: this, ev: Event) => any;\r\n onselect: (this: this, ev: UIEvent) => any;\r\n onselectstart: (this: this, ev: Event) => any;\r\n onstalled: (this: this, ev: Event) => any;\r\n onsubmit: (this: this, ev: Event) => any;\r\n onsuspend: (this: this, ev: Event) => any;\r\n ontimeupdate: (this: this, ev: Event) => any;\r\n onvolumechange: (this: this, ev: Event) => any;\r\n onwaiting: (this: this, ev: Event) => any;\r\n outerHTML: string;\r\n outerText: string;\r\n spellcheck: boolean;\r\n readonly style: CSSStyleDeclaration;\r\n tabIndex: number;\r\n title: string;\r\n blur(): void;\r\n click(): void;\r\n dragDrop(): boolean;\r\n focus(): void;\r\n msGetInputContext(): MSInputMethodContext;\r\n setActive(): void;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLElement: {\r\n prototype: HTMLElement;\r\n new(): HTMLElement;\r\n}\r\n\r\ninterface HTMLEmbedElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n hidden: any;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.\r\n */\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n readonly msPlayToSource: any;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Retrieves the palette used for the embedded document.\r\n */\r\n readonly palette: string;\r\n /**\r\n * Retrieves the URL of the plug-in used to view an embedded document.\r\n */\r\n readonly pluginspage: string;\r\n readonly readyState: string;\r\n /**\r\n * Sets or retrieves a URL to be loaded by the object.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the height and width units of the embed object.\r\n */\r\n units: string;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLEmbedElement: {\r\n prototype: HTMLEmbedElement;\r\n new(): HTMLEmbedElement;\r\n}\r\n\r\ninterface HTMLFieldSetElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n readonly validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n readonly validity: ValidityState;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n readonly willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n}\r\n\r\ndeclare var HTMLFieldSetElement: {\r\n prototype: HTMLFieldSetElement;\r\n new(): HTMLFieldSetElement;\r\n}\r\n\r\ninterface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {\r\n /**\r\n * Sets or retrieves the current typeface family.\r\n */\r\n face: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLFontElement: {\r\n prototype: HTMLFontElement;\r\n new(): HTMLFontElement;\r\n}\r\n\r\ninterface HTMLFormElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.\r\n */\r\n acceptCharset: string;\r\n /**\r\n * Sets or retrieves the URL to which the form content is sent for processing.\r\n */\r\n action: string;\r\n /**\r\n * Specifies whether autocomplete is applied to an editable text field.\r\n */\r\n autocomplete: string;\r\n /**\r\n * Retrieves a collection, in source order, of all controls in a given form.\r\n */\r\n readonly elements: HTMLCollection;\r\n /**\r\n * Sets or retrieves the MIME encoding for the form.\r\n */\r\n encoding: string;\r\n /**\r\n * Sets or retrieves the encoding type for the form.\r\n */\r\n enctype: string;\r\n /**\r\n * Sets or retrieves the number of objects in a collection.\r\n */\r\n readonly length: number;\r\n /**\r\n * Sets or retrieves how to send the form data to the server.\r\n */\r\n method: string;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Designates a form that is not validated when submitted.\r\n */\r\n noValidate: boolean;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Retrieves a form object or an object from an elements collection.\r\n * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.\r\n * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.\r\n */\r\n item(name?: any, index?: any): any;\r\n /**\r\n * Retrieves a form object or an object from an elements collection.\r\n */\r\n namedItem(name: string): any;\r\n /**\r\n * Fires when the user resets a form.\r\n */\r\n reset(): void;\r\n /**\r\n * Fires when a FORM is about to be submitted.\r\n */\r\n submit(): void;\r\n [name: string]: any;\r\n}\r\n\r\ndeclare var HTMLFormElement: {\r\n prototype: HTMLFormElement;\r\n new(): HTMLFormElement;\r\n}\r\n\r\ninterface HTMLFrameElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Specifies the properties of a border drawn around an object.\r\n */\r\n border: string;\r\n /**\r\n * Sets or retrieves the border color of the object.\r\n */\r\n borderColor: any;\r\n /**\r\n * Retrieves the document object of the page or frame.\r\n */\r\n readonly contentDocument: Document;\r\n /**\r\n * Retrieves the object of the specified.\r\n */\r\n readonly contentWindow: Window;\r\n /**\r\n * Sets or retrieves whether to display a border for the frame.\r\n */\r\n frameBorder: string;\r\n /**\r\n * Sets or retrieves the amount of additional space between the frames.\r\n */\r\n frameSpacing: any;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string | number;\r\n /**\r\n * Sets or retrieves a URI to a long description of the object.\r\n */\r\n longDesc: string;\r\n /**\r\n * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.\r\n */\r\n marginHeight: string;\r\n /**\r\n * Sets or retrieves the left and right margin widths before displaying the text in a frame.\r\n */\r\n marginWidth: string;\r\n /**\r\n * Sets or retrieves the frame name.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves whether the user can resize the frame.\r\n */\r\n noResize: boolean;\r\n /**\r\n * Raised when the object has been completely received from the server.\r\n */\r\n onload: (this: this, ev: Event) => any;\r\n /**\r\n * Sets or retrieves whether the frame can be scrolled.\r\n */\r\n scrolling: string;\r\n /**\r\n * Sets or retrieves a URL to be loaded by the object.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string | number;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLFrameElement: {\r\n prototype: HTMLFrameElement;\r\n new(): HTMLFrameElement;\r\n}\r\n\r\ninterface HTMLFrameSetElement extends HTMLElement {\r\n border: string;\r\n /**\r\n * Sets or retrieves the border color of the object.\r\n */\r\n borderColor: any;\r\n /**\r\n * Sets or retrieves the frame widths of the object.\r\n */\r\n cols: string;\r\n /**\r\n * Sets or retrieves whether to display a border for the frame.\r\n */\r\n frameBorder: string;\r\n /**\r\n * Sets or retrieves the amount of additional space between the frames.\r\n */\r\n frameSpacing: any;\r\n name: string;\r\n onafterprint: (this: this, ev: Event) => any;\r\n onbeforeprint: (this: this, ev: Event) => any;\r\n onbeforeunload: (this: this, ev: BeforeUnloadEvent) => any;\r\n /**\r\n * Fires when the object loses the input focus.\r\n */\r\n onblur: (this: this, ev: FocusEvent) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n /**\r\n * Fires when the object receives focus.\r\n */\r\n onfocus: (this: this, ev: FocusEvent) => any;\r\n onhashchange: (this: this, ev: HashChangeEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n onmessage: (this: this, ev: MessageEvent) => any;\r\n onoffline: (this: this, ev: Event) => any;\r\n ononline: (this: this, ev: Event) => any;\r\n onorientationchange: (this: this, ev: Event) => any;\r\n onpagehide: (this: this, ev: PageTransitionEvent) => any;\r\n onpageshow: (this: this, ev: PageTransitionEvent) => any;\r\n onresize: (this: this, ev: UIEvent) => any;\r\n onstorage: (this: this, ev: StorageEvent) => any;\r\n onunload: (this: this, ev: Event) => any;\r\n /**\r\n * Sets or retrieves the frame heights of the object.\r\n */\r\n rows: string;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeprint\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeunload\", listener: (this: this, ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"hashchange\", listener: (this: this, ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"offline\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"online\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"orientationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pagehide\", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pageshow\", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"storage\", listener: (this: this, ev: StorageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"unload\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLFrameSetElement: {\r\n prototype: HTMLFrameSetElement;\r\n new(): HTMLFrameSetElement;\r\n}\r\n\r\ninterface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves whether the horizontal rule is drawn with 3-D shading.\r\n */\r\n noShade: boolean;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLHRElement: {\r\n prototype: HTMLHRElement;\r\n new(): HTMLHRElement;\r\n}\r\n\r\ninterface HTMLHeadElement extends HTMLElement {\r\n profile: string;\r\n}\r\n\r\ndeclare var HTMLHeadElement: {\r\n prototype: HTMLHeadElement;\r\n new(): HTMLHeadElement;\r\n}\r\n\r\ninterface HTMLHeadingElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a value that indicates the table alignment.\r\n */\r\n align: string;\r\n}\r\n\r\ndeclare var HTMLHeadingElement: {\r\n prototype: HTMLHeadingElement;\r\n new(): HTMLHeadingElement;\r\n}\r\n\r\ninterface HTMLHtmlElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the DTD version that governs the current document.\r\n */\r\n version: string;\r\n}\r\n\r\ndeclare var HTMLHtmlElement: {\r\n prototype: HTMLHtmlElement;\r\n new(): HTMLHtmlElement;\r\n}\r\n\r\ninterface HTMLIFrameElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n allowFullscreen: boolean;\r\n /**\r\n * Specifies the properties of a border drawn around an object.\r\n */\r\n border: string;\r\n /**\r\n * Retrieves the document object of the page or frame.\r\n */\r\n readonly contentDocument: Document;\r\n /**\r\n * Retrieves the object of the specified.\r\n */\r\n readonly contentWindow: Window;\r\n /**\r\n * Sets or retrieves whether to display a border for the frame.\r\n */\r\n frameBorder: string;\r\n /**\r\n * Sets or retrieves the amount of additional space between the frames.\r\n */\r\n frameSpacing: any;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n /**\r\n * Sets or retrieves the horizontal margin for the object.\r\n */\r\n hspace: number;\r\n /**\r\n * Sets or retrieves a URI to a long description of the object.\r\n */\r\n longDesc: string;\r\n /**\r\n * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.\r\n */\r\n marginHeight: string;\r\n /**\r\n * Sets or retrieves the left and right margin widths before displaying the text in a frame.\r\n */\r\n marginWidth: string;\r\n /**\r\n * Sets or retrieves the frame name.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves whether the user can resize the frame.\r\n */\r\n noResize: boolean;\r\n /**\r\n * Raised when the object has been completely received from the server.\r\n */\r\n onload: (this: this, ev: Event) => any;\r\n readonly sandbox: DOMSettableTokenList;\r\n /**\r\n * Sets or retrieves whether the frame can be scrolled.\r\n */\r\n scrolling: string;\r\n /**\r\n * Sets or retrieves a URL to be loaded by the object.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the vertical margin for the object.\r\n */\r\n vspace: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLIFrameElement: {\r\n prototype: HTMLIFrameElement;\r\n new(): HTMLIFrameElement;\r\n}\r\n\r\ninterface HTMLImageElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Specifies the properties of a border drawn around an object.\r\n */\r\n border: string;\r\n /**\r\n * Retrieves whether the object is fully loaded.\r\n */\r\n readonly complete: boolean;\r\n crossOrigin: string;\r\n readonly currentSrc: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: number;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n hspace: number;\r\n /**\r\n * Sets or retrieves whether the image is a server-side image map.\r\n */\r\n isMap: boolean;\r\n /**\r\n * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.\r\n */\r\n longDesc: string;\r\n lowsrc: string;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n readonly msPlayToSource: any;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * The original height of the image resource before sizing.\r\n */\r\n readonly naturalHeight: number;\r\n /**\r\n * The original width of the image resource before sizing.\r\n */\r\n readonly naturalWidth: number;\r\n sizes: string;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n srcset: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * Sets or retrieves the vertical margin for the object.\r\n */\r\n vspace: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: number;\r\n readonly x: number;\r\n readonly y: number;\r\n msGetAsCastingSource(): any;\r\n}\r\n\r\ndeclare var HTMLImageElement: {\r\n prototype: HTMLImageElement;\r\n new(): HTMLImageElement;\r\n create(): HTMLImageElement;\r\n}\r\n\r\ninterface HTMLInputElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a comma-separated list of content types.\r\n */\r\n accept: string;\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Specifies whether autocomplete is applied to an editable text field.\r\n */\r\n autocomplete: string;\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n border: string;\r\n /**\r\n * Sets or retrieves the state of the check box or radio button.\r\n */\r\n checked: boolean;\r\n /**\r\n * Retrieves whether the object is fully loaded.\r\n */\r\n readonly complete: boolean;\r\n /**\r\n * Sets or retrieves the state of the check box or radio button.\r\n */\r\n defaultChecked: boolean;\r\n /**\r\n * Sets or retrieves the initial contents of the object.\r\n */\r\n defaultValue: string;\r\n disabled: boolean;\r\n /**\r\n * Returns a FileList object on a file type input object.\r\n */\r\n readonly files: FileList | null;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in. \r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Overrides the action attribute (where the data on a form is sent) on the parent form element.\r\n */\r\n formAction: string;\r\n /**\r\n * Used to override the encoding (formEnctype attribute) specified on the form element.\r\n */\r\n formEnctype: string;\r\n /**\r\n * Overrides the submit method attribute previously specified on a form element.\r\n */\r\n formMethod: string;\r\n /**\r\n * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a \"save draft\"-type submit option.\r\n */\r\n formNoValidate: string;\r\n /**\r\n * Overrides the target attribute on a form element.\r\n */\r\n formTarget: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n hspace: number;\r\n indeterminate: boolean;\r\n /**\r\n * Specifies the ID of a pre-defined datalist of options for an input element.\r\n */\r\n readonly list: HTMLElement;\r\n /**\r\n * Defines the maximum acceptable value for an input element with type=\"number\".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.\r\n */\r\n max: string;\r\n /**\r\n * Sets or retrieves the maximum number of characters that the user can enter in a text control.\r\n */\r\n maxLength: number;\r\n /**\r\n * Defines the minimum acceptable value for an input element with type=\"number\". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.\r\n */\r\n min: string;\r\n /**\r\n * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.\r\n */\r\n multiple: boolean;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Gets or sets a string containing a regular expression that the user's input must match.\r\n */\r\n pattern: string;\r\n /**\r\n * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.\r\n */\r\n placeholder: string;\r\n readOnly: boolean;\r\n /**\r\n * When present, marks an element that can't be submitted without a value.\r\n */\r\n required: boolean;\r\n selectionDirection: string;\r\n /**\r\n * Gets or sets the end position or offset of a text selection.\r\n */\r\n selectionEnd: number;\r\n /**\r\n * Gets or sets the starting position or offset of a text selection.\r\n */\r\n selectionStart: number;\r\n size: number;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n status: boolean;\r\n /**\r\n * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.\r\n */\r\n step: string;\r\n /**\r\n * Returns the content type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n readonly validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n readonly validity: ValidityState;\r\n /**\r\n * Returns the value of the data at the cursor's current position.\r\n */\r\n value: string;\r\n valueAsDate: Date;\r\n /**\r\n * Returns the input field value as a number.\r\n */\r\n valueAsNumber: number;\r\n /**\r\n * Sets or retrieves the vertical margin for the object.\r\n */\r\n vspace: number;\r\n webkitdirectory: boolean;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n readonly willValidate: boolean;\r\n minLength: number;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Makes the selection equal to the current object.\r\n */\r\n select(): void;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n /**\r\n * Sets the start and end positions of a selection in a text field.\r\n * @param start The offset into the text field for the start of the selection.\r\n * @param end The offset into the text field for the end of the selection.\r\n */\r\n setSelectionRange(start?: number, end?: number, direction?: string): void;\r\n /**\r\n * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.\r\n * @param n Value to decrement the value by.\r\n */\r\n stepDown(n?: number): void;\r\n /**\r\n * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.\r\n * @param n Value to increment the value by.\r\n */\r\n stepUp(n?: number): void;\r\n}\r\n\r\ndeclare var HTMLInputElement: {\r\n prototype: HTMLInputElement;\r\n new(): HTMLInputElement;\r\n}\r\n\r\ninterface HTMLLIElement extends HTMLElement {\r\n type: string;\r\n /**\r\n * Sets or retrieves the value of a list item.\r\n */\r\n value: number;\r\n}\r\n\r\ndeclare var HTMLLIElement: {\r\n prototype: HTMLLIElement;\r\n new(): HTMLLIElement;\r\n}\r\n\r\ninterface HTMLLabelElement extends HTMLElement {\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the object to which the given label object is assigned.\r\n */\r\n htmlFor: string;\r\n}\r\n\r\ndeclare var HTMLLabelElement: {\r\n prototype: HTMLLabelElement;\r\n new(): HTMLLabelElement;\r\n}\r\n\r\ninterface HTMLLegendElement extends HTMLElement {\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n align: string;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n}\r\n\r\ndeclare var HTMLLegendElement: {\r\n prototype: HTMLLegendElement;\r\n new(): HTMLLegendElement;\r\n}\r\n\r\ninterface HTMLLinkElement extends HTMLElement, LinkStyle {\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n disabled: boolean;\r\n /**\r\n * Sets or retrieves a destination URL or an anchor point.\r\n */\r\n href: string;\r\n /**\r\n * Sets or retrieves the language code of the object.\r\n */\r\n hreflang: string;\r\n /**\r\n * Sets or retrieves the media type.\r\n */\r\n media: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rel: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rev: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Sets or retrieves the MIME type of the object.\r\n */\r\n type: string;\r\n import?: Document;\r\n integrity: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLLinkElement: {\r\n prototype: HTMLLinkElement;\r\n new(): HTMLLinkElement;\r\n}\r\n\r\ninterface HTMLMapElement extends HTMLElement {\r\n /**\r\n * Retrieves a collection of the area objects defined for the given map object.\r\n */\r\n readonly areas: HTMLAreasCollection;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n}\r\n\r\ndeclare var HTMLMapElement: {\r\n prototype: HTMLMapElement;\r\n new(): HTMLMapElement;\r\n}\r\n\r\ninterface HTMLMarqueeElement extends HTMLElement {\r\n behavior: string;\r\n bgColor: any;\r\n direction: string;\r\n height: string;\r\n hspace: number;\r\n loop: number;\r\n onbounce: (this: this, ev: Event) => any;\r\n onfinish: (this: this, ev: Event) => any;\r\n onstart: (this: this, ev: Event) => any;\r\n scrollAmount: number;\r\n scrollDelay: number;\r\n trueSpeed: boolean;\r\n vspace: number;\r\n width: string;\r\n start(): void;\r\n stop(): void;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"bounce\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"finish\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"start\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLMarqueeElement: {\r\n prototype: HTMLMarqueeElement;\r\n new(): HTMLMarqueeElement;\r\n}\r\n\r\ninterface HTMLMediaElement extends HTMLElement {\r\n /**\r\n * Returns an AudioTrackList object with the audio tracks for a given video element.\r\n */\r\n readonly audioTracks: AudioTrackList;\r\n /**\r\n * Gets or sets a value that indicates whether to start playing the media automatically.\r\n */\r\n autoplay: boolean;\r\n /**\r\n * Gets a collection of buffered time ranges.\r\n */\r\n readonly buffered: TimeRanges;\r\n /**\r\n * Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).\r\n */\r\n controls: boolean;\r\n crossOrigin: string;\r\n /**\r\n * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.\r\n */\r\n readonly currentSrc: string;\r\n /**\r\n * Gets or sets the current playback position, in seconds.\r\n */\r\n currentTime: number;\r\n defaultMuted: boolean;\r\n /**\r\n * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.\r\n */\r\n defaultPlaybackRate: number;\r\n /**\r\n * Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.\r\n */\r\n readonly duration: number;\r\n /**\r\n * Gets information about whether the playback has ended or not.\r\n */\r\n readonly ended: boolean;\r\n /**\r\n * Returns an object representing the current error state of the audio or video element.\r\n */\r\n readonly error: MediaError;\r\n /**\r\n * Gets or sets a flag to specify whether playback should restart after it completes.\r\n */\r\n loop: boolean;\r\n readonly mediaKeys: MediaKeys | null;\r\n /**\r\n * Specifies the purpose of the audio or video media, such as background audio or alerts.\r\n */\r\n msAudioCategory: string;\r\n /**\r\n * Specifies the output device id that the audio will be sent to.\r\n */\r\n msAudioDeviceType: string;\r\n readonly msGraphicsTrustStatus: MSGraphicsTrust;\r\n /**\r\n * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element.\r\n */\r\n readonly msKeys: MSMediaKeys;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.\r\n */\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n readonly msPlayToSource: any;\r\n /**\r\n * Specifies whether or not to enable low-latency playback on the media element.\r\n */\r\n msRealTime: boolean;\r\n /**\r\n * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.\r\n */\r\n muted: boolean;\r\n /**\r\n * Gets the current network activity for the element.\r\n */\r\n readonly networkState: number;\r\n onencrypted: (this: this, ev: MediaEncryptedEvent) => any;\r\n onmsneedkey: (this: this, ev: MSMediaKeyNeededEvent) => any;\r\n /**\r\n * Gets a flag that specifies whether playback is paused.\r\n */\r\n readonly paused: boolean;\r\n /**\r\n * Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.\r\n */\r\n playbackRate: number;\r\n /**\r\n * Gets TimeRanges for the current media resource that has been played.\r\n */\r\n readonly played: TimeRanges;\r\n /**\r\n * Gets or sets the current playback position, in seconds.\r\n */\r\n preload: string;\r\n readyState: number;\r\n /**\r\n * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.\r\n */\r\n readonly seekable: TimeRanges;\r\n /**\r\n * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource.\r\n */\r\n readonly seeking: boolean;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n srcObject: MediaStream | null;\r\n readonly textTracks: TextTrackList;\r\n readonly videoTracks: VideoTrackList;\r\n /**\r\n * Gets or sets the volume level for audio portions of the media element.\r\n */\r\n volume: number;\r\n addTextTrack(kind: string, label?: string, language?: string): TextTrack;\r\n /**\r\n * Returns a string that specifies whether the client can play a given media resource type.\r\n */\r\n canPlayType(type: string): string;\r\n /**\r\n * Resets the audio or video object and loads a new media resource.\r\n */\r\n load(): void;\r\n /**\r\n * Clears all effects from the media pipeline.\r\n */\r\n msClearEffects(): void;\r\n msGetAsCastingSource(): any;\r\n /**\r\n * Inserts the specified audio effect into media pipeline.\r\n */\r\n msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;\r\n msSetMediaKeys(mediaKeys: MSMediaKeys): void;\r\n /**\r\n * Specifies the media protection manager for a given media pipeline.\r\n */\r\n msSetMediaProtectionManager(mediaProtectionManager?: any): void;\r\n /**\r\n * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.\r\n */\r\n pause(): void;\r\n /**\r\n * Loads and starts playback of a media resource.\r\n */\r\n play(): void;\r\n setMediaKeys(mediaKeys: MediaKeys | null): PromiseLike;\r\n readonly HAVE_CURRENT_DATA: number;\r\n readonly HAVE_ENOUGH_DATA: number;\r\n readonly HAVE_FUTURE_DATA: number;\r\n readonly HAVE_METADATA: number;\r\n readonly HAVE_NOTHING: number;\r\n readonly NETWORK_EMPTY: number;\r\n readonly NETWORK_IDLE: number;\r\n readonly NETWORK_LOADING: number;\r\n readonly NETWORK_NO_SOURCE: number;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"encrypted\", listener: (this: this, ev: MediaEncryptedEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"msneedkey\", listener: (this: this, ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLMediaElement: {\r\n prototype: HTMLMediaElement;\r\n new(): HTMLMediaElement;\r\n readonly HAVE_CURRENT_DATA: number;\r\n readonly HAVE_ENOUGH_DATA: number;\r\n readonly HAVE_FUTURE_DATA: number;\r\n readonly HAVE_METADATA: number;\r\n readonly HAVE_NOTHING: number;\r\n readonly NETWORK_EMPTY: number;\r\n readonly NETWORK_IDLE: number;\r\n readonly NETWORK_LOADING: number;\r\n readonly NETWORK_NO_SOURCE: number;\r\n}\r\n\r\ninterface HTMLMenuElement extends HTMLElement {\r\n compact: boolean;\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLMenuElement: {\r\n prototype: HTMLMenuElement;\r\n new(): HTMLMenuElement;\r\n}\r\n\r\ninterface HTMLMetaElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Gets or sets meta-information to associate with httpEquiv or name.\r\n */\r\n content: string;\r\n /**\r\n * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.\r\n */\r\n httpEquiv: string;\r\n /**\r\n * Sets or retrieves the value specified in the content attribute of the meta object.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.\r\n */\r\n scheme: string;\r\n /**\r\n * Sets or retrieves the URL property that will be loaded after the specified time has elapsed. \r\n */\r\n url: string;\r\n}\r\n\r\ndeclare var HTMLMetaElement: {\r\n prototype: HTMLMetaElement;\r\n new(): HTMLMetaElement;\r\n}\r\n\r\ninterface HTMLMeterElement extends HTMLElement {\r\n high: number;\r\n low: number;\r\n max: number;\r\n min: number;\r\n optimum: number;\r\n value: number;\r\n}\r\n\r\ndeclare var HTMLMeterElement: {\r\n prototype: HTMLMeterElement;\r\n new(): HTMLMeterElement;\r\n}\r\n\r\ninterface HTMLModElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n /**\r\n * Sets or retrieves the date and time of a modification to the object.\r\n */\r\n dateTime: string;\r\n}\r\n\r\ndeclare var HTMLModElement: {\r\n prototype: HTMLModElement;\r\n new(): HTMLModElement;\r\n}\r\n\r\ninterface HTMLOListElement extends HTMLElement {\r\n compact: boolean;\r\n /**\r\n * The starting number.\r\n */\r\n start: number;\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLOListElement: {\r\n prototype: HTMLOListElement;\r\n new(): HTMLOListElement;\r\n}\r\n\r\ninterface HTMLObjectElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.\r\n */\r\n readonly BaseHref: string;\r\n align: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Gets or sets the optional alternative HTML script to execute if the object fails to load.\r\n */\r\n altHtml: string;\r\n /**\r\n * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.\r\n */\r\n archive: string;\r\n border: string;\r\n /**\r\n * Sets or retrieves the URL of the file containing the compiled Java class.\r\n */\r\n code: string;\r\n /**\r\n * Sets or retrieves the URL of the component.\r\n */\r\n codeBase: string;\r\n /**\r\n * Sets or retrieves the Internet media type for the code associated with the object.\r\n */\r\n codeType: string;\r\n /**\r\n * Retrieves the document object of the page or frame.\r\n */\r\n readonly contentDocument: Document;\r\n /**\r\n * Sets or retrieves the URL that references the data of the object.\r\n */\r\n data: string;\r\n declare: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n hspace: number;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.\r\n */\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n readonly msPlayToSource: any;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Retrieves the contained object.\r\n */\r\n readonly object: any;\r\n readonly readyState: number;\r\n /**\r\n * Sets or retrieves a message to be displayed while an object is loading.\r\n */\r\n standby: string;\r\n /**\r\n * Sets or retrieves the MIME type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n readonly validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n readonly validity: ValidityState;\r\n vspace: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n readonly willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLObjectElement: {\r\n prototype: HTMLObjectElement;\r\n new(): HTMLObjectElement;\r\n}\r\n\r\ninterface HTMLOptGroupElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the status of an option.\r\n */\r\n defaultSelected: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the ordinal position of an option in a list box.\r\n */\r\n readonly index: number;\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own label functionality for the object.\r\n */\r\n label: string;\r\n /**\r\n * Sets or retrieves whether the option in the list box is the default item.\r\n */\r\n selected: boolean;\r\n /**\r\n * Sets or retrieves the text string specified by the option tag.\r\n */\r\n readonly text: string;\r\n /**\r\n * Sets or retrieves the value which is returned to the server when the form control is submitted.\r\n */\r\n value: string;\r\n}\r\n\r\ndeclare var HTMLOptGroupElement: {\r\n prototype: HTMLOptGroupElement;\r\n new(): HTMLOptGroupElement;\r\n}\r\n\r\ninterface HTMLOptionElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the status of an option.\r\n */\r\n defaultSelected: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the ordinal position of an option in a list box.\r\n */\r\n readonly index: number;\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own label functionality for the object.\r\n */\r\n label: string;\r\n /**\r\n * Sets or retrieves whether the option in the list box is the default item.\r\n */\r\n selected: boolean;\r\n /**\r\n * Sets or retrieves the text string specified by the option tag.\r\n */\r\n text: string;\r\n /**\r\n * Sets or retrieves the value which is returned to the server when the form control is submitted.\r\n */\r\n value: string;\r\n}\r\n\r\ndeclare var HTMLOptionElement: {\r\n prototype: HTMLOptionElement;\r\n new(): HTMLOptionElement;\r\n create(): HTMLOptionElement;\r\n}\r\n\r\ninterface HTMLOptionsCollection extends HTMLCollectionOf {\r\n length: number;\r\n selectedIndex: number;\r\n add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number): void;\r\n remove(index: number): void;\r\n}\r\n\r\ndeclare var HTMLOptionsCollection: {\r\n prototype: HTMLOptionsCollection;\r\n new(): HTMLOptionsCollection;\r\n}\r\n\r\ninterface HTMLParagraphElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text. \r\n */\r\n align: string;\r\n clear: string;\r\n}\r\n\r\ndeclare var HTMLParagraphElement: {\r\n prototype: HTMLParagraphElement;\r\n new(): HTMLParagraphElement;\r\n}\r\n\r\ninterface HTMLParamElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the name of an input parameter for an element.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves the content type of the resource designated by the value attribute.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the value of an input parameter for an element.\r\n */\r\n value: string;\r\n /**\r\n * Sets or retrieves the data type of the value attribute.\r\n */\r\n valueType: string;\r\n}\r\n\r\ndeclare var HTMLParamElement: {\r\n prototype: HTMLParamElement;\r\n new(): HTMLParamElement;\r\n}\r\n\r\ninterface HTMLPictureElement extends HTMLElement {\r\n}\r\n\r\ndeclare var HTMLPictureElement: {\r\n prototype: HTMLPictureElement;\r\n new(): HTMLPictureElement;\r\n}\r\n\r\ninterface HTMLPreElement extends HTMLElement {\r\n /**\r\n * Sets or gets a value that you can use to implement your own width functionality for the object.\r\n */\r\n width: number;\r\n}\r\n\r\ndeclare var HTMLPreElement: {\r\n prototype: HTMLPreElement;\r\n new(): HTMLPreElement;\r\n}\r\n\r\ninterface HTMLProgressElement extends HTMLElement {\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Defines the maximum, or \"done\" value for a progress element.\r\n */\r\n max: number;\r\n /**\r\n * Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).\r\n */\r\n readonly position: number;\r\n /**\r\n * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.\r\n */\r\n value: number;\r\n}\r\n\r\ndeclare var HTMLProgressElement: {\r\n prototype: HTMLProgressElement;\r\n new(): HTMLProgressElement;\r\n}\r\n\r\ninterface HTMLQuoteElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n}\r\n\r\ndeclare var HTMLQuoteElement: {\r\n prototype: HTMLQuoteElement;\r\n new(): HTMLQuoteElement;\r\n}\r\n\r\ninterface HTMLScriptElement extends HTMLElement {\r\n async: boolean;\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Sets or retrieves the status of the script.\r\n */\r\n defer: boolean;\r\n /**\r\n * Sets or retrieves the event for which the script is written. \r\n */\r\n event: string;\r\n /** \r\n * Sets or retrieves the object that is bound to the event script.\r\n */\r\n htmlFor: string;\r\n /**\r\n * Retrieves the URL to an external file that contains the source code or data.\r\n */\r\n src: string;\r\n /**\r\n * Retrieves or sets the text of the object as a string. \r\n */\r\n text: string;\r\n /**\r\n * Sets or retrieves the MIME type for the associated scripting engine.\r\n */\r\n type: string;\r\n integrity: string;\r\n}\r\n\r\ndeclare var HTMLScriptElement: {\r\n prototype: HTMLScriptElement;\r\n new(): HTMLScriptElement;\r\n}\r\n\r\ninterface HTMLSelectElement extends HTMLElement {\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in. \r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the number of objects in a collection.\r\n */\r\n length: number;\r\n /**\r\n * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.\r\n */\r\n multiple: boolean;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n readonly options: HTMLOptionsCollection;\r\n /**\r\n * When present, marks an element that can't be submitted without a value.\r\n */\r\n required: boolean;\r\n /**\r\n * Sets or retrieves the index of the selected option in a select object.\r\n */\r\n selectedIndex: number;\r\n selectedOptions: HTMLCollectionOf;\r\n /**\r\n * Sets or retrieves the number of rows in the list box. \r\n */\r\n size: number;\r\n /**\r\n * Retrieves the type of select control based on the value of the MULTIPLE attribute.\r\n */\r\n readonly type: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n readonly validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n readonly validity: ValidityState;\r\n /**\r\n * Sets or retrieves the value which is returned to the server when the form control is submitted.\r\n */\r\n value: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n readonly willValidate: boolean;\r\n /**\r\n * Adds an element to the areas, controlRange, or options collection.\r\n * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.\r\n * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection. \r\n */\r\n add(element: HTMLElement, before?: HTMLElement | number): void;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Retrieves a select object or an object from an options collection.\r\n * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.\r\n * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.\r\n */\r\n item(name?: any, index?: any): any;\r\n /**\r\n * Retrieves a select object or an object from an options collection.\r\n * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.\r\n */\r\n namedItem(name: string): any;\r\n /**\r\n * Removes an element from the collection.\r\n * @param index Number that specifies the zero-based index of the element to remove from the collection.\r\n */\r\n remove(index?: number): void;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n [name: string]: any;\r\n}\r\n\r\ndeclare var HTMLSelectElement: {\r\n prototype: HTMLSelectElement;\r\n new(): HTMLSelectElement;\r\n}\r\n\r\ninterface HTMLSourceElement extends HTMLElement {\r\n /**\r\n * Gets or sets the intended media type of the media source.\r\n */\r\n media: string;\r\n msKeySystem: string;\r\n sizes: string;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n srcset: string;\r\n /**\r\n * Gets or sets the MIME type of a media resource.\r\n */\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLSourceElement: {\r\n prototype: HTMLSourceElement;\r\n new(): HTMLSourceElement;\r\n}\r\n\r\ninterface HTMLSpanElement extends HTMLElement {\r\n}\r\n\r\ndeclare var HTMLSpanElement: {\r\n prototype: HTMLSpanElement;\r\n new(): HTMLSpanElement;\r\n}\r\n\r\ninterface HTMLStyleElement extends HTMLElement, LinkStyle {\r\n disabled: boolean;\r\n /**\r\n * Sets or retrieves the media type.\r\n */\r\n media: string;\r\n /**\r\n * Retrieves the CSS language in which the style sheet is written.\r\n */\r\n type: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLStyleElement: {\r\n prototype: HTMLStyleElement;\r\n new(): HTMLStyleElement;\r\n}\r\n\r\ninterface HTMLTableCaptionElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the alignment of the caption or legend.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves whether the caption appears at the top or bottom of the table.\r\n */\r\n vAlign: string;\r\n}\r\n\r\ndeclare var HTMLTableCaptionElement: {\r\n prototype: HTMLTableCaptionElement;\r\n new(): HTMLTableCaptionElement;\r\n}\r\n\r\ninterface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves abbreviated text for the object.\r\n */\r\n abbr: string;\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves a comma-delimited list of conceptual categories associated with the object.\r\n */\r\n axis: string;\r\n bgColor: any;\r\n /**\r\n * Retrieves the position of the object in the cells collection of a row.\r\n */\r\n readonly cellIndex: number;\r\n /**\r\n * Sets or retrieves the number columns in the table that the object should span.\r\n */\r\n colSpan: number;\r\n /**\r\n * Sets or retrieves a list of header cells that provide information for the object.\r\n */\r\n headers: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n /**\r\n * Sets or retrieves how many rows in a table the cell should span.\r\n */\r\n rowSpan: number;\r\n /**\r\n * Sets or retrieves the group of cells in a table to which the object's information applies.\r\n */\r\n scope: string;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableCellElement: {\r\n prototype: HTMLTableCellElement;\r\n new(): HTMLTableCellElement;\r\n}\r\n\r\ninterface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves the alignment of the object relative to the display or table.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves the number of columns in the group.\r\n */\r\n span: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: any;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableColElement: {\r\n prototype: HTMLTableColElement;\r\n new(): HTMLTableColElement;\r\n}\r\n\r\ninterface HTMLTableDataCellElement extends HTMLTableCellElement {\r\n}\r\n\r\ndeclare var HTMLTableDataCellElement: {\r\n prototype: HTMLTableDataCellElement;\r\n new(): HTMLTableDataCellElement;\r\n}\r\n\r\ninterface HTMLTableElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves a value that indicates the table alignment.\r\n */\r\n align: string;\r\n bgColor: any;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n border: string;\r\n /**\r\n * Sets or retrieves the border color of the object. \r\n */\r\n borderColor: any;\r\n /**\r\n * Retrieves the caption object of a table.\r\n */\r\n caption: HTMLTableCaptionElement;\r\n /**\r\n * Sets or retrieves the amount of space between the border of the cell and the content of the cell.\r\n */\r\n cellPadding: string;\r\n /**\r\n * Sets or retrieves the amount of space between cells in a table.\r\n */\r\n cellSpacing: string;\r\n /**\r\n * Sets or retrieves the number of columns in the table.\r\n */\r\n cols: number;\r\n /**\r\n * Sets or retrieves the way the border frame around the table is displayed.\r\n */\r\n frame: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Sets or retrieves the number of horizontal rows contained in the object.\r\n */\r\n rows: HTMLCollectionOf;\r\n /**\r\n * Sets or retrieves which dividing lines (inner borders) are displayed.\r\n */\r\n rules: string;\r\n /**\r\n * Sets or retrieves a description and/or structure of the object.\r\n */\r\n summary: string;\r\n /**\r\n * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.\r\n */\r\n tBodies: HTMLCollectionOf;\r\n /**\r\n * Retrieves the tFoot object of the table.\r\n */\r\n tFoot: HTMLTableSectionElement;\r\n /**\r\n * Retrieves the tHead object of the table.\r\n */\r\n tHead: HTMLTableSectionElement;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Creates an empty caption element in the table.\r\n */\r\n createCaption(): HTMLTableCaptionElement;\r\n /**\r\n * Creates an empty tBody element in the table.\r\n */\r\n createTBody(): HTMLTableSectionElement;\r\n /**\r\n * Creates an empty tFoot element in the table.\r\n */\r\n createTFoot(): HTMLTableSectionElement;\r\n /**\r\n * Returns the tHead element object if successful, or null otherwise.\r\n */\r\n createTHead(): HTMLTableSectionElement;\r\n /**\r\n * Deletes the caption element and its contents from the table.\r\n */\r\n deleteCaption(): void;\r\n /**\r\n * Removes the specified row (tr) from the element and from the rows collection.\r\n * @param index Number that specifies the zero-based position in the rows collection of the row to remove.\r\n */\r\n deleteRow(index?: number): void;\r\n /**\r\n * Deletes the tFoot element and its contents from the table.\r\n */\r\n deleteTFoot(): void;\r\n /**\r\n * Deletes the tHead element and its contents from the table.\r\n */\r\n deleteTHead(): void;\r\n /**\r\n * Creates a new row (tr) in the table, and adds the row to the rows collection.\r\n * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.\r\n */\r\n insertRow(index?: number): HTMLTableRowElement;\r\n}\r\n\r\ndeclare var HTMLTableElement: {\r\n prototype: HTMLTableElement;\r\n new(): HTMLTableElement;\r\n}\r\n\r\ninterface HTMLTableHeaderCellElement extends HTMLTableCellElement {\r\n /**\r\n * Sets or retrieves the group of cells in a table to which the object's information applies.\r\n */\r\n scope: string;\r\n}\r\n\r\ndeclare var HTMLTableHeaderCellElement: {\r\n prototype: HTMLTableHeaderCellElement;\r\n new(): HTMLTableHeaderCellElement;\r\n}\r\n\r\ninterface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n bgColor: any;\r\n /**\r\n * Retrieves a collection of all cells in the table row.\r\n */\r\n cells: HTMLCollectionOf;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Retrieves the position of the object in the rows collection for the table.\r\n */\r\n readonly rowIndex: number;\r\n /**\r\n * Retrieves the position of the object in the collection.\r\n */\r\n readonly sectionRowIndex: number;\r\n /**\r\n * Removes the specified cell from the table row, as well as from the cells collection.\r\n * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.\r\n */\r\n deleteCell(index?: number): void;\r\n /**\r\n * Creates a new cell in the table row, and adds the cell to the cells collection.\r\n * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.\r\n */\r\n insertCell(index?: number): HTMLTableDataCellElement;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableRowElement: {\r\n prototype: HTMLTableRowElement;\r\n new(): HTMLTableRowElement;\r\n}\r\n\r\ninterface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves a value that indicates the table alignment.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves the number of horizontal rows contained in the object.\r\n */\r\n rows: HTMLCollectionOf;\r\n /**\r\n * Removes the specified row (tr) from the element and from the rows collection.\r\n * @param index Number that specifies the zero-based position in the rows collection of the row to remove.\r\n */\r\n deleteRow(index?: number): void;\r\n /**\r\n * Creates a new row (tr) in the table, and adds the row to the rows collection.\r\n * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.\r\n */\r\n insertRow(index?: number): HTMLTableRowElement;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLTableSectionElement: {\r\n prototype: HTMLTableSectionElement;\r\n new(): HTMLTableSectionElement;\r\n}\r\n\r\ninterface HTMLTemplateElement extends HTMLElement {\r\n readonly content: DocumentFragment;\r\n}\r\n\r\ndeclare var HTMLTemplateElement: {\r\n prototype: HTMLTemplateElement;\r\n new(): HTMLTemplateElement;\r\n}\r\n\r\ninterface HTMLTextAreaElement extends HTMLElement {\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n cols: number;\r\n /**\r\n * Sets or retrieves the initial contents of the object.\r\n */\r\n defaultValue: string;\r\n disabled: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n readonly form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the maximum number of characters that the user can enter in a text control.\r\n */\r\n maxLength: number;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.\r\n */\r\n placeholder: string;\r\n /**\r\n * Sets or retrieves the value indicated whether the content of the object is read-only.\r\n */\r\n readOnly: boolean;\r\n /**\r\n * When present, marks an element that can't be submitted without a value.\r\n */\r\n required: boolean;\r\n /**\r\n * Sets or retrieves the number of horizontal rows contained in the object.\r\n */\r\n rows: number;\r\n /**\r\n * Gets or sets the end position or offset of a text selection.\r\n */\r\n selectionEnd: number;\r\n /**\r\n * Gets or sets the starting position or offset of a text selection.\r\n */\r\n selectionStart: number;\r\n /**\r\n * Sets or retrieves the value indicating whether the control is selected.\r\n */\r\n status: any;\r\n /**\r\n * Retrieves the type of control.\r\n */\r\n readonly type: string;\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as \"this is a required field\". The result is that the user sees validation messages without actually submitting.\r\n */\r\n readonly validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n readonly validity: ValidityState;\r\n /**\r\n * Retrieves or sets the text in the entry field of the textArea element.\r\n */\r\n value: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n readonly willValidate: boolean;\r\n /**\r\n * Sets or retrieves how to handle wordwrapping in the object.\r\n */\r\n wrap: string;\r\n minLength: number;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Highlights the input area of a form element.\r\n */\r\n select(): void;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n /**\r\n * Sets the start and end positions of a selection in a text field.\r\n * @param start The offset into the text field for the start of the selection.\r\n * @param end The offset into the text field for the end of the selection.\r\n */\r\n setSelectionRange(start: number, end: number): void;\r\n}\r\n\r\ndeclare var HTMLTextAreaElement: {\r\n prototype: HTMLTextAreaElement;\r\n new(): HTMLTextAreaElement;\r\n}\r\n\r\ninterface HTMLTitleElement extends HTMLElement {\r\n /**\r\n * Retrieves or sets the text of the object as a string. \r\n */\r\n text: string;\r\n}\r\n\r\ndeclare var HTMLTitleElement: {\r\n prototype: HTMLTitleElement;\r\n new(): HTMLTitleElement;\r\n}\r\n\r\ninterface HTMLTrackElement extends HTMLElement {\r\n default: boolean;\r\n kind: string;\r\n label: string;\r\n readonly readyState: number;\r\n src: string;\r\n srclang: string;\r\n readonly track: TextTrack;\r\n readonly ERROR: number;\r\n readonly LOADED: number;\r\n readonly LOADING: number;\r\n readonly NONE: number;\r\n}\r\n\r\ndeclare var HTMLTrackElement: {\r\n prototype: HTMLTrackElement;\r\n new(): HTMLTrackElement;\r\n readonly ERROR: number;\r\n readonly LOADED: number;\r\n readonly LOADING: number;\r\n readonly NONE: number;\r\n}\r\n\r\ninterface HTMLUListElement extends HTMLElement {\r\n compact: boolean;\r\n type: string;\r\n}\r\n\r\ndeclare var HTMLUListElement: {\r\n prototype: HTMLUListElement;\r\n new(): HTMLUListElement;\r\n}\r\n\r\ninterface HTMLUnknownElement extends HTMLElement {\r\n}\r\n\r\ndeclare var HTMLUnknownElement: {\r\n prototype: HTMLUnknownElement;\r\n new(): HTMLUnknownElement;\r\n}\r\n\r\ninterface HTMLVideoElement extends HTMLMediaElement {\r\n /**\r\n * Gets or sets the height of the video element.\r\n */\r\n height: number;\r\n msHorizontalMirror: boolean;\r\n readonly msIsLayoutOptimalForPlayback: boolean;\r\n readonly msIsStereo3D: boolean;\r\n msStereo3DPackingMode: string;\r\n msStereo3DRenderMode: string;\r\n msZoom: boolean;\r\n onMSVideoFormatChanged: (this: this, ev: Event) => any;\r\n onMSVideoFrameStepCompleted: (this: this, ev: Event) => any;\r\n onMSVideoOptimalLayoutChanged: (this: this, ev: Event) => any;\r\n /**\r\n * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.\r\n */\r\n poster: string;\r\n /**\r\n * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.\r\n */\r\n readonly videoHeight: number;\r\n /**\r\n * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.\r\n */\r\n readonly videoWidth: number;\r\n readonly webkitDisplayingFullscreen: boolean;\r\n readonly webkitSupportsFullscreen: boolean;\r\n /**\r\n * Gets or sets the width of the video element.\r\n */\r\n width: number;\r\n getVideoPlaybackQuality(): VideoPlaybackQuality;\r\n msFrameStep(forward: boolean): void;\r\n msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;\r\n msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void;\r\n webkitEnterFullScreen(): void;\r\n webkitEnterFullscreen(): void;\r\n webkitExitFullScreen(): void;\r\n webkitExitFullscreen(): void;\r\n addEventListener(type: \"MSContentZoom\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSManipulationStateChanged\", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSVideoFormatChanged\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSVideoFrameStepCompleted\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSVideoOptimalLayoutChanged\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"activate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecopy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforecut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforedeactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforepaste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"copy\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"cut\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deactivate\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"encrypted\", listener: (this: this, ev: MediaEncryptedEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"msneedkey\", listener: (this: this, ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"paste\", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"selectstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var HTMLVideoElement: {\r\n prototype: HTMLVideoElement;\r\n new(): HTMLVideoElement;\r\n}\r\n\r\ninterface HashChangeEvent extends Event {\r\n readonly newURL: string | null;\r\n readonly oldURL: string | null;\r\n}\r\n\r\ndeclare var HashChangeEvent: {\r\n prototype: HashChangeEvent;\r\n new(type: string, eventInitDict?: HashChangeEventInit): HashChangeEvent;\r\n}\r\n\r\ninterface History {\r\n readonly length: number;\r\n readonly state: any;\r\n back(distance?: any): void;\r\n forward(distance?: any): void;\r\n go(delta?: any): void;\r\n pushState(statedata: any, title?: string, url?: string): void;\r\n replaceState(statedata: any, title?: string, url?: string): void;\r\n}\r\n\r\ndeclare var History: {\r\n prototype: History;\r\n new(): History;\r\n}\r\n\r\ninterface IDBCursor {\r\n readonly direction: string;\r\n key: IDBKeyRange | IDBValidKey;\r\n readonly primaryKey: any;\r\n source: IDBObjectStore | IDBIndex;\r\n advance(count: number): void;\r\n continue(key?: IDBKeyRange | IDBValidKey): void;\r\n delete(): IDBRequest;\r\n update(value: any): IDBRequest;\r\n readonly NEXT: string;\r\n readonly NEXT_NO_DUPLICATE: string;\r\n readonly PREV: string;\r\n readonly PREV_NO_DUPLICATE: string;\r\n}\r\n\r\ndeclare var IDBCursor: {\r\n prototype: IDBCursor;\r\n new(): IDBCursor;\r\n readonly NEXT: string;\r\n readonly NEXT_NO_DUPLICATE: string;\r\n readonly PREV: string;\r\n readonly PREV_NO_DUPLICATE: string;\r\n}\r\n\r\ninterface IDBCursorWithValue extends IDBCursor {\r\n readonly value: any;\r\n}\r\n\r\ndeclare var IDBCursorWithValue: {\r\n prototype: IDBCursorWithValue;\r\n new(): IDBCursorWithValue;\r\n}\r\n\r\ninterface IDBDatabase extends EventTarget {\r\n readonly name: string;\r\n readonly objectStoreNames: DOMStringList;\r\n onabort: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n version: number;\r\n onversionchange: (ev: IDBVersionChangeEvent) => any;\r\n close(): void;\r\n createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;\r\n deleteObjectStore(name: string): void;\r\n transaction(storeNames: string | string[], mode?: string): IDBTransaction;\r\n addEventListener(type: \"versionchange\", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBDatabase: {\r\n prototype: IDBDatabase;\r\n new(): IDBDatabase;\r\n}\r\n\r\ninterface IDBFactory {\r\n cmp(first: any, second: any): number;\r\n deleteDatabase(name: string): IDBOpenDBRequest;\r\n open(name: string, version?: number): IDBOpenDBRequest;\r\n}\r\n\r\ndeclare var IDBFactory: {\r\n prototype: IDBFactory;\r\n new(): IDBFactory;\r\n}\r\n\r\ninterface IDBIndex {\r\n keyPath: string | string[];\r\n readonly name: string;\r\n readonly objectStore: IDBObjectStore;\r\n readonly unique: boolean;\r\n multiEntry: boolean;\r\n count(key?: IDBKeyRange | IDBValidKey): IDBRequest;\r\n get(key: IDBKeyRange | IDBValidKey): IDBRequest;\r\n getKey(key: IDBKeyRange | IDBValidKey): IDBRequest;\r\n openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;\r\n openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;\r\n}\r\n\r\ndeclare var IDBIndex: {\r\n prototype: IDBIndex;\r\n new(): IDBIndex;\r\n}\r\n\r\ninterface IDBKeyRange {\r\n readonly lower: any;\r\n readonly lowerOpen: boolean;\r\n readonly upper: any;\r\n readonly upperOpen: boolean;\r\n}\r\n\r\ndeclare var IDBKeyRange: {\r\n prototype: IDBKeyRange;\r\n new(): IDBKeyRange;\r\n bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;\r\n lowerBound(lower: any, open?: boolean): IDBKeyRange;\r\n only(value: any): IDBKeyRange;\r\n upperBound(upper: any, open?: boolean): IDBKeyRange;\r\n}\r\n\r\ninterface IDBObjectStore {\r\n readonly indexNames: DOMStringList;\r\n keyPath: string | string[];\r\n readonly name: string;\r\n readonly transaction: IDBTransaction;\r\n autoIncrement: boolean;\r\n add(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;\r\n clear(): IDBRequest;\r\n count(key?: IDBKeyRange | IDBValidKey): IDBRequest;\r\n createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;\r\n delete(key: IDBKeyRange | IDBValidKey): IDBRequest;\r\n deleteIndex(indexName: string): void;\r\n get(key: any): IDBRequest;\r\n index(name: string): IDBIndex;\r\n openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;\r\n put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;\r\n}\r\n\r\ndeclare var IDBObjectStore: {\r\n prototype: IDBObjectStore;\r\n new(): IDBObjectStore;\r\n}\r\n\r\ninterface IDBOpenDBRequest extends IDBRequest {\r\n onblocked: (this: this, ev: Event) => any;\r\n onupgradeneeded: (this: this, ev: IDBVersionChangeEvent) => any;\r\n addEventListener(type: \"blocked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"success\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"upgradeneeded\", listener: (this: this, ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBOpenDBRequest: {\r\n prototype: IDBOpenDBRequest;\r\n new(): IDBOpenDBRequest;\r\n}\r\n\r\ninterface IDBRequest extends EventTarget {\r\n readonly error: DOMError;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onsuccess: (this: this, ev: Event) => any;\r\n readonly readyState: string;\r\n readonly result: any;\r\n source: IDBObjectStore | IDBIndex | IDBCursor;\r\n readonly transaction: IDBTransaction;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"success\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBRequest: {\r\n prototype: IDBRequest;\r\n new(): IDBRequest;\r\n}\r\n\r\ninterface IDBTransaction extends EventTarget {\r\n readonly db: IDBDatabase;\r\n readonly error: DOMError;\r\n readonly mode: string;\r\n onabort: (this: this, ev: Event) => any;\r\n oncomplete: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n abort(): void;\r\n objectStore(name: string): IDBObjectStore;\r\n readonly READ_ONLY: string;\r\n readonly READ_WRITE: string;\r\n readonly VERSION_CHANGE: string;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"complete\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var IDBTransaction: {\r\n prototype: IDBTransaction;\r\n new(): IDBTransaction;\r\n readonly READ_ONLY: string;\r\n readonly READ_WRITE: string;\r\n readonly VERSION_CHANGE: string;\r\n}\r\n\r\ninterface IDBVersionChangeEvent extends Event {\r\n readonly newVersion: number | null;\r\n readonly oldVersion: number;\r\n}\r\n\r\ndeclare var IDBVersionChangeEvent: {\r\n prototype: IDBVersionChangeEvent;\r\n new(): IDBVersionChangeEvent;\r\n}\r\n\r\ninterface ImageData {\r\n data: Uint8ClampedArray;\r\n readonly height: number;\r\n readonly width: number;\r\n}\r\n\r\ndeclare var ImageData: {\r\n prototype: ImageData;\r\n new(width: number, height: number): ImageData;\r\n new(array: Uint8ClampedArray, width: number, height: number): ImageData;\r\n}\r\n\r\ninterface KeyboardEvent extends UIEvent {\r\n readonly altKey: boolean;\r\n readonly char: string | null;\r\n readonly charCode: number;\r\n readonly ctrlKey: boolean;\r\n readonly key: string;\r\n readonly keyCode: number;\r\n readonly locale: string;\r\n readonly location: number;\r\n readonly metaKey: boolean;\r\n readonly repeat: boolean;\r\n readonly shiftKey: boolean;\r\n readonly which: number;\r\n readonly code: string;\r\n getModifierState(keyArg: string): boolean;\r\n initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void;\r\n readonly DOM_KEY_LOCATION_JOYSTICK: number;\r\n readonly DOM_KEY_LOCATION_LEFT: number;\r\n readonly DOM_KEY_LOCATION_MOBILE: number;\r\n readonly DOM_KEY_LOCATION_NUMPAD: number;\r\n readonly DOM_KEY_LOCATION_RIGHT: number;\r\n readonly DOM_KEY_LOCATION_STANDARD: number;\r\n}\r\n\r\ndeclare var KeyboardEvent: {\r\n prototype: KeyboardEvent;\r\n new(typeArg: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;\r\n readonly DOM_KEY_LOCATION_JOYSTICK: number;\r\n readonly DOM_KEY_LOCATION_LEFT: number;\r\n readonly DOM_KEY_LOCATION_MOBILE: number;\r\n readonly DOM_KEY_LOCATION_NUMPAD: number;\r\n readonly DOM_KEY_LOCATION_RIGHT: number;\r\n readonly DOM_KEY_LOCATION_STANDARD: number;\r\n}\r\n\r\ninterface ListeningStateChangedEvent extends Event {\r\n readonly label: string;\r\n readonly state: string;\r\n}\r\n\r\ndeclare var ListeningStateChangedEvent: {\r\n prototype: ListeningStateChangedEvent;\r\n new(): ListeningStateChangedEvent;\r\n}\r\n\r\ninterface Location {\r\n hash: string;\r\n host: string;\r\n hostname: string;\r\n href: string;\r\n readonly origin: string;\r\n pathname: string;\r\n port: string;\r\n protocol: string;\r\n search: string;\r\n assign(url: string): void;\r\n reload(forcedReload?: boolean): void;\r\n replace(url: string): void;\r\n toString(): string;\r\n}\r\n\r\ndeclare var Location: {\r\n prototype: Location;\r\n new(): Location;\r\n}\r\n\r\ninterface LongRunningScriptDetectedEvent extends Event {\r\n readonly executionTime: number;\r\n stopPageScriptExecution: boolean;\r\n}\r\n\r\ndeclare var LongRunningScriptDetectedEvent: {\r\n prototype: LongRunningScriptDetectedEvent;\r\n new(): LongRunningScriptDetectedEvent;\r\n}\r\n\r\ninterface MSApp {\r\n clearTemporaryWebDataAsync(): MSAppAsyncOperation;\r\n createBlobFromRandomAccessStream(type: string, seeker: any): Blob;\r\n createDataPackage(object: any): any;\r\n createDataPackageFromSelection(): any;\r\n createFileFromStorageFile(storageFile: any): File;\r\n createStreamFromInputStream(type: string, inputStream: any): MSStream;\r\n execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;\r\n execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;\r\n getCurrentPriority(): string;\r\n getHtmlPrintDocumentSourceAsync(htmlDoc: any): PromiseLike;\r\n getViewId(view: any): any;\r\n isTaskScheduledAtPriorityOrHigher(priority: string): boolean;\r\n pageHandlesAllApplicationActivations(enabled: boolean): void;\r\n suppressSubdownloadCredentialPrompts(suppress: boolean): void;\r\n terminateApp(exceptionObject: any): void;\r\n readonly CURRENT: string;\r\n readonly HIGH: string;\r\n readonly IDLE: string;\r\n readonly NORMAL: string;\r\n}\r\ndeclare var MSApp: MSApp;\r\n\r\ninterface MSAppAsyncOperation extends EventTarget {\r\n readonly error: DOMError;\r\n oncomplete: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n readonly readyState: number;\r\n readonly result: any;\r\n start(): void;\r\n readonly COMPLETED: number;\r\n readonly ERROR: number;\r\n readonly STARTED: number;\r\n addEventListener(type: \"complete\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSAppAsyncOperation: {\r\n prototype: MSAppAsyncOperation;\r\n new(): MSAppAsyncOperation;\r\n readonly COMPLETED: number;\r\n readonly ERROR: number;\r\n readonly STARTED: number;\r\n}\r\n\r\ninterface MSAssertion {\r\n readonly id: string;\r\n readonly type: string;\r\n}\r\n\r\ndeclare var MSAssertion: {\r\n prototype: MSAssertion;\r\n new(): MSAssertion;\r\n}\r\n\r\ninterface MSBlobBuilder {\r\n append(data: any, endings?: string): void;\r\n getBlob(contentType?: string): Blob;\r\n}\r\n\r\ndeclare var MSBlobBuilder: {\r\n prototype: MSBlobBuilder;\r\n new(): MSBlobBuilder;\r\n}\r\n\r\ninterface MSCredentials {\r\n getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): PromiseLike;\r\n makeCredential(accountInfo: MSAccountInfo, params: MSCredentialParameters[], challenge?: string): PromiseLike;\r\n}\r\n\r\ndeclare var MSCredentials: {\r\n prototype: MSCredentials;\r\n new(): MSCredentials;\r\n}\r\n\r\ninterface MSFIDOCredentialAssertion extends MSAssertion {\r\n readonly algorithm: string | Algorithm;\r\n readonly attestation: any;\r\n readonly publicKey: string;\r\n readonly transportHints: string[];\r\n}\r\n\r\ndeclare var MSFIDOCredentialAssertion: {\r\n prototype: MSFIDOCredentialAssertion;\r\n new(): MSFIDOCredentialAssertion;\r\n}\r\n\r\ninterface MSFIDOSignature {\r\n readonly authnrData: string;\r\n readonly clientData: string;\r\n readonly signature: string;\r\n}\r\n\r\ndeclare var MSFIDOSignature: {\r\n prototype: MSFIDOSignature;\r\n new(): MSFIDOSignature;\r\n}\r\n\r\ninterface MSFIDOSignatureAssertion extends MSAssertion {\r\n readonly signature: MSFIDOSignature;\r\n}\r\n\r\ndeclare var MSFIDOSignatureAssertion: {\r\n prototype: MSFIDOSignatureAssertion;\r\n new(): MSFIDOSignatureAssertion;\r\n}\r\n\r\ninterface MSGesture {\r\n target: Element;\r\n addPointer(pointerId: number): void;\r\n stop(): void;\r\n}\r\n\r\ndeclare var MSGesture: {\r\n prototype: MSGesture;\r\n new(): MSGesture;\r\n}\r\n\r\ninterface MSGestureEvent extends UIEvent {\r\n readonly clientX: number;\r\n readonly clientY: number;\r\n readonly expansion: number;\r\n readonly gestureObject: any;\r\n readonly hwTimestamp: number;\r\n readonly offsetX: number;\r\n readonly offsetY: number;\r\n readonly rotation: number;\r\n readonly scale: number;\r\n readonly screenX: number;\r\n readonly screenY: number;\r\n readonly translationX: number;\r\n readonly translationY: number;\r\n readonly velocityAngular: number;\r\n readonly velocityExpansion: number;\r\n readonly velocityX: number;\r\n readonly velocityY: number;\r\n initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void;\r\n readonly MSGESTURE_FLAG_BEGIN: number;\r\n readonly MSGESTURE_FLAG_CANCEL: number;\r\n readonly MSGESTURE_FLAG_END: number;\r\n readonly MSGESTURE_FLAG_INERTIA: number;\r\n readonly MSGESTURE_FLAG_NONE: number;\r\n}\r\n\r\ndeclare var MSGestureEvent: {\r\n prototype: MSGestureEvent;\r\n new(): MSGestureEvent;\r\n readonly MSGESTURE_FLAG_BEGIN: number;\r\n readonly MSGESTURE_FLAG_CANCEL: number;\r\n readonly MSGESTURE_FLAG_END: number;\r\n readonly MSGESTURE_FLAG_INERTIA: number;\r\n readonly MSGESTURE_FLAG_NONE: number;\r\n}\r\n\r\ninterface MSGraphicsTrust {\r\n readonly constrictionActive: boolean;\r\n readonly status: string;\r\n}\r\n\r\ndeclare var MSGraphicsTrust: {\r\n prototype: MSGraphicsTrust;\r\n new(): MSGraphicsTrust;\r\n}\r\n\r\ninterface MSHTMLWebViewElement extends HTMLElement {\r\n readonly canGoBack: boolean;\r\n readonly canGoForward: boolean;\r\n readonly containsFullScreenElement: boolean;\r\n readonly documentTitle: string;\r\n height: number;\r\n readonly settings: MSWebViewSettings;\r\n src: string;\r\n width: number;\r\n addWebAllowedObject(name: string, applicationObject: any): void;\r\n buildLocalStreamUri(contentIdentifier: string, relativePath: string): string;\r\n capturePreviewToBlobAsync(): MSWebViewAsyncOperation;\r\n captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation;\r\n getDeferredPermissionRequestById(id: number): DeferredPermissionRequest;\r\n getDeferredPermissionRequests(): DeferredPermissionRequest[];\r\n goBack(): void;\r\n goForward(): void;\r\n invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation;\r\n navigate(uri: string): void;\r\n navigateToLocalStreamUri(source: string, streamResolver: any): void;\r\n navigateToString(contents: string): void;\r\n navigateWithHttpRequestMessage(requestMessage: any): void;\r\n refresh(): void;\r\n stop(): void;\r\n}\r\n\r\ndeclare var MSHTMLWebViewElement: {\r\n prototype: MSHTMLWebViewElement;\r\n new(): MSHTMLWebViewElement;\r\n}\r\n\r\ninterface MSInputMethodContext extends EventTarget {\r\n readonly compositionEndOffset: number;\r\n readonly compositionStartOffset: number;\r\n oncandidatewindowhide: (this: this, ev: Event) => any;\r\n oncandidatewindowshow: (this: this, ev: Event) => any;\r\n oncandidatewindowupdate: (this: this, ev: Event) => any;\r\n readonly target: HTMLElement;\r\n getCandidateWindowClientRect(): ClientRect;\r\n getCompositionAlternatives(): string[];\r\n hasComposition(): boolean;\r\n isCandidateWindowVisible(): boolean;\r\n addEventListener(type: \"MSCandidateWindowHide\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSCandidateWindowShow\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSCandidateWindowUpdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSInputMethodContext: {\r\n prototype: MSInputMethodContext;\r\n new(): MSInputMethodContext;\r\n}\r\n\r\ninterface MSManipulationEvent extends UIEvent {\r\n readonly currentState: number;\r\n readonly inertiaDestinationX: number;\r\n readonly inertiaDestinationY: number;\r\n readonly lastState: number;\r\n initMSManipulationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, lastState: number, currentState: number): void;\r\n readonly MS_MANIPULATION_STATE_ACTIVE: number;\r\n readonly MS_MANIPULATION_STATE_CANCELLED: number;\r\n readonly MS_MANIPULATION_STATE_COMMITTED: number;\r\n readonly MS_MANIPULATION_STATE_DRAGGING: number;\r\n readonly MS_MANIPULATION_STATE_INERTIA: number;\r\n readonly MS_MANIPULATION_STATE_PRESELECT: number;\r\n readonly MS_MANIPULATION_STATE_SELECTING: number;\r\n readonly MS_MANIPULATION_STATE_STOPPED: number;\r\n}\r\n\r\ndeclare var MSManipulationEvent: {\r\n prototype: MSManipulationEvent;\r\n new(): MSManipulationEvent;\r\n readonly MS_MANIPULATION_STATE_ACTIVE: number;\r\n readonly MS_MANIPULATION_STATE_CANCELLED: number;\r\n readonly MS_MANIPULATION_STATE_COMMITTED: number;\r\n readonly MS_MANIPULATION_STATE_DRAGGING: number;\r\n readonly MS_MANIPULATION_STATE_INERTIA: number;\r\n readonly MS_MANIPULATION_STATE_PRESELECT: number;\r\n readonly MS_MANIPULATION_STATE_SELECTING: number;\r\n readonly MS_MANIPULATION_STATE_STOPPED: number;\r\n}\r\n\r\ninterface MSMediaKeyError {\r\n readonly code: number;\r\n readonly systemCode: number;\r\n readonly MS_MEDIA_KEYERR_CLIENT: number;\r\n readonly MS_MEDIA_KEYERR_DOMAIN: number;\r\n readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;\r\n readonly MS_MEDIA_KEYERR_OUTPUT: number;\r\n readonly MS_MEDIA_KEYERR_SERVICE: number;\r\n readonly MS_MEDIA_KEYERR_UNKNOWN: number;\r\n}\r\n\r\ndeclare var MSMediaKeyError: {\r\n prototype: MSMediaKeyError;\r\n new(): MSMediaKeyError;\r\n readonly MS_MEDIA_KEYERR_CLIENT: number;\r\n readonly MS_MEDIA_KEYERR_DOMAIN: number;\r\n readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;\r\n readonly MS_MEDIA_KEYERR_OUTPUT: number;\r\n readonly MS_MEDIA_KEYERR_SERVICE: number;\r\n readonly MS_MEDIA_KEYERR_UNKNOWN: number;\r\n}\r\n\r\ninterface MSMediaKeyMessageEvent extends Event {\r\n readonly destinationURL: string | null;\r\n readonly message: Uint8Array;\r\n}\r\n\r\ndeclare var MSMediaKeyMessageEvent: {\r\n prototype: MSMediaKeyMessageEvent;\r\n new(): MSMediaKeyMessageEvent;\r\n}\r\n\r\ninterface MSMediaKeyNeededEvent extends Event {\r\n readonly initData: Uint8Array | null;\r\n}\r\n\r\ndeclare var MSMediaKeyNeededEvent: {\r\n prototype: MSMediaKeyNeededEvent;\r\n new(): MSMediaKeyNeededEvent;\r\n}\r\n\r\ninterface MSMediaKeySession extends EventTarget {\r\n readonly error: MSMediaKeyError | null;\r\n readonly keySystem: string;\r\n readonly sessionId: string;\r\n close(): void;\r\n update(key: Uint8Array): void;\r\n}\r\n\r\ndeclare var MSMediaKeySession: {\r\n prototype: MSMediaKeySession;\r\n new(): MSMediaKeySession;\r\n}\r\n\r\ninterface MSMediaKeys {\r\n readonly keySystem: string;\r\n createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession;\r\n}\r\n\r\ndeclare var MSMediaKeys: {\r\n prototype: MSMediaKeys;\r\n new(keySystem: string): MSMediaKeys;\r\n isTypeSupported(keySystem: string, type?: string): boolean;\r\n isTypeSupportedWithFeatures(keySystem: string, type?: string): string;\r\n}\r\n\r\ninterface MSPointerEvent extends MouseEvent {\r\n readonly currentPoint: any;\r\n readonly height: number;\r\n readonly hwTimestamp: number;\r\n readonly intermediatePoints: any;\r\n readonly isPrimary: boolean;\r\n readonly pointerId: number;\r\n readonly pointerType: any;\r\n readonly pressure: number;\r\n readonly rotation: number;\r\n readonly tiltX: number;\r\n readonly tiltY: number;\r\n readonly width: number;\r\n getCurrentPoint(element: Element): void;\r\n getIntermediatePoints(element: Element): void;\r\n initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;\r\n}\r\n\r\ndeclare var MSPointerEvent: {\r\n prototype: MSPointerEvent;\r\n new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;\r\n}\r\n\r\ninterface MSRangeCollection {\r\n readonly length: number;\r\n item(index: number): Range;\r\n [index: number]: Range;\r\n}\r\n\r\ndeclare var MSRangeCollection: {\r\n prototype: MSRangeCollection;\r\n new(): MSRangeCollection;\r\n}\r\n\r\ninterface MSSiteModeEvent extends Event {\r\n readonly actionURL: string;\r\n readonly buttonID: number;\r\n}\r\n\r\ndeclare var MSSiteModeEvent: {\r\n prototype: MSSiteModeEvent;\r\n new(): MSSiteModeEvent;\r\n}\r\n\r\ninterface MSStream {\r\n readonly type: string;\r\n msClose(): void;\r\n msDetachStream(): any;\r\n}\r\n\r\ndeclare var MSStream: {\r\n prototype: MSStream;\r\n new(): MSStream;\r\n}\r\n\r\ninterface MSStreamReader extends EventTarget, MSBaseReader {\r\n readonly error: DOMError;\r\n readAsArrayBuffer(stream: MSStream, size?: number): void;\r\n readAsBinaryString(stream: MSStream, size?: number): void;\r\n readAsBlob(stream: MSStream, size?: number): void;\r\n readAsDataURL(stream: MSStream, size?: number): void;\r\n readAsText(stream: MSStream, encoding?: string, size?: number): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSStreamReader: {\r\n prototype: MSStreamReader;\r\n new(): MSStreamReader;\r\n}\r\n\r\ninterface MSWebViewAsyncOperation extends EventTarget {\r\n readonly error: DOMError;\r\n oncomplete: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n readonly readyState: number;\r\n readonly result: any;\r\n readonly target: MSHTMLWebViewElement;\r\n readonly type: number;\r\n start(): void;\r\n readonly COMPLETED: number;\r\n readonly ERROR: number;\r\n readonly STARTED: number;\r\n readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;\r\n readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;\r\n readonly TYPE_INVOKE_SCRIPT: number;\r\n addEventListener(type: \"complete\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MSWebViewAsyncOperation: {\r\n prototype: MSWebViewAsyncOperation;\r\n new(): MSWebViewAsyncOperation;\r\n readonly COMPLETED: number;\r\n readonly ERROR: number;\r\n readonly STARTED: number;\r\n readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;\r\n readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;\r\n readonly TYPE_INVOKE_SCRIPT: number;\r\n}\r\n\r\ninterface MSWebViewSettings {\r\n isIndexedDBEnabled: boolean;\r\n isJavaScriptEnabled: boolean;\r\n}\r\n\r\ndeclare var MSWebViewSettings: {\r\n prototype: MSWebViewSettings;\r\n new(): MSWebViewSettings;\r\n}\r\n\r\ninterface MediaDeviceInfo {\r\n readonly deviceId: string;\r\n readonly groupId: string;\r\n readonly kind: string;\r\n readonly label: string;\r\n}\r\n\r\ndeclare var MediaDeviceInfo: {\r\n prototype: MediaDeviceInfo;\r\n new(): MediaDeviceInfo;\r\n}\r\n\r\ninterface MediaDevices extends EventTarget {\r\n ondevicechange: (this: this, ev: Event) => any;\r\n enumerateDevices(): any;\r\n getSupportedConstraints(): MediaTrackSupportedConstraints;\r\n getUserMedia(constraints: MediaStreamConstraints): PromiseLike;\r\n addEventListener(type: \"devicechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MediaDevices: {\r\n prototype: MediaDevices;\r\n new(): MediaDevices;\r\n}\r\n\r\ninterface MediaElementAudioSourceNode extends AudioNode {\r\n}\r\n\r\ndeclare var MediaElementAudioSourceNode: {\r\n prototype: MediaElementAudioSourceNode;\r\n new(): MediaElementAudioSourceNode;\r\n}\r\n\r\ninterface MediaEncryptedEvent extends Event {\r\n readonly initData: ArrayBuffer | null;\r\n readonly initDataType: string;\r\n}\r\n\r\ndeclare var MediaEncryptedEvent: {\r\n prototype: MediaEncryptedEvent;\r\n new(type: string, eventInitDict?: MediaEncryptedEventInit): MediaEncryptedEvent;\r\n}\r\n\r\ninterface MediaError {\r\n readonly code: number;\r\n readonly msExtendedCode: number;\r\n readonly MEDIA_ERR_ABORTED: number;\r\n readonly MEDIA_ERR_DECODE: number;\r\n readonly MEDIA_ERR_NETWORK: number;\r\n readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;\r\n readonly MS_MEDIA_ERR_ENCRYPTED: number;\r\n}\r\n\r\ndeclare var MediaError: {\r\n prototype: MediaError;\r\n new(): MediaError;\r\n readonly MEDIA_ERR_ABORTED: number;\r\n readonly MEDIA_ERR_DECODE: number;\r\n readonly MEDIA_ERR_NETWORK: number;\r\n readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;\r\n readonly MS_MEDIA_ERR_ENCRYPTED: number;\r\n}\r\n\r\ninterface MediaKeyMessageEvent extends Event {\r\n readonly message: ArrayBuffer;\r\n readonly messageType: string;\r\n}\r\n\r\ndeclare var MediaKeyMessageEvent: {\r\n prototype: MediaKeyMessageEvent;\r\n new(type: string, eventInitDict?: MediaKeyMessageEventInit): MediaKeyMessageEvent;\r\n}\r\n\r\ninterface MediaKeySession extends EventTarget {\r\n readonly closed: PromiseLike;\r\n readonly expiration: number;\r\n readonly keyStatuses: MediaKeyStatusMap;\r\n readonly sessionId: string;\r\n close(): PromiseLike;\r\n generateRequest(initDataType: string, initData: any): PromiseLike;\r\n load(sessionId: string): PromiseLike;\r\n remove(): PromiseLike;\r\n update(response: any): PromiseLike;\r\n}\r\n\r\ndeclare var MediaKeySession: {\r\n prototype: MediaKeySession;\r\n new(): MediaKeySession;\r\n}\r\n\r\ninterface MediaKeyStatusMap {\r\n readonly size: number;\r\n forEach(callback: ForEachCallback): void;\r\n get(keyId: any): string;\r\n has(keyId: any): boolean;\r\n}\r\n\r\ndeclare var MediaKeyStatusMap: {\r\n prototype: MediaKeyStatusMap;\r\n new(): MediaKeyStatusMap;\r\n}\r\n\r\ninterface MediaKeySystemAccess {\r\n readonly keySystem: string;\r\n createMediaKeys(): PromiseLike;\r\n getConfiguration(): MediaKeySystemConfiguration;\r\n}\r\n\r\ndeclare var MediaKeySystemAccess: {\r\n prototype: MediaKeySystemAccess;\r\n new(): MediaKeySystemAccess;\r\n}\r\n\r\ninterface MediaKeys {\r\n createSession(sessionType?: string): MediaKeySession;\r\n setServerCertificate(serverCertificate: any): PromiseLike;\r\n}\r\n\r\ndeclare var MediaKeys: {\r\n prototype: MediaKeys;\r\n new(): MediaKeys;\r\n}\r\n\r\ninterface MediaList {\r\n readonly length: number;\r\n mediaText: string;\r\n appendMedium(newMedium: string): void;\r\n deleteMedium(oldMedium: string): void;\r\n item(index: number): string;\r\n toString(): string;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var MediaList: {\r\n prototype: MediaList;\r\n new(): MediaList;\r\n}\r\n\r\ninterface MediaQueryList {\r\n readonly matches: boolean;\r\n readonly media: string;\r\n addListener(listener: MediaQueryListListener): void;\r\n removeListener(listener: MediaQueryListListener): void;\r\n}\r\n\r\ndeclare var MediaQueryList: {\r\n prototype: MediaQueryList;\r\n new(): MediaQueryList;\r\n}\r\n\r\ninterface MediaSource extends EventTarget {\r\n readonly activeSourceBuffers: SourceBufferList;\r\n duration: number;\r\n readonly readyState: string;\r\n readonly sourceBuffers: SourceBufferList;\r\n addSourceBuffer(type: string): SourceBuffer;\r\n endOfStream(error?: number): void;\r\n removeSourceBuffer(sourceBuffer: SourceBuffer): void;\r\n}\r\n\r\ndeclare var MediaSource: {\r\n prototype: MediaSource;\r\n new(): MediaSource;\r\n isTypeSupported(type: string): boolean;\r\n}\r\n\r\ninterface MediaStream extends EventTarget {\r\n readonly active: boolean;\r\n readonly id: string;\r\n onactive: (this: this, ev: Event) => any;\r\n onaddtrack: (this: this, ev: TrackEvent) => any;\r\n oninactive: (this: this, ev: Event) => any;\r\n onremovetrack: (this: this, ev: TrackEvent) => any;\r\n addTrack(track: MediaStreamTrack): void;\r\n clone(): MediaStream;\r\n getAudioTracks(): MediaStreamTrack[];\r\n getTrackById(trackId: string): MediaStreamTrack | null;\r\n getTracks(): MediaStreamTrack[];\r\n getVideoTracks(): MediaStreamTrack[];\r\n removeTrack(track: MediaStreamTrack): void;\r\n stop(): void;\r\n addEventListener(type: \"active\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"addtrack\", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"inactive\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"removetrack\", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MediaStream: {\r\n prototype: MediaStream;\r\n new(streamOrTracks?: MediaStream | MediaStreamTrack[]): MediaStream;\r\n}\r\n\r\ninterface MediaStreamAudioSourceNode extends AudioNode {\r\n}\r\n\r\ndeclare var MediaStreamAudioSourceNode: {\r\n prototype: MediaStreamAudioSourceNode;\r\n new(): MediaStreamAudioSourceNode;\r\n}\r\n\r\ninterface MediaStreamError {\r\n readonly constraintName: string | null;\r\n readonly message: string | null;\r\n readonly name: string;\r\n}\r\n\r\ndeclare var MediaStreamError: {\r\n prototype: MediaStreamError;\r\n new(): MediaStreamError;\r\n}\r\n\r\ninterface MediaStreamErrorEvent extends Event {\r\n readonly error: MediaStreamError | null;\r\n}\r\n\r\ndeclare var MediaStreamErrorEvent: {\r\n prototype: MediaStreamErrorEvent;\r\n new(type: string, eventInitDict?: MediaStreamErrorEventInit): MediaStreamErrorEvent;\r\n}\r\n\r\ninterface MediaStreamTrack extends EventTarget {\r\n enabled: boolean;\r\n readonly id: string;\r\n readonly kind: string;\r\n readonly label: string;\r\n readonly muted: boolean;\r\n onended: (this: this, ev: MediaStreamErrorEvent) => any;\r\n onmute: (this: this, ev: Event) => any;\r\n onoverconstrained: (this: this, ev: MediaStreamErrorEvent) => any;\r\n onunmute: (this: this, ev: Event) => any;\r\n readonly readonly: boolean;\r\n readonly readyState: string;\r\n readonly remote: boolean;\r\n applyConstraints(constraints: MediaTrackConstraints): PromiseLike;\r\n clone(): MediaStreamTrack;\r\n getCapabilities(): MediaTrackCapabilities;\r\n getConstraints(): MediaTrackConstraints;\r\n getSettings(): MediaTrackSettings;\r\n stop(): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mute\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"overconstrained\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"unmute\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MediaStreamTrack: {\r\n prototype: MediaStreamTrack;\r\n new(): MediaStreamTrack;\r\n}\r\n\r\ninterface MediaStreamTrackEvent extends Event {\r\n readonly track: MediaStreamTrack;\r\n}\r\n\r\ndeclare var MediaStreamTrackEvent: {\r\n prototype: MediaStreamTrackEvent;\r\n new(type: string, eventInitDict?: MediaStreamTrackEventInit): MediaStreamTrackEvent;\r\n}\r\n\r\ninterface MessageChannel {\r\n readonly port1: MessagePort;\r\n readonly port2: MessagePort;\r\n}\r\n\r\ndeclare var MessageChannel: {\r\n prototype: MessageChannel;\r\n new(): MessageChannel;\r\n}\r\n\r\ninterface MessageEvent extends Event {\r\n readonly data: any;\r\n readonly origin: string;\r\n readonly ports: any;\r\n readonly source: Window;\r\n initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: Window): void;\r\n}\r\n\r\ndeclare var MessageEvent: {\r\n prototype: MessageEvent;\r\n new(type: string, eventInitDict?: MessageEventInit): MessageEvent;\r\n}\r\n\r\ninterface MessagePort extends EventTarget {\r\n onmessage: (this: this, ev: MessageEvent) => any;\r\n close(): void;\r\n postMessage(message?: any, ports?: any): void;\r\n start(): void;\r\n addEventListener(type: \"message\", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var MessagePort: {\r\n prototype: MessagePort;\r\n new(): MessagePort;\r\n}\r\n\r\ninterface MimeType {\r\n readonly description: string;\r\n readonly enabledPlugin: Plugin;\r\n readonly suffixes: string;\r\n readonly type: string;\r\n}\r\n\r\ndeclare var MimeType: {\r\n prototype: MimeType;\r\n new(): MimeType;\r\n}\r\n\r\ninterface MimeTypeArray {\r\n readonly length: number;\r\n item(index: number): Plugin;\r\n namedItem(type: string): Plugin;\r\n [index: number]: Plugin;\r\n}\r\n\r\ndeclare var MimeTypeArray: {\r\n prototype: MimeTypeArray;\r\n new(): MimeTypeArray;\r\n}\r\n\r\ninterface MouseEvent extends UIEvent {\r\n readonly altKey: boolean;\r\n readonly button: number;\r\n readonly buttons: number;\r\n readonly clientX: number;\r\n readonly clientY: number;\r\n readonly ctrlKey: boolean;\r\n readonly fromElement: Element;\r\n readonly layerX: number;\r\n readonly layerY: number;\r\n readonly metaKey: boolean;\r\n readonly movementX: number;\r\n readonly movementY: number;\r\n readonly offsetX: number;\r\n readonly offsetY: number;\r\n readonly pageX: number;\r\n readonly pageY: number;\r\n readonly relatedTarget: EventTarget;\r\n readonly screenX: number;\r\n readonly screenY: number;\r\n readonly shiftKey: boolean;\r\n readonly toElement: Element;\r\n readonly which: number;\r\n readonly x: number;\r\n readonly y: number;\r\n getModifierState(keyArg: string): boolean;\r\n initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget): void;\r\n}\r\n\r\ndeclare var MouseEvent: {\r\n prototype: MouseEvent;\r\n new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;\r\n}\r\n\r\ninterface MutationEvent extends Event {\r\n readonly attrChange: number;\r\n readonly attrName: string;\r\n readonly newValue: string;\r\n readonly prevValue: string;\r\n readonly relatedNode: Node;\r\n initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void;\r\n readonly ADDITION: number;\r\n readonly MODIFICATION: number;\r\n readonly REMOVAL: number;\r\n}\r\n\r\ndeclare var MutationEvent: {\r\n prototype: MutationEvent;\r\n new(): MutationEvent;\r\n readonly ADDITION: number;\r\n readonly MODIFICATION: number;\r\n readonly REMOVAL: number;\r\n}\r\n\r\ninterface MutationObserver {\r\n disconnect(): void;\r\n observe(target: Node, options: MutationObserverInit): void;\r\n takeRecords(): MutationRecord[];\r\n}\r\n\r\ndeclare var MutationObserver: {\r\n prototype: MutationObserver;\r\n new(callback: MutationCallback): MutationObserver;\r\n}\r\n\r\ninterface MutationRecord {\r\n readonly addedNodes: NodeList;\r\n readonly attributeName: string | null;\r\n readonly attributeNamespace: string | null;\r\n readonly nextSibling: Node | null;\r\n readonly oldValue: string | null;\r\n readonly previousSibling: Node | null;\r\n readonly removedNodes: NodeList;\r\n readonly target: Node;\r\n readonly type: string;\r\n}\r\n\r\ndeclare var MutationRecord: {\r\n prototype: MutationRecord;\r\n new(): MutationRecord;\r\n}\r\n\r\ninterface NamedNodeMap {\r\n readonly length: number;\r\n getNamedItem(name: string): Attr;\r\n getNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;\r\n item(index: number): Attr;\r\n removeNamedItem(name: string): Attr;\r\n removeNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;\r\n setNamedItem(arg: Attr): Attr;\r\n setNamedItemNS(arg: Attr): Attr;\r\n [index: number]: Attr;\r\n}\r\n\r\ndeclare var NamedNodeMap: {\r\n prototype: NamedNodeMap;\r\n new(): NamedNodeMap;\r\n}\r\n\r\ninterface NavigationCompletedEvent extends NavigationEvent {\r\n readonly isSuccess: boolean;\r\n readonly webErrorStatus: number;\r\n}\r\n\r\ndeclare var NavigationCompletedEvent: {\r\n prototype: NavigationCompletedEvent;\r\n new(): NavigationCompletedEvent;\r\n}\r\n\r\ninterface NavigationEvent extends Event {\r\n readonly uri: string;\r\n}\r\n\r\ndeclare var NavigationEvent: {\r\n prototype: NavigationEvent;\r\n new(): NavigationEvent;\r\n}\r\n\r\ninterface NavigationEventWithReferrer extends NavigationEvent {\r\n readonly referer: string;\r\n}\r\n\r\ndeclare var NavigationEventWithReferrer: {\r\n prototype: NavigationEventWithReferrer;\r\n new(): NavigationEventWithReferrer;\r\n}\r\n\r\ninterface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorUserMedia {\r\n readonly appCodeName: string;\r\n readonly cookieEnabled: boolean;\r\n readonly language: string;\r\n readonly maxTouchPoints: number;\r\n readonly mimeTypes: MimeTypeArray;\r\n readonly msManipulationViewsEnabled: boolean;\r\n readonly msMaxTouchPoints: number;\r\n readonly msPointerEnabled: boolean;\r\n readonly plugins: PluginArray;\r\n readonly pointerEnabled: boolean;\r\n readonly webdriver: boolean;\r\n getGamepads(): Gamepad[];\r\n javaEnabled(): boolean;\r\n msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;\r\n requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): PromiseLike;\r\n vibrate(pattern: number | number[]): boolean;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Navigator: {\r\n prototype: Navigator;\r\n new(): Navigator;\r\n}\r\n\r\ninterface Node extends EventTarget {\r\n readonly attributes: NamedNodeMap;\r\n readonly baseURI: string | null;\r\n readonly childNodes: NodeList;\r\n readonly firstChild: Node;\r\n readonly lastChild: Node;\r\n readonly localName: string | null;\r\n readonly namespaceURI: string | null;\r\n readonly nextSibling: Node;\r\n readonly nodeName: string;\r\n readonly nodeType: number;\r\n nodeValue: string | null;\r\n readonly ownerDocument: Document;\r\n readonly parentElement: HTMLElement;\r\n readonly parentNode: Node;\r\n readonly previousSibling: Node;\r\n textContent: string | null;\r\n appendChild(newChild: Node): Node;\r\n cloneNode(deep?: boolean): Node;\r\n compareDocumentPosition(other: Node): number;\r\n contains(child: Node): boolean;\r\n hasAttributes(): boolean;\r\n hasChildNodes(): boolean;\r\n insertBefore(newChild: Node, refChild: Node | null): Node;\r\n isDefaultNamespace(namespaceURI: string | null): boolean;\r\n isEqualNode(arg: Node): boolean;\r\n isSameNode(other: Node): boolean;\r\n lookupNamespaceURI(prefix: string | null): string | null;\r\n lookupPrefix(namespaceURI: string | null): string | null;\r\n normalize(): void;\r\n removeChild(oldChild: Node): Node;\r\n replaceChild(newChild: Node, oldChild: Node): Node;\r\n readonly ATTRIBUTE_NODE: number;\r\n readonly CDATA_SECTION_NODE: number;\r\n readonly COMMENT_NODE: number;\r\n readonly DOCUMENT_FRAGMENT_NODE: number;\r\n readonly DOCUMENT_NODE: number;\r\n readonly DOCUMENT_POSITION_CONTAINED_BY: number;\r\n readonly DOCUMENT_POSITION_CONTAINS: number;\r\n readonly DOCUMENT_POSITION_DISCONNECTED: number;\r\n readonly DOCUMENT_POSITION_FOLLOWING: number;\r\n readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;\r\n readonly DOCUMENT_POSITION_PRECEDING: number;\r\n readonly DOCUMENT_TYPE_NODE: number;\r\n readonly ELEMENT_NODE: number;\r\n readonly ENTITY_NODE: number;\r\n readonly ENTITY_REFERENCE_NODE: number;\r\n readonly NOTATION_NODE: number;\r\n readonly PROCESSING_INSTRUCTION_NODE: number;\r\n readonly TEXT_NODE: number;\r\n}\r\n\r\ndeclare var Node: {\r\n prototype: Node;\r\n new(): Node;\r\n readonly ATTRIBUTE_NODE: number;\r\n readonly CDATA_SECTION_NODE: number;\r\n readonly COMMENT_NODE: number;\r\n readonly DOCUMENT_FRAGMENT_NODE: number;\r\n readonly DOCUMENT_NODE: number;\r\n readonly DOCUMENT_POSITION_CONTAINED_BY: number;\r\n readonly DOCUMENT_POSITION_CONTAINS: number;\r\n readonly DOCUMENT_POSITION_DISCONNECTED: number;\r\n readonly DOCUMENT_POSITION_FOLLOWING: number;\r\n readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;\r\n readonly DOCUMENT_POSITION_PRECEDING: number;\r\n readonly DOCUMENT_TYPE_NODE: number;\r\n readonly ELEMENT_NODE: number;\r\n readonly ENTITY_NODE: number;\r\n readonly ENTITY_REFERENCE_NODE: number;\r\n readonly NOTATION_NODE: number;\r\n readonly PROCESSING_INSTRUCTION_NODE: number;\r\n readonly TEXT_NODE: number;\r\n}\r\n\r\ninterface NodeFilter {\r\n acceptNode(n: Node): number;\r\n}\r\n\r\ndeclare var NodeFilter: {\r\n readonly FILTER_ACCEPT: number;\r\n readonly FILTER_REJECT: number;\r\n readonly FILTER_SKIP: number;\r\n readonly SHOW_ALL: number;\r\n readonly SHOW_ATTRIBUTE: number;\r\n readonly SHOW_CDATA_SECTION: number;\r\n readonly SHOW_COMMENT: number;\r\n readonly SHOW_DOCUMENT: number;\r\n readonly SHOW_DOCUMENT_FRAGMENT: number;\r\n readonly SHOW_DOCUMENT_TYPE: number;\r\n readonly SHOW_ELEMENT: number;\r\n readonly SHOW_ENTITY: number;\r\n readonly SHOW_ENTITY_REFERENCE: number;\r\n readonly SHOW_NOTATION: number;\r\n readonly SHOW_PROCESSING_INSTRUCTION: number;\r\n readonly SHOW_TEXT: number;\r\n}\r\n\r\ninterface NodeIterator {\r\n readonly expandEntityReferences: boolean;\r\n readonly filter: NodeFilter;\r\n readonly root: Node;\r\n readonly whatToShow: number;\r\n detach(): void;\r\n nextNode(): Node;\r\n previousNode(): Node;\r\n}\r\n\r\ndeclare var NodeIterator: {\r\n prototype: NodeIterator;\r\n new(): NodeIterator;\r\n}\r\n\r\ninterface NodeList {\r\n readonly length: number;\r\n item(index: number): Node;\r\n [index: number]: Node;\r\n}\r\n\r\ndeclare var NodeList: {\r\n prototype: NodeList;\r\n new(): NodeList;\r\n}\r\n\r\ninterface OES_element_index_uint {\r\n}\r\n\r\ndeclare var OES_element_index_uint: {\r\n prototype: OES_element_index_uint;\r\n new(): OES_element_index_uint;\r\n}\r\n\r\ninterface OES_standard_derivatives {\r\n readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;\r\n}\r\n\r\ndeclare var OES_standard_derivatives: {\r\n prototype: OES_standard_derivatives;\r\n new(): OES_standard_derivatives;\r\n readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;\r\n}\r\n\r\ninterface OES_texture_float {\r\n}\r\n\r\ndeclare var OES_texture_float: {\r\n prototype: OES_texture_float;\r\n new(): OES_texture_float;\r\n}\r\n\r\ninterface OES_texture_float_linear {\r\n}\r\n\r\ndeclare var OES_texture_float_linear: {\r\n prototype: OES_texture_float_linear;\r\n new(): OES_texture_float_linear;\r\n}\r\n\r\ninterface OfflineAudioCompletionEvent extends Event {\r\n readonly renderedBuffer: AudioBuffer;\r\n}\r\n\r\ndeclare var OfflineAudioCompletionEvent: {\r\n prototype: OfflineAudioCompletionEvent;\r\n new(): OfflineAudioCompletionEvent;\r\n}\r\n\r\ninterface OfflineAudioContext extends AudioContext {\r\n oncomplete: (this: this, ev: Event) => any;\r\n startRendering(): PromiseLike;\r\n addEventListener(type: \"complete\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var OfflineAudioContext: {\r\n prototype: OfflineAudioContext;\r\n new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;\r\n}\r\n\r\ninterface OscillatorNode extends AudioNode {\r\n readonly detune: AudioParam;\r\n readonly frequency: AudioParam;\r\n onended: (this: this, ev: MediaStreamErrorEvent) => any;\r\n type: string;\r\n setPeriodicWave(periodicWave: PeriodicWave): void;\r\n start(when?: number): void;\r\n stop(when?: number): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var OscillatorNode: {\r\n prototype: OscillatorNode;\r\n new(): OscillatorNode;\r\n}\r\n\r\ninterface OverflowEvent extends UIEvent {\r\n readonly horizontalOverflow: boolean;\r\n readonly orient: number;\r\n readonly verticalOverflow: boolean;\r\n readonly BOTH: number;\r\n readonly HORIZONTAL: number;\r\n readonly VERTICAL: number;\r\n}\r\n\r\ndeclare var OverflowEvent: {\r\n prototype: OverflowEvent;\r\n new(): OverflowEvent;\r\n readonly BOTH: number;\r\n readonly HORIZONTAL: number;\r\n readonly VERTICAL: number;\r\n}\r\n\r\ninterface PageTransitionEvent extends Event {\r\n readonly persisted: boolean;\r\n}\r\n\r\ndeclare var PageTransitionEvent: {\r\n prototype: PageTransitionEvent;\r\n new(): PageTransitionEvent;\r\n}\r\n\r\ninterface PannerNode extends AudioNode {\r\n coneInnerAngle: number;\r\n coneOuterAngle: number;\r\n coneOuterGain: number;\r\n distanceModel: string;\r\n maxDistance: number;\r\n panningModel: string;\r\n refDistance: number;\r\n rolloffFactor: number;\r\n setOrientation(x: number, y: number, z: number): void;\r\n setPosition(x: number, y: number, z: number): void;\r\n setVelocity(x: number, y: number, z: number): void;\r\n}\r\n\r\ndeclare var PannerNode: {\r\n prototype: PannerNode;\r\n new(): PannerNode;\r\n}\r\n\r\ninterface PerfWidgetExternal {\r\n readonly activeNetworkRequestCount: number;\r\n readonly averageFrameTime: number;\r\n readonly averagePaintTime: number;\r\n readonly extraInformationEnabled: boolean;\r\n readonly independentRenderingEnabled: boolean;\r\n readonly irDisablingContentString: string;\r\n readonly irStatusAvailable: boolean;\r\n readonly maxCpuSpeed: number;\r\n readonly paintRequestsPerSecond: number;\r\n readonly performanceCounter: number;\r\n readonly performanceCounterFrequency: number;\r\n addEventListener(eventType: string, callback: Function): void;\r\n getMemoryUsage(): number;\r\n getProcessCpuUsage(): number;\r\n getRecentCpuUsage(last: number | null): any;\r\n getRecentFrames(last: number | null): any;\r\n getRecentMemoryUsage(last: number | null): any;\r\n getRecentPaintRequests(last: number | null): any;\r\n removeEventListener(eventType: string, callback: Function): void;\r\n repositionWindow(x: number, y: number): void;\r\n resizeWindow(width: number, height: number): void;\r\n}\r\n\r\ndeclare var PerfWidgetExternal: {\r\n prototype: PerfWidgetExternal;\r\n new(): PerfWidgetExternal;\r\n}\r\n\r\ninterface Performance {\r\n readonly navigation: PerformanceNavigation;\r\n readonly timing: PerformanceTiming;\r\n clearMarks(markName?: string): void;\r\n clearMeasures(measureName?: string): void;\r\n clearResourceTimings(): void;\r\n getEntries(): any;\r\n getEntriesByName(name: string, entryType?: string): any;\r\n getEntriesByType(entryType: string): any;\r\n getMarks(markName?: string): any;\r\n getMeasures(measureName?: string): any;\r\n mark(markName: string): void;\r\n measure(measureName: string, startMarkName?: string, endMarkName?: string): void;\r\n now(): number;\r\n setResourceTimingBufferSize(maxSize: number): void;\r\n toJSON(): any;\r\n}\r\n\r\ndeclare var Performance: {\r\n prototype: Performance;\r\n new(): Performance;\r\n}\r\n\r\ninterface PerformanceEntry {\r\n readonly duration: number;\r\n readonly entryType: string;\r\n readonly name: string;\r\n readonly startTime: number;\r\n}\r\n\r\ndeclare var PerformanceEntry: {\r\n prototype: PerformanceEntry;\r\n new(): PerformanceEntry;\r\n}\r\n\r\ninterface PerformanceMark extends PerformanceEntry {\r\n}\r\n\r\ndeclare var PerformanceMark: {\r\n prototype: PerformanceMark;\r\n new(): PerformanceMark;\r\n}\r\n\r\ninterface PerformanceMeasure extends PerformanceEntry {\r\n}\r\n\r\ndeclare var PerformanceMeasure: {\r\n prototype: PerformanceMeasure;\r\n new(): PerformanceMeasure;\r\n}\r\n\r\ninterface PerformanceNavigation {\r\n readonly redirectCount: number;\r\n readonly type: number;\r\n toJSON(): any;\r\n readonly TYPE_BACK_FORWARD: number;\r\n readonly TYPE_NAVIGATE: number;\r\n readonly TYPE_RELOAD: number;\r\n readonly TYPE_RESERVED: number;\r\n}\r\n\r\ndeclare var PerformanceNavigation: {\r\n prototype: PerformanceNavigation;\r\n new(): PerformanceNavigation;\r\n readonly TYPE_BACK_FORWARD: number;\r\n readonly TYPE_NAVIGATE: number;\r\n readonly TYPE_RELOAD: number;\r\n readonly TYPE_RESERVED: number;\r\n}\r\n\r\ninterface PerformanceNavigationTiming extends PerformanceEntry {\r\n readonly connectEnd: number;\r\n readonly connectStart: number;\r\n readonly domComplete: number;\r\n readonly domContentLoadedEventEnd: number;\r\n readonly domContentLoadedEventStart: number;\r\n readonly domInteractive: number;\r\n readonly domLoading: number;\r\n readonly domainLookupEnd: number;\r\n readonly domainLookupStart: number;\r\n readonly fetchStart: number;\r\n readonly loadEventEnd: number;\r\n readonly loadEventStart: number;\r\n readonly navigationStart: number;\r\n readonly redirectCount: number;\r\n readonly redirectEnd: number;\r\n readonly redirectStart: number;\r\n readonly requestStart: number;\r\n readonly responseEnd: number;\r\n readonly responseStart: number;\r\n readonly type: string;\r\n readonly unloadEventEnd: number;\r\n readonly unloadEventStart: number;\r\n}\r\n\r\ndeclare var PerformanceNavigationTiming: {\r\n prototype: PerformanceNavigationTiming;\r\n new(): PerformanceNavigationTiming;\r\n}\r\n\r\ninterface PerformanceResourceTiming extends PerformanceEntry {\r\n readonly connectEnd: number;\r\n readonly connectStart: number;\r\n readonly domainLookupEnd: number;\r\n readonly domainLookupStart: number;\r\n readonly fetchStart: number;\r\n readonly initiatorType: string;\r\n readonly redirectEnd: number;\r\n readonly redirectStart: number;\r\n readonly requestStart: number;\r\n readonly responseEnd: number;\r\n readonly responseStart: number;\r\n}\r\n\r\ndeclare var PerformanceResourceTiming: {\r\n prototype: PerformanceResourceTiming;\r\n new(): PerformanceResourceTiming;\r\n}\r\n\r\ninterface PerformanceTiming {\r\n readonly connectEnd: number;\r\n readonly connectStart: number;\r\n readonly domComplete: number;\r\n readonly domContentLoadedEventEnd: number;\r\n readonly domContentLoadedEventStart: number;\r\n readonly domInteractive: number;\r\n readonly domLoading: number;\r\n readonly domainLookupEnd: number;\r\n readonly domainLookupStart: number;\r\n readonly fetchStart: number;\r\n readonly loadEventEnd: number;\r\n readonly loadEventStart: number;\r\n readonly msFirstPaint: number;\r\n readonly navigationStart: number;\r\n readonly redirectEnd: number;\r\n readonly redirectStart: number;\r\n readonly requestStart: number;\r\n readonly responseEnd: number;\r\n readonly responseStart: number;\r\n readonly unloadEventEnd: number;\r\n readonly unloadEventStart: number;\r\n readonly secureConnectionStart: number;\r\n toJSON(): any;\r\n}\r\n\r\ndeclare var PerformanceTiming: {\r\n prototype: PerformanceTiming;\r\n new(): PerformanceTiming;\r\n}\r\n\r\ninterface PeriodicWave {\r\n}\r\n\r\ndeclare var PeriodicWave: {\r\n prototype: PeriodicWave;\r\n new(): PeriodicWave;\r\n}\r\n\r\ninterface PermissionRequest extends DeferredPermissionRequest {\r\n readonly state: string;\r\n defer(): void;\r\n}\r\n\r\ndeclare var PermissionRequest: {\r\n prototype: PermissionRequest;\r\n new(): PermissionRequest;\r\n}\r\n\r\ninterface PermissionRequestedEvent extends Event {\r\n readonly permissionRequest: PermissionRequest;\r\n}\r\n\r\ndeclare var PermissionRequestedEvent: {\r\n prototype: PermissionRequestedEvent;\r\n new(): PermissionRequestedEvent;\r\n}\r\n\r\ninterface Plugin {\r\n readonly description: string;\r\n readonly filename: string;\r\n readonly length: number;\r\n readonly name: string;\r\n readonly version: string;\r\n item(index: number): MimeType;\r\n namedItem(type: string): MimeType;\r\n [index: number]: MimeType;\r\n}\r\n\r\ndeclare var Plugin: {\r\n prototype: Plugin;\r\n new(): Plugin;\r\n}\r\n\r\ninterface PluginArray {\r\n readonly length: number;\r\n item(index: number): Plugin;\r\n namedItem(name: string): Plugin;\r\n refresh(reload?: boolean): void;\r\n [index: number]: Plugin;\r\n}\r\n\r\ndeclare var PluginArray: {\r\n prototype: PluginArray;\r\n new(): PluginArray;\r\n}\r\n\r\ninterface PointerEvent extends MouseEvent {\r\n readonly currentPoint: any;\r\n readonly height: number;\r\n readonly hwTimestamp: number;\r\n readonly intermediatePoints: any;\r\n readonly isPrimary: boolean;\r\n readonly pointerId: number;\r\n readonly pointerType: any;\r\n readonly pressure: number;\r\n readonly rotation: number;\r\n readonly tiltX: number;\r\n readonly tiltY: number;\r\n readonly width: number;\r\n getCurrentPoint(element: Element): void;\r\n getIntermediatePoints(element: Element): void;\r\n initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;\r\n}\r\n\r\ndeclare var PointerEvent: {\r\n prototype: PointerEvent;\r\n new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;\r\n}\r\n\r\ninterface PopStateEvent extends Event {\r\n readonly state: any;\r\n initPopStateEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, stateArg: any): void;\r\n}\r\n\r\ndeclare var PopStateEvent: {\r\n prototype: PopStateEvent;\r\n new(): PopStateEvent;\r\n}\r\n\r\ninterface Position {\r\n readonly coords: Coordinates;\r\n readonly timestamp: number;\r\n}\r\n\r\ndeclare var Position: {\r\n prototype: Position;\r\n new(): Position;\r\n}\r\n\r\ninterface PositionError {\r\n readonly code: number;\r\n readonly message: string;\r\n toString(): string;\r\n readonly PERMISSION_DENIED: number;\r\n readonly POSITION_UNAVAILABLE: number;\r\n readonly TIMEOUT: number;\r\n}\r\n\r\ndeclare var PositionError: {\r\n prototype: PositionError;\r\n new(): PositionError;\r\n readonly PERMISSION_DENIED: number;\r\n readonly POSITION_UNAVAILABLE: number;\r\n readonly TIMEOUT: number;\r\n}\r\n\r\ninterface ProcessingInstruction extends CharacterData {\r\n readonly target: string;\r\n}\r\n\r\ndeclare var ProcessingInstruction: {\r\n prototype: ProcessingInstruction;\r\n new(): ProcessingInstruction;\r\n}\r\n\r\ninterface ProgressEvent extends Event {\r\n readonly lengthComputable: boolean;\r\n readonly loaded: number;\r\n readonly total: number;\r\n initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;\r\n}\r\n\r\ndeclare var ProgressEvent: {\r\n prototype: ProgressEvent;\r\n new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;\r\n}\r\n\r\ninterface RTCDTMFToneChangeEvent extends Event {\r\n readonly tone: string;\r\n}\r\n\r\ndeclare var RTCDTMFToneChangeEvent: {\r\n prototype: RTCDTMFToneChangeEvent;\r\n new(type: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;\r\n}\r\n\r\ninterface RTCDtlsTransport extends RTCStatsProvider {\r\n ondtlsstatechange: ((this: this, ev: RTCDtlsTransportStateChangedEvent) => any) | null;\r\n onerror: ((this: this, ev: ErrorEvent) => any) | null;\r\n readonly state: string;\r\n readonly transport: RTCIceTransport;\r\n getLocalParameters(): RTCDtlsParameters;\r\n getRemoteCertificates(): ArrayBuffer[];\r\n getRemoteParameters(): RTCDtlsParameters | null;\r\n start(remoteParameters: RTCDtlsParameters): void;\r\n stop(): void;\r\n addEventListener(type: \"dtlsstatechange\", listener: (this: this, ev: RTCDtlsTransportStateChangedEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var RTCDtlsTransport: {\r\n prototype: RTCDtlsTransport;\r\n new(transport: RTCIceTransport): RTCDtlsTransport;\r\n}\r\n\r\ninterface RTCDtlsTransportStateChangedEvent extends Event {\r\n readonly state: string;\r\n}\r\n\r\ndeclare var RTCDtlsTransportStateChangedEvent: {\r\n prototype: RTCDtlsTransportStateChangedEvent;\r\n new(): RTCDtlsTransportStateChangedEvent;\r\n}\r\n\r\ninterface RTCDtmfSender extends EventTarget {\r\n readonly canInsertDTMF: boolean;\r\n readonly duration: number;\r\n readonly interToneGap: number;\r\n ontonechange: (this: this, ev: RTCDTMFToneChangeEvent) => any;\r\n readonly sender: RTCRtpSender;\r\n readonly toneBuffer: string;\r\n insertDTMF(tones: string, duration?: number, interToneGap?: number): void;\r\n addEventListener(type: \"tonechange\", listener: (this: this, ev: RTCDTMFToneChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var RTCDtmfSender: {\r\n prototype: RTCDtmfSender;\r\n new(sender: RTCRtpSender): RTCDtmfSender;\r\n}\r\n\r\ninterface RTCIceCandidatePairChangedEvent extends Event {\r\n readonly pair: RTCIceCandidatePair;\r\n}\r\n\r\ndeclare var RTCIceCandidatePairChangedEvent: {\r\n prototype: RTCIceCandidatePairChangedEvent;\r\n new(): RTCIceCandidatePairChangedEvent;\r\n}\r\n\r\ninterface RTCIceGatherer extends RTCStatsProvider {\r\n readonly component: string;\r\n onerror: ((this: this, ev: ErrorEvent) => any) | null;\r\n onlocalcandidate: ((this: this, ev: RTCIceGathererEvent) => any) | null;\r\n createAssociatedGatherer(): RTCIceGatherer;\r\n getLocalCandidates(): RTCIceCandidate[];\r\n getLocalParameters(): RTCIceParameters;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"localcandidate\", listener: (this: this, ev: RTCIceGathererEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var RTCIceGatherer: {\r\n prototype: RTCIceGatherer;\r\n new(options: RTCIceGatherOptions): RTCIceGatherer;\r\n}\r\n\r\ninterface RTCIceGathererEvent extends Event {\r\n readonly candidate: RTCIceCandidate | RTCIceCandidateComplete;\r\n}\r\n\r\ndeclare var RTCIceGathererEvent: {\r\n prototype: RTCIceGathererEvent;\r\n new(): RTCIceGathererEvent;\r\n}\r\n\r\ninterface RTCIceTransport extends RTCStatsProvider {\r\n readonly component: string;\r\n readonly iceGatherer: RTCIceGatherer | null;\r\n oncandidatepairchange: ((this: this, ev: RTCIceCandidatePairChangedEvent) => any) | null;\r\n onicestatechange: ((this: this, ev: RTCIceTransportStateChangedEvent) => any) | null;\r\n readonly role: string;\r\n readonly state: string;\r\n addRemoteCandidate(remoteCandidate: RTCIceCandidate | RTCIceCandidateComplete): void;\r\n createAssociatedTransport(): RTCIceTransport;\r\n getNominatedCandidatePair(): RTCIceCandidatePair | null;\r\n getRemoteCandidates(): RTCIceCandidate[];\r\n getRemoteParameters(): RTCIceParameters | null;\r\n setRemoteCandidates(remoteCandidates: RTCIceCandidate[]): void;\r\n start(gatherer: RTCIceGatherer, remoteParameters: RTCIceParameters, role?: string): void;\r\n stop(): void;\r\n addEventListener(type: \"candidatepairchange\", listener: (this: this, ev: RTCIceCandidatePairChangedEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"icestatechange\", listener: (this: this, ev: RTCIceTransportStateChangedEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var RTCIceTransport: {\r\n prototype: RTCIceTransport;\r\n new(): RTCIceTransport;\r\n}\r\n\r\ninterface RTCIceTransportStateChangedEvent extends Event {\r\n readonly state: string;\r\n}\r\n\r\ndeclare var RTCIceTransportStateChangedEvent: {\r\n prototype: RTCIceTransportStateChangedEvent;\r\n new(): RTCIceTransportStateChangedEvent;\r\n}\r\n\r\ninterface RTCRtpReceiver extends RTCStatsProvider {\r\n onerror: ((this: this, ev: ErrorEvent) => any) | null;\r\n readonly rtcpTransport: RTCDtlsTransport;\r\n readonly track: MediaStreamTrack | null;\r\n readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;\r\n getContributingSources(): RTCRtpContributingSource[];\r\n receive(parameters: RTCRtpParameters): void;\r\n requestSendCSRC(csrc: number): void;\r\n setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;\r\n stop(): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var RTCRtpReceiver: {\r\n prototype: RTCRtpReceiver;\r\n new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver;\r\n getCapabilities(kind?: string): RTCRtpCapabilities;\r\n}\r\n\r\ninterface RTCRtpSender extends RTCStatsProvider {\r\n onerror: ((this: this, ev: ErrorEvent) => any) | null;\r\n onssrcconflict: ((this: this, ev: RTCSsrcConflictEvent) => any) | null;\r\n readonly rtcpTransport: RTCDtlsTransport;\r\n readonly track: MediaStreamTrack;\r\n readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;\r\n send(parameters: RTCRtpParameters): void;\r\n setTrack(track: MediaStreamTrack): void;\r\n setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;\r\n stop(): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ssrcconflict\", listener: (this: this, ev: RTCSsrcConflictEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var RTCRtpSender: {\r\n prototype: RTCRtpSender;\r\n new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender;\r\n getCapabilities(kind?: string): RTCRtpCapabilities;\r\n}\r\n\r\ninterface RTCSrtpSdesTransport extends EventTarget {\r\n onerror: ((this: this, ev: ErrorEvent) => any) | null;\r\n readonly transport: RTCIceTransport;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var RTCSrtpSdesTransport: {\r\n prototype: RTCSrtpSdesTransport;\r\n new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;\r\n getLocalParameters(): RTCSrtpSdesParameters[];\r\n}\r\n\r\ninterface RTCSsrcConflictEvent extends Event {\r\n readonly ssrc: number;\r\n}\r\n\r\ndeclare var RTCSsrcConflictEvent: {\r\n prototype: RTCSsrcConflictEvent;\r\n new(): RTCSsrcConflictEvent;\r\n}\r\n\r\ninterface RTCStatsProvider extends EventTarget {\r\n getStats(): PromiseLike;\r\n msGetStats(): PromiseLike;\r\n}\r\n\r\ndeclare var RTCStatsProvider: {\r\n prototype: RTCStatsProvider;\r\n new(): RTCStatsProvider;\r\n}\r\n\r\ninterface Range {\r\n readonly collapsed: boolean;\r\n readonly commonAncestorContainer: Node;\r\n readonly endContainer: Node;\r\n readonly endOffset: number;\r\n readonly startContainer: Node;\r\n readonly startOffset: number;\r\n cloneContents(): DocumentFragment;\r\n cloneRange(): Range;\r\n collapse(toStart: boolean): void;\r\n compareBoundaryPoints(how: number, sourceRange: Range): number;\r\n createContextualFragment(fragment: string): DocumentFragment;\r\n deleteContents(): void;\r\n detach(): void;\r\n expand(Unit: string): boolean;\r\n extractContents(): DocumentFragment;\r\n getBoundingClientRect(): ClientRect;\r\n getClientRects(): ClientRectList;\r\n insertNode(newNode: Node): void;\r\n selectNode(refNode: Node): void;\r\n selectNodeContents(refNode: Node): void;\r\n setEnd(refNode: Node, offset: number): void;\r\n setEndAfter(refNode: Node): void;\r\n setEndBefore(refNode: Node): void;\r\n setStart(refNode: Node, offset: number): void;\r\n setStartAfter(refNode: Node): void;\r\n setStartBefore(refNode: Node): void;\r\n surroundContents(newParent: Node): void;\r\n toString(): string;\r\n readonly END_TO_END: number;\r\n readonly END_TO_START: number;\r\n readonly START_TO_END: number;\r\n readonly START_TO_START: number;\r\n}\r\n\r\ndeclare var Range: {\r\n prototype: Range;\r\n new(): Range;\r\n readonly END_TO_END: number;\r\n readonly END_TO_START: number;\r\n readonly START_TO_END: number;\r\n readonly START_TO_START: number;\r\n}\r\n\r\ninterface SVGAElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {\r\n readonly target: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGAElement: {\r\n prototype: SVGAElement;\r\n new(): SVGAElement;\r\n}\r\n\r\ninterface SVGAngle {\r\n readonly unitType: number;\r\n value: number;\r\n valueAsString: string;\r\n valueInSpecifiedUnits: number;\r\n convertToSpecifiedUnits(unitType: number): void;\r\n newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;\r\n readonly SVG_ANGLETYPE_DEG: number;\r\n readonly SVG_ANGLETYPE_GRAD: number;\r\n readonly SVG_ANGLETYPE_RAD: number;\r\n readonly SVG_ANGLETYPE_UNKNOWN: number;\r\n readonly SVG_ANGLETYPE_UNSPECIFIED: number;\r\n}\r\n\r\ndeclare var SVGAngle: {\r\n prototype: SVGAngle;\r\n new(): SVGAngle;\r\n readonly SVG_ANGLETYPE_DEG: number;\r\n readonly SVG_ANGLETYPE_GRAD: number;\r\n readonly SVG_ANGLETYPE_RAD: number;\r\n readonly SVG_ANGLETYPE_UNKNOWN: number;\r\n readonly SVG_ANGLETYPE_UNSPECIFIED: number;\r\n}\r\n\r\ninterface SVGAnimatedAngle {\r\n readonly animVal: SVGAngle;\r\n readonly baseVal: SVGAngle;\r\n}\r\n\r\ndeclare var SVGAnimatedAngle: {\r\n prototype: SVGAnimatedAngle;\r\n new(): SVGAnimatedAngle;\r\n}\r\n\r\ninterface SVGAnimatedBoolean {\r\n readonly animVal: boolean;\r\n baseVal: boolean;\r\n}\r\n\r\ndeclare var SVGAnimatedBoolean: {\r\n prototype: SVGAnimatedBoolean;\r\n new(): SVGAnimatedBoolean;\r\n}\r\n\r\ninterface SVGAnimatedEnumeration {\r\n readonly animVal: number;\r\n baseVal: number;\r\n}\r\n\r\ndeclare var SVGAnimatedEnumeration: {\r\n prototype: SVGAnimatedEnumeration;\r\n new(): SVGAnimatedEnumeration;\r\n}\r\n\r\ninterface SVGAnimatedInteger {\r\n readonly animVal: number;\r\n baseVal: number;\r\n}\r\n\r\ndeclare var SVGAnimatedInteger: {\r\n prototype: SVGAnimatedInteger;\r\n new(): SVGAnimatedInteger;\r\n}\r\n\r\ninterface SVGAnimatedLength {\r\n readonly animVal: SVGLength;\r\n readonly baseVal: SVGLength;\r\n}\r\n\r\ndeclare var SVGAnimatedLength: {\r\n prototype: SVGAnimatedLength;\r\n new(): SVGAnimatedLength;\r\n}\r\n\r\ninterface SVGAnimatedLengthList {\r\n readonly animVal: SVGLengthList;\r\n readonly baseVal: SVGLengthList;\r\n}\r\n\r\ndeclare var SVGAnimatedLengthList: {\r\n prototype: SVGAnimatedLengthList;\r\n new(): SVGAnimatedLengthList;\r\n}\r\n\r\ninterface SVGAnimatedNumber {\r\n readonly animVal: number;\r\n baseVal: number;\r\n}\r\n\r\ndeclare var SVGAnimatedNumber: {\r\n prototype: SVGAnimatedNumber;\r\n new(): SVGAnimatedNumber;\r\n}\r\n\r\ninterface SVGAnimatedNumberList {\r\n readonly animVal: SVGNumberList;\r\n readonly baseVal: SVGNumberList;\r\n}\r\n\r\ndeclare var SVGAnimatedNumberList: {\r\n prototype: SVGAnimatedNumberList;\r\n new(): SVGAnimatedNumberList;\r\n}\r\n\r\ninterface SVGAnimatedPreserveAspectRatio {\r\n readonly animVal: SVGPreserveAspectRatio;\r\n readonly baseVal: SVGPreserveAspectRatio;\r\n}\r\n\r\ndeclare var SVGAnimatedPreserveAspectRatio: {\r\n prototype: SVGAnimatedPreserveAspectRatio;\r\n new(): SVGAnimatedPreserveAspectRatio;\r\n}\r\n\r\ninterface SVGAnimatedRect {\r\n readonly animVal: SVGRect;\r\n readonly baseVal: SVGRect;\r\n}\r\n\r\ndeclare var SVGAnimatedRect: {\r\n prototype: SVGAnimatedRect;\r\n new(): SVGAnimatedRect;\r\n}\r\n\r\ninterface SVGAnimatedString {\r\n readonly animVal: string;\r\n baseVal: string;\r\n}\r\n\r\ndeclare var SVGAnimatedString: {\r\n prototype: SVGAnimatedString;\r\n new(): SVGAnimatedString;\r\n}\r\n\r\ninterface SVGAnimatedTransformList {\r\n readonly animVal: SVGTransformList;\r\n readonly baseVal: SVGTransformList;\r\n}\r\n\r\ndeclare var SVGAnimatedTransformList: {\r\n prototype: SVGAnimatedTransformList;\r\n new(): SVGAnimatedTransformList;\r\n}\r\n\r\ninterface SVGCircleElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n readonly cx: SVGAnimatedLength;\r\n readonly cy: SVGAnimatedLength;\r\n readonly r: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGCircleElement: {\r\n prototype: SVGCircleElement;\r\n new(): SVGCircleElement;\r\n}\r\n\r\ninterface SVGClipPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {\r\n readonly clipPathUnits: SVGAnimatedEnumeration;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGClipPathElement: {\r\n prototype: SVGClipPathElement;\r\n new(): SVGClipPathElement;\r\n}\r\n\r\ninterface SVGComponentTransferFunctionElement extends SVGElement {\r\n readonly amplitude: SVGAnimatedNumber;\r\n readonly exponent: SVGAnimatedNumber;\r\n readonly intercept: SVGAnimatedNumber;\r\n readonly offset: SVGAnimatedNumber;\r\n readonly slope: SVGAnimatedNumber;\r\n readonly tableValues: SVGAnimatedNumberList;\r\n readonly type: SVGAnimatedEnumeration;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGComponentTransferFunctionElement: {\r\n prototype: SVGComponentTransferFunctionElement;\r\n new(): SVGComponentTransferFunctionElement;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;\r\n readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGDefsElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGDefsElement: {\r\n prototype: SVGDefsElement;\r\n new(): SVGDefsElement;\r\n}\r\n\r\ninterface SVGDescElement extends SVGElement, SVGStylable, SVGLangSpace {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGDescElement: {\r\n prototype: SVGDescElement;\r\n new(): SVGDescElement;\r\n}\r\n\r\ninterface SVGElement extends Element {\r\n onclick: (this: this, ev: MouseEvent) => any;\r\n ondblclick: (this: this, ev: MouseEvent) => any;\r\n onfocusin: (this: this, ev: FocusEvent) => any;\r\n onfocusout: (this: this, ev: FocusEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n onmousedown: (this: this, ev: MouseEvent) => any;\r\n onmousemove: (this: this, ev: MouseEvent) => any;\r\n onmouseout: (this: this, ev: MouseEvent) => any;\r\n onmouseover: (this: this, ev: MouseEvent) => any;\r\n onmouseup: (this: this, ev: MouseEvent) => any;\r\n readonly ownerSVGElement: SVGSVGElement;\r\n readonly viewportElement: SVGElement;\r\n xmlbase: string;\r\n className: any;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusin\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusout\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGElement: {\r\n prototype: SVGElement;\r\n new(): SVGElement;\r\n}\r\n\r\ninterface SVGElementInstance extends EventTarget {\r\n readonly childNodes: SVGElementInstanceList;\r\n readonly correspondingElement: SVGElement;\r\n readonly correspondingUseElement: SVGUseElement;\r\n readonly firstChild: SVGElementInstance;\r\n readonly lastChild: SVGElementInstance;\r\n readonly nextSibling: SVGElementInstance;\r\n readonly parentNode: SVGElementInstance;\r\n readonly previousSibling: SVGElementInstance;\r\n}\r\n\r\ndeclare var SVGElementInstance: {\r\n prototype: SVGElementInstance;\r\n new(): SVGElementInstance;\r\n}\r\n\r\ninterface SVGElementInstanceList {\r\n readonly length: number;\r\n item(index: number): SVGElementInstance;\r\n}\r\n\r\ndeclare var SVGElementInstanceList: {\r\n prototype: SVGElementInstanceList;\r\n new(): SVGElementInstanceList;\r\n}\r\n\r\ninterface SVGEllipseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n readonly cx: SVGAnimatedLength;\r\n readonly cy: SVGAnimatedLength;\r\n readonly rx: SVGAnimatedLength;\r\n readonly ry: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGEllipseElement: {\r\n prototype: SVGEllipseElement;\r\n new(): SVGEllipseElement;\r\n}\r\n\r\ninterface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n readonly in2: SVGAnimatedString;\r\n readonly mode: SVGAnimatedEnumeration;\r\n readonly SVG_FEBLEND_MODE_COLOR: number;\r\n readonly SVG_FEBLEND_MODE_COLOR_BURN: number;\r\n readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;\r\n readonly SVG_FEBLEND_MODE_DARKEN: number;\r\n readonly SVG_FEBLEND_MODE_DIFFERENCE: number;\r\n readonly SVG_FEBLEND_MODE_EXCLUSION: number;\r\n readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;\r\n readonly SVG_FEBLEND_MODE_HUE: number;\r\n readonly SVG_FEBLEND_MODE_LIGHTEN: number;\r\n readonly SVG_FEBLEND_MODE_LUMINOSITY: number;\r\n readonly SVG_FEBLEND_MODE_MULTIPLY: number;\r\n readonly SVG_FEBLEND_MODE_NORMAL: number;\r\n readonly SVG_FEBLEND_MODE_OVERLAY: number;\r\n readonly SVG_FEBLEND_MODE_SATURATION: number;\r\n readonly SVG_FEBLEND_MODE_SCREEN: number;\r\n readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;\r\n readonly SVG_FEBLEND_MODE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEBlendElement: {\r\n prototype: SVGFEBlendElement;\r\n new(): SVGFEBlendElement;\r\n readonly SVG_FEBLEND_MODE_COLOR: number;\r\n readonly SVG_FEBLEND_MODE_COLOR_BURN: number;\r\n readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;\r\n readonly SVG_FEBLEND_MODE_DARKEN: number;\r\n readonly SVG_FEBLEND_MODE_DIFFERENCE: number;\r\n readonly SVG_FEBLEND_MODE_EXCLUSION: number;\r\n readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;\r\n readonly SVG_FEBLEND_MODE_HUE: number;\r\n readonly SVG_FEBLEND_MODE_LIGHTEN: number;\r\n readonly SVG_FEBLEND_MODE_LUMINOSITY: number;\r\n readonly SVG_FEBLEND_MODE_MULTIPLY: number;\r\n readonly SVG_FEBLEND_MODE_NORMAL: number;\r\n readonly SVG_FEBLEND_MODE_OVERLAY: number;\r\n readonly SVG_FEBLEND_MODE_SATURATION: number;\r\n readonly SVG_FEBLEND_MODE_SCREEN: number;\r\n readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;\r\n readonly SVG_FEBLEND_MODE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n readonly type: SVGAnimatedEnumeration;\r\n readonly values: SVGAnimatedNumberList;\r\n readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEColorMatrixElement: {\r\n prototype: SVGFEColorMatrixElement;\r\n new(): SVGFEColorMatrixElement;\r\n readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;\r\n readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEComponentTransferElement: {\r\n prototype: SVGFEComponentTransferElement;\r\n new(): SVGFEComponentTransferElement;\r\n}\r\n\r\ninterface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n readonly in2: SVGAnimatedString;\r\n readonly k1: SVGAnimatedNumber;\r\n readonly k2: SVGAnimatedNumber;\r\n readonly k3: SVGAnimatedNumber;\r\n readonly k4: SVGAnimatedNumber;\r\n readonly operator: SVGAnimatedEnumeration;\r\n readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_IN: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFECompositeElement: {\r\n prototype: SVGFECompositeElement;\r\n new(): SVGFECompositeElement;\r\n readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_IN: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;\r\n readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;\r\n}\r\n\r\ninterface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly bias: SVGAnimatedNumber;\r\n readonly divisor: SVGAnimatedNumber;\r\n readonly edgeMode: SVGAnimatedEnumeration;\r\n readonly in1: SVGAnimatedString;\r\n readonly kernelMatrix: SVGAnimatedNumberList;\r\n readonly kernelUnitLengthX: SVGAnimatedNumber;\r\n readonly kernelUnitLengthY: SVGAnimatedNumber;\r\n readonly orderX: SVGAnimatedInteger;\r\n readonly orderY: SVGAnimatedInteger;\r\n readonly preserveAlpha: SVGAnimatedBoolean;\r\n readonly targetX: SVGAnimatedInteger;\r\n readonly targetY: SVGAnimatedInteger;\r\n readonly SVG_EDGEMODE_DUPLICATE: number;\r\n readonly SVG_EDGEMODE_NONE: number;\r\n readonly SVG_EDGEMODE_UNKNOWN: number;\r\n readonly SVG_EDGEMODE_WRAP: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEConvolveMatrixElement: {\r\n prototype: SVGFEConvolveMatrixElement;\r\n new(): SVGFEConvolveMatrixElement;\r\n readonly SVG_EDGEMODE_DUPLICATE: number;\r\n readonly SVG_EDGEMODE_NONE: number;\r\n readonly SVG_EDGEMODE_UNKNOWN: number;\r\n readonly SVG_EDGEMODE_WRAP: number;\r\n}\r\n\r\ninterface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly diffuseConstant: SVGAnimatedNumber;\r\n readonly in1: SVGAnimatedString;\r\n readonly kernelUnitLengthX: SVGAnimatedNumber;\r\n readonly kernelUnitLengthY: SVGAnimatedNumber;\r\n readonly surfaceScale: SVGAnimatedNumber;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEDiffuseLightingElement: {\r\n prototype: SVGFEDiffuseLightingElement;\r\n new(): SVGFEDiffuseLightingElement;\r\n}\r\n\r\ninterface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n readonly in2: SVGAnimatedString;\r\n readonly scale: SVGAnimatedNumber;\r\n readonly xChannelSelector: SVGAnimatedEnumeration;\r\n readonly yChannelSelector: SVGAnimatedEnumeration;\r\n readonly SVG_CHANNEL_A: number;\r\n readonly SVG_CHANNEL_B: number;\r\n readonly SVG_CHANNEL_G: number;\r\n readonly SVG_CHANNEL_R: number;\r\n readonly SVG_CHANNEL_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEDisplacementMapElement: {\r\n prototype: SVGFEDisplacementMapElement;\r\n new(): SVGFEDisplacementMapElement;\r\n readonly SVG_CHANNEL_A: number;\r\n readonly SVG_CHANNEL_B: number;\r\n readonly SVG_CHANNEL_G: number;\r\n readonly SVG_CHANNEL_R: number;\r\n readonly SVG_CHANNEL_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEDistantLightElement extends SVGElement {\r\n readonly azimuth: SVGAnimatedNumber;\r\n readonly elevation: SVGAnimatedNumber;\r\n}\r\n\r\ndeclare var SVGFEDistantLightElement: {\r\n prototype: SVGFEDistantLightElement;\r\n new(): SVGFEDistantLightElement;\r\n}\r\n\r\ninterface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEFloodElement: {\r\n prototype: SVGFEFloodElement;\r\n new(): SVGFEFloodElement;\r\n}\r\n\r\ninterface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncAElement: {\r\n prototype: SVGFEFuncAElement;\r\n new(): SVGFEFuncAElement;\r\n}\r\n\r\ninterface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncBElement: {\r\n prototype: SVGFEFuncBElement;\r\n new(): SVGFEFuncBElement;\r\n}\r\n\r\ninterface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncGElement: {\r\n prototype: SVGFEFuncGElement;\r\n new(): SVGFEFuncGElement;\r\n}\r\n\r\ninterface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {\r\n}\r\n\r\ndeclare var SVGFEFuncRElement: {\r\n prototype: SVGFEFuncRElement;\r\n new(): SVGFEFuncRElement;\r\n}\r\n\r\ninterface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n readonly stdDeviationX: SVGAnimatedNumber;\r\n readonly stdDeviationY: SVGAnimatedNumber;\r\n setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEGaussianBlurElement: {\r\n prototype: SVGFEGaussianBlurElement;\r\n new(): SVGFEGaussianBlurElement;\r\n}\r\n\r\ninterface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {\r\n readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEImageElement: {\r\n prototype: SVGFEImageElement;\r\n new(): SVGFEImageElement;\r\n}\r\n\r\ninterface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEMergeElement: {\r\n prototype: SVGFEMergeElement;\r\n new(): SVGFEMergeElement;\r\n}\r\n\r\ninterface SVGFEMergeNodeElement extends SVGElement {\r\n readonly in1: SVGAnimatedString;\r\n}\r\n\r\ndeclare var SVGFEMergeNodeElement: {\r\n prototype: SVGFEMergeNodeElement;\r\n new(): SVGFEMergeNodeElement;\r\n}\r\n\r\ninterface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n readonly operator: SVGAnimatedEnumeration;\r\n readonly radiusX: SVGAnimatedNumber;\r\n readonly radiusY: SVGAnimatedNumber;\r\n readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;\r\n readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;\r\n readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEMorphologyElement: {\r\n prototype: SVGFEMorphologyElement;\r\n new(): SVGFEMorphologyElement;\r\n readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;\r\n readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;\r\n readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly dx: SVGAnimatedNumber;\r\n readonly dy: SVGAnimatedNumber;\r\n readonly in1: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFEOffsetElement: {\r\n prototype: SVGFEOffsetElement;\r\n new(): SVGFEOffsetElement;\r\n}\r\n\r\ninterface SVGFEPointLightElement extends SVGElement {\r\n readonly x: SVGAnimatedNumber;\r\n readonly y: SVGAnimatedNumber;\r\n readonly z: SVGAnimatedNumber;\r\n}\r\n\r\ndeclare var SVGFEPointLightElement: {\r\n prototype: SVGFEPointLightElement;\r\n new(): SVGFEPointLightElement;\r\n}\r\n\r\ninterface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n readonly kernelUnitLengthX: SVGAnimatedNumber;\r\n readonly kernelUnitLengthY: SVGAnimatedNumber;\r\n readonly specularConstant: SVGAnimatedNumber;\r\n readonly specularExponent: SVGAnimatedNumber;\r\n readonly surfaceScale: SVGAnimatedNumber;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFESpecularLightingElement: {\r\n prototype: SVGFESpecularLightingElement;\r\n new(): SVGFESpecularLightingElement;\r\n}\r\n\r\ninterface SVGFESpotLightElement extends SVGElement {\r\n readonly limitingConeAngle: SVGAnimatedNumber;\r\n readonly pointsAtX: SVGAnimatedNumber;\r\n readonly pointsAtY: SVGAnimatedNumber;\r\n readonly pointsAtZ: SVGAnimatedNumber;\r\n readonly specularExponent: SVGAnimatedNumber;\r\n readonly x: SVGAnimatedNumber;\r\n readonly y: SVGAnimatedNumber;\r\n readonly z: SVGAnimatedNumber;\r\n}\r\n\r\ndeclare var SVGFESpotLightElement: {\r\n prototype: SVGFESpotLightElement;\r\n new(): SVGFESpotLightElement;\r\n}\r\n\r\ninterface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly in1: SVGAnimatedString;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFETileElement: {\r\n prototype: SVGFETileElement;\r\n new(): SVGFETileElement;\r\n}\r\n\r\ninterface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n readonly baseFrequencyX: SVGAnimatedNumber;\r\n readonly baseFrequencyY: SVGAnimatedNumber;\r\n readonly numOctaves: SVGAnimatedInteger;\r\n readonly seed: SVGAnimatedNumber;\r\n readonly stitchTiles: SVGAnimatedEnumeration;\r\n readonly type: SVGAnimatedEnumeration;\r\n readonly SVG_STITCHTYPE_NOSTITCH: number;\r\n readonly SVG_STITCHTYPE_STITCH: number;\r\n readonly SVG_STITCHTYPE_UNKNOWN: number;\r\n readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;\r\n readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;\r\n readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFETurbulenceElement: {\r\n prototype: SVGFETurbulenceElement;\r\n new(): SVGFETurbulenceElement;\r\n readonly SVG_STITCHTYPE_NOSTITCH: number;\r\n readonly SVG_STITCHTYPE_STITCH: number;\r\n readonly SVG_STITCHTYPE_UNKNOWN: number;\r\n readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;\r\n readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;\r\n readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {\r\n readonly filterResX: SVGAnimatedInteger;\r\n readonly filterResY: SVGAnimatedInteger;\r\n readonly filterUnits: SVGAnimatedEnumeration;\r\n readonly height: SVGAnimatedLength;\r\n readonly primitiveUnits: SVGAnimatedEnumeration;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n setFilterRes(filterResX: number, filterResY: number): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGFilterElement: {\r\n prototype: SVGFilterElement;\r\n new(): SVGFilterElement;\r\n}\r\n\r\ninterface SVGForeignObjectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n readonly height: SVGAnimatedLength;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGForeignObjectElement: {\r\n prototype: SVGForeignObjectElement;\r\n new(): SVGForeignObjectElement;\r\n}\r\n\r\ninterface SVGGElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGGElement: {\r\n prototype: SVGGElement;\r\n new(): SVGGElement;\r\n}\r\n\r\ninterface SVGGradientElement extends SVGElement, SVGStylable, SVGExternalResourcesRequired, SVGURIReference, SVGUnitTypes {\r\n readonly gradientTransform: SVGAnimatedTransformList;\r\n readonly gradientUnits: SVGAnimatedEnumeration;\r\n readonly spreadMethod: SVGAnimatedEnumeration;\r\n readonly SVG_SPREADMETHOD_PAD: number;\r\n readonly SVG_SPREADMETHOD_REFLECT: number;\r\n readonly SVG_SPREADMETHOD_REPEAT: number;\r\n readonly SVG_SPREADMETHOD_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGGradientElement: {\r\n prototype: SVGGradientElement;\r\n new(): SVGGradientElement;\r\n readonly SVG_SPREADMETHOD_PAD: number;\r\n readonly SVG_SPREADMETHOD_REFLECT: number;\r\n readonly SVG_SPREADMETHOD_REPEAT: number;\r\n readonly SVG_SPREADMETHOD_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGImageElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {\r\n readonly height: SVGAnimatedLength;\r\n readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGImageElement: {\r\n prototype: SVGImageElement;\r\n new(): SVGImageElement;\r\n}\r\n\r\ninterface SVGLength {\r\n readonly unitType: number;\r\n value: number;\r\n valueAsString: string;\r\n valueInSpecifiedUnits: number;\r\n convertToSpecifiedUnits(unitType: number): void;\r\n newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;\r\n readonly SVG_LENGTHTYPE_CM: number;\r\n readonly SVG_LENGTHTYPE_EMS: number;\r\n readonly SVG_LENGTHTYPE_EXS: number;\r\n readonly SVG_LENGTHTYPE_IN: number;\r\n readonly SVG_LENGTHTYPE_MM: number;\r\n readonly SVG_LENGTHTYPE_NUMBER: number;\r\n readonly SVG_LENGTHTYPE_PC: number;\r\n readonly SVG_LENGTHTYPE_PERCENTAGE: number;\r\n readonly SVG_LENGTHTYPE_PT: number;\r\n readonly SVG_LENGTHTYPE_PX: number;\r\n readonly SVG_LENGTHTYPE_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGLength: {\r\n prototype: SVGLength;\r\n new(): SVGLength;\r\n readonly SVG_LENGTHTYPE_CM: number;\r\n readonly SVG_LENGTHTYPE_EMS: number;\r\n readonly SVG_LENGTHTYPE_EXS: number;\r\n readonly SVG_LENGTHTYPE_IN: number;\r\n readonly SVG_LENGTHTYPE_MM: number;\r\n readonly SVG_LENGTHTYPE_NUMBER: number;\r\n readonly SVG_LENGTHTYPE_PC: number;\r\n readonly SVG_LENGTHTYPE_PERCENTAGE: number;\r\n readonly SVG_LENGTHTYPE_PT: number;\r\n readonly SVG_LENGTHTYPE_PX: number;\r\n readonly SVG_LENGTHTYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGLengthList {\r\n readonly numberOfItems: number;\r\n appendItem(newItem: SVGLength): SVGLength;\r\n clear(): void;\r\n getItem(index: number): SVGLength;\r\n initialize(newItem: SVGLength): SVGLength;\r\n insertItemBefore(newItem: SVGLength, index: number): SVGLength;\r\n removeItem(index: number): SVGLength;\r\n replaceItem(newItem: SVGLength, index: number): SVGLength;\r\n}\r\n\r\ndeclare var SVGLengthList: {\r\n prototype: SVGLengthList;\r\n new(): SVGLengthList;\r\n}\r\n\r\ninterface SVGLineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n readonly x1: SVGAnimatedLength;\r\n readonly x2: SVGAnimatedLength;\r\n readonly y1: SVGAnimatedLength;\r\n readonly y2: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGLineElement: {\r\n prototype: SVGLineElement;\r\n new(): SVGLineElement;\r\n}\r\n\r\ninterface SVGLinearGradientElement extends SVGGradientElement {\r\n readonly x1: SVGAnimatedLength;\r\n readonly x2: SVGAnimatedLength;\r\n readonly y1: SVGAnimatedLength;\r\n readonly y2: SVGAnimatedLength;\r\n}\r\n\r\ndeclare var SVGLinearGradientElement: {\r\n prototype: SVGLinearGradientElement;\r\n new(): SVGLinearGradientElement;\r\n}\r\n\r\ninterface SVGMarkerElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {\r\n readonly markerHeight: SVGAnimatedLength;\r\n readonly markerUnits: SVGAnimatedEnumeration;\r\n readonly markerWidth: SVGAnimatedLength;\r\n readonly orientAngle: SVGAnimatedAngle;\r\n readonly orientType: SVGAnimatedEnumeration;\r\n readonly refX: SVGAnimatedLength;\r\n readonly refY: SVGAnimatedLength;\r\n setOrientToAngle(angle: SVGAngle): void;\r\n setOrientToAuto(): void;\r\n readonly SVG_MARKERUNITS_STROKEWIDTH: number;\r\n readonly SVG_MARKERUNITS_UNKNOWN: number;\r\n readonly SVG_MARKERUNITS_USERSPACEONUSE: number;\r\n readonly SVG_MARKER_ORIENT_ANGLE: number;\r\n readonly SVG_MARKER_ORIENT_AUTO: number;\r\n readonly SVG_MARKER_ORIENT_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGMarkerElement: {\r\n prototype: SVGMarkerElement;\r\n new(): SVGMarkerElement;\r\n readonly SVG_MARKERUNITS_STROKEWIDTH: number;\r\n readonly SVG_MARKERUNITS_UNKNOWN: number;\r\n readonly SVG_MARKERUNITS_USERSPACEONUSE: number;\r\n readonly SVG_MARKER_ORIENT_ANGLE: number;\r\n readonly SVG_MARKER_ORIENT_AUTO: number;\r\n readonly SVG_MARKER_ORIENT_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGMaskElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {\r\n readonly height: SVGAnimatedLength;\r\n readonly maskContentUnits: SVGAnimatedEnumeration;\r\n readonly maskUnits: SVGAnimatedEnumeration;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGMaskElement: {\r\n prototype: SVGMaskElement;\r\n new(): SVGMaskElement;\r\n}\r\n\r\ninterface SVGMatrix {\r\n a: number;\r\n b: number;\r\n c: number;\r\n d: number;\r\n e: number;\r\n f: number;\r\n flipX(): SVGMatrix;\r\n flipY(): SVGMatrix;\r\n inverse(): SVGMatrix;\r\n multiply(secondMatrix: SVGMatrix): SVGMatrix;\r\n rotate(angle: number): SVGMatrix;\r\n rotateFromVector(x: number, y: number): SVGMatrix;\r\n scale(scaleFactor: number): SVGMatrix;\r\n scaleNonUniform(scaleFactorX: number, scaleFactorY: number): SVGMatrix;\r\n skewX(angle: number): SVGMatrix;\r\n skewY(angle: number): SVGMatrix;\r\n translate(x: number, y: number): SVGMatrix;\r\n}\r\n\r\ndeclare var SVGMatrix: {\r\n prototype: SVGMatrix;\r\n new(): SVGMatrix;\r\n}\r\n\r\ninterface SVGMetadataElement extends SVGElement {\r\n}\r\n\r\ndeclare var SVGMetadataElement: {\r\n prototype: SVGMetadataElement;\r\n new(): SVGMetadataElement;\r\n}\r\n\r\ninterface SVGNumber {\r\n value: number;\r\n}\r\n\r\ndeclare var SVGNumber: {\r\n prototype: SVGNumber;\r\n new(): SVGNumber;\r\n}\r\n\r\ninterface SVGNumberList {\r\n readonly numberOfItems: number;\r\n appendItem(newItem: SVGNumber): SVGNumber;\r\n clear(): void;\r\n getItem(index: number): SVGNumber;\r\n initialize(newItem: SVGNumber): SVGNumber;\r\n insertItemBefore(newItem: SVGNumber, index: number): SVGNumber;\r\n removeItem(index: number): SVGNumber;\r\n replaceItem(newItem: SVGNumber, index: number): SVGNumber;\r\n}\r\n\r\ndeclare var SVGNumberList: {\r\n prototype: SVGNumberList;\r\n new(): SVGNumberList;\r\n}\r\n\r\ninterface SVGPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPathData {\r\n createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs;\r\n createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel;\r\n createSVGPathSegClosePath(): SVGPathSegClosePath;\r\n createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs;\r\n createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel;\r\n createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs;\r\n createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel;\r\n createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs;\r\n createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel;\r\n createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs;\r\n createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel;\r\n createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs;\r\n createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs;\r\n createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel;\r\n createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel;\r\n createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs;\r\n createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel;\r\n createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs;\r\n createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel;\r\n getPathSegAtLength(distance: number): number;\r\n getPointAtLength(distance: number): SVGPoint;\r\n getTotalLength(): number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPathElement: {\r\n prototype: SVGPathElement;\r\n new(): SVGPathElement;\r\n}\r\n\r\ninterface SVGPathSeg {\r\n readonly pathSegType: number;\r\n readonly pathSegTypeAsLetter: string;\r\n readonly PATHSEG_ARC_ABS: number;\r\n readonly PATHSEG_ARC_REL: number;\r\n readonly PATHSEG_CLOSEPATH: number;\r\n readonly PATHSEG_CURVETO_CUBIC_ABS: number;\r\n readonly PATHSEG_CURVETO_CUBIC_REL: number;\r\n readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;\r\n readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_REL: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;\r\n readonly PATHSEG_LINETO_ABS: number;\r\n readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;\r\n readonly PATHSEG_LINETO_HORIZONTAL_REL: number;\r\n readonly PATHSEG_LINETO_REL: number;\r\n readonly PATHSEG_LINETO_VERTICAL_ABS: number;\r\n readonly PATHSEG_LINETO_VERTICAL_REL: number;\r\n readonly PATHSEG_MOVETO_ABS: number;\r\n readonly PATHSEG_MOVETO_REL: number;\r\n readonly PATHSEG_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGPathSeg: {\r\n prototype: SVGPathSeg;\r\n new(): SVGPathSeg;\r\n readonly PATHSEG_ARC_ABS: number;\r\n readonly PATHSEG_ARC_REL: number;\r\n readonly PATHSEG_CLOSEPATH: number;\r\n readonly PATHSEG_CURVETO_CUBIC_ABS: number;\r\n readonly PATHSEG_CURVETO_CUBIC_REL: number;\r\n readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;\r\n readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_REL: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;\r\n readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;\r\n readonly PATHSEG_LINETO_ABS: number;\r\n readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;\r\n readonly PATHSEG_LINETO_HORIZONTAL_REL: number;\r\n readonly PATHSEG_LINETO_REL: number;\r\n readonly PATHSEG_LINETO_VERTICAL_ABS: number;\r\n readonly PATHSEG_LINETO_VERTICAL_REL: number;\r\n readonly PATHSEG_MOVETO_ABS: number;\r\n readonly PATHSEG_MOVETO_REL: number;\r\n readonly PATHSEG_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGPathSegArcAbs extends SVGPathSeg {\r\n angle: number;\r\n largeArcFlag: boolean;\r\n r1: number;\r\n r2: number;\r\n sweepFlag: boolean;\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegArcAbs: {\r\n prototype: SVGPathSegArcAbs;\r\n new(): SVGPathSegArcAbs;\r\n}\r\n\r\ninterface SVGPathSegArcRel extends SVGPathSeg {\r\n angle: number;\r\n largeArcFlag: boolean;\r\n r1: number;\r\n r2: number;\r\n sweepFlag: boolean;\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegArcRel: {\r\n prototype: SVGPathSegArcRel;\r\n new(): SVGPathSegArcRel;\r\n}\r\n\r\ninterface SVGPathSegClosePath extends SVGPathSeg {\r\n}\r\n\r\ndeclare var SVGPathSegClosePath: {\r\n prototype: SVGPathSegClosePath;\r\n new(): SVGPathSegClosePath;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n x2: number;\r\n y: number;\r\n y1: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicAbs: {\r\n prototype: SVGPathSegCurvetoCubicAbs;\r\n new(): SVGPathSegCurvetoCubicAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicRel extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n x2: number;\r\n y: number;\r\n y1: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicRel: {\r\n prototype: SVGPathSegCurvetoCubicRel;\r\n new(): SVGPathSegCurvetoCubicRel;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {\r\n x: number;\r\n x2: number;\r\n y: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicSmoothAbs: {\r\n prototype: SVGPathSegCurvetoCubicSmoothAbs;\r\n new(): SVGPathSegCurvetoCubicSmoothAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {\r\n x: number;\r\n x2: number;\r\n y: number;\r\n y2: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoCubicSmoothRel: {\r\n prototype: SVGPathSegCurvetoCubicSmoothRel;\r\n new(): SVGPathSegCurvetoCubicSmoothRel;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n y: number;\r\n y1: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticAbs: {\r\n prototype: SVGPathSegCurvetoQuadraticAbs;\r\n new(): SVGPathSegCurvetoQuadraticAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {\r\n x: number;\r\n x1: number;\r\n y: number;\r\n y1: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticRel: {\r\n prototype: SVGPathSegCurvetoQuadraticRel;\r\n new(): SVGPathSegCurvetoQuadraticRel;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticSmoothAbs: {\r\n prototype: SVGPathSegCurvetoQuadraticSmoothAbs;\r\n new(): SVGPathSegCurvetoQuadraticSmoothAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegCurvetoQuadraticSmoothRel: {\r\n prototype: SVGPathSegCurvetoQuadraticSmoothRel;\r\n new(): SVGPathSegCurvetoQuadraticSmoothRel;\r\n}\r\n\r\ninterface SVGPathSegLinetoAbs extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoAbs: {\r\n prototype: SVGPathSegLinetoAbs;\r\n new(): SVGPathSegLinetoAbs;\r\n}\r\n\r\ninterface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {\r\n x: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoHorizontalAbs: {\r\n prototype: SVGPathSegLinetoHorizontalAbs;\r\n new(): SVGPathSegLinetoHorizontalAbs;\r\n}\r\n\r\ninterface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {\r\n x: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoHorizontalRel: {\r\n prototype: SVGPathSegLinetoHorizontalRel;\r\n new(): SVGPathSegLinetoHorizontalRel;\r\n}\r\n\r\ninterface SVGPathSegLinetoRel extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoRel: {\r\n prototype: SVGPathSegLinetoRel;\r\n new(): SVGPathSegLinetoRel;\r\n}\r\n\r\ninterface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoVerticalAbs: {\r\n prototype: SVGPathSegLinetoVerticalAbs;\r\n new(): SVGPathSegLinetoVerticalAbs;\r\n}\r\n\r\ninterface SVGPathSegLinetoVerticalRel extends SVGPathSeg {\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegLinetoVerticalRel: {\r\n prototype: SVGPathSegLinetoVerticalRel;\r\n new(): SVGPathSegLinetoVerticalRel;\r\n}\r\n\r\ninterface SVGPathSegList {\r\n readonly numberOfItems: number;\r\n appendItem(newItem: SVGPathSeg): SVGPathSeg;\r\n clear(): void;\r\n getItem(index: number): SVGPathSeg;\r\n initialize(newItem: SVGPathSeg): SVGPathSeg;\r\n insertItemBefore(newItem: SVGPathSeg, index: number): SVGPathSeg;\r\n removeItem(index: number): SVGPathSeg;\r\n replaceItem(newItem: SVGPathSeg, index: number): SVGPathSeg;\r\n}\r\n\r\ndeclare var SVGPathSegList: {\r\n prototype: SVGPathSegList;\r\n new(): SVGPathSegList;\r\n}\r\n\r\ninterface SVGPathSegMovetoAbs extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegMovetoAbs: {\r\n prototype: SVGPathSegMovetoAbs;\r\n new(): SVGPathSegMovetoAbs;\r\n}\r\n\r\ninterface SVGPathSegMovetoRel extends SVGPathSeg {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGPathSegMovetoRel: {\r\n prototype: SVGPathSegMovetoRel;\r\n new(): SVGPathSegMovetoRel;\r\n}\r\n\r\ninterface SVGPatternElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGURIReference, SVGUnitTypes {\r\n readonly height: SVGAnimatedLength;\r\n readonly patternContentUnits: SVGAnimatedEnumeration;\r\n readonly patternTransform: SVGAnimatedTransformList;\r\n readonly patternUnits: SVGAnimatedEnumeration;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPatternElement: {\r\n prototype: SVGPatternElement;\r\n new(): SVGPatternElement;\r\n}\r\n\r\ninterface SVGPoint {\r\n x: number;\r\n y: number;\r\n matrixTransform(matrix: SVGMatrix): SVGPoint;\r\n}\r\n\r\ndeclare var SVGPoint: {\r\n prototype: SVGPoint;\r\n new(): SVGPoint;\r\n}\r\n\r\ninterface SVGPointList {\r\n readonly numberOfItems: number;\r\n appendItem(newItem: SVGPoint): SVGPoint;\r\n clear(): void;\r\n getItem(index: number): SVGPoint;\r\n initialize(newItem: SVGPoint): SVGPoint;\r\n insertItemBefore(newItem: SVGPoint, index: number): SVGPoint;\r\n removeItem(index: number): SVGPoint;\r\n replaceItem(newItem: SVGPoint, index: number): SVGPoint;\r\n}\r\n\r\ndeclare var SVGPointList: {\r\n prototype: SVGPointList;\r\n new(): SVGPointList;\r\n}\r\n\r\ninterface SVGPolygonElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPolygonElement: {\r\n prototype: SVGPolygonElement;\r\n new(): SVGPolygonElement;\r\n}\r\n\r\ninterface SVGPolylineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGPolylineElement: {\r\n prototype: SVGPolylineElement;\r\n new(): SVGPolylineElement;\r\n}\r\n\r\ninterface SVGPreserveAspectRatio {\r\n align: number;\r\n meetOrSlice: number;\r\n readonly SVG_MEETORSLICE_MEET: number;\r\n readonly SVG_MEETORSLICE_SLICE: number;\r\n readonly SVG_MEETORSLICE_UNKNOWN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_NONE: number;\r\n readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;\r\n}\r\n\r\ndeclare var SVGPreserveAspectRatio: {\r\n prototype: SVGPreserveAspectRatio;\r\n new(): SVGPreserveAspectRatio;\r\n readonly SVG_MEETORSLICE_MEET: number;\r\n readonly SVG_MEETORSLICE_SLICE: number;\r\n readonly SVG_MEETORSLICE_UNKNOWN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_NONE: number;\r\n readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;\r\n readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;\r\n}\r\n\r\ninterface SVGRadialGradientElement extends SVGGradientElement {\r\n readonly cx: SVGAnimatedLength;\r\n readonly cy: SVGAnimatedLength;\r\n readonly fx: SVGAnimatedLength;\r\n readonly fy: SVGAnimatedLength;\r\n readonly r: SVGAnimatedLength;\r\n}\r\n\r\ndeclare var SVGRadialGradientElement: {\r\n prototype: SVGRadialGradientElement;\r\n new(): SVGRadialGradientElement;\r\n}\r\n\r\ninterface SVGRect {\r\n height: number;\r\n width: number;\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var SVGRect: {\r\n prototype: SVGRect;\r\n new(): SVGRect;\r\n}\r\n\r\ninterface SVGRectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n readonly height: SVGAnimatedLength;\r\n readonly rx: SVGAnimatedLength;\r\n readonly ry: SVGAnimatedLength;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGRectElement: {\r\n prototype: SVGRectElement;\r\n new(): SVGRectElement;\r\n}\r\n\r\ninterface SVGSVGElement extends SVGElement, DocumentEvent, SVGLocatable, SVGTests, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {\r\n contentScriptType: string;\r\n contentStyleType: string;\r\n currentScale: number;\r\n readonly currentTranslate: SVGPoint;\r\n readonly height: SVGAnimatedLength;\r\n onabort: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: Event) => any;\r\n onresize: (this: this, ev: UIEvent) => any;\r\n onscroll: (this: this, ev: UIEvent) => any;\r\n onunload: (this: this, ev: Event) => any;\r\n onzoom: (this: this, ev: SVGZoomEvent) => any;\r\n readonly pixelUnitToMillimeterX: number;\r\n readonly pixelUnitToMillimeterY: number;\r\n readonly screenPixelToMillimeterX: number;\r\n readonly screenPixelToMillimeterY: number;\r\n readonly viewport: SVGRect;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n checkEnclosure(element: SVGElement, rect: SVGRect): boolean;\r\n checkIntersection(element: SVGElement, rect: SVGRect): boolean;\r\n createSVGAngle(): SVGAngle;\r\n createSVGLength(): SVGLength;\r\n createSVGMatrix(): SVGMatrix;\r\n createSVGNumber(): SVGNumber;\r\n createSVGPoint(): SVGPoint;\r\n createSVGRect(): SVGRect;\r\n createSVGTransform(): SVGTransform;\r\n createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;\r\n deselectAll(): void;\r\n forceRedraw(): void;\r\n getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;\r\n getCurrentTime(): number;\r\n getElementById(elementId: string): Element;\r\n getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeListOf;\r\n getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeListOf;\r\n pauseAnimations(): void;\r\n setCurrentTime(seconds: number): void;\r\n suspendRedraw(maxWaitMilliseconds: number): number;\r\n unpauseAnimations(): void;\r\n unsuspendRedraw(suspendHandleID: number): void;\r\n unsuspendRedrawAll(): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGotPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSLostPointerCapture\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGAbort\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGError\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGUnload\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"SVGZoom\", listener: (this: this, ev: SVGZoomEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ariarequest\", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"command\", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusin\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focusout\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"gotpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"lostpointercapture\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchcancel\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchend\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchmove\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"touchstart\", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"webkitfullscreenerror\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGSVGElement: {\r\n prototype: SVGSVGElement;\r\n new(): SVGSVGElement;\r\n}\r\n\r\ninterface SVGScriptElement extends SVGElement, SVGExternalResourcesRequired, SVGURIReference {\r\n type: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGScriptElement: {\r\n prototype: SVGScriptElement;\r\n new(): SVGScriptElement;\r\n}\r\n\r\ninterface SVGStopElement extends SVGElement, SVGStylable {\r\n readonly offset: SVGAnimatedNumber;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGStopElement: {\r\n prototype: SVGStopElement;\r\n new(): SVGStopElement;\r\n}\r\n\r\ninterface SVGStringList {\r\n readonly numberOfItems: number;\r\n appendItem(newItem: string): string;\r\n clear(): void;\r\n getItem(index: number): string;\r\n initialize(newItem: string): string;\r\n insertItemBefore(newItem: string, index: number): string;\r\n removeItem(index: number): string;\r\n replaceItem(newItem: string, index: number): string;\r\n}\r\n\r\ndeclare var SVGStringList: {\r\n prototype: SVGStringList;\r\n new(): SVGStringList;\r\n}\r\n\r\ninterface SVGStyleElement extends SVGElement, SVGLangSpace {\r\n disabled: boolean;\r\n media: string;\r\n title: string;\r\n type: string;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGStyleElement: {\r\n prototype: SVGStyleElement;\r\n new(): SVGStyleElement;\r\n}\r\n\r\ninterface SVGSwitchElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGSwitchElement: {\r\n prototype: SVGSwitchElement;\r\n new(): SVGSwitchElement;\r\n}\r\n\r\ninterface SVGSymbolElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGSymbolElement: {\r\n prototype: SVGSymbolElement;\r\n new(): SVGSymbolElement;\r\n}\r\n\r\ninterface SVGTSpanElement extends SVGTextPositioningElement {\r\n}\r\n\r\ndeclare var SVGTSpanElement: {\r\n prototype: SVGTSpanElement;\r\n new(): SVGTSpanElement;\r\n}\r\n\r\ninterface SVGTextContentElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {\r\n readonly lengthAdjust: SVGAnimatedEnumeration;\r\n readonly textLength: SVGAnimatedLength;\r\n getCharNumAtPosition(point: SVGPoint): number;\r\n getComputedTextLength(): number;\r\n getEndPositionOfChar(charnum: number): SVGPoint;\r\n getExtentOfChar(charnum: number): SVGRect;\r\n getNumberOfChars(): number;\r\n getRotationOfChar(charnum: number): number;\r\n getStartPositionOfChar(charnum: number): SVGPoint;\r\n getSubStringLength(charnum: number, nchars: number): number;\r\n selectSubString(charnum: number, nchars: number): void;\r\n readonly LENGTHADJUST_SPACING: number;\r\n readonly LENGTHADJUST_SPACINGANDGLYPHS: number;\r\n readonly LENGTHADJUST_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTextContentElement: {\r\n prototype: SVGTextContentElement;\r\n new(): SVGTextContentElement;\r\n readonly LENGTHADJUST_SPACING: number;\r\n readonly LENGTHADJUST_SPACINGANDGLYPHS: number;\r\n readonly LENGTHADJUST_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGTextElement extends SVGTextPositioningElement, SVGTransformable {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTextElement: {\r\n prototype: SVGTextElement;\r\n new(): SVGTextElement;\r\n}\r\n\r\ninterface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {\r\n readonly method: SVGAnimatedEnumeration;\r\n readonly spacing: SVGAnimatedEnumeration;\r\n readonly startOffset: SVGAnimatedLength;\r\n readonly TEXTPATH_METHODTYPE_ALIGN: number;\r\n readonly TEXTPATH_METHODTYPE_STRETCH: number;\r\n readonly TEXTPATH_METHODTYPE_UNKNOWN: number;\r\n readonly TEXTPATH_SPACINGTYPE_AUTO: number;\r\n readonly TEXTPATH_SPACINGTYPE_EXACT: number;\r\n readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTextPathElement: {\r\n prototype: SVGTextPathElement;\r\n new(): SVGTextPathElement;\r\n readonly TEXTPATH_METHODTYPE_ALIGN: number;\r\n readonly TEXTPATH_METHODTYPE_STRETCH: number;\r\n readonly TEXTPATH_METHODTYPE_UNKNOWN: number;\r\n readonly TEXTPATH_SPACINGTYPE_AUTO: number;\r\n readonly TEXTPATH_SPACINGTYPE_EXACT: number;\r\n readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGTextPositioningElement extends SVGTextContentElement {\r\n readonly dx: SVGAnimatedLengthList;\r\n readonly dy: SVGAnimatedLengthList;\r\n readonly rotate: SVGAnimatedNumberList;\r\n readonly x: SVGAnimatedLengthList;\r\n readonly y: SVGAnimatedLengthList;\r\n}\r\n\r\ndeclare var SVGTextPositioningElement: {\r\n prototype: SVGTextPositioningElement;\r\n new(): SVGTextPositioningElement;\r\n}\r\n\r\ninterface SVGTitleElement extends SVGElement, SVGStylable, SVGLangSpace {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGTitleElement: {\r\n prototype: SVGTitleElement;\r\n new(): SVGTitleElement;\r\n}\r\n\r\ninterface SVGTransform {\r\n readonly angle: number;\r\n readonly matrix: SVGMatrix;\r\n readonly type: number;\r\n setMatrix(matrix: SVGMatrix): void;\r\n setRotate(angle: number, cx: number, cy: number): void;\r\n setScale(sx: number, sy: number): void;\r\n setSkewX(angle: number): void;\r\n setSkewY(angle: number): void;\r\n setTranslate(tx: number, ty: number): void;\r\n readonly SVG_TRANSFORM_MATRIX: number;\r\n readonly SVG_TRANSFORM_ROTATE: number;\r\n readonly SVG_TRANSFORM_SCALE: number;\r\n readonly SVG_TRANSFORM_SKEWX: number;\r\n readonly SVG_TRANSFORM_SKEWY: number;\r\n readonly SVG_TRANSFORM_TRANSLATE: number;\r\n readonly SVG_TRANSFORM_UNKNOWN: number;\r\n}\r\n\r\ndeclare var SVGTransform: {\r\n prototype: SVGTransform;\r\n new(): SVGTransform;\r\n readonly SVG_TRANSFORM_MATRIX: number;\r\n readonly SVG_TRANSFORM_ROTATE: number;\r\n readonly SVG_TRANSFORM_SCALE: number;\r\n readonly SVG_TRANSFORM_SKEWX: number;\r\n readonly SVG_TRANSFORM_SKEWY: number;\r\n readonly SVG_TRANSFORM_TRANSLATE: number;\r\n readonly SVG_TRANSFORM_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGTransformList {\r\n readonly numberOfItems: number;\r\n appendItem(newItem: SVGTransform): SVGTransform;\r\n clear(): void;\r\n consolidate(): SVGTransform;\r\n createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;\r\n getItem(index: number): SVGTransform;\r\n initialize(newItem: SVGTransform): SVGTransform;\r\n insertItemBefore(newItem: SVGTransform, index: number): SVGTransform;\r\n removeItem(index: number): SVGTransform;\r\n replaceItem(newItem: SVGTransform, index: number): SVGTransform;\r\n}\r\n\r\ndeclare var SVGTransformList: {\r\n prototype: SVGTransformList;\r\n new(): SVGTransformList;\r\n}\r\n\r\ninterface SVGUnitTypes {\r\n readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;\r\n readonly SVG_UNIT_TYPE_UNKNOWN: number;\r\n readonly SVG_UNIT_TYPE_USERSPACEONUSE: number;\r\n}\r\ndeclare var SVGUnitTypes: SVGUnitTypes;\r\n\r\ninterface SVGUseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {\r\n readonly animatedInstanceRoot: SVGElementInstance;\r\n readonly height: SVGAnimatedLength;\r\n readonly instanceRoot: SVGElementInstance;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGUseElement: {\r\n prototype: SVGUseElement;\r\n new(): SVGUseElement;\r\n}\r\n\r\ninterface SVGViewElement extends SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {\r\n readonly viewTarget: SVGStringList;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var SVGViewElement: {\r\n prototype: SVGViewElement;\r\n new(): SVGViewElement;\r\n}\r\n\r\ninterface SVGZoomAndPan {\r\n readonly zoomAndPan: number;\r\n}\r\n\r\ndeclare var SVGZoomAndPan: {\r\n readonly SVG_ZOOMANDPAN_DISABLE: number;\r\n readonly SVG_ZOOMANDPAN_MAGNIFY: number;\r\n readonly SVG_ZOOMANDPAN_UNKNOWN: number;\r\n}\r\n\r\ninterface SVGZoomEvent extends UIEvent {\r\n readonly newScale: number;\r\n readonly newTranslate: SVGPoint;\r\n readonly previousScale: number;\r\n readonly previousTranslate: SVGPoint;\r\n readonly zoomRectScreen: SVGRect;\r\n}\r\n\r\ndeclare var SVGZoomEvent: {\r\n prototype: SVGZoomEvent;\r\n new(): SVGZoomEvent;\r\n}\r\n\r\ninterface Screen extends EventTarget {\r\n readonly availHeight: number;\r\n readonly availWidth: number;\r\n bufferDepth: number;\r\n readonly colorDepth: number;\r\n readonly deviceXDPI: number;\r\n readonly deviceYDPI: number;\r\n readonly fontSmoothingEnabled: boolean;\r\n readonly height: number;\r\n readonly logicalXDPI: number;\r\n readonly logicalYDPI: number;\r\n readonly msOrientation: string;\r\n onmsorientationchange: (this: this, ev: Event) => any;\r\n readonly pixelDepth: number;\r\n readonly systemXDPI: number;\r\n readonly systemYDPI: number;\r\n readonly width: number;\r\n msLockOrientation(orientations: string | string[]): boolean;\r\n msUnlockOrientation(): void;\r\n addEventListener(type: \"MSOrientationChange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Screen: {\r\n prototype: Screen;\r\n new(): Screen;\r\n}\r\n\r\ninterface ScriptNotifyEvent extends Event {\r\n readonly callingUri: string;\r\n readonly value: string;\r\n}\r\n\r\ndeclare var ScriptNotifyEvent: {\r\n prototype: ScriptNotifyEvent;\r\n new(): ScriptNotifyEvent;\r\n}\r\n\r\ninterface ScriptProcessorNode extends AudioNode {\r\n readonly bufferSize: number;\r\n onaudioprocess: (this: this, ev: AudioProcessingEvent) => any;\r\n addEventListener(type: \"audioprocess\", listener: (this: this, ev: AudioProcessingEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var ScriptProcessorNode: {\r\n prototype: ScriptProcessorNode;\r\n new(): ScriptProcessorNode;\r\n}\r\n\r\ninterface Selection {\r\n readonly anchorNode: Node;\r\n readonly anchorOffset: number;\r\n readonly focusNode: Node;\r\n readonly focusOffset: number;\r\n readonly isCollapsed: boolean;\r\n readonly rangeCount: number;\r\n readonly type: string;\r\n addRange(range: Range): void;\r\n collapse(parentNode: Node, offset: number): void;\r\n collapseToEnd(): void;\r\n collapseToStart(): void;\r\n containsNode(node: Node, partlyContained: boolean): boolean;\r\n deleteFromDocument(): void;\r\n empty(): void;\r\n extend(newNode: Node, offset: number): void;\r\n getRangeAt(index: number): Range;\r\n removeAllRanges(): void;\r\n removeRange(range: Range): void;\r\n selectAllChildren(parentNode: Node): void;\r\n setBaseAndExtent(baseNode: Node, baseOffset: number, extentNode: Node, extentOffset: number): void;\r\n toString(): string;\r\n}\r\n\r\ndeclare var Selection: {\r\n prototype: Selection;\r\n new(): Selection;\r\n}\r\n\r\ninterface SourceBuffer extends EventTarget {\r\n appendWindowEnd: number;\r\n appendWindowStart: number;\r\n readonly audioTracks: AudioTrackList;\r\n readonly buffered: TimeRanges;\r\n mode: string;\r\n timestampOffset: number;\r\n readonly updating: boolean;\r\n readonly videoTracks: VideoTrackList;\r\n abort(): void;\r\n appendBuffer(data: ArrayBuffer | ArrayBufferView): void;\r\n appendStream(stream: MSStream, maxSize?: number): void;\r\n remove(start: number, end: number): void;\r\n}\r\n\r\ndeclare var SourceBuffer: {\r\n prototype: SourceBuffer;\r\n new(): SourceBuffer;\r\n}\r\n\r\ninterface SourceBufferList extends EventTarget {\r\n readonly length: number;\r\n item(index: number): SourceBuffer;\r\n [index: number]: SourceBuffer;\r\n}\r\n\r\ndeclare var SourceBufferList: {\r\n prototype: SourceBufferList;\r\n new(): SourceBufferList;\r\n}\r\n\r\ninterface StereoPannerNode extends AudioNode {\r\n readonly pan: AudioParam;\r\n}\r\n\r\ndeclare var StereoPannerNode: {\r\n prototype: StereoPannerNode;\r\n new(): StereoPannerNode;\r\n}\r\n\r\ninterface Storage {\r\n readonly length: number;\r\n clear(): void;\r\n getItem(key: string): string | null;\r\n key(index: number): string | null;\r\n removeItem(key: string): void;\r\n setItem(key: string, data: string): void;\r\n [key: string]: any;\r\n [index: number]: string;\r\n}\r\n\r\ndeclare var Storage: {\r\n prototype: Storage;\r\n new(): Storage;\r\n}\r\n\r\ninterface StorageEvent extends Event {\r\n readonly url: string;\r\n key?: string;\r\n oldValue?: string;\r\n newValue?: string;\r\n storageArea?: Storage;\r\n}\r\n\r\ndeclare var StorageEvent: {\r\n prototype: StorageEvent;\r\n new (type: string, eventInitDict?: StorageEventInit): StorageEvent;\r\n}\r\n\r\ninterface StyleMedia {\r\n readonly type: string;\r\n matchMedium(mediaquery: string): boolean;\r\n}\r\n\r\ndeclare var StyleMedia: {\r\n prototype: StyleMedia;\r\n new(): StyleMedia;\r\n}\r\n\r\ninterface StyleSheet {\r\n disabled: boolean;\r\n readonly href: string;\r\n readonly media: MediaList;\r\n readonly ownerNode: Node;\r\n readonly parentStyleSheet: StyleSheet;\r\n readonly title: string;\r\n readonly type: string;\r\n}\r\n\r\ndeclare var StyleSheet: {\r\n prototype: StyleSheet;\r\n new(): StyleSheet;\r\n}\r\n\r\ninterface StyleSheetList {\r\n readonly length: number;\r\n item(index?: number): StyleSheet;\r\n [index: number]: StyleSheet;\r\n}\r\n\r\ndeclare var StyleSheetList: {\r\n prototype: StyleSheetList;\r\n new(): StyleSheetList;\r\n}\r\n\r\ninterface StyleSheetPageList {\r\n readonly length: number;\r\n item(index: number): CSSPageRule;\r\n [index: number]: CSSPageRule;\r\n}\r\n\r\ndeclare var StyleSheetPageList: {\r\n prototype: StyleSheetPageList;\r\n new(): StyleSheetPageList;\r\n}\r\n\r\ninterface SubtleCrypto {\r\n decrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike;\r\n deriveBits(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): PromiseLike;\r\n deriveKey(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike;\r\n digest(algorithm: AlgorithmIdentifier, data: BufferSource): PromiseLike;\r\n encrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike;\r\n exportKey(format: \"jwk\", key: CryptoKey): PromiseLike;\r\n exportKey(format: \"raw\" | \"pkcs8\" | \"spki\", key: CryptoKey): PromiseLike;\r\n exportKey(format: string, key: CryptoKey): PromiseLike;\r\n generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): PromiseLike;\r\n generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: string[]): PromiseLike;\r\n generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike;\r\n importKey(format: \"jwk\", keyData: JsonWebKey, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike;\r\n importKey(format: \"raw\" | \"pkcs8\" | \"spki\", keyData: BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike;\r\n importKey(format: string, keyData: JsonWebKey | BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike;\r\n sign(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: BufferSource): PromiseLike;\r\n unwrapKey(format: string, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: string[]): PromiseLike;\r\n verify(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: BufferSource, data: BufferSource): PromiseLike;\r\n wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier): PromiseLike;\r\n}\r\n\r\ndeclare var SubtleCrypto: {\r\n prototype: SubtleCrypto;\r\n new(): SubtleCrypto;\r\n}\r\n\r\ninterface Text extends CharacterData {\r\n readonly wholeText: string;\r\n splitText(offset: number): Text;\r\n}\r\n\r\ndeclare var Text: {\r\n prototype: Text;\r\n new(): Text;\r\n}\r\n\r\ninterface TextEvent extends UIEvent {\r\n readonly data: string;\r\n readonly inputMethod: number;\r\n readonly locale: string;\r\n initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void;\r\n readonly DOM_INPUT_METHOD_DROP: number;\r\n readonly DOM_INPUT_METHOD_HANDWRITING: number;\r\n readonly DOM_INPUT_METHOD_IME: number;\r\n readonly DOM_INPUT_METHOD_KEYBOARD: number;\r\n readonly DOM_INPUT_METHOD_MULTIMODAL: number;\r\n readonly DOM_INPUT_METHOD_OPTION: number;\r\n readonly DOM_INPUT_METHOD_PASTE: number;\r\n readonly DOM_INPUT_METHOD_SCRIPT: number;\r\n readonly DOM_INPUT_METHOD_UNKNOWN: number;\r\n readonly DOM_INPUT_METHOD_VOICE: number;\r\n}\r\n\r\ndeclare var TextEvent: {\r\n prototype: TextEvent;\r\n new(): TextEvent;\r\n readonly DOM_INPUT_METHOD_DROP: number;\r\n readonly DOM_INPUT_METHOD_HANDWRITING: number;\r\n readonly DOM_INPUT_METHOD_IME: number;\r\n readonly DOM_INPUT_METHOD_KEYBOARD: number;\r\n readonly DOM_INPUT_METHOD_MULTIMODAL: number;\r\n readonly DOM_INPUT_METHOD_OPTION: number;\r\n readonly DOM_INPUT_METHOD_PASTE: number;\r\n readonly DOM_INPUT_METHOD_SCRIPT: number;\r\n readonly DOM_INPUT_METHOD_UNKNOWN: number;\r\n readonly DOM_INPUT_METHOD_VOICE: number;\r\n}\r\n\r\ninterface TextMetrics {\r\n readonly width: number;\r\n}\r\n\r\ndeclare var TextMetrics: {\r\n prototype: TextMetrics;\r\n new(): TextMetrics;\r\n}\r\n\r\ninterface TextTrack extends EventTarget {\r\n readonly activeCues: TextTrackCueList;\r\n readonly cues: TextTrackCueList;\r\n readonly inBandMetadataTrackDispatchType: string;\r\n readonly kind: string;\r\n readonly label: string;\r\n readonly language: string;\r\n mode: any;\r\n oncuechange: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n readonly readyState: number;\r\n addCue(cue: TextTrackCue): void;\r\n removeCue(cue: TextTrackCue): void;\r\n readonly DISABLED: number;\r\n readonly ERROR: number;\r\n readonly HIDDEN: number;\r\n readonly LOADED: number;\r\n readonly LOADING: number;\r\n readonly NONE: number;\r\n readonly SHOWING: number;\r\n addEventListener(type: \"cuechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var TextTrack: {\r\n prototype: TextTrack;\r\n new(): TextTrack;\r\n readonly DISABLED: number;\r\n readonly ERROR: number;\r\n readonly HIDDEN: number;\r\n readonly LOADED: number;\r\n readonly LOADING: number;\r\n readonly NONE: number;\r\n readonly SHOWING: number;\r\n}\r\n\r\ninterface TextTrackCue extends EventTarget {\r\n endTime: number;\r\n id: string;\r\n onenter: (this: this, ev: Event) => any;\r\n onexit: (this: this, ev: Event) => any;\r\n pauseOnExit: boolean;\r\n startTime: number;\r\n text: string;\r\n readonly track: TextTrack;\r\n getCueAsHTML(): DocumentFragment;\r\n addEventListener(type: \"enter\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"exit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var TextTrackCue: {\r\n prototype: TextTrackCue;\r\n new(startTime: number, endTime: number, text: string): TextTrackCue;\r\n}\r\n\r\ninterface TextTrackCueList {\r\n readonly length: number;\r\n getCueById(id: string): TextTrackCue;\r\n item(index: number): TextTrackCue;\r\n [index: number]: TextTrackCue;\r\n}\r\n\r\ndeclare var TextTrackCueList: {\r\n prototype: TextTrackCueList;\r\n new(): TextTrackCueList;\r\n}\r\n\r\ninterface TextTrackList extends EventTarget {\r\n readonly length: number;\r\n onaddtrack: ((this: this, ev: TrackEvent) => any) | null;\r\n item(index: number): TextTrack;\r\n addEventListener(type: \"addtrack\", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: TextTrack;\r\n}\r\n\r\ndeclare var TextTrackList: {\r\n prototype: TextTrackList;\r\n new(): TextTrackList;\r\n}\r\n\r\ninterface TimeRanges {\r\n readonly length: number;\r\n end(index: number): number;\r\n start(index: number): number;\r\n}\r\n\r\ndeclare var TimeRanges: {\r\n prototype: TimeRanges;\r\n new(): TimeRanges;\r\n}\r\n\r\ninterface Touch {\r\n readonly clientX: number;\r\n readonly clientY: number;\r\n readonly identifier: number;\r\n readonly pageX: number;\r\n readonly pageY: number;\r\n readonly screenX: number;\r\n readonly screenY: number;\r\n readonly target: EventTarget;\r\n}\r\n\r\ndeclare var Touch: {\r\n prototype: Touch;\r\n new(): Touch;\r\n}\r\n\r\ninterface TouchEvent extends UIEvent {\r\n readonly altKey: boolean;\r\n readonly changedTouches: TouchList;\r\n readonly ctrlKey: boolean;\r\n readonly metaKey: boolean;\r\n readonly shiftKey: boolean;\r\n readonly targetTouches: TouchList;\r\n readonly touches: TouchList;\r\n}\r\n\r\ndeclare var TouchEvent: {\r\n prototype: TouchEvent;\r\n new(): TouchEvent;\r\n}\r\n\r\ninterface TouchList {\r\n readonly length: number;\r\n item(index: number): Touch | null;\r\n [index: number]: Touch;\r\n}\r\n\r\ndeclare var TouchList: {\r\n prototype: TouchList;\r\n new(): TouchList;\r\n}\r\n\r\ninterface TrackEvent extends Event {\r\n readonly track: any;\r\n}\r\n\r\ndeclare var TrackEvent: {\r\n prototype: TrackEvent;\r\n new(): TrackEvent;\r\n}\r\n\r\ninterface TransitionEvent extends Event {\r\n readonly elapsedTime: number;\r\n readonly propertyName: string;\r\n initTransitionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, propertyNameArg: string, elapsedTimeArg: number): void;\r\n}\r\n\r\ndeclare var TransitionEvent: {\r\n prototype: TransitionEvent;\r\n new(): TransitionEvent;\r\n}\r\n\r\ninterface TreeWalker {\r\n currentNode: Node;\r\n readonly expandEntityReferences: boolean;\r\n readonly filter: NodeFilter;\r\n readonly root: Node;\r\n readonly whatToShow: number;\r\n firstChild(): Node;\r\n lastChild(): Node;\r\n nextNode(): Node;\r\n nextSibling(): Node;\r\n parentNode(): Node;\r\n previousNode(): Node;\r\n previousSibling(): Node;\r\n}\r\n\r\ndeclare var TreeWalker: {\r\n prototype: TreeWalker;\r\n new(): TreeWalker;\r\n}\r\n\r\ninterface UIEvent extends Event {\r\n readonly detail: number;\r\n readonly view: Window;\r\n initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number): void;\r\n}\r\n\r\ndeclare var UIEvent: {\r\n prototype: UIEvent;\r\n new(type: string, eventInitDict?: UIEventInit): UIEvent;\r\n}\r\n\r\ninterface URL {\r\n hash: string;\r\n host: string;\r\n hostname: string;\r\n href: string;\r\n readonly origin: string;\r\n password: string;\r\n pathname: string;\r\n port: string;\r\n protocol: string;\r\n search: string;\r\n username: string;\r\n toString(): string;\r\n}\r\n\r\ndeclare var URL: {\r\n prototype: URL;\r\n new(url: string, base?: string): URL;\r\n createObjectURL(object: any, options?: ObjectURLOptions): string;\r\n revokeObjectURL(url: string): void;\r\n}\r\n\r\ninterface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {\r\n readonly mediaType: string;\r\n}\r\n\r\ndeclare var UnviewableContentIdentifiedEvent: {\r\n prototype: UnviewableContentIdentifiedEvent;\r\n new(): UnviewableContentIdentifiedEvent;\r\n}\r\n\r\ninterface ValidityState {\r\n readonly badInput: boolean;\r\n readonly customError: boolean;\r\n readonly patternMismatch: boolean;\r\n readonly rangeOverflow: boolean;\r\n readonly rangeUnderflow: boolean;\r\n readonly stepMismatch: boolean;\r\n readonly tooLong: boolean;\r\n readonly typeMismatch: boolean;\r\n readonly valid: boolean;\r\n readonly valueMissing: boolean;\r\n}\r\n\r\ndeclare var ValidityState: {\r\n prototype: ValidityState;\r\n new(): ValidityState;\r\n}\r\n\r\ninterface VideoPlaybackQuality {\r\n readonly corruptedVideoFrames: number;\r\n readonly creationTime: number;\r\n readonly droppedVideoFrames: number;\r\n readonly totalFrameDelay: number;\r\n readonly totalVideoFrames: number;\r\n}\r\n\r\ndeclare var VideoPlaybackQuality: {\r\n prototype: VideoPlaybackQuality;\r\n new(): VideoPlaybackQuality;\r\n}\r\n\r\ninterface VideoTrack {\r\n readonly id: string;\r\n kind: string;\r\n readonly label: string;\r\n language: string;\r\n selected: boolean;\r\n readonly sourceBuffer: SourceBuffer;\r\n}\r\n\r\ndeclare var VideoTrack: {\r\n prototype: VideoTrack;\r\n new(): VideoTrack;\r\n}\r\n\r\ninterface VideoTrackList extends EventTarget {\r\n readonly length: number;\r\n onaddtrack: (this: this, ev: TrackEvent) => any;\r\n onchange: (this: this, ev: Event) => any;\r\n onremovetrack: (this: this, ev: TrackEvent) => any;\r\n readonly selectedIndex: number;\r\n getTrackById(id: string): VideoTrack | null;\r\n item(index: number): VideoTrack;\r\n addEventListener(type: \"addtrack\", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"removetrack\", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: VideoTrack;\r\n}\r\n\r\ndeclare var VideoTrackList: {\r\n prototype: VideoTrackList;\r\n new(): VideoTrackList;\r\n}\r\n\r\ninterface WEBGL_compressed_texture_s3tc {\r\n readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;\r\n readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;\r\n readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;\r\n readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;\r\n}\r\n\r\ndeclare var WEBGL_compressed_texture_s3tc: {\r\n prototype: WEBGL_compressed_texture_s3tc;\r\n new(): WEBGL_compressed_texture_s3tc;\r\n readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;\r\n readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;\r\n readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;\r\n readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;\r\n}\r\n\r\ninterface WEBGL_debug_renderer_info {\r\n readonly UNMASKED_RENDERER_WEBGL: number;\r\n readonly UNMASKED_VENDOR_WEBGL: number;\r\n}\r\n\r\ndeclare var WEBGL_debug_renderer_info: {\r\n prototype: WEBGL_debug_renderer_info;\r\n new(): WEBGL_debug_renderer_info;\r\n readonly UNMASKED_RENDERER_WEBGL: number;\r\n readonly UNMASKED_VENDOR_WEBGL: number;\r\n}\r\n\r\ninterface WEBGL_depth_texture {\r\n readonly UNSIGNED_INT_24_8_WEBGL: number;\r\n}\r\n\r\ndeclare var WEBGL_depth_texture: {\r\n prototype: WEBGL_depth_texture;\r\n new(): WEBGL_depth_texture;\r\n readonly UNSIGNED_INT_24_8_WEBGL: number;\r\n}\r\n\r\ninterface WaveShaperNode extends AudioNode {\r\n curve: Float32Array | null;\r\n oversample: string;\r\n}\r\n\r\ndeclare var WaveShaperNode: {\r\n prototype: WaveShaperNode;\r\n new(): WaveShaperNode;\r\n}\r\n\r\ninterface WebGLActiveInfo {\r\n readonly name: string;\r\n readonly size: number;\r\n readonly type: number;\r\n}\r\n\r\ndeclare var WebGLActiveInfo: {\r\n prototype: WebGLActiveInfo;\r\n new(): WebGLActiveInfo;\r\n}\r\n\r\ninterface WebGLBuffer extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLBuffer: {\r\n prototype: WebGLBuffer;\r\n new(): WebGLBuffer;\r\n}\r\n\r\ninterface WebGLContextEvent extends Event {\r\n readonly statusMessage: string;\r\n}\r\n\r\ndeclare var WebGLContextEvent: {\r\n prototype: WebGLContextEvent;\r\n new(type: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent;\r\n}\r\n\r\ninterface WebGLFramebuffer extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLFramebuffer: {\r\n prototype: WebGLFramebuffer;\r\n new(): WebGLFramebuffer;\r\n}\r\n\r\ninterface WebGLObject {\r\n}\r\n\r\ndeclare var WebGLObject: {\r\n prototype: WebGLObject;\r\n new(): WebGLObject;\r\n}\r\n\r\ninterface WebGLProgram extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLProgram: {\r\n prototype: WebGLProgram;\r\n new(): WebGLProgram;\r\n}\r\n\r\ninterface WebGLRenderbuffer extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLRenderbuffer: {\r\n prototype: WebGLRenderbuffer;\r\n new(): WebGLRenderbuffer;\r\n}\r\n\r\ninterface WebGLRenderingContext {\r\n readonly canvas: HTMLCanvasElement;\r\n readonly drawingBufferHeight: number;\r\n readonly drawingBufferWidth: number;\r\n activeTexture(texture: number): void;\r\n attachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;\r\n bindAttribLocation(program: WebGLProgram | null, index: number, name: string): void;\r\n bindBuffer(target: number, buffer: WebGLBuffer | null): void;\r\n bindFramebuffer(target: number, framebuffer: WebGLFramebuffer | null): void;\r\n bindRenderbuffer(target: number, renderbuffer: WebGLRenderbuffer | null): void;\r\n bindTexture(target: number, texture: WebGLTexture | null): void;\r\n blendColor(red: number, green: number, blue: number, alpha: number): void;\r\n blendEquation(mode: number): void;\r\n blendEquationSeparate(modeRGB: number, modeAlpha: number): void;\r\n blendFunc(sfactor: number, dfactor: number): void;\r\n blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;\r\n bufferData(target: number, size: number | ArrayBufferView | ArrayBuffer, usage: number): void;\r\n bufferSubData(target: number, offset: number, data: ArrayBufferView | ArrayBuffer): void;\r\n checkFramebufferStatus(target: number): number;\r\n clear(mask: number): void;\r\n clearColor(red: number, green: number, blue: number, alpha: number): void;\r\n clearDepth(depth: number): void;\r\n clearStencil(s: number): void;\r\n colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;\r\n compileShader(shader: WebGLShader | null): void;\r\n compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;\r\n compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;\r\n copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;\r\n copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;\r\n createBuffer(): WebGLBuffer | null;\r\n createFramebuffer(): WebGLFramebuffer | null;\r\n createProgram(): WebGLProgram | null;\r\n createRenderbuffer(): WebGLRenderbuffer | null;\r\n createShader(type: number): WebGLShader | null;\r\n createTexture(): WebGLTexture | null;\r\n cullFace(mode: number): void;\r\n deleteBuffer(buffer: WebGLBuffer | null): void;\r\n deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;\r\n deleteProgram(program: WebGLProgram | null): void;\r\n deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;\r\n deleteShader(shader: WebGLShader | null): void;\r\n deleteTexture(texture: WebGLTexture | null): void;\r\n depthFunc(func: number): void;\r\n depthMask(flag: boolean): void;\r\n depthRange(zNear: number, zFar: number): void;\r\n detachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;\r\n disable(cap: number): void;\r\n disableVertexAttribArray(index: number): void;\r\n drawArrays(mode: number, first: number, count: number): void;\r\n drawElements(mode: number, count: number, type: number, offset: number): void;\r\n enable(cap: number): void;\r\n enableVertexAttribArray(index: number): void;\r\n finish(): void;\r\n flush(): void;\r\n framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: WebGLRenderbuffer | null): void;\r\n framebufferTexture2D(target: number, attachment: number, textarget: number, texture: WebGLTexture | null, level: number): void;\r\n frontFace(mode: number): void;\r\n generateMipmap(target: number): void;\r\n getActiveAttrib(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;\r\n getActiveUniform(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;\r\n getAttachedShaders(program: WebGLProgram | null): WebGLShader[] | null;\r\n getAttribLocation(program: WebGLProgram | null, name: string): number;\r\n getBufferParameter(target: number, pname: number): any;\r\n getContextAttributes(): WebGLContextAttributes;\r\n getError(): number;\r\n getExtension(name: string): any;\r\n getFramebufferAttachmentParameter(target: number, attachment: number, pname: number): any;\r\n getParameter(pname: number): any;\r\n getProgramInfoLog(program: WebGLProgram | null): string | null;\r\n getProgramParameter(program: WebGLProgram | null, pname: number): any;\r\n getRenderbufferParameter(target: number, pname: number): any;\r\n getShaderInfoLog(shader: WebGLShader | null): string | null;\r\n getShaderParameter(shader: WebGLShader | null, pname: number): any;\r\n getShaderPrecisionFormat(shadertype: number, precisiontype: number): WebGLShaderPrecisionFormat | null;\r\n getShaderSource(shader: WebGLShader | null): string | null;\r\n getSupportedExtensions(): string[] | null;\r\n getTexParameter(target: number, pname: number): any;\r\n getUniform(program: WebGLProgram | null, location: WebGLUniformLocation | null): any;\r\n getUniformLocation(program: WebGLProgram | null, name: string): WebGLUniformLocation | null;\r\n getVertexAttrib(index: number, pname: number): any;\r\n getVertexAttribOffset(index: number, pname: number): number;\r\n hint(target: number, mode: number): void;\r\n isBuffer(buffer: WebGLBuffer | null): boolean;\r\n isContextLost(): boolean;\r\n isEnabled(cap: number): boolean;\r\n isFramebuffer(framebuffer: WebGLFramebuffer | null): boolean;\r\n isProgram(program: WebGLProgram | null): boolean;\r\n isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): boolean;\r\n isShader(shader: WebGLShader | null): boolean;\r\n isTexture(texture: WebGLTexture | null): boolean;\r\n lineWidth(width: number): void;\r\n linkProgram(program: WebGLProgram | null): void;\r\n pixelStorei(pname: number, param: number): void;\r\n polygonOffset(factor: number, units: number): void;\r\n readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView | null): void;\r\n renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;\r\n sampleCoverage(value: number, invert: boolean): void;\r\n scissor(x: number, y: number, width: number, height: number): void;\r\n shaderSource(shader: WebGLShader | null, source: string): void;\r\n stencilFunc(func: number, ref: number, mask: number): void;\r\n stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void;\r\n stencilMask(mask: number): void;\r\n stencilMaskSeparate(face: number, mask: number): void;\r\n stencilOp(fail: number, zfail: number, zpass: number): void;\r\n stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void;\r\n texImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, format: number, type: number, pixels?: ArrayBufferView): void;\r\n texImage2D(target: number, level: number, internalformat: number, format: number, type: number, pixels?: ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;\r\n texParameterf(target: number, pname: number, param: number): void;\r\n texParameteri(target: number, pname: number, param: number): void;\r\n texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, type: number, pixels?: ArrayBufferView): void;\r\n texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, pixels?: ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;\r\n uniform1f(location: WebGLUniformLocation | null, x: number): void;\r\n uniform1fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;\r\n uniform1i(location: WebGLUniformLocation | null, x: number): void;\r\n uniform1iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;\r\n uniform2f(location: WebGLUniformLocation | null, x: number, y: number): void;\r\n uniform2fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;\r\n uniform2i(location: WebGLUniformLocation | null, x: number, y: number): void;\r\n uniform2iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;\r\n uniform3f(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;\r\n uniform3fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;\r\n uniform3i(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;\r\n uniform3iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;\r\n uniform4f(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;\r\n uniform4fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;\r\n uniform4i(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;\r\n uniform4iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;\r\n uniformMatrix2fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;\r\n uniformMatrix3fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;\r\n uniformMatrix4fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;\r\n useProgram(program: WebGLProgram | null): void;\r\n validateProgram(program: WebGLProgram | null): void;\r\n vertexAttrib1f(indx: number, x: number): void;\r\n vertexAttrib1fv(indx: number, values: Float32Array | number[]): void;\r\n vertexAttrib2f(indx: number, x: number, y: number): void;\r\n vertexAttrib2fv(indx: number, values: Float32Array | number[]): void;\r\n vertexAttrib3f(indx: number, x: number, y: number, z: number): void;\r\n vertexAttrib3fv(indx: number, values: Float32Array | number[]): void;\r\n vertexAttrib4f(indx: number, x: number, y: number, z: number, w: number): void;\r\n vertexAttrib4fv(indx: number, values: Float32Array | number[]): void;\r\n vertexAttribPointer(indx: number, size: number, type: number, normalized: boolean, stride: number, offset: number): void;\r\n viewport(x: number, y: number, width: number, height: number): void;\r\n readonly ACTIVE_ATTRIBUTES: number;\r\n readonly ACTIVE_TEXTURE: number;\r\n readonly ACTIVE_UNIFORMS: number;\r\n readonly ALIASED_LINE_WIDTH_RANGE: number;\r\n readonly ALIASED_POINT_SIZE_RANGE: number;\r\n readonly ALPHA: number;\r\n readonly ALPHA_BITS: number;\r\n readonly ALWAYS: number;\r\n readonly ARRAY_BUFFER: number;\r\n readonly ARRAY_BUFFER_BINDING: number;\r\n readonly ATTACHED_SHADERS: number;\r\n readonly BACK: number;\r\n readonly BLEND: number;\r\n readonly BLEND_COLOR: number;\r\n readonly BLEND_DST_ALPHA: number;\r\n readonly BLEND_DST_RGB: number;\r\n readonly BLEND_EQUATION: number;\r\n readonly BLEND_EQUATION_ALPHA: number;\r\n readonly BLEND_EQUATION_RGB: number;\r\n readonly BLEND_SRC_ALPHA: number;\r\n readonly BLEND_SRC_RGB: number;\r\n readonly BLUE_BITS: number;\r\n readonly BOOL: number;\r\n readonly BOOL_VEC2: number;\r\n readonly BOOL_VEC3: number;\r\n readonly BOOL_VEC4: number;\r\n readonly BROWSER_DEFAULT_WEBGL: number;\r\n readonly BUFFER_SIZE: number;\r\n readonly BUFFER_USAGE: number;\r\n readonly BYTE: number;\r\n readonly CCW: number;\r\n readonly CLAMP_TO_EDGE: number;\r\n readonly COLOR_ATTACHMENT0: number;\r\n readonly COLOR_BUFFER_BIT: number;\r\n readonly COLOR_CLEAR_VALUE: number;\r\n readonly COLOR_WRITEMASK: number;\r\n readonly COMPILE_STATUS: number;\r\n readonly COMPRESSED_TEXTURE_FORMATS: number;\r\n readonly CONSTANT_ALPHA: number;\r\n readonly CONSTANT_COLOR: number;\r\n readonly CONTEXT_LOST_WEBGL: number;\r\n readonly CULL_FACE: number;\r\n readonly CULL_FACE_MODE: number;\r\n readonly CURRENT_PROGRAM: number;\r\n readonly CURRENT_VERTEX_ATTRIB: number;\r\n readonly CW: number;\r\n readonly DECR: number;\r\n readonly DECR_WRAP: number;\r\n readonly DELETE_STATUS: number;\r\n readonly DEPTH_ATTACHMENT: number;\r\n readonly DEPTH_BITS: number;\r\n readonly DEPTH_BUFFER_BIT: number;\r\n readonly DEPTH_CLEAR_VALUE: number;\r\n readonly DEPTH_COMPONENT: number;\r\n readonly DEPTH_COMPONENT16: number;\r\n readonly DEPTH_FUNC: number;\r\n readonly DEPTH_RANGE: number;\r\n readonly DEPTH_STENCIL: number;\r\n readonly DEPTH_STENCIL_ATTACHMENT: number;\r\n readonly DEPTH_TEST: number;\r\n readonly DEPTH_WRITEMASK: number;\r\n readonly DITHER: number;\r\n readonly DONT_CARE: number;\r\n readonly DST_ALPHA: number;\r\n readonly DST_COLOR: number;\r\n readonly DYNAMIC_DRAW: number;\r\n readonly ELEMENT_ARRAY_BUFFER: number;\r\n readonly ELEMENT_ARRAY_BUFFER_BINDING: number;\r\n readonly EQUAL: number;\r\n readonly FASTEST: number;\r\n readonly FLOAT: number;\r\n readonly FLOAT_MAT2: number;\r\n readonly FLOAT_MAT3: number;\r\n readonly FLOAT_MAT4: number;\r\n readonly FLOAT_VEC2: number;\r\n readonly FLOAT_VEC3: number;\r\n readonly FLOAT_VEC4: number;\r\n readonly FRAGMENT_SHADER: number;\r\n readonly FRAMEBUFFER: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;\r\n readonly FRAMEBUFFER_BINDING: number;\r\n readonly FRAMEBUFFER_COMPLETE: number;\r\n readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;\r\n readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;\r\n readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;\r\n readonly FRAMEBUFFER_UNSUPPORTED: number;\r\n readonly FRONT: number;\r\n readonly FRONT_AND_BACK: number;\r\n readonly FRONT_FACE: number;\r\n readonly FUNC_ADD: number;\r\n readonly FUNC_REVERSE_SUBTRACT: number;\r\n readonly FUNC_SUBTRACT: number;\r\n readonly GENERATE_MIPMAP_HINT: number;\r\n readonly GEQUAL: number;\r\n readonly GREATER: number;\r\n readonly GREEN_BITS: number;\r\n readonly HIGH_FLOAT: number;\r\n readonly HIGH_INT: number;\r\n readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;\r\n readonly IMPLEMENTATION_COLOR_READ_TYPE: number;\r\n readonly INCR: number;\r\n readonly INCR_WRAP: number;\r\n readonly INT: number;\r\n readonly INT_VEC2: number;\r\n readonly INT_VEC3: number;\r\n readonly INT_VEC4: number;\r\n readonly INVALID_ENUM: number;\r\n readonly INVALID_FRAMEBUFFER_OPERATION: number;\r\n readonly INVALID_OPERATION: number;\r\n readonly INVALID_VALUE: number;\r\n readonly INVERT: number;\r\n readonly KEEP: number;\r\n readonly LEQUAL: number;\r\n readonly LESS: number;\r\n readonly LINEAR: number;\r\n readonly LINEAR_MIPMAP_LINEAR: number;\r\n readonly LINEAR_MIPMAP_NEAREST: number;\r\n readonly LINES: number;\r\n readonly LINE_LOOP: number;\r\n readonly LINE_STRIP: number;\r\n readonly LINE_WIDTH: number;\r\n readonly LINK_STATUS: number;\r\n readonly LOW_FLOAT: number;\r\n readonly LOW_INT: number;\r\n readonly LUMINANCE: number;\r\n readonly LUMINANCE_ALPHA: number;\r\n readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;\r\n readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;\r\n readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;\r\n readonly MAX_RENDERBUFFER_SIZE: number;\r\n readonly MAX_TEXTURE_IMAGE_UNITS: number;\r\n readonly MAX_TEXTURE_SIZE: number;\r\n readonly MAX_VARYING_VECTORS: number;\r\n readonly MAX_VERTEX_ATTRIBS: number;\r\n readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;\r\n readonly MAX_VERTEX_UNIFORM_VECTORS: number;\r\n readonly MAX_VIEWPORT_DIMS: number;\r\n readonly MEDIUM_FLOAT: number;\r\n readonly MEDIUM_INT: number;\r\n readonly MIRRORED_REPEAT: number;\r\n readonly NEAREST: number;\r\n readonly NEAREST_MIPMAP_LINEAR: number;\r\n readonly NEAREST_MIPMAP_NEAREST: number;\r\n readonly NEVER: number;\r\n readonly NICEST: number;\r\n readonly NONE: number;\r\n readonly NOTEQUAL: number;\r\n readonly NO_ERROR: number;\r\n readonly ONE: number;\r\n readonly ONE_MINUS_CONSTANT_ALPHA: number;\r\n readonly ONE_MINUS_CONSTANT_COLOR: number;\r\n readonly ONE_MINUS_DST_ALPHA: number;\r\n readonly ONE_MINUS_DST_COLOR: number;\r\n readonly ONE_MINUS_SRC_ALPHA: number;\r\n readonly ONE_MINUS_SRC_COLOR: number;\r\n readonly OUT_OF_MEMORY: number;\r\n readonly PACK_ALIGNMENT: number;\r\n readonly POINTS: number;\r\n readonly POLYGON_OFFSET_FACTOR: number;\r\n readonly POLYGON_OFFSET_FILL: number;\r\n readonly POLYGON_OFFSET_UNITS: number;\r\n readonly RED_BITS: number;\r\n readonly RENDERBUFFER: number;\r\n readonly RENDERBUFFER_ALPHA_SIZE: number;\r\n readonly RENDERBUFFER_BINDING: number;\r\n readonly RENDERBUFFER_BLUE_SIZE: number;\r\n readonly RENDERBUFFER_DEPTH_SIZE: number;\r\n readonly RENDERBUFFER_GREEN_SIZE: number;\r\n readonly RENDERBUFFER_HEIGHT: number;\r\n readonly RENDERBUFFER_INTERNAL_FORMAT: number;\r\n readonly RENDERBUFFER_RED_SIZE: number;\r\n readonly RENDERBUFFER_STENCIL_SIZE: number;\r\n readonly RENDERBUFFER_WIDTH: number;\r\n readonly RENDERER: number;\r\n readonly REPEAT: number;\r\n readonly REPLACE: number;\r\n readonly RGB: number;\r\n readonly RGB565: number;\r\n readonly RGB5_A1: number;\r\n readonly RGBA: number;\r\n readonly RGBA4: number;\r\n readonly SAMPLER_2D: number;\r\n readonly SAMPLER_CUBE: number;\r\n readonly SAMPLES: number;\r\n readonly SAMPLE_ALPHA_TO_COVERAGE: number;\r\n readonly SAMPLE_BUFFERS: number;\r\n readonly SAMPLE_COVERAGE: number;\r\n readonly SAMPLE_COVERAGE_INVERT: number;\r\n readonly SAMPLE_COVERAGE_VALUE: number;\r\n readonly SCISSOR_BOX: number;\r\n readonly SCISSOR_TEST: number;\r\n readonly SHADER_TYPE: number;\r\n readonly SHADING_LANGUAGE_VERSION: number;\r\n readonly SHORT: number;\r\n readonly SRC_ALPHA: number;\r\n readonly SRC_ALPHA_SATURATE: number;\r\n readonly SRC_COLOR: number;\r\n readonly STATIC_DRAW: number;\r\n readonly STENCIL_ATTACHMENT: number;\r\n readonly STENCIL_BACK_FAIL: number;\r\n readonly STENCIL_BACK_FUNC: number;\r\n readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;\r\n readonly STENCIL_BACK_PASS_DEPTH_PASS: number;\r\n readonly STENCIL_BACK_REF: number;\r\n readonly STENCIL_BACK_VALUE_MASK: number;\r\n readonly STENCIL_BACK_WRITEMASK: number;\r\n readonly STENCIL_BITS: number;\r\n readonly STENCIL_BUFFER_BIT: number;\r\n readonly STENCIL_CLEAR_VALUE: number;\r\n readonly STENCIL_FAIL: number;\r\n readonly STENCIL_FUNC: number;\r\n readonly STENCIL_INDEX: number;\r\n readonly STENCIL_INDEX8: number;\r\n readonly STENCIL_PASS_DEPTH_FAIL: number;\r\n readonly STENCIL_PASS_DEPTH_PASS: number;\r\n readonly STENCIL_REF: number;\r\n readonly STENCIL_TEST: number;\r\n readonly STENCIL_VALUE_MASK: number;\r\n readonly STENCIL_WRITEMASK: number;\r\n readonly STREAM_DRAW: number;\r\n readonly SUBPIXEL_BITS: number;\r\n readonly TEXTURE: number;\r\n readonly TEXTURE0: number;\r\n readonly TEXTURE1: number;\r\n readonly TEXTURE10: number;\r\n readonly TEXTURE11: number;\r\n readonly TEXTURE12: number;\r\n readonly TEXTURE13: number;\r\n readonly TEXTURE14: number;\r\n readonly TEXTURE15: number;\r\n readonly TEXTURE16: number;\r\n readonly TEXTURE17: number;\r\n readonly TEXTURE18: number;\r\n readonly TEXTURE19: number;\r\n readonly TEXTURE2: number;\r\n readonly TEXTURE20: number;\r\n readonly TEXTURE21: number;\r\n readonly TEXTURE22: number;\r\n readonly TEXTURE23: number;\r\n readonly TEXTURE24: number;\r\n readonly TEXTURE25: number;\r\n readonly TEXTURE26: number;\r\n readonly TEXTURE27: number;\r\n readonly TEXTURE28: number;\r\n readonly TEXTURE29: number;\r\n readonly TEXTURE3: number;\r\n readonly TEXTURE30: number;\r\n readonly TEXTURE31: number;\r\n readonly TEXTURE4: number;\r\n readonly TEXTURE5: number;\r\n readonly TEXTURE6: number;\r\n readonly TEXTURE7: number;\r\n readonly TEXTURE8: number;\r\n readonly TEXTURE9: number;\r\n readonly TEXTURE_2D: number;\r\n readonly TEXTURE_BINDING_2D: number;\r\n readonly TEXTURE_BINDING_CUBE_MAP: number;\r\n readonly TEXTURE_CUBE_MAP: number;\r\n readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;\r\n readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;\r\n readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;\r\n readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;\r\n readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;\r\n readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;\r\n readonly TEXTURE_MAG_FILTER: number;\r\n readonly TEXTURE_MIN_FILTER: number;\r\n readonly TEXTURE_WRAP_S: number;\r\n readonly TEXTURE_WRAP_T: number;\r\n readonly TRIANGLES: number;\r\n readonly TRIANGLE_FAN: number;\r\n readonly TRIANGLE_STRIP: number;\r\n readonly UNPACK_ALIGNMENT: number;\r\n readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;\r\n readonly UNPACK_FLIP_Y_WEBGL: number;\r\n readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;\r\n readonly UNSIGNED_BYTE: number;\r\n readonly UNSIGNED_INT: number;\r\n readonly UNSIGNED_SHORT: number;\r\n readonly UNSIGNED_SHORT_4_4_4_4: number;\r\n readonly UNSIGNED_SHORT_5_5_5_1: number;\r\n readonly UNSIGNED_SHORT_5_6_5: number;\r\n readonly VALIDATE_STATUS: number;\r\n readonly VENDOR: number;\r\n readonly VERSION: number;\r\n readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;\r\n readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;\r\n readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;\r\n readonly VERTEX_ATTRIB_ARRAY_POINTER: number;\r\n readonly VERTEX_ATTRIB_ARRAY_SIZE: number;\r\n readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;\r\n readonly VERTEX_ATTRIB_ARRAY_TYPE: number;\r\n readonly VERTEX_SHADER: number;\r\n readonly VIEWPORT: number;\r\n readonly ZERO: number;\r\n}\r\n\r\ndeclare var WebGLRenderingContext: {\r\n prototype: WebGLRenderingContext;\r\n new(): WebGLRenderingContext;\r\n readonly ACTIVE_ATTRIBUTES: number;\r\n readonly ACTIVE_TEXTURE: number;\r\n readonly ACTIVE_UNIFORMS: number;\r\n readonly ALIASED_LINE_WIDTH_RANGE: number;\r\n readonly ALIASED_POINT_SIZE_RANGE: number;\r\n readonly ALPHA: number;\r\n readonly ALPHA_BITS: number;\r\n readonly ALWAYS: number;\r\n readonly ARRAY_BUFFER: number;\r\n readonly ARRAY_BUFFER_BINDING: number;\r\n readonly ATTACHED_SHADERS: number;\r\n readonly BACK: number;\r\n readonly BLEND: number;\r\n readonly BLEND_COLOR: number;\r\n readonly BLEND_DST_ALPHA: number;\r\n readonly BLEND_DST_RGB: number;\r\n readonly BLEND_EQUATION: number;\r\n readonly BLEND_EQUATION_ALPHA: number;\r\n readonly BLEND_EQUATION_RGB: number;\r\n readonly BLEND_SRC_ALPHA: number;\r\n readonly BLEND_SRC_RGB: number;\r\n readonly BLUE_BITS: number;\r\n readonly BOOL: number;\r\n readonly BOOL_VEC2: number;\r\n readonly BOOL_VEC3: number;\r\n readonly BOOL_VEC4: number;\r\n readonly BROWSER_DEFAULT_WEBGL: number;\r\n readonly BUFFER_SIZE: number;\r\n readonly BUFFER_USAGE: number;\r\n readonly BYTE: number;\r\n readonly CCW: number;\r\n readonly CLAMP_TO_EDGE: number;\r\n readonly COLOR_ATTACHMENT0: number;\r\n readonly COLOR_BUFFER_BIT: number;\r\n readonly COLOR_CLEAR_VALUE: number;\r\n readonly COLOR_WRITEMASK: number;\r\n readonly COMPILE_STATUS: number;\r\n readonly COMPRESSED_TEXTURE_FORMATS: number;\r\n readonly CONSTANT_ALPHA: number;\r\n readonly CONSTANT_COLOR: number;\r\n readonly CONTEXT_LOST_WEBGL: number;\r\n readonly CULL_FACE: number;\r\n readonly CULL_FACE_MODE: number;\r\n readonly CURRENT_PROGRAM: number;\r\n readonly CURRENT_VERTEX_ATTRIB: number;\r\n readonly CW: number;\r\n readonly DECR: number;\r\n readonly DECR_WRAP: number;\r\n readonly DELETE_STATUS: number;\r\n readonly DEPTH_ATTACHMENT: number;\r\n readonly DEPTH_BITS: number;\r\n readonly DEPTH_BUFFER_BIT: number;\r\n readonly DEPTH_CLEAR_VALUE: number;\r\n readonly DEPTH_COMPONENT: number;\r\n readonly DEPTH_COMPONENT16: number;\r\n readonly DEPTH_FUNC: number;\r\n readonly DEPTH_RANGE: number;\r\n readonly DEPTH_STENCIL: number;\r\n readonly DEPTH_STENCIL_ATTACHMENT: number;\r\n readonly DEPTH_TEST: number;\r\n readonly DEPTH_WRITEMASK: number;\r\n readonly DITHER: number;\r\n readonly DONT_CARE: number;\r\n readonly DST_ALPHA: number;\r\n readonly DST_COLOR: number;\r\n readonly DYNAMIC_DRAW: number;\r\n readonly ELEMENT_ARRAY_BUFFER: number;\r\n readonly ELEMENT_ARRAY_BUFFER_BINDING: number;\r\n readonly EQUAL: number;\r\n readonly FASTEST: number;\r\n readonly FLOAT: number;\r\n readonly FLOAT_MAT2: number;\r\n readonly FLOAT_MAT3: number;\r\n readonly FLOAT_MAT4: number;\r\n readonly FLOAT_VEC2: number;\r\n readonly FLOAT_VEC3: number;\r\n readonly FLOAT_VEC4: number;\r\n readonly FRAGMENT_SHADER: number;\r\n readonly FRAMEBUFFER: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;\r\n readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;\r\n readonly FRAMEBUFFER_BINDING: number;\r\n readonly FRAMEBUFFER_COMPLETE: number;\r\n readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;\r\n readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;\r\n readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;\r\n readonly FRAMEBUFFER_UNSUPPORTED: number;\r\n readonly FRONT: number;\r\n readonly FRONT_AND_BACK: number;\r\n readonly FRONT_FACE: number;\r\n readonly FUNC_ADD: number;\r\n readonly FUNC_REVERSE_SUBTRACT: number;\r\n readonly FUNC_SUBTRACT: number;\r\n readonly GENERATE_MIPMAP_HINT: number;\r\n readonly GEQUAL: number;\r\n readonly GREATER: number;\r\n readonly GREEN_BITS: number;\r\n readonly HIGH_FLOAT: number;\r\n readonly HIGH_INT: number;\r\n readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;\r\n readonly IMPLEMENTATION_COLOR_READ_TYPE: number;\r\n readonly INCR: number;\r\n readonly INCR_WRAP: number;\r\n readonly INT: number;\r\n readonly INT_VEC2: number;\r\n readonly INT_VEC3: number;\r\n readonly INT_VEC4: number;\r\n readonly INVALID_ENUM: number;\r\n readonly INVALID_FRAMEBUFFER_OPERATION: number;\r\n readonly INVALID_OPERATION: number;\r\n readonly INVALID_VALUE: number;\r\n readonly INVERT: number;\r\n readonly KEEP: number;\r\n readonly LEQUAL: number;\r\n readonly LESS: number;\r\n readonly LINEAR: number;\r\n readonly LINEAR_MIPMAP_LINEAR: number;\r\n readonly LINEAR_MIPMAP_NEAREST: number;\r\n readonly LINES: number;\r\n readonly LINE_LOOP: number;\r\n readonly LINE_STRIP: number;\r\n readonly LINE_WIDTH: number;\r\n readonly LINK_STATUS: number;\r\n readonly LOW_FLOAT: number;\r\n readonly LOW_INT: number;\r\n readonly LUMINANCE: number;\r\n readonly LUMINANCE_ALPHA: number;\r\n readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;\r\n readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;\r\n readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;\r\n readonly MAX_RENDERBUFFER_SIZE: number;\r\n readonly MAX_TEXTURE_IMAGE_UNITS: number;\r\n readonly MAX_TEXTURE_SIZE: number;\r\n readonly MAX_VARYING_VECTORS: number;\r\n readonly MAX_VERTEX_ATTRIBS: number;\r\n readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;\r\n readonly MAX_VERTEX_UNIFORM_VECTORS: number;\r\n readonly MAX_VIEWPORT_DIMS: number;\r\n readonly MEDIUM_FLOAT: number;\r\n readonly MEDIUM_INT: number;\r\n readonly MIRRORED_REPEAT: number;\r\n readonly NEAREST: number;\r\n readonly NEAREST_MIPMAP_LINEAR: number;\r\n readonly NEAREST_MIPMAP_NEAREST: number;\r\n readonly NEVER: number;\r\n readonly NICEST: number;\r\n readonly NONE: number;\r\n readonly NOTEQUAL: number;\r\n readonly NO_ERROR: number;\r\n readonly ONE: number;\r\n readonly ONE_MINUS_CONSTANT_ALPHA: number;\r\n readonly ONE_MINUS_CONSTANT_COLOR: number;\r\n readonly ONE_MINUS_DST_ALPHA: number;\r\n readonly ONE_MINUS_DST_COLOR: number;\r\n readonly ONE_MINUS_SRC_ALPHA: number;\r\n readonly ONE_MINUS_SRC_COLOR: number;\r\n readonly OUT_OF_MEMORY: number;\r\n readonly PACK_ALIGNMENT: number;\r\n readonly POINTS: number;\r\n readonly POLYGON_OFFSET_FACTOR: number;\r\n readonly POLYGON_OFFSET_FILL: number;\r\n readonly POLYGON_OFFSET_UNITS: number;\r\n readonly RED_BITS: number;\r\n readonly RENDERBUFFER: number;\r\n readonly RENDERBUFFER_ALPHA_SIZE: number;\r\n readonly RENDERBUFFER_BINDING: number;\r\n readonly RENDERBUFFER_BLUE_SIZE: number;\r\n readonly RENDERBUFFER_DEPTH_SIZE: number;\r\n readonly RENDERBUFFER_GREEN_SIZE: number;\r\n readonly RENDERBUFFER_HEIGHT: number;\r\n readonly RENDERBUFFER_INTERNAL_FORMAT: number;\r\n readonly RENDERBUFFER_RED_SIZE: number;\r\n readonly RENDERBUFFER_STENCIL_SIZE: number;\r\n readonly RENDERBUFFER_WIDTH: number;\r\n readonly RENDERER: number;\r\n readonly REPEAT: number;\r\n readonly REPLACE: number;\r\n readonly RGB: number;\r\n readonly RGB565: number;\r\n readonly RGB5_A1: number;\r\n readonly RGBA: number;\r\n readonly RGBA4: number;\r\n readonly SAMPLER_2D: number;\r\n readonly SAMPLER_CUBE: number;\r\n readonly SAMPLES: number;\r\n readonly SAMPLE_ALPHA_TO_COVERAGE: number;\r\n readonly SAMPLE_BUFFERS: number;\r\n readonly SAMPLE_COVERAGE: number;\r\n readonly SAMPLE_COVERAGE_INVERT: number;\r\n readonly SAMPLE_COVERAGE_VALUE: number;\r\n readonly SCISSOR_BOX: number;\r\n readonly SCISSOR_TEST: number;\r\n readonly SHADER_TYPE: number;\r\n readonly SHADING_LANGUAGE_VERSION: number;\r\n readonly SHORT: number;\r\n readonly SRC_ALPHA: number;\r\n readonly SRC_ALPHA_SATURATE: number;\r\n readonly SRC_COLOR: number;\r\n readonly STATIC_DRAW: number;\r\n readonly STENCIL_ATTACHMENT: number;\r\n readonly STENCIL_BACK_FAIL: number;\r\n readonly STENCIL_BACK_FUNC: number;\r\n readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;\r\n readonly STENCIL_BACK_PASS_DEPTH_PASS: number;\r\n readonly STENCIL_BACK_REF: number;\r\n readonly STENCIL_BACK_VALUE_MASK: number;\r\n readonly STENCIL_BACK_WRITEMASK: number;\r\n readonly STENCIL_BITS: number;\r\n readonly STENCIL_BUFFER_BIT: number;\r\n readonly STENCIL_CLEAR_VALUE: number;\r\n readonly STENCIL_FAIL: number;\r\n readonly STENCIL_FUNC: number;\r\n readonly STENCIL_INDEX: number;\r\n readonly STENCIL_INDEX8: number;\r\n readonly STENCIL_PASS_DEPTH_FAIL: number;\r\n readonly STENCIL_PASS_DEPTH_PASS: number;\r\n readonly STENCIL_REF: number;\r\n readonly STENCIL_TEST: number;\r\n readonly STENCIL_VALUE_MASK: number;\r\n readonly STENCIL_WRITEMASK: number;\r\n readonly STREAM_DRAW: number;\r\n readonly SUBPIXEL_BITS: number;\r\n readonly TEXTURE: number;\r\n readonly TEXTURE0: number;\r\n readonly TEXTURE1: number;\r\n readonly TEXTURE10: number;\r\n readonly TEXTURE11: number;\r\n readonly TEXTURE12: number;\r\n readonly TEXTURE13: number;\r\n readonly TEXTURE14: number;\r\n readonly TEXTURE15: number;\r\n readonly TEXTURE16: number;\r\n readonly TEXTURE17: number;\r\n readonly TEXTURE18: number;\r\n readonly TEXTURE19: number;\r\n readonly TEXTURE2: number;\r\n readonly TEXTURE20: number;\r\n readonly TEXTURE21: number;\r\n readonly TEXTURE22: number;\r\n readonly TEXTURE23: number;\r\n readonly TEXTURE24: number;\r\n readonly TEXTURE25: number;\r\n readonly TEXTURE26: number;\r\n readonly TEXTURE27: number;\r\n readonly TEXTURE28: number;\r\n readonly TEXTURE29: number;\r\n readonly TEXTURE3: number;\r\n readonly TEXTURE30: number;\r\n readonly TEXTURE31: number;\r\n readonly TEXTURE4: number;\r\n readonly TEXTURE5: number;\r\n readonly TEXTURE6: number;\r\n readonly TEXTURE7: number;\r\n readonly TEXTURE8: number;\r\n readonly TEXTURE9: number;\r\n readonly TEXTURE_2D: number;\r\n readonly TEXTURE_BINDING_2D: number;\r\n readonly TEXTURE_BINDING_CUBE_MAP: number;\r\n readonly TEXTURE_CUBE_MAP: number;\r\n readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;\r\n readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;\r\n readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;\r\n readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;\r\n readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;\r\n readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;\r\n readonly TEXTURE_MAG_FILTER: number;\r\n readonly TEXTURE_MIN_FILTER: number;\r\n readonly TEXTURE_WRAP_S: number;\r\n readonly TEXTURE_WRAP_T: number;\r\n readonly TRIANGLES: number;\r\n readonly TRIANGLE_FAN: number;\r\n readonly TRIANGLE_STRIP: number;\r\n readonly UNPACK_ALIGNMENT: number;\r\n readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;\r\n readonly UNPACK_FLIP_Y_WEBGL: number;\r\n readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;\r\n readonly UNSIGNED_BYTE: number;\r\n readonly UNSIGNED_INT: number;\r\n readonly UNSIGNED_SHORT: number;\r\n readonly UNSIGNED_SHORT_4_4_4_4: number;\r\n readonly UNSIGNED_SHORT_5_5_5_1: number;\r\n readonly UNSIGNED_SHORT_5_6_5: number;\r\n readonly VALIDATE_STATUS: number;\r\n readonly VENDOR: number;\r\n readonly VERSION: number;\r\n readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;\r\n readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;\r\n readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;\r\n readonly VERTEX_ATTRIB_ARRAY_POINTER: number;\r\n readonly VERTEX_ATTRIB_ARRAY_SIZE: number;\r\n readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;\r\n readonly VERTEX_ATTRIB_ARRAY_TYPE: number;\r\n readonly VERTEX_SHADER: number;\r\n readonly VIEWPORT: number;\r\n readonly ZERO: number;\r\n}\r\n\r\ninterface WebGLShader extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLShader: {\r\n prototype: WebGLShader;\r\n new(): WebGLShader;\r\n}\r\n\r\ninterface WebGLShaderPrecisionFormat {\r\n readonly precision: number;\r\n readonly rangeMax: number;\r\n readonly rangeMin: number;\r\n}\r\n\r\ndeclare var WebGLShaderPrecisionFormat: {\r\n prototype: WebGLShaderPrecisionFormat;\r\n new(): WebGLShaderPrecisionFormat;\r\n}\r\n\r\ninterface WebGLTexture extends WebGLObject {\r\n}\r\n\r\ndeclare var WebGLTexture: {\r\n prototype: WebGLTexture;\r\n new(): WebGLTexture;\r\n}\r\n\r\ninterface WebGLUniformLocation {\r\n}\r\n\r\ndeclare var WebGLUniformLocation: {\r\n prototype: WebGLUniformLocation;\r\n new(): WebGLUniformLocation;\r\n}\r\n\r\ninterface WebKitCSSMatrix {\r\n a: number;\r\n b: number;\r\n c: number;\r\n d: number;\r\n e: number;\r\n f: number;\r\n m11: number;\r\n m12: number;\r\n m13: number;\r\n m14: number;\r\n m21: number;\r\n m22: number;\r\n m23: number;\r\n m24: number;\r\n m31: number;\r\n m32: number;\r\n m33: number;\r\n m34: number;\r\n m41: number;\r\n m42: number;\r\n m43: number;\r\n m44: number;\r\n inverse(): WebKitCSSMatrix;\r\n multiply(secondMatrix: WebKitCSSMatrix): WebKitCSSMatrix;\r\n rotate(angleX: number, angleY?: number, angleZ?: number): WebKitCSSMatrix;\r\n rotateAxisAngle(x: number, y: number, z: number, angle: number): WebKitCSSMatrix;\r\n scale(scaleX: number, scaleY?: number, scaleZ?: number): WebKitCSSMatrix;\r\n setMatrixValue(value: string): void;\r\n skewX(angle: number): WebKitCSSMatrix;\r\n skewY(angle: number): WebKitCSSMatrix;\r\n toString(): string;\r\n translate(x: number, y: number, z?: number): WebKitCSSMatrix;\r\n}\r\n\r\ndeclare var WebKitCSSMatrix: {\r\n prototype: WebKitCSSMatrix;\r\n new(text?: string): WebKitCSSMatrix;\r\n}\r\n\r\ninterface WebKitPoint {\r\n x: number;\r\n y: number;\r\n}\r\n\r\ndeclare var WebKitPoint: {\r\n prototype: WebKitPoint;\r\n new(x?: number, y?: number): WebKitPoint;\r\n}\r\n\r\ninterface WebSocket extends EventTarget {\r\n binaryType: string;\r\n readonly bufferedAmount: number;\r\n readonly extensions: string;\r\n onclose: (this: this, ev: CloseEvent) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onmessage: (this: this, ev: MessageEvent) => any;\r\n onopen: (this: this, ev: Event) => any;\r\n readonly protocol: string;\r\n readonly readyState: number;\r\n readonly url: string;\r\n close(code?: number, reason?: string): void;\r\n send(data: any): void;\r\n readonly CLOSED: number;\r\n readonly CLOSING: number;\r\n readonly CONNECTING: number;\r\n readonly OPEN: number;\r\n addEventListener(type: \"close\", listener: (this: this, ev: CloseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"open\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var WebSocket: {\r\n prototype: WebSocket;\r\n new(url: string, protocols?: string | string[]): WebSocket;\r\n readonly CLOSED: number;\r\n readonly CLOSING: number;\r\n readonly CONNECTING: number;\r\n readonly OPEN: number;\r\n}\r\n\r\ninterface WheelEvent extends MouseEvent {\r\n readonly deltaMode: number;\r\n readonly deltaX: number;\r\n readonly deltaY: number;\r\n readonly deltaZ: number;\r\n readonly wheelDelta: number;\r\n readonly wheelDeltaX: number;\r\n readonly wheelDeltaY: number;\r\n getCurrentPoint(element: Element): void;\r\n initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void;\r\n readonly DOM_DELTA_LINE: number;\r\n readonly DOM_DELTA_PAGE: number;\r\n readonly DOM_DELTA_PIXEL: number;\r\n}\r\n\r\ndeclare var WheelEvent: {\r\n prototype: WheelEvent;\r\n new(typeArg: string, eventInitDict?: WheelEventInit): WheelEvent;\r\n readonly DOM_DELTA_LINE: number;\r\n readonly DOM_DELTA_PAGE: number;\r\n readonly DOM_DELTA_PIXEL: number;\r\n}\r\n\r\ninterface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64 {\r\n readonly applicationCache: ApplicationCache;\r\n readonly clientInformation: Navigator;\r\n readonly closed: boolean;\r\n readonly crypto: Crypto;\r\n defaultStatus: string;\r\n readonly devicePixelRatio: number;\r\n readonly doNotTrack: string;\r\n readonly document: Document;\r\n event: Event;\r\n readonly external: External;\r\n readonly frameElement: Element;\r\n readonly frames: Window;\r\n readonly history: History;\r\n readonly innerHeight: number;\r\n readonly innerWidth: number;\r\n readonly length: number;\r\n readonly location: Location;\r\n readonly locationbar: BarProp;\r\n readonly menubar: BarProp;\r\n readonly msCredentials: MSCredentials;\r\n name: string;\r\n readonly navigator: Navigator;\r\n offscreenBuffering: string | boolean;\r\n onabort: (this: this, ev: UIEvent) => any;\r\n onafterprint: (this: this, ev: Event) => any;\r\n onbeforeprint: (this: this, ev: Event) => any;\r\n onbeforeunload: (this: this, ev: BeforeUnloadEvent) => any;\r\n onblur: (this: this, ev: FocusEvent) => any;\r\n oncanplay: (this: this, ev: Event) => any;\r\n oncanplaythrough: (this: this, ev: Event) => any;\r\n onchange: (this: this, ev: Event) => any;\r\n onclick: (this: this, ev: MouseEvent) => any;\r\n oncompassneedscalibration: (this: this, ev: Event) => any;\r\n oncontextmenu: (this: this, ev: PointerEvent) => any;\r\n ondblclick: (this: this, ev: MouseEvent) => any;\r\n ondevicelight: (this: this, ev: DeviceLightEvent) => any;\r\n ondevicemotion: (this: this, ev: DeviceMotionEvent) => any;\r\n ondeviceorientation: (this: this, ev: DeviceOrientationEvent) => any;\r\n ondrag: (this: this, ev: DragEvent) => any;\r\n ondragend: (this: this, ev: DragEvent) => any;\r\n ondragenter: (this: this, ev: DragEvent) => any;\r\n ondragleave: (this: this, ev: DragEvent) => any;\r\n ondragover: (this: this, ev: DragEvent) => any;\r\n ondragstart: (this: this, ev: DragEvent) => any;\r\n ondrop: (this: this, ev: DragEvent) => any;\r\n ondurationchange: (this: this, ev: Event) => any;\r\n onemptied: (this: this, ev: Event) => any;\r\n onended: (this: this, ev: MediaStreamErrorEvent) => any;\r\n onerror: ErrorEventHandler;\r\n onfocus: (this: this, ev: FocusEvent) => any;\r\n onhashchange: (this: this, ev: HashChangeEvent) => any;\r\n oninput: (this: this, ev: Event) => any;\r\n oninvalid: (this: this, ev: Event) => any;\r\n onkeydown: (this: this, ev: KeyboardEvent) => any;\r\n onkeypress: (this: this, ev: KeyboardEvent) => any;\r\n onkeyup: (this: this, ev: KeyboardEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n onloadeddata: (this: this, ev: Event) => any;\r\n onloadedmetadata: (this: this, ev: Event) => any;\r\n onloadstart: (this: this, ev: Event) => any;\r\n onmessage: (this: this, ev: MessageEvent) => any;\r\n onmousedown: (this: this, ev: MouseEvent) => any;\r\n onmouseenter: (this: this, ev: MouseEvent) => any;\r\n onmouseleave: (this: this, ev: MouseEvent) => any;\r\n onmousemove: (this: this, ev: MouseEvent) => any;\r\n onmouseout: (this: this, ev: MouseEvent) => any;\r\n onmouseover: (this: this, ev: MouseEvent) => any;\r\n onmouseup: (this: this, ev: MouseEvent) => any;\r\n onmousewheel: (this: this, ev: WheelEvent) => any;\r\n onmsgesturechange: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturedoubletap: (this: this, ev: MSGestureEvent) => any;\r\n onmsgestureend: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturehold: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturestart: (this: this, ev: MSGestureEvent) => any;\r\n onmsgesturetap: (this: this, ev: MSGestureEvent) => any;\r\n onmsinertiastart: (this: this, ev: MSGestureEvent) => any;\r\n onmspointercancel: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerdown: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerenter: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerleave: (this: this, ev: MSPointerEvent) => any;\r\n onmspointermove: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerout: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerover: (this: this, ev: MSPointerEvent) => any;\r\n onmspointerup: (this: this, ev: MSPointerEvent) => any;\r\n onoffline: (this: this, ev: Event) => any;\r\n ononline: (this: this, ev: Event) => any;\r\n onorientationchange: (this: this, ev: Event) => any;\r\n onpagehide: (this: this, ev: PageTransitionEvent) => any;\r\n onpageshow: (this: this, ev: PageTransitionEvent) => any;\r\n onpause: (this: this, ev: Event) => any;\r\n onplay: (this: this, ev: Event) => any;\r\n onplaying: (this: this, ev: Event) => any;\r\n onpopstate: (this: this, ev: PopStateEvent) => any;\r\n onprogress: (this: this, ev: ProgressEvent) => any;\r\n onratechange: (this: this, ev: Event) => any;\r\n onreadystatechange: (this: this, ev: ProgressEvent) => any;\r\n onreset: (this: this, ev: Event) => any;\r\n onresize: (this: this, ev: UIEvent) => any;\r\n onscroll: (this: this, ev: UIEvent) => any;\r\n onseeked: (this: this, ev: Event) => any;\r\n onseeking: (this: this, ev: Event) => any;\r\n onselect: (this: this, ev: UIEvent) => any;\r\n onstalled: (this: this, ev: Event) => any;\r\n onstorage: (this: this, ev: StorageEvent) => any;\r\n onsubmit: (this: this, ev: Event) => any;\r\n onsuspend: (this: this, ev: Event) => any;\r\n ontimeupdate: (this: this, ev: Event) => any;\r\n ontouchcancel: (ev: TouchEvent) => any;\r\n ontouchend: (ev: TouchEvent) => any;\r\n ontouchmove: (ev: TouchEvent) => any;\r\n ontouchstart: (ev: TouchEvent) => any;\r\n onunload: (this: this, ev: Event) => any;\r\n onvolumechange: (this: this, ev: Event) => any;\r\n onwaiting: (this: this, ev: Event) => any;\r\n opener: any;\r\n orientation: string | number;\r\n readonly outerHeight: number;\r\n readonly outerWidth: number;\r\n readonly pageXOffset: number;\r\n readonly pageYOffset: number;\r\n readonly parent: Window;\r\n readonly performance: Performance;\r\n readonly personalbar: BarProp;\r\n readonly screen: Screen;\r\n readonly screenLeft: number;\r\n readonly screenTop: number;\r\n readonly screenX: number;\r\n readonly screenY: number;\r\n readonly scrollX: number;\r\n readonly scrollY: number;\r\n readonly scrollbars: BarProp;\r\n readonly self: Window;\r\n status: string;\r\n readonly statusbar: BarProp;\r\n readonly styleMedia: StyleMedia;\r\n readonly toolbar: BarProp;\r\n readonly top: Window;\r\n readonly window: Window;\r\n URL: typeof URL;\r\n Blob: typeof Blob;\r\n alert(message?: any): void;\r\n blur(): void;\r\n cancelAnimationFrame(handle: number): void;\r\n captureEvents(): void;\r\n close(): void;\r\n confirm(message?: string): boolean;\r\n focus(): void;\r\n getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;\r\n getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;\r\n getSelection(): Selection;\r\n matchMedia(mediaQuery: string): MediaQueryList;\r\n moveBy(x?: number, y?: number): void;\r\n moveTo(x?: number, y?: number): void;\r\n msWriteProfilerMark(profilerMarkName: string): void;\r\n open(url?: string, target?: string, features?: string, replace?: boolean): Window;\r\n postMessage(message: any, targetOrigin: string, transfer?: any[]): void;\r\n print(): void;\r\n prompt(message?: string, _default?: string): string | null;\r\n releaseEvents(): void;\r\n requestAnimationFrame(callback: FrameRequestCallback): number;\r\n resizeBy(x?: number, y?: number): void;\r\n resizeTo(x?: number, y?: number): void;\r\n scroll(x?: number, y?: number): void;\r\n scrollBy(x?: number, y?: number): void;\r\n scrollTo(x?: number, y?: number): void;\r\n webkitCancelAnimationFrame(handle: number): void;\r\n webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;\r\n webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;\r\n webkitRequestAnimationFrame(callback: FrameRequestCallback): number;\r\n scroll(options?: ScrollToOptions): void;\r\n scrollTo(options?: ScrollToOptions): void;\r\n scrollBy(options?: ScrollToOptions): void;\r\n addEventListener(type: \"MSGestureChange\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureDoubleTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureEnd\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureHold\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSGestureTap\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSInertiaStart\", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerCancel\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerDown\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerEnter\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerLeave\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerMove\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOut\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerOver\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"MSPointerUp\", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"afterprint\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeprint\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"beforeunload\", listener: (this: this, ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"blur\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplay\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"canplaythrough\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"change\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"click\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"compassneedscalibration\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"contextmenu\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dblclick\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"devicelight\", listener: (this: this, ev: DeviceLightEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"devicemotion\", listener: (this: this, ev: DeviceMotionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"deviceorientation\", listener: (this: this, ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drag\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragend\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragenter\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragleave\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragover\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"dragstart\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"drop\", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"durationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"emptied\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ended\", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"focus\", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"hashchange\", listener: (this: this, ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"input\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"invalid\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keydown\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keypress\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"keyup\", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadeddata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadedmetadata\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousedown\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseenter\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseleave\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousemove\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseout\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseover\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mouseup\", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"mousewheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"offline\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"online\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"orientationchange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pagehide\", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pageshow\", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pause\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"play\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"playing\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"popstate\", listener: (this: this, ev: PopStateEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"ratechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"readystatechange\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"reset\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"resize\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"scroll\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeked\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"seeking\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"select\", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"stalled\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"storage\", listener: (this: this, ev: StorageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"submit\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"suspend\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeupdate\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"unload\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"volumechange\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"waiting\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n [index: number]: Window;\r\n}\r\n\r\ndeclare var Window: {\r\n prototype: Window;\r\n new(): Window;\r\n}\r\n\r\ninterface Worker extends EventTarget, AbstractWorker {\r\n onmessage: (this: this, ev: MessageEvent) => any;\r\n postMessage(message: any, ports?: any): void;\r\n terminate(): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"message\", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Worker: {\r\n prototype: Worker;\r\n new(stringUrl: string): Worker;\r\n}\r\n\r\ninterface XMLDocument extends Document {\r\n}\r\n\r\ndeclare var XMLDocument: {\r\n prototype: XMLDocument;\r\n new(): XMLDocument;\r\n}\r\n\r\ninterface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {\r\n onreadystatechange: (this: this, ev: ProgressEvent) => any;\r\n readonly readyState: number;\r\n readonly response: any;\r\n readonly responseText: string;\r\n responseType: string;\r\n readonly responseXML: any;\r\n readonly status: number;\r\n readonly statusText: string;\r\n timeout: number;\r\n readonly upload: XMLHttpRequestUpload;\r\n withCredentials: boolean;\r\n msCaching?: string;\r\n abort(): void;\r\n getAllResponseHeaders(): string;\r\n getResponseHeader(header: string): string | null;\r\n msCachingEnabled(): boolean;\r\n open(method: string, url: string, async?: boolean, user?: string, password?: string): void;\r\n overrideMimeType(mime: string): void;\r\n send(data?: Document): void;\r\n send(data?: string): void;\r\n send(data?: any): void;\r\n setRequestHeader(header: string, value: string): void;\r\n readonly DONE: number;\r\n readonly HEADERS_RECEIVED: number;\r\n readonly LOADING: number;\r\n readonly OPENED: number;\r\n readonly UNSENT: number;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadend\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"readystatechange\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeout\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var XMLHttpRequest: {\r\n prototype: XMLHttpRequest;\r\n new(): XMLHttpRequest;\r\n readonly DONE: number;\r\n readonly HEADERS_RECEIVED: number;\r\n readonly LOADING: number;\r\n readonly OPENED: number;\r\n readonly UNSENT: number;\r\n create(): XMLHttpRequest;\r\n}\r\n\r\ninterface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var XMLHttpRequestUpload: {\r\n prototype: XMLHttpRequestUpload;\r\n new(): XMLHttpRequestUpload;\r\n}\r\n\r\ninterface XMLSerializer {\r\n serializeToString(target: Node): string;\r\n}\r\n\r\ndeclare var XMLSerializer: {\r\n prototype: XMLSerializer;\r\n new(): XMLSerializer;\r\n}\r\n\r\ninterface XPathEvaluator {\r\n createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;\r\n createNSResolver(nodeResolver?: Node): XPathNSResolver;\r\n evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver, type: number, result: XPathResult): XPathResult;\r\n}\r\n\r\ndeclare var XPathEvaluator: {\r\n prototype: XPathEvaluator;\r\n new(): XPathEvaluator;\r\n}\r\n\r\ninterface XPathExpression {\r\n evaluate(contextNode: Node, type: number, result: XPathResult): XPathExpression;\r\n}\r\n\r\ndeclare var XPathExpression: {\r\n prototype: XPathExpression;\r\n new(): XPathExpression;\r\n}\r\n\r\ninterface XPathNSResolver {\r\n lookupNamespaceURI(prefix: string): string;\r\n}\r\n\r\ndeclare var XPathNSResolver: {\r\n prototype: XPathNSResolver;\r\n new(): XPathNSResolver;\r\n}\r\n\r\ninterface XPathResult {\r\n readonly booleanValue: boolean;\r\n readonly invalidIteratorState: boolean;\r\n readonly numberValue: number;\r\n readonly resultType: number;\r\n readonly singleNodeValue: Node;\r\n readonly snapshotLength: number;\r\n readonly stringValue: string;\r\n iterateNext(): Node;\r\n snapshotItem(index: number): Node;\r\n readonly ANY_TYPE: number;\r\n readonly ANY_UNORDERED_NODE_TYPE: number;\r\n readonly BOOLEAN_TYPE: number;\r\n readonly FIRST_ORDERED_NODE_TYPE: number;\r\n readonly NUMBER_TYPE: number;\r\n readonly ORDERED_NODE_ITERATOR_TYPE: number;\r\n readonly ORDERED_NODE_SNAPSHOT_TYPE: number;\r\n readonly STRING_TYPE: number;\r\n readonly UNORDERED_NODE_ITERATOR_TYPE: number;\r\n readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;\r\n}\r\n\r\ndeclare var XPathResult: {\r\n prototype: XPathResult;\r\n new(): XPathResult;\r\n readonly ANY_TYPE: number;\r\n readonly ANY_UNORDERED_NODE_TYPE: number;\r\n readonly BOOLEAN_TYPE: number;\r\n readonly FIRST_ORDERED_NODE_TYPE: number;\r\n readonly NUMBER_TYPE: number;\r\n readonly ORDERED_NODE_ITERATOR_TYPE: number;\r\n readonly ORDERED_NODE_SNAPSHOT_TYPE: number;\r\n readonly STRING_TYPE: number;\r\n readonly UNORDERED_NODE_ITERATOR_TYPE: number;\r\n readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;\r\n}\r\n\r\ninterface XSLTProcessor {\r\n clearParameters(): void;\r\n getParameter(namespaceURI: string, localName: string): any;\r\n importStylesheet(style: Node): void;\r\n removeParameter(namespaceURI: string, localName: string): void;\r\n reset(): void;\r\n setParameter(namespaceURI: string, localName: string, value: any): void;\r\n transformToDocument(source: Node): Document;\r\n transformToFragment(source: Node, document: Document): DocumentFragment;\r\n}\r\n\r\ndeclare var XSLTProcessor: {\r\n prototype: XSLTProcessor;\r\n new(): XSLTProcessor;\r\n}\r\n\r\ninterface AbstractWorker {\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface CanvasPathMethods {\r\n arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\r\n arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;\r\n bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;\r\n closePath(): void;\r\n ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\r\n lineTo(x: number, y: number): void;\r\n moveTo(x: number, y: number): void;\r\n quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;\r\n rect(x: number, y: number, w: number, h: number): void;\r\n}\r\n\r\ninterface ChildNode {\r\n remove(): void;\r\n}\r\n\r\ninterface DOML2DeprecatedColorProperty {\r\n color: string;\r\n}\r\n\r\ninterface DOML2DeprecatedSizeProperty {\r\n size: number;\r\n}\r\n\r\ninterface DocumentEvent {\r\n createEvent(eventInterface:\"AnimationEvent\"): AnimationEvent;\r\n createEvent(eventInterface:\"AriaRequestEvent\"): AriaRequestEvent;\r\n createEvent(eventInterface:\"AudioProcessingEvent\"): AudioProcessingEvent;\r\n createEvent(eventInterface:\"BeforeUnloadEvent\"): BeforeUnloadEvent;\r\n createEvent(eventInterface:\"ClipboardEvent\"): ClipboardEvent;\r\n createEvent(eventInterface:\"CloseEvent\"): CloseEvent;\r\n createEvent(eventInterface:\"CommandEvent\"): CommandEvent;\r\n createEvent(eventInterface:\"CompositionEvent\"): CompositionEvent;\r\n createEvent(eventInterface:\"CustomEvent\"): CustomEvent;\r\n createEvent(eventInterface:\"DeviceLightEvent\"): DeviceLightEvent;\r\n createEvent(eventInterface:\"DeviceMotionEvent\"): DeviceMotionEvent;\r\n createEvent(eventInterface:\"DeviceOrientationEvent\"): DeviceOrientationEvent;\r\n createEvent(eventInterface:\"DragEvent\"): DragEvent;\r\n createEvent(eventInterface:\"ErrorEvent\"): ErrorEvent;\r\n createEvent(eventInterface:\"Event\"): Event;\r\n createEvent(eventInterface:\"Events\"): Event;\r\n createEvent(eventInterface:\"FocusEvent\"): FocusEvent;\r\n createEvent(eventInterface:\"GamepadEvent\"): GamepadEvent;\r\n createEvent(eventInterface:\"HashChangeEvent\"): HashChangeEvent;\r\n createEvent(eventInterface:\"IDBVersionChangeEvent\"): IDBVersionChangeEvent;\r\n createEvent(eventInterface:\"KeyboardEvent\"): KeyboardEvent;\r\n createEvent(eventInterface:\"ListeningStateChangedEvent\"): ListeningStateChangedEvent;\r\n createEvent(eventInterface:\"LongRunningScriptDetectedEvent\"): LongRunningScriptDetectedEvent;\r\n createEvent(eventInterface:\"MSGestureEvent\"): MSGestureEvent;\r\n createEvent(eventInterface:\"MSManipulationEvent\"): MSManipulationEvent;\r\n createEvent(eventInterface:\"MSMediaKeyMessageEvent\"): MSMediaKeyMessageEvent;\r\n createEvent(eventInterface:\"MSMediaKeyNeededEvent\"): MSMediaKeyNeededEvent;\r\n createEvent(eventInterface:\"MSPointerEvent\"): MSPointerEvent;\r\n createEvent(eventInterface:\"MSSiteModeEvent\"): MSSiteModeEvent;\r\n createEvent(eventInterface:\"MediaEncryptedEvent\"): MediaEncryptedEvent;\r\n createEvent(eventInterface:\"MediaKeyMessageEvent\"): MediaKeyMessageEvent;\r\n createEvent(eventInterface:\"MediaStreamErrorEvent\"): MediaStreamErrorEvent;\r\n createEvent(eventInterface:\"MediaStreamTrackEvent\"): MediaStreamTrackEvent;\r\n createEvent(eventInterface:\"MessageEvent\"): MessageEvent;\r\n createEvent(eventInterface:\"MouseEvent\"): MouseEvent;\r\n createEvent(eventInterface:\"MouseEvents\"): MouseEvent;\r\n createEvent(eventInterface:\"MutationEvent\"): MutationEvent;\r\n createEvent(eventInterface:\"MutationEvents\"): MutationEvent;\r\n createEvent(eventInterface:\"NavigationCompletedEvent\"): NavigationCompletedEvent;\r\n createEvent(eventInterface:\"NavigationEvent\"): NavigationEvent;\r\n createEvent(eventInterface:\"NavigationEventWithReferrer\"): NavigationEventWithReferrer;\r\n createEvent(eventInterface:\"OfflineAudioCompletionEvent\"): OfflineAudioCompletionEvent;\r\n createEvent(eventInterface:\"OverflowEvent\"): OverflowEvent;\r\n createEvent(eventInterface:\"PageTransitionEvent\"): PageTransitionEvent;\r\n createEvent(eventInterface:\"PermissionRequestedEvent\"): PermissionRequestedEvent;\r\n createEvent(eventInterface:\"PointerEvent\"): PointerEvent;\r\n createEvent(eventInterface:\"PopStateEvent\"): PopStateEvent;\r\n createEvent(eventInterface:\"ProgressEvent\"): ProgressEvent;\r\n createEvent(eventInterface:\"RTCDTMFToneChangeEvent\"): RTCDTMFToneChangeEvent;\r\n createEvent(eventInterface:\"RTCDtlsTransportStateChangedEvent\"): RTCDtlsTransportStateChangedEvent;\r\n createEvent(eventInterface:\"RTCIceCandidatePairChangedEvent\"): RTCIceCandidatePairChangedEvent;\r\n createEvent(eventInterface:\"RTCIceGathererEvent\"): RTCIceGathererEvent;\r\n createEvent(eventInterface:\"RTCIceTransportStateChangedEvent\"): RTCIceTransportStateChangedEvent;\r\n createEvent(eventInterface:\"RTCSsrcConflictEvent\"): RTCSsrcConflictEvent;\r\n createEvent(eventInterface:\"SVGZoomEvent\"): SVGZoomEvent;\r\n createEvent(eventInterface:\"SVGZoomEvents\"): SVGZoomEvent;\r\n createEvent(eventInterface:\"ScriptNotifyEvent\"): ScriptNotifyEvent;\r\n createEvent(eventInterface:\"StorageEvent\"): StorageEvent;\r\n createEvent(eventInterface:\"TextEvent\"): TextEvent;\r\n createEvent(eventInterface:\"TouchEvent\"): TouchEvent;\r\n createEvent(eventInterface:\"TrackEvent\"): TrackEvent;\r\n createEvent(eventInterface:\"TransitionEvent\"): TransitionEvent;\r\n createEvent(eventInterface:\"UIEvent\"): UIEvent;\r\n createEvent(eventInterface:\"UIEvents\"): UIEvent;\r\n createEvent(eventInterface:\"UnviewableContentIdentifiedEvent\"): UnviewableContentIdentifiedEvent;\r\n createEvent(eventInterface:\"WebGLContextEvent\"): WebGLContextEvent;\r\n createEvent(eventInterface:\"WheelEvent\"): WheelEvent;\r\n createEvent(eventInterface: string): Event;\r\n}\r\n\r\ninterface ElementTraversal {\r\n readonly childElementCount: number;\r\n readonly firstElementChild: Element;\r\n readonly lastElementChild: Element;\r\n readonly nextElementSibling: Element;\r\n readonly previousElementSibling: Element;\r\n}\r\n\r\ninterface GetSVGDocument {\r\n getSVGDocument(): Document;\r\n}\r\n\r\ninterface GlobalEventHandlers {\r\n onpointercancel: (this: this, ev: PointerEvent) => any;\r\n onpointerdown: (this: this, ev: PointerEvent) => any;\r\n onpointerenter: (this: this, ev: PointerEvent) => any;\r\n onpointerleave: (this: this, ev: PointerEvent) => any;\r\n onpointermove: (this: this, ev: PointerEvent) => any;\r\n onpointerout: (this: this, ev: PointerEvent) => any;\r\n onpointerover: (this: this, ev: PointerEvent) => any;\r\n onpointerup: (this: this, ev: PointerEvent) => any;\r\n onwheel: (this: this, ev: WheelEvent) => any;\r\n addEventListener(type: \"pointercancel\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerdown\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerenter\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerleave\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointermove\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerout\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerover\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"pointerup\", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"wheel\", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own ch functionality for the object.\r\n */\r\n ch: string;\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own chOff functionality for the object.\r\n */\r\n chOff: string;\r\n /**\r\n * Sets or retrieves how text and other content are vertically aligned within the object that contains them.\r\n */\r\n vAlign: string;\r\n}\r\n\r\ninterface IDBEnvironment {\r\n readonly indexedDB: IDBFactory;\r\n}\r\n\r\ninterface LinkStyle {\r\n readonly sheet: StyleSheet;\r\n}\r\n\r\ninterface MSBaseReader {\r\n onabort: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n onloadend: (this: this, ev: ProgressEvent) => any;\r\n onloadstart: (this: this, ev: Event) => any;\r\n onprogress: (this: this, ev: ProgressEvent) => any;\r\n readonly readyState: number;\r\n readonly result: any;\r\n abort(): void;\r\n readonly DONE: number;\r\n readonly EMPTY: number;\r\n readonly LOADING: number;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadend\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface MSFileSaver {\r\n msSaveBlob(blob: any, defaultName?: string): boolean;\r\n msSaveOrOpenBlob(blob: any, defaultName?: string): boolean;\r\n}\r\n\r\ninterface MSNavigatorDoNotTrack {\r\n confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean;\r\n confirmWebWideTrackingException(args: ExceptionInformation): boolean;\r\n removeSiteSpecificTrackingException(args: ExceptionInformation): void;\r\n removeWebWideTrackingException(args: ExceptionInformation): void;\r\n storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void;\r\n storeWebWideTrackingException(args: StoreExceptionsInformation): void;\r\n}\r\n\r\ninterface NavigatorContentUtils {\r\n}\r\n\r\ninterface NavigatorGeolocation {\r\n readonly geolocation: Geolocation;\r\n}\r\n\r\ninterface NavigatorID {\r\n readonly appName: string;\r\n readonly appVersion: string;\r\n readonly platform: string;\r\n readonly product: string;\r\n readonly productSub: string;\r\n readonly userAgent: string;\r\n readonly vendor: string;\r\n readonly vendorSub: string;\r\n}\r\n\r\ninterface NavigatorOnLine {\r\n readonly onLine: boolean;\r\n}\r\n\r\ninterface NavigatorStorageUtils {\r\n}\r\n\r\ninterface NavigatorUserMedia {\r\n readonly mediaDevices: MediaDevices;\r\n getUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;\r\n}\r\n\r\ninterface NodeSelector {\r\n querySelector(selectors: \"a\"): HTMLAnchorElement;\r\n querySelector(selectors: \"abbr\"): HTMLElement;\r\n querySelector(selectors: \"acronym\"): HTMLElement;\r\n querySelector(selectors: \"address\"): HTMLElement;\r\n querySelector(selectors: \"applet\"): HTMLAppletElement;\r\n querySelector(selectors: \"area\"): HTMLAreaElement;\r\n querySelector(selectors: \"article\"): HTMLElement;\r\n querySelector(selectors: \"aside\"): HTMLElement;\r\n querySelector(selectors: \"audio\"): HTMLAudioElement;\r\n querySelector(selectors: \"b\"): HTMLElement;\r\n querySelector(selectors: \"base\"): HTMLBaseElement;\r\n querySelector(selectors: \"basefont\"): HTMLBaseFontElement;\r\n querySelector(selectors: \"bdo\"): HTMLElement;\r\n querySelector(selectors: \"big\"): HTMLElement;\r\n querySelector(selectors: \"blockquote\"): HTMLQuoteElement;\r\n querySelector(selectors: \"body\"): HTMLBodyElement;\r\n querySelector(selectors: \"br\"): HTMLBRElement;\r\n querySelector(selectors: \"button\"): HTMLButtonElement;\r\n querySelector(selectors: \"canvas\"): HTMLCanvasElement;\r\n querySelector(selectors: \"caption\"): HTMLTableCaptionElement;\r\n querySelector(selectors: \"center\"): HTMLElement;\r\n querySelector(selectors: \"circle\"): SVGCircleElement;\r\n querySelector(selectors: \"cite\"): HTMLElement;\r\n querySelector(selectors: \"clippath\"): SVGClipPathElement;\r\n querySelector(selectors: \"code\"): HTMLElement;\r\n querySelector(selectors: \"col\"): HTMLTableColElement;\r\n querySelector(selectors: \"colgroup\"): HTMLTableColElement;\r\n querySelector(selectors: \"datalist\"): HTMLDataListElement;\r\n querySelector(selectors: \"dd\"): HTMLElement;\r\n querySelector(selectors: \"defs\"): SVGDefsElement;\r\n querySelector(selectors: \"del\"): HTMLModElement;\r\n querySelector(selectors: \"desc\"): SVGDescElement;\r\n querySelector(selectors: \"dfn\"): HTMLElement;\r\n querySelector(selectors: \"dir\"): HTMLDirectoryElement;\r\n querySelector(selectors: \"div\"): HTMLDivElement;\r\n querySelector(selectors: \"dl\"): HTMLDListElement;\r\n querySelector(selectors: \"dt\"): HTMLElement;\r\n querySelector(selectors: \"ellipse\"): SVGEllipseElement;\r\n querySelector(selectors: \"em\"): HTMLElement;\r\n querySelector(selectors: \"embed\"): HTMLEmbedElement;\r\n querySelector(selectors: \"feblend\"): SVGFEBlendElement;\r\n querySelector(selectors: \"fecolormatrix\"): SVGFEColorMatrixElement;\r\n querySelector(selectors: \"fecomponenttransfer\"): SVGFEComponentTransferElement;\r\n querySelector(selectors: \"fecomposite\"): SVGFECompositeElement;\r\n querySelector(selectors: \"feconvolvematrix\"): SVGFEConvolveMatrixElement;\r\n querySelector(selectors: \"fediffuselighting\"): SVGFEDiffuseLightingElement;\r\n querySelector(selectors: \"fedisplacementmap\"): SVGFEDisplacementMapElement;\r\n querySelector(selectors: \"fedistantlight\"): SVGFEDistantLightElement;\r\n querySelector(selectors: \"feflood\"): SVGFEFloodElement;\r\n querySelector(selectors: \"fefunca\"): SVGFEFuncAElement;\r\n querySelector(selectors: \"fefuncb\"): SVGFEFuncBElement;\r\n querySelector(selectors: \"fefuncg\"): SVGFEFuncGElement;\r\n querySelector(selectors: \"fefuncr\"): SVGFEFuncRElement;\r\n querySelector(selectors: \"fegaussianblur\"): SVGFEGaussianBlurElement;\r\n querySelector(selectors: \"feimage\"): SVGFEImageElement;\r\n querySelector(selectors: \"femerge\"): SVGFEMergeElement;\r\n querySelector(selectors: \"femergenode\"): SVGFEMergeNodeElement;\r\n querySelector(selectors: \"femorphology\"): SVGFEMorphologyElement;\r\n querySelector(selectors: \"feoffset\"): SVGFEOffsetElement;\r\n querySelector(selectors: \"fepointlight\"): SVGFEPointLightElement;\r\n querySelector(selectors: \"fespecularlighting\"): SVGFESpecularLightingElement;\r\n querySelector(selectors: \"fespotlight\"): SVGFESpotLightElement;\r\n querySelector(selectors: \"fetile\"): SVGFETileElement;\r\n querySelector(selectors: \"feturbulence\"): SVGFETurbulenceElement;\r\n querySelector(selectors: \"fieldset\"): HTMLFieldSetElement;\r\n querySelector(selectors: \"figcaption\"): HTMLElement;\r\n querySelector(selectors: \"figure\"): HTMLElement;\r\n querySelector(selectors: \"filter\"): SVGFilterElement;\r\n querySelector(selectors: \"font\"): HTMLFontElement;\r\n querySelector(selectors: \"footer\"): HTMLElement;\r\n querySelector(selectors: \"foreignobject\"): SVGForeignObjectElement;\r\n querySelector(selectors: \"form\"): HTMLFormElement;\r\n querySelector(selectors: \"frame\"): HTMLFrameElement;\r\n querySelector(selectors: \"frameset\"): HTMLFrameSetElement;\r\n querySelector(selectors: \"g\"): SVGGElement;\r\n querySelector(selectors: \"h1\"): HTMLHeadingElement;\r\n querySelector(selectors: \"h2\"): HTMLHeadingElement;\r\n querySelector(selectors: \"h3\"): HTMLHeadingElement;\r\n querySelector(selectors: \"h4\"): HTMLHeadingElement;\r\n querySelector(selectors: \"h5\"): HTMLHeadingElement;\r\n querySelector(selectors: \"h6\"): HTMLHeadingElement;\r\n querySelector(selectors: \"head\"): HTMLHeadElement;\r\n querySelector(selectors: \"header\"): HTMLElement;\r\n querySelector(selectors: \"hgroup\"): HTMLElement;\r\n querySelector(selectors: \"hr\"): HTMLHRElement;\r\n querySelector(selectors: \"html\"): HTMLHtmlElement;\r\n querySelector(selectors: \"i\"): HTMLElement;\r\n querySelector(selectors: \"iframe\"): HTMLIFrameElement;\r\n querySelector(selectors: \"image\"): SVGImageElement;\r\n querySelector(selectors: \"img\"): HTMLImageElement;\r\n querySelector(selectors: \"input\"): HTMLInputElement;\r\n querySelector(selectors: \"ins\"): HTMLModElement;\r\n querySelector(selectors: \"isindex\"): HTMLUnknownElement;\r\n querySelector(selectors: \"kbd\"): HTMLElement;\r\n querySelector(selectors: \"keygen\"): HTMLElement;\r\n querySelector(selectors: \"label\"): HTMLLabelElement;\r\n querySelector(selectors: \"legend\"): HTMLLegendElement;\r\n querySelector(selectors: \"li\"): HTMLLIElement;\r\n querySelector(selectors: \"line\"): SVGLineElement;\r\n querySelector(selectors: \"lineargradient\"): SVGLinearGradientElement;\r\n querySelector(selectors: \"link\"): HTMLLinkElement;\r\n querySelector(selectors: \"listing\"): HTMLPreElement;\r\n querySelector(selectors: \"map\"): HTMLMapElement;\r\n querySelector(selectors: \"mark\"): HTMLElement;\r\n querySelector(selectors: \"marker\"): SVGMarkerElement;\r\n querySelector(selectors: \"marquee\"): HTMLMarqueeElement;\r\n querySelector(selectors: \"mask\"): SVGMaskElement;\r\n querySelector(selectors: \"menu\"): HTMLMenuElement;\r\n querySelector(selectors: \"meta\"): HTMLMetaElement;\r\n querySelector(selectors: \"metadata\"): SVGMetadataElement;\r\n querySelector(selectors: \"meter\"): HTMLMeterElement;\r\n querySelector(selectors: \"nav\"): HTMLElement;\r\n querySelector(selectors: \"nextid\"): HTMLUnknownElement;\r\n querySelector(selectors: \"nobr\"): HTMLElement;\r\n querySelector(selectors: \"noframes\"): HTMLElement;\r\n querySelector(selectors: \"noscript\"): HTMLElement;\r\n querySelector(selectors: \"object\"): HTMLObjectElement;\r\n querySelector(selectors: \"ol\"): HTMLOListElement;\r\n querySelector(selectors: \"optgroup\"): HTMLOptGroupElement;\r\n querySelector(selectors: \"option\"): HTMLOptionElement;\r\n querySelector(selectors: \"p\"): HTMLParagraphElement;\r\n querySelector(selectors: \"param\"): HTMLParamElement;\r\n querySelector(selectors: \"path\"): SVGPathElement;\r\n querySelector(selectors: \"pattern\"): SVGPatternElement;\r\n querySelector(selectors: \"picture\"): HTMLPictureElement;\r\n querySelector(selectors: \"plaintext\"): HTMLElement;\r\n querySelector(selectors: \"polygon\"): SVGPolygonElement;\r\n querySelector(selectors: \"polyline\"): SVGPolylineElement;\r\n querySelector(selectors: \"pre\"): HTMLPreElement;\r\n querySelector(selectors: \"progress\"): HTMLProgressElement;\r\n querySelector(selectors: \"q\"): HTMLQuoteElement;\r\n querySelector(selectors: \"radialgradient\"): SVGRadialGradientElement;\r\n querySelector(selectors: \"rect\"): SVGRectElement;\r\n querySelector(selectors: \"rt\"): HTMLElement;\r\n querySelector(selectors: \"ruby\"): HTMLElement;\r\n querySelector(selectors: \"s\"): HTMLElement;\r\n querySelector(selectors: \"samp\"): HTMLElement;\r\n querySelector(selectors: \"script\"): HTMLScriptElement;\r\n querySelector(selectors: \"section\"): HTMLElement;\r\n querySelector(selectors: \"select\"): HTMLSelectElement;\r\n querySelector(selectors: \"small\"): HTMLElement;\r\n querySelector(selectors: \"source\"): HTMLSourceElement;\r\n querySelector(selectors: \"span\"): HTMLSpanElement;\r\n querySelector(selectors: \"stop\"): SVGStopElement;\r\n querySelector(selectors: \"strike\"): HTMLElement;\r\n querySelector(selectors: \"strong\"): HTMLElement;\r\n querySelector(selectors: \"style\"): HTMLStyleElement;\r\n querySelector(selectors: \"sub\"): HTMLElement;\r\n querySelector(selectors: \"sup\"): HTMLElement;\r\n querySelector(selectors: \"svg\"): SVGSVGElement;\r\n querySelector(selectors: \"switch\"): SVGSwitchElement;\r\n querySelector(selectors: \"symbol\"): SVGSymbolElement;\r\n querySelector(selectors: \"table\"): HTMLTableElement;\r\n querySelector(selectors: \"tbody\"): HTMLTableSectionElement;\r\n querySelector(selectors: \"td\"): HTMLTableDataCellElement;\r\n querySelector(selectors: \"template\"): HTMLTemplateElement;\r\n querySelector(selectors: \"text\"): SVGTextElement;\r\n querySelector(selectors: \"textpath\"): SVGTextPathElement;\r\n querySelector(selectors: \"textarea\"): HTMLTextAreaElement;\r\n querySelector(selectors: \"tfoot\"): HTMLTableSectionElement;\r\n querySelector(selectors: \"th\"): HTMLTableHeaderCellElement;\r\n querySelector(selectors: \"thead\"): HTMLTableSectionElement;\r\n querySelector(selectors: \"title\"): HTMLTitleElement;\r\n querySelector(selectors: \"tr\"): HTMLTableRowElement;\r\n querySelector(selectors: \"track\"): HTMLTrackElement;\r\n querySelector(selectors: \"tspan\"): SVGTSpanElement;\r\n querySelector(selectors: \"tt\"): HTMLElement;\r\n querySelector(selectors: \"u\"): HTMLElement;\r\n querySelector(selectors: \"ul\"): HTMLUListElement;\r\n querySelector(selectors: \"use\"): SVGUseElement;\r\n querySelector(selectors: \"var\"): HTMLElement;\r\n querySelector(selectors: \"video\"): HTMLVideoElement;\r\n querySelector(selectors: \"view\"): SVGViewElement;\r\n querySelector(selectors: \"wbr\"): HTMLElement;\r\n querySelector(selectors: \"x-ms-webview\"): MSHTMLWebViewElement;\r\n querySelector(selectors: \"xmp\"): HTMLPreElement;\r\n querySelector(selectors: string): Element;\r\n querySelectorAll(selectors: \"a\"): NodeListOf;\r\n querySelectorAll(selectors: \"abbr\"): NodeListOf;\r\n querySelectorAll(selectors: \"acronym\"): NodeListOf;\r\n querySelectorAll(selectors: \"address\"): NodeListOf;\r\n querySelectorAll(selectors: \"applet\"): NodeListOf;\r\n querySelectorAll(selectors: \"area\"): NodeListOf;\r\n querySelectorAll(selectors: \"article\"): NodeListOf;\r\n querySelectorAll(selectors: \"aside\"): NodeListOf;\r\n querySelectorAll(selectors: \"audio\"): NodeListOf;\r\n querySelectorAll(selectors: \"b\"): NodeListOf;\r\n querySelectorAll(selectors: \"base\"): NodeListOf;\r\n querySelectorAll(selectors: \"basefont\"): NodeListOf;\r\n querySelectorAll(selectors: \"bdo\"): NodeListOf;\r\n querySelectorAll(selectors: \"big\"): NodeListOf;\r\n querySelectorAll(selectors: \"blockquote\"): NodeListOf;\r\n querySelectorAll(selectors: \"body\"): NodeListOf;\r\n querySelectorAll(selectors: \"br\"): NodeListOf;\r\n querySelectorAll(selectors: \"button\"): NodeListOf;\r\n querySelectorAll(selectors: \"canvas\"): NodeListOf;\r\n querySelectorAll(selectors: \"caption\"): NodeListOf;\r\n querySelectorAll(selectors: \"center\"): NodeListOf;\r\n querySelectorAll(selectors: \"circle\"): NodeListOf;\r\n querySelectorAll(selectors: \"cite\"): NodeListOf;\r\n querySelectorAll(selectors: \"clippath\"): NodeListOf;\r\n querySelectorAll(selectors: \"code\"): NodeListOf;\r\n querySelectorAll(selectors: \"col\"): NodeListOf;\r\n querySelectorAll(selectors: \"colgroup\"): NodeListOf;\r\n querySelectorAll(selectors: \"datalist\"): NodeListOf;\r\n querySelectorAll(selectors: \"dd\"): NodeListOf;\r\n querySelectorAll(selectors: \"defs\"): NodeListOf;\r\n querySelectorAll(selectors: \"del\"): NodeListOf;\r\n querySelectorAll(selectors: \"desc\"): NodeListOf;\r\n querySelectorAll(selectors: \"dfn\"): NodeListOf;\r\n querySelectorAll(selectors: \"dir\"): NodeListOf;\r\n querySelectorAll(selectors: \"div\"): NodeListOf;\r\n querySelectorAll(selectors: \"dl\"): NodeListOf;\r\n querySelectorAll(selectors: \"dt\"): NodeListOf;\r\n querySelectorAll(selectors: \"ellipse\"): NodeListOf;\r\n querySelectorAll(selectors: \"em\"): NodeListOf;\r\n querySelectorAll(selectors: \"embed\"): NodeListOf;\r\n querySelectorAll(selectors: \"feblend\"): NodeListOf;\r\n querySelectorAll(selectors: \"fecolormatrix\"): NodeListOf;\r\n querySelectorAll(selectors: \"fecomponenttransfer\"): NodeListOf;\r\n querySelectorAll(selectors: \"fecomposite\"): NodeListOf;\r\n querySelectorAll(selectors: \"feconvolvematrix\"): NodeListOf;\r\n querySelectorAll(selectors: \"fediffuselighting\"): NodeListOf;\r\n querySelectorAll(selectors: \"fedisplacementmap\"): NodeListOf;\r\n querySelectorAll(selectors: \"fedistantlight\"): NodeListOf;\r\n querySelectorAll(selectors: \"feflood\"): NodeListOf;\r\n querySelectorAll(selectors: \"fefunca\"): NodeListOf;\r\n querySelectorAll(selectors: \"fefuncb\"): NodeListOf;\r\n querySelectorAll(selectors: \"fefuncg\"): NodeListOf;\r\n querySelectorAll(selectors: \"fefuncr\"): NodeListOf;\r\n querySelectorAll(selectors: \"fegaussianblur\"): NodeListOf;\r\n querySelectorAll(selectors: \"feimage\"): NodeListOf;\r\n querySelectorAll(selectors: \"femerge\"): NodeListOf;\r\n querySelectorAll(selectors: \"femergenode\"): NodeListOf;\r\n querySelectorAll(selectors: \"femorphology\"): NodeListOf;\r\n querySelectorAll(selectors: \"feoffset\"): NodeListOf;\r\n querySelectorAll(selectors: \"fepointlight\"): NodeListOf;\r\n querySelectorAll(selectors: \"fespecularlighting\"): NodeListOf;\r\n querySelectorAll(selectors: \"fespotlight\"): NodeListOf;\r\n querySelectorAll(selectors: \"fetile\"): NodeListOf;\r\n querySelectorAll(selectors: \"feturbulence\"): NodeListOf;\r\n querySelectorAll(selectors: \"fieldset\"): NodeListOf;\r\n querySelectorAll(selectors: \"figcaption\"): NodeListOf;\r\n querySelectorAll(selectors: \"figure\"): NodeListOf;\r\n querySelectorAll(selectors: \"filter\"): NodeListOf;\r\n querySelectorAll(selectors: \"font\"): NodeListOf;\r\n querySelectorAll(selectors: \"footer\"): NodeListOf;\r\n querySelectorAll(selectors: \"foreignobject\"): NodeListOf;\r\n querySelectorAll(selectors: \"form\"): NodeListOf;\r\n querySelectorAll(selectors: \"frame\"): NodeListOf;\r\n querySelectorAll(selectors: \"frameset\"): NodeListOf;\r\n querySelectorAll(selectors: \"g\"): NodeListOf;\r\n querySelectorAll(selectors: \"h1\"): NodeListOf;\r\n querySelectorAll(selectors: \"h2\"): NodeListOf;\r\n querySelectorAll(selectors: \"h3\"): NodeListOf;\r\n querySelectorAll(selectors: \"h4\"): NodeListOf;\r\n querySelectorAll(selectors: \"h5\"): NodeListOf;\r\n querySelectorAll(selectors: \"h6\"): NodeListOf;\r\n querySelectorAll(selectors: \"head\"): NodeListOf;\r\n querySelectorAll(selectors: \"header\"): NodeListOf;\r\n querySelectorAll(selectors: \"hgroup\"): NodeListOf;\r\n querySelectorAll(selectors: \"hr\"): NodeListOf;\r\n querySelectorAll(selectors: \"html\"): NodeListOf;\r\n querySelectorAll(selectors: \"i\"): NodeListOf;\r\n querySelectorAll(selectors: \"iframe\"): NodeListOf;\r\n querySelectorAll(selectors: \"image\"): NodeListOf;\r\n querySelectorAll(selectors: \"img\"): NodeListOf;\r\n querySelectorAll(selectors: \"input\"): NodeListOf;\r\n querySelectorAll(selectors: \"ins\"): NodeListOf;\r\n querySelectorAll(selectors: \"isindex\"): NodeListOf;\r\n querySelectorAll(selectors: \"kbd\"): NodeListOf;\r\n querySelectorAll(selectors: \"keygen\"): NodeListOf;\r\n querySelectorAll(selectors: \"label\"): NodeListOf;\r\n querySelectorAll(selectors: \"legend\"): NodeListOf;\r\n querySelectorAll(selectors: \"li\"): NodeListOf;\r\n querySelectorAll(selectors: \"line\"): NodeListOf;\r\n querySelectorAll(selectors: \"lineargradient\"): NodeListOf;\r\n querySelectorAll(selectors: \"link\"): NodeListOf;\r\n querySelectorAll(selectors: \"listing\"): NodeListOf;\r\n querySelectorAll(selectors: \"map\"): NodeListOf;\r\n querySelectorAll(selectors: \"mark\"): NodeListOf;\r\n querySelectorAll(selectors: \"marker\"): NodeListOf;\r\n querySelectorAll(selectors: \"marquee\"): NodeListOf;\r\n querySelectorAll(selectors: \"mask\"): NodeListOf;\r\n querySelectorAll(selectors: \"menu\"): NodeListOf;\r\n querySelectorAll(selectors: \"meta\"): NodeListOf;\r\n querySelectorAll(selectors: \"metadata\"): NodeListOf;\r\n querySelectorAll(selectors: \"meter\"): NodeListOf;\r\n querySelectorAll(selectors: \"nav\"): NodeListOf;\r\n querySelectorAll(selectors: \"nextid\"): NodeListOf;\r\n querySelectorAll(selectors: \"nobr\"): NodeListOf;\r\n querySelectorAll(selectors: \"noframes\"): NodeListOf;\r\n querySelectorAll(selectors: \"noscript\"): NodeListOf;\r\n querySelectorAll(selectors: \"object\"): NodeListOf;\r\n querySelectorAll(selectors: \"ol\"): NodeListOf;\r\n querySelectorAll(selectors: \"optgroup\"): NodeListOf;\r\n querySelectorAll(selectors: \"option\"): NodeListOf;\r\n querySelectorAll(selectors: \"p\"): NodeListOf;\r\n querySelectorAll(selectors: \"param\"): NodeListOf;\r\n querySelectorAll(selectors: \"path\"): NodeListOf;\r\n querySelectorAll(selectors: \"pattern\"): NodeListOf;\r\n querySelectorAll(selectors: \"picture\"): NodeListOf;\r\n querySelectorAll(selectors: \"plaintext\"): NodeListOf;\r\n querySelectorAll(selectors: \"polygon\"): NodeListOf;\r\n querySelectorAll(selectors: \"polyline\"): NodeListOf;\r\n querySelectorAll(selectors: \"pre\"): NodeListOf;\r\n querySelectorAll(selectors: \"progress\"): NodeListOf;\r\n querySelectorAll(selectors: \"q\"): NodeListOf;\r\n querySelectorAll(selectors: \"radialgradient\"): NodeListOf;\r\n querySelectorAll(selectors: \"rect\"): NodeListOf;\r\n querySelectorAll(selectors: \"rt\"): NodeListOf;\r\n querySelectorAll(selectors: \"ruby\"): NodeListOf;\r\n querySelectorAll(selectors: \"s\"): NodeListOf;\r\n querySelectorAll(selectors: \"samp\"): NodeListOf;\r\n querySelectorAll(selectors: \"script\"): NodeListOf;\r\n querySelectorAll(selectors: \"section\"): NodeListOf;\r\n querySelectorAll(selectors: \"select\"): NodeListOf;\r\n querySelectorAll(selectors: \"small\"): NodeListOf;\r\n querySelectorAll(selectors: \"source\"): NodeListOf;\r\n querySelectorAll(selectors: \"span\"): NodeListOf;\r\n querySelectorAll(selectors: \"stop\"): NodeListOf;\r\n querySelectorAll(selectors: \"strike\"): NodeListOf;\r\n querySelectorAll(selectors: \"strong\"): NodeListOf;\r\n querySelectorAll(selectors: \"style\"): NodeListOf;\r\n querySelectorAll(selectors: \"sub\"): NodeListOf;\r\n querySelectorAll(selectors: \"sup\"): NodeListOf;\r\n querySelectorAll(selectors: \"svg\"): NodeListOf;\r\n querySelectorAll(selectors: \"switch\"): NodeListOf;\r\n querySelectorAll(selectors: \"symbol\"): NodeListOf;\r\n querySelectorAll(selectors: \"table\"): NodeListOf;\r\n querySelectorAll(selectors: \"tbody\"): NodeListOf;\r\n querySelectorAll(selectors: \"td\"): NodeListOf;\r\n querySelectorAll(selectors: \"template\"): NodeListOf;\r\n querySelectorAll(selectors: \"text\"): NodeListOf;\r\n querySelectorAll(selectors: \"textpath\"): NodeListOf;\r\n querySelectorAll(selectors: \"textarea\"): NodeListOf;\r\n querySelectorAll(selectors: \"tfoot\"): NodeListOf;\r\n querySelectorAll(selectors: \"th\"): NodeListOf;\r\n querySelectorAll(selectors: \"thead\"): NodeListOf;\r\n querySelectorAll(selectors: \"title\"): NodeListOf;\r\n querySelectorAll(selectors: \"tr\"): NodeListOf;\r\n querySelectorAll(selectors: \"track\"): NodeListOf;\r\n querySelectorAll(selectors: \"tspan\"): NodeListOf;\r\n querySelectorAll(selectors: \"tt\"): NodeListOf;\r\n querySelectorAll(selectors: \"u\"): NodeListOf;\r\n querySelectorAll(selectors: \"ul\"): NodeListOf;\r\n querySelectorAll(selectors: \"use\"): NodeListOf;\r\n querySelectorAll(selectors: \"var\"): NodeListOf;\r\n querySelectorAll(selectors: \"video\"): NodeListOf;\r\n querySelectorAll(selectors: \"view\"): NodeListOf;\r\n querySelectorAll(selectors: \"wbr\"): NodeListOf;\r\n querySelectorAll(selectors: \"x-ms-webview\"): NodeListOf;\r\n querySelectorAll(selectors: \"xmp\"): NodeListOf;\r\n querySelectorAll(selectors: string): NodeListOf;\r\n}\r\n\r\ninterface RandomSource {\r\n getRandomValues(array: ArrayBufferView): ArrayBufferView;\r\n}\r\n\r\ninterface SVGAnimatedPathData {\r\n readonly pathSegList: SVGPathSegList;\r\n}\r\n\r\ninterface SVGAnimatedPoints {\r\n readonly animatedPoints: SVGPointList;\r\n readonly points: SVGPointList;\r\n}\r\n\r\ninterface SVGExternalResourcesRequired {\r\n readonly externalResourcesRequired: SVGAnimatedBoolean;\r\n}\r\n\r\ninterface SVGFilterPrimitiveStandardAttributes extends SVGStylable {\r\n readonly height: SVGAnimatedLength;\r\n readonly result: SVGAnimatedString;\r\n readonly width: SVGAnimatedLength;\r\n readonly x: SVGAnimatedLength;\r\n readonly y: SVGAnimatedLength;\r\n}\r\n\r\ninterface SVGFitToViewBox {\r\n readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;\r\n readonly viewBox: SVGAnimatedRect;\r\n}\r\n\r\ninterface SVGLangSpace {\r\n xmllang: string;\r\n xmlspace: string;\r\n}\r\n\r\ninterface SVGLocatable {\r\n readonly farthestViewportElement: SVGElement;\r\n readonly nearestViewportElement: SVGElement;\r\n getBBox(): SVGRect;\r\n getCTM(): SVGMatrix;\r\n getScreenCTM(): SVGMatrix;\r\n getTransformToElement(element: SVGElement): SVGMatrix;\r\n}\r\n\r\ninterface SVGStylable {\r\n className: any;\r\n readonly style: CSSStyleDeclaration;\r\n}\r\n\r\ninterface SVGTests {\r\n readonly requiredExtensions: SVGStringList;\r\n readonly requiredFeatures: SVGStringList;\r\n readonly systemLanguage: SVGStringList;\r\n hasExtension(extension: string): boolean;\r\n}\r\n\r\ninterface SVGTransformable extends SVGLocatable {\r\n readonly transform: SVGAnimatedTransformList;\r\n}\r\n\r\ninterface SVGURIReference {\r\n readonly href: SVGAnimatedString;\r\n}\r\n\r\ninterface WindowBase64 {\r\n atob(encodedString: string): string;\r\n btoa(rawString: string): string;\r\n}\r\n\r\ninterface WindowConsole {\r\n readonly console: Console;\r\n}\r\n\r\ninterface WindowLocalStorage {\r\n readonly localStorage: Storage;\r\n}\r\n\r\ninterface WindowSessionStorage {\r\n readonly sessionStorage: Storage;\r\n}\r\n\r\ninterface WindowTimers extends Object, WindowTimersExtension {\r\n clearInterval(handle: number): void;\r\n clearTimeout(handle: number): void;\r\n setInterval(handler: (...args: any[]) => void, timeout: number): number;\r\n setInterval(handler: any, timeout?: any, ...args: any[]): number;\r\n setTimeout(handler: (...args: any[]) => void, timeout: number): number;\r\n setTimeout(handler: any, timeout?: any, ...args: any[]): number;\r\n}\r\n\r\ninterface WindowTimersExtension {\r\n clearImmediate(handle: number): void;\r\n setImmediate(handler: (...args: any[]) => void): number;\r\n setImmediate(handler: any, ...args: any[]): number;\r\n}\r\n\r\ninterface XMLHttpRequestEventTarget {\r\n onabort: (this: this, ev: Event) => any;\r\n onerror: (this: this, ev: ErrorEvent) => any;\r\n onload: (this: this, ev: Event) => any;\r\n onloadend: (this: this, ev: ProgressEvent) => any;\r\n onloadstart: (this: this, ev: Event) => any;\r\n onprogress: (this: this, ev: ProgressEvent) => any;\r\n ontimeout: (this: this, ev: ProgressEvent) => any;\r\n addEventListener(type: \"abort\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"error\", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"load\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadend\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"loadstart\", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"progress\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: \"timeout\", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\n}\r\n\r\ninterface StorageEventInit extends EventInit {\r\n key?: string;\r\n oldValue?: string;\r\n newValue?: string;\r\n url: string;\r\n storageArea?: Storage;\r\n}\r\n\r\ninterface Canvas2DContextAttributes {\r\n alpha?: boolean;\r\n willReadFrequently?: boolean;\r\n storage?: boolean;\r\n [attribute: string]: boolean | string | undefined;\r\n}\r\n\r\ninterface NodeListOf extends NodeList {\r\n length: number;\r\n item(index: number): TNode;\r\n [index: number]: TNode;\r\n}\r\n\r\ninterface HTMLCollectionOf extends HTMLCollection {\r\n item(index: number): T;\r\n namedItem(name: string): T;\r\n [index: number]: T;\r\n}\r\n\r\ninterface BlobPropertyBag {\r\n type?: string;\r\n endings?: string;\r\n}\r\n\r\ninterface FilePropertyBag {\r\n type?: string;\r\n lastModified?: number;\r\n}\r\n\r\ninterface EventListenerObject {\r\n handleEvent(evt: Event): void;\r\n}\r\n\r\ninterface MessageEventInit extends EventInit {\r\n data?: any;\r\n origin?: string;\r\n lastEventId?: string;\r\n channel?: string;\r\n source?: any;\r\n ports?: MessagePort[];\r\n}\r\n\r\ninterface ProgressEventInit extends EventInit {\r\n lengthComputable?: boolean;\r\n loaded?: number;\r\n total?: number;\r\n}\r\n\r\ninterface ScrollOptions {\r\n behavior?: ScrollBehavior;\r\n}\r\n\r\ninterface ScrollToOptions extends ScrollOptions {\r\n left?: number;\r\n top?: number;\r\n}\r\n\r\ninterface ScrollIntoViewOptions extends ScrollOptions {\r\n block?: ScrollLogicalPosition;\r\n inline?: ScrollLogicalPosition;\r\n}\r\n\r\ninterface ClipboardEventInit extends EventInit {\r\n data?: string;\r\n dataType?: string;\r\n}\r\n\r\ninterface IDBArrayKey extends Array {\r\n}\r\n\r\ninterface RsaKeyGenParams extends Algorithm {\r\n modulusLength: number;\r\n publicExponent: Uint8Array;\r\n}\r\n\r\ninterface RsaHashedKeyGenParams extends RsaKeyGenParams {\r\n hash: AlgorithmIdentifier;\r\n}\r\n\r\ninterface RsaKeyAlgorithm extends KeyAlgorithm {\r\n modulusLength: number;\r\n publicExponent: Uint8Array;\r\n}\r\n\r\ninterface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {\r\n hash: AlgorithmIdentifier;\r\n}\r\n\r\ninterface RsaHashedImportParams {\r\n hash: AlgorithmIdentifier;\r\n}\r\n\r\ninterface RsaPssParams {\r\n saltLength: number;\r\n}\r\n\r\ninterface RsaOaepParams extends Algorithm {\r\n label?: BufferSource;\r\n}\r\n\r\ninterface EcdsaParams extends Algorithm {\r\n hash: AlgorithmIdentifier;\r\n}\r\n\r\ninterface EcKeyGenParams extends Algorithm {\r\n namedCurve: string;\r\n}\r\n\r\ninterface EcKeyAlgorithm extends KeyAlgorithm {\r\n typedCurve: string;\r\n}\r\n\r\ninterface EcKeyImportParams {\r\n namedCurve: string;\r\n}\r\n\r\ninterface EcdhKeyDeriveParams extends Algorithm {\r\n public: CryptoKey;\r\n}\r\n\r\ninterface AesCtrParams extends Algorithm {\r\n counter: BufferSource;\r\n length: number;\r\n}\r\n\r\ninterface AesKeyAlgorithm extends KeyAlgorithm {\r\n length: number;\r\n}\r\n\r\ninterface AesKeyGenParams extends Algorithm {\r\n length: number;\r\n}\r\n\r\ninterface AesDerivedKeyParams extends Algorithm {\r\n length: number;\r\n}\r\n\r\ninterface AesCbcParams extends Algorithm {\r\n iv: BufferSource;\r\n}\r\n\r\ninterface AesCmacParams extends Algorithm {\r\n length: number;\r\n}\r\n\r\ninterface AesGcmParams extends Algorithm {\r\n iv: BufferSource;\r\n additionalData?: BufferSource;\r\n tagLength?: number;\r\n}\r\n\r\ninterface AesCfbParams extends Algorithm {\r\n iv: BufferSource;\r\n}\r\n\r\ninterface HmacImportParams extends Algorithm {\r\n hash?: AlgorithmIdentifier;\r\n length?: number;\r\n}\r\n\r\ninterface HmacKeyAlgorithm extends KeyAlgorithm {\r\n hash: AlgorithmIdentifier;\r\n length: number;\r\n}\r\n\r\ninterface HmacKeyGenParams extends Algorithm {\r\n hash: AlgorithmIdentifier;\r\n length?: number;\r\n}\r\n\r\ninterface DhKeyGenParams extends Algorithm {\r\n prime: Uint8Array;\r\n generator: Uint8Array;\r\n}\r\n\r\ninterface DhKeyAlgorithm extends KeyAlgorithm {\r\n prime: Uint8Array;\r\n generator: Uint8Array;\r\n}\r\n\r\ninterface DhKeyDeriveParams extends Algorithm {\r\n public: CryptoKey;\r\n}\r\n\r\ninterface DhImportKeyParams extends Algorithm {\r\n prime: Uint8Array;\r\n generator: Uint8Array;\r\n}\r\n\r\ninterface ConcatParams extends Algorithm {\r\n hash?: AlgorithmIdentifier;\r\n algorithmId: Uint8Array;\r\n partyUInfo: Uint8Array;\r\n partyVInfo: Uint8Array;\r\n publicInfo?: Uint8Array;\r\n privateInfo?: Uint8Array;\r\n}\r\n\r\ninterface HkdfCtrParams extends Algorithm {\r\n hash: AlgorithmIdentifier;\r\n label: BufferSource;\r\n context: BufferSource;\r\n}\r\n\r\ninterface Pbkdf2Params extends Algorithm {\r\n salt: BufferSource;\r\n iterations: number;\r\n hash: AlgorithmIdentifier;\r\n}\r\n\r\ninterface RsaOtherPrimesInfo {\r\n r: string;\r\n d: string;\r\n t: string;\r\n}\r\n\r\ninterface JsonWebKey {\r\n kty: string;\r\n use?: string;\r\n key_ops?: string[];\r\n alg?: string;\r\n kid?: string;\r\n x5u?: string;\r\n x5c?: string;\r\n x5t?: string;\r\n ext?: boolean;\r\n crv?: string;\r\n x?: string;\r\n y?: string;\r\n d?: string;\r\n n?: string;\r\n e?: string;\r\n p?: string;\r\n q?: string;\r\n dp?: string;\r\n dq?: string;\r\n qi?: string;\r\n oth?: RsaOtherPrimesInfo[];\r\n k?: string;\r\n}\r\n\r\ninterface ParentNode {\r\n readonly children: HTMLCollection;\r\n readonly firstElementChild: Element;\r\n readonly lastElementChild: Element;\r\n readonly childElementCount: number;\r\n}\r\n\r\ndeclare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;\r\n\r\ninterface ErrorEventHandler {\r\n (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;\r\n}\r\ninterface PositionCallback {\r\n (position: Position): void;\r\n}\r\ninterface PositionErrorCallback {\r\n (error: PositionError): void;\r\n}\r\ninterface MediaQueryListListener {\r\n (mql: MediaQueryList): void;\r\n}\r\ninterface MSLaunchUriCallback {\r\n (): void;\r\n}\r\ninterface FrameRequestCallback {\r\n (time: number): void;\r\n}\r\ninterface MSUnsafeFunctionCallback {\r\n (): any;\r\n}\r\ninterface MSExecAtPriorityFunctionCallback {\r\n (...args: any[]): any;\r\n}\r\ninterface MutationCallback {\r\n (mutations: MutationRecord[], observer: MutationObserver): void;\r\n}\r\ninterface DecodeSuccessCallback {\r\n (decodedData: AudioBuffer): void;\r\n}\r\ninterface DecodeErrorCallback {\r\n (error: DOMException): void;\r\n}\r\ninterface FunctionStringCallback {\r\n (data: string): void;\r\n}\r\ninterface NavigatorUserMediaSuccessCallback {\r\n (stream: MediaStream): void;\r\n}\r\ninterface NavigatorUserMediaErrorCallback {\r\n (error: MediaStreamError): void;\r\n}\r\ninterface ForEachCallback {\r\n (keyId: any, status: string): void;\r\n}\r\ndeclare var Audio: {new(src?: string): HTMLAudioElement; };\r\ndeclare var Image: {new(width?: number, height?: number): HTMLImageElement; };\r\ndeclare var Option: {new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; };\r\ndeclare var applicationCache: ApplicationCache;\r\ndeclare var clientInformation: Navigator;\r\ndeclare var closed: boolean;\r\ndeclare var crypto: Crypto;\r\ndeclare var defaultStatus: string;\r\ndeclare var devicePixelRatio: number;\r\ndeclare var doNotTrack: string;\r\ndeclare var document: Document;\r\ndeclare var event: Event;\r\ndeclare var external: External;\r\ndeclare var frameElement: Element;\r\ndeclare var frames: Window;\r\ndeclare var history: History;\r\ndeclare var innerHeight: number;\r\ndeclare var innerWidth: number;\r\ndeclare var length: number;\r\ndeclare var location: Location;\r\ndeclare var locationbar: BarProp;\r\ndeclare var menubar: BarProp;\r\ndeclare var msCredentials: MSCredentials;\r\ndeclare const name: never;\r\ndeclare var navigator: Navigator;\r\ndeclare var offscreenBuffering: string | boolean;\r\ndeclare var onabort: (this: Window, ev: UIEvent) => any;\r\ndeclare var onafterprint: (this: Window, ev: Event) => any;\r\ndeclare var onbeforeprint: (this: Window, ev: Event) => any;\r\ndeclare var onbeforeunload: (this: Window, ev: BeforeUnloadEvent) => any;\r\ndeclare var onblur: (this: Window, ev: FocusEvent) => any;\r\ndeclare var oncanplay: (this: Window, ev: Event) => any;\r\ndeclare var oncanplaythrough: (this: Window, ev: Event) => any;\r\ndeclare var onchange: (this: Window, ev: Event) => any;\r\ndeclare var onclick: (this: Window, ev: MouseEvent) => any;\r\ndeclare var oncompassneedscalibration: (this: Window, ev: Event) => any;\r\ndeclare var oncontextmenu: (this: Window, ev: PointerEvent) => any;\r\ndeclare var ondblclick: (this: Window, ev: MouseEvent) => any;\r\ndeclare var ondevicelight: (this: Window, ev: DeviceLightEvent) => any;\r\ndeclare var ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any;\r\ndeclare var ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any;\r\ndeclare var ondrag: (this: Window, ev: DragEvent) => any;\r\ndeclare var ondragend: (this: Window, ev: DragEvent) => any;\r\ndeclare var ondragenter: (this: Window, ev: DragEvent) => any;\r\ndeclare var ondragleave: (this: Window, ev: DragEvent) => any;\r\ndeclare var ondragover: (this: Window, ev: DragEvent) => any;\r\ndeclare var ondragstart: (this: Window, ev: DragEvent) => any;\r\ndeclare var ondrop: (this: Window, ev: DragEvent) => any;\r\ndeclare var ondurationchange: (this: Window, ev: Event) => any;\r\ndeclare var onemptied: (this: Window, ev: Event) => any;\r\ndeclare var onended: (this: Window, ev: MediaStreamErrorEvent) => any;\r\ndeclare var onerror: ErrorEventHandler;\r\ndeclare var onfocus: (this: Window, ev: FocusEvent) => any;\r\ndeclare var onhashchange: (this: Window, ev: HashChangeEvent) => any;\r\ndeclare var oninput: (this: Window, ev: Event) => any;\r\ndeclare var oninvalid: (this: Window, ev: Event) => any;\r\ndeclare var onkeydown: (this: Window, ev: KeyboardEvent) => any;\r\ndeclare var onkeypress: (this: Window, ev: KeyboardEvent) => any;\r\ndeclare var onkeyup: (this: Window, ev: KeyboardEvent) => any;\r\ndeclare var onload: (this: Window, ev: Event) => any;\r\ndeclare var onloadeddata: (this: Window, ev: Event) => any;\r\ndeclare var onloadedmetadata: (this: Window, ev: Event) => any;\r\ndeclare var onloadstart: (this: Window, ev: Event) => any;\r\ndeclare var onmessage: (this: Window, ev: MessageEvent) => any;\r\ndeclare var onmousedown: (this: Window, ev: MouseEvent) => any;\r\ndeclare var onmouseenter: (this: Window, ev: MouseEvent) => any;\r\ndeclare var onmouseleave: (this: Window, ev: MouseEvent) => any;\r\ndeclare var onmousemove: (this: Window, ev: MouseEvent) => any;\r\ndeclare var onmouseout: (this: Window, ev: MouseEvent) => any;\r\ndeclare var onmouseover: (this: Window, ev: MouseEvent) => any;\r\ndeclare var onmouseup: (this: Window, ev: MouseEvent) => any;\r\ndeclare var onmousewheel: (this: Window, ev: WheelEvent) => any;\r\ndeclare var onmsgesturechange: (this: Window, ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturedoubletap: (this: Window, ev: MSGestureEvent) => any;\r\ndeclare var onmsgestureend: (this: Window, ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturehold: (this: Window, ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturestart: (this: Window, ev: MSGestureEvent) => any;\r\ndeclare var onmsgesturetap: (this: Window, ev: MSGestureEvent) => any;\r\ndeclare var onmsinertiastart: (this: Window, ev: MSGestureEvent) => any;\r\ndeclare var onmspointercancel: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onmspointerdown: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onmspointerenter: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onmspointerleave: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onmspointermove: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onmspointerout: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onmspointerover: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onmspointerup: (this: Window, ev: MSPointerEvent) => any;\r\ndeclare var onoffline: (this: Window, ev: Event) => any;\r\ndeclare var ononline: (this: Window, ev: Event) => any;\r\ndeclare var onorientationchange: (this: Window, ev: Event) => any;\r\ndeclare var onpagehide: (this: Window, ev: PageTransitionEvent) => any;\r\ndeclare var onpageshow: (this: Window, ev: PageTransitionEvent) => any;\r\ndeclare var onpause: (this: Window, ev: Event) => any;\r\ndeclare var onplay: (this: Window, ev: Event) => any;\r\ndeclare var onplaying: (this: Window, ev: Event) => any;\r\ndeclare var onpopstate: (this: Window, ev: PopStateEvent) => any;\r\ndeclare var onprogress: (this: Window, ev: ProgressEvent) => any;\r\ndeclare var onratechange: (this: Window, ev: Event) => any;\r\ndeclare var onreadystatechange: (this: Window, ev: ProgressEvent) => any;\r\ndeclare var onreset: (this: Window, ev: Event) => any;\r\ndeclare var onresize: (this: Window, ev: UIEvent) => any;\r\ndeclare var onscroll: (this: Window, ev: UIEvent) => any;\r\ndeclare var onseeked: (this: Window, ev: Event) => any;\r\ndeclare var onseeking: (this: Window, ev: Event) => any;\r\ndeclare var onselect: (this: Window, ev: UIEvent) => any;\r\ndeclare var onstalled: (this: Window, ev: Event) => any;\r\ndeclare var onstorage: (this: Window, ev: StorageEvent) => any;\r\ndeclare var onsubmit: (this: Window, ev: Event) => any;\r\ndeclare var onsuspend: (this: Window, ev: Event) => any;\r\ndeclare var ontimeupdate: (this: Window, ev: Event) => any;\r\ndeclare var ontouchcancel: (ev: TouchEvent) => any;\r\ndeclare var ontouchend: (ev: TouchEvent) => any;\r\ndeclare var ontouchmove: (ev: TouchEvent) => any;\r\ndeclare var ontouchstart: (ev: TouchEvent) => any;\r\ndeclare var onunload: (this: Window, ev: Event) => any;\r\ndeclare var onvolumechange: (this: Window, ev: Event) => any;\r\ndeclare var onwaiting: (this: Window, ev: Event) => any;\r\ndeclare var opener: any;\r\ndeclare var orientation: string | number;\r\ndeclare var outerHeight: number;\r\ndeclare var outerWidth: number;\r\ndeclare var pageXOffset: number;\r\ndeclare var pageYOffset: number;\r\ndeclare var parent: Window;\r\ndeclare var performance: Performance;\r\ndeclare var personalbar: BarProp;\r\ndeclare var screen: Screen;\r\ndeclare var screenLeft: number;\r\ndeclare var screenTop: number;\r\ndeclare var screenX: number;\r\ndeclare var screenY: number;\r\ndeclare var scrollX: number;\r\ndeclare var scrollY: number;\r\ndeclare var scrollbars: BarProp;\r\ndeclare var self: Window;\r\ndeclare var status: string;\r\ndeclare var statusbar: BarProp;\r\ndeclare var styleMedia: StyleMedia;\r\ndeclare var toolbar: BarProp;\r\ndeclare var top: Window;\r\ndeclare var window: Window;\r\ndeclare function alert(message?: any): void;\r\ndeclare function blur(): void;\r\ndeclare function cancelAnimationFrame(handle: number): void;\r\ndeclare function captureEvents(): void;\r\ndeclare function close(): void;\r\ndeclare function confirm(message?: string): boolean;\r\ndeclare function focus(): void;\r\ndeclare function getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;\r\ndeclare function getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;\r\ndeclare function getSelection(): Selection;\r\ndeclare function matchMedia(mediaQuery: string): MediaQueryList;\r\ndeclare function moveBy(x?: number, y?: number): void;\r\ndeclare function moveTo(x?: number, y?: number): void;\r\ndeclare function msWriteProfilerMark(profilerMarkName: string): void;\r\ndeclare function open(url?: string, target?: string, features?: string, replace?: boolean): Window;\r\ndeclare function postMessage(message: any, targetOrigin: string, transfer?: any[]): void;\r\ndeclare function print(): void;\r\ndeclare function prompt(message?: string, _default?: string): string | null;\r\ndeclare function releaseEvents(): void;\r\ndeclare function requestAnimationFrame(callback: FrameRequestCallback): number;\r\ndeclare function resizeBy(x?: number, y?: number): void;\r\ndeclare function resizeTo(x?: number, y?: number): void;\r\ndeclare function scroll(x?: number, y?: number): void;\r\ndeclare function scrollBy(x?: number, y?: number): void;\r\ndeclare function scrollTo(x?: number, y?: number): void;\r\ndeclare function webkitCancelAnimationFrame(handle: number): void;\r\ndeclare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;\r\ndeclare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;\r\ndeclare function webkitRequestAnimationFrame(callback: FrameRequestCallback): number;\r\ndeclare function scroll(options?: ScrollToOptions): void;\r\ndeclare function scrollTo(options?: ScrollToOptions): void;\r\ndeclare function scrollBy(options?: ScrollToOptions): void;\r\ndeclare function toString(): string;\r\ndeclare function addEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\ndeclare function dispatchEvent(evt: Event): boolean;\r\ndeclare function removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\ndeclare function clearInterval(handle: number): void;\r\ndeclare function clearTimeout(handle: number): void;\r\ndeclare function setInterval(handler: (...args: any[]) => void, timeout: number): number;\r\ndeclare function setInterval(handler: any, timeout?: any, ...args: any[]): number;\r\ndeclare function setTimeout(handler: (...args: any[]) => void, timeout: number): number;\r\ndeclare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;\r\ndeclare function clearImmediate(handle: number): void;\r\ndeclare function setImmediate(handler: (...args: any[]) => void): number;\r\ndeclare function setImmediate(handler: any, ...args: any[]): number;\r\ndeclare var sessionStorage: Storage;\r\ndeclare var localStorage: Storage;\r\ndeclare var console: Console;\r\ndeclare var onpointercancel: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onpointerdown: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onpointerenter: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onpointerleave: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onpointermove: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onpointerout: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onpointerover: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onpointerup: (this: Window, ev: PointerEvent) => any;\r\ndeclare var onwheel: (this: Window, ev: WheelEvent) => any;\r\ndeclare var indexedDB: IDBFactory;\r\ndeclare function atob(encodedString: string): string;\r\ndeclare function btoa(rawString: string): string;\r\ndeclare function addEventListener(type: \"MSGestureChange\", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureDoubleTap\", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureEnd\", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureHold\", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureStart\", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSGestureTap\", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSInertiaStart\", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerCancel\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerDown\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerEnter\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerLeave\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerMove\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerOut\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerOver\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"MSPointerUp\", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"abort\", listener: (this: Window, ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"afterprint\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"beforeprint\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"beforeunload\", listener: (this: Window, ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"blur\", listener: (this: Window, ev: FocusEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"canplay\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"canplaythrough\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"change\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"click\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"compassneedscalibration\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"contextmenu\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dblclick\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"devicelight\", listener: (this: Window, ev: DeviceLightEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"devicemotion\", listener: (this: Window, ev: DeviceMotionEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"deviceorientation\", listener: (this: Window, ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"drag\", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragend\", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragenter\", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragleave\", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragover\", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"dragstart\", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"drop\", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"durationchange\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"emptied\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"ended\", listener: (this: Window, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"focus\", listener: (this: Window, ev: FocusEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"hashchange\", listener: (this: Window, ev: HashChangeEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"input\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"invalid\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"keydown\", listener: (this: Window, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"keypress\", listener: (this: Window, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"keyup\", listener: (this: Window, ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"load\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"loadeddata\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"loadedmetadata\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"loadstart\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"message\", listener: (this: Window, ev: MessageEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mousedown\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseenter\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseleave\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mousemove\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseout\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseover\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mouseup\", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"mousewheel\", listener: (this: Window, ev: WheelEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"offline\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"online\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"orientationchange\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pagehide\", listener: (this: Window, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pageshow\", listener: (this: Window, ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pause\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"play\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"playing\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointercancel\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerdown\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerenter\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerleave\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointermove\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerout\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerover\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"pointerup\", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"popstate\", listener: (this: Window, ev: PopStateEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"progress\", listener: (this: Window, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"ratechange\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"readystatechange\", listener: (this: Window, ev: ProgressEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"reset\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"resize\", listener: (this: Window, ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"scroll\", listener: (this: Window, ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"seeked\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"seeking\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"select\", listener: (this: Window, ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"stalled\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"storage\", listener: (this: Window, ev: StorageEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"submit\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"suspend\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"timeupdate\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"unload\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"volumechange\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"waiting\", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: \"wheel\", listener: (this: Window, ev: WheelEvent) => any, useCapture?: boolean): void;\r\ndeclare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;\r\ntype AAGUID = string;\r\ntype AlgorithmIdentifier = string | Algorithm;\r\ntype ConstrainBoolean = boolean | ConstrainBooleanParameters;\r\ntype ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;\r\ntype ConstrainDouble = number | ConstrainDoubleRange;\r\ntype ConstrainLong = number | ConstrainLongRange;\r\ntype CryptoOperationData = ArrayBufferView;\r\ntype GLbitfield = number;\r\ntype GLboolean = boolean;\r\ntype GLbyte = number;\r\ntype GLclampf = number;\r\ntype GLenum = number;\r\ntype GLfloat = number;\r\ntype GLint = number;\r\ntype GLintptr = number;\r\ntype GLshort = number;\r\ntype GLsizei = number;\r\ntype GLsizeiptr = number;\r\ntype GLubyte = number;\r\ntype GLuint = number;\r\ntype GLushort = number;\r\ntype IDBKeyPath = string;\r\ntype KeyFormat = string;\r\ntype KeyType = string;\r\ntype KeyUsage = string;\r\ntype MSInboundPayload = MSVideoRecvPayload | MSAudioRecvPayload;\r\ntype MSLocalClientEvent = MSLocalClientEventBase | MSAudioLocalClientEvent;\r\ntype MSOutboundPayload = MSVideoSendPayload | MSAudioSendPayload;\r\ntype RTCIceGatherCandidate = RTCIceCandidate | RTCIceCandidateComplete;\r\ntype RTCTransport = RTCDtlsTransport | RTCSrtpSdesTransport;\r\ntype payloadtype = number;\r\ntype ScrollBehavior = \"auto\" | \"instant\" | \"smooth\";\r\ntype ScrollLogicalPosition = \"start\" | \"center\" | \"end\" | \"nearest\";\r\ntype IDBValidKey = number | string | Date | IDBArrayKey;\r\ntype BufferSource = ArrayBuffer | ArrayBufferView;\r\ntype MouseWheelEvent = WheelEvent;\r\n/////////////////////////////\r\n/// WorkerGlobalScope APIs \r\n/////////////////////////////\r\n// These are only available in a Web Worker \r\ndeclare function importScripts(...urls: string[]): void;\r\n\r\n\r\n/////////////////////////////\r\n/// Windows Script Host APIS\r\n/////////////////////////////\r\n\r\n\r\ninterface ActiveXObject {\r\n new (s: string): any;\r\n}\r\ndeclare var ActiveXObject: ActiveXObject;\r\n\r\ninterface ITextWriter {\r\n Write(s: string): void;\r\n WriteLine(s: string): void;\r\n Close(): void;\r\n}\r\n\r\ninterface TextStreamBase {\r\n /**\r\n * The column number of the current character position in an input stream.\r\n */\r\n Column: number;\r\n\r\n /**\r\n * The current line number in an input stream.\r\n */\r\n Line: number;\r\n\r\n /**\r\n * Closes a text stream.\r\n * It is not necessary to close standard streams; they close automatically when the process ends. If \r\n * you close a standard stream, be aware that any other pointers to that standard stream become invalid.\r\n */\r\n Close(): void;\r\n}\r\n\r\ninterface TextStreamWriter extends TextStreamBase {\r\n /**\r\n * Sends a string to an output stream.\r\n */\r\n Write(s: string): void;\r\n\r\n /**\r\n * Sends a specified number of blank lines (newline characters) to an output stream.\r\n */\r\n WriteBlankLines(intLines: number): void;\r\n\r\n /**\r\n * Sends a string followed by a newline character to an output stream.\r\n */\r\n WriteLine(s: string): void;\r\n}\r\n\r\ninterface TextStreamReader extends TextStreamBase {\r\n /**\r\n * Returns a specified number of characters from an input stream, starting at the current pointer position.\r\n * Does not return until the ENTER key is pressed.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n */\r\n Read(characters: number): string;\r\n\r\n /**\r\n * Returns all characters from an input stream.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n */\r\n ReadAll(): string;\r\n\r\n /**\r\n * Returns an entire line from an input stream.\r\n * Although this method extracts the newline character, it does not add it to the returned string.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n */\r\n ReadLine(): string;\r\n\r\n /**\r\n * Skips a specified number of characters when reading from an input text stream.\r\n * Can only be used on a stream in reading mode; causes an error in writing or appending mode.\r\n * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)\r\n */\r\n Skip(characters: number): void;\r\n\r\n /**\r\n * Skips the next line when reading from an input text stream.\r\n * Can only be used on a stream in reading mode, not writing or appending mode.\r\n */\r\n SkipLine(): void;\r\n\r\n /**\r\n * Indicates whether the stream pointer position is at the end of a line.\r\n */\r\n AtEndOfLine: boolean;\r\n\r\n /**\r\n * Indicates whether the stream pointer position is at the end of a stream.\r\n */\r\n AtEndOfStream: boolean;\r\n}\r\n\r\ndeclare var WScript: {\r\n /**\r\n * Outputs text to either a message box (under WScript.exe) or the command console window followed by\r\n * a newline (under CScript.exe).\r\n */\r\n Echo(s: any): void;\r\n\r\n /**\r\n * Exposes the write-only error output stream for the current script.\r\n * Can be accessed only while using CScript.exe.\r\n */\r\n StdErr: TextStreamWriter;\r\n\r\n /**\r\n * Exposes the write-only output stream for the current script.\r\n * Can be accessed only while using CScript.exe.\r\n */\r\n StdOut: TextStreamWriter;\r\n Arguments: { length: number; Item(n: number): string; };\r\n\r\n /**\r\n * The full path of the currently running script.\r\n */\r\n ScriptFullName: string;\r\n\r\n /**\r\n * Forces the script to stop immediately, with an optional exit code.\r\n */\r\n Quit(exitCode?: number): number;\r\n\r\n /**\r\n * The Windows Script Host build version number.\r\n */\r\n BuildVersion: number;\r\n\r\n /**\r\n * Fully qualified path of the host executable.\r\n */\r\n FullName: string;\r\n\r\n /**\r\n * Gets/sets the script mode - interactive(true) or batch(false).\r\n */\r\n Interactive: boolean;\r\n\r\n /**\r\n * The name of the host executable (WScript.exe or CScript.exe).\r\n */\r\n Name: string;\r\n\r\n /**\r\n * Path of the directory containing the host executable.\r\n */\r\n Path: string;\r\n\r\n /**\r\n * The filename of the currently running script.\r\n */\r\n ScriptName: string;\r\n\r\n /**\r\n * Exposes the read-only input stream for the current script.\r\n * Can be accessed only while using CScript.exe.\r\n */\r\n StdIn: TextStreamReader;\r\n\r\n /**\r\n * Windows Script Host version\r\n */\r\n Version: string;\r\n\r\n /**\r\n * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.\r\n */\r\n ConnectObject(objEventSource: any, strPrefix: string): void;\r\n\r\n /**\r\n * Creates a COM object.\r\n * @param strProgiID\r\n * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.\r\n */\r\n CreateObject(strProgID: string, strPrefix?: string): any;\r\n\r\n /**\r\n * Disconnects a COM object from its event sources.\r\n */\r\n DisconnectObject(obj: any): void;\r\n\r\n /**\r\n * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.\r\n * @param strPathname Fully qualified path to the file containing the object persisted to disk.\r\n * For objects in memory, pass a zero-length string.\r\n * @param strProgID\r\n * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.\r\n */\r\n GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;\r\n\r\n /**\r\n * Suspends script execution for a specified length of time, then continues execution.\r\n * @param intTime Interval (in milliseconds) to suspend script execution.\r\n */\r\n Sleep(intTime: number): void;\r\n};\r\n\r\n/**\r\n * Allows enumerating over a COM collection, which may not have indexed item access.\r\n */\r\ninterface Enumerator {\r\n /**\r\n * Returns true if the current item is the last one in the collection, or the collection is empty,\r\n * or the current item is undefined.\r\n */\r\n atEnd(): boolean;\r\n\r\n /**\r\n * Returns the current item in the collection\r\n */\r\n item(): T;\r\n\r\n /**\r\n * Resets the current item in the collection to the first item. If there are no items in the collection,\r\n * the current item is set to undefined.\r\n */\r\n moveFirst(): void;\r\n\r\n /**\r\n * Moves the current item to the next item in the collection. If the enumerator is at the end of\r\n * the collection or the collection is empty, the current item is set to undefined.\r\n */\r\n moveNext(): void;\r\n}\r\n\r\ninterface EnumeratorConstructor {\r\n new (collection: any): Enumerator;\r\n new (collection: any): Enumerator;\r\n}\r\n\r\ndeclare var Enumerator: EnumeratorConstructor;\r\n\r\n/**\r\n * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.\r\n */\r\ninterface VBArray {\r\n /**\r\n * Returns the number of dimensions (1-based).\r\n */\r\n dimensions(): number;\r\n\r\n /**\r\n * Takes an index for each dimension in the array, and returns the item at the corresponding location.\r\n */\r\n getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;\r\n\r\n /**\r\n * Returns the smallest available index for a given dimension.\r\n * @param dimension 1-based dimension (defaults to 1)\r\n */\r\n lbound(dimension?: number): number;\r\n\r\n /**\r\n * Returns the largest available index for a given dimension.\r\n * @param dimension 1-based dimension (defaults to 1)\r\n */\r\n ubound(dimension?: number): number;\r\n\r\n /**\r\n * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,\r\n * each successive dimension is appended to the end of the array.\r\n * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]\r\n */\r\n toArray(): T[];\r\n}\r\n\r\ninterface VBArrayConstructor {\r\n new (safeArray: any): VBArray;\r\n new (safeArray: any): VBArray;\r\n}\r\n\r\ndeclare var VBArray: VBArrayConstructor;\r\n\r\n/**\r\n * Automation date (VT_DATE)\r\n */\r\ninterface VarDate { }\r\n\r\ninterface DateConstructor {\r\n new (vd: VarDate): Date;\r\n}\r\n\r\ninterface Date {\r\n getVarDate: () => VarDate;\r\n}\r\n"}; }); diff --git a/lib/typescriptServices.d.ts b/lib/typescriptServices.d.ts index 93f24e9c..0aa49bae 100644 --- a/lib/typescriptServices.d.ts +++ b/lib/typescriptServices.d.ts @@ -14,9 +14,12 @@ and limitations under the License. ***************************************************************************** */ declare namespace ts { - interface Map { + interface MapLike { [index: string]: T; } + interface Map extends MapLike { + __mapBrand: any; + } type Path = string & { __pathBrand: any; }; @@ -160,169 +163,181 @@ declare namespace ts { IsKeyword = 124, ModuleKeyword = 125, NamespaceKeyword = 126, - RequireKeyword = 127, - NumberKeyword = 128, - SetKeyword = 129, - StringKeyword = 130, - SymbolKeyword = 131, - TypeKeyword = 132, - FromKeyword = 133, - GlobalKeyword = 134, - OfKeyword = 135, - QualifiedName = 136, - ComputedPropertyName = 137, - TypeParameter = 138, - Parameter = 139, - Decorator = 140, - PropertySignature = 141, - PropertyDeclaration = 142, - MethodSignature = 143, - MethodDeclaration = 144, - Constructor = 145, - GetAccessor = 146, - SetAccessor = 147, - CallSignature = 148, - ConstructSignature = 149, - IndexSignature = 150, - TypePredicate = 151, - TypeReference = 152, - FunctionType = 153, - ConstructorType = 154, - TypeQuery = 155, - TypeLiteral = 156, - ArrayType = 157, - TupleType = 158, - UnionType = 159, - IntersectionType = 160, - ParenthesizedType = 161, - ThisType = 162, - StringLiteralType = 163, - ObjectBindingPattern = 164, - ArrayBindingPattern = 165, - BindingElement = 166, - ArrayLiteralExpression = 167, - ObjectLiteralExpression = 168, - PropertyAccessExpression = 169, - ElementAccessExpression = 170, - CallExpression = 171, - NewExpression = 172, - TaggedTemplateExpression = 173, - TypeAssertionExpression = 174, - ParenthesizedExpression = 175, - FunctionExpression = 176, - ArrowFunction = 177, - DeleteExpression = 178, - TypeOfExpression = 179, - VoidExpression = 180, - AwaitExpression = 181, - PrefixUnaryExpression = 182, - PostfixUnaryExpression = 183, - BinaryExpression = 184, - ConditionalExpression = 185, - TemplateExpression = 186, - YieldExpression = 187, - SpreadElementExpression = 188, - ClassExpression = 189, - OmittedExpression = 190, - ExpressionWithTypeArguments = 191, - AsExpression = 192, - TemplateSpan = 193, - SemicolonClassElement = 194, - Block = 195, - VariableStatement = 196, - EmptyStatement = 197, - ExpressionStatement = 198, - IfStatement = 199, - DoStatement = 200, - WhileStatement = 201, - ForStatement = 202, - ForInStatement = 203, - ForOfStatement = 204, - ContinueStatement = 205, - BreakStatement = 206, - ReturnStatement = 207, - WithStatement = 208, - SwitchStatement = 209, - LabeledStatement = 210, - ThrowStatement = 211, - TryStatement = 212, - DebuggerStatement = 213, - VariableDeclaration = 214, - VariableDeclarationList = 215, - FunctionDeclaration = 216, - ClassDeclaration = 217, - InterfaceDeclaration = 218, - TypeAliasDeclaration = 219, - EnumDeclaration = 220, - ModuleDeclaration = 221, - ModuleBlock = 222, - CaseBlock = 223, - ImportEqualsDeclaration = 224, - ImportDeclaration = 225, - ImportClause = 226, - NamespaceImport = 227, - NamedImports = 228, - ImportSpecifier = 229, - ExportAssignment = 230, - ExportDeclaration = 231, - NamedExports = 232, - ExportSpecifier = 233, - MissingDeclaration = 234, - ExternalModuleReference = 235, - JsxElement = 236, - JsxSelfClosingElement = 237, - JsxOpeningElement = 238, - JsxText = 239, - JsxClosingElement = 240, - JsxAttribute = 241, - JsxSpreadAttribute = 242, - JsxExpression = 243, - CaseClause = 244, - DefaultClause = 245, - HeritageClause = 246, - CatchClause = 247, - PropertyAssignment = 248, - ShorthandPropertyAssignment = 249, - EnumMember = 250, - SourceFile = 251, - JSDocTypeExpression = 252, - JSDocAllType = 253, - JSDocUnknownType = 254, - JSDocArrayType = 255, - JSDocUnionType = 256, - JSDocTupleType = 257, - JSDocNullableType = 258, - JSDocNonNullableType = 259, - JSDocRecordType = 260, - JSDocRecordMember = 261, - JSDocTypeReference = 262, - JSDocOptionalType = 263, - JSDocFunctionType = 264, - JSDocVariadicType = 265, - JSDocConstructorType = 266, - JSDocThisType = 267, - JSDocComment = 268, - JSDocTag = 269, - JSDocParameterTag = 270, - JSDocReturnTag = 271, - JSDocTypeTag = 272, - JSDocTemplateTag = 273, - SyntaxList = 274, - Count = 275, + NeverKeyword = 127, + ReadonlyKeyword = 128, + RequireKeyword = 129, + NumberKeyword = 130, + SetKeyword = 131, + StringKeyword = 132, + SymbolKeyword = 133, + TypeKeyword = 134, + UndefinedKeyword = 135, + FromKeyword = 136, + GlobalKeyword = 137, + OfKeyword = 138, + QualifiedName = 139, + ComputedPropertyName = 140, + TypeParameter = 141, + Parameter = 142, + Decorator = 143, + PropertySignature = 144, + PropertyDeclaration = 145, + MethodSignature = 146, + MethodDeclaration = 147, + Constructor = 148, + GetAccessor = 149, + SetAccessor = 150, + CallSignature = 151, + ConstructSignature = 152, + IndexSignature = 153, + TypePredicate = 154, + TypeReference = 155, + FunctionType = 156, + ConstructorType = 157, + TypeQuery = 158, + TypeLiteral = 159, + ArrayType = 160, + TupleType = 161, + UnionType = 162, + IntersectionType = 163, + ParenthesizedType = 164, + ThisType = 165, + LiteralType = 166, + ObjectBindingPattern = 167, + ArrayBindingPattern = 168, + BindingElement = 169, + ArrayLiteralExpression = 170, + ObjectLiteralExpression = 171, + PropertyAccessExpression = 172, + ElementAccessExpression = 173, + CallExpression = 174, + NewExpression = 175, + TaggedTemplateExpression = 176, + TypeAssertionExpression = 177, + ParenthesizedExpression = 178, + FunctionExpression = 179, + ArrowFunction = 180, + DeleteExpression = 181, + TypeOfExpression = 182, + VoidExpression = 183, + AwaitExpression = 184, + PrefixUnaryExpression = 185, + PostfixUnaryExpression = 186, + BinaryExpression = 187, + ConditionalExpression = 188, + TemplateExpression = 189, + YieldExpression = 190, + SpreadElementExpression = 191, + ClassExpression = 192, + OmittedExpression = 193, + ExpressionWithTypeArguments = 194, + AsExpression = 195, + NonNullExpression = 196, + TemplateSpan = 197, + SemicolonClassElement = 198, + Block = 199, + VariableStatement = 200, + EmptyStatement = 201, + ExpressionStatement = 202, + IfStatement = 203, + DoStatement = 204, + WhileStatement = 205, + ForStatement = 206, + ForInStatement = 207, + ForOfStatement = 208, + ContinueStatement = 209, + BreakStatement = 210, + ReturnStatement = 211, + WithStatement = 212, + SwitchStatement = 213, + LabeledStatement = 214, + ThrowStatement = 215, + TryStatement = 216, + DebuggerStatement = 217, + VariableDeclaration = 218, + VariableDeclarationList = 219, + FunctionDeclaration = 220, + ClassDeclaration = 221, + InterfaceDeclaration = 222, + TypeAliasDeclaration = 223, + EnumDeclaration = 224, + ModuleDeclaration = 225, + ModuleBlock = 226, + CaseBlock = 227, + NamespaceExportDeclaration = 228, + ImportEqualsDeclaration = 229, + ImportDeclaration = 230, + ImportClause = 231, + NamespaceImport = 232, + NamedImports = 233, + ImportSpecifier = 234, + ExportAssignment = 235, + ExportDeclaration = 236, + NamedExports = 237, + ExportSpecifier = 238, + MissingDeclaration = 239, + ExternalModuleReference = 240, + JsxElement = 241, + JsxSelfClosingElement = 242, + JsxOpeningElement = 243, + JsxText = 244, + JsxClosingElement = 245, + JsxAttribute = 246, + JsxSpreadAttribute = 247, + JsxExpression = 248, + CaseClause = 249, + DefaultClause = 250, + HeritageClause = 251, + CatchClause = 252, + PropertyAssignment = 253, + ShorthandPropertyAssignment = 254, + EnumMember = 255, + SourceFile = 256, + JSDocTypeExpression = 257, + JSDocAllType = 258, + JSDocUnknownType = 259, + JSDocArrayType = 260, + JSDocUnionType = 261, + JSDocTupleType = 262, + JSDocNullableType = 263, + JSDocNonNullableType = 264, + JSDocRecordType = 265, + JSDocRecordMember = 266, + JSDocTypeReference = 267, + JSDocOptionalType = 268, + JSDocFunctionType = 269, + JSDocVariadicType = 270, + JSDocConstructorType = 271, + JSDocThisType = 272, + JSDocComment = 273, + JSDocTag = 274, + JSDocParameterTag = 275, + JSDocReturnTag = 276, + JSDocTypeTag = 277, + JSDocTemplateTag = 278, + JSDocTypedefTag = 279, + JSDocPropertyTag = 280, + JSDocTypeLiteral = 281, + JSDocLiteralType = 282, + JSDocNullKeyword = 283, + JSDocUndefinedKeyword = 284, + JSDocNeverKeyword = 285, + SyntaxList = 286, + Count = 287, FirstAssignment = 56, LastAssignment = 68, FirstReservedWord = 70, LastReservedWord = 105, FirstKeyword = 70, - LastKeyword = 135, + LastKeyword = 138, FirstFutureReservedWord = 106, LastFutureReservedWord = 114, - FirstTypeNode = 151, - LastTypeNode = 163, + FirstTypeNode = 154, + LastTypeNode = 166, FirstPunctuation = 15, LastPunctuation = 68, FirstToken = 0, - LastToken = 135, + LastToken = 138, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 8, @@ -331,41 +346,54 @@ declare namespace ts { LastTemplateToken = 14, FirstBinaryOperator = 25, LastBinaryOperator = 68, - FirstNode = 136, + FirstNode = 139, + FirstJSDocNode = 257, + LastJSDocNode = 282, + FirstJSDocTagNode = 273, + LastJSDocTagNode = 285, } enum NodeFlags { None = 0, - Export = 2, - Ambient = 4, - Public = 8, - Private = 16, - Protected = 32, - Static = 64, + Export = 1, + Ambient = 2, + Public = 4, + Private = 8, + Protected = 16, + Static = 32, + Readonly = 64, Abstract = 128, Async = 256, Default = 512, - MultiLine = 1024, - Synthetic = 2048, - DeclarationFile = 4096, - Let = 8192, - Const = 16384, - OctalLiteral = 32768, - Namespace = 65536, - ExportContext = 131072, - ContainsThis = 262144, - HasImplicitReturn = 524288, - HasExplicitReturn = 1048576, - GlobalAugmentation = 2097152, - HasClassExtends = 4194304, - HasDecorators = 8388608, - HasParamDecorators = 16777216, - HasAsyncFunctions = 33554432, + Let = 1024, + Const = 2048, + Namespace = 4096, + ExportContext = 8192, + ContainsThis = 16384, + HasImplicitReturn = 32768, + HasExplicitReturn = 65536, + GlobalAugmentation = 131072, + HasClassExtends = 262144, + HasDecorators = 524288, + HasParamDecorators = 1048576, + HasAsyncFunctions = 2097152, + DisallowInContext = 4194304, + YieldContext = 8388608, + DecoratorContext = 16777216, + AwaitContext = 33554432, + ThisNodeHasError = 67108864, + JavaScriptFile = 134217728, + ThisNodeOrAnySubNodesHasError = 268435456, + HasAggregatedChildData = 536870912, HasJsxSpreadAttribute = 1073741824, - Modifier = 1022, - AccessibilityModifier = 56, - BlockScoped = 24576, - ReachabilityCheckFlags = 1572864, - EmitHelperFlags = 62914560, + Modifier = 1023, + AccessibilityModifier = 28, + ParameterPropertyModifier = 92, + BlockScoped = 3072, + ReachabilityCheckFlags = 98304, + EmitHelperFlags = 3932160, + ReachabilityAndEmitFlags = 4030464, + ContextFlags = 197132288, + TypeExcludesFlags = 41943040, } enum JsxFlags { None = 0, @@ -373,10 +401,6 @@ declare namespace ts { IntrinsicNamedElement = 1, /** An element inferred from the string index signature of the JSX.IntrinsicElements interface */ IntrinsicIndexedElement = 2, - /** An element backed by a class, class-like, or function value */ - ValueElement = 4, - /** Element resolution failed */ - UnknownElement = 16, IntrinsicElement = 3, } interface Node extends TextRange { @@ -390,9 +414,12 @@ declare namespace ts { hasTrailingComma?: boolean; } interface ModifiersArray extends NodeArray { - flags: number; + flags: NodeFlags; } - interface Modifier extends Node { + interface Token extends Node { + __tokenTag: any; + } + interface Modifier extends Token { } interface Identifier extends PrimaryExpression { text: string; @@ -587,8 +614,9 @@ declare namespace ts { interface ParenthesizedTypeNode extends TypeNode { type: TypeNode; } - interface StringLiteralTypeNode extends LiteralLikeNode, TypeNode { + interface LiteralTypeNode extends TypeNode { _stringLiteralTypeBrand: any; + literal: Expression; } interface StringLiteral extends LiteralExpression { _stringLiteralBrand: any; @@ -694,11 +722,17 @@ declare namespace ts { interface ObjectLiteralExpression extends PrimaryExpression, Declaration { properties: NodeArray; } + type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression; + type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression; interface PropertyAccessExpression extends MemberExpression, Declaration { expression: LeftHandSideExpression; - dotToken: Node; name: Identifier; } + /** Brand for a PropertyAccessExpression which, like a QualifiedName, consists of a sequence of identifiers separated by dots. */ + interface PropertyAccessEntityNameExpression extends PropertyAccessExpression { + _propertyAccessExpressionLikeQualifiedNameBrand?: any; + expression: EntityNameExpression; + } interface ElementAccessExpression extends MemberExpression { expression: LeftHandSideExpression; argumentExpression?: Expression; @@ -728,14 +762,18 @@ declare namespace ts { expression: UnaryExpression; } type AssertionExpression = TypeAssertion | AsExpression; + interface NonNullExpression extends LeftHandSideExpression { + expression: Expression; + } interface JsxElement extends PrimaryExpression { openingElement: JsxOpeningElement; children: NodeArray; closingElement: JsxClosingElement; } + type JsxTagNameExpression = PrimaryExpression | PropertyAccessExpression; interface JsxOpeningElement extends Expression { _openingElementBrand?: any; - tagName: EntityName; + tagName: JsxTagNameExpression; attributes: NodeArray; } interface JsxSelfClosingElement extends PrimaryExpression, JsxOpeningElement { @@ -750,7 +788,7 @@ declare namespace ts { expression: Expression; } interface JsxClosingElement extends Node { - tagName: EntityName; + tagName: JsxTagNameExpression; } interface JsxExpression extends Expression { expression?: Expression; @@ -823,6 +861,7 @@ declare namespace ts { interface SwitchStatement extends Statement { expression: Expression; caseBlock: CaseBlock; + possiblyExhaustive?: boolean; } interface CaseBlock extends Node { clauses: NodeArray; @@ -851,6 +890,7 @@ declare namespace ts { variableDeclaration: VariableDeclaration; block: Block; } + type DeclarationWithTypeParameters = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration; interface ClassLikeDeclaration extends Declaration { name?: Identifier; typeParameters?: NodeArray; @@ -897,7 +937,7 @@ declare namespace ts { type ModuleBody = ModuleBlock | ModuleDeclaration; interface ModuleDeclaration extends DeclarationStatement { name: Identifier | LiteralExpression; - body: ModuleBlock | ModuleDeclaration; + body?: ModuleBlock | ModuleDeclaration; } interface ModuleBlock extends Node, Statement { statements: NodeArray; @@ -920,6 +960,10 @@ declare namespace ts { interface NamespaceImport extends Declaration { name: Identifier; } + interface NamespaceExportDeclaration extends DeclarationStatement { + name: Identifier; + moduleReference: LiteralLikeNode; + } interface ExportDeclaration extends DeclarationStatement { exportClause?: NamedExports; moduleSpecifier?: Expression; @@ -1001,6 +1045,9 @@ declare namespace ts { interface JSDocThisType extends JSDocType { type: JSDocType; } + interface JSDocLiteralType extends JSDocType { + literal: LiteralTypeNode; + } type JSDocTypeReferencingNode = JSDocThisType | JSDocConstructorType | JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType; interface JSDocRecordMember extends PropertySignature { name: Identifier | LiteralExpression; @@ -1022,12 +1069,68 @@ declare namespace ts { interface JSDocTypeTag extends JSDocTag { typeExpression: JSDocTypeExpression; } + interface JSDocTypedefTag extends JSDocTag, Declaration { + name?: Identifier; + typeExpression?: JSDocTypeExpression; + jsDocTypeLiteral?: JSDocTypeLiteral; + } + interface JSDocPropertyTag extends JSDocTag, TypeElement { + name: Identifier; + typeExpression: JSDocTypeExpression; + } + interface JSDocTypeLiteral extends JSDocType { + jsDocPropertyTags?: NodeArray; + jsDocTypeTag?: JSDocTypeTag; + } interface JSDocParameterTag extends JSDocTag { preParameterName?: Identifier; typeExpression?: JSDocTypeExpression; postParameterName?: Identifier; isBracketed: boolean; } + enum FlowFlags { + Unreachable = 1, + Start = 2, + BranchLabel = 4, + LoopLabel = 8, + Assignment = 16, + TrueCondition = 32, + FalseCondition = 64, + SwitchClause = 128, + Referenced = 256, + Shared = 512, + Label = 12, + Condition = 96, + } + interface FlowNode { + flags: FlowFlags; + id?: number; + } + interface FlowStart extends FlowNode { + container?: FunctionExpression | ArrowFunction; + } + interface FlowLabel extends FlowNode { + antecedents: FlowNode[]; + } + interface FlowAssignment extends FlowNode { + node: Expression | VariableDeclaration | BindingElement; + antecedent: FlowNode; + } + interface FlowCondition extends FlowNode { + expression: Expression; + antecedent: FlowNode; + } + interface FlowSwitchClause extends FlowNode { + switchStatement: SwitchStatement; + clauseStart: number; + clauseEnd: number; + antecedent: FlowNode; + } + type FlowType = Type | IncompleteType; + interface IncompleteType { + flags: TypeFlags; + type: Type; + } interface AmdDependency { path: string; name: string; @@ -1041,7 +1144,9 @@ declare namespace ts { amdDependencies: AmdDependency[]; moduleName: string; referencedFiles: FileReference[]; + typeReferenceDirectives: FileReference[]; languageVariant: LanguageVariant; + isDeclarationFile: boolean; /** * lib.d.ts should have a reference comment like * @@ -1056,13 +1161,20 @@ declare namespace ts { interface ScriptReferenceHost { getCompilerOptions(): CompilerOptions; getSourceFile(fileName: string): SourceFile; + getSourceFileByPath(path: Path): SourceFile; getCurrentDirectory(): string; } interface ParseConfigHost { - readDirectory(rootDir: string, extension: string, exclude: string[]): string[]; + useCaseSensitiveFileNames: boolean; + readDirectory(rootDir: string, extensions: string[], excludes: string[], includes: string[]): string[]; + /** + * Gets a value indicating whether the specified path exists and is a file. + * @param path The path to test. + */ + fileExists(path: string): boolean; } interface WriteFileCallback { - (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; + (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: SourceFile[]): void; } class OperationCanceledException { } @@ -1135,7 +1247,9 @@ declare namespace ts { } interface EmitResult { emitSkipped: boolean; + /** Contains declaration emit diagnostics */ diagnostics: Diagnostic[]; + emittedFiles: string[]; } interface TypeChecker { getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; @@ -1146,11 +1260,13 @@ declare namespace ts { getIndexTypeOfType(type: Type, kind: IndexKind): Type; getBaseTypes(type: InterfaceType): ObjectType[]; getReturnTypeOfSignature(signature: Signature): Type; + getNonNullableType(type: Type): Type; getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; getSymbolAtLocation(node: Node): Symbol; getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[]; getShorthandAssignmentValueSymbol(location: Node): Symbol; getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol; + getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol; getTypeAtLocation(node: Node): Type; typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; @@ -1181,7 +1297,7 @@ declare namespace ts { buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; buildTypePredicateDisplay(predicate: TypePredicate, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildDisplayForParametersAndDelimiters(thisParameter: Symbol, parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; } @@ -1210,6 +1326,9 @@ declare namespace ts { WriteTypeArgumentsOfSignature = 32, InElementType = 64, UseFullyQualifiedType = 128, + InFirstTypeArgument = 256, + InTypeAlias = 512, + UseTypeAliasValue = 1024, } enum SymbolFormatFlags { None = 0, @@ -1268,18 +1387,18 @@ declare namespace ts { Enum = 384, Variable = 3, Value = 107455, - Type = 793056, - Namespace = 1536, + Type = 793064, + Namespace = 1920, Module = 1536, Accessor = 98304, FunctionScopedVariableExcludes = 107454, BlockScopedVariableExcludes = 107455, ParameterExcludes = 107455, - PropertyExcludes = 107455, - EnumMemberExcludes = 107455, + PropertyExcludes = 0, + EnumMemberExcludes = 900095, FunctionExcludes = 106927, ClassExcludes = 899519, - InterfaceExcludes = 792960, + InterfaceExcludes = 792968, RegularEnumExcludes = 899327, ConstEnumExcludes = 899967, ValueModuleExcludes = 106639, @@ -1287,8 +1406,8 @@ declare namespace ts { MethodExcludes = 99263, GetAccessorExcludes = 41919, SetAccessorExcludes = 74687, - TypeParameterExcludes = 530912, - TypeAliasExcludes = 793056, + TypeParameterExcludes = 530920, + TypeAliasExcludes = 793064, AliasExcludes = 8388608, ModuleMember = 8914931, ExportHasLocal = 944, @@ -1297,6 +1416,7 @@ declare namespace ts { BlockScoped = 418, PropertyOrAccessor = 98308, Export = 7340032, + ClassMember = 106500, } interface Symbol { flags: SymbolFlags; @@ -1305,48 +1425,65 @@ declare namespace ts { valueDeclaration?: Declaration; members?: SymbolTable; exports?: SymbolTable; + globalExports?: SymbolTable; } - interface SymbolTable { - [index: string]: Symbol; - } + type SymbolTable = Map; enum TypeFlags { Any = 1, String = 2, Number = 4, Boolean = 8, - Void = 16, - Undefined = 32, - Null = 64, - Enum = 128, - StringLiteral = 256, - TypeParameter = 512, - Class = 1024, - Interface = 2048, - Reference = 4096, - Tuple = 8192, - Union = 16384, - Intersection = 32768, - Anonymous = 65536, - Instantiated = 131072, - ObjectLiteral = 524288, - ESSymbol = 16777216, - ThisType = 33554432, - ObjectLiteralPatternWithComputedProperties = 67108864, - StringLike = 258, - NumberLike = 132, - ObjectType = 80896, - UnionOrIntersection = 49152, - StructuredType = 130048, + Enum = 16, + StringLiteral = 32, + NumberLiteral = 64, + BooleanLiteral = 128, + EnumLiteral = 256, + ESSymbol = 512, + Void = 1024, + Undefined = 2048, + Null = 4096, + Never = 8192, + TypeParameter = 16384, + Class = 32768, + Interface = 65536, + Reference = 131072, + Tuple = 262144, + Union = 524288, + Intersection = 1048576, + Anonymous = 2097152, + Instantiated = 4194304, + ThisType = 268435456, + ObjectLiteralPatternWithComputedProperties = 536870912, + Literal = 480, + PossiblyFalsy = 7406, + StringLike = 34, + NumberLike = 340, + BooleanLike = 136, + EnumLike = 272, + ObjectType = 2588672, + UnionOrIntersection = 1572864, + StructuredType = 4161536, + StructuredOrTypeParameter = 4177920, + Narrowable = 4178943, + NotUnionOrUnit = 2589191, } type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression; interface Type { flags: TypeFlags; symbol?: Symbol; pattern?: DestructuringPattern; + aliasSymbol?: Symbol; + aliasTypeArguments?: Type[]; } - interface StringLiteralType extends Type { + interface LiteralType extends Type { text: string; } + interface EnumType extends Type { + memberTypes: Map; + } + interface EnumLiteralType extends LiteralType { + baseType: EnumType & UnionType; + } interface ObjectType extends Type { } interface InterfaceType extends ObjectType { @@ -1359,8 +1496,8 @@ declare namespace ts { declaredProperties: Symbol[]; declaredCallSignatures: Signature[]; declaredConstructSignatures: Signature[]; - declaredStringIndexType: Type; - declaredNumberIndexType: Type; + declaredStringIndexInfo: IndexInfo; + declaredNumberIndexInfo: IndexInfo; } interface TypeReference extends ObjectType { target: GenericType; @@ -1368,9 +1505,6 @@ declare namespace ts { } interface GenericType extends InterfaceType, TypeReference { } - interface TupleType extends ObjectType { - elementTypes: Type[]; - } interface UnionOrIntersectionType extends Type { types: Type[]; } @@ -1394,6 +1528,11 @@ declare namespace ts { String = 0, Number = 1, } + interface IndexInfo { + type: Type; + isReadonly: boolean; + declaration?: SignatureDeclaration; + } interface DiagnosticMessage { key: string; category: DiagnosticCategory; @@ -1429,64 +1568,77 @@ declare namespace ts { Classic = 1, NodeJs = 2, } + type RootPaths = string[]; + type PathSubstitutions = MapLike; + type TsConfigOnlyOptions = RootPaths | PathSubstitutions; + type CompilerOptionsValue = string | number | boolean | (string | number)[] | TsConfigOnlyOptions; interface CompilerOptions { - allowNonTsExtensions?: boolean; + allowJs?: boolean; + allowSyntheticDefaultImports?: boolean; + allowUnreachableCode?: boolean; + allowUnusedLabels?: boolean; + baseUrl?: string; charset?: string; declaration?: boolean; - diagnostics?: boolean; + declarationDir?: string; + disableSizeLimit?: boolean; emitBOM?: boolean; - help?: boolean; - init?: boolean; + emitDecoratorMetadata?: boolean; + experimentalDecorators?: boolean; + forceConsistentCasingInFileNames?: boolean; inlineSourceMap?: boolean; inlineSources?: boolean; + isolatedModules?: boolean; jsx?: JsxEmit; - reactNamespace?: string; - listFiles?: boolean; + lib?: string[]; locale?: string; mapRoot?: string; + maxNodeModuleJsDepth?: number; module?: ModuleKind; + moduleResolution?: ModuleResolutionKind; newLine?: NewLineKind; noEmit?: boolean; noEmitHelpers?: boolean; noEmitOnError?: boolean; noErrorTruncation?: boolean; + noFallthroughCasesInSwitch?: boolean; noImplicitAny?: boolean; + noImplicitReturns?: boolean; + noImplicitThis?: boolean; + noUnusedLocals?: boolean; + noUnusedParameters?: boolean; + noImplicitUseStrict?: boolean; noLib?: boolean; noResolve?: boolean; out?: string; - outFile?: string; outDir?: string; + outFile?: string; + paths?: PathSubstitutions; preserveConstEnums?: boolean; project?: string; + reactNamespace?: string; removeComments?: boolean; rootDir?: string; + rootDirs?: RootPaths; + skipLibCheck?: boolean; + skipDefaultLibCheck?: boolean; sourceMap?: boolean; sourceRoot?: string; + strictNullChecks?: boolean; suppressExcessPropertyErrors?: boolean; suppressImplicitAnyIndexErrors?: boolean; target?: ScriptTarget; - version?: boolean; - watch?: boolean; - isolatedModules?: boolean; - experimentalDecorators?: boolean; - emitDecoratorMetadata?: boolean; - moduleResolution?: ModuleResolutionKind; - allowUnusedLabels?: boolean; - allowUnreachableCode?: boolean; - noImplicitReturns?: boolean; - noFallthroughCasesInSwitch?: boolean; - forceConsistentCasingInFileNames?: boolean; - allowSyntheticDefaultImports?: boolean; - allowJs?: boolean; - noImplicitUseStrict?: boolean; - disableSizeLimit?: boolean; - [option: string]: string | number | boolean; + traceResolution?: boolean; + types?: string[]; + /** Paths used to used to compute primary types search locations */ + typeRoots?: string[]; + [option: string]: CompilerOptionsValue | undefined; } interface TypingOptions { enableAutoDiscovery?: boolean; include?: string[]; exclude?: string[]; - [option: string]: string[] | boolean; + [option: string]: string[] | boolean | undefined; } interface DiscoverTypingsInfo { fileNames: string[]; @@ -1540,12 +1692,26 @@ declare namespace ts { options: CompilerOptions; typingOptions?: TypingOptions; fileNames: string[]; + raw?: any; errors: Diagnostic[]; + wildcardDirectories?: MapLike; + } + enum WatchDirectoryFlags { + None = 0, + Recursive = 1, + } + interface ExpandResult { + fileNames: string[]; + wildcardDirectories: MapLike; } interface ModuleResolutionHost { fileExists(fileName: string): boolean; readFile(fileName: string): string; + trace?(s: string): void; directoryExists?(directoryName: string): boolean; + realpath?(path: string): string; + getCurrentDirectory?(): string; + getDirectories?(path: string): string[]; } interface ResolvedModule { resolvedFileName: string; @@ -1555,16 +1721,31 @@ declare namespace ts { resolvedModule: ResolvedModule; failedLookupLocations: string[]; } + interface ResolvedTypeReferenceDirective { + primary: boolean; + resolvedFileName?: string; + } + interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations { + resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective; + failedLookupLocations: string[]; + } interface CompilerHost extends ModuleResolutionHost { getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; + getSourceFileByPath?(fileName: string, path: Path, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; getCancellationToken?(): CancellationToken; getDefaultLibFileName(options: CompilerOptions): string; + getDefaultLibLocation?(): string; writeFile: WriteFileCallback; getCurrentDirectory(): string; + getDirectories(path: string): string[]; getCanonicalFileName(fileName: string): string; useCaseSensitiveFileNames(): boolean; getNewLine(): string; resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[]; + /** + * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files + */ + resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[]; } interface TextSpan { start: number; @@ -1574,18 +1755,27 @@ declare namespace ts { span: TextSpan; newLength: number; } + interface SyntaxList extends Node { + _children: Node[]; + } } declare namespace ts { - type FileWatcherCallback = (path: string, removed?: boolean) => void; - type DirectoryWatcherCallback = (path: string) => void; + type FileWatcherCallback = (fileName: string, removed?: boolean) => void; + type DirectoryWatcherCallback = (fileName: string) => void; + interface WatchedFile { + fileName: string; + callback: FileWatcherCallback; + mtime?: Date; + } interface System { args: string[]; newLine: string; useCaseSensitiveFileNames: boolean; write(s: string): void; readFile(path: string, encoding?: string): string; + getFileSize?(path: string): number; writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; - watchFile?(path: Path, callback: FileWatcherCallback): FileWatcher; + watchFile?(path: string, callback: FileWatcherCallback): FileWatcher; watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean): FileWatcher; resolvePath(path: string): string; fileExists(path: string): boolean; @@ -1593,15 +1783,19 @@ declare namespace ts { createDirectory(path: string): void; getExecutingFilePath(): string; getCurrentDirectory(): string; - readDirectory(path: string, extension?: string, exclude?: string[]): string[]; + getDirectories(path: string): string[]; + readDirectory(path: string, extensions?: string[], exclude?: string[], include?: string[]): string[]; + getModifiedTime?(path: string): Date; + createHash?(data: string): string; getMemoryUsage?(): number; exit(exitCode?: number): void; + realpath?(path: string): string; } interface FileWatcher { close(): void; } interface DirectoryWatcher extends FileWatcher { - directoryPath: Path; + directoryName: string; referenceCount: number; } var sys: System; @@ -1630,6 +1824,7 @@ declare namespace ts { scanJsxToken(): SyntaxKind; scanJSDocToken(): SyntaxKind; scan(): SyntaxKind; + getText(): string; setText(text: string, start?: number, length?: number): void; setOnError(onError: ErrorCallback): void; setScriptTarget(scriptTarget: ScriptTarget): void; @@ -1643,6 +1838,8 @@ declare namespace ts { function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number; function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter; function isWhiteSpace(ch: number): boolean; + /** Does not include line breaks. For that, see isWhiteSpaceLike. */ + function isWhiteSpaceSingleLine(ch: number): boolean; function isLineBreak(ch: number): boolean; function couldStartTrivia(text: string, pos: number): boolean; function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; @@ -1688,22 +1885,44 @@ declare namespace ts { function createNode(kind: SyntaxKind, pos?: number, end?: number): Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T; function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile; + function isExternalModule(file: SourceFile): boolean; function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; } declare namespace ts { + /** The version of the TypeScript compiler release */ const version: string; function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean): string; function resolveTripleslashReference(moduleName: string, containingFile: string): string; + /** + * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. + * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups + * is assumed to be the same as root directory of the project. + */ + function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string, options: CompilerOptions, host: ModuleResolutionHost): ResolvedTypeReferenceDirectiveWithFailedLookupLocations; function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations; function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations; function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations; function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[]; + interface FormatDiagnosticsHost { + getCurrentDirectory(): string; + getCanonicalFileName(fileName: string): string; + getNewLine(): string; + } + function formatDiagnostics(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string; function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string; + /** + * Given a set of options, returns the set of type directive names + * that should be included for this program automatically. + * This list could either come from the config file, + * or from enumerating the types root + initial secondary types lookup location. + * More type directives might appear in the program later as a result of loading actual source files; + * this list is only the set of defaults that are implicitly included. + */ + function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[]; function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program): Program; } declare namespace ts { - function parseCommandLine(commandLine: string[], readFile?: (path: string) => string): ParsedCommandLine; /** * Read tsconfig.json file * @param fileName The path to the config file @@ -1733,6 +1952,10 @@ declare namespace ts { options: CompilerOptions; errors: Diagnostic[]; }; + function convertTypingOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): { + options: CompilerOptions; + errors: Diagnostic[]; + }; } declare namespace ts { /** The version of the language service API */ @@ -1742,7 +1965,7 @@ declare namespace ts { getChildCount(sourceFile?: SourceFile): number; getChildAt(index: number, sourceFile?: SourceFile): Node; getChildren(sourceFile?: SourceFile): Node[]; - getStart(sourceFile?: SourceFile): number; + getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number; getFullStart(): number; getEnd(): number; getWidth(sourceFile?: SourceFile): number; @@ -1770,6 +1993,7 @@ declare namespace ts { getStringIndexType(): Type; getNumberIndexType(): Type; getBaseTypes(): ObjectType[]; + getNonNullableType(): Type; } interface Signature { getDeclaration(): SignatureDeclaration; @@ -1801,7 +2025,7 @@ declare namespace ts { * change range cannot be determined. However, in that case, incremental parsing will * not happen and the entire document will be re - parsed. */ - getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange | undefined; /** Releases all resources held by this script snapshot */ dispose?(): void; } @@ -1810,6 +2034,7 @@ declare namespace ts { } interface PreProcessedFileInfo { referencedFiles: FileReference[]; + typeReferenceDirectives: FileReference[]; importedFiles: FileReference[]; ambientExternalModules: string[]; isLibFile: boolean; @@ -1824,7 +2049,7 @@ declare namespace ts { getScriptFileNames(): string[]; getScriptKind?(fileName: string): ScriptKind; getScriptVersion(fileName: string): string; - getScriptSnapshot(fileName: string): IScriptSnapshot; + getScriptSnapshot(fileName: string): IScriptSnapshot | undefined; getLocalizedDiagnosticMessages?(): any; getCancellationToken?(): HostCancellationToken; getCurrentDirectory(): string; @@ -1834,7 +2059,9 @@ declare namespace ts { error?(s: string): void; useCaseSensitiveFileNames?(): boolean; resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[]; + resolveTypeReferenceDirectives?(typeDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[]; directoryExists?(directoryName: string): boolean; + getDirectories?(directoryName: string): string[]; } interface LanguageService { cleanupSemanticCache(): void; @@ -1876,9 +2103,9 @@ declare namespace ts { getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion; + isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean; getEmitOutput(fileName: string): EmitOutput; getProgram(): Program; - getSourceFile(fileName: string): SourceFile; dispose(): void; } interface Classifications { @@ -1925,6 +2152,7 @@ declare namespace ts { textSpan: TextSpan; fileName: string; isWriteAccess: boolean; + isDefinition: boolean; } interface DocumentHighlights { fileName: string; @@ -1953,6 +2181,7 @@ declare namespace ts { containerKind: string; } interface EditorOptions { + BaseIndentSize?: number; IndentSize: number; TabSize: number; NewLineCharacter: string; @@ -1973,9 +2202,10 @@ declare namespace ts { InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean; InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean; + InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean; PlaceOpenBraceOnNewLineForFunctions: boolean; PlaceOpenBraceOnNewLineForControlBlocks: boolean; - [s: string]: boolean | number | string; + [s: string]: boolean | number | string | undefined; } interface DefinitionInfo { fileName: string; @@ -2192,6 +2422,7 @@ declare namespace ts { * in the registry and a new one was created. */ acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile; + acquireDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile; /** * Request an updated version of an already existing SourceFile with a given fileName * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile @@ -2205,6 +2436,8 @@ declare namespace ts { * @param version Current version of the file. */ updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile; + updateDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile; + getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey; /** * Informs the DocumentRegistry that a file is not needed any longer. * @@ -2215,31 +2448,65 @@ declare namespace ts { * @param compilationSettings The compilation settings used to acquire the file */ releaseDocument(fileName: string, compilationSettings: CompilerOptions): void; + releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey): void; reportStats(): string; } + type DocumentRegistryBucketKey = string & { + __bucketKey: any; + }; namespace ScriptElementKind { const unknown: string; const warning: string; + /** predefined type (void) or keyword (class) */ const keyword: string; + /** top level script node */ const scriptElement: string; + /** module foo {} */ const moduleElement: string; + /** class X {} */ const classElement: string; + /** var x = class X {} */ const localClassElement: string; + /** interface Y {} */ const interfaceElement: string; + /** type T = ... */ const typeElement: string; + /** enum E */ const enumElement: string; + const enumMemberElement: string; + /** + * Inside module and script only + * const v = .. + */ const variableElement: string; + /** Inside function */ const localVariableElement: string; + /** + * Inside module and script only + * function f() { } + */ const functionElement: string; + /** Inside function */ const localFunctionElement: string; + /** class X { [public|private]* foo() {} } */ const memberFunctionElement: string; + /** class X { [public|private]* [get|set] foo:number; } */ const memberGetAccessorElement: string; const memberSetAccessorElement: string; + /** + * class X { [public|private]* foo:number; } + * interface Y { foo:number; } + */ const memberVariableElement: string; + /** class X { constructor() { } } */ const constructorImplementationElement: string; + /** interface Y { ():number; } */ const callSignatureElement: string; + /** interface Y { []:number; } */ const indexSignatureElement: string; + /** interface Y { new():Y; } */ const constructSignatureElement: string; + /** function foo(*Y*: string) */ const parameterElement: string; const typeParameterElement: string; const primitiveType: string; @@ -2319,7 +2586,7 @@ declare namespace ts { fileName?: string; reportDiagnostics?: boolean; moduleName?: string; - renamedDependencies?: Map; + renamedDependencies?: MapLike; } interface TranspileOutput { outputText: string; diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index 8afac9de..f06229c2 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -161,190 +161,202 @@ var ts; SyntaxKind[SyntaxKind["IsKeyword"] = 124] = "IsKeyword"; SyntaxKind[SyntaxKind["ModuleKeyword"] = 125] = "ModuleKeyword"; SyntaxKind[SyntaxKind["NamespaceKeyword"] = 126] = "NamespaceKeyword"; - SyntaxKind[SyntaxKind["RequireKeyword"] = 127] = "RequireKeyword"; - SyntaxKind[SyntaxKind["NumberKeyword"] = 128] = "NumberKeyword"; - SyntaxKind[SyntaxKind["SetKeyword"] = 129] = "SetKeyword"; - SyntaxKind[SyntaxKind["StringKeyword"] = 130] = "StringKeyword"; - SyntaxKind[SyntaxKind["SymbolKeyword"] = 131] = "SymbolKeyword"; - SyntaxKind[SyntaxKind["TypeKeyword"] = 132] = "TypeKeyword"; - SyntaxKind[SyntaxKind["FromKeyword"] = 133] = "FromKeyword"; - SyntaxKind[SyntaxKind["GlobalKeyword"] = 134] = "GlobalKeyword"; - SyntaxKind[SyntaxKind["OfKeyword"] = 135] = "OfKeyword"; + SyntaxKind[SyntaxKind["NeverKeyword"] = 127] = "NeverKeyword"; + SyntaxKind[SyntaxKind["ReadonlyKeyword"] = 128] = "ReadonlyKeyword"; + SyntaxKind[SyntaxKind["RequireKeyword"] = 129] = "RequireKeyword"; + SyntaxKind[SyntaxKind["NumberKeyword"] = 130] = "NumberKeyword"; + SyntaxKind[SyntaxKind["SetKeyword"] = 131] = "SetKeyword"; + SyntaxKind[SyntaxKind["StringKeyword"] = 132] = "StringKeyword"; + SyntaxKind[SyntaxKind["SymbolKeyword"] = 133] = "SymbolKeyword"; + SyntaxKind[SyntaxKind["TypeKeyword"] = 134] = "TypeKeyword"; + SyntaxKind[SyntaxKind["UndefinedKeyword"] = 135] = "UndefinedKeyword"; + SyntaxKind[SyntaxKind["FromKeyword"] = 136] = "FromKeyword"; + SyntaxKind[SyntaxKind["GlobalKeyword"] = 137] = "GlobalKeyword"; + SyntaxKind[SyntaxKind["OfKeyword"] = 138] = "OfKeyword"; // Parse tree nodes // Names - SyntaxKind[SyntaxKind["QualifiedName"] = 136] = "QualifiedName"; - SyntaxKind[SyntaxKind["ComputedPropertyName"] = 137] = "ComputedPropertyName"; + SyntaxKind[SyntaxKind["QualifiedName"] = 139] = "QualifiedName"; + SyntaxKind[SyntaxKind["ComputedPropertyName"] = 140] = "ComputedPropertyName"; // Signature elements - SyntaxKind[SyntaxKind["TypeParameter"] = 138] = "TypeParameter"; - SyntaxKind[SyntaxKind["Parameter"] = 139] = "Parameter"; - SyntaxKind[SyntaxKind["Decorator"] = 140] = "Decorator"; + SyntaxKind[SyntaxKind["TypeParameter"] = 141] = "TypeParameter"; + SyntaxKind[SyntaxKind["Parameter"] = 142] = "Parameter"; + SyntaxKind[SyntaxKind["Decorator"] = 143] = "Decorator"; // TypeMember - SyntaxKind[SyntaxKind["PropertySignature"] = 141] = "PropertySignature"; - SyntaxKind[SyntaxKind["PropertyDeclaration"] = 142] = "PropertyDeclaration"; - SyntaxKind[SyntaxKind["MethodSignature"] = 143] = "MethodSignature"; - SyntaxKind[SyntaxKind["MethodDeclaration"] = 144] = "MethodDeclaration"; - SyntaxKind[SyntaxKind["Constructor"] = 145] = "Constructor"; - SyntaxKind[SyntaxKind["GetAccessor"] = 146] = "GetAccessor"; - SyntaxKind[SyntaxKind["SetAccessor"] = 147] = "SetAccessor"; - SyntaxKind[SyntaxKind["CallSignature"] = 148] = "CallSignature"; - SyntaxKind[SyntaxKind["ConstructSignature"] = 149] = "ConstructSignature"; - SyntaxKind[SyntaxKind["IndexSignature"] = 150] = "IndexSignature"; + SyntaxKind[SyntaxKind["PropertySignature"] = 144] = "PropertySignature"; + SyntaxKind[SyntaxKind["PropertyDeclaration"] = 145] = "PropertyDeclaration"; + SyntaxKind[SyntaxKind["MethodSignature"] = 146] = "MethodSignature"; + SyntaxKind[SyntaxKind["MethodDeclaration"] = 147] = "MethodDeclaration"; + SyntaxKind[SyntaxKind["Constructor"] = 148] = "Constructor"; + SyntaxKind[SyntaxKind["GetAccessor"] = 149] = "GetAccessor"; + SyntaxKind[SyntaxKind["SetAccessor"] = 150] = "SetAccessor"; + SyntaxKind[SyntaxKind["CallSignature"] = 151] = "CallSignature"; + SyntaxKind[SyntaxKind["ConstructSignature"] = 152] = "ConstructSignature"; + SyntaxKind[SyntaxKind["IndexSignature"] = 153] = "IndexSignature"; // Type - SyntaxKind[SyntaxKind["TypePredicate"] = 151] = "TypePredicate"; - SyntaxKind[SyntaxKind["TypeReference"] = 152] = "TypeReference"; - SyntaxKind[SyntaxKind["FunctionType"] = 153] = "FunctionType"; - SyntaxKind[SyntaxKind["ConstructorType"] = 154] = "ConstructorType"; - SyntaxKind[SyntaxKind["TypeQuery"] = 155] = "TypeQuery"; - SyntaxKind[SyntaxKind["TypeLiteral"] = 156] = "TypeLiteral"; - SyntaxKind[SyntaxKind["ArrayType"] = 157] = "ArrayType"; - SyntaxKind[SyntaxKind["TupleType"] = 158] = "TupleType"; - SyntaxKind[SyntaxKind["UnionType"] = 159] = "UnionType"; - SyntaxKind[SyntaxKind["IntersectionType"] = 160] = "IntersectionType"; - SyntaxKind[SyntaxKind["ParenthesizedType"] = 161] = "ParenthesizedType"; - SyntaxKind[SyntaxKind["ThisType"] = 162] = "ThisType"; - SyntaxKind[SyntaxKind["StringLiteralType"] = 163] = "StringLiteralType"; + SyntaxKind[SyntaxKind["TypePredicate"] = 154] = "TypePredicate"; + SyntaxKind[SyntaxKind["TypeReference"] = 155] = "TypeReference"; + SyntaxKind[SyntaxKind["FunctionType"] = 156] = "FunctionType"; + SyntaxKind[SyntaxKind["ConstructorType"] = 157] = "ConstructorType"; + SyntaxKind[SyntaxKind["TypeQuery"] = 158] = "TypeQuery"; + SyntaxKind[SyntaxKind["TypeLiteral"] = 159] = "TypeLiteral"; + SyntaxKind[SyntaxKind["ArrayType"] = 160] = "ArrayType"; + SyntaxKind[SyntaxKind["TupleType"] = 161] = "TupleType"; + SyntaxKind[SyntaxKind["UnionType"] = 162] = "UnionType"; + SyntaxKind[SyntaxKind["IntersectionType"] = 163] = "IntersectionType"; + SyntaxKind[SyntaxKind["ParenthesizedType"] = 164] = "ParenthesizedType"; + SyntaxKind[SyntaxKind["ThisType"] = 165] = "ThisType"; + SyntaxKind[SyntaxKind["LiteralType"] = 166] = "LiteralType"; // Binding patterns - SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 164] = "ObjectBindingPattern"; - SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 165] = "ArrayBindingPattern"; - SyntaxKind[SyntaxKind["BindingElement"] = 166] = "BindingElement"; + SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 167] = "ObjectBindingPattern"; + SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 168] = "ArrayBindingPattern"; + SyntaxKind[SyntaxKind["BindingElement"] = 169] = "BindingElement"; // Expression - SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 167] = "ArrayLiteralExpression"; - SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 168] = "ObjectLiteralExpression"; - SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 169] = "PropertyAccessExpression"; - SyntaxKind[SyntaxKind["ElementAccessExpression"] = 170] = "ElementAccessExpression"; - SyntaxKind[SyntaxKind["CallExpression"] = 171] = "CallExpression"; - SyntaxKind[SyntaxKind["NewExpression"] = 172] = "NewExpression"; - SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 173] = "TaggedTemplateExpression"; - SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 174] = "TypeAssertionExpression"; - SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 175] = "ParenthesizedExpression"; - SyntaxKind[SyntaxKind["FunctionExpression"] = 176] = "FunctionExpression"; - SyntaxKind[SyntaxKind["ArrowFunction"] = 177] = "ArrowFunction"; - SyntaxKind[SyntaxKind["DeleteExpression"] = 178] = "DeleteExpression"; - SyntaxKind[SyntaxKind["TypeOfExpression"] = 179] = "TypeOfExpression"; - SyntaxKind[SyntaxKind["VoidExpression"] = 180] = "VoidExpression"; - SyntaxKind[SyntaxKind["AwaitExpression"] = 181] = "AwaitExpression"; - SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 182] = "PrefixUnaryExpression"; - SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 183] = "PostfixUnaryExpression"; - SyntaxKind[SyntaxKind["BinaryExpression"] = 184] = "BinaryExpression"; - SyntaxKind[SyntaxKind["ConditionalExpression"] = 185] = "ConditionalExpression"; - SyntaxKind[SyntaxKind["TemplateExpression"] = 186] = "TemplateExpression"; - SyntaxKind[SyntaxKind["YieldExpression"] = 187] = "YieldExpression"; - SyntaxKind[SyntaxKind["SpreadElementExpression"] = 188] = "SpreadElementExpression"; - SyntaxKind[SyntaxKind["ClassExpression"] = 189] = "ClassExpression"; - SyntaxKind[SyntaxKind["OmittedExpression"] = 190] = "OmittedExpression"; - SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 191] = "ExpressionWithTypeArguments"; - SyntaxKind[SyntaxKind["AsExpression"] = 192] = "AsExpression"; + SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 170] = "ArrayLiteralExpression"; + SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 171] = "ObjectLiteralExpression"; + SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 172] = "PropertyAccessExpression"; + SyntaxKind[SyntaxKind["ElementAccessExpression"] = 173] = "ElementAccessExpression"; + SyntaxKind[SyntaxKind["CallExpression"] = 174] = "CallExpression"; + SyntaxKind[SyntaxKind["NewExpression"] = 175] = "NewExpression"; + SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 176] = "TaggedTemplateExpression"; + SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 177] = "TypeAssertionExpression"; + SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 178] = "ParenthesizedExpression"; + SyntaxKind[SyntaxKind["FunctionExpression"] = 179] = "FunctionExpression"; + SyntaxKind[SyntaxKind["ArrowFunction"] = 180] = "ArrowFunction"; + SyntaxKind[SyntaxKind["DeleteExpression"] = 181] = "DeleteExpression"; + SyntaxKind[SyntaxKind["TypeOfExpression"] = 182] = "TypeOfExpression"; + SyntaxKind[SyntaxKind["VoidExpression"] = 183] = "VoidExpression"; + SyntaxKind[SyntaxKind["AwaitExpression"] = 184] = "AwaitExpression"; + SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 185] = "PrefixUnaryExpression"; + SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 186] = "PostfixUnaryExpression"; + SyntaxKind[SyntaxKind["BinaryExpression"] = 187] = "BinaryExpression"; + SyntaxKind[SyntaxKind["ConditionalExpression"] = 188] = "ConditionalExpression"; + SyntaxKind[SyntaxKind["TemplateExpression"] = 189] = "TemplateExpression"; + SyntaxKind[SyntaxKind["YieldExpression"] = 190] = "YieldExpression"; + SyntaxKind[SyntaxKind["SpreadElementExpression"] = 191] = "SpreadElementExpression"; + SyntaxKind[SyntaxKind["ClassExpression"] = 192] = "ClassExpression"; + SyntaxKind[SyntaxKind["OmittedExpression"] = 193] = "OmittedExpression"; + SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 194] = "ExpressionWithTypeArguments"; + SyntaxKind[SyntaxKind["AsExpression"] = 195] = "AsExpression"; + SyntaxKind[SyntaxKind["NonNullExpression"] = 196] = "NonNullExpression"; // Misc - SyntaxKind[SyntaxKind["TemplateSpan"] = 193] = "TemplateSpan"; - SyntaxKind[SyntaxKind["SemicolonClassElement"] = 194] = "SemicolonClassElement"; + SyntaxKind[SyntaxKind["TemplateSpan"] = 197] = "TemplateSpan"; + SyntaxKind[SyntaxKind["SemicolonClassElement"] = 198] = "SemicolonClassElement"; // Element - SyntaxKind[SyntaxKind["Block"] = 195] = "Block"; - SyntaxKind[SyntaxKind["VariableStatement"] = 196] = "VariableStatement"; - SyntaxKind[SyntaxKind["EmptyStatement"] = 197] = "EmptyStatement"; - SyntaxKind[SyntaxKind["ExpressionStatement"] = 198] = "ExpressionStatement"; - SyntaxKind[SyntaxKind["IfStatement"] = 199] = "IfStatement"; - SyntaxKind[SyntaxKind["DoStatement"] = 200] = "DoStatement"; - SyntaxKind[SyntaxKind["WhileStatement"] = 201] = "WhileStatement"; - SyntaxKind[SyntaxKind["ForStatement"] = 202] = "ForStatement"; - SyntaxKind[SyntaxKind["ForInStatement"] = 203] = "ForInStatement"; - SyntaxKind[SyntaxKind["ForOfStatement"] = 204] = "ForOfStatement"; - SyntaxKind[SyntaxKind["ContinueStatement"] = 205] = "ContinueStatement"; - SyntaxKind[SyntaxKind["BreakStatement"] = 206] = "BreakStatement"; - SyntaxKind[SyntaxKind["ReturnStatement"] = 207] = "ReturnStatement"; - SyntaxKind[SyntaxKind["WithStatement"] = 208] = "WithStatement"; - SyntaxKind[SyntaxKind["SwitchStatement"] = 209] = "SwitchStatement"; - SyntaxKind[SyntaxKind["LabeledStatement"] = 210] = "LabeledStatement"; - SyntaxKind[SyntaxKind["ThrowStatement"] = 211] = "ThrowStatement"; - SyntaxKind[SyntaxKind["TryStatement"] = 212] = "TryStatement"; - SyntaxKind[SyntaxKind["DebuggerStatement"] = 213] = "DebuggerStatement"; - SyntaxKind[SyntaxKind["VariableDeclaration"] = 214] = "VariableDeclaration"; - SyntaxKind[SyntaxKind["VariableDeclarationList"] = 215] = "VariableDeclarationList"; - SyntaxKind[SyntaxKind["FunctionDeclaration"] = 216] = "FunctionDeclaration"; - SyntaxKind[SyntaxKind["ClassDeclaration"] = 217] = "ClassDeclaration"; - SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 218] = "InterfaceDeclaration"; - SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 219] = "TypeAliasDeclaration"; - SyntaxKind[SyntaxKind["EnumDeclaration"] = 220] = "EnumDeclaration"; - SyntaxKind[SyntaxKind["ModuleDeclaration"] = 221] = "ModuleDeclaration"; - SyntaxKind[SyntaxKind["ModuleBlock"] = 222] = "ModuleBlock"; - SyntaxKind[SyntaxKind["CaseBlock"] = 223] = "CaseBlock"; - SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 224] = "ImportEqualsDeclaration"; - SyntaxKind[SyntaxKind["ImportDeclaration"] = 225] = "ImportDeclaration"; - SyntaxKind[SyntaxKind["ImportClause"] = 226] = "ImportClause"; - SyntaxKind[SyntaxKind["NamespaceImport"] = 227] = "NamespaceImport"; - SyntaxKind[SyntaxKind["NamedImports"] = 228] = "NamedImports"; - SyntaxKind[SyntaxKind["ImportSpecifier"] = 229] = "ImportSpecifier"; - SyntaxKind[SyntaxKind["ExportAssignment"] = 230] = "ExportAssignment"; - SyntaxKind[SyntaxKind["ExportDeclaration"] = 231] = "ExportDeclaration"; - SyntaxKind[SyntaxKind["NamedExports"] = 232] = "NamedExports"; - SyntaxKind[SyntaxKind["ExportSpecifier"] = 233] = "ExportSpecifier"; - SyntaxKind[SyntaxKind["MissingDeclaration"] = 234] = "MissingDeclaration"; + SyntaxKind[SyntaxKind["Block"] = 199] = "Block"; + SyntaxKind[SyntaxKind["VariableStatement"] = 200] = "VariableStatement"; + SyntaxKind[SyntaxKind["EmptyStatement"] = 201] = "EmptyStatement"; + SyntaxKind[SyntaxKind["ExpressionStatement"] = 202] = "ExpressionStatement"; + SyntaxKind[SyntaxKind["IfStatement"] = 203] = "IfStatement"; + SyntaxKind[SyntaxKind["DoStatement"] = 204] = "DoStatement"; + SyntaxKind[SyntaxKind["WhileStatement"] = 205] = "WhileStatement"; + SyntaxKind[SyntaxKind["ForStatement"] = 206] = "ForStatement"; + SyntaxKind[SyntaxKind["ForInStatement"] = 207] = "ForInStatement"; + SyntaxKind[SyntaxKind["ForOfStatement"] = 208] = "ForOfStatement"; + SyntaxKind[SyntaxKind["ContinueStatement"] = 209] = "ContinueStatement"; + SyntaxKind[SyntaxKind["BreakStatement"] = 210] = "BreakStatement"; + SyntaxKind[SyntaxKind["ReturnStatement"] = 211] = "ReturnStatement"; + SyntaxKind[SyntaxKind["WithStatement"] = 212] = "WithStatement"; + SyntaxKind[SyntaxKind["SwitchStatement"] = 213] = "SwitchStatement"; + SyntaxKind[SyntaxKind["LabeledStatement"] = 214] = "LabeledStatement"; + SyntaxKind[SyntaxKind["ThrowStatement"] = 215] = "ThrowStatement"; + SyntaxKind[SyntaxKind["TryStatement"] = 216] = "TryStatement"; + SyntaxKind[SyntaxKind["DebuggerStatement"] = 217] = "DebuggerStatement"; + SyntaxKind[SyntaxKind["VariableDeclaration"] = 218] = "VariableDeclaration"; + SyntaxKind[SyntaxKind["VariableDeclarationList"] = 219] = "VariableDeclarationList"; + SyntaxKind[SyntaxKind["FunctionDeclaration"] = 220] = "FunctionDeclaration"; + SyntaxKind[SyntaxKind["ClassDeclaration"] = 221] = "ClassDeclaration"; + SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 222] = "InterfaceDeclaration"; + SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 223] = "TypeAliasDeclaration"; + SyntaxKind[SyntaxKind["EnumDeclaration"] = 224] = "EnumDeclaration"; + SyntaxKind[SyntaxKind["ModuleDeclaration"] = 225] = "ModuleDeclaration"; + SyntaxKind[SyntaxKind["ModuleBlock"] = 226] = "ModuleBlock"; + SyntaxKind[SyntaxKind["CaseBlock"] = 227] = "CaseBlock"; + SyntaxKind[SyntaxKind["NamespaceExportDeclaration"] = 228] = "NamespaceExportDeclaration"; + SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 229] = "ImportEqualsDeclaration"; + SyntaxKind[SyntaxKind["ImportDeclaration"] = 230] = "ImportDeclaration"; + SyntaxKind[SyntaxKind["ImportClause"] = 231] = "ImportClause"; + SyntaxKind[SyntaxKind["NamespaceImport"] = 232] = "NamespaceImport"; + SyntaxKind[SyntaxKind["NamedImports"] = 233] = "NamedImports"; + SyntaxKind[SyntaxKind["ImportSpecifier"] = 234] = "ImportSpecifier"; + SyntaxKind[SyntaxKind["ExportAssignment"] = 235] = "ExportAssignment"; + SyntaxKind[SyntaxKind["ExportDeclaration"] = 236] = "ExportDeclaration"; + SyntaxKind[SyntaxKind["NamedExports"] = 237] = "NamedExports"; + SyntaxKind[SyntaxKind["ExportSpecifier"] = 238] = "ExportSpecifier"; + SyntaxKind[SyntaxKind["MissingDeclaration"] = 239] = "MissingDeclaration"; // Module references - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 235] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 240] = "ExternalModuleReference"; // JSX - SyntaxKind[SyntaxKind["JsxElement"] = 236] = "JsxElement"; - SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 237] = "JsxSelfClosingElement"; - SyntaxKind[SyntaxKind["JsxOpeningElement"] = 238] = "JsxOpeningElement"; - SyntaxKind[SyntaxKind["JsxText"] = 239] = "JsxText"; - SyntaxKind[SyntaxKind["JsxClosingElement"] = 240] = "JsxClosingElement"; - SyntaxKind[SyntaxKind["JsxAttribute"] = 241] = "JsxAttribute"; - SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 242] = "JsxSpreadAttribute"; - SyntaxKind[SyntaxKind["JsxExpression"] = 243] = "JsxExpression"; + SyntaxKind[SyntaxKind["JsxElement"] = 241] = "JsxElement"; + SyntaxKind[SyntaxKind["JsxSelfClosingElement"] = 242] = "JsxSelfClosingElement"; + SyntaxKind[SyntaxKind["JsxOpeningElement"] = 243] = "JsxOpeningElement"; + SyntaxKind[SyntaxKind["JsxText"] = 244] = "JsxText"; + SyntaxKind[SyntaxKind["JsxClosingElement"] = 245] = "JsxClosingElement"; + SyntaxKind[SyntaxKind["JsxAttribute"] = 246] = "JsxAttribute"; + SyntaxKind[SyntaxKind["JsxSpreadAttribute"] = 247] = "JsxSpreadAttribute"; + SyntaxKind[SyntaxKind["JsxExpression"] = 248] = "JsxExpression"; // Clauses - SyntaxKind[SyntaxKind["CaseClause"] = 244] = "CaseClause"; - SyntaxKind[SyntaxKind["DefaultClause"] = 245] = "DefaultClause"; - SyntaxKind[SyntaxKind["HeritageClause"] = 246] = "HeritageClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 247] = "CatchClause"; + SyntaxKind[SyntaxKind["CaseClause"] = 249] = "CaseClause"; + SyntaxKind[SyntaxKind["DefaultClause"] = 250] = "DefaultClause"; + SyntaxKind[SyntaxKind["HeritageClause"] = 251] = "HeritageClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 252] = "CatchClause"; // Property assignments - SyntaxKind[SyntaxKind["PropertyAssignment"] = 248] = "PropertyAssignment"; - SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 249] = "ShorthandPropertyAssignment"; + SyntaxKind[SyntaxKind["PropertyAssignment"] = 253] = "PropertyAssignment"; + SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 254] = "ShorthandPropertyAssignment"; // Enum - SyntaxKind[SyntaxKind["EnumMember"] = 250] = "EnumMember"; + SyntaxKind[SyntaxKind["EnumMember"] = 255] = "EnumMember"; // Top-level nodes - SyntaxKind[SyntaxKind["SourceFile"] = 251] = "SourceFile"; + SyntaxKind[SyntaxKind["SourceFile"] = 256] = "SourceFile"; // JSDoc nodes - SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 252] = "JSDocTypeExpression"; + SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 257] = "JSDocTypeExpression"; // The * type - SyntaxKind[SyntaxKind["JSDocAllType"] = 253] = "JSDocAllType"; + SyntaxKind[SyntaxKind["JSDocAllType"] = 258] = "JSDocAllType"; // The ? type - SyntaxKind[SyntaxKind["JSDocUnknownType"] = 254] = "JSDocUnknownType"; - SyntaxKind[SyntaxKind["JSDocArrayType"] = 255] = "JSDocArrayType"; - SyntaxKind[SyntaxKind["JSDocUnionType"] = 256] = "JSDocUnionType"; - SyntaxKind[SyntaxKind["JSDocTupleType"] = 257] = "JSDocTupleType"; - SyntaxKind[SyntaxKind["JSDocNullableType"] = 258] = "JSDocNullableType"; - SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 259] = "JSDocNonNullableType"; - SyntaxKind[SyntaxKind["JSDocRecordType"] = 260] = "JSDocRecordType"; - SyntaxKind[SyntaxKind["JSDocRecordMember"] = 261] = "JSDocRecordMember"; - SyntaxKind[SyntaxKind["JSDocTypeReference"] = 262] = "JSDocTypeReference"; - SyntaxKind[SyntaxKind["JSDocOptionalType"] = 263] = "JSDocOptionalType"; - SyntaxKind[SyntaxKind["JSDocFunctionType"] = 264] = "JSDocFunctionType"; - SyntaxKind[SyntaxKind["JSDocVariadicType"] = 265] = "JSDocVariadicType"; - SyntaxKind[SyntaxKind["JSDocConstructorType"] = 266] = "JSDocConstructorType"; - SyntaxKind[SyntaxKind["JSDocThisType"] = 267] = "JSDocThisType"; - SyntaxKind[SyntaxKind["JSDocComment"] = 268] = "JSDocComment"; - SyntaxKind[SyntaxKind["JSDocTag"] = 269] = "JSDocTag"; - SyntaxKind[SyntaxKind["JSDocParameterTag"] = 270] = "JSDocParameterTag"; - SyntaxKind[SyntaxKind["JSDocReturnTag"] = 271] = "JSDocReturnTag"; - SyntaxKind[SyntaxKind["JSDocTypeTag"] = 272] = "JSDocTypeTag"; - SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 273] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocUnknownType"] = 259] = "JSDocUnknownType"; + SyntaxKind[SyntaxKind["JSDocArrayType"] = 260] = "JSDocArrayType"; + SyntaxKind[SyntaxKind["JSDocUnionType"] = 261] = "JSDocUnionType"; + SyntaxKind[SyntaxKind["JSDocTupleType"] = 262] = "JSDocTupleType"; + SyntaxKind[SyntaxKind["JSDocNullableType"] = 263] = "JSDocNullableType"; + SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 264] = "JSDocNonNullableType"; + SyntaxKind[SyntaxKind["JSDocRecordType"] = 265] = "JSDocRecordType"; + SyntaxKind[SyntaxKind["JSDocRecordMember"] = 266] = "JSDocRecordMember"; + SyntaxKind[SyntaxKind["JSDocTypeReference"] = 267] = "JSDocTypeReference"; + SyntaxKind[SyntaxKind["JSDocOptionalType"] = 268] = "JSDocOptionalType"; + SyntaxKind[SyntaxKind["JSDocFunctionType"] = 269] = "JSDocFunctionType"; + SyntaxKind[SyntaxKind["JSDocVariadicType"] = 270] = "JSDocVariadicType"; + SyntaxKind[SyntaxKind["JSDocConstructorType"] = 271] = "JSDocConstructorType"; + SyntaxKind[SyntaxKind["JSDocThisType"] = 272] = "JSDocThisType"; + SyntaxKind[SyntaxKind["JSDocComment"] = 273] = "JSDocComment"; + SyntaxKind[SyntaxKind["JSDocTag"] = 274] = "JSDocTag"; + SyntaxKind[SyntaxKind["JSDocParameterTag"] = 275] = "JSDocParameterTag"; + SyntaxKind[SyntaxKind["JSDocReturnTag"] = 276] = "JSDocReturnTag"; + SyntaxKind[SyntaxKind["JSDocTypeTag"] = 277] = "JSDocTypeTag"; + SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 278] = "JSDocTemplateTag"; + SyntaxKind[SyntaxKind["JSDocTypedefTag"] = 279] = "JSDocTypedefTag"; + SyntaxKind[SyntaxKind["JSDocPropertyTag"] = 280] = "JSDocPropertyTag"; + SyntaxKind[SyntaxKind["JSDocTypeLiteral"] = 281] = "JSDocTypeLiteral"; + SyntaxKind[SyntaxKind["JSDocLiteralType"] = 282] = "JSDocLiteralType"; + SyntaxKind[SyntaxKind["JSDocNullKeyword"] = 283] = "JSDocNullKeyword"; + SyntaxKind[SyntaxKind["JSDocUndefinedKeyword"] = 284] = "JSDocUndefinedKeyword"; + SyntaxKind[SyntaxKind["JSDocNeverKeyword"] = 285] = "JSDocNeverKeyword"; // Synthesized list - SyntaxKind[SyntaxKind["SyntaxList"] = 274] = "SyntaxList"; + SyntaxKind[SyntaxKind["SyntaxList"] = 286] = "SyntaxList"; // Enum value count - SyntaxKind[SyntaxKind["Count"] = 275] = "Count"; + SyntaxKind[SyntaxKind["Count"] = 287] = "Count"; // Markers SyntaxKind[SyntaxKind["FirstAssignment"] = 56] = "FirstAssignment"; SyntaxKind[SyntaxKind["LastAssignment"] = 68] = "LastAssignment"; SyntaxKind[SyntaxKind["FirstReservedWord"] = 70] = "FirstReservedWord"; SyntaxKind[SyntaxKind["LastReservedWord"] = 105] = "LastReservedWord"; SyntaxKind[SyntaxKind["FirstKeyword"] = 70] = "FirstKeyword"; - SyntaxKind[SyntaxKind["LastKeyword"] = 135] = "LastKeyword"; + SyntaxKind[SyntaxKind["LastKeyword"] = 138] = "LastKeyword"; SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 106] = "FirstFutureReservedWord"; SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 114] = "LastFutureReservedWord"; - SyntaxKind[SyntaxKind["FirstTypeNode"] = 151] = "FirstTypeNode"; - SyntaxKind[SyntaxKind["LastTypeNode"] = 163] = "LastTypeNode"; + SyntaxKind[SyntaxKind["FirstTypeNode"] = 154] = "FirstTypeNode"; + SyntaxKind[SyntaxKind["LastTypeNode"] = 166] = "LastTypeNode"; SyntaxKind[SyntaxKind["FirstPunctuation"] = 15] = "FirstPunctuation"; SyntaxKind[SyntaxKind["LastPunctuation"] = 68] = "LastPunctuation"; SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken"; - SyntaxKind[SyntaxKind["LastToken"] = 135] = "LastToken"; + SyntaxKind[SyntaxKind["LastToken"] = 138] = "LastToken"; SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken"; SyntaxKind[SyntaxKind["LastTriviaToken"] = 7] = "LastTriviaToken"; SyntaxKind[SyntaxKind["FirstLiteralToken"] = 8] = "FirstLiteralToken"; @@ -353,86 +365,66 @@ var ts; SyntaxKind[SyntaxKind["LastTemplateToken"] = 14] = "LastTemplateToken"; SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 25] = "FirstBinaryOperator"; SyntaxKind[SyntaxKind["LastBinaryOperator"] = 68] = "LastBinaryOperator"; - SyntaxKind[SyntaxKind["FirstNode"] = 136] = "FirstNode"; + SyntaxKind[SyntaxKind["FirstNode"] = 139] = "FirstNode"; + SyntaxKind[SyntaxKind["FirstJSDocNode"] = 257] = "FirstJSDocNode"; + SyntaxKind[SyntaxKind["LastJSDocNode"] = 282] = "LastJSDocNode"; + SyntaxKind[SyntaxKind["FirstJSDocTagNode"] = 273] = "FirstJSDocTagNode"; + SyntaxKind[SyntaxKind["LastJSDocTagNode"] = 285] = "LastJSDocTagNode"; })(ts.SyntaxKind || (ts.SyntaxKind = {})); var SyntaxKind = ts.SyntaxKind; (function (NodeFlags) { NodeFlags[NodeFlags["None"] = 0] = "None"; - NodeFlags[NodeFlags["Export"] = 2] = "Export"; - NodeFlags[NodeFlags["Ambient"] = 4] = "Ambient"; - NodeFlags[NodeFlags["Public"] = 8] = "Public"; - NodeFlags[NodeFlags["Private"] = 16] = "Private"; - NodeFlags[NodeFlags["Protected"] = 32] = "Protected"; - NodeFlags[NodeFlags["Static"] = 64] = "Static"; + NodeFlags[NodeFlags["Export"] = 1] = "Export"; + NodeFlags[NodeFlags["Ambient"] = 2] = "Ambient"; + NodeFlags[NodeFlags["Public"] = 4] = "Public"; + NodeFlags[NodeFlags["Private"] = 8] = "Private"; + NodeFlags[NodeFlags["Protected"] = 16] = "Protected"; + NodeFlags[NodeFlags["Static"] = 32] = "Static"; + NodeFlags[NodeFlags["Readonly"] = 64] = "Readonly"; NodeFlags[NodeFlags["Abstract"] = 128] = "Abstract"; NodeFlags[NodeFlags["Async"] = 256] = "Async"; NodeFlags[NodeFlags["Default"] = 512] = "Default"; - NodeFlags[NodeFlags["MultiLine"] = 1024] = "MultiLine"; - NodeFlags[NodeFlags["Synthetic"] = 2048] = "Synthetic"; - NodeFlags[NodeFlags["DeclarationFile"] = 4096] = "DeclarationFile"; - NodeFlags[NodeFlags["Let"] = 8192] = "Let"; - NodeFlags[NodeFlags["Const"] = 16384] = "Const"; - NodeFlags[NodeFlags["OctalLiteral"] = 32768] = "OctalLiteral"; - NodeFlags[NodeFlags["Namespace"] = 65536] = "Namespace"; - NodeFlags[NodeFlags["ExportContext"] = 131072] = "ExportContext"; - NodeFlags[NodeFlags["ContainsThis"] = 262144] = "ContainsThis"; - NodeFlags[NodeFlags["HasImplicitReturn"] = 524288] = "HasImplicitReturn"; - NodeFlags[NodeFlags["HasExplicitReturn"] = 1048576] = "HasExplicitReturn"; - NodeFlags[NodeFlags["GlobalAugmentation"] = 2097152] = "GlobalAugmentation"; - NodeFlags[NodeFlags["HasClassExtends"] = 4194304] = "HasClassExtends"; - NodeFlags[NodeFlags["HasDecorators"] = 8388608] = "HasDecorators"; - NodeFlags[NodeFlags["HasParamDecorators"] = 16777216] = "HasParamDecorators"; - NodeFlags[NodeFlags["HasAsyncFunctions"] = 33554432] = "HasAsyncFunctions"; - // This was picked out from the 'master' branch. - // To keep the flags consistent, we're skipping a few ahead. + NodeFlags[NodeFlags["Let"] = 1024] = "Let"; + NodeFlags[NodeFlags["Const"] = 2048] = "Const"; + NodeFlags[NodeFlags["Namespace"] = 4096] = "Namespace"; + NodeFlags[NodeFlags["ExportContext"] = 8192] = "ExportContext"; + NodeFlags[NodeFlags["ContainsThis"] = 16384] = "ContainsThis"; + NodeFlags[NodeFlags["HasImplicitReturn"] = 32768] = "HasImplicitReturn"; + NodeFlags[NodeFlags["HasExplicitReturn"] = 65536] = "HasExplicitReturn"; + NodeFlags[NodeFlags["GlobalAugmentation"] = 131072] = "GlobalAugmentation"; + NodeFlags[NodeFlags["HasClassExtends"] = 262144] = "HasClassExtends"; + NodeFlags[NodeFlags["HasDecorators"] = 524288] = "HasDecorators"; + NodeFlags[NodeFlags["HasParamDecorators"] = 1048576] = "HasParamDecorators"; + NodeFlags[NodeFlags["HasAsyncFunctions"] = 2097152] = "HasAsyncFunctions"; + NodeFlags[NodeFlags["DisallowInContext"] = 4194304] = "DisallowInContext"; + NodeFlags[NodeFlags["YieldContext"] = 8388608] = "YieldContext"; + NodeFlags[NodeFlags["DecoratorContext"] = 16777216] = "DecoratorContext"; + NodeFlags[NodeFlags["AwaitContext"] = 33554432] = "AwaitContext"; + NodeFlags[NodeFlags["ThisNodeHasError"] = 67108864] = "ThisNodeHasError"; + NodeFlags[NodeFlags["JavaScriptFile"] = 134217728] = "JavaScriptFile"; + NodeFlags[NodeFlags["ThisNodeOrAnySubNodesHasError"] = 268435456] = "ThisNodeOrAnySubNodesHasError"; + NodeFlags[NodeFlags["HasAggregatedChildData"] = 536870912] = "HasAggregatedChildData"; NodeFlags[NodeFlags["HasJsxSpreadAttribute"] = 1073741824] = "HasJsxSpreadAttribute"; - NodeFlags[NodeFlags["Modifier"] = 1022] = "Modifier"; - NodeFlags[NodeFlags["AccessibilityModifier"] = 56] = "AccessibilityModifier"; - NodeFlags[NodeFlags["BlockScoped"] = 24576] = "BlockScoped"; - NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 1572864] = "ReachabilityCheckFlags"; - NodeFlags[NodeFlags["EmitHelperFlags"] = 62914560] = "EmitHelperFlags"; + NodeFlags[NodeFlags["Modifier"] = 1023] = "Modifier"; + NodeFlags[NodeFlags["AccessibilityModifier"] = 28] = "AccessibilityModifier"; + // Accessibility modifiers and 'readonly' can be attached to a parameter in a constructor to make it a property. + NodeFlags[NodeFlags["ParameterPropertyModifier"] = 92] = "ParameterPropertyModifier"; + NodeFlags[NodeFlags["BlockScoped"] = 3072] = "BlockScoped"; + NodeFlags[NodeFlags["ReachabilityCheckFlags"] = 98304] = "ReachabilityCheckFlags"; + NodeFlags[NodeFlags["EmitHelperFlags"] = 3932160] = "EmitHelperFlags"; + NodeFlags[NodeFlags["ReachabilityAndEmitFlags"] = 4030464] = "ReachabilityAndEmitFlags"; + // Parsing context flags + NodeFlags[NodeFlags["ContextFlags"] = 197132288] = "ContextFlags"; + // Exclude these flags when parsing a Type + NodeFlags[NodeFlags["TypeExcludesFlags"] = 41943040] = "TypeExcludesFlags"; })(ts.NodeFlags || (ts.NodeFlags = {})); var NodeFlags = ts.NodeFlags; - /* @internal */ - (function (ParserContextFlags) { - ParserContextFlags[ParserContextFlags["None"] = 0] = "None"; - // If this node was parsed in a context where 'in-expressions' are not allowed. - ParserContextFlags[ParserContextFlags["DisallowIn"] = 1] = "DisallowIn"; - // If this node was parsed in the 'yield' context created when parsing a generator. - ParserContextFlags[ParserContextFlags["Yield"] = 2] = "Yield"; - // If this node was parsed as part of a decorator - ParserContextFlags[ParserContextFlags["Decorator"] = 4] = "Decorator"; - // If this node was parsed in the 'await' context created when parsing an async function. - ParserContextFlags[ParserContextFlags["Await"] = 8] = "Await"; - // If the parser encountered an error when parsing the code that created this node. Note - // the parser only sets this directly on the node it creates right after encountering the - // error. - ParserContextFlags[ParserContextFlags["ThisNodeHasError"] = 16] = "ThisNodeHasError"; - // This node was parsed in a JavaScript file and can be processed differently. For example - // its type can be specified usign a JSDoc comment. - ParserContextFlags[ParserContextFlags["JavaScriptFile"] = 32] = "JavaScriptFile"; - // Context flags set directly by the parser. - ParserContextFlags[ParserContextFlags["ParserGeneratedFlags"] = 63] = "ParserGeneratedFlags"; - // Exclude these flags when parsing a Type - ParserContextFlags[ParserContextFlags["TypeExcludesFlags"] = 10] = "TypeExcludesFlags"; - // Context flags computed by aggregating child flags upwards. - // Used during incremental parsing to determine if this node or any of its children had an - // error. Computed only once and then cached. - ParserContextFlags[ParserContextFlags["ThisNodeOrAnySubNodesHasError"] = 64] = "ThisNodeOrAnySubNodesHasError"; - // Used to know if we've computed data from children and cached it in this node. - ParserContextFlags[ParserContextFlags["HasAggregatedChildData"] = 128] = "HasAggregatedChildData"; - })(ts.ParserContextFlags || (ts.ParserContextFlags = {})); - var ParserContextFlags = ts.ParserContextFlags; (function (JsxFlags) { JsxFlags[JsxFlags["None"] = 0] = "None"; /** An element from a named property of the JSX.IntrinsicElements interface */ JsxFlags[JsxFlags["IntrinsicNamedElement"] = 1] = "IntrinsicNamedElement"; /** An element inferred from the string index signature of the JSX.IntrinsicElements interface */ JsxFlags[JsxFlags["IntrinsicIndexedElement"] = 2] = "IntrinsicIndexedElement"; - /** An element backed by a class, class-like, or function value */ - JsxFlags[JsxFlags["ValueElement"] = 4] = "ValueElement"; - /** Element resolution failed */ - JsxFlags[JsxFlags["UnknownElement"] = 16] = "UnknownElement"; JsxFlags[JsxFlags["IntrinsicElement"] = 3] = "IntrinsicElement"; })(ts.JsxFlags || (ts.JsxFlags = {})); var JsxFlags = ts.JsxFlags; @@ -443,6 +435,21 @@ var ts; RelationComparisonResult[RelationComparisonResult["FailedAndReported"] = 3] = "FailedAndReported"; })(ts.RelationComparisonResult || (ts.RelationComparisonResult = {})); var RelationComparisonResult = ts.RelationComparisonResult; + (function (FlowFlags) { + FlowFlags[FlowFlags["Unreachable"] = 1] = "Unreachable"; + FlowFlags[FlowFlags["Start"] = 2] = "Start"; + FlowFlags[FlowFlags["BranchLabel"] = 4] = "BranchLabel"; + FlowFlags[FlowFlags["LoopLabel"] = 8] = "LoopLabel"; + FlowFlags[FlowFlags["Assignment"] = 16] = "Assignment"; + FlowFlags[FlowFlags["TrueCondition"] = 32] = "TrueCondition"; + FlowFlags[FlowFlags["FalseCondition"] = 64] = "FalseCondition"; + FlowFlags[FlowFlags["SwitchClause"] = 128] = "SwitchClause"; + FlowFlags[FlowFlags["Referenced"] = 256] = "Referenced"; + FlowFlags[FlowFlags["Shared"] = 512] = "Shared"; + FlowFlags[FlowFlags["Label"] = 12] = "Label"; + FlowFlags[FlowFlags["Condition"] = 96] = "Condition"; + })(ts.FlowFlags || (ts.FlowFlags = {})); + var FlowFlags = ts.FlowFlags; var OperationCanceledException = (function () { function OperationCanceledException() { } @@ -471,6 +478,9 @@ var ts; TypeFormatFlags[TypeFormatFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature"; TypeFormatFlags[TypeFormatFlags["InElementType"] = 64] = "InElementType"; TypeFormatFlags[TypeFormatFlags["UseFullyQualifiedType"] = 128] = "UseFullyQualifiedType"; + TypeFormatFlags[TypeFormatFlags["InFirstTypeArgument"] = 256] = "InFirstTypeArgument"; + TypeFormatFlags[TypeFormatFlags["InTypeAlias"] = 512] = "InTypeAlias"; + TypeFormatFlags[TypeFormatFlags["UseTypeAliasValue"] = 1024] = "UseTypeAliasValue"; })(ts.TypeFormatFlags || (ts.TypeFormatFlags = {})); var TypeFormatFlags = ts.TypeFormatFlags; (function (SymbolFormatFlags) { @@ -555,8 +565,8 @@ var ts; SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum"; SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable"; SymbolFlags[SymbolFlags["Value"] = 107455] = "Value"; - SymbolFlags[SymbolFlags["Type"] = 793056] = "Type"; - SymbolFlags[SymbolFlags["Namespace"] = 1536] = "Namespace"; + SymbolFlags[SymbolFlags["Type"] = 793064] = "Type"; + SymbolFlags[SymbolFlags["Namespace"] = 1920] = "Namespace"; SymbolFlags[SymbolFlags["Module"] = 1536] = "Module"; SymbolFlags[SymbolFlags["Accessor"] = 98304] = "Accessor"; // Variables can be redeclared, but can not redeclare a block-scoped declaration with the @@ -566,11 +576,11 @@ var ts; // they can not merge with anything in the value space SymbolFlags[SymbolFlags["BlockScopedVariableExcludes"] = 107455] = "BlockScopedVariableExcludes"; SymbolFlags[SymbolFlags["ParameterExcludes"] = 107455] = "ParameterExcludes"; - SymbolFlags[SymbolFlags["PropertyExcludes"] = 107455] = "PropertyExcludes"; - SymbolFlags[SymbolFlags["EnumMemberExcludes"] = 107455] = "EnumMemberExcludes"; + SymbolFlags[SymbolFlags["PropertyExcludes"] = 0] = "PropertyExcludes"; + SymbolFlags[SymbolFlags["EnumMemberExcludes"] = 900095] = "EnumMemberExcludes"; SymbolFlags[SymbolFlags["FunctionExcludes"] = 106927] = "FunctionExcludes"; SymbolFlags[SymbolFlags["ClassExcludes"] = 899519] = "ClassExcludes"; - SymbolFlags[SymbolFlags["InterfaceExcludes"] = 792960] = "InterfaceExcludes"; + SymbolFlags[SymbolFlags["InterfaceExcludes"] = 792968] = "InterfaceExcludes"; SymbolFlags[SymbolFlags["RegularEnumExcludes"] = 899327] = "RegularEnumExcludes"; SymbolFlags[SymbolFlags["ConstEnumExcludes"] = 899967] = "ConstEnumExcludes"; SymbolFlags[SymbolFlags["ValueModuleExcludes"] = 106639] = "ValueModuleExcludes"; @@ -578,8 +588,8 @@ var ts; SymbolFlags[SymbolFlags["MethodExcludes"] = 99263] = "MethodExcludes"; SymbolFlags[SymbolFlags["GetAccessorExcludes"] = 41919] = "GetAccessorExcludes"; SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 74687] = "SetAccessorExcludes"; - SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 530912] = "TypeParameterExcludes"; - SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 793056] = "TypeAliasExcludes"; + SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 530920] = "TypeParameterExcludes"; + SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 793064] = "TypeAliasExcludes"; SymbolFlags[SymbolFlags["AliasExcludes"] = 8388608] = "AliasExcludes"; SymbolFlags[SymbolFlags["ModuleMember"] = 8914931] = "ModuleMember"; SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal"; @@ -588,6 +598,7 @@ var ts; SymbolFlags[SymbolFlags["BlockScoped"] = 418] = "BlockScoped"; SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor"; SymbolFlags[SymbolFlags["Export"] = 7340032] = "Export"; + SymbolFlags[SymbolFlags["ClassMember"] = 106500] = "ClassMember"; /* @internal */ // The set of things we consider semantically classifiable. Used to speed up the LS during // classification. @@ -605,7 +616,6 @@ var ts; NodeCheckFlags[NodeCheckFlags["AsyncMethodWithSuper"] = 2048] = "AsyncMethodWithSuper"; NodeCheckFlags[NodeCheckFlags["AsyncMethodWithSuperBinding"] = 4096] = "AsyncMethodWithSuperBinding"; NodeCheckFlags[NodeCheckFlags["CaptureArguments"] = 8192] = "CaptureArguments"; - // Values for enum members have been computed, and any errors have been reported for them. NodeCheckFlags[NodeCheckFlags["EnumValuesComputed"] = 16384] = "EnumValuesComputed"; NodeCheckFlags[NodeCheckFlags["LexicalModuleMergesWithClass"] = 32768] = "LexicalModuleMergesWithClass"; NodeCheckFlags[NodeCheckFlags["LoopWithCapturedBlockScopedBinding"] = 65536] = "LoopWithCapturedBlockScopedBinding"; @@ -614,6 +624,7 @@ var ts; NodeCheckFlags[NodeCheckFlags["ClassWithBodyScopedClassBinding"] = 524288] = "ClassWithBodyScopedClassBinding"; NodeCheckFlags[NodeCheckFlags["BodyScopedClassBinding"] = 1048576] = "BodyScopedClassBinding"; NodeCheckFlags[NodeCheckFlags["NeedsLoopOutParameter"] = 2097152] = "NeedsLoopOutParameter"; + NodeCheckFlags[NodeCheckFlags["AssignmentsMarked"] = 4194304] = "AssignmentsMarked"; })(ts.NodeCheckFlags || (ts.NodeCheckFlags = {})); var NodeCheckFlags = ts.NodeCheckFlags; (function (TypeFlags) { @@ -621,47 +632,63 @@ var ts; TypeFlags[TypeFlags["String"] = 2] = "String"; TypeFlags[TypeFlags["Number"] = 4] = "Number"; TypeFlags[TypeFlags["Boolean"] = 8] = "Boolean"; - TypeFlags[TypeFlags["Void"] = 16] = "Void"; - TypeFlags[TypeFlags["Undefined"] = 32] = "Undefined"; - TypeFlags[TypeFlags["Null"] = 64] = "Null"; - TypeFlags[TypeFlags["Enum"] = 128] = "Enum"; - TypeFlags[TypeFlags["StringLiteral"] = 256] = "StringLiteral"; - TypeFlags[TypeFlags["TypeParameter"] = 512] = "TypeParameter"; - TypeFlags[TypeFlags["Class"] = 1024] = "Class"; - TypeFlags[TypeFlags["Interface"] = 2048] = "Interface"; - TypeFlags[TypeFlags["Reference"] = 4096] = "Reference"; - TypeFlags[TypeFlags["Tuple"] = 8192] = "Tuple"; - TypeFlags[TypeFlags["Union"] = 16384] = "Union"; - TypeFlags[TypeFlags["Intersection"] = 32768] = "Intersection"; - TypeFlags[TypeFlags["Anonymous"] = 65536] = "Anonymous"; - TypeFlags[TypeFlags["Instantiated"] = 131072] = "Instantiated"; + TypeFlags[TypeFlags["Enum"] = 16] = "Enum"; + TypeFlags[TypeFlags["StringLiteral"] = 32] = "StringLiteral"; + TypeFlags[TypeFlags["NumberLiteral"] = 64] = "NumberLiteral"; + TypeFlags[TypeFlags["BooleanLiteral"] = 128] = "BooleanLiteral"; + TypeFlags[TypeFlags["EnumLiteral"] = 256] = "EnumLiteral"; + TypeFlags[TypeFlags["ESSymbol"] = 512] = "ESSymbol"; + TypeFlags[TypeFlags["Void"] = 1024] = "Void"; + TypeFlags[TypeFlags["Undefined"] = 2048] = "Undefined"; + TypeFlags[TypeFlags["Null"] = 4096] = "Null"; + TypeFlags[TypeFlags["Never"] = 8192] = "Never"; + TypeFlags[TypeFlags["TypeParameter"] = 16384] = "TypeParameter"; + TypeFlags[TypeFlags["Class"] = 32768] = "Class"; + TypeFlags[TypeFlags["Interface"] = 65536] = "Interface"; + TypeFlags[TypeFlags["Reference"] = 131072] = "Reference"; + TypeFlags[TypeFlags["Tuple"] = 262144] = "Tuple"; + TypeFlags[TypeFlags["Union"] = 524288] = "Union"; + TypeFlags[TypeFlags["Intersection"] = 1048576] = "Intersection"; + TypeFlags[TypeFlags["Anonymous"] = 2097152] = "Anonymous"; + TypeFlags[TypeFlags["Instantiated"] = 4194304] = "Instantiated"; /* @internal */ - TypeFlags[TypeFlags["FromSignature"] = 262144] = "FromSignature"; - TypeFlags[TypeFlags["ObjectLiteral"] = 524288] = "ObjectLiteral"; + TypeFlags[TypeFlags["ObjectLiteral"] = 8388608] = "ObjectLiteral"; /* @internal */ - TypeFlags[TypeFlags["FreshObjectLiteral"] = 1048576] = "FreshObjectLiteral"; + TypeFlags[TypeFlags["FreshObjectLiteral"] = 16777216] = "FreshObjectLiteral"; /* @internal */ - TypeFlags[TypeFlags["ContainsUndefinedOrNull"] = 2097152] = "ContainsUndefinedOrNull"; + TypeFlags[TypeFlags["ContainsWideningType"] = 33554432] = "ContainsWideningType"; /* @internal */ - TypeFlags[TypeFlags["ContainsObjectLiteral"] = 4194304] = "ContainsObjectLiteral"; + TypeFlags[TypeFlags["ContainsObjectLiteral"] = 67108864] = "ContainsObjectLiteral"; /* @internal */ - TypeFlags[TypeFlags["ContainsAnyFunctionType"] = 8388608] = "ContainsAnyFunctionType"; - TypeFlags[TypeFlags["ESSymbol"] = 16777216] = "ESSymbol"; - TypeFlags[TypeFlags["ThisType"] = 33554432] = "ThisType"; - TypeFlags[TypeFlags["ObjectLiteralPatternWithComputedProperties"] = 67108864] = "ObjectLiteralPatternWithComputedProperties"; + TypeFlags[TypeFlags["ContainsAnyFunctionType"] = 134217728] = "ContainsAnyFunctionType"; + TypeFlags[TypeFlags["ThisType"] = 268435456] = "ThisType"; + TypeFlags[TypeFlags["ObjectLiteralPatternWithComputedProperties"] = 536870912] = "ObjectLiteralPatternWithComputedProperties"; /* @internal */ - TypeFlags[TypeFlags["Intrinsic"] = 16777343] = "Intrinsic"; + TypeFlags[TypeFlags["Nullable"] = 6144] = "Nullable"; + TypeFlags[TypeFlags["Literal"] = 480] = "Literal"; /* @internal */ - TypeFlags[TypeFlags["Primitive"] = 16777726] = "Primitive"; - TypeFlags[TypeFlags["StringLike"] = 258] = "StringLike"; - TypeFlags[TypeFlags["NumberLike"] = 132] = "NumberLike"; - TypeFlags[TypeFlags["ObjectType"] = 80896] = "ObjectType"; - TypeFlags[TypeFlags["UnionOrIntersection"] = 49152] = "UnionOrIntersection"; - TypeFlags[TypeFlags["StructuredType"] = 130048] = "StructuredType"; + TypeFlags[TypeFlags["DefinitelyFalsy"] = 7392] = "DefinitelyFalsy"; + TypeFlags[TypeFlags["PossiblyFalsy"] = 7406] = "PossiblyFalsy"; /* @internal */ - TypeFlags[TypeFlags["RequiresWidening"] = 6291456] = "RequiresWidening"; + TypeFlags[TypeFlags["Intrinsic"] = 16015] = "Intrinsic"; /* @internal */ - TypeFlags[TypeFlags["PropagatingFlags"] = 14680064] = "PropagatingFlags"; + TypeFlags[TypeFlags["Primitive"] = 8190] = "Primitive"; + TypeFlags[TypeFlags["StringLike"] = 34] = "StringLike"; + TypeFlags[TypeFlags["NumberLike"] = 340] = "NumberLike"; + TypeFlags[TypeFlags["BooleanLike"] = 136] = "BooleanLike"; + TypeFlags[TypeFlags["EnumLike"] = 272] = "EnumLike"; + TypeFlags[TypeFlags["ObjectType"] = 2588672] = "ObjectType"; + TypeFlags[TypeFlags["UnionOrIntersection"] = 1572864] = "UnionOrIntersection"; + TypeFlags[TypeFlags["StructuredType"] = 4161536] = "StructuredType"; + TypeFlags[TypeFlags["StructuredOrTypeParameter"] = 4177920] = "StructuredOrTypeParameter"; + // 'Narrowable' types are types where narrowing actually narrows. + // This *should* be every type other than null, undefined, void, and never + TypeFlags[TypeFlags["Narrowable"] = 4178943] = "Narrowable"; + TypeFlags[TypeFlags["NotUnionOrUnit"] = 2589191] = "NotUnionOrUnit"; + /* @internal */ + TypeFlags[TypeFlags["RequiresWidening"] = 100663296] = "RequiresWidening"; + /* @internal */ + TypeFlags[TypeFlags["PropagatingFlags"] = 234881024] = "PropagatingFlags"; })(ts.TypeFlags || (ts.TypeFlags = {})); var TypeFlags = ts.TypeFlags; (function (SignatureKind) { @@ -746,6 +773,11 @@ var ts; DiagnosticStyle[DiagnosticStyle["Pretty"] = 1] = "Pretty"; })(ts.DiagnosticStyle || (ts.DiagnosticStyle = {})); var DiagnosticStyle = ts.DiagnosticStyle; + (function (WatchDirectoryFlags) { + WatchDirectoryFlags[WatchDirectoryFlags["None"] = 0] = "None"; + WatchDirectoryFlags[WatchDirectoryFlags["Recursive"] = 1] = "Recursive"; + })(ts.WatchDirectoryFlags || (ts.WatchDirectoryFlags = {})); + var WatchDirectoryFlags = ts.WatchDirectoryFlags; /* @internal */ (function (CharacterCodes) { CharacterCodes[CharacterCodes["nullCharacter"] = 0] = "nullCharacter"; @@ -876,7 +908,103 @@ var ts; })(ts.CharacterCodes || (ts.CharacterCodes = {})); var CharacterCodes = ts.CharacterCodes; })(ts || (ts = {})); +/*@internal*/ +var ts; +(function (ts) { + /** Gets a timestamp with (at least) ms resolution */ + ts.timestamp = typeof performance !== "undefined" && performance.now ? function () { return performance.now(); } : Date.now ? Date.now : function () { return +(new Date()); }; +})(ts || (ts = {})); +/*@internal*/ +/** Performance measurements for the compiler. */ +var ts; +(function (ts) { + var performance; + (function (performance) { + var profilerEvent = typeof onProfilerEvent === "function" && onProfilerEvent.profiler === true + ? onProfilerEvent + : function (markName) { }; + var enabled = false; + var profilerStart = 0; + var counts; + var marks; + var measures; + /** + * Marks a performance event. + * + * @param markName The name of the mark. + */ + function mark(markName) { + if (enabled) { + marks[markName] = ts.timestamp(); + counts[markName] = (counts[markName] || 0) + 1; + profilerEvent(markName); + } + } + performance.mark = mark; + /** + * Adds a performance measurement with the specified name. + * + * @param measureName The name of the performance measurement. + * @param startMarkName The name of the starting mark. If not supplied, the point at which the + * profiler was enabled is used. + * @param endMarkName The name of the ending mark. If not supplied, the current timestamp is + * used. + */ + function measure(measureName, startMarkName, endMarkName) { + if (enabled) { + var end = endMarkName && marks[endMarkName] || ts.timestamp(); + var start = startMarkName && marks[startMarkName] || profilerStart; + measures[measureName] = (measures[measureName] || 0) + (end - start); + } + } + performance.measure = measure; + /** + * Gets the number of times a marker was encountered. + * + * @param markName The name of the mark. + */ + function getCount(markName) { + return counts && counts[markName] || 0; + } + performance.getCount = getCount; + /** + * Gets the total duration of all measurements with the supplied name. + * + * @param measureName The name of the measure whose durations should be accumulated. + */ + function getDuration(measureName) { + return measures && measures[measureName] || 0; + } + performance.getDuration = getDuration; + /** + * Iterate over each measure, performing some action + * + * @param cb The action to perform for each measure + */ + function forEachMeasure(cb) { + for (var key in measures) { + cb(key, measures[key]); + } + } + performance.forEachMeasure = forEachMeasure; + /** Enables (and resets) performance measurements for the compiler. */ + function enable() { + counts = ts.createMap(); + marks = ts.createMap(); + measures = ts.createMap(); + enabled = true; + profilerStart = ts.timestamp(); + } + performance.enable = enable; + /** Disables performance measurements for the compiler. */ + function disable() { + enabled = false; + } + performance.disable = disable; + })(performance = ts.performance || (ts.performance = {})); +})(ts || (ts = {})); /// +/// /* @internal */ var ts; (function (ts) { @@ -895,8 +1023,25 @@ var ts; Ternary[Ternary["True"] = -1] = "True"; })(ts.Ternary || (ts.Ternary = {})); var Ternary = ts.Ternary; + var createObject = Object.create; + function createMap(template) { + var map = createObject(null); // tslint:disable-line:no-null-keyword + // Using 'delete' on an object causes V8 to put the object in dictionary mode. + // This disables creation of hidden classes, which are expensive when an object is + // constantly changing shape. + map["__"] = undefined; + delete map["__"]; + // Copies keys/values from template. Note that for..in will not throw if + // template is undefined, and instead will just exit the loop. + for (var key in template) + if (hasOwnProperty.call(template, key)) { + map[key] = template[key]; + } + return map; + } + ts.createMap = createMap; function createFileMap(keyMapper) { - var files = {}; + var files = createMap(); return { get: get, set: set, @@ -918,14 +1063,14 @@ var ts; files[toKey(path)] = value; } function contains(path) { - return hasProperty(files, toKey(path)); + return toKey(path) in files; } function remove(path) { var key = toKey(path); delete files[key]; } function clear() { - files = {}; + files = createMap(); } function toKey(path) { return keyMapper ? keyMapper(path) : path; @@ -962,6 +1107,31 @@ var ts; return undefined; } ts.forEach = forEach; + /** Works like Array.prototype.find, returning `undefined` if no element satisfying the predicate is found. */ + function find(array, predicate) { + for (var i = 0, len = array.length; i < len; i++) { + var value = array[i]; + if (predicate(value, i)) { + return value; + } + } + return undefined; + } + ts.find = find; + /** + * Returns the first truthy result of `callback`, or else fails. + * This is like `forEach`, but never returns undefined. + */ + function findMap(array, callback) { + for (var i = 0, len = array.length; i < len; i++) { + var result = callback(array[i], i); + if (result) { + return result; + } + } + Debug.fail(); + } + ts.findMap = findMap; function contains(array, value) { if (array) { for (var _i = 0, array_1 = array; _i < array_1.length; _i++) { @@ -985,6 +1155,15 @@ var ts; return -1; } ts.indexOf = indexOf; + function indexOfAnyCharCode(text, charCodes, start) { + for (var i = start || 0, len = text.length; i < len; i++) { + if (contains(charCodes, text.charCodeAt(i))) { + return i; + } + } + return -1; + } + ts.indexOfAnyCharCode = indexOfAnyCharCode; function countWhere(array, predicate) { var count = 0; if (array) { @@ -998,26 +1177,66 @@ var ts; return count; } ts.countWhere = countWhere; + /** + * Filters an array by a predicate function. Returns the same array instance if the predicate is + * true for all elements, otherwise returns a new array instance containing the filtered subset. + */ function filter(array, f) { - var result; if (array) { - result = []; - for (var _i = 0, array_3 = array; _i < array_3.length; _i++) { - var item = array_3[_i]; - if (f(item)) { - result.push(item); + var len = array.length; + var i = 0; + while (i < len && f(array[i])) + i++; + if (i < len) { + var result = array.slice(0, i); + i++; + while (i < len) { + var item = array[i]; + if (f(item)) { + result.push(item); + } + i++; } + return result; } } - return result; + return array; } ts.filter = filter; + function removeWhere(array, f) { + var outIndex = 0; + for (var _i = 0, array_3 = array; _i < array_3.length; _i++) { + var item = array_3[_i]; + if (!f(item)) { + array[outIndex] = item; + outIndex++; + } + } + if (outIndex !== array.length) { + array.length = outIndex; + return true; + } + return false; + } + ts.removeWhere = removeWhere; + function filterMutate(array, f) { + var outIndex = 0; + for (var _i = 0, array_4 = array; _i < array_4.length; _i++) { + var item = array_4[_i]; + if (f(item)) { + array[outIndex] = item; + outIndex++; + } + } + array.length = outIndex; + } + ts.filterMutate = filterMutate; function map(array, f) { var result; if (array) { result = []; - for (var _i = 0, array_4 = array; _i < array_4.length; _i++) { - var v = array_4[_i]; + for (var _i = 0, array_5 = array; _i < array_5.length; _i++) { + var v = array_5[_i]; result.push(f(v)); } } @@ -1032,15 +1251,19 @@ var ts; return array1.concat(array2); } ts.concatenate = concatenate; - function deduplicate(array) { + function deduplicate(array, areEqual) { var result; if (array) { result = []; - for (var _i = 0, array_5 = array; _i < array_5.length; _i++) { - var item = array_5[_i]; - if (!contains(result, item)) { - result.push(item); + loop: for (var _i = 0, array_6 = array; _i < array_6.length; _i++) { + var item = array_6[_i]; + for (var _a = 0, result_1 = result; _a < result_1.length; _a++) { + var res = result_1[_a]; + if (areEqual ? areEqual(res, item) : res === item) { + continue loop; + } } + result.push(item); } } return result; @@ -1048,8 +1271,8 @@ var ts; ts.deduplicate = deduplicate; function sum(array, prop) { var result = 0; - for (var _i = 0, array_6 = array; _i < array_6.length; _i++) { - var v = array_6[_i]; + for (var _i = 0, array_7 = array; _i < array_7.length; _i++) { + var v = array_7[_i]; result += v[prop]; } return result; @@ -1115,8 +1338,14 @@ var ts; var count = array.length; if (count > 0) { var pos = 0; - var result = arguments.length <= 2 ? array[pos] : initial; - pos++; + var result = void 0; + if (arguments.length <= 2) { + result = array[pos]; + pos++; + } + else { + result = initial; + } while (pos < count) { result = f(result, array[pos]); pos++; @@ -1131,8 +1360,14 @@ var ts; if (array) { var pos = array.length - 1; if (pos >= 0) { - var result = arguments.length <= 2 ? array[pos] : initial; - pos--; + var result = void 0; + if (arguments.length <= 2) { + result = array[pos]; + pos--; + } + else { + result = initial; + } while (pos >= 0) { result = f(result, array[pos]); pos--; @@ -1144,117 +1379,191 @@ var ts; } ts.reduceRight = reduceRight; var hasOwnProperty = Object.prototype.hasOwnProperty; + /** + * Indicates whether a map-like contains an own property with the specified key. + * + * NOTE: This is intended for use only with MapLike objects. For Map objects, use + * the 'in' operator. + * + * @param map A map-like. + * @param key A property key. + */ function hasProperty(map, key) { return hasOwnProperty.call(map, key); } ts.hasProperty = hasProperty; - function getKeys(map) { - var keys = []; - for (var key in map) { - keys.push(key); - } - return keys; - } - ts.getKeys = getKeys; + /** + * Gets the value of an owned property in a map-like. + * + * NOTE: This is intended for use only with MapLike objects. For Map objects, use + * an indexer. + * + * @param map A map-like. + * @param key A property key. + */ function getProperty(map, key) { return hasOwnProperty.call(map, key) ? map[key] : undefined; } ts.getProperty = getProperty; - function isEmpty(map) { - for (var id in map) { - if (hasProperty(map, id)) { - return false; - } - } - return true; - } - ts.isEmpty = isEmpty; - function clone(object) { - var result = {}; - for (var id in object) { - result[id] = object[id]; - } - return result; - } - ts.clone = clone; - function extend(first, second) { - var result = {}; - for (var id in first) { - result[id] = first[id]; - } - for (var id in second) { - if (!hasProperty(result, id)) { - result[id] = second[id]; - } - } - return result; - } - ts.extend = extend; - function forEachValue(map, callback) { - var result; - for (var id in map) { - if (result = callback(map[id])) - break; - } - return result; - } - ts.forEachValue = forEachValue; - function forEachKey(map, callback) { - var result; - for (var id in map) { - if (result = callback(id)) - break; - } - return result; - } - ts.forEachKey = forEachKey; - function lookUp(map, key) { - return hasProperty(map, key) ? map[key] : undefined; - } - ts.lookUp = lookUp; - function copyMap(source, target) { - for (var p in source) { - target[p] = source[p]; - } - } - ts.copyMap = copyMap; /** - * Creates a map from the elements of an array. + * Gets the owned, enumerable property keys of a map-like. * - * @param array the array of input elements. - * @param makeKey a function that produces a key for a given element. + * NOTE: This is intended for use with MapLike objects. For Map objects, use + * Object.keys instead as it offers better performance. * - * This function makes no effort to avoid collisions; if any two elements produce - * the same key with the given 'makeKey' function, then the element with the higher - * index in the array will be the one associated with the produced key. + * @param map A map-like. */ - function arrayToMap(array, makeKey) { - var result = {}; - forEach(array, function (value) { - result[makeKey(value)] = value; - }); + function getOwnKeys(map) { + var keys = []; + for (var key in map) + if (hasOwnProperty.call(map, key)) { + keys.push(key); + } + return keys; + } + ts.getOwnKeys = getOwnKeys; + /** + * Enumerates the properties of a Map, invoking a callback and returning the first truthy result. + * + * @param map A map for which properties should be enumerated. + * @param callback A callback to invoke for each property. + */ + function forEachProperty(map, callback) { + var result; + for (var key in map) { + if (result = callback(map[key], key)) + break; + } return result; } - ts.arrayToMap = arrayToMap; + ts.forEachProperty = forEachProperty; + /** + * Returns true if a Map has some matching property. + * + * @param map A map whose properties should be tested. + * @param predicate An optional callback used to test each property. + */ + function someProperties(map, predicate) { + for (var key in map) { + if (!predicate || predicate(map[key], key)) + return true; + } + return false; + } + ts.someProperties = someProperties; + /** + * Performs a shallow copy of the properties from a source Map to a target MapLike + * + * @param source A map from which properties should be copied. + * @param target A map to which properties should be copied. + */ + function copyProperties(source, target) { + for (var key in source) { + target[key] = source[key]; + } + } + ts.copyProperties = copyProperties; /** * Reduce the properties of a map. * + * NOTE: This is intended for use with Map objects. For MapLike objects, use + * reduceOwnProperties instead as it offers better runtime safety. + * * @param map The map to reduce * @param callback An aggregation function that is called for each entry in the map * @param initial The initial value for the reduction. */ function reduceProperties(map, callback, initial) { var result = initial; - if (map) { - for (var key in map) { - if (hasProperty(map, key)) { - result = callback(result, map[key], String(key)); - } - } + for (var key in map) { + result = callback(result, map[key], String(key)); } return result; } ts.reduceProperties = reduceProperties; + /** + * Reduce the properties defined on a map-like (but not from its prototype chain). + * + * NOTE: This is intended for use with MapLike objects. For Map objects, use + * reduceProperties instead as it offers better performance. + * + * @param map The map-like to reduce + * @param callback An aggregation function that is called for each entry in the map + * @param initial The initial value for the reduction. + */ + function reduceOwnProperties(map, callback, initial) { + var result = initial; + for (var key in map) + if (hasOwnProperty.call(map, key)) { + result = callback(result, map[key], String(key)); + } + return result; + } + ts.reduceOwnProperties = reduceOwnProperties; + /** + * Performs a shallow equality comparison of the contents of two map-likes. + * + * @param left A map-like whose properties should be compared. + * @param right A map-like whose properties should be compared. + */ + function equalOwnProperties(left, right, equalityComparer) { + if (left === right) + return true; + if (!left || !right) + return false; + for (var key in left) + if (hasOwnProperty.call(left, key)) { + if (!hasOwnProperty.call(right, key) === undefined) + return false; + if (equalityComparer ? !equalityComparer(left[key], right[key]) : left[key] !== right[key]) + return false; + } + for (var key in right) + if (hasOwnProperty.call(right, key)) { + if (!hasOwnProperty.call(left, key)) + return false; + } + return true; + } + ts.equalOwnProperties = equalOwnProperties; + function arrayToMap(array, makeKey, makeValue) { + var result = createMap(); + for (var _i = 0, array_8 = array; _i < array_8.length; _i++) { + var value = array_8[_i]; + result[makeKey(value)] = makeValue ? makeValue(value) : value; + } + return result; + } + ts.arrayToMap = arrayToMap; + function cloneMap(map) { + var clone = createMap(); + copyProperties(map, clone); + return clone; + } + ts.cloneMap = cloneMap; + function clone(object) { + var result = {}; + for (var id in object) { + if (hasOwnProperty.call(object, id)) { + result[id] = object[id]; + } + } + return result; + } + ts.clone = clone; + function extend(first, second) { + var result = {}; + for (var id in second) + if (hasOwnProperty.call(second, id)) { + result[id] = second[id]; + } + for (var id in first) + if (hasOwnProperty.call(first, id)) { + result[id] = first[id]; + } + return result; + } + ts.extend = extend; /** * Tests whether a value is an array. */ @@ -1279,9 +1588,7 @@ var ts; } ts.localizedDiagnosticMessages = undefined; function getLocaleSpecificMessage(message) { - return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message.key] - ? ts.localizedDiagnosticMessages[message.key] - : message.message; + return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message.key] || message.message; } ts.getLocaleSpecificMessage = getLocaleSpecificMessage; function createFileDiagnostic(file, start, length, message) { @@ -1306,6 +1613,15 @@ var ts; }; } ts.createFileDiagnostic = createFileDiagnostic; + /* internal */ + function formatMessage(dummy, message) { + var text = getLocaleSpecificMessage(message); + if (arguments.length > 2) { + text = formatStringFromArgs(text, arguments, 2); + } + return text; + } + ts.formatMessage = formatMessage; function createCompilerDiagnostic(message) { var text = getLocaleSpecificMessage(message); if (arguments.length > 1) { @@ -1353,6 +1669,30 @@ var ts; return a < b ? -1 /* LessThan */ : 1 /* GreaterThan */; } ts.compareValues = compareValues; + function compareStrings(a, b, ignoreCase) { + if (a === b) + return 0 /* EqualTo */; + if (a === undefined) + return -1 /* LessThan */; + if (b === undefined) + return 1 /* GreaterThan */; + if (ignoreCase) { + if (String.prototype.localeCompare) { + var result = a.localeCompare(b, /*locales*/ undefined, { usage: "sort", sensitivity: "accent" }); + return result < 0 ? -1 /* LessThan */ : result > 0 ? 1 /* GreaterThan */ : 0 /* EqualTo */; + } + a = a.toUpperCase(); + b = b.toUpperCase(); + if (a === b) + return 0 /* EqualTo */; + } + return a < b ? -1 /* LessThan */ : 1 /* GreaterThan */; + } + ts.compareStrings = compareStrings; + function compareStringsCaseInsensitive(a, b) { + return compareStrings(a, b, /*ignoreCase*/ true); + } + ts.compareStringsCaseInsensitive = compareStringsCaseInsensitive; function getDiagnosticFileName(diagnostic) { return diagnostic.file ? diagnostic.file.fileName : undefined; } @@ -1508,7 +1848,7 @@ var ts; } ts.getNormalizedPathFromPathComponents = getNormalizedPathFromPathComponents; function getNormalizedPathComponentsOfUrl(url) { - // Get root length of http://www.website.com/folder1/foler2/ + // Get root length of http://www.website.com/folder1/folder2/ // In this example the root is: http://www.website.com/ // normalized path components should be ["http://www.website.com/", "folder1", "folder2"] var urlLength = url.length; @@ -1533,7 +1873,7 @@ var ts; var indexOfNextSlash = url.indexOf(ts.directorySeparator, rootLength); if (indexOfNextSlash !== -1) { // Found the "/" after the website.com so the root is length of http://www.website.com/ - // and get components afetr the root normally like any other folder components + // and get components after the root normally like any other folder components rootLength = indexOfNextSlash + 1; return normalizedPathComponents(url, rootLength); } @@ -1607,12 +1947,286 @@ var ts; return path1 + ts.directorySeparator + path2; } ts.combinePaths = combinePaths; + /** + * Removes a trailing directory separator from a path. + * @param path The path. + */ + function removeTrailingDirectorySeparator(path) { + if (path.charAt(path.length - 1) === ts.directorySeparator) { + return path.substr(0, path.length - 1); + } + return path; + } + ts.removeTrailingDirectorySeparator = removeTrailingDirectorySeparator; + /** + * Adds a trailing directory separator to a path, if it does not already have one. + * @param path The path. + */ + function ensureTrailingDirectorySeparator(path) { + if (path.charAt(path.length - 1) !== ts.directorySeparator) { + return path + ts.directorySeparator; + } + return path; + } + ts.ensureTrailingDirectorySeparator = ensureTrailingDirectorySeparator; + function comparePaths(a, b, currentDirectory, ignoreCase) { + if (a === b) + return 0 /* EqualTo */; + if (a === undefined) + return -1 /* LessThan */; + if (b === undefined) + return 1 /* GreaterThan */; + a = removeTrailingDirectorySeparator(a); + b = removeTrailingDirectorySeparator(b); + var aComponents = getNormalizedPathComponents(a, currentDirectory); + var bComponents = getNormalizedPathComponents(b, currentDirectory); + var sharedLength = Math.min(aComponents.length, bComponents.length); + for (var i = 0; i < sharedLength; i++) { + var result = compareStrings(aComponents[i], bComponents[i], ignoreCase); + if (result !== 0 /* EqualTo */) { + return result; + } + } + return compareValues(aComponents.length, bComponents.length); + } + ts.comparePaths = comparePaths; + function containsPath(parent, child, currentDirectory, ignoreCase) { + if (parent === undefined || child === undefined) + return false; + if (parent === child) + return true; + parent = removeTrailingDirectorySeparator(parent); + child = removeTrailingDirectorySeparator(child); + if (parent === child) + return true; + var parentComponents = getNormalizedPathComponents(parent, currentDirectory); + var childComponents = getNormalizedPathComponents(child, currentDirectory); + if (childComponents.length < parentComponents.length) { + return false; + } + for (var i = 0; i < parentComponents.length; i++) { + var result = compareStrings(parentComponents[i], childComponents[i], ignoreCase); + if (result !== 0 /* EqualTo */) { + return false; + } + } + return true; + } + ts.containsPath = containsPath; + /* @internal */ + function startsWith(str, prefix) { + return str.lastIndexOf(prefix, 0) === 0; + } + ts.startsWith = startsWith; + /* @internal */ + function endsWith(str, suffix) { + var expectedPos = str.length - suffix.length; + return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos; + } + ts.endsWith = endsWith; function fileExtensionIs(path, extension) { - var pathLen = path.length; - var extLen = extension.length; - return pathLen > extLen && path.substr(pathLen - extLen, extLen) === extension; + return path.length > extension.length && endsWith(path, extension); } ts.fileExtensionIs = fileExtensionIs; + function fileExtensionIsAny(path, extensions) { + for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) { + var extension = extensions_1[_i]; + if (fileExtensionIs(path, extension)) { + return true; + } + } + return false; + } + ts.fileExtensionIsAny = fileExtensionIsAny; + // Reserved characters, forces escaping of any non-word (or digit), non-whitespace character. + // It may be inefficient (we could just match (/[-[\]{}()*+?.,\\^$|#\s]/g), but this is future + // proof. + var reservedCharacterPattern = /[^\w\s\/]/g; + var wildcardCharCodes = [42 /* asterisk */, 63 /* question */]; + /** + * Matches any single directory segment unless it is the last segment and a .min.js file + * Breakdown: + * [^./] # matches everything up to the first . character (excluding directory seperators) + * (\\.(?!min\\.js$))? # matches . characters but not if they are part of the .min.js file extension + */ + var singleAsteriskRegexFragmentFiles = "([^./]|(\\.(?!min\\.js$))?)*"; + var singleAsteriskRegexFragmentOther = "[^/]*"; + function getRegularExpressionForWildcard(specs, basePath, usage) { + if (specs === undefined || specs.length === 0) { + return undefined; + } + var replaceWildcardCharacter = usage === "files" ? replaceWildCardCharacterFiles : replaceWildCardCharacterOther; + var singleAsteriskRegexFragment = usage === "files" ? singleAsteriskRegexFragmentFiles : singleAsteriskRegexFragmentOther; + /** + * Regex for the ** wildcard. Matches any number of subdirectories. When used for including + * files or directories, does not match subdirectories that start with a . character + */ + var doubleAsteriskRegexFragment = usage === "exclude" ? "(/.+?)?" : "(/[^/.][^/]*)*?"; + var pattern = ""; + var hasWrittenSubpattern = false; + spec: for (var _i = 0, specs_1 = specs; _i < specs_1.length; _i++) { + var spec = specs_1[_i]; + if (!spec) { + continue; + } + var subpattern = ""; + var hasRecursiveDirectoryWildcard = false; + var hasWrittenComponent = false; + var components = getNormalizedPathComponents(spec, basePath); + if (usage !== "exclude" && components[components.length - 1] === "**") { + continue spec; + } + // getNormalizedPathComponents includes the separator for the root component. + // We need to remove to create our regex correctly. + components[0] = removeTrailingDirectorySeparator(components[0]); + var optionalCount = 0; + for (var _a = 0, components_1 = components; _a < components_1.length; _a++) { + var component = components_1[_a]; + if (component === "**") { + if (hasRecursiveDirectoryWildcard) { + continue spec; + } + subpattern += doubleAsteriskRegexFragment; + hasRecursiveDirectoryWildcard = true; + hasWrittenComponent = true; + } + else { + if (usage === "directories") { + subpattern += "("; + optionalCount++; + } + if (hasWrittenComponent) { + subpattern += ts.directorySeparator; + } + if (usage !== "exclude") { + // The * and ? wildcards should not match directories or files that start with . if they + // appear first in a component. Dotted directories and files can be included explicitly + // like so: **/.*/.* + if (component.charCodeAt(0) === 42 /* asterisk */) { + subpattern += "([^./]" + singleAsteriskRegexFragment + ")?"; + component = component.substr(1); + } + else if (component.charCodeAt(0) === 63 /* question */) { + subpattern += "[^./]"; + component = component.substr(1); + } + } + subpattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter); + hasWrittenComponent = true; + } + } + while (optionalCount > 0) { + subpattern += ")?"; + optionalCount--; + } + if (hasWrittenSubpattern) { + pattern += "|"; + } + pattern += "(" + subpattern + ")"; + hasWrittenSubpattern = true; + } + if (!pattern) { + return undefined; + } + return "^(" + pattern + (usage === "exclude" ? ")($|/)" : ")$"); + } + ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard; + function replaceWildCardCharacterFiles(match) { + return replaceWildcardCharacter(match, singleAsteriskRegexFragmentFiles); + } + function replaceWildCardCharacterOther(match) { + return replaceWildcardCharacter(match, singleAsteriskRegexFragmentOther); + } + function replaceWildcardCharacter(match, singleAsteriskRegexFragment) { + return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match; + } + function getFileMatcherPatterns(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory) { + path = normalizePath(path); + currentDirectory = normalizePath(currentDirectory); + var absolutePath = combinePaths(currentDirectory, path); + return { + includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"), + includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"), + excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"), + basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames) + }; + } + ts.getFileMatcherPatterns = getFileMatcherPatterns; + function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, getFileSystemEntries) { + path = normalizePath(path); + currentDirectory = normalizePath(currentDirectory); + var patterns = getFileMatcherPatterns(path, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory); + var regexFlag = useCaseSensitiveFileNames ? "" : "i"; + var includeFileRegex = patterns.includeFilePattern && new RegExp(patterns.includeFilePattern, regexFlag); + var includeDirectoryRegex = patterns.includeDirectoryPattern && new RegExp(patterns.includeDirectoryPattern, regexFlag); + var excludeRegex = patterns.excludePattern && new RegExp(patterns.excludePattern, regexFlag); + var result = []; + for (var _i = 0, _a = patterns.basePaths; _i < _a.length; _i++) { + var basePath = _a[_i]; + visitDirectory(basePath, combinePaths(currentDirectory, basePath)); + } + return result; + function visitDirectory(path, absolutePath) { + var _a = getFileSystemEntries(path), files = _a.files, directories = _a.directories; + for (var _i = 0, files_1 = files; _i < files_1.length; _i++) { + var current = files_1[_i]; + var name_1 = combinePaths(path, current); + var absoluteName = combinePaths(absolutePath, current); + if ((!extensions || fileExtensionIsAny(name_1, extensions)) && + (!includeFileRegex || includeFileRegex.test(absoluteName)) && + (!excludeRegex || !excludeRegex.test(absoluteName))) { + result.push(name_1); + } + } + for (var _b = 0, directories_1 = directories; _b < directories_1.length; _b++) { + var current = directories_1[_b]; + var name_2 = combinePaths(path, current); + var absoluteName = combinePaths(absolutePath, current); + if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) && + (!excludeRegex || !excludeRegex.test(absoluteName))) { + visitDirectory(name_2, absoluteName); + } + } + } + } + ts.matchFiles = matchFiles; + /** + * Computes the unique non-wildcard base paths amongst the provided include patterns. + */ + function getBasePaths(path, includes, useCaseSensitiveFileNames) { + // Storage for our results in the form of literal paths (e.g. the paths as written by the user). + var basePaths = [path]; + if (includes) { + // Storage for literal base paths amongst the include patterns. + var includeBasePaths = []; + for (var _i = 0, includes_1 = includes; _i < includes_1.length; _i++) { + var include = includes_1[_i]; + // We also need to check the relative paths by converting them to absolute and normalizing + // in case they escape the base path (e.g "..\somedirectory") + var absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include)); + var wildcardOffset = indexOfAnyCharCode(absolute, wildcardCharCodes); + var includeBasePath = wildcardOffset < 0 + ? removeTrailingDirectorySeparator(getDirectoryPath(absolute)) + : absolute.substring(0, absolute.lastIndexOf(ts.directorySeparator, wildcardOffset)); + // Append the literal and canonical candidate base paths. + includeBasePaths.push(includeBasePath); + } + // Sort the offsets array using either the literal or canonical path representations. + includeBasePaths.sort(useCaseSensitiveFileNames ? compareStrings : compareStringsCaseInsensitive); + // Iterate over each include base path and include unique base paths that are not a + // subpath of an existing base path + include: for (var i = 0; i < includeBasePaths.length; i++) { + var includeBasePath = includeBasePaths[i]; + for (var j = 0; j < basePaths.length; j++) { + if (containsPath(basePaths[j], includeBasePath, path, !useCaseSensitiveFileNames)) { + continue include; + } + } + basePaths.push(includeBasePath); + } + } + return basePaths; + } function ensureScriptKind(fileName, scriptKind) { // Using scriptKind as a condition handles both: // - 'scriptKind' is unspecified and thus it is `undefined` @@ -1643,6 +2257,8 @@ var ts; * List of supported extensions in order of file resolution precedence. */ ts.supportedTypeScriptExtensions = [".ts", ".tsx", ".d.ts"]; + /** Must have ".d.ts" first because if ".ts" goes first, that will be detected as the extension instead of ".d.ts". */ + ts.supportedTypescriptExtensionsForExtractExtension = [".d.ts", ".ts", ".tsx"]; ts.supportedJavascriptExtensions = [".js", ".jsx"]; var allSupportedExtensions = ts.supportedTypeScriptExtensions.concat(ts.supportedJavascriptExtensions); function getSupportedExtensions(options) { @@ -1662,17 +2278,85 @@ var ts; return false; } ts.isSupportedSourceFileName = isSupportedSourceFileName; + /** + * Extension boundaries by priority. Lower numbers indicate higher priorities, and are + * aligned to the offset of the highest priority extension in the + * allSupportedExtensions array. + */ + (function (ExtensionPriority) { + ExtensionPriority[ExtensionPriority["TypeScriptFiles"] = 0] = "TypeScriptFiles"; + ExtensionPriority[ExtensionPriority["DeclarationAndJavaScriptFiles"] = 2] = "DeclarationAndJavaScriptFiles"; + ExtensionPriority[ExtensionPriority["Limit"] = 5] = "Limit"; + ExtensionPriority[ExtensionPriority["Highest"] = 0] = "Highest"; + ExtensionPriority[ExtensionPriority["Lowest"] = 2] = "Lowest"; + })(ts.ExtensionPriority || (ts.ExtensionPriority = {})); + var ExtensionPriority = ts.ExtensionPriority; + function getExtensionPriority(path, supportedExtensions) { + for (var i = supportedExtensions.length - 1; i >= 0; i--) { + if (fileExtensionIs(path, supportedExtensions[i])) { + return adjustExtensionPriority(i); + } + } + // If its not in the list of supported extensions, this is likely a + // TypeScript file with a non-ts extension + return 0 /* Highest */; + } + ts.getExtensionPriority = getExtensionPriority; + /** + * Adjusts an extension priority to be the highest priority within the same range. + */ + function adjustExtensionPriority(extensionPriority) { + if (extensionPriority < 2 /* DeclarationAndJavaScriptFiles */) { + return 0 /* TypeScriptFiles */; + } + else if (extensionPriority < 5 /* Limit */) { + return 2 /* DeclarationAndJavaScriptFiles */; + } + else { + return 5 /* Limit */; + } + } + ts.adjustExtensionPriority = adjustExtensionPriority; + /** + * Gets the next lowest extension priority for a given priority. + */ + function getNextLowestExtensionPriority(extensionPriority) { + if (extensionPriority < 2 /* DeclarationAndJavaScriptFiles */) { + return 2 /* DeclarationAndJavaScriptFiles */; + } + else { + return 5 /* Limit */; + } + } + ts.getNextLowestExtensionPriority = getNextLowestExtensionPriority; var extensionsToRemove = [".d.ts", ".ts", ".js", ".tsx", ".jsx"]; function removeFileExtension(path) { for (var _i = 0, extensionsToRemove_1 = extensionsToRemove; _i < extensionsToRemove_1.length; _i++) { var ext = extensionsToRemove_1[_i]; - if (fileExtensionIs(path, ext)) { - return path.substr(0, path.length - ext.length); + var extensionless = tryRemoveExtension(path, ext); + if (extensionless !== undefined) { + return extensionless; } } return path; } ts.removeFileExtension = removeFileExtension; + function tryRemoveExtension(path, extension) { + return fileExtensionIs(path, extension) ? removeExtension(path, extension) : undefined; + } + ts.tryRemoveExtension = tryRemoveExtension; + function removeExtension(path, extension) { + return path.substring(0, path.length - extension.length); + } + ts.removeExtension = removeExtension; + function isJsxOrTsxExtension(ext) { + return ext === ".jsx" || ext === ".tsx"; + } + ts.isJsxOrTsxExtension = isJsxOrTsxExtension; + function changeExtension(path, newExtension) { + return (removeFileExtension(path) + newExtension); + } + ts.changeExtension = changeExtension; function Symbol(flags, name) { this.flags = flags; this.name = name; @@ -1692,6 +2376,8 @@ var ts; } ts.objectAllocator = { getNodeConstructor: function () { return Node; }, + getTokenConstructor: function () { return Node; }, + getIdentifierConstructor: function () { return Node; }, getSourceFileConstructor: function () { return Node; }, getSymbolConstructor: function () { return Symbol; }, getTypeConstructor: function () { return Type; }, @@ -1751,6 +2437,7 @@ var ts; ts.sys = (function () { function getWScriptSystem() { var fso = new ActiveXObject("Scripting.FileSystemObject"); + var shell = new ActiveXObject("WScript.Shell"); var fileStream = new ActiveXObject("ADODB.Stream"); fileStream.Type = 2 /*text*/; var binaryStream = new ActiveXObject("ADODB.Stream"); @@ -1812,9 +2499,6 @@ var ts; fileStream.Close(); } } - function getCanonicalPath(path) { - return path.toLowerCase(); - } function getNames(collection) { var result = []; for (var e = new Enumerator(collection); !e.atEnd(); e.moveNext()) { @@ -1822,32 +2506,25 @@ var ts; } return result.sort(); } - function readDirectory(path, extension, exclude) { - var result = []; - exclude = ts.map(exclude, function (s) { return getCanonicalPath(ts.combinePaths(path, s)); }); - visitDirectory(path); - return result; - function visitDirectory(path) { + function getDirectories(path) { + var folder = fso.GetFolder(path); + return getNames(folder.subfolders); + } + function getAccessibleFileSystemEntries(path) { + try { var folder = fso.GetFolder(path || "."); var files = getNames(folder.files); - for (var _i = 0, files_1 = files; _i < files_1.length; _i++) { - var current = files_1[_i]; - var name_1 = ts.combinePaths(path, current); - if ((!extension || ts.fileExtensionIs(name_1, extension)) && !ts.contains(exclude, getCanonicalPath(name_1))) { - result.push(name_1); - } - } - var subfolders = getNames(folder.subfolders); - for (var _a = 0, subfolders_1 = subfolders; _a < subfolders_1.length; _a++) { - var current = subfolders_1[_a]; - var name_2 = ts.combinePaths(path, current); - if (!ts.contains(exclude, getCanonicalPath(name_2))) { - visitDirectory(name_2); - } - } + var directories = getNames(folder.subfolders); + return { files: files, directories: directories }; + } + catch (e) { + return { files: [], directories: [] }; } } - return { + function readDirectory(path, extensions, excludes, includes) { + return ts.matchFiles(path, extensions, excludes, includes, /*useCaseSensitiveFileNames*/ false, shell.CurrentDirectory, getAccessibleFileSystemEntries); + } + var wscriptSystem = { args: args, newLine: "\r\n", useCaseSensitiveFileNames: false, @@ -1866,7 +2543,7 @@ var ts; return fso.FolderExists(path); }, createDirectory: function (directoryName) { - if (!this.directoryExists(directoryName)) { + if (!wscriptSystem.directoryExists(directoryName)) { fso.CreateFolder(directoryName); } }, @@ -1874,8 +2551,9 @@ var ts; return WScript.ScriptFullName; }, getCurrentDirectory: function () { - return new ActiveXObject("WScript.Shell").CurrentDirectory; + return shell.CurrentDirectory; }, + getDirectories: getDirectories, readDirectory: readDirectory, exit: function (exitCode) { try { @@ -1885,168 +2563,79 @@ var ts; } } }; + return wscriptSystem; } function getNodeSystem() { var _fs = require("fs"); var _path = require("path"); var _os = require("os"); - // average async stat takes about 30 microseconds - // set chunk size to do 30 files in < 1 millisecond - function createPollingWatchedFileSet(interval, chunkSize) { - if (interval === void 0) { interval = 2500; } - if (chunkSize === void 0) { chunkSize = 30; } - var watchedFiles = []; - var nextFileToCheck = 0; - var watchTimer; - function getModifiedTime(fileName) { - return _fs.statSync(fileName).mtime; - } - function poll(checkedIndex) { - var watchedFile = watchedFiles[checkedIndex]; - if (!watchedFile) { - return; - } - _fs.stat(watchedFile.filePath, function (err, stats) { - if (err) { - watchedFile.callback(watchedFile.filePath); - } - else if (watchedFile.mtime.getTime() !== stats.mtime.getTime()) { - watchedFile.mtime = getModifiedTime(watchedFile.filePath); - watchedFile.callback(watchedFile.filePath, watchedFile.mtime.getTime() === 0); - } - }); - } - // this implementation uses polling and - // stat due to inconsistencies of fs.watch - // and efficiency of stat on modern filesystems - function startWatchTimer() { - watchTimer = setInterval(function () { - var count = 0; - var nextToCheck = nextFileToCheck; - var firstCheck = -1; - while ((count < chunkSize) && (nextToCheck !== firstCheck)) { - poll(nextToCheck); - if (firstCheck < 0) { - firstCheck = nextToCheck; - } - nextToCheck++; - if (nextToCheck === watchedFiles.length) { - nextToCheck = 0; - } - count++; - } - nextFileToCheck = nextToCheck; - }, interval); - } - function addFile(filePath, callback) { - var file = { - filePath: filePath, - callback: callback, - mtime: getModifiedTime(filePath) - }; - watchedFiles.push(file); - if (watchedFiles.length === 1) { - startWatchTimer(); - } - return file; - } - function removeFile(file) { - watchedFiles = ts.copyListRemovingItem(file, watchedFiles); - } - return { - getModifiedTime: getModifiedTime, - poll: poll, - startWatchTimer: startWatchTimer, - addFile: addFile, - removeFile: removeFile - }; - } + var _crypto = require("crypto"); + var useNonPollingWatchers = process.env["TSC_NONPOLLING_WATCHER"]; function createWatchedFileSet() { - var dirWatchers = ts.createFileMap(); + var dirWatchers = ts.createMap(); // One file can have multiple watchers - var fileWatcherCallbacks = ts.createFileMap(); + var fileWatcherCallbacks = ts.createMap(); return { addFile: addFile, removeFile: removeFile }; - function reduceDirWatcherRefCountForFile(filePath) { - var dirPath = ts.getDirectoryPath(filePath); - if (dirWatchers.contains(dirPath)) { - var watcher = dirWatchers.get(dirPath); + function reduceDirWatcherRefCountForFile(fileName) { + var dirName = ts.getDirectoryPath(fileName); + var watcher = dirWatchers[dirName]; + if (watcher) { watcher.referenceCount -= 1; if (watcher.referenceCount <= 0) { watcher.close(); - dirWatchers.remove(dirPath); + delete dirWatchers[dirName]; } } } function addDirWatcher(dirPath) { - if (dirWatchers.contains(dirPath)) { - var watcher_1 = dirWatchers.get(dirPath); - watcher_1.referenceCount += 1; + var watcher = dirWatchers[dirPath]; + if (watcher) { + watcher.referenceCount += 1; return; } - var watcher = _fs.watch(dirPath, { persistent: true }, function (eventName, relativeFileName) { return fileEventHandler(eventName, relativeFileName, dirPath); }); + watcher = _fs.watch(dirPath, { persistent: true }, function (eventName, relativeFileName) { return fileEventHandler(eventName, relativeFileName, dirPath); }); watcher.referenceCount = 1; - dirWatchers.set(dirPath, watcher); + dirWatchers[dirPath] = watcher; return; } function addFileWatcherCallback(filePath, callback) { - if (fileWatcherCallbacks.contains(filePath)) { - fileWatcherCallbacks.get(filePath).push(callback); - } - else { - fileWatcherCallbacks.set(filePath, [callback]); - } + (fileWatcherCallbacks[filePath] || (fileWatcherCallbacks[filePath] = [])).push(callback); } - function addFile(filePath, callback) { - addFileWatcherCallback(filePath, callback); - addDirWatcher(ts.getDirectoryPath(filePath)); - return { filePath: filePath, callback: callback }; + function addFile(fileName, callback) { + addFileWatcherCallback(fileName, callback); + addDirWatcher(ts.getDirectoryPath(fileName)); + return { fileName: fileName, callback: callback }; } function removeFile(watchedFile) { - removeFileWatcherCallback(watchedFile.filePath, watchedFile.callback); - reduceDirWatcherRefCountForFile(watchedFile.filePath); + removeFileWatcherCallback(watchedFile.fileName, watchedFile.callback); + reduceDirWatcherRefCountForFile(watchedFile.fileName); } function removeFileWatcherCallback(filePath, callback) { - if (fileWatcherCallbacks.contains(filePath)) { - var newCallbacks = ts.copyListRemovingItem(callback, fileWatcherCallbacks.get(filePath)); + var callbacks = fileWatcherCallbacks[filePath]; + if (callbacks) { + var newCallbacks = ts.copyListRemovingItem(callback, callbacks); if (newCallbacks.length === 0) { - fileWatcherCallbacks.remove(filePath); + delete fileWatcherCallbacks[filePath]; } else { - fileWatcherCallbacks.set(filePath, newCallbacks); + fileWatcherCallbacks[filePath] = newCallbacks; } } } - /** - * @param watcherPath is the path from which the watcher is triggered. - */ function fileEventHandler(eventName, relativeFileName, baseDirPath) { // When files are deleted from disk, the triggered "rename" event would have a relativefileName of "undefined" - var filePath = typeof relativeFileName !== "string" + var fileName = typeof relativeFileName !== "string" ? undefined - : ts.toPath(relativeFileName, baseDirPath, ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)); + : ts.getNormalizedAbsolutePath(relativeFileName, baseDirPath); // Some applications save a working file via rename operations - if ((eventName === "change" || eventName === "rename") && fileWatcherCallbacks.contains(filePath)) { - for (var _i = 0, _a = fileWatcherCallbacks.get(filePath); _i < _a.length; _i++) { + if ((eventName === "change" || eventName === "rename") && fileWatcherCallbacks[fileName]) { + for (var _i = 0, _a = fileWatcherCallbacks[fileName]; _i < _a.length; _i++) { var fileCallback = _a[_i]; - fileCallback(filePath); + fileCallback(fileName); } } } } - // REVIEW: for now this implementation uses polling. - // The advantage of polling is that it works reliably - // on all os and with network mounted files. - // For 90 referenced files, the average time to detect - // changes is 2*msInterval (by default 5 seconds). - // The overhead of this is .04 percent (1/2500) with - // average pause of < 1 millisecond (and max - // pause less than 1.5 milliseconds); question is - // do we anticipate reference sets in the 100s and - // do we care about waiting 10-20 seconds to detect - // changes for large reference sets? If so, do we want - // to increase the chunk size or decrease the interval - // time dynamically to match the large reference set? - var pollingWatchedFileSet = createPollingWatchedFileSet(); var watchedFileSet = createWatchedFileSet(); function isNode4OrLater() { return parseInt(process.version.charAt(1)) >= 4; @@ -2055,7 +2644,7 @@ var ts; // win32\win64 are case insensitive platforms, MacOS (darwin) by default is also case insensitive var useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin"; function readFile(fileName, encoding) { - if (!_fs.existsSync(fileName)) { + if (!fileExists(fileName)) { return undefined; } var buffer = _fs.readFileSync(fileName); @@ -2098,44 +2687,69 @@ var ts; } } } - function getCanonicalPath(path) { - return useCaseSensitiveFileNames ? path : path.toLowerCase(); - } - function readDirectory(path, extension, exclude) { - var result = []; - exclude = ts.map(exclude, function (s) { return getCanonicalPath(ts.combinePaths(path, s)); }); - visitDirectory(path); - return result; - function visitDirectory(path) { - var files = _fs.readdirSync(path || ".").sort(); + function getAccessibleFileSystemEntries(path) { + try { + var entries = _fs.readdirSync(path || ".").sort(); + var files = []; var directories = []; - for (var _i = 0, files_2 = files; _i < files_2.length; _i++) { - var current = files_2[_i]; - var name_3 = ts.combinePaths(path, current); - if (!ts.contains(exclude, getCanonicalPath(name_3))) { - // fs.statSync would throw an exception if the file is a symlink - // whose linked file doesn't exist. - try { - var stat = _fs.statSync(name_3); - if (stat.isFile()) { - if (!extension || ts.fileExtensionIs(name_3, extension)) { - result.push(name_3); - } - } - else if (stat.isDirectory()) { - directories.push(name_3); - } - } - catch (e) { } + for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { + var entry = entries_1[_i]; + // This is necessary because on some file system node fails to exclude + // "." and "..". See https://github.com/nodejs/node/issues/4002 + if (entry === "." || entry === "..") { + continue; + } + var name_3 = ts.combinePaths(path, entry); + var stat = void 0; + try { + stat = _fs.statSync(name_3); + } + catch (e) { + continue; + } + if (stat.isFile()) { + files.push(entry); + } + else if (stat.isDirectory()) { + directories.push(entry); } } - for (var _a = 0, directories_1 = directories; _a < directories_1.length; _a++) { - var current = directories_1[_a]; - visitDirectory(current); - } + return { files: files, directories: directories }; + } + catch (e) { + return { files: [], directories: [] }; } } - return { + function readDirectory(path, extensions, excludes, includes) { + return ts.matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), getAccessibleFileSystemEntries); + } + var FileSystemEntryKind; + (function (FileSystemEntryKind) { + FileSystemEntryKind[FileSystemEntryKind["File"] = 0] = "File"; + FileSystemEntryKind[FileSystemEntryKind["Directory"] = 1] = "Directory"; + })(FileSystemEntryKind || (FileSystemEntryKind = {})); + function fileSystemEntryExists(path, entryKind) { + try { + var stat = _fs.statSync(path); + switch (entryKind) { + case 0 /* File */: return stat.isFile(); + case 1 /* Directory */: return stat.isDirectory(); + } + } + catch (e) { + return false; + } + } + function fileExists(path) { + return fileSystemEntryExists(path, 0 /* File */); + } + function directoryExists(path) { + return fileSystemEntryExists(path, 1 /* Directory */); + } + function getDirectories(path) { + return ts.filter(_fs.readdirSync(path), function (p) { return fileSystemEntryExists(ts.combinePaths(path, p), 1 /* Directory */); }); + } + var nodeSystem = { args: process.argv.slice(2), newLine: _os.EOL, useCaseSensitiveFileNames: useCaseSensitiveFileNames, @@ -2144,18 +2758,27 @@ var ts; }, readFile: readFile, writeFile: writeFile, - watchFile: function (filePath, callback) { - // Node 4.0 stablized the `fs.watch` function on Windows which avoids polling - // and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649 - // and https://github.com/Microsoft/TypeScript/issues/4643), therefore - // if the current node.js version is newer than 4, use `fs.watch` instead. - var watchSet = isNode4OrLater() ? watchedFileSet : pollingWatchedFileSet; - var watchedFile = watchSet.addFile(filePath, callback); - return { - close: function () { return watchSet.removeFile(watchedFile); } - }; + watchFile: function (fileName, callback) { + if (useNonPollingWatchers) { + var watchedFile_1 = watchedFileSet.addFile(fileName, callback); + return { + close: function () { return watchedFileSet.removeFile(watchedFile_1); } + }; + } + else { + _fs.watchFile(fileName, { persistent: true, interval: 250 }, fileChanged); + return { + close: function () { return _fs.unwatchFile(fileName, fileChanged); } + }; + } + function fileChanged(curr, prev) { + if (+curr.mtime <= +prev.mtime) { + return; + } + callback(fileName); + } }, - watchDirectory: function (path, callback, recursive) { + watchDirectory: function (directoryName, callback, recursive) { // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) var options; @@ -2165,13 +2788,13 @@ var ts; else { options = { persistent: true }; } - return _fs.watch(path, options, function (eventName, relativeFileName) { + return _fs.watch(directoryName, options, function (eventName, relativeFileName) { // In watchDirectory we only care about adding and removing files (when event name is // "rename"); changes made within files are handled by corresponding fileWatchers (when // event name is "change") if (eventName === "rename") { // When deleting a file, the passed baseFileName is null - callback(!relativeFileName ? relativeFileName : ts.normalizePath(ts.combinePaths(path, relativeFileName))); + callback(!relativeFileName ? relativeFileName : ts.normalizePath(ts.combinePaths(directoryName, relativeFileName))); } ; }); @@ -2179,14 +2802,10 @@ var ts; resolvePath: function (path) { return _path.resolve(path); }, - fileExists: function (path) { - return _fs.existsSync(path); - }, - directoryExists: function (path) { - return _fs.existsSync(path) && _fs.statSync(path).isDirectory(); - }, + fileExists: fileExists, + directoryExists: directoryExists, createDirectory: function (directoryName) { - if (!this.directoryExists(directoryName)) { + if (!nodeSystem.directoryExists(directoryName)) { _fs.mkdirSync(directoryName); } }, @@ -2196,19 +2815,48 @@ var ts; getCurrentDirectory: function () { return process.cwd(); }, + getDirectories: getDirectories, readDirectory: readDirectory, + getModifiedTime: function (path) { + try { + return _fs.statSync(path).mtime; + } + catch (e) { + return undefined; + } + }, + createHash: function (data) { + var hash = _crypto.createHash("md5"); + hash.update(data); + return hash.digest("hex"); + }, getMemoryUsage: function () { if (global.gc) { global.gc(); } return process.memoryUsage().heapUsed; }, + getFileSize: function (path) { + try { + var stat = _fs.statSync(path); + if (stat.isFile()) { + return stat.size; + } + } + catch (e) { } + return 0; + }, exit: function (exitCode) { process.exit(exitCode); + }, + realpath: function (path) { + return _fs.realpathSync(path); } }; + return nodeSystem; } function getChakraSystem() { + var realpath = ChakraHost.realpath && (function (path) { return ChakraHost.realpath(path); }); return { newLine: ChakraHost.newLine || "\r\n", args: ChakraHost.args, @@ -2231,11 +2879,19 @@ var ts; createDirectory: ChakraHost.createDirectory, getExecutingFilePath: function () { return ChakraHost.executingFile; }, getCurrentDirectory: function () { return ChakraHost.currentDirectory; }, - readDirectory: ChakraHost.readDirectory, - exit: ChakraHost.quit + getDirectories: ChakraHost.getDirectories, + readDirectory: function (path, extensions, excludes, includes) { + var pattern = ts.getFileMatcherPatterns(path, extensions, excludes, includes, !!ChakraHost.useCaseSensitiveFileNames, ChakraHost.currentDirectory); + return ChakraHost.readDirectory(path, extensions, pattern.basePaths, pattern.excludePattern, pattern.includeFilePattern, pattern.includeDirectoryPattern); + }, + exit: ChakraHost.quit, + realpath: realpath }; } - if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") { + if (typeof ChakraHost !== "undefined") { + return getChakraSystem(); + } + else if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") { return getWScriptSystem(); } else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") { @@ -2243,9 +2899,6 @@ var ts; // process.browser check excludes webpack and browserify return getNodeSystem(); } - else if (typeof ChakraHost !== "undefined") { - return getChakraSystem(); - } else { return undefined; // Unsupported host } @@ -2274,6 +2927,7 @@ var ts; An_index_signature_must_have_a_type_annotation: { code: 1021, category: ts.DiagnosticCategory.Error, key: "An_index_signature_must_have_a_type_annotation_1021", message: "An index signature must have a type annotation." }, An_index_signature_parameter_must_have_a_type_annotation: { code: 1022, category: ts.DiagnosticCategory.Error, key: "An_index_signature_parameter_must_have_a_type_annotation_1022", message: "An index signature parameter must have a type annotation." }, An_index_signature_parameter_type_must_be_string_or_number: { code: 1023, category: ts.DiagnosticCategory.Error, key: "An_index_signature_parameter_type_must_be_string_or_number_1023", message: "An index signature parameter type must be 'string' or 'number'." }, + readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: { code: 1024, category: ts.DiagnosticCategory.Error, key: "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", message: "'readonly' modifier can only appear on a property declaration or index signature." }, Accessibility_modifier_already_seen: { code: 1028, category: ts.DiagnosticCategory.Error, key: "Accessibility_modifier_already_seen_1028", message: "Accessibility modifier already seen." }, _0_modifier_must_precede_1_modifier: { code: 1029, category: ts.DiagnosticCategory.Error, key: "_0_modifier_must_precede_1_modifier_1029", message: "'{0}' modifier must precede '{1}' modifier." }, _0_modifier_already_seen: { code: 1030, category: ts.DiagnosticCategory.Error, key: "_0_modifier_already_seen_1030", message: "'{0}' modifier already seen." }, @@ -2287,7 +2941,7 @@ var ts; _0_modifier_cannot_be_used_with_a_class_declaration: { code: 1041, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_be_used_with_a_class_declaration_1041", message: "'{0}' modifier cannot be used with a class declaration." }, _0_modifier_cannot_be_used_here: { code: 1042, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_be_used_here_1042", message: "'{0}' modifier cannot be used here." }, _0_modifier_cannot_appear_on_a_data_property: { code: 1043, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_data_property_1043", message: "'{0}' modifier cannot appear on a data property." }, - _0_modifier_cannot_appear_on_a_module_element: { code: 1044, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_module_element_1044", message: "'{0}' modifier cannot appear on a module element." }, + _0_modifier_cannot_appear_on_a_module_or_namespace_element: { code: 1044, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044", message: "'{0}' modifier cannot appear on a module or namespace element." }, A_0_modifier_cannot_be_used_with_an_interface_declaration: { code: 1045, category: ts.DiagnosticCategory.Error, key: "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045", message: "A '{0}' modifier cannot be used with an interface declaration." }, A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file: { code: 1046, category: ts.DiagnosticCategory.Error, key: "A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046", message: "A 'declare' modifier is required for a top level declaration in a .d.ts file." }, A_rest_parameter_cannot_be_optional: { code: 1047, category: ts.DiagnosticCategory.Error, key: "A_rest_parameter_cannot_be_optional_1047", message: "A rest parameter cannot be optional." }, @@ -2309,6 +2963,8 @@ var ts; The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: { code: 1064, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064", message: "The return type of an async function or method must be the global Promise type." }, In_ambient_enum_declarations_member_initializer_must_be_constant_expression: { code: 1066, category: ts.DiagnosticCategory.Error, key: "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", message: "In ambient enum declarations member initializer must be constant expression." }, Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: ts.DiagnosticCategory.Error, key: "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", message: "Unexpected token. A constructor, method, accessor, or property was expected." }, + _0_modifier_cannot_appear_on_a_type_member: { code: 1070, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_a_type_member_1070", message: "'{0}' modifier cannot appear on a type member." }, + _0_modifier_cannot_appear_on_an_index_signature: { code: 1071, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_appear_on_an_index_signature_1071", message: "'{0}' modifier cannot appear on an index signature." }, A_0_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: ts.DiagnosticCategory.Error, key: "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", message: "A '{0}' modifier cannot be used with an import declaration." }, Invalid_reference_directive_syntax: { code: 1084, category: ts.DiagnosticCategory.Error, key: "Invalid_reference_directive_syntax_1084", message: "Invalid 'reference' directive syntax." }, Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_1085", message: "Octal literals are not available when targeting ECMAScript 5 and higher." }, @@ -2333,7 +2989,6 @@ var ts; A_return_statement_can_only_be_used_within_a_function_body: { code: 1108, category: ts.DiagnosticCategory.Error, key: "A_return_statement_can_only_be_used_within_a_function_body_1108", message: "A 'return' statement can only be used within a function body." }, Expression_expected: { code: 1109, category: ts.DiagnosticCategory.Error, key: "Expression_expected_1109", message: "Expression expected." }, Type_expected: { code: 1110, category: ts.DiagnosticCategory.Error, key: "Type_expected_1110", message: "Type expected." }, - A_class_member_cannot_be_declared_optional: { code: 1112, category: ts.DiagnosticCategory.Error, key: "A_class_member_cannot_be_declared_optional_1112", message: "A class member cannot be declared optional." }, A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: ts.DiagnosticCategory.Error, key: "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", message: "A 'default' clause cannot appear more than once in a 'switch' statement." }, Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate_label_0_1114", message: "Duplicate label '{0}'" }, A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: ts.DiagnosticCategory.Error, key: "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", message: "A 'continue' statement can only jump to a label of an enclosing iteration statement." }, @@ -2364,10 +3019,9 @@ var ts; String_literal_expected: { code: 1141, category: ts.DiagnosticCategory.Error, key: "String_literal_expected_1141", message: "String literal expected." }, Line_break_not_permitted_here: { code: 1142, category: ts.DiagnosticCategory.Error, key: "Line_break_not_permitted_here_1142", message: "Line break not permitted here." }, or_expected: { code: 1144, category: ts.DiagnosticCategory.Error, key: "or_expected_1144", message: "'{' or ';' expected." }, - Modifiers_not_permitted_on_index_signature_members: { code: 1145, category: ts.DiagnosticCategory.Error, key: "Modifiers_not_permitted_on_index_signature_members_1145", message: "Modifiers not permitted on index signature members." }, Declaration_expected: { code: 1146, category: ts.DiagnosticCategory.Error, key: "Declaration_expected_1146", message: "Declaration expected." }, Import_declarations_in_a_namespace_cannot_reference_a_module: { code: 1147, category: ts.DiagnosticCategory.Error, key: "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", message: "Import declarations in a namespace cannot reference a module." }, - Cannot_compile_modules_unless_the_module_flag_is_provided_with_a_valid_module_type_Consider_setting_the_module_compiler_option_in_a_tsconfig_json_file: { code: 1148, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_modules_unless_the_module_flag_is_provided_with_a_valid_module_type_Consider_setting__1148", message: "Cannot compile modules unless the '--module' flag is provided with a valid module type. Consider setting the 'module' compiler option in a 'tsconfig.json' file." }, + Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: { code: 1148, category: ts.DiagnosticCategory.Error, key: "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", message: "Cannot use imports, exports, or module augmentations when '--module' is 'none'." }, File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", message: "File name '{0}' differs from already included file name '{1}' only in casing" }, new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: ts.DiagnosticCategory.Error, key: "new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150", message: "'new T[]' cannot be used to create an array. Use 'new Array()' instead." }, const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "const_declarations_must_be_initialized_1155", message: "'const' declarations must be initialized" }, @@ -2399,7 +3053,7 @@ var ts; Modifiers_cannot_appear_here: { code: 1184, category: ts.DiagnosticCategory.Error, key: "Modifiers_cannot_appear_here_1184", message: "Modifiers cannot appear here." }, Merge_conflict_marker_encountered: { code: 1185, category: ts.DiagnosticCategory.Error, key: "Merge_conflict_marker_encountered_1185", message: "Merge conflict marker encountered." }, A_rest_element_cannot_have_an_initializer: { code: 1186, category: ts.DiagnosticCategory.Error, key: "A_rest_element_cannot_have_an_initializer_1186", message: "A rest element cannot have an initializer." }, - A_parameter_property_may_not_be_a_binding_pattern: { code: 1187, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_may_not_be_a_binding_pattern_1187", message: "A parameter property may not be a binding pattern." }, + A_parameter_property_may_not_be_declared_using_a_binding_pattern: { code: 1187, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187", message: "A parameter property may not be declared using a binding pattern." }, Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: { code: 1188, category: ts.DiagnosticCategory.Error, key: "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188", message: "Only a single variable declaration is allowed in a 'for...of' statement." }, The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: { code: 1189, category: ts.DiagnosticCategory.Error, key: "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189", message: "The variable declaration of a 'for...in' statement cannot have an initializer." }, The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: { code: 1190, category: ts.DiagnosticCategory.Error, key: "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190", message: "The variable declaration of a 'for...of' statement cannot have an initializer." }, @@ -2413,9 +3067,8 @@ var ts; An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: { code: 1198, category: ts.DiagnosticCategory.Error, key: "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", message: "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive." }, Unterminated_Unicode_escape_sequence: { code: 1199, category: ts.DiagnosticCategory.Error, key: "Unterminated_Unicode_escape_sequence_1199", message: "Unterminated Unicode escape sequence." }, Line_terminator_not_permitted_before_arrow: { code: 1200, category: ts.DiagnosticCategory.Error, key: "Line_terminator_not_permitted_before_arrow_1200", message: "Line terminator not permitted before arrow." }, - Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: { code: 1202, category: ts.DiagnosticCategory.Error, key: "Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_modules_Consider_using_import_Asterisk__1202", message: "Import assignment cannot be used when targeting ECMAScript 6 modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead." }, - Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_modules_Consider_using_export_default_or_another_module_format_instead: { code: 1203, category: ts.DiagnosticCategory.Error, key: "Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_modules_Consider_using_export_default_o_1203", message: "Export assignment cannot be used when targeting ECMAScript 6 modules. Consider using 'export default' or another module format instead." }, - Cannot_compile_modules_into_es2015_when_targeting_ES5_or_lower: { code: 1204, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_modules_into_es2015_when_targeting_ES5_or_lower_1204", message: "Cannot compile modules into 'es2015' when targeting 'ES5' or lower." }, + Import_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: { code: 1202, category: ts.DiagnosticCategory.Error, key: "Import_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_import_Asteri_1202", message: "Import assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead." }, + Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_default_or_another_module_format_instead: { code: 1203, category: ts.DiagnosticCategory.Error, key: "Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_defaul_1203", message: "Export assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'export default' or another module format instead." }, Decorators_are_not_valid_here: { code: 1206, category: ts.DiagnosticCategory.Error, key: "Decorators_are_not_valid_here_1206", message: "Decorators are not valid here." }, Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: { code: 1207, category: ts.DiagnosticCategory.Error, key: "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", message: "Decorators cannot be applied to multiple get/set accessors of the same name." }, Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided: { code: 1208, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208", message: "Cannot compile namespaces when the '--isolatedModules' flag is provided." }, @@ -2428,7 +3081,7 @@ var ts; Invalid_use_of_0_Modules_are_automatically_in_strict_mode: { code: 1215, category: ts.DiagnosticCategory.Error, key: "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", message: "Invalid use of '{0}'. Modules are automatically in strict mode." }, Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: ts.DiagnosticCategory.Error, key: "Export_assignment_is_not_supported_when_module_flag_is_system_1218", message: "Export assignment is not supported when '--module' flag is 'system'." }, Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning: { code: 1219, category: ts.DiagnosticCategory.Error, key: "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", message: "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning." }, - Generators_are_only_available_when_targeting_ECMAScript_6_or_higher: { code: 1220, category: ts.DiagnosticCategory.Error, key: "Generators_are_only_available_when_targeting_ECMAScript_6_or_higher_1220", message: "Generators are only available when targeting ECMAScript 6 or higher." }, + Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher: { code: 1220, category: ts.DiagnosticCategory.Error, key: "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220", message: "Generators are only available when targeting ECMAScript 2015 or higher." }, Generators_are_not_allowed_in_an_ambient_context: { code: 1221, category: ts.DiagnosticCategory.Error, key: "Generators_are_not_allowed_in_an_ambient_context_1221", message: "Generators are not allowed in an ambient context." }, An_overload_signature_cannot_be_declared_as_a_generator: { code: 1222, category: ts.DiagnosticCategory.Error, key: "An_overload_signature_cannot_be_declared_as_a_generator_1222", message: "An overload signature cannot be declared as a generator." }, _0_tag_already_specified: { code: 1223, category: ts.DiagnosticCategory.Error, key: "_0_tag_already_specified_1223", message: "'{0}' tag already specified." }, @@ -2450,7 +3103,7 @@ var ts; Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression: { code: 1239, category: ts.DiagnosticCategory.Error, key: "Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239", message: "Unable to resolve signature of parameter decorator when called as an expression." }, Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression: { code: 1240, category: ts.DiagnosticCategory.Error, key: "Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240", message: "Unable to resolve signature of property decorator when called as an expression." }, Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression: { code: 1241, category: ts.DiagnosticCategory.Error, key: "Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241", message: "Unable to resolve signature of method decorator when called as an expression." }, - abstract_modifier_can_only_appear_on_a_class_or_method_declaration: { code: 1242, category: ts.DiagnosticCategory.Error, key: "abstract_modifier_can_only_appear_on_a_class_or_method_declaration_1242", message: "'abstract' modifier can only appear on a class or method declaration." }, + abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration: { code: 1242, category: ts.DiagnosticCategory.Error, key: "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242", message: "'abstract' modifier can only appear on a class, method, or property declaration." }, _0_modifier_cannot_be_used_with_1_modifier: { code: 1243, category: ts.DiagnosticCategory.Error, key: "_0_modifier_cannot_be_used_with_1_modifier_1243", message: "'{0}' modifier cannot be used with '{1}' modifier." }, Abstract_methods_can_only_appear_within_an_abstract_class: { code: 1244, category: ts.DiagnosticCategory.Error, key: "Abstract_methods_can_only_appear_within_an_abstract_class_1244", message: "Abstract methods can only appear within an abstract class." }, Method_0_cannot_have_an_implementation_because_it_is_marked_abstract: { code: 1245, category: ts.DiagnosticCategory.Error, key: "Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245", message: "Method '{0}' cannot have an implementation because it is marked abstract." }, @@ -2458,11 +3111,19 @@ var ts; A_type_literal_property_cannot_have_an_initializer: { code: 1247, category: ts.DiagnosticCategory.Error, key: "A_type_literal_property_cannot_have_an_initializer_1247", message: "A type literal property cannot have an initializer." }, A_class_member_cannot_have_the_0_keyword: { code: 1248, category: ts.DiagnosticCategory.Error, key: "A_class_member_cannot_have_the_0_keyword_1248", message: "A class member cannot have the '{0}' keyword." }, A_decorator_can_only_decorate_a_method_implementation_not_an_overload: { code: 1249, category: ts.DiagnosticCategory.Error, key: "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249", message: "A decorator can only decorate a method implementation, not an overload." }, + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5: { code: 1250, category: ts.DiagnosticCategory.Error, key: "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250", message: "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'." }, + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode: { code: 1251, category: ts.DiagnosticCategory.Error, key: "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251", message: "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode." }, + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode: { code: 1252, category: ts.DiagnosticCategory.Error, key: "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252", message: "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode." }, + _0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag: { code: 1253, category: ts.DiagnosticCategory.Error, key: "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253", message: "'{0}' tag cannot be used independently as a top level JSDoc tag." }, with_statements_are_not_allowed_in_an_async_function_block: { code: 1300, category: ts.DiagnosticCategory.Error, key: "with_statements_are_not_allowed_in_an_async_function_block_1300", message: "'with' statements are not allowed in an async function block." }, await_expression_is_only_allowed_within_an_async_function: { code: 1308, category: ts.DiagnosticCategory.Error, key: "await_expression_is_only_allowed_within_an_async_function_1308", message: "'await' expression is only allowed within an async function." }, - Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1311, category: ts.DiagnosticCategory.Error, key: "Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher_1311", message: "Async functions are only available when targeting ECMAScript 6 and higher." }, + Async_functions_are_only_available_when_targeting_ECMAScript_2015_or_higher: { code: 1311, category: ts.DiagnosticCategory.Error, key: "Async_functions_are_only_available_when_targeting_ECMAScript_2015_or_higher_1311", message: "Async functions are only available when targeting ECMAScript 2015 or higher." }, can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment: { code: 1312, category: ts.DiagnosticCategory.Error, key: "can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312", message: "'=' can only be used in an object literal property inside a destructuring assignment." }, The_body_of_an_if_statement_cannot_be_the_empty_statement: { code: 1313, category: ts.DiagnosticCategory.Error, key: "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", message: "The body of an 'if' statement cannot be the empty statement." }, + Global_module_exports_may_only_appear_in_module_files: { code: 1314, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_in_module_files_1314", message: "Global module exports may only appear in module files." }, + Global_module_exports_may_only_appear_in_declaration_files: { code: 1315, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_in_declaration_files_1315", message: "Global module exports may only appear in declaration files." }, + Global_module_exports_may_only_appear_at_top_level: { code: 1316, category: ts.DiagnosticCategory.Error, key: "Global_module_exports_may_only_appear_at_top_level_1316", message: "Global module exports may only appear at top level." }, + A_parameter_property_cannot_be_declared_using_a_rest_parameter: { code: 1317, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", message: "A parameter property cannot be declared using a rest parameter." }, Duplicate_identifier_0: { code: 2300, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_2300", message: "Duplicate identifier '{0}'." }, Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: ts.DiagnosticCategory.Error, key: "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", message: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, Static_members_cannot_reference_class_type_parameters: { code: 2302, category: ts.DiagnosticCategory.Error, key: "Static_members_cannot_reference_class_type_parameters_2302", message: "Static members cannot reference class type parameters." }, @@ -2514,7 +3175,7 @@ var ts; Cannot_invoke_an_expression_whose_type_lacks_a_call_signature: { code: 2349, category: ts.DiagnosticCategory.Error, key: "Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_2349", message: "Cannot invoke an expression whose type lacks a call signature." }, Only_a_void_function_can_be_called_with_the_new_keyword: { code: 2350, category: ts.DiagnosticCategory.Error, key: "Only_a_void_function_can_be_called_with_the_new_keyword_2350", message: "Only a void function can be called with the 'new' keyword." }, Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: ts.DiagnosticCategory.Error, key: "Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351", message: "Cannot use 'new' with an expression whose type lacks a call or construct signature." }, - Neither_type_0_nor_type_1_is_assignable_to_the_other: { code: 2352, category: ts.DiagnosticCategory.Error, key: "Neither_type_0_nor_type_1_is_assignable_to_the_other_2352", message: "Neither type '{0}' nor type '{1}' is assignable to the other." }, + Type_0_cannot_be_converted_to_type_1: { code: 2352, category: ts.DiagnosticCategory.Error, key: "Type_0_cannot_be_converted_to_type_1_2352", message: "Type '{0}' cannot be converted to type '{1}'." }, Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: { code: 2353, category: ts.DiagnosticCategory.Error, key: "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", message: "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'." }, No_best_common_type_exists_among_return_expressions: { code: 2354, category: ts.DiagnosticCategory.Error, key: "No_best_common_type_exists_among_return_expressions_2354", message: "No best common type exists among return expressions." }, A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value: { code: 2355, category: ts.DiagnosticCategory.Error, key: "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355", message: "A function whose declared type is neither 'void' nor 'any' must return a value." }, @@ -2528,6 +3189,7 @@ var ts; The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: ts.DiagnosticCategory.Error, key: "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363", message: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." }, Invalid_left_hand_side_of_assignment_expression: { code: 2364, category: ts.DiagnosticCategory.Error, key: "Invalid_left_hand_side_of_assignment_expression_2364", message: "Invalid left-hand side of assignment expression." }, Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: ts.DiagnosticCategory.Error, key: "Operator_0_cannot_be_applied_to_types_1_and_2_2365", message: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." }, + Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: { code: 2366, category: ts.DiagnosticCategory.Error, key: "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", message: "Function lacks ending return statement and return type does not include 'undefined'." }, Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type_parameter_name_cannot_be_0_2368", message: "Type parameter name cannot be '{0}'" }, A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: ts.DiagnosticCategory.Error, key: "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", message: "A parameter property is only allowed in a constructor implementation." }, A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: ts.DiagnosticCategory.Error, key: "A_rest_parameter_must_be_of_an_array_type_2370", message: "A rest parameter must be of an array type." }, @@ -2543,7 +3205,7 @@ var ts; get_and_set_accessor_must_have_the_same_type: { code: 2380, category: ts.DiagnosticCategory.Error, key: "get_and_set_accessor_must_have_the_same_type_2380", message: "'get' and 'set' accessor must have the same type." }, A_signature_with_an_implementation_cannot_use_a_string_literal_type: { code: 2381, category: ts.DiagnosticCategory.Error, key: "A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381", message: "A signature with an implementation cannot use a string literal type." }, Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: { code: 2382, category: ts.DiagnosticCategory.Error, key: "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382", message: "Specialized overload signature is not assignable to any non-specialized signature." }, - Overload_signatures_must_all_be_exported_or_not_exported: { code: 2383, category: ts.DiagnosticCategory.Error, key: "Overload_signatures_must_all_be_exported_or_not_exported_2383", message: "Overload signatures must all be exported or not exported." }, + Overload_signatures_must_all_be_exported_or_non_exported: { code: 2383, category: ts.DiagnosticCategory.Error, key: "Overload_signatures_must_all_be_exported_or_non_exported_2383", message: "Overload signatures must all be exported or non-exported." }, Overload_signatures_must_all_be_ambient_or_non_ambient: { code: 2384, category: ts.DiagnosticCategory.Error, key: "Overload_signatures_must_all_be_ambient_or_non_ambient_2384", message: "Overload signatures must all be ambient or non-ambient." }, Overload_signatures_must_all_be_public_private_or_protected: { code: 2385, category: ts.DiagnosticCategory.Error, key: "Overload_signatures_must_all_be_public_private_or_protected_2385", message: "Overload signatures must all be public, private or protected." }, Overload_signatures_must_all_be_optional_or_required: { code: 2386, category: ts.DiagnosticCategory.Error, key: "Overload_signatures_must_all_be_optional_or_required_2386", message: "Overload signatures must all be optional or required." }, @@ -2576,7 +3238,6 @@ var ts; Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class_name_cannot_be_0_2414", message: "Class name cannot be '{0}'" }, Class_0_incorrectly_extends_base_class_1: { code: 2415, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_extends_base_class_1_2415", message: "Class '{0}' incorrectly extends base class '{1}'." }, Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: ts.DiagnosticCategory.Error, key: "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", message: "Class static side '{0}' incorrectly extends base class static side '{1}'." }, - Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0: { code: 2419, category: ts.DiagnosticCategory.Error, key: "Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0_2419", message: "Type name '{0}' in extends clause does not reference constructor function for '{0}'." }, Class_0_incorrectly_implements_interface_1: { code: 2420, category: ts.DiagnosticCategory.Error, key: "Class_0_incorrectly_implements_interface_1_2420", message: "Class '{0}' incorrectly implements interface '{1}'." }, A_class_may_only_implement_another_class_or_interface: { code: 2422, category: ts.DiagnosticCategory.Error, key: "A_class_may_only_implement_another_class_or_interface_2422", message: "A class may only implement another class or interface." }, Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: { code: 2423, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", message: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor." }, @@ -2584,7 +3245,7 @@ var ts; Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", message: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." }, Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: ts.DiagnosticCategory.Error, key: "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", message: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." }, Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface_name_cannot_be_0_2427", message: "Interface name cannot be '{0}'" }, - All_declarations_of_an_interface_must_have_identical_type_parameters: { code: 2428, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_an_interface_must_have_identical_type_parameters_2428", message: "All declarations of an interface must have identical type parameters." }, + All_declarations_of_0_must_have_identical_type_parameters: { code: 2428, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_type_parameters_2428", message: "All declarations of '{0}' must have identical type parameters." }, Interface_0_incorrectly_extends_interface_1: { code: 2430, category: ts.DiagnosticCategory.Error, key: "Interface_0_incorrectly_extends_interface_1_2430", message: "Interface '{0}' incorrectly extends interface '{1}'." }, Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum_name_cannot_be_0_2431", message: "Enum name cannot be '{0}'" }, In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: ts.DiagnosticCategory.Error, key: "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", message: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." }, @@ -2604,11 +3265,12 @@ var ts; Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: ts.DiagnosticCategory.Error, key: "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446", message: "Property '{0}' is protected and only accessible through an instance of class '{1}'." }, The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: ts.DiagnosticCategory.Error, key: "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", message: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." }, Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: ts.DiagnosticCategory.Error, key: "Block_scoped_variable_0_used_before_its_declaration_2448", message: "Block-scoped variable '{0}' used before its declaration." }, - The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant: { code: 2449, category: ts.DiagnosticCategory.Error, key: "The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant_2449", message: "The operand of an increment or decrement operator cannot be a constant." }, - Left_hand_side_of_assignment_expression_cannot_be_a_constant: { code: 2450, category: ts.DiagnosticCategory.Error, key: "Left_hand_side_of_assignment_expression_cannot_be_a_constant_2450", message: "Left-hand side of assignment expression cannot be a constant." }, + The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant_or_a_read_only_property: { code: 2449, category: ts.DiagnosticCategory.Error, key: "The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant_or_a_read_only_property_2449", message: "The operand of an increment or decrement operator cannot be a constant or a read-only property." }, + Left_hand_side_of_assignment_expression_cannot_be_a_constant_or_a_read_only_property: { code: 2450, category: ts.DiagnosticCategory.Error, key: "Left_hand_side_of_assignment_expression_cannot_be_a_constant_or_a_read_only_property_2450", message: "Left-hand side of assignment expression cannot be a constant or a read-only property." }, Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: ts.DiagnosticCategory.Error, key: "Cannot_redeclare_block_scoped_variable_0_2451", message: "Cannot redeclare block-scoped variable '{0}'." }, An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: ts.DiagnosticCategory.Error, key: "An_enum_member_cannot_have_a_numeric_name_2452", message: "An enum member cannot have a numeric name." }, The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: ts.DiagnosticCategory.Error, key: "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453", message: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." }, + Variable_0_is_used_before_being_assigned: { code: 2454, category: ts.DiagnosticCategory.Error, key: "Variable_0_is_used_before_being_assigned_2454", message: "Variable '{0}' is used before being assigned." }, Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: ts.DiagnosticCategory.Error, key: "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455", message: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." }, Type_alias_0_circularly_references_itself: { code: 2456, category: ts.DiagnosticCategory.Error, key: "Type_alias_0_circularly_references_itself_2456", message: "Type alias '{0}' circularly references itself." }, Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type_alias_name_cannot_be_0_2457", message: "Type alias name cannot be '{0}'" }, @@ -2638,8 +3300,8 @@ var ts; Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: ts.DiagnosticCategory.Error, key: "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", message: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." }, The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", message: "The left-hand side of a 'for...of' statement cannot use a type annotation." }, Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export_declaration_conflicts_with_exported_declaration_of_0_2484", message: "Export declaration conflicts with exported declaration of '{0}'" }, - The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant: { code: 2485, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant_2485", message: "The left-hand side of a 'for...of' statement cannot be a previously defined constant." }, - The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant: { code: 2486, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant_2486", message: "The left-hand side of a 'for...in' statement cannot be a previously defined constant." }, + The_left_hand_side_of_a_for_of_statement_cannot_be_a_constant_or_a_read_only_property: { code: 2485, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_of_statement_cannot_be_a_constant_or_a_read_only_property_2485", message: "The left-hand side of a 'for...of' statement cannot be a constant or a read-only property." }, + The_left_hand_side_of_a_for_in_statement_cannot_be_a_constant_or_a_read_only_property: { code: 2486, category: ts.DiagnosticCategory.Error, key: "The_left_hand_side_of_a_for_in_statement_cannot_be_a_constant_or_a_read_only_property_2486", message: "The left-hand side of a 'for...in' statement cannot be a constant or a read-only property." }, Invalid_left_hand_side_in_for_of_statement: { code: 2487, category: ts.DiagnosticCategory.Error, key: "Invalid_left_hand_side_in_for_of_statement_2487", message: "Invalid left-hand side in 'for...of' statement." }, Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: ts.DiagnosticCategory.Error, key: "Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", message: "Type must have a '[Symbol.iterator]()' method that returns an iterator." }, An_iterator_must_have_a_next_method: { code: 2489, category: ts.DiagnosticCategory.Error, key: "An_iterator_must_have_a_next_method_2489", message: "An iterator must have a 'next()' method." }, @@ -2665,7 +3327,7 @@ var ts; Base_constructor_return_type_0_is_not_a_class_or_interface_type: { code: 2509, category: ts.DiagnosticCategory.Error, key: "Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509", message: "Base constructor return type '{0}' is not a class or interface type." }, Base_constructors_must_all_have_the_same_return_type: { code: 2510, category: ts.DiagnosticCategory.Error, key: "Base_constructors_must_all_have_the_same_return_type_2510", message: "Base constructors must all have the same return type." }, Cannot_create_an_instance_of_the_abstract_class_0: { code: 2511, category: ts.DiagnosticCategory.Error, key: "Cannot_create_an_instance_of_the_abstract_class_0_2511", message: "Cannot create an instance of the abstract class '{0}'." }, - Overload_signatures_must_all_be_abstract_or_not_abstract: { code: 2512, category: ts.DiagnosticCategory.Error, key: "Overload_signatures_must_all_be_abstract_or_not_abstract_2512", message: "Overload signatures must all be abstract or not abstract." }, + Overload_signatures_must_all_be_abstract_or_non_abstract: { code: 2512, category: ts.DiagnosticCategory.Error, key: "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", message: "Overload signatures must all be abstract or non-abstract." }, Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: { code: 2513, category: ts.DiagnosticCategory.Error, key: "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", message: "Abstract method '{0}' in class '{1}' cannot be accessed via super expression." }, Classes_containing_abstract_methods_must_be_marked_abstract: { code: 2514, category: ts.DiagnosticCategory.Error, key: "Classes_containing_abstract_methods_must_be_marked_abstract_2514", message: "Classes containing abstract methods must be marked abstract." }, Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: { code: 2515, category: ts.DiagnosticCategory.Error, key: "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", message: "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'." }, @@ -2682,6 +3344,12 @@ var ts; The_inferred_type_of_0_references_an_inaccessible_this_type_A_type_annotation_is_necessary: { code: 2527, category: ts.DiagnosticCategory.Error, key: "The_inferred_type_of_0_references_an_inaccessible_this_type_A_type_annotation_is_necessary_2527", message: "The inferred type of '{0}' references an inaccessible 'this' type. A type annotation is necessary." }, A_module_cannot_have_multiple_default_exports: { code: 2528, category: ts.DiagnosticCategory.Error, key: "A_module_cannot_have_multiple_default_exports_2528", message: "A module cannot have multiple default exports." }, Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions: { code: 2529, category: ts.DiagnosticCategory.Error, key: "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529", message: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions." }, + Property_0_is_incompatible_with_index_signature: { code: 2530, category: ts.DiagnosticCategory.Error, key: "Property_0_is_incompatible_with_index_signature_2530", message: "Property '{0}' is incompatible with index signature." }, + Object_is_possibly_null: { code: 2531, category: ts.DiagnosticCategory.Error, key: "Object_is_possibly_null_2531", message: "Object is possibly 'null'." }, + Object_is_possibly_undefined: { code: 2532, category: ts.DiagnosticCategory.Error, key: "Object_is_possibly_undefined_2532", message: "Object is possibly 'undefined'." }, + Object_is_possibly_null_or_undefined: { code: 2533, category: ts.DiagnosticCategory.Error, key: "Object_is_possibly_null_or_undefined_2533", message: "Object is possibly 'null' or 'undefined'." }, + A_function_returning_never_cannot_have_a_reachable_end_point: { code: 2534, category: ts.DiagnosticCategory.Error, key: "A_function_returning_never_cannot_have_a_reachable_end_point_2534", message: "A function returning 'never' cannot have a reachable end point." }, + Enum_type_0_has_members_with_initializers_that_are_not_literals: { code: 2535, category: ts.DiagnosticCategory.Error, key: "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535", message: "Enum type '{0}' has members with initializers that are not literals." }, JSX_element_attributes_type_0_may_not_be_a_union_type: { code: 2600, category: ts.DiagnosticCategory.Error, key: "JSX_element_attributes_type_0_may_not_be_a_union_type_2600", message: "JSX element attributes type '{0}' may not be a union type." }, The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: { code: 2601, category: ts.DiagnosticCategory.Error, key: "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601", message: "The return type of a JSX element constructor must return an object type." }, JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: { code: 2602, category: ts.DiagnosticCategory.Error, key: "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", message: "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist." }, @@ -2701,17 +3369,37 @@ var ts; Type_0_provides_no_match_for_the_signature_1: { code: 2658, category: ts.DiagnosticCategory.Error, key: "Type_0_provides_no_match_for_the_signature_1_2658", message: "Type '{0}' provides no match for the signature '{1}'" }, super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: { code: 2659, category: ts.DiagnosticCategory.Error, key: "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", message: "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher." }, super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: { code: 2660, category: ts.DiagnosticCategory.Error, key: "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", message: "'super' can only be referenced in members of derived classes or object literal expressions." }, - Cannot_re_export_name_that_is_not_defined_in_the_module: { code: 2661, category: ts.DiagnosticCategory.Error, key: "Cannot_re_export_name_that_is_not_defined_in_the_module_2661", message: "Cannot re-export name that is not defined in the module." }, + Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: { code: 2661, category: ts.DiagnosticCategory.Error, key: "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", message: "Cannot export '{0}'. Only local declarations can be exported from a module." }, Cannot_find_name_0_Did_you_mean_the_static_member_1_0: { code: 2662, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", message: "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?" }, Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: { code: 2663, category: ts.DiagnosticCategory.Error, key: "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", message: "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?" }, Invalid_module_name_in_augmentation_module_0_cannot_be_found: { code: 2664, category: ts.DiagnosticCategory.Error, key: "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", message: "Invalid module name in augmentation, module '{0}' cannot be found." }, - Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope: { code: 2665, category: ts.DiagnosticCategory.Error, key: "Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope_2665", message: "Module augmentation cannot introduce new names in the top level scope." }, Exports_and_export_assignments_are_not_permitted_in_module_augmentations: { code: 2666, category: ts.DiagnosticCategory.Error, key: "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", message: "Exports and export assignments are not permitted in module augmentations." }, Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: { code: 2667, category: ts.DiagnosticCategory.Error, key: "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", message: "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module." }, export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: { code: 2668, category: ts.DiagnosticCategory.Error, key: "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", message: "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible." }, Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: { code: 2669, category: ts.DiagnosticCategory.Error, key: "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", message: "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations." }, Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: { code: 2670, category: ts.DiagnosticCategory.Error, key: "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", message: "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context." }, Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity: { code: 2671, category: ts.DiagnosticCategory.Error, key: "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671", message: "Cannot augment module '{0}' because it resolves to a non-module entity." }, + Cannot_assign_a_0_constructor_type_to_a_1_constructor_type: { code: 2672, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672", message: "Cannot assign a '{0}' constructor type to a '{1}' constructor type." }, + Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration: { code: 2673, category: ts.DiagnosticCategory.Error, key: "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673", message: "Constructor of class '{0}' is private and only accessible within the class declaration." }, + Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration: { code: 2674, category: ts.DiagnosticCategory.Error, key: "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674", message: "Constructor of class '{0}' is protected and only accessible within the class declaration." }, + Cannot_extend_a_class_0_Class_constructor_is_marked_as_private: { code: 2675, category: ts.DiagnosticCategory.Error, key: "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675", message: "Cannot extend a class '{0}'. Class constructor is marked as private." }, + Accessors_must_both_be_abstract_or_non_abstract: { code: 2676, category: ts.DiagnosticCategory.Error, key: "Accessors_must_both_be_abstract_or_non_abstract_2676", message: "Accessors must both be abstract or non-abstract." }, + A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type: { code: 2677, category: ts.DiagnosticCategory.Error, key: "A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677", message: "A type predicate's type must be assignable to its parameter's type." }, + Type_0_is_not_comparable_to_type_1: { code: 2678, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_comparable_to_type_1_2678", message: "Type '{0}' is not comparable to type '{1}'." }, + A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void: { code: 2679, category: ts.DiagnosticCategory.Error, key: "A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679", message: "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'." }, + A_this_parameter_must_be_the_first_parameter: { code: 2680, category: ts.DiagnosticCategory.Error, key: "A_this_parameter_must_be_the_first_parameter_2680", message: "A 'this' parameter must be the first parameter." }, + A_constructor_cannot_have_a_this_parameter: { code: 2681, category: ts.DiagnosticCategory.Error, key: "A_constructor_cannot_have_a_this_parameter_2681", message: "A constructor cannot have a 'this' parameter." }, + get_and_set_accessor_must_have_the_same_this_type: { code: 2682, category: ts.DiagnosticCategory.Error, key: "get_and_set_accessor_must_have_the_same_this_type_2682", message: "'get' and 'set' accessor must have the same 'this' type." }, + this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation: { code: 2683, category: ts.DiagnosticCategory.Error, key: "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683", message: "'this' implicitly has type 'any' because it does not have a type annotation." }, + The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1: { code: 2684, category: ts.DiagnosticCategory.Error, key: "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684", message: "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'." }, + The_this_types_of_each_signature_are_incompatible: { code: 2685, category: ts.DiagnosticCategory.Error, key: "The_this_types_of_each_signature_are_incompatible_2685", message: "The 'this' types of each signature are incompatible." }, + Identifier_0_must_be_imported_from_a_module: { code: 2686, category: ts.DiagnosticCategory.Error, key: "Identifier_0_must_be_imported_from_a_module_2686", message: "Identifier '{0}' must be imported from a module" }, + All_declarations_of_0_must_have_identical_modifiers: { code: 2687, category: ts.DiagnosticCategory.Error, key: "All_declarations_of_0_must_have_identical_modifiers_2687", message: "All declarations of '{0}' must have identical modifiers." }, + Cannot_find_type_definition_file_for_0: { code: 2688, category: ts.DiagnosticCategory.Error, key: "Cannot_find_type_definition_file_for_0_2688", message: "Cannot find type definition file for '{0}'." }, + Cannot_extend_an_interface_0_Did_you_mean_implements: { code: 2689, category: ts.DiagnosticCategory.Error, key: "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", message: "Cannot extend an interface '{0}'. Did you mean 'implements'?" }, + A_class_must_be_declared_after_its_base_class: { code: 2690, category: ts.DiagnosticCategory.Error, key: "A_class_must_be_declared_after_its_base_class_2690", message: "A class must be declared after its base class." }, + An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead: { code: 2691, category: ts.DiagnosticCategory.Error, key: "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", message: "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead." }, + _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: { code: 2692, category: ts.DiagnosticCategory.Error, key: "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", message: "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible." }, Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." }, Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, @@ -2782,8 +3470,11 @@ var ts; Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078", message: "Parameter '{0}' of exported function has or is using private name '{1}'." }, Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: ts.DiagnosticCategory.Error, key: "Exported_type_alias_0_has_or_is_using_private_name_1_4081", message: "Exported type alias '{0}' has or is using private name '{1}'." }, Default_export_of_the_module_has_or_is_using_private_name_0: { code: 4082, category: ts.DiagnosticCategory.Error, key: "Default_export_of_the_module_has_or_is_using_private_name_0_4082", message: "Default export of the module has or is using private name '{0}'." }, + Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: { code: 4090, category: ts.DiagnosticCategory.Message, key: "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", message: "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict." }, The_current_host_does_not_support_the_0_option: { code: 5001, category: ts.DiagnosticCategory.Error, key: "The_current_host_does_not_support_the_0_option_5001", message: "The current host does not support the '{0}' option." }, Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: ts.DiagnosticCategory.Error, key: "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", message: "Cannot find the common subdirectory path for the input files." }, + File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5010, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", message: "File specification cannot end in a recursive directory wildcard ('**'): '{0}'." }, + File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0: { code: 5011, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0_5011", message: "File specification cannot contain multiple recursive directory wildcards ('**'): '{0}'." }, Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot_read_file_0_Colon_1_5012", message: "Cannot read file '{0}': {1}" }, Unsupported_file_encoding: { code: 5013, category: ts.DiagnosticCategory.Error, key: "Unsupported_file_encoding_5013", message: "Unsupported file encoding." }, Failed_to_parse_file_0_Colon_1: { code: 5014, category: ts.DiagnosticCategory.Error, key: "Failed_to_parse_file_0_Colon_1_5014", message: "Failed to parse file '{0}': {1}." }, @@ -2792,7 +3483,7 @@ var ts; Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could_not_write_file_0_Colon_1_5033", message: "Could not write file '{0}': {1}" }, Option_project_cannot_be_mixed_with_source_files_on_a_command_line: { code: 5042, category: ts.DiagnosticCategory.Error, key: "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", message: "Option 'project' cannot be mixed with source files on a command line." }, Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: { code: 5047, category: ts.DiagnosticCategory.Error, key: "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", message: "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher." }, - Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: { code: 5051, category: ts.DiagnosticCategory.Error, key: "Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_prov_5051", message: "Option 'inlineSources' can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided." }, + Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: { code: 5051, category: ts.DiagnosticCategory.Error, key: "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", message: "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided." }, Option_0_cannot_be_specified_without_specifying_option_1: { code: 5052, category: ts.DiagnosticCategory.Error, key: "Option_0_cannot_be_specified_without_specifying_option_1_5052", message: "Option '{0}' cannot be specified without specifying option '{1}'." }, Option_0_cannot_be_specified_with_option_1: { code: 5053, category: ts.DiagnosticCategory.Error, key: "Option_0_cannot_be_specified_with_option_1_5053", message: "Option '{0}' cannot be specified with option '{1}'." }, A_tsconfig_json_file_is_already_defined_at_Colon_0: { code: 5054, category: ts.DiagnosticCategory.Error, key: "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", message: "A 'tsconfig.json' file is already defined at: '{0}'." }, @@ -2800,11 +3491,18 @@ var ts; Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: { code: 5056, category: ts.DiagnosticCategory.Error, key: "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", message: "Cannot write file '{0}' because it would be overwritten by multiple input files." }, Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: { code: 5057, category: ts.DiagnosticCategory.Error, key: "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", message: "Cannot find a tsconfig.json file at the specified directory: '{0}'" }, The_specified_path_does_not_exist_Colon_0: { code: 5058, category: ts.DiagnosticCategory.Error, key: "The_specified_path_does_not_exist_Colon_0_5058", message: "The specified path does not exist: '{0}'" }, - Invalide_value_for_reactNamespace_0_is_not_a_valid_identifier: { code: 5059, category: ts.DiagnosticCategory.Error, key: "Invalide_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", message: "Invalide value for '--reactNamespace'. '{0}' is not a valid identifier." }, + Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: { code: 5059, category: ts.DiagnosticCategory.Error, key: "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", message: "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier." }, + Option_paths_cannot_be_used_without_specifying_baseUrl_option: { code: 5060, category: ts.DiagnosticCategory.Error, key: "Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060", message: "Option 'paths' cannot be used without specifying '--baseUrl' option." }, + Pattern_0_can_have_at_most_one_Asterisk_character: { code: 5061, category: ts.DiagnosticCategory.Error, key: "Pattern_0_can_have_at_most_one_Asterisk_character_5061", message: "Pattern '{0}' can have at most one '*' character" }, + Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character: { code: 5062, category: ts.DiagnosticCategory.Error, key: "Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062", message: "Substitution '{0}' in pattern '{1}' in can have at most one '*' character" }, + Substitutions_for_pattern_0_should_be_an_array: { code: 5063, category: ts.DiagnosticCategory.Error, key: "Substitutions_for_pattern_0_should_be_an_array_5063", message: "Substitutions for pattern '{0}' should be an array." }, + Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: { code: 5064, category: ts.DiagnosticCategory.Error, key: "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", message: "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'." }, + File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: { code: 5065, category: ts.DiagnosticCategory.Error, key: "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", message: "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'." }, + Substitutions_for_pattern_0_shouldn_t_be_an_empty_array: { code: 5066, category: ts.DiagnosticCategory.Error, key: "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066", message: "Substitutions for pattern '{0}' shouldn't be an empty array." }, Concatenate_and_emit_output_to_single_file: { code: 6001, category: ts.DiagnosticCategory.Message, key: "Concatenate_and_emit_output_to_single_file_6001", message: "Concatenate and emit output to single file." }, Generates_corresponding_d_ts_file: { code: 6002, category: ts.DiagnosticCategory.Message, key: "Generates_corresponding_d_ts_file_6002", message: "Generates corresponding '.d.ts' file." }, - Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: { code: 6003, category: ts.DiagnosticCategory.Message, key: "Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003", message: "Specifies the location where debugger should locate map files instead of generated locations." }, - Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: { code: 6004, category: ts.DiagnosticCategory.Message, key: "Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004", message: "Specifies the location where debugger should locate TypeScript files instead of source locations." }, + Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: { code: 6003, category: ts.DiagnosticCategory.Message, key: "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003", message: "Specify the location where debugger should locate map files instead of generated locations." }, + Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: { code: 6004, category: ts.DiagnosticCategory.Message, key: "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004", message: "Specify the location where debugger should locate TypeScript files instead of source locations." }, Watch_input_files: { code: 6005, category: ts.DiagnosticCategory.Message, key: "Watch_input_files_6005", message: "Watch input files." }, Redirect_output_structure_to_the_directory: { code: 6006, category: ts.DiagnosticCategory.Message, key: "Redirect_output_structure_to_the_directory_6006", message: "Redirect output structure to the directory." }, Do_not_erase_const_enum_declarations_in_generated_code: { code: 6007, category: ts.DiagnosticCategory.Message, key: "Do_not_erase_const_enum_declarations_in_generated_code_6007", message: "Do not erase const enum declarations in generated code." }, @@ -2812,7 +3510,8 @@ var ts; Do_not_emit_comments_to_output: { code: 6009, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_comments_to_output_6009", message: "Do not emit comments to output." }, Do_not_emit_outputs: { code: 6010, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_outputs_6010", message: "Do not emit outputs." }, Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: { code: 6011, category: ts.DiagnosticCategory.Message, key: "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", message: "Allow default imports from modules with no default export. This does not affect code emit, just typechecking." }, - Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015_experimental: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015_experimental_6015", message: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015' (experimental)" }, + Skip_type_checking_of_declaration_files: { code: 6012, category: ts.DiagnosticCategory.Message, key: "Skip_type_checking_of_declaration_files_6012", message: "Skip type checking of declaration files." }, + Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015_6015", message: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015'" }, Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015_6016", message: "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'" }, Print_this_message: { code: 6017, category: ts.DiagnosticCategory.Message, key: "Print_this_message_6017", message: "Print this message." }, Print_the_compiler_s_version: { code: 6019, category: ts.DiagnosticCategory.Message, key: "Print_the_compiler_s_version_6019", message: "Print the compiler's version." }, @@ -2834,8 +3533,7 @@ var ts; Generates_corresponding_map_file: { code: 6043, category: ts.DiagnosticCategory.Message, key: "Generates_corresponding_map_file_6043", message: "Generates corresponding '.map' file." }, Compiler_option_0_expects_an_argument: { code: 6044, category: ts.DiagnosticCategory.Error, key: "Compiler_option_0_expects_an_argument_6044", message: "Compiler option '{0}' expects an argument." }, Unterminated_quoted_string_in_response_file_0: { code: 6045, category: ts.DiagnosticCategory.Error, key: "Unterminated_quoted_string_in_response_file_0_6045", message: "Unterminated quoted string in response file '{0}'." }, - Argument_for_module_option_must_be_commonjs_amd_system_umd_es2015_or_none: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument_for_module_option_must_be_commonjs_amd_system_umd_es2015_or_none_6046", message: "Argument for '--module' option must be 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'none'." }, - Argument_for_target_option_must_be_ES3_ES5_or_ES2015: { code: 6047, category: ts.DiagnosticCategory.Error, key: "Argument_for_target_option_must_be_ES3_ES5_or_ES2015_6047", message: "Argument for '--target' option must be 'ES3', 'ES5', or 'ES2015'." }, + Argument_for_0_option_must_be_Colon_1: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument_for_0_option_must_be_Colon_1_6046", message: "Argument for '{0}' option must be: {1}" }, Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: ts.DiagnosticCategory.Error, key: "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", message: "Locale must be of the form or -. For example '{0}' or '{1}'." }, Unsupported_locale_0: { code: 6049, category: ts.DiagnosticCategory.Error, key: "Unsupported_locale_0_6049", message: "Unsupported locale '{0}'." }, Unable_to_open_file_0: { code: 6050, category: ts.DiagnosticCategory.Error, key: "Unable_to_open_file_0_6050", message: "Unable to open file '{0}'." }, @@ -2845,16 +3543,15 @@ var ts; File_0_has_unsupported_extension_The_only_supported_extensions_are_1: { code: 6054, category: ts.DiagnosticCategory.Error, key: "File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054", message: "File '{0}' has unsupported extension. The only supported extensions are {1}." }, Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: ts.DiagnosticCategory.Message, key: "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", message: "Suppress noImplicitAny errors for indexing objects lacking index signatures." }, Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", message: "Do not emit declarations for code that has an '@internal' annotation." }, - Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: { code: 6058, category: ts.DiagnosticCategory.Message, key: "Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDi_6058", message: "Specifies the root directory of input files. Use to control the output directory structure with --outDir." }, + Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: { code: 6058, category: ts.DiagnosticCategory.Message, key: "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", message: "Specify the root directory of input files. Use to control the output directory structure with --outDir." }, File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: { code: 6059, category: ts.DiagnosticCategory.Error, key: "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", message: "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files." }, - Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: { code: 6060, category: ts.DiagnosticCategory.Message, key: "Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", message: "Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)." }, + Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: { code: 6060, category: ts.DiagnosticCategory.Message, key: "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", message: "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)." }, NEWLINE: { code: 6061, category: ts.DiagnosticCategory.Message, key: "NEWLINE_6061", message: "NEWLINE" }, - Argument_for_newLine_option_must_be_CRLF_or_LF: { code: 6062, category: ts.DiagnosticCategory.Error, key: "Argument_for_newLine_option_must_be_CRLF_or_LF_6062", message: "Argument for '--newLine' option must be 'CRLF' or 'LF'." }, - Argument_for_moduleResolution_option_must_be_node_or_classic: { code: 6063, category: ts.DiagnosticCategory.Error, key: "Argument_for_moduleResolution_option_must_be_node_or_classic_6063", message: "Argument for '--moduleResolution' option must be 'node' or 'classic'." }, + Option_0_can_only_be_specified_in_tsconfig_json_file: { code: 6064, category: ts.DiagnosticCategory.Error, key: "Option_0_can_only_be_specified_in_tsconfig_json_file_6064", message: "Option '{0}' can only be specified in 'tsconfig.json' file." }, Enables_experimental_support_for_ES7_decorators: { code: 6065, category: ts.DiagnosticCategory.Message, key: "Enables_experimental_support_for_ES7_decorators_6065", message: "Enables experimental support for ES7 decorators." }, Enables_experimental_support_for_emitting_type_metadata_for_decorators: { code: 6066, category: ts.DiagnosticCategory.Message, key: "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", message: "Enables experimental support for emitting type metadata for decorators." }, Enables_experimental_support_for_ES7_async_functions: { code: 6068, category: ts.DiagnosticCategory.Message, key: "Enables_experimental_support_for_ES7_async_functions_6068", message: "Enables experimental support for ES7 async functions." }, - Specifies_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6: { code: 6069, category: ts.DiagnosticCategory.Message, key: "Specifies_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069", message: "Specifies module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)." }, + Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6: { code: 6069, category: ts.DiagnosticCategory.Message, key: "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069", message: "Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)." }, Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: { code: 6070, category: ts.DiagnosticCategory.Message, key: "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", message: "Initializes a TypeScript project and creates a tsconfig.json file." }, Successfully_created_a_tsconfig_json_file: { code: 6071, category: ts.DiagnosticCategory.Message, key: "Successfully_created_a_tsconfig_json_file_6071", message: "Successfully created a tsconfig.json file." }, Suppress_excess_property_checks_for_object_literals: { code: 6072, category: ts.DiagnosticCategory.Message, key: "Suppress_excess_property_checks_for_object_literals_6072", message: "Suppress excess property checks for object literals." }, @@ -2864,13 +3561,65 @@ var ts; Report_errors_for_fallthrough_cases_in_switch_statement: { code: 6076, category: ts.DiagnosticCategory.Message, key: "Report_errors_for_fallthrough_cases_in_switch_statement_6076", message: "Report errors for fallthrough cases in switch statement." }, Do_not_report_errors_on_unreachable_code: { code: 6077, category: ts.DiagnosticCategory.Message, key: "Do_not_report_errors_on_unreachable_code_6077", message: "Do not report errors on unreachable code." }, Disallow_inconsistently_cased_references_to_the_same_file: { code: 6078, category: ts.DiagnosticCategory.Message, key: "Disallow_inconsistently_cased_references_to_the_same_file_6078", message: "Disallow inconsistently-cased references to the same file." }, + Specify_library_files_to_be_included_in_the_compilation_Colon: { code: 6079, category: ts.DiagnosticCategory.Message, key: "Specify_library_files_to_be_included_in_the_compilation_Colon_6079", message: "Specify library files to be included in the compilation: " }, Specify_JSX_code_generation_Colon_preserve_or_react: { code: 6080, category: ts.DiagnosticCategory.Message, key: "Specify_JSX_code_generation_Colon_preserve_or_react_6080", message: "Specify JSX code generation: 'preserve' or 'react'" }, - Argument_for_jsx_must_be_preserve_or_react: { code: 6081, category: ts.DiagnosticCategory.Message, key: "Argument_for_jsx_must_be_preserve_or_react_6081", message: "Argument for '--jsx' must be 'preserve' or 'react'." }, Only_amd_and_system_modules_are_supported_alongside_0: { code: 6082, category: ts.DiagnosticCategory.Error, key: "Only_amd_and_system_modules_are_supported_alongside_0_6082", message: "Only 'amd' and 'system' modules are supported alongside --{0}." }, - Allow_javascript_files_to_be_compiled: { code: 6083, category: ts.DiagnosticCategory.Message, key: "Allow_javascript_files_to_be_compiled_6083", message: "Allow javascript files to be compiled." }, - Specifies_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit: { code: 6084, category: ts.DiagnosticCategory.Message, key: "Specifies_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit_6084", message: "Specifies the object invoked for createElement and __spread when targeting 'react' JSX emit" }, + Base_directory_to_resolve_non_absolute_module_names: { code: 6083, category: ts.DiagnosticCategory.Message, key: "Base_directory_to_resolve_non_absolute_module_names_6083", message: "Base directory to resolve non-absolute module names." }, + Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit: { code: 6084, category: ts.DiagnosticCategory.Message, key: "Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit_6084", message: "Specify the object invoked for createElement and __spread when targeting 'react' JSX emit" }, + Enable_tracing_of_the_name_resolution_process: { code: 6085, category: ts.DiagnosticCategory.Message, key: "Enable_tracing_of_the_name_resolution_process_6085", message: "Enable tracing of the name resolution process." }, + Resolving_module_0_from_1: { code: 6086, category: ts.DiagnosticCategory.Message, key: "Resolving_module_0_from_1_6086", message: "======== Resolving module '{0}' from '{1}'. ========" }, + Explicitly_specified_module_resolution_kind_Colon_0: { code: 6087, category: ts.DiagnosticCategory.Message, key: "Explicitly_specified_module_resolution_kind_Colon_0_6087", message: "Explicitly specified module resolution kind: '{0}'." }, + Module_resolution_kind_is_not_specified_using_0: { code: 6088, category: ts.DiagnosticCategory.Message, key: "Module_resolution_kind_is_not_specified_using_0_6088", message: "Module resolution kind is not specified, using '{0}'." }, + Module_name_0_was_successfully_resolved_to_1: { code: 6089, category: ts.DiagnosticCategory.Message, key: "Module_name_0_was_successfully_resolved_to_1_6089", message: "======== Module name '{0}' was successfully resolved to '{1}'. ========" }, + Module_name_0_was_not_resolved: { code: 6090, category: ts.DiagnosticCategory.Message, key: "Module_name_0_was_not_resolved_6090", message: "======== Module name '{0}' was not resolved. ========" }, + paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0: { code: 6091, category: ts.DiagnosticCategory.Message, key: "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091", message: "'paths' option is specified, looking for a pattern to match module name '{0}'." }, + Module_name_0_matched_pattern_1: { code: 6092, category: ts.DiagnosticCategory.Message, key: "Module_name_0_matched_pattern_1_6092", message: "Module name '{0}', matched pattern '{1}'." }, + Trying_substitution_0_candidate_module_location_Colon_1: { code: 6093, category: ts.DiagnosticCategory.Message, key: "Trying_substitution_0_candidate_module_location_Colon_1_6093", message: "Trying substitution '{0}', candidate module location: '{1}'." }, + Resolving_module_name_0_relative_to_base_url_1_2: { code: 6094, category: ts.DiagnosticCategory.Message, key: "Resolving_module_name_0_relative_to_base_url_1_2_6094", message: "Resolving module name '{0}' relative to base url '{1}' - '{2}'." }, + Loading_module_as_file_Slash_folder_candidate_module_location_0: { code: 6095, category: ts.DiagnosticCategory.Message, key: "Loading_module_as_file_Slash_folder_candidate_module_location_0_6095", message: "Loading module as file / folder, candidate module location '{0}'." }, + File_0_does_not_exist: { code: 6096, category: ts.DiagnosticCategory.Message, key: "File_0_does_not_exist_6096", message: "File '{0}' does not exist." }, + File_0_exist_use_it_as_a_name_resolution_result: { code: 6097, category: ts.DiagnosticCategory.Message, key: "File_0_exist_use_it_as_a_name_resolution_result_6097", message: "File '{0}' exist - use it as a name resolution result." }, + Loading_module_0_from_node_modules_folder: { code: 6098, category: ts.DiagnosticCategory.Message, key: "Loading_module_0_from_node_modules_folder_6098", message: "Loading module '{0}' from 'node_modules' folder." }, + Found_package_json_at_0: { code: 6099, category: ts.DiagnosticCategory.Message, key: "Found_package_json_at_0_6099", message: "Found 'package.json' at '{0}'." }, + package_json_does_not_have_types_field: { code: 6100, category: ts.DiagnosticCategory.Message, key: "package_json_does_not_have_types_field_6100", message: "'package.json' does not have 'types' field." }, + package_json_has_0_field_1_that_references_2: { code: 6101, category: ts.DiagnosticCategory.Message, key: "package_json_has_0_field_1_that_references_2_6101", message: "'package.json' has '{0}' field '{1}' that references '{2}'." }, + Allow_javascript_files_to_be_compiled: { code: 6102, category: ts.DiagnosticCategory.Message, key: "Allow_javascript_files_to_be_compiled_6102", message: "Allow javascript files to be compiled." }, Option_0_should_have_array_of_strings_as_a_value: { code: 6103, category: ts.DiagnosticCategory.Error, key: "Option_0_should_have_array_of_strings_as_a_value_6103", message: "Option '{0}' should have array of strings as a value." }, + Checking_if_0_is_the_longest_matching_prefix_for_1_2: { code: 6104, category: ts.DiagnosticCategory.Message, key: "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", message: "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'." }, + Expected_type_of_0_field_in_package_json_to_be_string_got_1: { code: 6105, category: ts.DiagnosticCategory.Message, key: "Expected_type_of_0_field_in_package_json_to_be_string_got_1_6105", message: "Expected type of '{0}' field in 'package.json' to be 'string', got '{1}'." }, + baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: { code: 6106, category: ts.DiagnosticCategory.Message, key: "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", message: "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'" }, + rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: { code: 6107, category: ts.DiagnosticCategory.Message, key: "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", message: "'rootDirs' option is set, using it to resolve relative module name '{0}'" }, + Longest_matching_prefix_for_0_is_1: { code: 6108, category: ts.DiagnosticCategory.Message, key: "Longest_matching_prefix_for_0_is_1_6108", message: "Longest matching prefix for '{0}' is '{1}'" }, + Loading_0_from_the_root_dir_1_candidate_location_2: { code: 6109, category: ts.DiagnosticCategory.Message, key: "Loading_0_from_the_root_dir_1_candidate_location_2_6109", message: "Loading '{0}' from the root dir '{1}', candidate location '{2}'" }, + Trying_other_entries_in_rootDirs: { code: 6110, category: ts.DiagnosticCategory.Message, key: "Trying_other_entries_in_rootDirs_6110", message: "Trying other entries in 'rootDirs'" }, + Module_resolution_using_rootDirs_has_failed: { code: 6111, category: ts.DiagnosticCategory.Message, key: "Module_resolution_using_rootDirs_has_failed_6111", message: "Module resolution using 'rootDirs' has failed" }, Do_not_emit_use_strict_directives_in_module_output: { code: 6112, category: ts.DiagnosticCategory.Message, key: "Do_not_emit_use_strict_directives_in_module_output_6112", message: "Do not emit 'use strict' directives in module output." }, + Enable_strict_null_checks: { code: 6113, category: ts.DiagnosticCategory.Message, key: "Enable_strict_null_checks_6113", message: "Enable strict null checks." }, + Unknown_option_excludes_Did_you_mean_exclude: { code: 6114, category: ts.DiagnosticCategory.Error, key: "Unknown_option_excludes_Did_you_mean_exclude_6114", message: "Unknown option 'excludes'. Did you mean 'exclude'?" }, + Raise_error_on_this_expressions_with_an_implied_any_type: { code: 6115, category: ts.DiagnosticCategory.Message, key: "Raise_error_on_this_expressions_with_an_implied_any_type_6115", message: "Raise error on 'this' expressions with an implied 'any' type." }, + Resolving_type_reference_directive_0_containing_file_1_root_directory_2: { code: 6116, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116", message: "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========" }, + Resolving_using_primary_search_paths: { code: 6117, category: ts.DiagnosticCategory.Message, key: "Resolving_using_primary_search_paths_6117", message: "Resolving using primary search paths..." }, + Resolving_from_node_modules_folder: { code: 6118, category: ts.DiagnosticCategory.Message, key: "Resolving_from_node_modules_folder_6118", message: "Resolving from node_modules folder..." }, + Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: { code: 6119, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", message: "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========" }, + Type_reference_directive_0_was_not_resolved: { code: 6120, category: ts.DiagnosticCategory.Message, key: "Type_reference_directive_0_was_not_resolved_6120", message: "======== Type reference directive '{0}' was not resolved. ========" }, + Resolving_with_primary_search_path_0: { code: 6121, category: ts.DiagnosticCategory.Message, key: "Resolving_with_primary_search_path_0_6121", message: "Resolving with primary search path '{0}'" }, + Root_directory_cannot_be_determined_skipping_primary_search_paths: { code: 6122, category: ts.DiagnosticCategory.Message, key: "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", message: "Root directory cannot be determined, skipping primary search paths." }, + Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: { code: 6123, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", message: "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========" }, + Type_declaration_files_to_be_included_in_compilation: { code: 6124, category: ts.DiagnosticCategory.Message, key: "Type_declaration_files_to_be_included_in_compilation_6124", message: "Type declaration files to be included in compilation." }, + Looking_up_in_node_modules_folder_initial_location_0: { code: 6125, category: ts.DiagnosticCategory.Message, key: "Looking_up_in_node_modules_folder_initial_location_0_6125", message: "Looking up in 'node_modules' folder, initial location '{0}'" }, + Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: { code: 6126, category: ts.DiagnosticCategory.Message, key: "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", message: "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder." }, + Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: { code: 6127, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", message: "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========" }, + Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: { code: 6128, category: ts.DiagnosticCategory.Message, key: "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", message: "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========" }, + The_config_file_0_found_doesn_t_contain_any_source_files: { code: 6129, category: ts.DiagnosticCategory.Error, key: "The_config_file_0_found_doesn_t_contain_any_source_files_6129", message: "The config file '{0}' found doesn't contain any source files." }, + Resolving_real_path_for_0_result_1: { code: 6130, category: ts.DiagnosticCategory.Message, key: "Resolving_real_path_for_0_result_1_6130", message: "Resolving real path for '{0}', result '{1}'" }, + Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: { code: 6131, category: ts.DiagnosticCategory.Error, key: "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", message: "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'." }, + File_name_0_has_a_1_extension_stripping_it: { code: 6132, category: ts.DiagnosticCategory.Message, key: "File_name_0_has_a_1_extension_stripping_it_6132", message: "File name '{0}' has a '{1}' extension - stripping it" }, + _0_is_declared_but_never_used: { code: 6133, category: ts.DiagnosticCategory.Error, key: "_0_is_declared_but_never_used_6133", message: "'{0}' is declared but never used." }, + Report_errors_on_unused_locals: { code: 6134, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_locals_6134", message: "Report errors on unused locals." }, + Report_errors_on_unused_parameters: { code: 6135, category: ts.DiagnosticCategory.Message, key: "Report_errors_on_unused_parameters_6135", message: "Report errors on unused parameters." }, + The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: { code: 6136, category: ts.DiagnosticCategory.Message, key: "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", message: "The maximum dependency depth to search under node_modules and load JavaScript files" }, + No_types_specified_in_package_json_but_allowJs_is_set_so_returning_main_value_of_0: { code: 6137, category: ts.DiagnosticCategory.Message, key: "No_types_specified_in_package_json_but_allowJs_is_set_so_returning_main_value_of_0_6137", message: "No types specified in 'package.json' but 'allowJs' is set, so returning 'main' value of '{0}'" }, + Property_0_is_declared_but_never_used: { code: 6138, category: ts.DiagnosticCategory.Error, key: "Property_0_is_declared_but_never_used_6138", message: "Property '{0}' is declared but never used." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable_0_implicitly_has_an_1_type_7005", message: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter_0_implicitly_has_an_1_type_7006", message: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member_0_implicitly_has_an_1_type_7008", message: "Member '{0}' implicitly has an '{1}' type." }, @@ -2893,6 +3642,7 @@ var ts; Unused_label: { code: 7028, category: ts.DiagnosticCategory.Error, key: "Unused_label_7028", message: "Unused label." }, Fallthrough_case_in_switch: { code: 7029, category: ts.DiagnosticCategory.Error, key: "Fallthrough_case_in_switch_7029", message: "Fallthrough case in switch." }, Not_all_code_paths_return_a_value: { code: 7030, category: ts.DiagnosticCategory.Error, key: "Not_all_code_paths_return_a_value_7030", message: "Not all code paths return a value." }, + Binding_element_0_implicitly_has_an_1_type: { code: 7031, category: ts.DiagnosticCategory.Error, key: "Binding_element_0_implicitly_has_an_1_type_7031", message: "Binding element '{0}' implicitly has an '{1}' type." }, You_cannot_rename_this_element: { code: 8000, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_this_element_8000", message: "You cannot rename this element." }, You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: ts.DiagnosticCategory.Error, key: "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", message: "You cannot rename elements that are defined in the standard TypeScript library." }, import_can_only_be_used_in_a_ts_file: { code: 8002, category: ts.DiagnosticCategory.Error, key: "import_can_only_be_used_in_a_ts_file_8002", message: "'import ... =' can only be used in a .ts file." }, @@ -2906,7 +3656,6 @@ var ts; types_can_only_be_used_in_a_ts_file: { code: 8010, category: ts.DiagnosticCategory.Error, key: "types_can_only_be_used_in_a_ts_file_8010", message: "'types' can only be used in a .ts file." }, type_arguments_can_only_be_used_in_a_ts_file: { code: 8011, category: ts.DiagnosticCategory.Error, key: "type_arguments_can_only_be_used_in_a_ts_file_8011", message: "'type arguments' can only be used in a .ts file." }, parameter_modifiers_can_only_be_used_in_a_ts_file: { code: 8012, category: ts.DiagnosticCategory.Error, key: "parameter_modifiers_can_only_be_used_in_a_ts_file_8012", message: "'parameter modifiers' can only be used in a .ts file." }, - property_declarations_can_only_be_used_in_a_ts_file: { code: 8014, category: ts.DiagnosticCategory.Error, key: "property_declarations_can_only_be_used_in_a_ts_file_8014", message: "'property declarations' can only be used in a .ts file." }, enum_declarations_can_only_be_used_in_a_ts_file: { code: 8015, category: ts.DiagnosticCategory.Error, key: "enum_declarations_can_only_be_used_in_a_ts_file_8015", message: "'enum declarations' can only be used in a .ts file." }, type_assertion_expressions_can_only_be_used_in_a_ts_file: { code: 8016, category: ts.DiagnosticCategory.Error, key: "type_assertion_expressions_can_only_be_used_in_a_ts_file_8016", message: "'type assertion expressions' can only be used in a .ts file." }, Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", message: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses." }, @@ -2921,8 +3670,7 @@ var ts; A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17007, category: ts.DiagnosticCategory.Error, key: "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", message: "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." }, JSX_element_0_has_no_corresponding_closing_tag: { code: 17008, category: ts.DiagnosticCategory.Error, key: "JSX_element_0_has_no_corresponding_closing_tag_17008", message: "JSX element '{0}' has no corresponding closing tag." }, super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: { code: 17009, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", message: "'super' must be called before accessing 'this' in the constructor of a derived class." }, - Unknown_typing_option_0: { code: 17010, category: ts.DiagnosticCategory.Error, key: "Unknown_typing_option_0_17010", message: "Unknown typing option '{0}'." }, - Too_many_JavaScript_files_in_the_project_Consider_specifying_the_exclude_setting_in_project_configuration_to_limit_included_source_folders_The_likely_folder_to_exclude_is_0_To_disable_the_project_size_limit_set_the_disableSizeLimit_compiler_option_to_true: { code: 17012, category: ts.DiagnosticCategory.Error, key: "Too_many_JavaScript_files_in_the_project_Consider_specifying_the_exclude_setting_in_project_configur_17012", message: "Too many JavaScript files in the project. Consider specifying the 'exclude' setting in project configuration to limit included source folders. The likely folder to exclude is '{0}'. To disable the project size limit, set the 'disableSizeLimit' compiler option to 'true'." } + Unknown_typing_option_0: { code: 17010, category: ts.DiagnosticCategory.Error, key: "Unknown_typing_option_0_17010", message: "Unknown typing option '{0}'." } }; })(ts || (ts = {})); /// @@ -2934,7 +3682,7 @@ var ts; return token >= 69 /* Identifier */; } ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword; - var textToToken = { + var textToToken = ts.createMap({ "abstract": 115 /* AbstractKeyword */, "any": 117 /* AnyKeyword */, "as": 116 /* AsKeyword */, @@ -2958,7 +3706,7 @@ var ts; "false": 84 /* FalseKeyword */, "finally": 85 /* FinallyKeyword */, "for": 86 /* ForKeyword */, - "from": 133 /* FromKeyword */, + "from": 136 /* FromKeyword */, "function": 87 /* FunctionKeyword */, "get": 123 /* GetKeyword */, "if": 88 /* IfKeyword */, @@ -2971,28 +3719,31 @@ var ts; "let": 108 /* LetKeyword */, "module": 125 /* ModuleKeyword */, "namespace": 126 /* NamespaceKeyword */, + "never": 127 /* NeverKeyword */, "new": 92 /* NewKeyword */, "null": 93 /* NullKeyword */, - "number": 128 /* NumberKeyword */, + "number": 130 /* NumberKeyword */, "package": 109 /* PackageKeyword */, "private": 110 /* PrivateKeyword */, "protected": 111 /* ProtectedKeyword */, "public": 112 /* PublicKeyword */, - "require": 127 /* RequireKeyword */, - "global": 134 /* GlobalKeyword */, + "readonly": 128 /* ReadonlyKeyword */, + "require": 129 /* RequireKeyword */, + "global": 137 /* GlobalKeyword */, "return": 94 /* ReturnKeyword */, - "set": 129 /* SetKeyword */, + "set": 131 /* SetKeyword */, "static": 113 /* StaticKeyword */, - "string": 130 /* StringKeyword */, + "string": 132 /* StringKeyword */, "super": 95 /* SuperKeyword */, "switch": 96 /* SwitchKeyword */, - "symbol": 131 /* SymbolKeyword */, + "symbol": 133 /* SymbolKeyword */, "this": 97 /* ThisKeyword */, "throw": 98 /* ThrowKeyword */, "true": 99 /* TrueKeyword */, "try": 100 /* TryKeyword */, - "type": 132 /* TypeKeyword */, + "type": 134 /* TypeKeyword */, "typeof": 101 /* TypeOfKeyword */, + "undefined": 135 /* UndefinedKeyword */, "var": 102 /* VarKeyword */, "void": 103 /* VoidKeyword */, "while": 104 /* WhileKeyword */, @@ -3000,7 +3751,7 @@ var ts; "yield": 114 /* YieldKeyword */, "async": 118 /* AsyncKeyword */, "await": 119 /* AwaitKeyword */, - "of": 135 /* OfKeyword */, + "of": 138 /* OfKeyword */, "{": 15 /* OpenBraceToken */, "}": 16 /* CloseBraceToken */, "(": 17 /* OpenParenToken */, @@ -3055,7 +3806,7 @@ var ts; "|=": 67 /* BarEqualsToken */, "^=": 68 /* CaretEqualsToken */, "@": 55 /* AtToken */ - }; + }); /* As per ECMAScript Language Specification 3th Edition, Section 7.6: Identifiers IdentifierStart :: @@ -3141,9 +3892,7 @@ var ts; function makeReverseMap(source) { var result = []; for (var name_4 in source) { - if (source.hasOwnProperty(name_4)) { - result[source[name_4]] = name_4; - } + result[source[name_4]] = name_4; } return result; } @@ -3230,6 +3979,11 @@ var ts; ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition; var hasOwnProperty = Object.prototype.hasOwnProperty; function isWhiteSpace(ch) { + return isWhiteSpaceSingleLine(ch) || isLineBreak(ch); + } + ts.isWhiteSpace = isWhiteSpace; + /** Does not include line breaks. For that, see isWhiteSpaceLike. */ + function isWhiteSpaceSingleLine(ch) { // Note: nextLine is in the Zs space, and should be considered to be a whitespace. // It is explicitly not a line-break as it isn't in the exact set specified by EcmaScript. return ch === 32 /* space */ || @@ -3245,7 +3999,7 @@ var ts; ch === 12288 /* ideographicSpace */ || ch === 65279 /* byteOrderMark */; } - ts.isWhiteSpace = isWhiteSpace; + ts.isWhiteSpaceSingleLine = isWhiteSpaceSingleLine; function isLineBreak(ch) { // ES5 7.3: // The ECMAScript line terminator characters are listed in Table 3. @@ -3297,7 +4051,8 @@ var ts; } ts.couldStartTrivia = couldStartTrivia; /* @internal */ - function skipTrivia(text, pos, stopAfterLineBreak) { + function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments) { + if (stopAtComments === void 0) { stopAtComments = false; } // Using ! with a greater than test is a fast way of testing the following conditions: // pos === undefined || pos === null || isNaN(pos) || pos < 0; if (!(pos >= 0)) { @@ -3324,6 +4079,9 @@ var ts; pos++; continue; case 47 /* slash */: + if (stopAtComments) { + break; + } if (text.charCodeAt(pos + 1) === 47 /* slash */) { pos += 2; while (pos < text.length) { @@ -3361,7 +4119,7 @@ var ts; } break; default: - if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch) || isLineBreak(ch))) { + if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch))) { pos++; continue; } @@ -3372,7 +4130,7 @@ var ts; } ts.skipTrivia = skipTrivia; // All conflict markers consist of the same character repeated seven times. If it is - // a <<<<<<< or >>>>>>> marker then it is also followd by a space. + // a <<<<<<< or >>>>>>> marker then it is also followed by a space. var mergeConflictMarkerLength = "<<<<<<<".length; function isConflictMarkerTrivia(text, pos) { ts.Debug.assert(pos >= 0); @@ -3404,7 +4162,7 @@ var ts; } else { ts.Debug.assert(ch === 61 /* equals */); - // Consume everything from the start of the mid-conlict marker to the start of the next + // Consume everything from the start of the mid-conflict marker to the start of the next // end-conflict marker. while (pos < len) { var ch_1 = text.charCodeAt(pos); @@ -3499,7 +4257,7 @@ var ts; } break; default: - if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch) || isLineBreak(ch))) { + if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch))) { if (result && result.length && isLineBreak(ch)) { ts.lastOrUndefined(result).hasTrailingNewLine = true; } @@ -3589,6 +4347,7 @@ var ts; scanJsxToken: scanJsxToken, scanJSDocToken: scanJSDocToken, scan: scan, + getText: getText, setText: setText, setScriptTarget: setScriptTarget, setLanguageVariant: setLanguageVariant, @@ -3989,7 +4748,7 @@ var ts; continue; } else { - while (pos < end && isWhiteSpace(text.charCodeAt(pos))) { + while (pos < end && isWhiteSpaceSingleLine(text.charCodeAt(pos))) { pos++; } return token = 5 /* WhitespaceTrivia */; @@ -4294,7 +5053,7 @@ var ts; } return token = getIdentifierToken(); } - else if (isWhiteSpace(ch)) { + else if (isWhiteSpaceSingleLine(ch)) { pos++; continue; } @@ -4418,7 +5177,7 @@ var ts; break; } } - return token = 239 /* JsxText */; + return token = 244 /* JsxText */; } // Scans a JSX identifier; these differ from normal identifiers in that // they allow dashes @@ -4447,7 +5206,7 @@ var ts; var ch = text.charCodeAt(pos); while (pos < end) { ch = text.charCodeAt(pos); - if (isWhiteSpace(ch)) { + if (isWhiteSpaceSingleLine(ch)) { pos++; } else { @@ -4536,6 +5295,9 @@ var ts; function tryScan(callback) { return speculationHelper(callback, /*isLookahead*/ false); } + function getText() { + return text; + } function setText(newText, start, length) { text = newText || ""; end = length === undefined ? text.length : start + length; @@ -4635,7 +5397,7 @@ var ts; } ts.arrayIsEqualTo = arrayIsEqualTo; function hasResolvedModule(sourceFile, moduleNameText) { - return sourceFile.resolvedModules && ts.hasProperty(sourceFile.resolvedModules, moduleNameText); + return !!(sourceFile.resolvedModules && sourceFile.resolvedModules[moduleNameText]); } ts.hasResolvedModule = hasResolvedModule; function getResolvedModule(sourceFile, moduleNameText) { @@ -4644,36 +5406,71 @@ var ts; ts.getResolvedModule = getResolvedModule; function setResolvedModule(sourceFile, moduleNameText, resolvedModule) { if (!sourceFile.resolvedModules) { - sourceFile.resolvedModules = {}; + sourceFile.resolvedModules = ts.createMap(); } sourceFile.resolvedModules[moduleNameText] = resolvedModule; } ts.setResolvedModule = setResolvedModule; + function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective) { + if (!sourceFile.resolvedTypeReferenceDirectiveNames) { + sourceFile.resolvedTypeReferenceDirectiveNames = ts.createMap(); + } + sourceFile.resolvedTypeReferenceDirectiveNames[typeReferenceDirectiveName] = resolvedTypeReferenceDirective; + } + ts.setResolvedTypeReferenceDirective = setResolvedTypeReferenceDirective; + /* @internal */ + function moduleResolutionIsEqualTo(oldResolution, newResolution) { + return oldResolution.resolvedFileName === newResolution.resolvedFileName && oldResolution.isExternalLibraryImport === newResolution.isExternalLibraryImport; + } + ts.moduleResolutionIsEqualTo = moduleResolutionIsEqualTo; + /* @internal */ + function typeDirectiveIsEqualTo(oldResolution, newResolution) { + return oldResolution.resolvedFileName === newResolution.resolvedFileName && oldResolution.primary === newResolution.primary; + } + ts.typeDirectiveIsEqualTo = typeDirectiveIsEqualTo; + /* @internal */ + function hasChangesInResolutions(names, newResolutions, oldResolutions, comparer) { + if (names.length !== newResolutions.length) { + return false; + } + for (var i = 0; i < names.length; i++) { + var newResolution = newResolutions[i]; + var oldResolution = oldResolutions && oldResolutions[names[i]]; + var changed = oldResolution + ? !newResolution || !comparer(oldResolution, newResolution) + : newResolution; + if (changed) { + return true; + } + } + return false; + } + ts.hasChangesInResolutions = hasChangesInResolutions; // Returns true if this node contains a parse error anywhere underneath it. function containsParseError(node) { aggregateChildData(node); - return (node.parserContextFlags & 64 /* ThisNodeOrAnySubNodesHasError */) !== 0; + return (node.flags & 268435456 /* ThisNodeOrAnySubNodesHasError */) !== 0; } ts.containsParseError = containsParseError; function aggregateChildData(node) { - if (!(node.parserContextFlags & 128 /* HasAggregatedChildData */)) { + if (!(node.flags & 536870912 /* HasAggregatedChildData */)) { // A node is considered to contain a parse error if: // a) the parser explicitly marked that it had an error // b) any of it's children reported that it had an error. - var thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & 16 /* ThisNodeHasError */) !== 0) || + var thisNodeOrAnySubNodesHasError = ((node.flags & 67108864 /* ThisNodeHasError */) !== 0) || ts.forEachChild(node, containsParseError); // If so, mark ourselves accordingly. if (thisNodeOrAnySubNodesHasError) { - node.parserContextFlags |= 64 /* ThisNodeOrAnySubNodesHasError */; + node.flags |= 268435456 /* ThisNodeOrAnySubNodesHasError */; } - // Also mark that we've propogated the child information to this node. This way we can + // Also mark that we've propagated the child information to this node. This way we can // always consult the bit directly on this node without needing to check its children // again. - node.parserContextFlags |= 128 /* HasAggregatedChildData */; + node.flags |= 536870912 /* HasAggregatedChildData */; } } function getSourceFileOfNode(node) { - while (node && node.kind !== 251 /* SourceFile */) { + while (node && node.kind !== 256 /* SourceFile */) { node = node.parent; } return node; @@ -4681,11 +5478,11 @@ var ts; ts.getSourceFileOfNode = getSourceFileOfNode; function isStatementWithLocals(node) { switch (node.kind) { - case 195 /* Block */: - case 223 /* CaseBlock */: - case 202 /* ForStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: + case 199 /* Block */: + case 227 /* CaseBlock */: + case 206 /* ForStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: return true; } return false; @@ -4707,6 +5504,32 @@ var ts; return node.pos; } ts.getStartPosOfNode = getStartPosOfNode; + function getEndLinePosition(line, sourceFile) { + ts.Debug.assert(line >= 0); + var lineStarts = ts.getLineStarts(sourceFile); + var lineIndex = line; + var sourceText = sourceFile.text; + if (lineIndex + 1 === lineStarts.length) { + // last line - return EOF + return sourceText.length - 1; + } + else { + // current line start + var start = lineStarts[lineIndex]; + // take the start position of the next line - 1 = it should be some line break + var pos = lineStarts[lineIndex + 1] - 1; + ts.Debug.assert(ts.isLineBreak(sourceText.charCodeAt(pos))); + // walk backwards skipping line breaks, stop the the beginning of current line. + // i.e: + // + // $ <- end of line for this position should match the start position + while (start <= pos && ts.isLineBreak(sourceText.charCodeAt(pos))) { + pos--; + } + return pos; + } + } + ts.getEndLinePosition = getEndLinePosition; // Returns true if this node is missing from the actual source code. A 'missing' node is different // from 'undefined/defined'. When a node is undefined (which can happen for optional nodes // in the tree), it is definitely missing. However, a node may be defined, but still be @@ -4730,15 +5553,36 @@ var ts; return !nodeIsMissing(node); } ts.nodeIsPresent = nodeIsPresent; - function getTokenPosOfNode(node, sourceFile) { + function getTokenPosOfNode(node, sourceFile, includeJsDocComment) { // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* // want to skip trivia because this will launch us forward to the next token. if (nodeIsMissing(node)) { return node.pos; } + if (isJSDocNode(node)) { + return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos, /*stopAfterLineBreak*/ false, /*stopAtComments*/ true); + } + if (includeJsDocComment && node.jsDocComments && node.jsDocComments.length > 0) { + return getTokenPosOfNode(node.jsDocComments[0]); + } + // For a syntax list, it is possible that one of its children has JSDocComment nodes, while + // the syntax list itself considers them as normal trivia. Therefore if we simply skip + // trivia for the list, we may have skipped the JSDocComment as well. So we should process its + // first child to determine the actual position of its first token. + if (node.kind === 286 /* SyntaxList */ && node._children.length > 0) { + return getTokenPosOfNode(node._children[0], sourceFile, includeJsDocComment); + } return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); } ts.getTokenPosOfNode = getTokenPosOfNode; + function isJSDocNode(node) { + return node.kind >= 257 /* FirstJSDocNode */ && node.kind <= 282 /* LastJSDocNode */; + } + ts.isJSDocNode = isJSDocNode; + function isJSDocTag(node) { + return node.kind >= 273 /* FirstJSDocTagNode */ && node.kind <= 285 /* LastJSDocTagNode */; + } + ts.isJSDocTag = isJSDocTag; function getNonDecoratorTokenPosOfNode(node, sourceFile) { if (nodeIsMissing(node) || !node.decorators) { return getTokenPosOfNode(node, sourceFile); @@ -4784,24 +5628,32 @@ var ts; } ts.makeIdentifierFromModuleName = makeIdentifierFromModuleName; function isBlockOrCatchScoped(declaration) { - return (getCombinedNodeFlags(declaration) & 24576 /* BlockScoped */) !== 0 || + return (getCombinedNodeFlags(declaration) & 3072 /* BlockScoped */) !== 0 || isCatchClauseVariableDeclaration(declaration); } ts.isBlockOrCatchScoped = isBlockOrCatchScoped; function isAmbientModule(node) { - return node && node.kind === 221 /* ModuleDeclaration */ && + return node && node.kind === 225 /* ModuleDeclaration */ && (node.name.kind === 9 /* StringLiteral */ || isGlobalScopeAugmentation(node)); } ts.isAmbientModule = isAmbientModule; + function isShorthandAmbientModuleSymbol(moduleSymbol) { + return isShorthandAmbientModule(moduleSymbol.valueDeclaration); + } + ts.isShorthandAmbientModuleSymbol = isShorthandAmbientModuleSymbol; + function isShorthandAmbientModule(node) { + // The only kind of module that can be missing a body is a shorthand ambient module. + return node.kind === 225 /* ModuleDeclaration */ && (!node.body); + } function isBlockScopedContainerTopLevel(node) { - return node.kind === 251 /* SourceFile */ || - node.kind === 221 /* ModuleDeclaration */ || + return node.kind === 256 /* SourceFile */ || + node.kind === 225 /* ModuleDeclaration */ || isFunctionLike(node) || isFunctionBlock(node); } ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel; function isGlobalScopeAugmentation(module) { - return !!(module.flags & 2097152 /* GlobalAugmentation */); + return !!(module.flags & 131072 /* GlobalAugmentation */); } ts.isGlobalScopeAugmentation = isGlobalScopeAugmentation; function isExternalModuleAugmentation(node) { @@ -4812,10 +5664,10 @@ var ts; return false; } switch (node.parent.kind) { - case 251 /* SourceFile */: - return isExternalModule(node.parent); - case 222 /* ModuleBlock */: - return isAmbientModule(node.parent.parent) && !isExternalModule(node.parent.parent.parent); + case 256 /* SourceFile */: + return ts.isExternalModule(node.parent); + case 226 /* ModuleBlock */: + return isAmbientModule(node.parent.parent) && !ts.isExternalModule(node.parent.parent.parent); } return false; } @@ -4829,15 +5681,15 @@ var ts; return current; } switch (current.kind) { - case 251 /* SourceFile */: - case 223 /* CaseBlock */: - case 247 /* CatchClause */: - case 221 /* ModuleDeclaration */: - case 202 /* ForStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: + case 256 /* SourceFile */: + case 227 /* CaseBlock */: + case 252 /* CatchClause */: + case 225 /* ModuleDeclaration */: + case 206 /* ForStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: return current; - case 195 /* Block */: + case 199 /* Block */: // function block is not considered block-scope container // see comment in binder.ts: bind(...), case for SyntaxKind.Block if (!isFunctionLike(current.parent)) { @@ -4850,9 +5702,9 @@ var ts; ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer; function isCatchClauseVariableDeclaration(declaration) { return declaration && - declaration.kind === 214 /* VariableDeclaration */ && + declaration.kind === 218 /* VariableDeclaration */ && declaration.parent && - declaration.parent.kind === 247 /* CatchClause */; + declaration.parent.kind === 252 /* CatchClause */; } ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration; // Return display name of an identifier @@ -4888,10 +5740,23 @@ var ts; return ts.createTextSpanFromBounds(start, scanner.getTextPos()); } ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition; + function getErrorSpanForArrowFunction(sourceFile, node) { + var pos = ts.skipTrivia(sourceFile.text, node.pos); + if (node.body && node.body.kind === 199 /* Block */) { + var startLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.pos).line; + var endLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.end).line; + if (startLine < endLine) { + // The arrow function spans multiple lines, + // make the error span be the first line, inclusive. + return ts.createTextSpan(pos, getEndLinePosition(startLine, sourceFile) - pos + 1); + } + } + return ts.createTextSpanFromBounds(pos, node.end); + } function getErrorSpanForNode(sourceFile, node) { var errorNode = node; switch (node.kind) { - case 251 /* SourceFile */: + case 256 /* SourceFile */: var pos_1 = ts.skipTrivia(sourceFile.text, 0, /*stopAfterLineBreak*/ false); if (pos_1 === sourceFile.text.length) { // file is empty - return span for the beginning of the file @@ -4900,20 +5765,24 @@ var ts; return getSpanOfTokenAtPosition(sourceFile, pos_1); // This list is a work in progress. Add missing node kinds to improve their error // spans. - case 214 /* VariableDeclaration */: - case 166 /* BindingElement */: - case 217 /* ClassDeclaration */: - case 189 /* ClassExpression */: - case 218 /* InterfaceDeclaration */: - case 221 /* ModuleDeclaration */: - case 220 /* EnumDeclaration */: - case 250 /* EnumMember */: - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 144 /* MethodDeclaration */: - case 219 /* TypeAliasDeclaration */: + case 218 /* VariableDeclaration */: + case 169 /* BindingElement */: + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: + case 222 /* InterfaceDeclaration */: + case 225 /* ModuleDeclaration */: + case 224 /* EnumDeclaration */: + case 255 /* EnumMember */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 147 /* MethodDeclaration */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 223 /* TypeAliasDeclaration */: errorNode = node.name; break; + case 180 /* ArrowFunction */: + return getErrorSpanForArrowFunction(sourceFile, node); } if (errorNode === undefined) { // If we don't have a better node, then just set the error on the first token of @@ -4926,24 +5795,20 @@ var ts; return ts.createTextSpanFromBounds(pos, errorNode.end); } ts.getErrorSpanForNode = getErrorSpanForNode; - function isExternalModule(file) { - return file.externalModuleIndicator !== undefined; - } - ts.isExternalModule = isExternalModule; function isExternalOrCommonJsModule(file) { return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== undefined; } ts.isExternalOrCommonJsModule = isExternalOrCommonJsModule; function isDeclarationFile(file) { - return (file.flags & 4096 /* DeclarationFile */) !== 0; + return file.isDeclarationFile; } ts.isDeclarationFile = isDeclarationFile; function isConstEnumDeclaration(node) { - return node.kind === 220 /* EnumDeclaration */ && isConst(node); + return node.kind === 224 /* EnumDeclaration */ && isConst(node); } ts.isConstEnumDeclaration = isConstEnumDeclaration; function walkUpBindingElementsAndPatterns(node) { - while (node && (node.kind === 166 /* BindingElement */ || isBindingPattern(node))) { + while (node && (node.kind === 169 /* BindingElement */ || isBindingPattern(node))) { node = node.parent; } return node; @@ -4958,33 +5823,33 @@ var ts; function getCombinedNodeFlags(node) { node = walkUpBindingElementsAndPatterns(node); var flags = node.flags; - if (node.kind === 214 /* VariableDeclaration */) { + if (node.kind === 218 /* VariableDeclaration */) { node = node.parent; } - if (node && node.kind === 215 /* VariableDeclarationList */) { + if (node && node.kind === 219 /* VariableDeclarationList */) { flags |= node.flags; node = node.parent; } - if (node && node.kind === 196 /* VariableStatement */) { + if (node && node.kind === 200 /* VariableStatement */) { flags |= node.flags; } return flags; } ts.getCombinedNodeFlags = getCombinedNodeFlags; function isConst(node) { - return !!(getCombinedNodeFlags(node) & 16384 /* Const */); + return !!(getCombinedNodeFlags(node) & 2048 /* Const */); } ts.isConst = isConst; function isLet(node) { - return !!(getCombinedNodeFlags(node) & 8192 /* Let */); + return !!(getCombinedNodeFlags(node) & 1024 /* Let */); } ts.isLet = isLet; function isSuperCallExpression(n) { - return n.kind === 171 /* CallExpression */ && n.expression.kind === 95 /* SuperKeyword */; + return n.kind === 174 /* CallExpression */ && n.expression.kind === 95 /* SuperKeyword */; } ts.isSuperCallExpression = isSuperCallExpression; function isPrologueDirective(node) { - return node.kind === 198 /* ExpressionStatement */ && node.expression.kind === 9 /* StringLiteral */; + return node.kind === 202 /* ExpressionStatement */ && node.expression.kind === 9 /* StringLiteral */; } ts.isPrologueDirective = isPrologueDirective; function getLeadingCommentRangesOfNode(node, sourceFileOfNode) { @@ -5000,7 +5865,10 @@ var ts; } ts.getJsDocComments = getJsDocComments; function getJsDocCommentsFromText(node, text) { - var commentRanges = (node.kind === 139 /* Parameter */ || node.kind === 138 /* TypeParameter */) ? + var commentRanges = (node.kind === 142 /* Parameter */ || + node.kind === 141 /* TypeParameter */ || + node.kind === 179 /* FunctionExpression */ || + node.kind === 180 /* ArrowFunction */) ? ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRangesOfNodeFromText(node, text); return ts.filter(commentRanges, isJsDocComment); @@ -5013,39 +5881,42 @@ var ts; } ts.getJsDocCommentsFromText = getJsDocCommentsFromText; ts.fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; + ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*/; ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; function isTypeNode(node) { - if (151 /* FirstTypeNode */ <= node.kind && node.kind <= 163 /* LastTypeNode */) { + if (154 /* FirstTypeNode */ <= node.kind && node.kind <= 166 /* LastTypeNode */) { return true; } switch (node.kind) { case 117 /* AnyKeyword */: - case 128 /* NumberKeyword */: - case 130 /* StringKeyword */: + case 130 /* NumberKeyword */: + case 132 /* StringKeyword */: case 120 /* BooleanKeyword */: - case 131 /* SymbolKeyword */: + case 133 /* SymbolKeyword */: + case 135 /* UndefinedKeyword */: + case 127 /* NeverKeyword */: return true; case 103 /* VoidKeyword */: - return node.parent.kind !== 180 /* VoidExpression */; - case 191 /* ExpressionWithTypeArguments */: + return node.parent.kind !== 183 /* VoidExpression */; + case 194 /* ExpressionWithTypeArguments */: return !isExpressionWithTypeArgumentsInClassExtendsClause(node); // Identifiers and qualified names may be type nodes, depending on their context. Climb // above them to find the lowest container case 69 /* Identifier */: // If the identifier is the RHS of a qualified name, then it's a type iff its parent is. - if (node.parent.kind === 136 /* QualifiedName */ && node.parent.right === node) { + if (node.parent.kind === 139 /* QualifiedName */ && node.parent.right === node) { node = node.parent; } - else if (node.parent.kind === 169 /* PropertyAccessExpression */ && node.parent.name === node) { + else if (node.parent.kind === 172 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } // At this point, node is either a qualified name or an identifier - ts.Debug.assert(node.kind === 69 /* Identifier */ || node.kind === 136 /* QualifiedName */ || node.kind === 169 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'."); - case 136 /* QualifiedName */: - case 169 /* PropertyAccessExpression */: + ts.Debug.assert(node.kind === 69 /* Identifier */ || node.kind === 139 /* QualifiedName */ || node.kind === 172 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'."); + case 139 /* QualifiedName */: + case 172 /* PropertyAccessExpression */: case 97 /* ThisKeyword */: var parent_1 = node.parent; - if (parent_1.kind === 155 /* TypeQuery */) { + if (parent_1.kind === 158 /* TypeQuery */) { return false; } // Do not recursively call isTypeNode on the parent. In the example: @@ -5054,38 +5925,38 @@ var ts; // // Calling isTypeNode would consider the qualified name A.B a type node. Only C or // A.B.C is a type node. - if (151 /* FirstTypeNode */ <= parent_1.kind && parent_1.kind <= 163 /* LastTypeNode */) { + if (154 /* FirstTypeNode */ <= parent_1.kind && parent_1.kind <= 166 /* LastTypeNode */) { return true; } switch (parent_1.kind) { - case 191 /* ExpressionWithTypeArguments */: + case 194 /* ExpressionWithTypeArguments */: return !isExpressionWithTypeArgumentsInClassExtendsClause(parent_1); - case 138 /* TypeParameter */: + case 141 /* TypeParameter */: return node === parent_1.constraint; - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - case 139 /* Parameter */: - case 214 /* VariableDeclaration */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + case 142 /* Parameter */: + case 218 /* VariableDeclaration */: return node === parent_1.type; - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: - case 145 /* Constructor */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: + case 148 /* Constructor */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: return node === parent_1.type; - case 148 /* CallSignature */: - case 149 /* ConstructSignature */: - case 150 /* IndexSignature */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: + case 153 /* IndexSignature */: return node === parent_1.type; - case 174 /* TypeAssertionExpression */: + case 177 /* TypeAssertionExpression */: return node === parent_1.type; - case 171 /* CallExpression */: - case 172 /* NewExpression */: + case 174 /* CallExpression */: + case 175 /* NewExpression */: return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0; - case 173 /* TaggedTemplateExpression */: + case 176 /* TaggedTemplateExpression */: // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. return false; } @@ -5099,23 +5970,23 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 207 /* ReturnStatement */: + case 211 /* ReturnStatement */: return visitor(node); - case 223 /* CaseBlock */: - case 195 /* Block */: - case 199 /* IfStatement */: - case 200 /* DoStatement */: - case 201 /* WhileStatement */: - case 202 /* ForStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: - case 208 /* WithStatement */: - case 209 /* SwitchStatement */: - case 244 /* CaseClause */: - case 245 /* DefaultClause */: - case 210 /* LabeledStatement */: - case 212 /* TryStatement */: - case 247 /* CatchClause */: + case 227 /* CaseBlock */: + case 199 /* Block */: + case 203 /* IfStatement */: + case 204 /* DoStatement */: + case 205 /* WhileStatement */: + case 206 /* ForStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: + case 212 /* WithStatement */: + case 213 /* SwitchStatement */: + case 249 /* CaseClause */: + case 250 /* DefaultClause */: + case 214 /* LabeledStatement */: + case 216 /* TryStatement */: + case 252 /* CatchClause */: return ts.forEachChild(node, traverse); } } @@ -5125,18 +5996,18 @@ var ts; return traverse(body); function traverse(node) { switch (node.kind) { - case 187 /* YieldExpression */: + case 190 /* YieldExpression */: visitor(node); var operand = node.expression; if (operand) { traverse(operand); } - case 220 /* EnumDeclaration */: - case 218 /* InterfaceDeclaration */: - case 221 /* ModuleDeclaration */: - case 219 /* TypeAliasDeclaration */: - case 217 /* ClassDeclaration */: - case 189 /* ClassExpression */: + case 224 /* EnumDeclaration */: + case 222 /* InterfaceDeclaration */: + case 225 /* ModuleDeclaration */: + case 223 /* TypeAliasDeclaration */: + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: // These are not allowed inside a generator now, but eventually they may be allowed // as local types. Regardless, any yield statements contained within them should be // skipped in this traversal. @@ -5144,7 +6015,7 @@ var ts; default: if (isFunctionLike(node)) { var name_5 = node.name; - if (name_5 && name_5.kind === 137 /* ComputedPropertyName */) { + if (name_5 && name_5.kind === 140 /* ComputedPropertyName */) { // Note that we will not include methods/accessors of a class because they would require // first descending into the class. This is by design. traverse(name_5.expression); @@ -5163,14 +6034,14 @@ var ts; function isVariableLike(node) { if (node) { switch (node.kind) { - case 166 /* BindingElement */: - case 250 /* EnumMember */: - case 139 /* Parameter */: - case 248 /* PropertyAssignment */: - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - case 249 /* ShorthandPropertyAssignment */: - case 214 /* VariableDeclaration */: + case 169 /* BindingElement */: + case 255 /* EnumMember */: + case 142 /* Parameter */: + case 253 /* PropertyAssignment */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + case 254 /* ShorthandPropertyAssignment */: + case 218 /* VariableDeclaration */: return true; } } @@ -5178,11 +6049,11 @@ var ts; } ts.isVariableLike = isVariableLike; function isAccessor(node) { - return node && (node.kind === 146 /* GetAccessor */ || node.kind === 147 /* SetAccessor */); + return node && (node.kind === 149 /* GetAccessor */ || node.kind === 150 /* SetAccessor */); } ts.isAccessor = isAccessor; function isClassLike(node) { - return node && (node.kind === 217 /* ClassDeclaration */ || node.kind === 189 /* ClassExpression */); + return node && (node.kind === 221 /* ClassDeclaration */ || node.kind === 192 /* ClassExpression */); } ts.isClassLike = isClassLike; function isFunctionLike(node) { @@ -5191,32 +6062,33 @@ var ts; ts.isFunctionLike = isFunctionLike; function isFunctionLikeKind(kind) { switch (kind) { - case 145 /* Constructor */: - case 176 /* FunctionExpression */: - case 216 /* FunctionDeclaration */: - case 177 /* ArrowFunction */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 148 /* CallSignature */: - case 149 /* ConstructSignature */: - case 150 /* IndexSignature */: - case 153 /* FunctionType */: - case 154 /* ConstructorType */: + case 148 /* Constructor */: + case 179 /* FunctionExpression */: + case 220 /* FunctionDeclaration */: + case 180 /* ArrowFunction */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: + case 153 /* IndexSignature */: + case 156 /* FunctionType */: + case 157 /* ConstructorType */: return true; } + return false; } ts.isFunctionLikeKind = isFunctionLikeKind; function introducesArgumentsExoticObject(node) { switch (node.kind) { - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 145 /* Constructor */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 148 /* Constructor */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: return true; } return false; @@ -5224,24 +6096,24 @@ var ts; ts.introducesArgumentsExoticObject = introducesArgumentsExoticObject; function isIterationStatement(node, lookInLabeledStatements) { switch (node.kind) { - case 202 /* ForStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: - case 200 /* DoStatement */: - case 201 /* WhileStatement */: + case 206 /* ForStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: + case 204 /* DoStatement */: + case 205 /* WhileStatement */: return true; - case 210 /* LabeledStatement */: + case 214 /* LabeledStatement */: return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); } return false; } ts.isIterationStatement = isIterationStatement; function isFunctionBlock(node) { - return node && node.kind === 195 /* Block */ && isFunctionLike(node.parent); + return node && node.kind === 199 /* Block */ && isFunctionLike(node.parent); } ts.isFunctionBlock = isFunctionBlock; function isObjectLiteralMethod(node) { - return node && node.kind === 144 /* MethodDeclaration */ && node.parent.kind === 168 /* ObjectLiteralExpression */; + return node && node.kind === 147 /* MethodDeclaration */ && node.parent.kind === 171 /* ObjectLiteralExpression */; } ts.isObjectLiteralMethod = isObjectLiteralMethod; function isIdentifierTypePredicate(predicate) { @@ -5277,7 +6149,7 @@ var ts; return undefined; } switch (node.kind) { - case 137 /* ComputedPropertyName */: + case 140 /* ComputedPropertyName */: // If the grandparent node is an object literal (as opposed to a class), // then the computed property is not a 'this' container. // A computed property name in a class needs to be a this container @@ -5292,9 +6164,9 @@ var ts; // the *body* of the container. node = node.parent; break; - case 140 /* Decorator */: + case 143 /* Decorator */: // Decorators are always applied outside of the body of a class or method. - if (node.parent.kind === 139 /* Parameter */ && isClassElement(node.parent.parent)) { + if (node.parent.kind === 142 /* Parameter */ && isClassElement(node.parent.parent)) { // If the decorator's parent is a Parameter, we resolve the this container from // the grandparent class declaration. node = node.parent.parent; @@ -5305,26 +6177,26 @@ var ts; node = node.parent; } break; - case 177 /* ArrowFunction */: + case 180 /* ArrowFunction */: if (!includeArrowFunctions) { continue; } // Fall through - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 221 /* ModuleDeclaration */: - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 145 /* Constructor */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 148 /* CallSignature */: - case 149 /* ConstructSignature */: - case 150 /* IndexSignature */: - case 220 /* EnumDeclaration */: - case 251 /* SourceFile */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 225 /* ModuleDeclaration */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 148 /* Constructor */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: + case 153 /* IndexSignature */: + case 224 /* EnumDeclaration */: + case 256 /* SourceFile */: return node; } } @@ -5345,26 +6217,26 @@ var ts; return node; } switch (node.kind) { - case 137 /* ComputedPropertyName */: + case 140 /* ComputedPropertyName */: node = node.parent; break; - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: if (!stopOnFunctions) { continue; } - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 145 /* Constructor */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 148 /* Constructor */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: return node; - case 140 /* Decorator */: + case 143 /* Decorator */: // Decorators are always applied outside of the body of a class or method. - if (node.parent.kind === 139 /* Parameter */ && isClassElement(node.parent.parent)) { + if (node.parent.kind === 142 /* Parameter */ && isClassElement(node.parent.parent)) { // If the decorator's parent is a Parameter, we resolve the this container from // the grandparent class declaration. node = node.parent.parent; @@ -5379,24 +6251,39 @@ var ts; } } ts.getSuperContainer = getSuperContainer; + function getImmediatelyInvokedFunctionExpression(func) { + if (func.kind === 179 /* FunctionExpression */ || func.kind === 180 /* ArrowFunction */) { + var prev = func; + var parent_2 = func.parent; + while (parent_2.kind === 178 /* ParenthesizedExpression */) { + prev = parent_2; + parent_2 = parent_2.parent; + } + if (parent_2.kind === 174 /* CallExpression */ && parent_2.expression === prev) { + return parent_2; + } + } + } + ts.getImmediatelyInvokedFunctionExpression = getImmediatelyInvokedFunctionExpression; /** * Determines whether a node is a property or element access expression for super. */ function isSuperPropertyOrElementAccess(node) { - return (node.kind === 169 /* PropertyAccessExpression */ - || node.kind === 170 /* ElementAccessExpression */) + return (node.kind === 172 /* PropertyAccessExpression */ + || node.kind === 173 /* ElementAccessExpression */) && node.expression.kind === 95 /* SuperKeyword */; } ts.isSuperPropertyOrElementAccess = isSuperPropertyOrElementAccess; function getEntityNameFromTypeNode(node) { if (node) { switch (node.kind) { - case 152 /* TypeReference */: + case 155 /* TypeReference */: return node.typeName; - case 191 /* ExpressionWithTypeArguments */: + case 194 /* ExpressionWithTypeArguments */: + ts.Debug.assert(isEntityNameExpression(node.expression)); return node.expression; case 69 /* Identifier */: - case 136 /* QualifiedName */: + case 139 /* QualifiedName */: return node; } } @@ -5404,7 +6291,7 @@ var ts; } ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode; function getInvokedExpression(node) { - if (node.kind === 173 /* TaggedTemplateExpression */) { + if (node.kind === 176 /* TaggedTemplateExpression */) { return node.tag; } // Will either be a CallExpression, NewExpression, or Decorator. @@ -5413,25 +6300,25 @@ var ts; ts.getInvokedExpression = getInvokedExpression; function nodeCanBeDecorated(node) { switch (node.kind) { - case 217 /* ClassDeclaration */: + case 221 /* ClassDeclaration */: // classes are valid targets return true; - case 142 /* PropertyDeclaration */: + case 145 /* PropertyDeclaration */: // property declarations are valid if their parent is a class declaration. - return node.parent.kind === 217 /* ClassDeclaration */; - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 144 /* MethodDeclaration */: + return node.parent.kind === 221 /* ClassDeclaration */; + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 147 /* MethodDeclaration */: // if this method has a body and its parent is a class declaration, this is a valid target. return node.body !== undefined - && node.parent.kind === 217 /* ClassDeclaration */; - case 139 /* Parameter */: + && node.parent.kind === 221 /* ClassDeclaration */; + case 142 /* Parameter */: // if the parameter's parent has a body and its grandparent is a class declaration, this is a valid target; return node.parent.body !== undefined - && (node.parent.kind === 145 /* Constructor */ - || node.parent.kind === 144 /* MethodDeclaration */ - || node.parent.kind === 147 /* SetAccessor */) - && node.parent.parent.kind === 217 /* ClassDeclaration */; + && (node.parent.kind === 148 /* Constructor */ + || node.parent.kind === 147 /* MethodDeclaration */ + || node.parent.kind === 150 /* SetAccessor */) + && node.parent.parent.kind === 221 /* ClassDeclaration */; } return false; } @@ -5442,108 +6329,120 @@ var ts; } ts.nodeIsDecorated = nodeIsDecorated; function isPropertyAccessExpression(node) { - return node.kind === 169 /* PropertyAccessExpression */; + return node.kind === 172 /* PropertyAccessExpression */; } ts.isPropertyAccessExpression = isPropertyAccessExpression; function isElementAccessExpression(node) { - return node.kind === 170 /* ElementAccessExpression */; + return node.kind === 173 /* ElementAccessExpression */; } ts.isElementAccessExpression = isElementAccessExpression; + function isJSXTagName(node) { + var parent = node.parent; + if (parent.kind === 243 /* JsxOpeningElement */ || + parent.kind === 242 /* JsxSelfClosingElement */ || + parent.kind === 245 /* JsxClosingElement */) { + return parent.tagName === node; + } + return false; + } + ts.isJSXTagName = isJSXTagName; function isExpression(node) { switch (node.kind) { + case 97 /* ThisKeyword */: case 95 /* SuperKeyword */: case 93 /* NullKeyword */: case 99 /* TrueKeyword */: case 84 /* FalseKeyword */: case 10 /* RegularExpressionLiteral */: - case 167 /* ArrayLiteralExpression */: - case 168 /* ObjectLiteralExpression */: - case 169 /* PropertyAccessExpression */: - case 170 /* ElementAccessExpression */: - case 171 /* CallExpression */: - case 172 /* NewExpression */: - case 173 /* TaggedTemplateExpression */: - case 192 /* AsExpression */: - case 174 /* TypeAssertionExpression */: - case 175 /* ParenthesizedExpression */: - case 176 /* FunctionExpression */: - case 189 /* ClassExpression */: - case 177 /* ArrowFunction */: - case 180 /* VoidExpression */: - case 178 /* DeleteExpression */: - case 179 /* TypeOfExpression */: - case 182 /* PrefixUnaryExpression */: - case 183 /* PostfixUnaryExpression */: - case 184 /* BinaryExpression */: - case 185 /* ConditionalExpression */: - case 188 /* SpreadElementExpression */: - case 186 /* TemplateExpression */: + case 170 /* ArrayLiteralExpression */: + case 171 /* ObjectLiteralExpression */: + case 172 /* PropertyAccessExpression */: + case 173 /* ElementAccessExpression */: + case 174 /* CallExpression */: + case 175 /* NewExpression */: + case 176 /* TaggedTemplateExpression */: + case 195 /* AsExpression */: + case 177 /* TypeAssertionExpression */: + case 196 /* NonNullExpression */: + case 178 /* ParenthesizedExpression */: + case 179 /* FunctionExpression */: + case 192 /* ClassExpression */: + case 180 /* ArrowFunction */: + case 183 /* VoidExpression */: + case 181 /* DeleteExpression */: + case 182 /* TypeOfExpression */: + case 185 /* PrefixUnaryExpression */: + case 186 /* PostfixUnaryExpression */: + case 187 /* BinaryExpression */: + case 188 /* ConditionalExpression */: + case 191 /* SpreadElementExpression */: + case 189 /* TemplateExpression */: case 11 /* NoSubstitutionTemplateLiteral */: - case 190 /* OmittedExpression */: - case 236 /* JsxElement */: - case 237 /* JsxSelfClosingElement */: - case 187 /* YieldExpression */: - case 181 /* AwaitExpression */: + case 193 /* OmittedExpression */: + case 241 /* JsxElement */: + case 242 /* JsxSelfClosingElement */: + case 190 /* YieldExpression */: + case 184 /* AwaitExpression */: return true; - case 136 /* QualifiedName */: - while (node.parent.kind === 136 /* QualifiedName */) { + case 139 /* QualifiedName */: + while (node.parent.kind === 139 /* QualifiedName */) { node = node.parent; } - return node.parent.kind === 155 /* TypeQuery */; + return node.parent.kind === 158 /* TypeQuery */ || isJSXTagName(node); case 69 /* Identifier */: - if (node.parent.kind === 155 /* TypeQuery */) { + if (node.parent.kind === 158 /* TypeQuery */ || isJSXTagName(node)) { return true; } // fall through case 8 /* NumericLiteral */: case 9 /* StringLiteral */: case 97 /* ThisKeyword */: - var parent_2 = node.parent; - switch (parent_2.kind) { - case 214 /* VariableDeclaration */: - case 139 /* Parameter */: - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - case 250 /* EnumMember */: - case 248 /* PropertyAssignment */: - case 166 /* BindingElement */: - return parent_2.initializer === node; - case 198 /* ExpressionStatement */: - case 199 /* IfStatement */: - case 200 /* DoStatement */: - case 201 /* WhileStatement */: - case 207 /* ReturnStatement */: - case 208 /* WithStatement */: - case 209 /* SwitchStatement */: - case 244 /* CaseClause */: - case 211 /* ThrowStatement */: - case 209 /* SwitchStatement */: - return parent_2.expression === node; - case 202 /* ForStatement */: - var forStatement = parent_2; - return (forStatement.initializer === node && forStatement.initializer.kind !== 215 /* VariableDeclarationList */) || + var parent_3 = node.parent; + switch (parent_3.kind) { + case 218 /* VariableDeclaration */: + case 142 /* Parameter */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + case 255 /* EnumMember */: + case 253 /* PropertyAssignment */: + case 169 /* BindingElement */: + return parent_3.initializer === node; + case 202 /* ExpressionStatement */: + case 203 /* IfStatement */: + case 204 /* DoStatement */: + case 205 /* WhileStatement */: + case 211 /* ReturnStatement */: + case 212 /* WithStatement */: + case 213 /* SwitchStatement */: + case 249 /* CaseClause */: + case 215 /* ThrowStatement */: + case 213 /* SwitchStatement */: + return parent_3.expression === node; + case 206 /* ForStatement */: + var forStatement = parent_3; + return (forStatement.initializer === node && forStatement.initializer.kind !== 219 /* VariableDeclarationList */) || forStatement.condition === node || forStatement.incrementor === node; - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: - var forInStatement = parent_2; - return (forInStatement.initializer === node && forInStatement.initializer.kind !== 215 /* VariableDeclarationList */) || + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: + var forInStatement = parent_3; + return (forInStatement.initializer === node && forInStatement.initializer.kind !== 219 /* VariableDeclarationList */) || forInStatement.expression === node; - case 174 /* TypeAssertionExpression */: - case 192 /* AsExpression */: - return node === parent_2.expression; - case 193 /* TemplateSpan */: - return node === parent_2.expression; - case 137 /* ComputedPropertyName */: - return node === parent_2.expression; - case 140 /* Decorator */: - case 243 /* JsxExpression */: - case 242 /* JsxSpreadAttribute */: + case 177 /* TypeAssertionExpression */: + case 195 /* AsExpression */: + return node === parent_3.expression; + case 197 /* TemplateSpan */: + return node === parent_3.expression; + case 140 /* ComputedPropertyName */: + return node === parent_3.expression; + case 143 /* Decorator */: + case 248 /* JsxExpression */: + case 247 /* JsxSpreadAttribute */: return true; - case 191 /* ExpressionWithTypeArguments */: - return parent_2.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent_2); + case 194 /* ExpressionWithTypeArguments */: + return parent_3.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent_3); default: - if (isExpression(parent_2)) { + if (isExpression(parent_3)) { return true; } } @@ -5554,7 +6453,7 @@ var ts; function isExternalModuleNameRelative(moduleName) { // TypeScript 1.0 spec (April 2014): 11.2.1 // An external module name is "relative" if the first term is "." or "..". - return moduleName.substr(0, 2) === "./" || moduleName.substr(0, 3) === "../" || moduleName.substr(0, 2) === ".\\" || moduleName.substr(0, 3) === "..\\"; + return /^\.\.?($|[\\/])/.test(moduleName); } ts.isExternalModuleNameRelative = isExternalModuleNameRelative; function isInstantiatedModule(node, preserveConstEnums) { @@ -5564,7 +6463,7 @@ var ts; } ts.isInstantiatedModule = isInstantiatedModule; function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 224 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 235 /* ExternalModuleReference */; + return node.kind === 229 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 240 /* ExternalModuleReference */; } ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; function getExternalModuleImportEqualsDeclarationExpression(node) { @@ -5573,7 +6472,7 @@ var ts; } ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 224 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 235 /* ExternalModuleReference */; + return node.kind === 229 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 240 /* ExternalModuleReference */; } ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; function isSourceFileJavaScript(file) { @@ -5581,7 +6480,7 @@ var ts; } ts.isSourceFileJavaScript = isSourceFileJavaScript; function isInJavaScriptFile(node) { - return node && !!(node.parserContextFlags & 32 /* JavaScriptFile */); + return node && !!(node.flags & 134217728 /* JavaScriptFile */); } ts.isInJavaScriptFile = isInJavaScriptFile; /** @@ -5591,24 +6490,40 @@ var ts; */ function isRequireCall(expression, checkArgumentIsStringLiteral) { // of the form 'require("name")' - var isRequire = expression.kind === 171 /* CallExpression */ && + var isRequire = expression.kind === 174 /* CallExpression */ && expression.expression.kind === 69 /* Identifier */ && expression.expression.text === "require" && expression.arguments.length === 1; return isRequire && (!checkArgumentIsStringLiteral || expression.arguments[0].kind === 9 /* StringLiteral */); } ts.isRequireCall = isRequireCall; + function isSingleOrDoubleQuote(charCode) { + return charCode === 39 /* singleQuote */ || charCode === 34 /* doubleQuote */; + } + ts.isSingleOrDoubleQuote = isSingleOrDoubleQuote; + /** + * Returns true if the node is a variable declaration whose initializer is a function expression. + * This function does not test if the node is in a JavaScript file or not. + */ + function isDeclarationOfFunctionExpression(s) { + if (s.valueDeclaration && s.valueDeclaration.kind === 218 /* VariableDeclaration */) { + var declaration = s.valueDeclaration; + return declaration.initializer && declaration.initializer.kind === 179 /* FunctionExpression */; + } + return false; + } + ts.isDeclarationOfFunctionExpression = isDeclarationOfFunctionExpression; /// Given a BinaryExpression, returns SpecialPropertyAssignmentKind for the various kinds of property /// assignments we treat as special in the binder function getSpecialPropertyAssignmentKind(expression) { if (!isInJavaScriptFile(expression)) { return 0 /* None */; } - if (expression.kind !== 184 /* BinaryExpression */) { + if (expression.kind !== 187 /* BinaryExpression */) { return 0 /* None */; } var expr = expression; - if (expr.operatorToken.kind !== 56 /* EqualsToken */ || expr.left.kind !== 169 /* PropertyAccessExpression */) { + if (expr.operatorToken.kind !== 56 /* EqualsToken */ || expr.left.kind !== 172 /* PropertyAccessExpression */) { return 0 /* None */; } var lhs = expr.left; @@ -5626,30 +6541,37 @@ var ts; else if (lhs.expression.kind === 97 /* ThisKeyword */) { return 4 /* ThisProperty */; } - else if (lhs.expression.kind === 169 /* PropertyAccessExpression */) { + else if (lhs.expression.kind === 172 /* PropertyAccessExpression */) { // chained dot, e.g. x.y.z = expr; this var is the 'x.y' part var innerPropertyAccess = lhs.expression; - if (innerPropertyAccess.expression.kind === 69 /* Identifier */ && innerPropertyAccess.name.text === "prototype") { - return 3 /* PrototypeProperty */; + if (innerPropertyAccess.expression.kind === 69 /* Identifier */) { + // module.exports.name = expr + var innerPropertyAccessIdentifier = innerPropertyAccess.expression; + if (innerPropertyAccessIdentifier.text === "module" && innerPropertyAccess.name.text === "exports") { + return 1 /* ExportsProperty */; + } + if (innerPropertyAccess.name.text === "prototype") { + return 3 /* PrototypeProperty */; + } } } return 0 /* None */; } ts.getSpecialPropertyAssignmentKind = getSpecialPropertyAssignmentKind; function getExternalModuleName(node) { - if (node.kind === 225 /* ImportDeclaration */) { + if (node.kind === 230 /* ImportDeclaration */) { return node.moduleSpecifier; } - if (node.kind === 224 /* ImportEqualsDeclaration */) { + if (node.kind === 229 /* ImportEqualsDeclaration */) { var reference = node.moduleReference; - if (reference.kind === 235 /* ExternalModuleReference */) { + if (reference.kind === 240 /* ExternalModuleReference */) { return reference.expression; } } - if (node.kind === 231 /* ExportDeclaration */) { + if (node.kind === 236 /* ExportDeclaration */) { return node.moduleSpecifier; } - if (node.kind === 221 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) { + if (node.kind === 225 /* ModuleDeclaration */ && node.name.kind === 9 /* StringLiteral */) { return node.name; } } @@ -5657,13 +6579,13 @@ var ts; function hasQuestionToken(node) { if (node) { switch (node.kind) { - case 139 /* Parameter */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 249 /* ShorthandPropertyAssignment */: - case 248 /* PropertyAssignment */: - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: + case 142 /* Parameter */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 254 /* ShorthandPropertyAssignment */: + case 253 /* PropertyAssignment */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: return node.questionToken !== undefined; } } @@ -5671,70 +6593,73 @@ var ts; } ts.hasQuestionToken = hasQuestionToken; function isJSDocConstructSignature(node) { - return node.kind === 264 /* JSDocFunctionType */ && + return node.kind === 269 /* JSDocFunctionType */ && node.parameters.length > 0 && - node.parameters[0].type.kind === 266 /* JSDocConstructorType */; + node.parameters[0].type.kind === 271 /* JSDocConstructorType */; } ts.isJSDocConstructSignature = isJSDocConstructSignature; function getJSDocTag(node, kind, checkParentVariableStatement) { if (!node) { return undefined; } - var jsDocComment = getJSDocComment(node, checkParentVariableStatement); - if (!jsDocComment) { + var jsDocComments = getJSDocComments(node, checkParentVariableStatement); + if (!jsDocComments) { return undefined; } - for (var _i = 0, _a = jsDocComment.tags; _i < _a.length; _i++) { - var tag = _a[_i]; - if (tag.kind === kind) { - return tag; + for (var _i = 0, jsDocComments_1 = jsDocComments; _i < jsDocComments_1.length; _i++) { + var jsDocComment = jsDocComments_1[_i]; + for (var _a = 0, _b = jsDocComment.tags; _a < _b.length; _a++) { + var tag = _b[_a]; + if (tag.kind === kind) { + return tag; + } } } } - function getJSDocComment(node, checkParentVariableStatement) { - if (node.jsDocComment) { - return node.jsDocComment; + function getJSDocComments(node, checkParentVariableStatement) { + if (node.jsDocComments) { + return node.jsDocComments; } - // Try to recognize this pattern when node is initializer of variable declaration and JSDoc comments are on containing variable statement. - // /** + // Try to recognize this pattern when node is initializer of variable declaration and JSDoc comments are on containing variable statement. + // /** // * @param {number} name - // * @returns {number} + // * @returns {number} // */ // var x = function(name) { return name.length; } if (checkParentVariableStatement) { - var isInitializerOfVariableDeclarationInStatement = node.parent.kind === 214 /* VariableDeclaration */ && + var isInitializerOfVariableDeclarationInStatement = node.parent.kind === 218 /* VariableDeclaration */ && node.parent.initializer === node && - node.parent.parent.parent.kind === 196 /* VariableStatement */; + node.parent.parent.parent.kind === 200 /* VariableStatement */; var variableStatementNode = isInitializerOfVariableDeclarationInStatement ? node.parent.parent.parent : undefined; if (variableStatementNode) { - return variableStatementNode.jsDocComment; + return variableStatementNode.jsDocComments; } // Also recognize when the node is the RHS of an assignment expression - var parent_3 = node.parent; - var isSourceOfAssignmentExpressionStatement = parent_3 && parent_3.parent && - parent_3.kind === 184 /* BinaryExpression */ && - parent_3.operatorToken.kind === 56 /* EqualsToken */ && - parent_3.parent.kind === 198 /* ExpressionStatement */; + var parent_4 = node.parent; + var isSourceOfAssignmentExpressionStatement = parent_4 && parent_4.parent && + parent_4.kind === 187 /* BinaryExpression */ && + parent_4.operatorToken.kind === 56 /* EqualsToken */ && + parent_4.parent.kind === 202 /* ExpressionStatement */; if (isSourceOfAssignmentExpressionStatement) { - return parent_3.parent.jsDocComment; + return parent_4.parent.jsDocComments; } - var isPropertyAssignmentExpression = parent_3 && parent_3.kind === 248 /* PropertyAssignment */; + var isPropertyAssignmentExpression = parent_4 && parent_4.kind === 253 /* PropertyAssignment */; if (isPropertyAssignmentExpression) { - return parent_3.jsDocComment; + return parent_4.jsDocComments; } } return undefined; } function getJSDocTypeTag(node) { - return getJSDocTag(node, 272 /* JSDocTypeTag */, /*checkParentVariableStatement*/ false); + return getJSDocTag(node, 277 /* JSDocTypeTag */, /*checkParentVariableStatement*/ false); } ts.getJSDocTypeTag = getJSDocTypeTag; function getJSDocReturnTag(node) { - return getJSDocTag(node, 271 /* JSDocReturnTag */, /*checkParentVariableStatement*/ true); + return getJSDocTag(node, 276 /* JSDocReturnTag */, /*checkParentVariableStatement*/ true); } ts.getJSDocReturnTag = getJSDocReturnTag; function getJSDocTemplateTag(node) { - return getJSDocTag(node, 273 /* JSDocTemplateTag */, /*checkParentVariableStatement*/ false); + return getJSDocTag(node, 278 /* JSDocTemplateTag */, /*checkParentVariableStatement*/ false); } ts.getJSDocTemplateTag = getJSDocTemplateTag; function getCorrespondingJSDocParameterTag(parameter) { @@ -5742,15 +6667,18 @@ var ts; // If it's a parameter, see if the parent has a jsdoc comment with an @param // annotation. var parameterName = parameter.name.text; - var jsDocComment = getJSDocComment(parameter.parent, /*checkParentVariableStatement*/ true); - if (jsDocComment) { - for (var _i = 0, _a = jsDocComment.tags; _i < _a.length; _i++) { - var tag = _a[_i]; - if (tag.kind === 270 /* JSDocParameterTag */) { - var parameterTag = tag; - var name_6 = parameterTag.preParameterName || parameterTag.postParameterName; - if (name_6.text === parameterName) { - return parameterTag; + var jsDocComments = getJSDocComments(parameter.parent, /*checkParentVariableStatement*/ true); + if (jsDocComments) { + for (var _i = 0, jsDocComments_2 = jsDocComments; _i < jsDocComments_2.length; _i++) { + var jsDocComment = jsDocComments_2[_i]; + for (var _a = 0, _b = jsDocComment.tags; _a < _b.length; _a++) { + var tag = _b[_a]; + if (tag.kind === 275 /* JSDocParameterTag */) { + var parameterTag = tag; + var name_6 = parameterTag.preParameterName || parameterTag.postParameterName; + if (name_6.text === parameterName) { + return parameterTag; + } } } } @@ -5763,22 +6691,27 @@ var ts; return isRestParameter(ts.lastOrUndefined(s.parameters)); } ts.hasRestParameter = hasRestParameter; + function hasDeclaredRestParameter(s) { + return isDeclaredRestParam(ts.lastOrUndefined(s.parameters)); + } + ts.hasDeclaredRestParameter = hasDeclaredRestParameter; function isRestParameter(node) { - if (node) { - if (node.parserContextFlags & 32 /* JavaScriptFile */) { - if (node.type && node.type.kind === 265 /* JSDocVariadicType */) { - return true; - } - var paramTag = getCorrespondingJSDocParameterTag(node); - if (paramTag && paramTag.typeExpression) { - return paramTag.typeExpression.type.kind === 265 /* JSDocVariadicType */; - } + if (node && (node.flags & 134217728 /* JavaScriptFile */)) { + if (node.type && node.type.kind === 270 /* JSDocVariadicType */) { + return true; + } + var paramTag = getCorrespondingJSDocParameterTag(node); + if (paramTag && paramTag.typeExpression) { + return paramTag.typeExpression.type.kind === 270 /* JSDocVariadicType */; } - return node.dotDotDotToken !== undefined; } - return false; + return isDeclaredRestParam(node); } ts.isRestParameter = isRestParameter; + function isDeclaredRestParam(node) { + return node && node.dotDotDotToken !== undefined; + } + ts.isDeclaredRestParam = isDeclaredRestParam; function isLiteralKind(kind) { return 8 /* FirstLiteralToken */ <= kind && kind <= 11 /* LastLiteralToken */; } @@ -5792,9 +6725,34 @@ var ts; } ts.isTemplateLiteralKind = isTemplateLiteralKind; function isBindingPattern(node) { - return !!node && (node.kind === 165 /* ArrayBindingPattern */ || node.kind === 164 /* ObjectBindingPattern */); + return !!node && (node.kind === 168 /* ArrayBindingPattern */ || node.kind === 167 /* ObjectBindingPattern */); } ts.isBindingPattern = isBindingPattern; + // A node is an assignment target if it is on the left hand side of an '=' token, if it is parented by a property + // assignment in an object literal that is an assignment target, or if it is parented by an array literal that is + // an assignment target. Examples include 'a = xxx', '{ p: a } = xxx', '[{ p: a}] = xxx'. + function isAssignmentTarget(node) { + while (node.parent.kind === 178 /* ParenthesizedExpression */) { + node = node.parent; + } + while (true) { + var parent_5 = node.parent; + if (parent_5.kind === 170 /* ArrayLiteralExpression */ || parent_5.kind === 191 /* SpreadElementExpression */) { + node = parent_5; + continue; + } + if (parent_5.kind === 253 /* PropertyAssignment */ || parent_5.kind === 254 /* ShorthandPropertyAssignment */) { + node = parent_5.parent; + continue; + } + return parent_5.kind === 187 /* BinaryExpression */ && + isAssignmentOperator(parent_5.operatorToken.kind) && + parent_5.left === node || + (parent_5.kind === 207 /* ForInStatement */ || parent_5.kind === 208 /* ForOfStatement */) && + parent_5.initializer === node; + } + } + ts.isAssignmentTarget = isAssignmentTarget; function isNodeDescendentOf(node, ancestor) { while (node) { if (node === ancestor) @@ -5806,7 +6764,7 @@ var ts; ts.isNodeDescendentOf = isNodeDescendentOf; function isInAmbientContext(node) { while (node) { - if (node.flags & (4 /* Ambient */ | 4096 /* DeclarationFile */)) { + if (node.flags & 2 /* Ambient */ || (node.kind === 256 /* SourceFile */ && node.isDeclarationFile)) { return true; } node = node.parent; @@ -5816,34 +6774,36 @@ var ts; ts.isInAmbientContext = isInAmbientContext; function isDeclaration(node) { switch (node.kind) { - case 177 /* ArrowFunction */: - case 166 /* BindingElement */: - case 217 /* ClassDeclaration */: - case 189 /* ClassExpression */: - case 145 /* Constructor */: - case 220 /* EnumDeclaration */: - case 250 /* EnumMember */: - case 233 /* ExportSpecifier */: - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 146 /* GetAccessor */: - case 226 /* ImportClause */: - case 224 /* ImportEqualsDeclaration */: - case 229 /* ImportSpecifier */: - case 218 /* InterfaceDeclaration */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 221 /* ModuleDeclaration */: - case 227 /* NamespaceImport */: - case 139 /* Parameter */: - case 248 /* PropertyAssignment */: - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - case 147 /* SetAccessor */: - case 249 /* ShorthandPropertyAssignment */: - case 219 /* TypeAliasDeclaration */: - case 138 /* TypeParameter */: - case 214 /* VariableDeclaration */: + case 180 /* ArrowFunction */: + case 169 /* BindingElement */: + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: + case 148 /* Constructor */: + case 224 /* EnumDeclaration */: + case 255 /* EnumMember */: + case 238 /* ExportSpecifier */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 149 /* GetAccessor */: + case 231 /* ImportClause */: + case 229 /* ImportEqualsDeclaration */: + case 234 /* ImportSpecifier */: + case 222 /* InterfaceDeclaration */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 225 /* ModuleDeclaration */: + case 232 /* NamespaceImport */: + case 228 /* NamespaceExportDeclaration */: + case 142 /* Parameter */: + case 253 /* PropertyAssignment */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + case 150 /* SetAccessor */: + case 254 /* ShorthandPropertyAssignment */: + case 223 /* TypeAliasDeclaration */: + case 141 /* TypeParameter */: + case 218 /* VariableDeclaration */: + case 279 /* JSDocTypedefTag */: return true; } return false; @@ -5851,25 +6811,25 @@ var ts; ts.isDeclaration = isDeclaration; function isStatement(n) { switch (n.kind) { - case 206 /* BreakStatement */: - case 205 /* ContinueStatement */: - case 213 /* DebuggerStatement */: - case 200 /* DoStatement */: - case 198 /* ExpressionStatement */: - case 197 /* EmptyStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: - case 202 /* ForStatement */: - case 199 /* IfStatement */: - case 210 /* LabeledStatement */: - case 207 /* ReturnStatement */: - case 209 /* SwitchStatement */: - case 211 /* ThrowStatement */: - case 212 /* TryStatement */: - case 196 /* VariableStatement */: - case 201 /* WhileStatement */: - case 208 /* WithStatement */: - case 230 /* ExportAssignment */: + case 210 /* BreakStatement */: + case 209 /* ContinueStatement */: + case 217 /* DebuggerStatement */: + case 204 /* DoStatement */: + case 202 /* ExpressionStatement */: + case 201 /* EmptyStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: + case 206 /* ForStatement */: + case 203 /* IfStatement */: + case 214 /* LabeledStatement */: + case 211 /* ReturnStatement */: + case 213 /* SwitchStatement */: + case 215 /* ThrowStatement */: + case 216 /* TryStatement */: + case 200 /* VariableStatement */: + case 205 /* WhileStatement */: + case 212 /* WithStatement */: + case 235 /* ExportAssignment */: return true; default: return false; @@ -5878,13 +6838,13 @@ var ts; ts.isStatement = isStatement; function isClassElement(n) { switch (n.kind) { - case 145 /* Constructor */: - case 142 /* PropertyDeclaration */: - case 144 /* MethodDeclaration */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 143 /* MethodSignature */: - case 150 /* IndexSignature */: + case 148 /* Constructor */: + case 145 /* PropertyDeclaration */: + case 147 /* MethodDeclaration */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 146 /* MethodSignature */: + case 153 /* IndexSignature */: return true; default: return false; @@ -5897,7 +6857,7 @@ var ts; return false; } var parent = name.parent; - if (parent.kind === 229 /* ImportSpecifier */ || parent.kind === 233 /* ExportSpecifier */) { + if (parent.kind === 234 /* ImportSpecifier */ || parent.kind === 238 /* ExportSpecifier */) { if (parent.propertyName) { return true; } @@ -5908,35 +6868,41 @@ var ts; return false; } ts.isDeclarationName = isDeclarationName; + function isLiteralComputedPropertyDeclarationName(node) { + return (node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) && + node.parent.kind === 140 /* ComputedPropertyName */ && + isDeclaration(node.parent.parent); + } + ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName; // Return true if the given identifier is classified as an IdentifierName function isIdentifierName(node) { var parent = node.parent; switch (parent.kind) { - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 250 /* EnumMember */: - case 248 /* PropertyAssignment */: - case 169 /* PropertyAccessExpression */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 255 /* EnumMember */: + case 253 /* PropertyAssignment */: + case 172 /* PropertyAccessExpression */: // Name in member declaration or property name in property access return parent.name === node; - case 136 /* QualifiedName */: + case 139 /* QualifiedName */: // Name on right hand side of dot in a type query if (parent.right === node) { - while (parent.kind === 136 /* QualifiedName */) { + while (parent.kind === 139 /* QualifiedName */) { parent = parent.parent; } - return parent.kind === 155 /* TypeQuery */; + return parent.kind === 158 /* TypeQuery */; } return false; - case 166 /* BindingElement */: - case 229 /* ImportSpecifier */: + case 169 /* BindingElement */: + case 234 /* ImportSpecifier */: // Property name in binding element or import specifier return parent.propertyName === node; - case 233 /* ExportSpecifier */: + case 238 /* ExportSpecifier */: // Any name in an export specifier return true; } @@ -5949,17 +6915,22 @@ var ts; // import * as from ... // import { x as } from ... // export { x as } from ... - // export = ... - // export default ... + // export = + // export default function isAliasSymbolDeclaration(node) { - return node.kind === 224 /* ImportEqualsDeclaration */ || - node.kind === 226 /* ImportClause */ && !!node.name || - node.kind === 227 /* NamespaceImport */ || - node.kind === 229 /* ImportSpecifier */ || - node.kind === 233 /* ExportSpecifier */ || - node.kind === 230 /* ExportAssignment */ && node.expression.kind === 69 /* Identifier */; + return node.kind === 229 /* ImportEqualsDeclaration */ || + node.kind === 228 /* NamespaceExportDeclaration */ || + node.kind === 231 /* ImportClause */ && !!node.name || + node.kind === 232 /* NamespaceImport */ || + node.kind === 234 /* ImportSpecifier */ || + node.kind === 238 /* ExportSpecifier */ || + node.kind === 235 /* ExportAssignment */ && exportAssignmentIsAlias(node); } ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; + function exportAssignmentIsAlias(node) { + return isEntityNameExpression(node.expression); + } + ts.exportAssignmentIsAlias = exportAssignmentIsAlias; function getClassExtendsHeritageClauseElement(node) { var heritageClause = getHeritageClause(node.heritageClauses, 83 /* ExtendsKeyword */); return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; @@ -6014,32 +6985,32 @@ var ts; }; } else { - var matchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment); - if (matchResult) { + var refMatchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment); + var refLibResult = !refMatchResult && ts.fullTripleSlashReferenceTypeReferenceDirectiveRegEx.exec(comment); + if (refMatchResult || refLibResult) { var start = commentRange.pos; var end = commentRange.end; return { fileReference: { pos: start, end: end, - fileName: matchResult[3] + fileName: (refMatchResult || refLibResult)[3] }, - isNoDefaultLib: false - }; - } - else { - return { - diagnosticMessage: ts.Diagnostics.Invalid_reference_directive_syntax, - isNoDefaultLib: false + isNoDefaultLib: false, + isTypeReferenceDirective: !!refLibResult }; } + return { + diagnosticMessage: ts.Diagnostics.Invalid_reference_directive_syntax, + isNoDefaultLib: false + }; } } return undefined; } ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; function isKeyword(token) { - return 70 /* FirstKeyword */ <= token && token <= 135 /* LastKeyword */; + return 70 /* FirstKeyword */ <= token && token <= 138 /* LastKeyword */; } ts.isKeyword = isKeyword; function isTrivia(token) { @@ -6066,7 +7037,7 @@ var ts; } ts.hasDynamicName = hasDynamicName; function isDynamicName(name) { - return name.kind === 137 /* ComputedPropertyName */ && + return name.kind === 140 /* ComputedPropertyName */ && !isStringOrNumericLiteral(name.expression.kind) && !isWellKnownSymbolSyntactically(name.expression); } @@ -6081,15 +7052,18 @@ var ts; } ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically; function getPropertyNameForPropertyNameNode(name) { - if (name.kind === 69 /* Identifier */ || name.kind === 9 /* StringLiteral */ || name.kind === 8 /* NumericLiteral */) { + if (name.kind === 69 /* Identifier */ || name.kind === 9 /* StringLiteral */ || name.kind === 8 /* NumericLiteral */ || name.kind === 142 /* Parameter */) { return name.text; } - if (name.kind === 137 /* ComputedPropertyName */) { + if (name.kind === 140 /* ComputedPropertyName */) { var nameExpression = name.expression; if (isWellKnownSymbolSyntactically(nameExpression)) { var rightHandSideName = nameExpression.name.text; return getPropertyNameForKnownSymbolName(rightHandSideName); } + else if (nameExpression.kind === 9 /* StringLiteral */ || nameExpression.kind === 8 /* NumericLiteral */) { + return nameExpression.text; + } } return undefined; } @@ -6116,6 +7090,7 @@ var ts; case 112 /* PublicKeyword */: case 110 /* PrivateKeyword */: case 111 /* ProtectedKeyword */: + case 128 /* ReadonlyKeyword */: case 113 /* StaticKeyword */: return true; } @@ -6124,18 +7099,18 @@ var ts; ts.isModifierKind = isModifierKind; function isParameterDeclaration(node) { var root = getRootDeclaration(node); - return root.kind === 139 /* Parameter */; + return root.kind === 142 /* Parameter */; } ts.isParameterDeclaration = isParameterDeclaration; function getRootDeclaration(node) { - while (node.kind === 166 /* BindingElement */) { + while (node.kind === 169 /* BindingElement */) { node = node.parent.parent; } return node; } ts.getRootDeclaration = getRootDeclaration; function nodeStartsNewLexicalEnvironment(n) { - return isFunctionLike(n) || n.kind === 221 /* ModuleDeclaration */ || n.kind === 251 /* SourceFile */; + return isFunctionLike(n) || n.kind === 225 /* ModuleDeclaration */ || n.kind === 256 /* SourceFile */; } ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; /** @@ -6185,7 +7160,7 @@ var ts; } ts.cloneEntityName = cloneEntityName; function isQualifiedName(node) { - return node.kind === 136 /* QualifiedName */; + return node.kind === 139 /* QualifiedName */; } ts.isQualifiedName = isQualifiedName; function nodeIsSynthesized(node) { @@ -6207,7 +7182,7 @@ var ts; ts.createSynthesizedNodeArray = createSynthesizedNodeArray; function createDiagnosticCollection() { var nonFileDiagnostics = []; - var fileDiagnostics = {}; + var fileDiagnostics = ts.createMap(); var diagnosticsModified = false; var modificationCount = 0; return { @@ -6221,12 +7196,12 @@ var ts; return modificationCount; } function reattachFileDiagnostics(newFile) { - if (!ts.hasProperty(fileDiagnostics, newFile.fileName)) { - return; - } - for (var _i = 0, _a = fileDiagnostics[newFile.fileName]; _i < _a.length; _i++) { - var diagnostic = _a[_i]; - diagnostic.file = newFile; + var diagnostics = fileDiagnostics[newFile.fileName]; + if (diagnostics) { + for (var _i = 0, diagnostics_1 = diagnostics; _i < diagnostics_1.length; _i++) { + var diagnostic = diagnostics_1[_i]; + diagnostic.file = newFile; + } } } function add(diagnostic) { @@ -6260,9 +7235,7 @@ var ts; } ts.forEach(nonFileDiagnostics, pushDiagnostic); for (var key in fileDiagnostics) { - if (ts.hasProperty(fileDiagnostics, key)) { - ts.forEach(fileDiagnostics[key], pushDiagnostic); - } + ts.forEach(fileDiagnostics[key], pushDiagnostic); } return ts.sortAndDeduplicateDiagnostics(allDiagnostics); } @@ -6273,9 +7246,7 @@ var ts; diagnosticsModified = false; nonFileDiagnostics = ts.sortAndDeduplicateDiagnostics(nonFileDiagnostics); for (var key in fileDiagnostics) { - if (ts.hasProperty(fileDiagnostics, key)) { - fileDiagnostics[key] = ts.sortAndDeduplicateDiagnostics(fileDiagnostics[key]); - } + fileDiagnostics[key] = ts.sortAndDeduplicateDiagnostics(fileDiagnostics[key]); } } } @@ -6286,7 +7257,7 @@ var ts; // the map below must be updated. Note that this regexp *does not* include the 'delete' character. // There is no reason for this other than that JSON.stringify does not handle it either. var escapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; - var escapedCharsMap = { + var escapedCharsMap = ts.createMap({ "\0": "\\0", "\t": "\\t", "\v": "\\v", @@ -6299,7 +7270,7 @@ var ts; "\u2028": "\\u2028", "\u2029": "\\u2029", "\u0085": "\\u0085" // nextLine - }; + }); /** * Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), * but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) @@ -6436,6 +7407,17 @@ var ts; return emitOutputFilePathWithoutExtension + extension; } ts.getOwnEmitOutputFilePath = getOwnEmitOutputFilePath; + function getDeclarationEmitOutputFilePath(sourceFile, host) { + var options = host.getCompilerOptions(); + var outputDir = options.declarationDir || options.outDir; // Prefer declaration folder if specified + if (options.declaration) { + var path = outputDir + ? getSourceFilePathInNewDir(sourceFile, host, outputDir) + : sourceFile.fileName; + return ts.removeFileExtension(path) + ".d.ts"; + } + } + ts.getDeclarationEmitOutputFilePath = getDeclarationEmitOutputFilePath; function getEmitScriptTarget(compilerOptions) { return compilerOptions.target || 0 /* ES3 */; } @@ -6443,7 +7425,7 @@ var ts; function getEmitModuleKind(compilerOptions) { return typeof compilerOptions.module === "number" ? compilerOptions.module : - getEmitScriptTarget(compilerOptions) === 2 /* ES6 */ ? 5 /* ES6 */ : 1 /* CommonJS */; + getEmitScriptTarget(compilerOptions) === 2 /* ES6 */ ? ts.ModuleKind.ES6 : ts.ModuleKind.CommonJS; } ts.getEmitModuleKind = getEmitModuleKind; function forEachExpectedEmitFile(host, action, targetSourceFile) { @@ -6456,7 +7438,8 @@ var ts; var sourceFiles = targetSourceFile === undefined ? host.getSourceFiles() : [targetSourceFile]; for (var _i = 0, sourceFiles_1 = sourceFiles; _i < sourceFiles_1.length; _i++) { var sourceFile = sourceFiles_1[_i]; - if (!isDeclarationFile(sourceFile)) { + // Don't emit if source file is a declaration file, or was located under node_modules + if (!isDeclarationFile(sourceFile) && !host.isSourceFileFromExternalLibrary(sourceFile)) { onSingleFileEmit(host, sourceFile); } } @@ -6481,21 +7464,23 @@ var ts; var emitFileNames = { jsFilePath: jsFilePath, sourceMapFilePath: getSourceMapFilePath(jsFilePath, options), - declarationFilePath: !isSourceFileJavaScript(sourceFile) ? getDeclarationEmitFilePath(jsFilePath, options) : undefined + declarationFilePath: !isSourceFileJavaScript(sourceFile) ? getDeclarationEmitOutputFilePath(sourceFile, host) : undefined }; action(emitFileNames, [sourceFile], /*isBundledEmit*/ false); } function onBundledEmit(host) { - // Can emit only sources that are not declaration file and are either non module code or module with --module or --target es6 specified + // Can emit only sources that are not declaration file and are either non module code or module with + // --module or --target es6 specified. Files included by searching under node_modules are also not emitted. var bundledSources = ts.filter(host.getSourceFiles(), function (sourceFile) { return !isDeclarationFile(sourceFile) && - (!isExternalModule(sourceFile) || - (getEmitModuleKind(options) && isExternalModule(sourceFile))); }); // module that can emit - note falsy value from getEmitModuleKind means the module kind that shouldn't be emitted + !host.isSourceFileFromExternalLibrary(sourceFile) && + (!ts.isExternalModule(sourceFile) || + !!getEmitModuleKind(options)); }); if (bundledSources.length) { var jsFilePath = options.outFile || options.out; var emitFileNames = { jsFilePath: jsFilePath, sourceMapFilePath: getSourceMapFilePath(jsFilePath, options), - declarationFilePath: getDeclarationEmitFilePath(jsFilePath, options) + declarationFilePath: options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : undefined }; action(emitFileNames, bundledSources, /*isBundledEmit*/ true); } @@ -6503,21 +7488,20 @@ var ts; function getSourceMapFilePath(jsFilePath, options) { return options.sourceMap ? jsFilePath + ".map" : undefined; } - function getDeclarationEmitFilePath(jsFilePath, options) { - return options.declaration ? ts.removeFileExtension(jsFilePath) + ".d.ts" : undefined; - } } ts.forEachExpectedEmitFile = forEachExpectedEmitFile; function getSourceFilePathInNewDir(sourceFile, host, newDirPath) { var sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory()); - sourceFilePath = sourceFilePath.replace(host.getCommonSourceDirectory(), ""); + var commonSourceDirectory = host.getCommonSourceDirectory(); + var isSourceFileInCommonSourceDirectory = host.getCanonicalFileName(sourceFilePath).indexOf(host.getCanonicalFileName(commonSourceDirectory)) === 0; + sourceFilePath = isSourceFileInCommonSourceDirectory ? sourceFilePath.substring(commonSourceDirectory.length) : sourceFilePath; return ts.combinePaths(newDirPath, sourceFilePath); } ts.getSourceFilePathInNewDir = getSourceFilePathInNewDir; - function writeFile(host, diagnostics, fileName, data, writeByteOrderMark) { + function writeFile(host, diagnostics, fileName, data, writeByteOrderMark, sourceFiles) { host.writeFile(fileName, data, writeByteOrderMark, function (hostErrorMessage) { diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); - }); + }, sourceFiles); } ts.writeFile = writeFile; function getLineOfLocalPosition(currentSourceFile, pos) { @@ -6530,14 +7514,19 @@ var ts; ts.getLineOfLocalPositionFromLineMap = getLineOfLocalPositionFromLineMap; function getFirstConstructorWithBody(node) { return ts.forEach(node.members, function (member) { - if (member.kind === 145 /* Constructor */ && nodeIsPresent(member.body)) { + if (member.kind === 148 /* Constructor */ && nodeIsPresent(member.body)) { return member; } }); } ts.getFirstConstructorWithBody = getFirstConstructorWithBody; function getSetAccessorTypeAnnotationNode(accessor) { - return accessor && accessor.parameters.length > 0 && accessor.parameters[0].type; + if (accessor && accessor.parameters.length > 0) { + var hasThis = accessor.parameters.length === 2 && + accessor.parameters[0].name.kind === 69 /* Identifier */ && + accessor.parameters[0].name.originalKeywordKind === 97 /* ThisKeyword */; + return accessor.parameters[hasThis ? 1 : 0].type; + } } ts.getSetAccessorTypeAnnotationNode = getSetAccessorTypeAnnotationNode; function getAllAccessorDeclarations(declarations, accessor) { @@ -6547,10 +7536,10 @@ var ts; var setAccessor; if (hasDynamicName(accessor)) { firstAccessor = accessor; - if (accessor.kind === 146 /* GetAccessor */) { + if (accessor.kind === 149 /* GetAccessor */) { getAccessor = accessor; } - else if (accessor.kind === 147 /* SetAccessor */) { + else if (accessor.kind === 150 /* SetAccessor */) { setAccessor = accessor; } else { @@ -6559,8 +7548,8 @@ var ts; } else { ts.forEach(declarations, function (member) { - if ((member.kind === 146 /* GetAccessor */ || member.kind === 147 /* SetAccessor */) - && (member.flags & 64 /* Static */) === (accessor.flags & 64 /* Static */)) { + if ((member.kind === 149 /* GetAccessor */ || member.kind === 150 /* SetAccessor */) + && (member.flags & 32 /* Static */) === (accessor.flags & 32 /* Static */)) { var memberName = getPropertyNameForPropertyNameNode(member.name); var accessorName = getPropertyNameForPropertyNameNode(accessor.name); if (memberName === accessorName) { @@ -6570,10 +7559,10 @@ var ts; else if (!secondAccessor) { secondAccessor = member; } - if (member.kind === 146 /* GetAccessor */ && !getAccessor) { + if (member.kind === 149 /* GetAccessor */ && !getAccessor) { getAccessor = member; } - if (member.kind === 147 /* SetAccessor */ && !setAccessor) { + if (member.kind === 150 /* SetAccessor */ && !setAccessor) { setAccessor = member; } } @@ -6752,7 +7741,7 @@ var ts; } function calculateIndent(text, pos, end) { var currentLineIndent = 0; - for (; pos < end && ts.isWhiteSpace(text.charCodeAt(pos)); pos++) { + for (; pos < end && ts.isWhiteSpaceSingleLine(text.charCodeAt(pos)); pos++) { if (text.charCodeAt(pos) === 9 /* tab */) { // Tabs = TabSize = indent size and go to next tabStop currentLineIndent += getIndentSize() - (currentLineIndent % getIndentSize()); @@ -6766,16 +7755,17 @@ var ts; } function modifierToFlag(token) { switch (token) { - case 113 /* StaticKeyword */: return 64 /* Static */; - case 112 /* PublicKeyword */: return 8 /* Public */; - case 111 /* ProtectedKeyword */: return 32 /* Protected */; - case 110 /* PrivateKeyword */: return 16 /* Private */; + case 113 /* StaticKeyword */: return 32 /* Static */; + case 112 /* PublicKeyword */: return 4 /* Public */; + case 111 /* ProtectedKeyword */: return 16 /* Protected */; + case 110 /* PrivateKeyword */: return 8 /* Private */; case 115 /* AbstractKeyword */: return 128 /* Abstract */; - case 82 /* ExportKeyword */: return 2 /* Export */; - case 122 /* DeclareKeyword */: return 4 /* Ambient */; - case 74 /* ConstKeyword */: return 16384 /* Const */; + case 82 /* ExportKeyword */: return 1 /* Export */; + case 122 /* DeclareKeyword */: return 2 /* Ambient */; + case 74 /* ConstKeyword */: return 2048 /* Const */; case 77 /* DefaultKeyword */: return 512 /* Default */; case 118 /* AsyncKeyword */: return 256 /* Async */; + case 128 /* ReadonlyKeyword */: return 64 /* Readonly */; } return 0; } @@ -6783,24 +7773,25 @@ var ts; function isLeftHandSideExpression(expr) { if (expr) { switch (expr.kind) { - case 169 /* PropertyAccessExpression */: - case 170 /* ElementAccessExpression */: - case 172 /* NewExpression */: - case 171 /* CallExpression */: - case 236 /* JsxElement */: - case 237 /* JsxSelfClosingElement */: - case 173 /* TaggedTemplateExpression */: - case 167 /* ArrayLiteralExpression */: - case 175 /* ParenthesizedExpression */: - case 168 /* ObjectLiteralExpression */: - case 189 /* ClassExpression */: - case 176 /* FunctionExpression */: + case 172 /* PropertyAccessExpression */: + case 173 /* ElementAccessExpression */: + case 175 /* NewExpression */: + case 174 /* CallExpression */: + case 196 /* NonNullExpression */: + case 241 /* JsxElement */: + case 242 /* JsxSelfClosingElement */: + case 176 /* TaggedTemplateExpression */: + case 170 /* ArrayLiteralExpression */: + case 178 /* ParenthesizedExpression */: + case 171 /* ObjectLiteralExpression */: + case 192 /* ClassExpression */: + case 179 /* FunctionExpression */: case 69 /* Identifier */: case 10 /* RegularExpressionLiteral */: case 8 /* NumericLiteral */: case 9 /* StringLiteral */: case 11 /* NoSubstitutionTemplateLiteral */: - case 186 /* TemplateExpression */: + case 189 /* TemplateExpression */: case 84 /* FalseKeyword */: case 93 /* NullKeyword */: case 97 /* ThisKeyword */: @@ -6817,39 +7808,27 @@ var ts; } ts.isAssignmentOperator = isAssignmentOperator; function isExpressionWithTypeArgumentsInClassExtendsClause(node) { - return node.kind === 191 /* ExpressionWithTypeArguments */ && + return node.kind === 194 /* ExpressionWithTypeArguments */ && node.parent.token === 83 /* ExtendsKeyword */ && isClassLike(node.parent.parent); } ts.isExpressionWithTypeArgumentsInClassExtendsClause = isExpressionWithTypeArgumentsInClassExtendsClause; - // Returns false if this heritage clause element's expression contains something unsupported - // (i.e. not a name or dotted name). - function isSupportedExpressionWithTypeArguments(node) { - return isSupportedExpressionWithTypeArgumentsRest(node.expression); - } - ts.isSupportedExpressionWithTypeArguments = isSupportedExpressionWithTypeArguments; - function isSupportedExpressionWithTypeArgumentsRest(node) { - if (node.kind === 69 /* Identifier */) { - return true; - } - else if (isPropertyAccessExpression(node)) { - return isSupportedExpressionWithTypeArgumentsRest(node.expression); - } - else { - return false; - } + function isEntityNameExpression(node) { + return node.kind === 69 /* Identifier */ || + node.kind === 172 /* PropertyAccessExpression */ && isEntityNameExpression(node.expression); } + ts.isEntityNameExpression = isEntityNameExpression; function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return (node.parent.kind === 136 /* QualifiedName */ && node.parent.right === node) || - (node.parent.kind === 169 /* PropertyAccessExpression */ && node.parent.name === node); + return (node.parent.kind === 139 /* QualifiedName */ && node.parent.right === node) || + (node.parent.kind === 172 /* PropertyAccessExpression */ && node.parent.name === node); } ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess; function isEmptyObjectLiteralOrArrayLiteral(expression) { var kind = expression.kind; - if (kind === 168 /* ObjectLiteralExpression */) { + if (kind === 171 /* ObjectLiteralExpression */) { return expression.properties.length === 0; } - if (kind === 167 /* ArrayLiteralExpression */) { + if (kind === 170 /* ArrayLiteralExpression */) { return expression.elements.length === 0; } return false; @@ -6867,6 +7846,11 @@ var ts; return ts.forEach(ts.supportedTypeScriptExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); }); } ts.hasTypeScriptFileExtension = hasTypeScriptFileExtension; + /** Return ".ts", ".d.ts", or ".tsx", if that is the extension. */ + function tryExtractTypeScriptExtension(fileName) { + return ts.find(ts.supportedTypescriptExtensionsForExtractExtension, function (extension) { return ts.fileExtensionIs(fileName, extension); }); + } + ts.tryExtractTypeScriptExtension = tryExtractTypeScriptExtension; /** * Replace each instance of non-ascii characters by one, two, three, or four escape sequences * representing the UTF-8 encoding of the character, and return the expanded char code list. @@ -6936,7 +7920,7 @@ var ts; return (memo ? memo + "," : memo) + stringifyValue(value); } function stringifyObject(value) { - return "{" + ts.reduceProperties(value, stringifyProperty, "") + "}"; + return "{" + ts.reduceOwnProperties(value, stringifyProperty, "") + "}"; } function stringifyProperty(memo, value, key) { return value === undefined || typeof value === "function" || key === "__cycle" ? memo @@ -6967,7 +7951,7 @@ var ts; else if (i + 2 >= length) { byte4 = 64; } - // Write to the ouput + // Write to the output result += base64Digits.charAt(byte1) + base64Digits.charAt(byte2) + base64Digits.charAt(byte3) + base64Digits.charAt(byte4); i += 3; } @@ -6995,6 +7979,11 @@ var ts; return carriageReturnLineFeed; } ts.getNewLineCharacter = getNewLineCharacter; + function isWatchSet(options) { + // Firefox has Object.prototype.watch + return options.watch && options.hasOwnProperty("watch"); + } + ts.isWatchSet = isWatchSet; })(ts || (ts = {})); var ts; (function (ts) { @@ -7153,9 +8142,9 @@ var ts; // . | \ // ----------------------------------------------------------------------*-------------------------------- // - // (Note the dots represent the newly inferrred start. + // (Note the dots represent the newly inferred start. // Determining the new and old end is also pretty simple. Basically it boils down to paying attention to the - // absolute positions at the asterixes, and the relative change between the dollar signs. Basically, we see + // absolute positions at the asterisks, and the relative change between the dollar signs. Basically, we see // which if the two $'s precedes the other, and we move that one forward until they line up. in this case that // means: // @@ -7178,8 +8167,8 @@ var ts; // ended with a delta of 20 characters (60 - 40). Thus, if we go back in time to where the first edit started // that's the same as if we started at char 80 instead of 60. // - // As it so happens, the same logic applies if the second edit precedes the first edit. In that case rahter - // than pusing the first edit forward to match the second, we'll push the second edit forward to match the + // As it so happens, the same logic applies if the second edit precedes the first edit. In that case rather + // than pushing the first edit forward to match the second, we'll push the second edit forward to match the // first. // // In this case that means we have { oldStart: 10, oldEnd: 80, newEnd: 70 } or, in TextChangeRange @@ -7208,9 +8197,9 @@ var ts; } ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; function getTypeParameterOwner(d) { - if (d && d.kind === 138 /* TypeParameter */) { + if (d && d.kind === 141 /* TypeParameter */) { for (var current = d; current; current = current.parent) { - if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 218 /* InterfaceDeclaration */) { + if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 222 /* InterfaceDeclaration */) { return current; } } @@ -7218,7 +8207,7 @@ var ts; } ts.getTypeParameterOwner = getTypeParameterOwner; function isParameterPropertyDeclaration(node) { - return node.flags & 56 /* AccessibilityModifier */ && node.parent.kind === 145 /* Constructor */ && ts.isClassLike(node.parent.parent); + return node.flags & 92 /* ParameterPropertyModifier */ && node.parent.kind === 148 /* Constructor */ && ts.isClassLike(node.parent.parent); } ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration; })(ts || (ts = {})); @@ -7226,13 +8215,20 @@ var ts; /// var ts; (function (ts) { - /* @internal */ ts.parseTime = 0; var NodeConstructor; + var TokenConstructor; + var IdentifierConstructor; var SourceFileConstructor; function createNode(kind, pos, end) { - if (kind === 251 /* SourceFile */) { + if (kind === 256 /* SourceFile */) { return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, pos, end); } + else if (kind === 69 /* Identifier */) { + return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, pos, end); + } + else if (kind < 139 /* FirstNode */) { + return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, pos, end); + } else { return new (NodeConstructor || (NodeConstructor = ts.objectAllocator.getNodeConstructor()))(kind, pos, end); } @@ -7273,26 +8269,26 @@ var ts; var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode; var cbNodes = cbNodeArray || cbNode; switch (node.kind) { - case 136 /* QualifiedName */: + case 139 /* QualifiedName */: return visitNode(cbNode, node.left) || visitNode(cbNode, node.right); - case 138 /* TypeParameter */: + case 141 /* TypeParameter */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.constraint) || visitNode(cbNode, node.expression); - case 249 /* ShorthandPropertyAssignment */: + case 254 /* ShorthandPropertyAssignment */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.equalsToken) || visitNode(cbNode, node.objectAssignmentInitializer); - case 139 /* Parameter */: - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - case 248 /* PropertyAssignment */: - case 214 /* VariableDeclaration */: - case 166 /* BindingElement */: + case 142 /* Parameter */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + case 253 /* PropertyAssignment */: + case 218 /* VariableDeclaration */: + case 169 /* BindingElement */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.propertyName) || @@ -7301,24 +8297,24 @@ var ts; visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.type) || visitNode(cbNode, node.initializer); - case 153 /* FunctionType */: - case 154 /* ConstructorType */: - case 148 /* CallSignature */: - case 149 /* ConstructSignature */: - case 150 /* IndexSignature */: + case 156 /* FunctionType */: + case 157 /* ConstructorType */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: + case 153 /* IndexSignature */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 145 /* Constructor */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 176 /* FunctionExpression */: - case 216 /* FunctionDeclaration */: - case 177 /* ArrowFunction */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 148 /* Constructor */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 179 /* FunctionExpression */: + case 220 /* FunctionDeclaration */: + case 180 /* ArrowFunction */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.asteriskToken) || @@ -7329,302 +8325,323 @@ var ts; visitNode(cbNode, node.type) || visitNode(cbNode, node.equalsGreaterThanToken) || visitNode(cbNode, node.body); - case 152 /* TypeReference */: + case 155 /* TypeReference */: return visitNode(cbNode, node.typeName) || visitNodes(cbNodes, node.typeArguments); - case 151 /* TypePredicate */: + case 154 /* TypePredicate */: return visitNode(cbNode, node.parameterName) || visitNode(cbNode, node.type); - case 155 /* TypeQuery */: + case 158 /* TypeQuery */: return visitNode(cbNode, node.exprName); - case 156 /* TypeLiteral */: + case 159 /* TypeLiteral */: return visitNodes(cbNodes, node.members); - case 157 /* ArrayType */: + case 160 /* ArrayType */: return visitNode(cbNode, node.elementType); - case 158 /* TupleType */: + case 161 /* TupleType */: return visitNodes(cbNodes, node.elementTypes); - case 159 /* UnionType */: - case 160 /* IntersectionType */: + case 162 /* UnionType */: + case 163 /* IntersectionType */: return visitNodes(cbNodes, node.types); - case 161 /* ParenthesizedType */: + case 164 /* ParenthesizedType */: return visitNode(cbNode, node.type); - case 164 /* ObjectBindingPattern */: - case 165 /* ArrayBindingPattern */: + case 166 /* LiteralType */: + return visitNode(cbNode, node.literal); + case 167 /* ObjectBindingPattern */: + case 168 /* ArrayBindingPattern */: return visitNodes(cbNodes, node.elements); - case 167 /* ArrayLiteralExpression */: + case 170 /* ArrayLiteralExpression */: return visitNodes(cbNodes, node.elements); - case 168 /* ObjectLiteralExpression */: + case 171 /* ObjectLiteralExpression */: return visitNodes(cbNodes, node.properties); - case 169 /* PropertyAccessExpression */: + case 172 /* PropertyAccessExpression */: return visitNode(cbNode, node.expression) || - visitNode(cbNode, node.dotToken) || visitNode(cbNode, node.name); - case 170 /* ElementAccessExpression */: + case 173 /* ElementAccessExpression */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.argumentExpression); - case 171 /* CallExpression */: - case 172 /* NewExpression */: + case 174 /* CallExpression */: + case 175 /* NewExpression */: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments) || visitNodes(cbNodes, node.arguments); - case 173 /* TaggedTemplateExpression */: + case 176 /* TaggedTemplateExpression */: return visitNode(cbNode, node.tag) || visitNode(cbNode, node.template); - case 174 /* TypeAssertionExpression */: + case 177 /* TypeAssertionExpression */: return visitNode(cbNode, node.type) || visitNode(cbNode, node.expression); - case 175 /* ParenthesizedExpression */: + case 178 /* ParenthesizedExpression */: return visitNode(cbNode, node.expression); - case 178 /* DeleteExpression */: + case 181 /* DeleteExpression */: return visitNode(cbNode, node.expression); - case 179 /* TypeOfExpression */: + case 182 /* TypeOfExpression */: return visitNode(cbNode, node.expression); - case 180 /* VoidExpression */: + case 183 /* VoidExpression */: return visitNode(cbNode, node.expression); - case 182 /* PrefixUnaryExpression */: + case 185 /* PrefixUnaryExpression */: return visitNode(cbNode, node.operand); - case 187 /* YieldExpression */: + case 190 /* YieldExpression */: return visitNode(cbNode, node.asteriskToken) || visitNode(cbNode, node.expression); - case 181 /* AwaitExpression */: + case 184 /* AwaitExpression */: return visitNode(cbNode, node.expression); - case 183 /* PostfixUnaryExpression */: + case 186 /* PostfixUnaryExpression */: return visitNode(cbNode, node.operand); - case 184 /* BinaryExpression */: + case 187 /* BinaryExpression */: return visitNode(cbNode, node.left) || visitNode(cbNode, node.operatorToken) || visitNode(cbNode, node.right); - case 192 /* AsExpression */: + case 195 /* AsExpression */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.type); - case 185 /* ConditionalExpression */: + case 196 /* NonNullExpression */: + return visitNode(cbNode, node.expression); + case 188 /* ConditionalExpression */: return visitNode(cbNode, node.condition) || visitNode(cbNode, node.questionToken) || visitNode(cbNode, node.whenTrue) || visitNode(cbNode, node.colonToken) || visitNode(cbNode, node.whenFalse); - case 188 /* SpreadElementExpression */: + case 191 /* SpreadElementExpression */: return visitNode(cbNode, node.expression); - case 195 /* Block */: - case 222 /* ModuleBlock */: + case 199 /* Block */: + case 226 /* ModuleBlock */: return visitNodes(cbNodes, node.statements); - case 251 /* SourceFile */: + case 256 /* SourceFile */: return visitNodes(cbNodes, node.statements) || visitNode(cbNode, node.endOfFileToken); - case 196 /* VariableStatement */: + case 200 /* VariableStatement */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.declarationList); - case 215 /* VariableDeclarationList */: + case 219 /* VariableDeclarationList */: return visitNodes(cbNodes, node.declarations); - case 198 /* ExpressionStatement */: + case 202 /* ExpressionStatement */: return visitNode(cbNode, node.expression); - case 199 /* IfStatement */: + case 203 /* IfStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.thenStatement) || visitNode(cbNode, node.elseStatement); - case 200 /* DoStatement */: + case 204 /* DoStatement */: return visitNode(cbNode, node.statement) || visitNode(cbNode, node.expression); - case 201 /* WhileStatement */: + case 205 /* WhileStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 202 /* ForStatement */: + case 206 /* ForStatement */: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.condition) || visitNode(cbNode, node.incrementor) || visitNode(cbNode, node.statement); - case 203 /* ForInStatement */: + case 207 /* ForInStatement */: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 204 /* ForOfStatement */: + case 208 /* ForOfStatement */: return visitNode(cbNode, node.initializer) || visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 205 /* ContinueStatement */: - case 206 /* BreakStatement */: + case 209 /* ContinueStatement */: + case 210 /* BreakStatement */: return visitNode(cbNode, node.label); - case 207 /* ReturnStatement */: + case 211 /* ReturnStatement */: return visitNode(cbNode, node.expression); - case 208 /* WithStatement */: + case 212 /* WithStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.statement); - case 209 /* SwitchStatement */: + case 213 /* SwitchStatement */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.caseBlock); - case 223 /* CaseBlock */: + case 227 /* CaseBlock */: return visitNodes(cbNodes, node.clauses); - case 244 /* CaseClause */: + case 249 /* CaseClause */: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.statements); - case 245 /* DefaultClause */: + case 250 /* DefaultClause */: return visitNodes(cbNodes, node.statements); - case 210 /* LabeledStatement */: + case 214 /* LabeledStatement */: return visitNode(cbNode, node.label) || visitNode(cbNode, node.statement); - case 211 /* ThrowStatement */: + case 215 /* ThrowStatement */: return visitNode(cbNode, node.expression); - case 212 /* TryStatement */: + case 216 /* TryStatement */: return visitNode(cbNode, node.tryBlock) || visitNode(cbNode, node.catchClause) || visitNode(cbNode, node.finallyBlock); - case 247 /* CatchClause */: + case 252 /* CatchClause */: return visitNode(cbNode, node.variableDeclaration) || visitNode(cbNode, node.block); - case 140 /* Decorator */: + case 143 /* Decorator */: return visitNode(cbNode, node.expression); - case 217 /* ClassDeclaration */: - case 189 /* ClassExpression */: + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 218 /* InterfaceDeclaration */: + case 222 /* InterfaceDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNodes(cbNodes, node.heritageClauses) || visitNodes(cbNodes, node.members); - case 219 /* TypeAliasDeclaration */: + case 223 /* TypeAliasDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeParameters) || visitNode(cbNode, node.type); - case 220 /* EnumDeclaration */: + case 224 /* EnumDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNodes(cbNodes, node.members); - case 250 /* EnumMember */: + case 255 /* EnumMember */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.body); - case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportEqualsDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.name) || visitNode(cbNode, node.moduleReference); - case 225 /* ImportDeclaration */: + case 230 /* ImportDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.importClause) || visitNode(cbNode, node.moduleSpecifier); - case 226 /* ImportClause */: + case 231 /* ImportClause */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.namedBindings); - case 227 /* NamespaceImport */: + case 228 /* NamespaceExportDeclaration */: return visitNode(cbNode, node.name); - case 228 /* NamedImports */: - case 232 /* NamedExports */: + case 232 /* NamespaceImport */: + return visitNode(cbNode, node.name); + case 233 /* NamedImports */: + case 237 /* NamedExports */: return visitNodes(cbNodes, node.elements); - case 231 /* ExportDeclaration */: + case 236 /* ExportDeclaration */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.exportClause) || visitNode(cbNode, node.moduleSpecifier); - case 229 /* ImportSpecifier */: - case 233 /* ExportSpecifier */: + case 234 /* ImportSpecifier */: + case 238 /* ExportSpecifier */: return visitNode(cbNode, node.propertyName) || visitNode(cbNode, node.name); - case 230 /* ExportAssignment */: + case 235 /* ExportAssignment */: return visitNodes(cbNodes, node.decorators) || visitNodes(cbNodes, node.modifiers) || visitNode(cbNode, node.expression); - case 186 /* TemplateExpression */: + case 189 /* TemplateExpression */: return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); - case 193 /* TemplateSpan */: + case 197 /* TemplateSpan */: return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); - case 137 /* ComputedPropertyName */: + case 140 /* ComputedPropertyName */: return visitNode(cbNode, node.expression); - case 246 /* HeritageClause */: + case 251 /* HeritageClause */: return visitNodes(cbNodes, node.types); - case 191 /* ExpressionWithTypeArguments */: + case 194 /* ExpressionWithTypeArguments */: return visitNode(cbNode, node.expression) || visitNodes(cbNodes, node.typeArguments); - case 235 /* ExternalModuleReference */: + case 240 /* ExternalModuleReference */: return visitNode(cbNode, node.expression); - case 234 /* MissingDeclaration */: + case 239 /* MissingDeclaration */: return visitNodes(cbNodes, node.decorators); - case 236 /* JsxElement */: + case 241 /* JsxElement */: return visitNode(cbNode, node.openingElement) || visitNodes(cbNodes, node.children) || visitNode(cbNode, node.closingElement); - case 237 /* JsxSelfClosingElement */: - case 238 /* JsxOpeningElement */: + case 242 /* JsxSelfClosingElement */: + case 243 /* JsxOpeningElement */: return visitNode(cbNode, node.tagName) || visitNodes(cbNodes, node.attributes); - case 241 /* JsxAttribute */: + case 246 /* JsxAttribute */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.initializer); - case 242 /* JsxSpreadAttribute */: + case 247 /* JsxSpreadAttribute */: return visitNode(cbNode, node.expression); - case 243 /* JsxExpression */: + case 248 /* JsxExpression */: return visitNode(cbNode, node.expression); - case 240 /* JsxClosingElement */: + case 245 /* JsxClosingElement */: return visitNode(cbNode, node.tagName); - case 252 /* JSDocTypeExpression */: + case 257 /* JSDocTypeExpression */: return visitNode(cbNode, node.type); - case 256 /* JSDocUnionType */: + case 261 /* JSDocUnionType */: return visitNodes(cbNodes, node.types); - case 257 /* JSDocTupleType */: + case 262 /* JSDocTupleType */: return visitNodes(cbNodes, node.types); - case 255 /* JSDocArrayType */: + case 260 /* JSDocArrayType */: return visitNode(cbNode, node.elementType); - case 259 /* JSDocNonNullableType */: + case 264 /* JSDocNonNullableType */: return visitNode(cbNode, node.type); - case 258 /* JSDocNullableType */: + case 263 /* JSDocNullableType */: return visitNode(cbNode, node.type); - case 260 /* JSDocRecordType */: + case 265 /* JSDocRecordType */: return visitNodes(cbNodes, node.members); - case 262 /* JSDocTypeReference */: + case 267 /* JSDocTypeReference */: return visitNode(cbNode, node.name) || visitNodes(cbNodes, node.typeArguments); - case 263 /* JSDocOptionalType */: + case 268 /* JSDocOptionalType */: return visitNode(cbNode, node.type); - case 264 /* JSDocFunctionType */: + case 269 /* JSDocFunctionType */: return visitNodes(cbNodes, node.parameters) || visitNode(cbNode, node.type); - case 265 /* JSDocVariadicType */: + case 270 /* JSDocVariadicType */: return visitNode(cbNode, node.type); - case 266 /* JSDocConstructorType */: + case 271 /* JSDocConstructorType */: return visitNode(cbNode, node.type); - case 267 /* JSDocThisType */: + case 272 /* JSDocThisType */: return visitNode(cbNode, node.type); - case 261 /* JSDocRecordMember */: + case 266 /* JSDocRecordMember */: return visitNode(cbNode, node.name) || visitNode(cbNode, node.type); - case 268 /* JSDocComment */: + case 273 /* JSDocComment */: return visitNodes(cbNodes, node.tags); - case 270 /* JSDocParameterTag */: + case 275 /* JSDocParameterTag */: return visitNode(cbNode, node.preParameterName) || visitNode(cbNode, node.typeExpression) || visitNode(cbNode, node.postParameterName); - case 271 /* JSDocReturnTag */: + case 276 /* JSDocReturnTag */: return visitNode(cbNode, node.typeExpression); - case 272 /* JSDocTypeTag */: + case 277 /* JSDocTypeTag */: return visitNode(cbNode, node.typeExpression); - case 273 /* JSDocTemplateTag */: + case 278 /* JSDocTemplateTag */: return visitNodes(cbNodes, node.typeParameters); + case 279 /* JSDocTypedefTag */: + return visitNode(cbNode, node.typeExpression) || + visitNode(cbNode, node.name) || + visitNode(cbNode, node.jsDocTypeLiteral); + case 281 /* JSDocTypeLiteral */: + return visitNodes(cbNodes, node.jsDocPropertyTags); + case 280 /* JSDocPropertyTag */: + return visitNode(cbNode, node.typeExpression) || + visitNode(cbNode, node.name); + case 282 /* JSDocLiteralType */: + return visitNode(cbNode, node.literal); } } ts.forEachChild = forEachChild; function createSourceFile(fileName, sourceText, languageVersion, setParentNodes, scriptKind) { if (setParentNodes === void 0) { setParentNodes = false; } - var start = new Date().getTime(); + ts.performance.mark("beforeParse"); var result = Parser.parseSourceFile(fileName, sourceText, languageVersion, /*syntaxCursor*/ undefined, setParentNodes, scriptKind); - ts.parseTime += new Date().getTime() - start; + ts.performance.mark("afterParse"); + ts.performance.measure("Parse", "beforeParse", "afterParse"); return result; } ts.createSourceFile = createSourceFile; + function isExternalModule(file) { + return file.externalModuleIndicator !== undefined; + } + ts.isExternalModule = isExternalModule; // Produces a new SourceFile for the 'newText' provided. The 'textChangeRange' parameter // indicates what changed between the 'text' that this SourceFile has and the 'newText'. // The SourceFile will be created with the compiler attempting to reuse as many nodes from @@ -7640,7 +8657,13 @@ var ts; ts.updateSourceFile = updateSourceFile; /* @internal */ function parseIsolatedJSDocComment(content, start, length) { - return Parser.JSDocParser.parseIsolatedJSDocComment(content, start, length); + var result = Parser.JSDocParser.parseIsolatedJSDocComment(content, start, length); + if (result && result.jsDocComment) { + // because the jsDocComment was parsed out of the source file, it might + // not be covered by the fixupParentReferences. + Parser.fixupParentReferences(result.jsDocComment); + } + return result; } ts.parseIsolatedJSDocComment = parseIsolatedJSDocComment; /* @internal */ @@ -7657,14 +8680,16 @@ var ts; // Share a single scanner across all calls to parse a source file. This helps speed things // up by avoiding the cost of creating/compiling scanners over and over again. var scanner = ts.createScanner(2 /* Latest */, /*skipTrivia*/ true); - var disallowInAndDecoratorContext = 1 /* DisallowIn */ | 4 /* Decorator */; + var disallowInAndDecoratorContext = 4194304 /* DisallowInContext */ | 16777216 /* DecoratorContext */; // capture constructors in 'initializeState' to avoid null checks var NodeConstructor; + var TokenConstructor; + var IdentifierConstructor; var SourceFileConstructor; var sourceFile; var parseDiagnostics; var syntaxCursor; - var token; + var currentToken; var sourceText; var nodeCount; var identifiers; @@ -7759,15 +8784,17 @@ var ts; } function initializeState(fileName, _sourceText, languageVersion, _syntaxCursor, scriptKind) { NodeConstructor = ts.objectAllocator.getNodeConstructor(); + TokenConstructor = ts.objectAllocator.getTokenConstructor(); + IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor(); SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor(); sourceText = _sourceText; syntaxCursor = _syntaxCursor; parseDiagnostics = []; parsingContext = 0; - identifiers = {}; + identifiers = ts.createMap(); identifierCount = 0; nodeCount = 0; - contextFlags = scriptKind === 1 /* JS */ || scriptKind === 2 /* JSX */ ? 32 /* JavaScriptFile */ : 0 /* None */; + contextFlags = scriptKind === 1 /* JS */ || scriptKind === 2 /* JSX */ ? 134217728 /* JavaScriptFile */ : 0 /* None */; parseErrorBeforeNextFinishedNode = false; // Initialize and prime the scanner before parsing the source elements. scanner.setText(sourceText); @@ -7779,7 +8806,7 @@ var ts; // Clear out the text the scanner is pointing at, so it doesn't keep anything alive unnecessarily. scanner.setText(""); scanner.setOnError(undefined); - // Clear any data. We don't want to accidently hold onto it for too long. + // Clear any data. We don't want to accidentally hold onto it for too long. parseDiagnostics = undefined; sourceFile = undefined; identifiers = undefined; @@ -7788,14 +8815,12 @@ var ts; } function parseSourceFileWorker(fileName, languageVersion, setParentNodes, scriptKind) { sourceFile = createSourceFile(fileName, languageVersion, scriptKind); - if (contextFlags & 32 /* JavaScriptFile */) { - sourceFile.parserContextFlags = 32 /* JavaScriptFile */; - } + sourceFile.flags = contextFlags; // Prime the scanner. - token = nextToken(); + nextToken(); processReferenceComments(sourceFile); sourceFile.statements = parseList(0 /* SourceElements */, parseStatement); - ts.Debug.assert(token === 1 /* EndOfFileToken */); + ts.Debug.assert(token() === 1 /* EndOfFileToken */); sourceFile.endOfFileToken = parseTokenNode(); setExternalModuleIndicator(sourceFile); sourceFile.nodeCount = nodeCount; @@ -7808,27 +8833,31 @@ var ts; return sourceFile; } function addJSDocComment(node) { - if (contextFlags & 32 /* JavaScriptFile */) { + if (contextFlags & 134217728 /* JavaScriptFile */) { var comments = ts.getLeadingCommentRangesOfNode(node, sourceFile); if (comments) { for (var _i = 0, comments_1 = comments; _i < comments_1.length; _i++) { var comment = comments_1[_i]; var jsDocComment = JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos); - if (jsDocComment) { - node.jsDocComment = jsDocComment; + if (!jsDocComment) { + continue; } + if (!node.jsDocComments) { + node.jsDocComments = []; + } + node.jsDocComments.push(jsDocComment); } } } return node; } - function fixupParentReferences(sourceFile) { + function fixupParentReferences(rootNode) { // normally parent references are set during binding. However, for clients that only need // a syntax tree, and no semantic features, then the binding process is an unnecessary // overhead. This functions allows us to set all the parents, without all the expense of // binding. - var parent = sourceFile; - forEachChild(sourceFile, visitNode); + var parent = rootNode; + forEachChild(rootNode, visitNode); return; function visitNode(n) { // walk down setting parents that differ from the parent we think it should be. This @@ -7839,6 +8868,14 @@ var ts; var saveParent = parent; parent = n; forEachChild(n, visitNode); + if (n.jsDocComments) { + for (var _i = 0, _a = n.jsDocComments; _i < _a.length; _i++) { + var jsDocComment = _a[_i]; + jsDocComment.parent = n; + parent = jsDocComment; + forEachChild(jsDocComment, visitNode); + } + } parent = saveParent; } } @@ -7847,14 +8884,14 @@ var ts; function createSourceFile(fileName, languageVersion, scriptKind) { // code from createNode is inlined here so createNode won't have to deal with special case of creating source files // this is quite rare comparing to other nodes and createNode should be as fast as possible - var sourceFile = new SourceFileConstructor(251 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length); + var sourceFile = new SourceFileConstructor(256 /* SourceFile */, /*pos*/ 0, /* end */ sourceText.length); nodeCount++; sourceFile.text = sourceText; sourceFile.bindDiagnostics = []; sourceFile.languageVersion = languageVersion; sourceFile.fileName = ts.normalizePath(fileName); - sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 4096 /* DeclarationFile */ : 0; sourceFile.languageVariant = getLanguageVariant(scriptKind); + sourceFile.isDeclarationFile = ts.fileExtensionIs(sourceFile.fileName, ".d.ts"); sourceFile.scriptKind = scriptKind; return sourceFile; } @@ -7867,16 +8904,16 @@ var ts; } } function setDisallowInContext(val) { - setContextFlag(val, 1 /* DisallowIn */); + setContextFlag(val, 4194304 /* DisallowInContext */); } function setYieldContext(val) { - setContextFlag(val, 2 /* Yield */); + setContextFlag(val, 8388608 /* YieldContext */); } function setDecoratorContext(val) { - setContextFlag(val, 4 /* Decorator */); + setContextFlag(val, 16777216 /* DecoratorContext */); } function setAwaitContext(val) { - setContextFlag(val, 8 /* Await */); + setContextFlag(val, 33554432 /* AwaitContext */); } function doOutsideOfContext(context, func) { // contextFlagsToClear will contain only the context flags that are @@ -7917,40 +8954,40 @@ var ts; return func(); } function allowInAnd(func) { - return doOutsideOfContext(1 /* DisallowIn */, func); + return doOutsideOfContext(4194304 /* DisallowInContext */, func); } function disallowInAnd(func) { - return doInsideOfContext(1 /* DisallowIn */, func); + return doInsideOfContext(4194304 /* DisallowInContext */, func); } function doInYieldContext(func) { - return doInsideOfContext(2 /* Yield */, func); + return doInsideOfContext(8388608 /* YieldContext */, func); } function doInDecoratorContext(func) { - return doInsideOfContext(4 /* Decorator */, func); + return doInsideOfContext(16777216 /* DecoratorContext */, func); } function doInAwaitContext(func) { - return doInsideOfContext(8 /* Await */, func); + return doInsideOfContext(33554432 /* AwaitContext */, func); } function doOutsideOfAwaitContext(func) { - return doOutsideOfContext(8 /* Await */, func); + return doOutsideOfContext(33554432 /* AwaitContext */, func); } function doInYieldAndAwaitContext(func) { - return doInsideOfContext(2 /* Yield */ | 8 /* Await */, func); + return doInsideOfContext(8388608 /* YieldContext */ | 33554432 /* AwaitContext */, func); } function inContext(flags) { return (contextFlags & flags) !== 0; } function inYieldContext() { - return inContext(2 /* Yield */); + return inContext(8388608 /* YieldContext */); } function inDisallowInContext() { - return inContext(1 /* DisallowIn */); + return inContext(4194304 /* DisallowInContext */); } function inDecoratorContext() { - return inContext(4 /* Decorator */); + return inContext(16777216 /* DecoratorContext */); } function inAwaitContext() { - return inContext(8 /* Await */); + return inContext(33554432 /* AwaitContext */); } function parseErrorAtCurrentToken(message, arg0) { var start = scanner.getTokenPos(); @@ -7977,34 +9014,43 @@ var ts; function getNodeEnd() { return scanner.getStartPos(); } + // Use this function to access the current token instead of reading the currentToken + // variable. Since function results aren't narrowed in control flow analysis, this ensures + // that the type checker doesn't make wrong assumptions about the type of the current + // token (e.g. a call to nextToken() changes the current token but the checker doesn't + // reason about this side effect). Mainstream VMs inline simple functions like this, so + // there is no performance penalty. + function token() { + return currentToken; + } function nextToken() { - return token = scanner.scan(); + return currentToken = scanner.scan(); } function reScanGreaterToken() { - return token = scanner.reScanGreaterToken(); + return currentToken = scanner.reScanGreaterToken(); } function reScanSlashToken() { - return token = scanner.reScanSlashToken(); + return currentToken = scanner.reScanSlashToken(); } function reScanTemplateToken() { - return token = scanner.reScanTemplateToken(); + return currentToken = scanner.reScanTemplateToken(); } function scanJsxIdentifier() { - return token = scanner.scanJsxIdentifier(); + return currentToken = scanner.scanJsxIdentifier(); } function scanJsxText() { - return token = scanner.scanJsxToken(); + return currentToken = scanner.scanJsxToken(); } function speculationHelper(callback, isLookAhead) { // Keep track of the state we'll need to rollback to if lookahead fails (or if the // caller asked us to always reset our state). - var saveToken = token; + var saveToken = currentToken; var saveParseDiagnosticsLength = parseDiagnostics.length; var saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; // Note: it is not actually necessary to save/restore the context flags here. That's // because the saving/restoring of these flags happens naturally through the recursive // descent nature of our parser. However, we still store this here just so we can - // assert that that invariant holds. + // assert that invariant holds. var saveContextFlags = contextFlags; // If we're only looking ahead, then tell the scanner to only lookahead as well. // Otherwise, if we're actually speculatively parsing, then tell the scanner to do the @@ -8016,7 +9062,7 @@ var ts; // If our callback returned something 'falsy' or we're just looking ahead, // then unconditionally restore us to where we were. if (!result || isLookAhead) { - token = saveToken; + currentToken = saveToken; parseDiagnostics.length = saveParseDiagnosticsLength; parseErrorBeforeNextFinishedNode = saveParseErrorBeforeNextFinishedNode; } @@ -8039,24 +9085,24 @@ var ts; } // Ignore strict mode flag because we will report an error in type checker instead. function isIdentifier() { - if (token === 69 /* Identifier */) { + if (token() === 69 /* Identifier */) { return true; } // If we have a 'yield' keyword, and we're in the [yield] context, then 'yield' is // considered a keyword and is not an identifier. - if (token === 114 /* YieldKeyword */ && inYieldContext()) { + if (token() === 114 /* YieldKeyword */ && inYieldContext()) { return false; } // If we have a 'await' keyword, and we're in the [Await] context, then 'await' is // considered a keyword and is not an identifier. - if (token === 119 /* AwaitKeyword */ && inAwaitContext()) { + if (token() === 119 /* AwaitKeyword */ && inAwaitContext()) { return false; } - return token > 105 /* LastReservedWord */; + return token() > 105 /* LastReservedWord */; } function parseExpected(kind, diagnosticMessage, shouldAdvance) { if (shouldAdvance === void 0) { shouldAdvance = true; } - if (token === kind) { + if (token() === kind) { if (shouldAdvance) { nextToken(); } @@ -8072,14 +9118,14 @@ var ts; return false; } function parseOptional(t) { - if (token === t) { + if (token() === t) { nextToken(); return true; } return false; } function parseOptionalToken(t) { - if (token === t) { + if (token() === t) { return parseTokenNode(); } return undefined; @@ -8089,21 +9135,21 @@ var ts; createMissingNode(t, reportAtCurrentPosition, diagnosticMessage, arg0); } function parseTokenNode() { - var node = createNode(token); + var node = createNode(token()); nextToken(); return finishNode(node); } function canParseSemicolon() { // If there's a real semicolon, then we can always parse it out. - if (token === 23 /* SemicolonToken */) { + if (token() === 23 /* SemicolonToken */) { return true; } // We can parse out an optional semicolon in ASI cases in the following cases. - return token === 16 /* CloseBraceToken */ || token === 1 /* EndOfFileToken */ || scanner.hasPrecedingLineBreak(); + return token() === 16 /* CloseBraceToken */ || token() === 1 /* EndOfFileToken */ || scanner.hasPrecedingLineBreak(); } function parseSemicolon() { if (canParseSemicolon()) { - if (token === 23 /* SemicolonToken */) { + if (token() === 23 /* SemicolonToken */) { // consume the semicolon if it was explicitly provided. nextToken(); } @@ -8119,19 +9165,21 @@ var ts; if (!(pos >= 0)) { pos = scanner.getStartPos(); } - return new NodeConstructor(kind, pos, pos); + return kind >= 139 /* FirstNode */ ? new NodeConstructor(kind, pos, pos) : + kind === 69 /* Identifier */ ? new IdentifierConstructor(kind, pos, pos) : + new TokenConstructor(kind, pos, pos); } function finishNode(node, end) { node.end = end === undefined ? scanner.getStartPos() : end; if (contextFlags) { - node.parserContextFlags = contextFlags; + node.flags |= contextFlags; } // Keep track on the node if we encountered an error while parsing it. If we did, then // we cannot reuse the node incrementally. Once we've marked this node, clear out the // flag so that we don't mark any subsequent nodes. if (parseErrorBeforeNextFinishedNode) { parseErrorBeforeNextFinishedNode = false; - node.parserContextFlags |= 16 /* ThisNodeHasError */; + node.flags |= 67108864 /* ThisNodeHasError */; } return node; } @@ -8148,7 +9196,7 @@ var ts; } function internIdentifier(text) { text = ts.escapeIdentifier(text); - return ts.hasProperty(identifiers, text) ? identifiers[text] : (identifiers[text] = text); + return identifiers[text] || (identifiers[text] = text); } // An identifier that starts with two underscores has an extra underscore character prepended to it to avoid issues // with magic property names like '__proto__'. The 'identifiers' object is used to share a single string instance for @@ -8158,8 +9206,8 @@ var ts; if (isIdentifier) { var node = createNode(69 /* Identifier */); // Store original token kind if it is not just an Identifier so we can report appropriate error later in type checker - if (token !== 69 /* Identifier */) { - node.originalKeywordKind = token; + if (token() !== 69 /* Identifier */) { + node.originalKeywordKind = token(); } node.text = internIdentifier(scanner.getTokenValue()); nextToken(); @@ -8171,18 +9219,18 @@ var ts; return createIdentifier(isIdentifier(), diagnosticMessage); } function parseIdentifierName() { - return createIdentifier(ts.tokenIsIdentifierOrKeyword(token)); + return createIdentifier(ts.tokenIsIdentifierOrKeyword(token())); } function isLiteralPropertyName() { - return ts.tokenIsIdentifierOrKeyword(token) || - token === 9 /* StringLiteral */ || - token === 8 /* NumericLiteral */; + return ts.tokenIsIdentifierOrKeyword(token()) || + token() === 9 /* StringLiteral */ || + token() === 8 /* NumericLiteral */; } function parsePropertyNameWorker(allowComputedPropertyNames) { - if (token === 9 /* StringLiteral */ || token === 8 /* NumericLiteral */) { + if (token() === 9 /* StringLiteral */ || token() === 8 /* NumericLiteral */) { return parseLiteralNode(/*internName*/ true); } - if (allowComputedPropertyNames && token === 19 /* OpenBracketToken */) { + if (allowComputedPropertyNames && token() === 19 /* OpenBracketToken */) { return parseComputedPropertyName(); } return parseIdentifierName(); @@ -8194,13 +9242,13 @@ var ts; return parsePropertyNameWorker(/*allowComputedPropertyNames*/ false); } function isSimplePropertyName() { - return token === 9 /* StringLiteral */ || token === 8 /* NumericLiteral */ || ts.tokenIsIdentifierOrKeyword(token); + return token() === 9 /* StringLiteral */ || token() === 8 /* NumericLiteral */ || ts.tokenIsIdentifierOrKeyword(token()); } function parseComputedPropertyName() { // PropertyName [Yield]: // LiteralPropertyName // ComputedPropertyName[?Yield] - var node = createNode(137 /* ComputedPropertyName */); + var node = createNode(140 /* ComputedPropertyName */); parseExpected(19 /* OpenBracketToken */); // We parse any expression (including a comma expression). But the grammar // says that only an assignment expression is allowed, so the grammar checker @@ -8210,7 +9258,7 @@ var ts; return finishNode(node); } function parseContextualModifier(t) { - return token === t && tryParse(nextTokenCanFollowModifier); + return token() === t && tryParse(nextTokenCanFollowModifier); } function nextTokenIsOnSameLineAndCanFollowModifier() { nextToken(); @@ -8220,38 +9268,40 @@ var ts; return canFollowModifier(); } function nextTokenCanFollowModifier() { - if (token === 74 /* ConstKeyword */) { + if (token() === 74 /* ConstKeyword */) { // 'const' is only a modifier if followed by 'enum'. return nextToken() === 81 /* EnumKeyword */; } - if (token === 82 /* ExportKeyword */) { + if (token() === 82 /* ExportKeyword */) { nextToken(); - if (token === 77 /* DefaultKeyword */) { - return lookAhead(nextTokenIsClassOrFunction); + if (token() === 77 /* DefaultKeyword */) { + return lookAhead(nextTokenIsClassOrFunctionOrAsync); } - return token !== 37 /* AsteriskToken */ && token !== 15 /* OpenBraceToken */ && canFollowModifier(); + return token() !== 37 /* AsteriskToken */ && token() !== 116 /* AsKeyword */ && token() !== 15 /* OpenBraceToken */ && canFollowModifier(); } - if (token === 77 /* DefaultKeyword */) { - return nextTokenIsClassOrFunction(); + if (token() === 77 /* DefaultKeyword */) { + return nextTokenIsClassOrFunctionOrAsync(); } - if (token === 113 /* StaticKeyword */) { + if (token() === 113 /* StaticKeyword */) { nextToken(); return canFollowModifier(); } return nextTokenIsOnSameLineAndCanFollowModifier(); } function parseAnyContextualModifier() { - return ts.isModifierKind(token) && tryParse(nextTokenCanFollowModifier); + return ts.isModifierKind(token()) && tryParse(nextTokenCanFollowModifier); } function canFollowModifier() { - return token === 19 /* OpenBracketToken */ - || token === 15 /* OpenBraceToken */ - || token === 37 /* AsteriskToken */ + return token() === 19 /* OpenBracketToken */ + || token() === 15 /* OpenBraceToken */ + || token() === 37 /* AsteriskToken */ + || token() === 22 /* DotDotDotToken */ || isLiteralPropertyName(); } - function nextTokenIsClassOrFunction() { + function nextTokenIsClassOrFunctionOrAsync() { nextToken(); - return token === 73 /* ClassKeyword */ || token === 87 /* FunctionKeyword */; + return token() === 73 /* ClassKeyword */ || token() === 87 /* FunctionKeyword */ || + (token() === 118 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine)); } // True if positioned at the start of a list element function isListElement(parsingContext, inErrorRecovery) { @@ -8269,29 +9319,29 @@ var ts; // we're parsing. For example, if we have a semicolon in the middle of a class, then // we really don't want to assume the class is over and we're on a statement in the // outer module. We just want to consume and move on. - return !(token === 23 /* SemicolonToken */ && inErrorRecovery) && isStartOfStatement(); + return !(token() === 23 /* SemicolonToken */ && inErrorRecovery) && isStartOfStatement(); case 2 /* SwitchClauses */: - return token === 71 /* CaseKeyword */ || token === 77 /* DefaultKeyword */; + return token() === 71 /* CaseKeyword */ || token() === 77 /* DefaultKeyword */; case 4 /* TypeMembers */: - return isStartOfTypeMember(); + return lookAhead(isTypeMemberStart); case 5 /* ClassMembers */: // We allow semicolons as class elements (as specified by ES6) as long as we're // not in error recovery. If we're in error recovery, we don't want an errant // semicolon to be treated as a class member (since they're almost always used // for statements. - return lookAhead(isClassMemberStart) || (token === 23 /* SemicolonToken */ && !inErrorRecovery); + return lookAhead(isClassMemberStart) || (token() === 23 /* SemicolonToken */ && !inErrorRecovery); case 6 /* EnumMembers */: // Include open bracket computed properties. This technically also lets in indexers, // which would be a candidate for improved error reporting. - return token === 19 /* OpenBracketToken */ || isLiteralPropertyName(); + return token() === 19 /* OpenBracketToken */ || isLiteralPropertyName(); case 12 /* ObjectLiteralMembers */: - return token === 19 /* OpenBracketToken */ || token === 37 /* AsteriskToken */ || isLiteralPropertyName(); + return token() === 19 /* OpenBracketToken */ || token() === 37 /* AsteriskToken */ || isLiteralPropertyName(); case 9 /* ObjectBindingElements */: - return token === 19 /* OpenBracketToken */ || isLiteralPropertyName(); + return token() === 19 /* OpenBracketToken */ || isLiteralPropertyName(); case 7 /* HeritageClauseElement */: // If we see { } then only consume it as an expression if it is followed by , or { // That way we won't consume the body of a class in its heritage clause. - if (token === 15 /* OpenBraceToken */) { + if (token() === 15 /* OpenBraceToken */) { return lookAhead(isValidHeritageClauseObjectLiteral); } if (!inErrorRecovery) { @@ -8306,23 +9356,23 @@ var ts; case 8 /* VariableDeclarations */: return isIdentifierOrPattern(); case 10 /* ArrayBindingElements */: - return token === 24 /* CommaToken */ || token === 22 /* DotDotDotToken */ || isIdentifierOrPattern(); + return token() === 24 /* CommaToken */ || token() === 22 /* DotDotDotToken */ || isIdentifierOrPattern(); case 17 /* TypeParameters */: return isIdentifier(); case 11 /* ArgumentExpressions */: case 15 /* ArrayLiteralMembers */: - return token === 24 /* CommaToken */ || token === 22 /* DotDotDotToken */ || isStartOfExpression(); + return token() === 24 /* CommaToken */ || token() === 22 /* DotDotDotToken */ || isStartOfExpression(); case 16 /* Parameters */: return isStartOfParameter(); case 18 /* TypeArguments */: case 19 /* TupleElementTypes */: - return token === 24 /* CommaToken */ || isStartOfType(); + return token() === 24 /* CommaToken */ || isStartOfType(); case 20 /* HeritageClauses */: return isHeritageClause(); case 21 /* ImportOrExportSpecifiers */: - return ts.tokenIsIdentifierOrKeyword(token); + return ts.tokenIsIdentifierOrKeyword(token()); case 13 /* JsxAttributes */: - return ts.tokenIsIdentifierOrKeyword(token) || token === 15 /* OpenBraceToken */; + return ts.tokenIsIdentifierOrKeyword(token()) || token() === 15 /* OpenBraceToken */; case 14 /* JsxChildren */: return true; case 22 /* JSDocFunctionParameters */: @@ -8335,7 +9385,7 @@ var ts; ts.Debug.fail("Non-exhaustive case in 'isListElement'."); } function isValidHeritageClauseObjectLiteral() { - ts.Debug.assert(token === 15 /* OpenBraceToken */); + ts.Debug.assert(token() === 15 /* OpenBraceToken */); if (nextToken() === 16 /* CloseBraceToken */) { // if we see "extends {}" then only treat the {} as what we're extending (and not // the class body) if we have: @@ -8355,11 +9405,11 @@ var ts; } function nextTokenIsIdentifierOrKeyword() { nextToken(); - return ts.tokenIsIdentifierOrKeyword(token); + return ts.tokenIsIdentifierOrKeyword(token()); } function isHeritageClauseExtendsOrImplementsKeyword() { - if (token === 106 /* ImplementsKeyword */ || - token === 83 /* ExtendsKeyword */) { + if (token() === 106 /* ImplementsKeyword */ || + token() === 83 /* ExtendsKeyword */) { return lookAhead(nextTokenIsStartOfExpression); } return false; @@ -8370,7 +9420,7 @@ var ts; } // True if positioned at a list terminator function isListTerminator(kind) { - if (token === 1 /* EndOfFileToken */) { + if (token() === 1 /* EndOfFileToken */) { // Being at the end of the file ends all lists. return true; } @@ -8383,43 +9433,43 @@ var ts; case 12 /* ObjectLiteralMembers */: case 9 /* ObjectBindingElements */: case 21 /* ImportOrExportSpecifiers */: - return token === 16 /* CloseBraceToken */; + return token() === 16 /* CloseBraceToken */; case 3 /* SwitchClauseStatements */: - return token === 16 /* CloseBraceToken */ || token === 71 /* CaseKeyword */ || token === 77 /* DefaultKeyword */; + return token() === 16 /* CloseBraceToken */ || token() === 71 /* CaseKeyword */ || token() === 77 /* DefaultKeyword */; case 7 /* HeritageClauseElement */: - return token === 15 /* OpenBraceToken */ || token === 83 /* ExtendsKeyword */ || token === 106 /* ImplementsKeyword */; + return token() === 15 /* OpenBraceToken */ || token() === 83 /* ExtendsKeyword */ || token() === 106 /* ImplementsKeyword */; case 8 /* VariableDeclarations */: return isVariableDeclaratorListTerminator(); case 17 /* TypeParameters */: // Tokens other than '>' are here for better error recovery - return token === 27 /* GreaterThanToken */ || token === 17 /* OpenParenToken */ || token === 15 /* OpenBraceToken */ || token === 83 /* ExtendsKeyword */ || token === 106 /* ImplementsKeyword */; + return token() === 27 /* GreaterThanToken */ || token() === 17 /* OpenParenToken */ || token() === 15 /* OpenBraceToken */ || token() === 83 /* ExtendsKeyword */ || token() === 106 /* ImplementsKeyword */; case 11 /* ArgumentExpressions */: // Tokens other than ')' are here for better error recovery - return token === 18 /* CloseParenToken */ || token === 23 /* SemicolonToken */; + return token() === 18 /* CloseParenToken */ || token() === 23 /* SemicolonToken */; case 15 /* ArrayLiteralMembers */: case 19 /* TupleElementTypes */: case 10 /* ArrayBindingElements */: - return token === 20 /* CloseBracketToken */; + return token() === 20 /* CloseBracketToken */; case 16 /* Parameters */: // Tokens other than ')' and ']' (the latter for index signatures) are here for better error recovery - return token === 18 /* CloseParenToken */ || token === 20 /* CloseBracketToken */ /*|| token === SyntaxKind.OpenBraceToken*/; + return token() === 18 /* CloseParenToken */ || token() === 20 /* CloseBracketToken */ /*|| token === SyntaxKind.OpenBraceToken*/; case 18 /* TypeArguments */: // Tokens other than '>' are here for better error recovery - return token === 27 /* GreaterThanToken */ || token === 17 /* OpenParenToken */; + return token() === 27 /* GreaterThanToken */ || token() === 17 /* OpenParenToken */; case 20 /* HeritageClauses */: - return token === 15 /* OpenBraceToken */ || token === 16 /* CloseBraceToken */; + return token() === 15 /* OpenBraceToken */ || token() === 16 /* CloseBraceToken */; case 13 /* JsxAttributes */: - return token === 27 /* GreaterThanToken */ || token === 39 /* SlashToken */; + return token() === 27 /* GreaterThanToken */ || token() === 39 /* SlashToken */; case 14 /* JsxChildren */: - return token === 25 /* LessThanToken */ && lookAhead(nextTokenIsSlash); + return token() === 25 /* LessThanToken */ && lookAhead(nextTokenIsSlash); case 22 /* JSDocFunctionParameters */: - return token === 18 /* CloseParenToken */ || token === 54 /* ColonToken */ || token === 16 /* CloseBraceToken */; + return token() === 18 /* CloseParenToken */ || token() === 54 /* ColonToken */ || token() === 16 /* CloseBraceToken */; case 23 /* JSDocTypeArguments */: - return token === 27 /* GreaterThanToken */ || token === 16 /* CloseBraceToken */; + return token() === 27 /* GreaterThanToken */ || token() === 16 /* CloseBraceToken */; case 25 /* JSDocTupleTypes */: - return token === 20 /* CloseBracketToken */ || token === 16 /* CloseBraceToken */; + return token() === 20 /* CloseBracketToken */ || token() === 16 /* CloseBraceToken */; case 24 /* JSDocRecordMembers */: - return token === 16 /* CloseBraceToken */; + return token() === 16 /* CloseBraceToken */; } } function isVariableDeclaratorListTerminator() { @@ -8430,14 +9480,14 @@ var ts; } // in the case where we're parsing the variable declarator of a 'for-in' statement, we // are done if we see an 'in' keyword in front of us. Same with for-of - if (isInOrOfKeyword(token)) { + if (isInOrOfKeyword(token())) { return true; } // ERROR RECOVERY TWEAK: // For better error recovery, if we see an '=>' then we just stop immediately. We've got an // arrow function here and it's going to be very unlikely that we'll resynchronize and get // another variable declaration. - if (token === 34 /* EqualsGreaterThanToken */) { + if (token() === 34 /* EqualsGreaterThanToken */) { return true; } // Keep trying to parse out variable declarators. @@ -8513,20 +9563,20 @@ var ts; // We can only reuse a node if it was parsed under the same strict mode that we're // currently in. i.e. if we originally parsed a node in non-strict mode, but then // the user added 'using strict' at the top of the file, then we can't use that node - // again as the presense of strict mode may cause us to parse the tokens in the file - // differetly. + // again as the presence of strict mode may cause us to parse the tokens in the file + // differently. // // Note: we *can* reuse tokens when the strict mode changes. That's because tokens // are unaffected by strict mode. It's just the parser will decide what to do with it // differently depending on what mode it is in. // // This also applies to all our other context flags as well. - var nodeContextFlags = node.parserContextFlags & 63 /* ParserGeneratedFlags */; + var nodeContextFlags = node.flags & 197132288 /* ContextFlags */; if (nodeContextFlags !== contextFlags) { return undefined; } // Ok, we have a node that looks like it could be reused. Now verify that it is valid - // in the currest list parsing context that we're currently at. + // in the current list parsing context that we're currently at. if (!canReuseNode(node, parsingContext)) { return undefined; } @@ -8601,14 +9651,14 @@ var ts; function isReusableClassMember(node) { if (node) { switch (node.kind) { - case 145 /* Constructor */: - case 150 /* IndexSignature */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 142 /* PropertyDeclaration */: - case 194 /* SemicolonClassElement */: + case 148 /* Constructor */: + case 153 /* IndexSignature */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 145 /* PropertyDeclaration */: + case 198 /* SemicolonClassElement */: return true; - case 144 /* MethodDeclaration */: + case 147 /* MethodDeclaration */: // Method declarations are not necessarily reusable. An object-literal // may have a method calls "constructor(...)" and we must reparse that // into an actual .ConstructorDeclaration. @@ -8623,8 +9673,8 @@ var ts; function isReusableSwitchClause(node) { if (node) { switch (node.kind) { - case 244 /* CaseClause */: - case 245 /* DefaultClause */: + case 249 /* CaseClause */: + case 250 /* DefaultClause */: return true; } } @@ -8633,58 +9683,58 @@ var ts; function isReusableStatement(node) { if (node) { switch (node.kind) { - case 216 /* FunctionDeclaration */: - case 196 /* VariableStatement */: - case 195 /* Block */: - case 199 /* IfStatement */: - case 198 /* ExpressionStatement */: - case 211 /* ThrowStatement */: - case 207 /* ReturnStatement */: - case 209 /* SwitchStatement */: - case 206 /* BreakStatement */: - case 205 /* ContinueStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: - case 202 /* ForStatement */: - case 201 /* WhileStatement */: - case 208 /* WithStatement */: - case 197 /* EmptyStatement */: - case 212 /* TryStatement */: - case 210 /* LabeledStatement */: - case 200 /* DoStatement */: - case 213 /* DebuggerStatement */: - case 225 /* ImportDeclaration */: - case 224 /* ImportEqualsDeclaration */: - case 231 /* ExportDeclaration */: - case 230 /* ExportAssignment */: - case 221 /* ModuleDeclaration */: - case 217 /* ClassDeclaration */: - case 218 /* InterfaceDeclaration */: - case 220 /* EnumDeclaration */: - case 219 /* TypeAliasDeclaration */: + case 220 /* FunctionDeclaration */: + case 200 /* VariableStatement */: + case 199 /* Block */: + case 203 /* IfStatement */: + case 202 /* ExpressionStatement */: + case 215 /* ThrowStatement */: + case 211 /* ReturnStatement */: + case 213 /* SwitchStatement */: + case 210 /* BreakStatement */: + case 209 /* ContinueStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: + case 206 /* ForStatement */: + case 205 /* WhileStatement */: + case 212 /* WithStatement */: + case 201 /* EmptyStatement */: + case 216 /* TryStatement */: + case 214 /* LabeledStatement */: + case 204 /* DoStatement */: + case 217 /* DebuggerStatement */: + case 230 /* ImportDeclaration */: + case 229 /* ImportEqualsDeclaration */: + case 236 /* ExportDeclaration */: + case 235 /* ExportAssignment */: + case 225 /* ModuleDeclaration */: + case 221 /* ClassDeclaration */: + case 222 /* InterfaceDeclaration */: + case 224 /* EnumDeclaration */: + case 223 /* TypeAliasDeclaration */: return true; } } return false; } function isReusableEnumMember(node) { - return node.kind === 250 /* EnumMember */; + return node.kind === 255 /* EnumMember */; } function isReusableTypeMember(node) { if (node) { switch (node.kind) { - case 149 /* ConstructSignature */: - case 143 /* MethodSignature */: - case 150 /* IndexSignature */: - case 141 /* PropertySignature */: - case 148 /* CallSignature */: + case 152 /* ConstructSignature */: + case 146 /* MethodSignature */: + case 153 /* IndexSignature */: + case 144 /* PropertySignature */: + case 151 /* CallSignature */: return true; } } return false; } function isReusableVariableDeclaration(node) { - if (node.kind !== 214 /* VariableDeclaration */) { + if (node.kind !== 218 /* VariableDeclaration */) { return false; } // Very subtle incremental parsing bug. Consider the following code: @@ -8705,7 +9755,7 @@ var ts; return variableDeclarator.initializer === undefined; } function isReusableParameter(node) { - if (node.kind !== 139 /* Parameter */) { + if (node.kind !== 142 /* Parameter */) { return false; } // See the comment in isReusableVariableDeclaration for why we do this. @@ -8753,7 +9803,7 @@ var ts; } ; // Parses a comma-delimited list of elements - function parseDelimitedList(kind, parseElement, considerSemicolonAsDelimeter) { + function parseDelimitedList(kind, parseElement, considerSemicolonAsDelimiter) { var saveParsingContext = parsingContext; parsingContext |= 1 << kind; var result = []; @@ -8778,7 +9828,7 @@ var ts; // parse errors. For example, this can happen when people do things like use // a semicolon to delimit object literal members. Note: we'll have already // reported an error when we called parseExpected above. - if (considerSemicolonAsDelimeter && token === 23 /* SemicolonToken */ && !scanner.hasPrecedingLineBreak()) { + if (considerSemicolonAsDelimiter && token() === 23 /* SemicolonToken */ && !scanner.hasPrecedingLineBreak()) { nextToken(); } continue; @@ -8822,7 +9872,7 @@ var ts; function parseEntityName(allowReservedWords, diagnosticMessage) { var entity = parseIdentifier(diagnosticMessage); while (parseOptional(21 /* DotToken */)) { - var node = createNode(136 /* QualifiedName */, entity.pos); + var node = createNode(139 /* QualifiedName */, entity.pos); // !!! node.left = entity; node.right = parseRightSideOfDot(allowReservedWords); entity = finishNode(node); @@ -8849,7 +9899,7 @@ var ts; // the code would be implicitly: "name.identifierOrKeyword; identifierNameOrKeyword". // In the first case though, ASI will not take effect because there is not a // line terminator after the identifier or keyword. - if (scanner.hasPrecedingLineBreak() && ts.tokenIsIdentifierOrKeyword(token)) { + if (scanner.hasPrecedingLineBreak() && ts.tokenIsIdentifierOrKeyword(token())) { var matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); if (matchesPattern) { // Report that we need an identifier. However, report it right after the dot, @@ -8861,7 +9911,7 @@ var ts; return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); } function parseTemplateExpression() { - var template = createNode(186 /* TemplateExpression */); + var template = createNode(189 /* TemplateExpression */); template.head = parseTemplateLiteralFragment(); ts.Debug.assert(template.head.kind === 12 /* TemplateHead */, "Template head has wrong token kind"); var templateSpans = []; @@ -8874,10 +9924,10 @@ var ts; return finishNode(template); } function parseTemplateSpan() { - var span = createNode(193 /* TemplateSpan */); + var span = createNode(197 /* TemplateSpan */); span.expression = allowInAnd(parseExpression); var literal; - if (token === 16 /* CloseBraceToken */) { + if (token() === 16 /* CloseBraceToken */) { reScanTemplateToken(); literal = parseTemplateLiteralFragment(); } @@ -8887,14 +9937,11 @@ var ts; span.literal = literal; return finishNode(span); } - function parseStringLiteralTypeNode() { - return parseLiteralLikeNode(163 /* StringLiteralType */, /*internName*/ true); - } function parseLiteralNode(internName) { - return parseLiteralLikeNode(token, internName); + return parseLiteralLikeNode(token(), internName); } function parseTemplateLiteralFragment() { - return parseLiteralLikeNode(token, /*internName*/ false); + return parseLiteralLikeNode(token(), /*internName*/ false); } function parseLiteralLikeNode(kind, internName) { var node = createNode(kind); @@ -8918,40 +9965,40 @@ var ts; if (node.kind === 8 /* NumericLiteral */ && sourceText.charCodeAt(tokenPos) === 48 /* _0 */ && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) { - node.flags |= 32768 /* OctalLiteral */; + node.isOctalLiteral = true; } return node; } // TYPES function parseTypeReference() { var typeName = parseEntityName(/*allowReservedWords*/ false, ts.Diagnostics.Type_expected); - var node = createNode(152 /* TypeReference */, typeName.pos); + var node = createNode(155 /* TypeReference */, typeName.pos); node.typeName = typeName; - if (!scanner.hasPrecedingLineBreak() && token === 25 /* LessThanToken */) { + if (!scanner.hasPrecedingLineBreak() && token() === 25 /* LessThanToken */) { node.typeArguments = parseBracketedList(18 /* TypeArguments */, parseType, 25 /* LessThanToken */, 27 /* GreaterThanToken */); } return finishNode(node); } function parseThisTypePredicate(lhs) { nextToken(); - var node = createNode(151 /* TypePredicate */, lhs.pos); + var node = createNode(154 /* TypePredicate */, lhs.pos); node.parameterName = lhs; node.type = parseType(); return finishNode(node); } function parseThisTypeNode() { - var node = createNode(162 /* ThisType */); + var node = createNode(165 /* ThisType */); nextToken(); return finishNode(node); } function parseTypeQuery() { - var node = createNode(155 /* TypeQuery */); + var node = createNode(158 /* TypeQuery */); parseExpected(101 /* TypeOfKeyword */); node.exprName = parseEntityName(/*allowReservedWords*/ true); return finishNode(node); } function parseTypeParameter() { - var node = createNode(138 /* TypeParameter */); + var node = createNode(141 /* TypeParameter */); node.name = parseIdentifier(); if (parseOptional(83 /* ExtendsKeyword */)) { // It's not uncommon for people to write improper constraints to a generic. If the @@ -8975,7 +10022,7 @@ var ts; return finishNode(node); } function parseTypeParameters() { - if (token === 25 /* LessThanToken */) { + if (token() === 25 /* LessThanToken */) { return parseBracketedList(17 /* TypeParameters */, parseTypeParameter, 25 /* LessThanToken */, 27 /* GreaterThanToken */); } } @@ -8986,7 +10033,7 @@ var ts; return undefined; } function isStartOfParameter() { - return token === 22 /* DotDotDotToken */ || isIdentifierOrPattern() || ts.isModifierKind(token) || token === 55 /* AtToken */; + return token() === 22 /* DotDotDotToken */ || isIdentifierOrPattern() || ts.isModifierKind(token()) || token() === 55 /* AtToken */ || token() === 97 /* ThisKeyword */; } function setModifiers(node, modifiers) { if (modifiers) { @@ -8995,14 +10042,19 @@ var ts; } } function parseParameter() { - var node = createNode(139 /* Parameter */); + var node = createNode(142 /* Parameter */); + if (token() === 97 /* ThisKeyword */) { + node.name = createIdentifier(/*isIdentifier*/ true, undefined); + node.type = parseParameterType(); + return finishNode(node); + } node.decorators = parseDecorators(); setModifiers(node, parseModifiers()); node.dotDotDotToken = parseOptionalToken(22 /* DotDotDotToken */); // FormalParameter [Yield,Await]: // BindingElement[?Yield,?Await] node.name = parseIdentifierOrPattern(); - if (ts.getFullWidth(node.name) === 0 && node.flags === 0 && ts.isModifierKind(token)) { + if (ts.getFullWidth(node.name) === 0 && node.flags === 0 && ts.isModifierKind(token())) { // in cases like // 'use strict' // function foo(static) @@ -9089,7 +10141,7 @@ var ts; } function parseSignatureMember(kind) { var node = createNode(kind); - if (kind === 149 /* ConstructSignature */) { + if (kind === 152 /* ConstructSignature */) { parseExpected(92 /* NewKeyword */); } fillSignature(54 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); @@ -9097,7 +10149,7 @@ var ts; return finishNode(node); } function isIndexSignature() { - if (token !== 19 /* OpenBracketToken */) { + if (token() !== 19 /* OpenBracketToken */) { return false; } return lookAhead(isUnambiguouslyIndexSignature); @@ -9120,10 +10172,10 @@ var ts; // [] // nextToken(); - if (token === 22 /* DotDotDotToken */ || token === 20 /* CloseBracketToken */) { + if (token() === 22 /* DotDotDotToken */ || token() === 20 /* CloseBracketToken */) { return true; } - if (ts.isModifierKind(token)) { + if (ts.isModifierKind(token())) { nextToken(); if (isIdentifier()) { return true; @@ -9139,21 +10191,21 @@ var ts; // A colon signifies a well formed indexer // A comma should be a badly formed indexer because comma expressions are not allowed // in computed properties. - if (token === 54 /* ColonToken */ || token === 24 /* CommaToken */) { + if (token() === 54 /* ColonToken */ || token() === 24 /* CommaToken */) { return true; } // Question mark could be an indexer with an optional property, // or it could be a conditional expression in a computed property. - if (token !== 53 /* QuestionToken */) { + if (token() !== 53 /* QuestionToken */) { return false; } // If any of the following tokens are after the question mark, it cannot // be a conditional expression, so treat it as an indexer. nextToken(); - return token === 54 /* ColonToken */ || token === 24 /* CommaToken */ || token === 20 /* CloseBracketToken */; + return token() === 54 /* ColonToken */ || token() === 24 /* CommaToken */ || token() === 20 /* CloseBracketToken */; } function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) { - var node = createNode(150 /* IndexSignature */, fullStart); + var node = createNode(153 /* IndexSignature */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); node.parameters = parseBracketedList(16 /* Parameters */, parseParameter, 19 /* OpenBracketToken */, 20 /* CloseBracketToken */); @@ -9161,26 +10213,27 @@ var ts; parseTypeMemberSemicolon(); return finishNode(node); } - function parsePropertyOrMethodSignature() { - var fullStart = scanner.getStartPos(); + function parsePropertyOrMethodSignature(fullStart, modifiers) { var name = parsePropertyName(); var questionToken = parseOptionalToken(53 /* QuestionToken */); - if (token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */) { - var method = createNode(143 /* MethodSignature */, fullStart); + if (token() === 17 /* OpenParenToken */ || token() === 25 /* LessThanToken */) { + var method = createNode(146 /* MethodSignature */, fullStart); + setModifiers(method, modifiers); method.name = name; method.questionToken = questionToken; - // Method signatues don't exist in expression contexts. So they have neither + // Method signatures don't exist in expression contexts. So they have neither // [Yield] nor [Await] fillSignature(54 /* ColonToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, method); parseTypeMemberSemicolon(); return finishNode(method); } else { - var property = createNode(141 /* PropertySignature */, fullStart); + var property = createNode(144 /* PropertySignature */, fullStart); + setModifiers(property, modifiers); property.name = name; property.questionToken = questionToken; property.type = parseTypeAnnotation(); - if (token === 56 /* EqualsToken */) { + if (token() === 56 /* EqualsToken */) { // Although type literal properties cannot not have initializers, we attempt // to parse an initializer so we can report in the checker that an interface // property or type literal property cannot have an initializer. @@ -9190,86 +10243,57 @@ var ts; return finishNode(property); } } - function isStartOfTypeMember() { - switch (token) { - case 17 /* OpenParenToken */: - case 25 /* LessThanToken */: - case 19 /* OpenBracketToken */: - return true; - default: - if (ts.isModifierKind(token)) { - var result = lookAhead(isStartOfIndexSignatureDeclaration); - if (result) { - return result; - } - } - return isLiteralPropertyName() && lookAhead(isTypeMemberWithLiteralPropertyName); + function isTypeMemberStart() { + var idToken; + // Return true if we have the start of a signature member + if (token() === 17 /* OpenParenToken */ || token() === 25 /* LessThanToken */) { + return true; } - } - function isStartOfIndexSignatureDeclaration() { - while (ts.isModifierKind(token)) { + // Eat up all modifiers, but hold on to the last one in case it is actually an identifier + while (ts.isModifierKind(token())) { + idToken = token(); nextToken(); } - return isIndexSignature(); - } - function isTypeMemberWithLiteralPropertyName() { - nextToken(); - return token === 17 /* OpenParenToken */ || - token === 25 /* LessThanToken */ || - token === 53 /* QuestionToken */ || - token === 54 /* ColonToken */ || - canParseSemicolon(); + // Index signatures and computed property names are type members + if (token() === 19 /* OpenBracketToken */) { + return true; + } + // Try to get the first property-like token following all modifiers + if (isLiteralPropertyName()) { + idToken = token(); + nextToken(); + } + // If we were able to get any potential identifier, check that it is + // the start of a member declaration + if (idToken) { + return token() === 17 /* OpenParenToken */ || + token() === 25 /* LessThanToken */ || + token() === 53 /* QuestionToken */ || + token() === 54 /* ColonToken */ || + canParseSemicolon(); + } + return false; } function parseTypeMember() { - switch (token) { - case 17 /* OpenParenToken */: - case 25 /* LessThanToken */: - return parseSignatureMember(148 /* CallSignature */); - case 19 /* OpenBracketToken */: - // Indexer or computed property - return isIndexSignature() - ? parseIndexSignatureDeclaration(scanner.getStartPos(), /*decorators*/ undefined, /*modifiers*/ undefined) - : parsePropertyOrMethodSignature(); - case 92 /* NewKeyword */: - if (lookAhead(isStartOfConstructSignature)) { - return parseSignatureMember(149 /* ConstructSignature */); - } - // fall through. - case 9 /* StringLiteral */: - case 8 /* NumericLiteral */: - return parsePropertyOrMethodSignature(); - default: - // Index declaration as allowed as a type member. But as per the grammar, - // they also allow modifiers. So we have to check for an index declaration - // that might be following modifiers. This ensures that things work properly - // when incrementally parsing as the parser will produce the Index declaration - // if it has the same text regardless of whether it is inside a class or an - // object type. - if (ts.isModifierKind(token)) { - var result = tryParse(parseIndexSignatureWithModifiers); - if (result) { - return result; - } - } - if (ts.tokenIsIdentifierOrKeyword(token)) { - return parsePropertyOrMethodSignature(); - } + if (token() === 17 /* OpenParenToken */ || token() === 25 /* LessThanToken */) { + return parseSignatureMember(151 /* CallSignature */); } - } - function parseIndexSignatureWithModifiers() { - var fullStart = scanner.getStartPos(); - var decorators = parseDecorators(); + if (token() === 92 /* NewKeyword */ && lookAhead(isStartOfConstructSignature)) { + return parseSignatureMember(152 /* ConstructSignature */); + } + var fullStart = getNodePos(); var modifiers = parseModifiers(); - return isIndexSignature() - ? parseIndexSignatureDeclaration(fullStart, decorators, modifiers) - : undefined; + if (isIndexSignature()) { + return parseIndexSignatureDeclaration(fullStart, /*decorators*/ undefined, modifiers); + } + return parsePropertyOrMethodSignature(fullStart, modifiers); } function isStartOfConstructSignature() { nextToken(); - return token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */; + return token() === 17 /* OpenParenToken */ || token() === 25 /* LessThanToken */; } function parseTypeLiteral() { - var node = createNode(156 /* TypeLiteral */); + var node = createNode(159 /* TypeLiteral */); node.members = parseObjectTypeMembers(); return finishNode(node); } @@ -9285,12 +10309,12 @@ var ts; return members; } function parseTupleType() { - var node = createNode(158 /* TupleType */); + var node = createNode(161 /* TupleType */); node.elementTypes = parseBracketedList(19 /* TupleElementTypes */, parseType, 19 /* OpenBracketToken */, 20 /* CloseBracketToken */); return finishNode(node); } function parseParenthesizedType() { - var node = createNode(161 /* ParenthesizedType */); + var node = createNode(164 /* ParenthesizedType */); parseExpected(17 /* OpenParenToken */); node.type = parseType(); parseExpected(18 /* CloseParenToken */); @@ -9298,7 +10322,7 @@ var ts; } function parseFunctionOrConstructorType(kind) { var node = createNode(kind); - if (kind === 154 /* ConstructorType */) { + if (kind === 157 /* ConstructorType */) { parseExpected(92 /* NewKeyword */); } fillSignature(34 /* EqualsGreaterThanToken */, /*yieldContext*/ false, /*awaitContext*/ false, /*requireCompleteParameterList*/ false, node); @@ -9306,25 +10330,42 @@ var ts; } function parseKeywordAndNoDot() { var node = parseTokenNode(); - return token === 21 /* DotToken */ ? undefined : node; + return token() === 21 /* DotToken */ ? undefined : node; + } + function parseLiteralTypeNode() { + var node = createNode(166 /* LiteralType */); + node.literal = parseSimpleUnaryExpression(); + finishNode(node); + return node; + } + function nextTokenIsNumericLiteral() { + return nextToken() === 8 /* NumericLiteral */; } function parseNonArrayType() { - switch (token) { + switch (token()) { case 117 /* AnyKeyword */: - case 130 /* StringKeyword */: - case 128 /* NumberKeyword */: + case 132 /* StringKeyword */: + case 130 /* NumberKeyword */: case 120 /* BooleanKeyword */: - case 131 /* SymbolKeyword */: + case 133 /* SymbolKeyword */: + case 135 /* UndefinedKeyword */: + case 127 /* NeverKeyword */: // If these are followed by a dot, then parse these out as a dotted type reference instead. var node = tryParse(parseKeywordAndNoDot); return node || parseTypeReference(); case 9 /* StringLiteral */: - return parseStringLiteralTypeNode(); + case 8 /* NumericLiteral */: + case 99 /* TrueKeyword */: + case 84 /* FalseKeyword */: + return parseLiteralTypeNode(); + case 36 /* MinusToken */: + return lookAhead(nextTokenIsNumericLiteral) ? parseLiteralTypeNode() : parseTypeReference(); case 103 /* VoidKeyword */: + case 93 /* NullKeyword */: return parseTokenNode(); case 97 /* ThisKeyword */: { var thisKeyword = parseThisTypeNode(); - if (token === 124 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { + if (token() === 124 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { return parseThisTypePredicate(thisKeyword); } else { @@ -9344,21 +10385,29 @@ var ts; } } function isStartOfType() { - switch (token) { + switch (token()) { case 117 /* AnyKeyword */: - case 130 /* StringKeyword */: - case 128 /* NumberKeyword */: + case 132 /* StringKeyword */: + case 130 /* NumberKeyword */: case 120 /* BooleanKeyword */: - case 131 /* SymbolKeyword */: + case 133 /* SymbolKeyword */: case 103 /* VoidKeyword */: + case 135 /* UndefinedKeyword */: + case 93 /* NullKeyword */: case 97 /* ThisKeyword */: case 101 /* TypeOfKeyword */: + case 127 /* NeverKeyword */: case 15 /* OpenBraceToken */: case 19 /* OpenBracketToken */: case 25 /* LessThanToken */: case 92 /* NewKeyword */: case 9 /* StringLiteral */: + case 8 /* NumericLiteral */: + case 99 /* TrueKeyword */: + case 84 /* FalseKeyword */: return true; + case 36 /* MinusToken */: + return lookAhead(nextTokenIsNumericLiteral); case 17 /* OpenParenToken */: // Only consider '(' the start of a type if followed by ')', '...', an identifier, a modifier, // or something that starts a type. We don't want to consider things like '(1)' a type. @@ -9369,13 +10418,13 @@ var ts; } function isStartOfParenthesizedOrFunctionType() { nextToken(); - return token === 18 /* CloseParenToken */ || isStartOfParameter() || isStartOfType(); + return token() === 18 /* CloseParenToken */ || isStartOfParameter() || isStartOfType(); } function parseArrayTypeOrHigher() { var type = parseNonArrayType(); while (!scanner.hasPrecedingLineBreak() && parseOptional(19 /* OpenBracketToken */)) { parseExpected(20 /* CloseBracketToken */); - var node = createNode(157 /* ArrayType */, type.pos); + var node = createNode(160 /* ArrayType */, type.pos); node.elementType = type; type = finishNode(node); } @@ -9383,7 +10432,7 @@ var ts; } function parseUnionOrIntersectionType(kind, parseConstituentType, operator) { var type = parseConstituentType(); - if (token === operator) { + if (token() === operator) { var types = [type]; types.pos = type.pos; while (parseOptional(operator)) { @@ -9397,40 +10446,56 @@ var ts; return type; } function parseIntersectionTypeOrHigher() { - return parseUnionOrIntersectionType(160 /* IntersectionType */, parseArrayTypeOrHigher, 46 /* AmpersandToken */); + return parseUnionOrIntersectionType(163 /* IntersectionType */, parseArrayTypeOrHigher, 46 /* AmpersandToken */); } function parseUnionTypeOrHigher() { - return parseUnionOrIntersectionType(159 /* UnionType */, parseIntersectionTypeOrHigher, 47 /* BarToken */); + return parseUnionOrIntersectionType(162 /* UnionType */, parseIntersectionTypeOrHigher, 47 /* BarToken */); } function isStartOfFunctionType() { - if (token === 25 /* LessThanToken */) { + if (token() === 25 /* LessThanToken */) { return true; } - return token === 17 /* OpenParenToken */ && lookAhead(isUnambiguouslyStartOfFunctionType); + return token() === 17 /* OpenParenToken */ && lookAhead(isUnambiguouslyStartOfFunctionType); + } + function skipParameterStart() { + if (ts.isModifierKind(token())) { + // Skip modifiers + parseModifiers(); + } + if (isIdentifier() || token() === 97 /* ThisKeyword */) { + nextToken(); + return true; + } + if (token() === 19 /* OpenBracketToken */ || token() === 15 /* OpenBraceToken */) { + // Return true if we can parse an array or object binding pattern with no errors + var previousErrorCount = parseDiagnostics.length; + parseIdentifierOrPattern(); + return previousErrorCount === parseDiagnostics.length; + } + return false; } function isUnambiguouslyStartOfFunctionType() { nextToken(); - if (token === 18 /* CloseParenToken */ || token === 22 /* DotDotDotToken */) { + if (token() === 18 /* CloseParenToken */ || token() === 22 /* DotDotDotToken */) { // ( ) // ( ... return true; } - if (isIdentifier() || ts.isModifierKind(token)) { - nextToken(); - if (token === 54 /* ColonToken */ || token === 24 /* CommaToken */ || - token === 53 /* QuestionToken */ || token === 56 /* EqualsToken */ || - isIdentifier() || ts.isModifierKind(token)) { - // ( id : - // ( id , - // ( id ? - // ( id = - // ( modifier id + if (skipParameterStart()) { + // We successfully skipped modifiers (if any) and an identifier or binding pattern, + // now see if we have something that indicates a parameter declaration + if (token() === 54 /* ColonToken */ || token() === 24 /* CommaToken */ || + token() === 53 /* QuestionToken */ || token() === 56 /* EqualsToken */) { + // ( xxx : + // ( xxx , + // ( xxx ? + // ( xxx = return true; } - if (token === 18 /* CloseParenToken */) { + if (token() === 18 /* CloseParenToken */) { nextToken(); - if (token === 34 /* EqualsGreaterThanToken */) { - // ( id ) => + if (token() === 34 /* EqualsGreaterThanToken */) { + // ( xxx ) => return true; } } @@ -9441,7 +10506,7 @@ var ts; var typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix); var type = parseType(); if (typePredicateVariable) { - var node = createNode(151 /* TypePredicate */, typePredicateVariable.pos); + var node = createNode(154 /* TypePredicate */, typePredicateVariable.pos); node.parameterName = typePredicateVariable; node.type = type; return finishNode(node); @@ -9452,7 +10517,7 @@ var ts; } function parseTypePredicatePrefix() { var id = parseIdentifier(); - if (token === 124 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { + if (token() === 124 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { nextToken(); return id; } @@ -9460,14 +10525,14 @@ var ts; function parseType() { // The rules about 'yield' only apply to actual code/expression contexts. They don't // apply to 'type' contexts. So we disable these parameters here before moving on. - return doOutsideOfContext(10 /* TypeExcludesFlags */, parseTypeWorker); + return doOutsideOfContext(41943040 /* TypeExcludesFlags */, parseTypeWorker); } function parseTypeWorker() { if (isStartOfFunctionType()) { - return parseFunctionOrConstructorType(153 /* FunctionType */); + return parseFunctionOrConstructorType(156 /* FunctionType */); } - if (token === 92 /* NewKeyword */) { - return parseFunctionOrConstructorType(154 /* ConstructorType */); + if (token() === 92 /* NewKeyword */) { + return parseFunctionOrConstructorType(157 /* ConstructorType */); } return parseUnionTypeOrHigher(); } @@ -9476,7 +10541,7 @@ var ts; } // EXPRESSIONS function isStartOfLeftHandSideExpression() { - switch (token) { + switch (token()) { case 97 /* ThisKeyword */: case 95 /* SuperKeyword */: case 93 /* NullKeyword */: @@ -9504,7 +10569,7 @@ var ts; if (isStartOfLeftHandSideExpression()) { return true; } - switch (token) { + switch (token()) { case 35 /* PlusToken */: case 36 /* MinusToken */: case 50 /* TildeToken */: @@ -9534,10 +10599,10 @@ var ts; } function isStartOfExpressionStatement() { // As per the grammar, none of '{' or 'function' or 'class' can start an expression statement. - return token !== 15 /* OpenBraceToken */ && - token !== 87 /* FunctionKeyword */ && - token !== 73 /* ClassKeyword */ && - token !== 55 /* AtToken */ && + return token() !== 15 /* OpenBraceToken */ && + token() !== 87 /* FunctionKeyword */ && + token() !== 73 /* ClassKeyword */ && + token() !== 55 /* AtToken */ && isStartOfExpression(); } function parseExpression() { @@ -9560,7 +10625,7 @@ var ts; return expr; } function parseInitializer(inParameter) { - if (token !== 56 /* EqualsToken */) { + if (token() !== 56 /* EqualsToken */) { // It's not uncommon during typing for the user to miss writing the '=' token. Check if // there is no newline after the last token and if we're on an expression. If so, parse // this as an equals-value clause with a missing equals. @@ -9569,7 +10634,7 @@ var ts; // it's more likely that a { would be a allowed (as an object literal). While this // is also allowed for parameters, the risk is that we consume the { as an object // literal when it really will be for the block following the parameter. - if (scanner.hasPrecedingLineBreak() || (inParameter && token === 15 /* OpenBraceToken */) || !isStartOfExpression()) { + if (scanner.hasPrecedingLineBreak() || (inParameter && token() === 15 /* OpenBraceToken */) || !isStartOfExpression()) { // preceding line break, open brace in a parameter (likely a function body) or current token is not an expression - // do not try to parse initializer return undefined; @@ -9586,19 +10651,27 @@ var ts; // 2) LeftHandSideExpression = AssignmentExpression[?in,?yield] // 3) LeftHandSideExpression AssignmentOperator AssignmentExpression[?in,?yield] // 4) ArrowFunctionExpression[?in,?yield] - // 5) [+Yield] YieldExpression[?In] + // 5) AsyncArrowFunctionExpression[in,yield,await] + // 6) [+Yield] YieldExpression[?In] // // Note: for ease of implementation we treat productions '2' and '3' as the same thing. // (i.e. they're both BinaryExpressions with an assignment operator in it). - // First, do the simple check if we have a YieldExpression (production '5'). + // First, do the simple check if we have a YieldExpression (production '6'). if (isYieldExpression()) { return parseYieldExpression(); } - // Then, check if we have an arrow function (production '4') that starts with a parenthesized - // parameter list. If we do, we must *not* recurse for productions 1, 2 or 3. An ArrowFunction is + // Then, check if we have an arrow function (production '4' and '5') that starts with a parenthesized + // parameter list or is an async arrow function. + // AsyncArrowFunctionExpression: + // 1) async[no LineTerminator here]AsyncArrowBindingIdentifier[?Yield][no LineTerminator here]=>AsyncConciseBody[?In] + // 2) CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await][no LineTerminator here]=>AsyncConciseBody[?In] + // Production (1) of AsyncArrowFunctionExpression is parsed in "tryParseAsyncSimpleArrowFunctionExpression". + // And production (2) is parsed in "tryParseParenthesizedArrowFunctionExpression". + // + // If we do successfully parse arrow-function, we must *not* recurse for productions 1, 2 or 3. An ArrowFunction is // not a LeftHandSideExpression, nor does it start a ConditionalExpression. So we are done // with AssignmentExpression if we see one. - var arrowExpression = tryParseParenthesizedArrowFunctionExpression(); + var arrowExpression = tryParseParenthesizedArrowFunctionExpression() || tryParseAsyncSimpleArrowFunctionExpression(); if (arrowExpression) { return arrowExpression; } @@ -9615,7 +10688,7 @@ var ts; // To avoid a look-ahead, we did not handle the case of an arrow function with a single un-parenthesized // parameter ('x => ...') above. We handle it here by checking if the parsed expression was a single // identifier and the current token is an arrow. - if (expr.kind === 69 /* Identifier */ && token === 34 /* EqualsGreaterThanToken */) { + if (expr.kind === 69 /* Identifier */ && token() === 34 /* EqualsGreaterThanToken */) { return parseSimpleArrowFunctionExpression(expr); } // Now see if we might be in cases '2' or '3'. @@ -9631,8 +10704,8 @@ var ts; return parseConditionalExpressionRest(expr); } function isYieldExpression() { - if (token === 114 /* YieldKeyword */) { - // If we have a 'yield' keyword, and htis is a context where yield expressions are + if (token() === 114 /* YieldKeyword */) { + // If we have a 'yield' keyword, and this is a context where yield expressions are // allowed, then definitely parse out a yield expression. if (inYieldContext()) { return true; @@ -9650,7 +10723,7 @@ var ts; // // for now we just check if the next token is an identifier. More heuristics // can be added here later as necessary. We just need to make sure that we - // don't accidently consume something legal. + // don't accidentally consume something legal. return lookAhead(nextTokenIsIdentifierOrKeywordOrNumberOnSameLine); } return false; @@ -9660,35 +10733,42 @@ var ts; return !scanner.hasPrecedingLineBreak() && isIdentifier(); } function parseYieldExpression() { - var node = createNode(187 /* YieldExpression */); + var node = createNode(190 /* YieldExpression */); // YieldExpression[In] : // yield // yield [no LineTerminator here] [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] // yield [no LineTerminator here] * [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] nextToken(); if (!scanner.hasPrecedingLineBreak() && - (token === 37 /* AsteriskToken */ || isStartOfExpression())) { + (token() === 37 /* AsteriskToken */ || isStartOfExpression())) { node.asteriskToken = parseOptionalToken(37 /* AsteriskToken */); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } else { // if the next token is not on the same line as yield. or we don't have an '*' or - // the start of an expressin, then this is just a simple "yield" expression. + // the start of an expression, then this is just a simple "yield" expression. return finishNode(node); } } - function parseSimpleArrowFunctionExpression(identifier) { - ts.Debug.assert(token === 34 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); - var node = createNode(177 /* ArrowFunction */, identifier.pos); - var parameter = createNode(139 /* Parameter */, identifier.pos); + function parseSimpleArrowFunctionExpression(identifier, asyncModifier) { + ts.Debug.assert(token() === 34 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); + var node; + if (asyncModifier) { + node = createNode(180 /* ArrowFunction */, asyncModifier.pos); + setModifiers(node, asyncModifier); + } + else { + node = createNode(180 /* ArrowFunction */, identifier.pos); + } + var parameter = createNode(142 /* Parameter */, identifier.pos); parameter.name = identifier; finishNode(parameter); node.parameters = [parameter]; node.parameters.pos = parameter.pos; node.parameters.end = parameter.end; node.equalsGreaterThanToken = parseExpectedToken(34 /* EqualsGreaterThanToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, "=>"); - node.body = parseArrowFunctionExpressionBody(/*isAsync*/ false); + node.body = parseArrowFunctionExpressionBody(/*isAsync*/ !!asyncModifier); return finishNode(node); } function tryParseParenthesizedArrowFunctionExpression() { @@ -9711,7 +10791,7 @@ var ts; var isAsync = !!(arrowFunction.flags & 256 /* Async */); // If we have an arrow, then try to parse the body. Even if not, try to parse if we // have an opening brace, just in case we're in an error state. - var lastToken = token; + var lastToken = token(); arrowFunction.equalsGreaterThanToken = parseExpectedToken(34 /* EqualsGreaterThanToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics._0_expected, "=>"); arrowFunction.body = (lastToken === 34 /* EqualsGreaterThanToken */ || lastToken === 15 /* OpenBraceToken */) ? parseArrowFunctionExpressionBody(isAsync) @@ -9723,10 +10803,10 @@ var ts; // Unknown -> There *might* be a parenthesized arrow function here. // Speculatively look ahead to be sure, and rollback if not. function isParenthesizedArrowFunctionExpression() { - if (token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */ || token === 118 /* AsyncKeyword */) { + if (token() === 17 /* OpenParenToken */ || token() === 25 /* LessThanToken */ || token() === 118 /* AsyncKeyword */) { return lookAhead(isParenthesizedArrowFunctionExpressionWorker); } - if (token === 34 /* EqualsGreaterThanToken */) { + if (token() === 34 /* EqualsGreaterThanToken */) { // ERROR RECOVERY TWEAK: // If we see a standalone => try to parse it as an arrow function expression as that's // likely what the user intended to write. @@ -9736,16 +10816,16 @@ var ts; return 0 /* False */; } function isParenthesizedArrowFunctionExpressionWorker() { - if (token === 118 /* AsyncKeyword */) { + if (token() === 118 /* AsyncKeyword */) { nextToken(); if (scanner.hasPrecedingLineBreak()) { return 0 /* False */; } - if (token !== 17 /* OpenParenToken */ && token !== 25 /* LessThanToken */) { + if (token() !== 17 /* OpenParenToken */ && token() !== 25 /* LessThanToken */) { return 0 /* False */; } } - var first = token; + var first = token(); var second = nextToken(); if (first === 17 /* OpenParenToken */) { if (second === 18 /* CloseParenToken */) { @@ -9832,8 +10912,39 @@ var ts; function parsePossibleParenthesizedArrowFunctionExpressionHead() { return parseParenthesizedArrowFunctionExpressionHead(/*allowAmbiguity*/ false); } + function tryParseAsyncSimpleArrowFunctionExpression() { + // We do a check here so that we won't be doing unnecessarily call to "lookAhead" + if (token() === 118 /* AsyncKeyword */) { + var isUnParenthesizedAsyncArrowFunction = lookAhead(isUnParenthesizedAsyncArrowFunctionWorker); + if (isUnParenthesizedAsyncArrowFunction === 1 /* True */) { + var asyncModifier = parseModifiersForArrowFunction(); + var expr = parseBinaryExpressionOrHigher(/*precedence*/ 0); + return parseSimpleArrowFunctionExpression(expr, asyncModifier); + } + } + return undefined; + } + function isUnParenthesizedAsyncArrowFunctionWorker() { + // AsyncArrowFunctionExpression: + // 1) async[no LineTerminator here]AsyncArrowBindingIdentifier[?Yield][no LineTerminator here]=>AsyncConciseBody[?In] + // 2) CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await][no LineTerminator here]=>AsyncConciseBody[?In] + if (token() === 118 /* AsyncKeyword */) { + nextToken(); + // If the "async" is followed by "=>" token then it is not a begining of an async arrow-function + // but instead a simple arrow-function which will be parsed inside "parseAssignmentExpressionOrHigher" + if (scanner.hasPrecedingLineBreak() || token() === 34 /* EqualsGreaterThanToken */) { + return 0 /* False */; + } + // Check for un-parenthesized AsyncArrowFunction + var expr = parseBinaryExpressionOrHigher(/*precedence*/ 0); + if (!scanner.hasPrecedingLineBreak() && expr.kind === 69 /* Identifier */ && token() === 34 /* EqualsGreaterThanToken */) { + return 1 /* True */; + } + } + return 0 /* False */; + } function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) { - var node = createNode(177 /* ArrowFunction */); + var node = createNode(180 /* ArrowFunction */); setModifiers(node, parseModifiersForArrowFunction()); var isAsync = !!(node.flags & 256 /* Async */); // Arrow functions are never generators. @@ -9856,19 +10967,19 @@ var ts; // - "a ? (b): c" will have "(b):" parsed as a signature with a return type annotation. // // So we need just a bit of lookahead to ensure that it can only be a signature. - if (!allowAmbiguity && token !== 34 /* EqualsGreaterThanToken */ && token !== 15 /* OpenBraceToken */) { + if (!allowAmbiguity && token() !== 34 /* EqualsGreaterThanToken */ && token() !== 15 /* OpenBraceToken */) { // Returning undefined here will cause our caller to rewind to where we started from. return undefined; } return node; } function parseArrowFunctionExpressionBody(isAsync) { - if (token === 15 /* OpenBraceToken */) { + if (token() === 15 /* OpenBraceToken */) { return parseFunctionBlock(/*allowYield*/ false, /*allowAwait*/ isAsync, /*ignoreMissingOpenBrace*/ false); } - if (token !== 23 /* SemicolonToken */ && - token !== 87 /* FunctionKeyword */ && - token !== 73 /* ClassKeyword */ && + if (token() !== 23 /* SemicolonToken */ && + token() !== 87 /* FunctionKeyword */ && + token() !== 73 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) { // Check if we got a plain statement (i.e. no expression-statements, no function/class expressions/declarations) @@ -9899,7 +11010,7 @@ var ts; } // Note: we explicitly 'allowIn' in the whenTrue part of the condition expression, and // we do not that for the 'whenFalse' part. - var node = createNode(185 /* ConditionalExpression */, leftOperand.pos); + var node = createNode(188 /* ConditionalExpression */, leftOperand.pos); node.condition = leftOperand; node.questionToken = questionToken; node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher); @@ -9912,7 +11023,7 @@ var ts; return parseBinaryExpressionRest(precedence, leftOperand); } function isInOrOfKeyword(t) { - return t === 90 /* InKeyword */ || t === 135 /* OfKeyword */; + return t === 90 /* InKeyword */ || t === 138 /* OfKeyword */; } function parseBinaryExpressionRest(precedence, leftOperand) { while (true) { @@ -9923,7 +11034,7 @@ var ts; // Check the precedence to see if we should "take" this operator // - For left associative operator (all operator but **), consume the operator, // recursively call the function below, and parse binaryExpression as a rightOperand - // of the caller if the new precendence of the operator is greater then or equal to the current precendence. + // of the caller if the new precedence of the operator is greater then or equal to the current precedence. // For example: // a - b - c; // ^token; leftOperand = b. Return b to the caller as a rightOperand @@ -9932,8 +11043,8 @@ var ts; // a - b * c; // ^token; leftOperand = b. Return b * c to the caller as a rightOperand // - For right associative operator (**), consume the operator, recursively call the function - // and parse binaryExpression as a rightOperand of the caller if the new precendence of - // the operator is strictly grater than the current precendence + // and parse binaryExpression as a rightOperand of the caller if the new precedence of + // the operator is strictly grater than the current precedence // For example: // a ** b ** c; // ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand @@ -9941,16 +11052,16 @@ var ts; // ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand // a ** b - c // ^token; leftOperand = b. Return b to the caller as a rightOperand - var consumeCurrentOperator = token === 38 /* AsteriskAsteriskToken */ ? + var consumeCurrentOperator = token() === 38 /* AsteriskAsteriskToken */ ? newPrecedence >= precedence : newPrecedence > precedence; if (!consumeCurrentOperator) { break; } - if (token === 90 /* InKeyword */ && inDisallowInContext()) { + if (token() === 90 /* InKeyword */ && inDisallowInContext()) { break; } - if (token === 116 /* AsKeyword */) { + if (token() === 116 /* AsKeyword */) { // Make sure we *do* perform ASI for constructs like this: // var x = foo // as (Bar) @@ -9971,13 +11082,13 @@ var ts; return leftOperand; } function isBinaryOperator() { - if (inDisallowInContext() && token === 90 /* InKeyword */) { + if (inDisallowInContext() && token() === 90 /* InKeyword */) { return false; } return getBinaryOperatorPrecedence() > 0; } function getBinaryOperatorPrecedence() { - switch (token) { + switch (token()) { case 52 /* BarBarToken */: return 1; case 51 /* AmpersandAmpersandToken */: @@ -10020,45 +11131,45 @@ var ts; return -1; } function makeBinaryExpression(left, operatorToken, right) { - var node = createNode(184 /* BinaryExpression */, left.pos); + var node = createNode(187 /* BinaryExpression */, left.pos); node.left = left; node.operatorToken = operatorToken; node.right = right; return finishNode(node); } function makeAsExpression(left, right) { - var node = createNode(192 /* AsExpression */, left.pos); + var node = createNode(195 /* AsExpression */, left.pos); node.expression = left; node.type = right; return finishNode(node); } function parsePrefixUnaryExpression() { - var node = createNode(182 /* PrefixUnaryExpression */); - node.operator = token; + var node = createNode(185 /* PrefixUnaryExpression */); + node.operator = token(); nextToken(); node.operand = parseSimpleUnaryExpression(); return finishNode(node); } function parseDeleteExpression() { - var node = createNode(178 /* DeleteExpression */); + var node = createNode(181 /* DeleteExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseTypeOfExpression() { - var node = createNode(179 /* TypeOfExpression */); + var node = createNode(182 /* TypeOfExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseVoidExpression() { - var node = createNode(180 /* VoidExpression */); + var node = createNode(183 /* VoidExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function isAwaitExpression() { - if (token === 119 /* AwaitKeyword */) { + if (token() === 119 /* AwaitKeyword */) { if (inAwaitContext()) { return true; } @@ -10068,33 +11179,50 @@ var ts; return false; } function parseAwaitExpression() { - var node = createNode(181 /* AwaitExpression */); + var node = createNode(184 /* AwaitExpression */); nextToken(); node.expression = parseSimpleUnaryExpression(); return finishNode(node); } /** - * Parse ES7 unary expression and await expression + * Parse ES7 exponential expression and await expression + * + * ES7 ExponentiationExpression: + * 1) UnaryExpression[?Yield] + * 2) UpdateExpression[?Yield] ** ExponentiationExpression[?Yield] * - * ES7 UnaryExpression: - * 1) SimpleUnaryExpression[?yield] - * 2) IncrementExpression[?yield] ** UnaryExpression[?yield] */ function parseUnaryExpressionOrHigher() { - if (isAwaitExpression()) { - return parseAwaitExpression(); - } - if (isIncrementExpression()) { + /** + * ES7 UpdateExpression: + * 1) LeftHandSideExpression[?Yield] + * 2) LeftHandSideExpression[?Yield][no LineTerminator here]++ + * 3) LeftHandSideExpression[?Yield][no LineTerminator here]-- + * 4) ++UnaryExpression[?Yield] + * 5) --UnaryExpression[?Yield] + */ + if (isUpdateExpression()) { var incrementExpression = parseIncrementExpression(); - return token === 38 /* AsteriskAsteriskToken */ ? + return token() === 38 /* AsteriskAsteriskToken */ ? parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : incrementExpression; } - var unaryOperator = token; + /** + * ES7 UnaryExpression: + * 1) UpdateExpression[?yield] + * 2) delete UpdateExpression[?yield] + * 3) void UpdateExpression[?yield] + * 4) typeof UpdateExpression[?yield] + * 5) + UpdateExpression[?yield] + * 6) - UpdateExpression[?yield] + * 7) ~ UpdateExpression[?yield] + * 8) ! UpdateExpression[?yield] + */ + var unaryOperator = token(); var simpleUnaryExpression = parseSimpleUnaryExpression(); - if (token === 38 /* AsteriskAsteriskToken */) { + if (token() === 38 /* AsteriskAsteriskToken */) { var start = ts.skipTrivia(sourceText, simpleUnaryExpression.pos); - if (simpleUnaryExpression.kind === 174 /* TypeAssertionExpression */) { + if (simpleUnaryExpression.kind === 177 /* TypeAssertionExpression */) { parseErrorAtPosition(start, simpleUnaryExpression.end - start, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { @@ -10106,8 +11234,8 @@ var ts; /** * Parse ES7 simple-unary expression or higher: * - * ES7 SimpleUnaryExpression: - * 1) IncrementExpression[?yield] + * ES7 UnaryExpression: + * 1) UpdateExpression[?yield] * 2) delete UnaryExpression[?yield] * 3) void UnaryExpression[?yield] * 4) typeof UnaryExpression[?yield] @@ -10115,9 +11243,10 @@ var ts; * 6) - UnaryExpression[?yield] * 7) ~ UnaryExpression[?yield] * 8) ! UnaryExpression[?yield] + * 9) [+Await] await UnaryExpression[?yield] */ function parseSimpleUnaryExpression() { - switch (token) { + switch (token()) { case 35 /* PlusToken */: case 36 /* MinusToken */: case 50 /* TildeToken */: @@ -10134,6 +11263,10 @@ var ts; // UnaryExpression (modified): // < type > UnaryExpression return parseTypeAssertion(); + case 119 /* AwaitKeyword */: + if (isAwaitExpression()) { + return parseAwaitExpression(); + } default: return parseIncrementExpression(); } @@ -10141,17 +11274,17 @@ var ts; /** * Check if the current token can possibly be an ES7 increment expression. * - * ES7 IncrementExpression: + * ES7 UpdateExpression: * LeftHandSideExpression[?Yield] * LeftHandSideExpression[?Yield][no LineTerminator here]++ * LeftHandSideExpression[?Yield][no LineTerminator here]-- * ++LeftHandSideExpression[?Yield] * --LeftHandSideExpression[?Yield] */ - function isIncrementExpression() { + function isUpdateExpression() { // This function is called inside parseUnaryExpression to decide - // whether to call parseSimpleUnaryExpression or call parseIncrmentExpression directly - switch (token) { + // whether to call parseSimpleUnaryExpression or call parseIncrementExpression directly + switch (token()) { case 35 /* PlusToken */: case 36 /* MinusToken */: case 50 /* TildeToken */: @@ -10159,6 +11292,7 @@ var ts; case 78 /* DeleteKeyword */: case 101 /* TypeOfKeyword */: case 103 /* VoidKeyword */: + case 119 /* AwaitKeyword */: return false; case 25 /* LessThanToken */: // If we are not in JSX context, we are parsing TypeAssertion which is an UnaryExpression @@ -10183,23 +11317,23 @@ var ts; * In TypeScript (2), (3) are parsed as PostfixUnaryExpression. (4), (5) are parsed as PrefixUnaryExpression */ function parseIncrementExpression() { - if (token === 41 /* PlusPlusToken */ || token === 42 /* MinusMinusToken */) { - var node = createNode(182 /* PrefixUnaryExpression */); - node.operator = token; + if (token() === 41 /* PlusPlusToken */ || token() === 42 /* MinusMinusToken */) { + var node = createNode(185 /* PrefixUnaryExpression */); + node.operator = token(); nextToken(); node.operand = parseLeftHandSideExpressionOrHigher(); return finishNode(node); } - else if (sourceFile.languageVariant === 1 /* JSX */ && token === 25 /* LessThanToken */ && lookAhead(nextTokenIsIdentifierOrKeyword)) { + else if (sourceFile.languageVariant === 1 /* JSX */ && token() === 25 /* LessThanToken */ && lookAhead(nextTokenIsIdentifierOrKeyword)) { // JSXElement is part of primaryExpression return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); } var expression = parseLeftHandSideExpressionOrHigher(); ts.Debug.assert(ts.isLeftHandSideExpression(expression)); - if ((token === 41 /* PlusPlusToken */ || token === 42 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(183 /* PostfixUnaryExpression */, expression.pos); + if ((token() === 41 /* PlusPlusToken */ || token() === 42 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) { + var node = createNode(186 /* PostfixUnaryExpression */, expression.pos); node.operand = expression; - node.operator = token; + node.operator = token(); nextToken(); return finishNode(node); } @@ -10236,7 +11370,7 @@ var ts; // the last two CallExpression productions. Or we have a MemberExpression which either // completes the LeftHandSideExpression, or starts the beginning of the first four // CallExpression productions. - var expression = token === 95 /* SuperKeyword */ + var expression = token() === 95 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher(); // Now, we *may* be complete. However, we might have consumed the start of a @@ -10296,14 +11430,14 @@ var ts; } function parseSuperExpression() { var expression = parseTokenNode(); - if (token === 17 /* OpenParenToken */ || token === 21 /* DotToken */ || token === 19 /* OpenBracketToken */) { + if (token() === 17 /* OpenParenToken */ || token() === 21 /* DotToken */ || token() === 19 /* OpenBracketToken */) { return expression; } // If we have seen "super" it must be followed by '(' or '.'. // If it wasn't then just try to parse out a '.' and report an error. - var node = createNode(169 /* PropertyAccessExpression */, expression.pos); + var node = createNode(172 /* PropertyAccessExpression */, expression.pos); node.expression = expression; - node.dotToken = parseExpectedToken(21 /* DotToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); + parseExpectedToken(21 /* DotToken */, /*reportAtCurrentPosition*/ false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); node.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); return finishNode(node); } @@ -10314,14 +11448,20 @@ var ts; if (lhs.kind === 69 /* Identifier */) { return lhs.text === rhs.text; } - return lhs.right.text === rhs.right.text && - tagNamesAreEquivalent(lhs.left, rhs.left); + if (lhs.kind === 97 /* ThisKeyword */) { + return true; + } + // If we are at this statement then we must have PropertyAccessExpression and because tag name in Jsx element can only + // take forms of JsxTagNameExpression which includes an identifier, "this" expression, or another propertyAccessExpression + // it is safe to case the expression property as such. See parseJsxElementName for how we parse tag name in Jsx element + return lhs.name.text === rhs.name.text && + tagNamesAreEquivalent(lhs.expression, rhs.expression); } function parseJsxElementOrSelfClosingElement(inExpressionContext) { var opening = parseJsxOpeningOrSelfClosingElement(inExpressionContext); var result; - if (opening.kind === 238 /* JsxOpeningElement */) { - var node = createNode(236 /* JsxElement */, opening.pos); + if (opening.kind === 243 /* JsxOpeningElement */) { + var node = createNode(241 /* JsxElement */, opening.pos); node.openingElement = opening; node.children = parseJsxChildren(node.openingElement.tagName); node.closingElement = parseJsxClosingElement(inExpressionContext); @@ -10331,7 +11471,7 @@ var ts; result = finishNode(node); } else { - ts.Debug.assert(opening.kind === 237 /* JsxSelfClosingElement */); + ts.Debug.assert(opening.kind === 242 /* JsxSelfClosingElement */); // Nothing else to do for self-closing elements result = opening; } @@ -10342,11 +11482,11 @@ var ts; // does less damage and we can report a better error. // Since JSX elements are invalid < operands anyway, this lookahead parse will only occur in error scenarios // of one sort or another. - if (inExpressionContext && token === 25 /* LessThanToken */) { + if (inExpressionContext && token() === 25 /* LessThanToken */) { var invalidElement = tryParse(function () { return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); }); if (invalidElement) { parseErrorAtCurrentToken(ts.Diagnostics.JSX_expressions_must_have_one_parent_element); - var badNode = createNode(184 /* BinaryExpression */, result.pos); + var badNode = createNode(187 /* BinaryExpression */, result.pos); badNode.end = invalidElement.end; badNode.left = result; badNode.right = invalidElement; @@ -10358,20 +11498,20 @@ var ts; return result; } function parseJsxText() { - var node = createNode(239 /* JsxText */, scanner.getStartPos()); - token = scanner.scanJsxToken(); + var node = createNode(244 /* JsxText */, scanner.getStartPos()); + currentToken = scanner.scanJsxToken(); return finishNode(node); } function parseJsxChild() { - switch (token) { - case 239 /* JsxText */: + switch (token()) { + case 244 /* JsxText */: return parseJsxText(); case 15 /* OpenBraceToken */: return parseJsxExpression(/*inExpressionContext*/ false); case 25 /* LessThanToken */: return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ false); } - ts.Debug.fail("Unknown JSX child kind " + token); + ts.Debug.fail("Unknown JSX child kind " + token()); } function parseJsxChildren(openingTagName) { var result = []; @@ -10379,12 +11519,12 @@ var ts; var saveParsingContext = parsingContext; parsingContext |= 1 << 14 /* JsxChildren */; while (true) { - token = scanner.reScanJsxToken(); - if (token === 26 /* LessThanSlashToken */) { + currentToken = scanner.reScanJsxToken(); + if (token() === 26 /* LessThanSlashToken */) { // Closing tag break; } - else if (token === 1 /* EndOfFileToken */) { + else if (token() === 1 /* EndOfFileToken */) { // If we hit EOF, issue the error at the tag that lacks the closing element // rather than at the end of the file (which is useless) parseErrorAtPosition(openingTagName.pos, openingTagName.end - openingTagName.pos, ts.Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, ts.getTextOfNodeFromSourceText(sourceText, openingTagName)); @@ -10402,11 +11542,11 @@ var ts; var tagName = parseJsxElementName(); var attributes = parseList(13 /* JsxAttributes */, parseJsxAttribute); var node; - if (token === 27 /* GreaterThanToken */) { + if (token() === 27 /* GreaterThanToken */) { // Closing tag, so scan the immediately-following text with the JSX scanning instead // of regular scanning to avoid treating illegal characters (e.g. '#') as immediate // scanning errors - node = createNode(238 /* JsxOpeningElement */, fullStart); + node = createNode(243 /* JsxOpeningElement */, fullStart); scanJsxText(); } else { @@ -10418,7 +11558,7 @@ var ts; parseExpected(27 /* GreaterThanToken */, /*diagnostic*/ undefined, /*shouldAdvance*/ false); scanJsxText(); } - node = createNode(237 /* JsxSelfClosingElement */, fullStart); + node = createNode(242 /* JsxSelfClosingElement */, fullStart); } node.tagName = tagName; node.attributes = attributes; @@ -10426,20 +11566,25 @@ var ts; } function parseJsxElementName() { scanJsxIdentifier(); - var elementName = parseIdentifierName(); + // JsxElement can have name in the form of + // propertyAccessExpression + // primaryExpression in the form of an identifier and "this" keyword + // We can't just simply use parseLeftHandSideExpressionOrHigher because then we will start consider class,function etc as a keyword + // We only want to consider "this" as a primaryExpression + var expression = token() === 97 /* ThisKeyword */ ? + parseTokenNode() : parseIdentifierName(); while (parseOptional(21 /* DotToken */)) { - scanJsxIdentifier(); - var node = createNode(136 /* QualifiedName */, elementName.pos); - node.left = elementName; - node.right = parseIdentifierName(); - elementName = finishNode(node); + var propertyAccess = createNode(172 /* PropertyAccessExpression */, expression.pos); + propertyAccess.expression = expression; + propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); + expression = finishNode(propertyAccess); } - return elementName; + return expression; } function parseJsxExpression(inExpressionContext) { - var node = createNode(243 /* JsxExpression */); + var node = createNode(248 /* JsxExpression */); parseExpected(15 /* OpenBraceToken */); - if (token !== 16 /* CloseBraceToken */) { + if (token() !== 16 /* CloseBraceToken */) { node.expression = parseAssignmentExpressionOrHigher(); } if (inExpressionContext) { @@ -10452,14 +11597,14 @@ var ts; return finishNode(node); } function parseJsxAttribute() { - if (token === 15 /* OpenBraceToken */) { + if (token() === 15 /* OpenBraceToken */) { return parseJsxSpreadAttribute(); } scanJsxIdentifier(); - var node = createNode(241 /* JsxAttribute */); + var node = createNode(246 /* JsxAttribute */); node.name = parseIdentifierName(); if (parseOptional(56 /* EqualsToken */)) { - switch (token) { + switch (token()) { case 9 /* StringLiteral */: node.initializer = parseLiteralNode(); break; @@ -10471,7 +11616,7 @@ var ts; return finishNode(node); } function parseJsxSpreadAttribute() { - var node = createNode(242 /* JsxSpreadAttribute */); + var node = createNode(247 /* JsxSpreadAttribute */); parseExpected(15 /* OpenBraceToken */); parseExpected(22 /* DotDotDotToken */); node.expression = parseExpression(); @@ -10479,7 +11624,7 @@ var ts; return finishNode(node); } function parseJsxClosingElement(inExpressionContext) { - var node = createNode(240 /* JsxClosingElement */); + var node = createNode(245 /* JsxClosingElement */); parseExpected(26 /* LessThanSlashToken */); node.tagName = parseJsxElementName(); if (inExpressionContext) { @@ -10492,7 +11637,7 @@ var ts; return finishNode(node); } function parseTypeAssertion() { - var node = createNode(174 /* TypeAssertionExpression */); + var node = createNode(177 /* TypeAssertionExpression */); parseExpected(25 /* LessThanToken */); node.type = parseType(); parseExpected(27 /* GreaterThanToken */); @@ -10503,20 +11648,26 @@ var ts; while (true) { var dotToken = parseOptionalToken(21 /* DotToken */); if (dotToken) { - var propertyAccess = createNode(169 /* PropertyAccessExpression */, expression.pos); + var propertyAccess = createNode(172 /* PropertyAccessExpression */, expression.pos); propertyAccess.expression = expression; - propertyAccess.dotToken = dotToken; propertyAccess.name = parseRightSideOfDot(/*allowIdentifierNames*/ true); expression = finishNode(propertyAccess); continue; } + if (token() === 49 /* ExclamationToken */ && !scanner.hasPrecedingLineBreak()) { + nextToken(); + var nonNullExpression = createNode(196 /* NonNullExpression */, expression.pos); + nonNullExpression.expression = expression; + expression = finishNode(nonNullExpression); + continue; + } // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName if (!inDecoratorContext() && parseOptional(19 /* OpenBracketToken */)) { - var indexedAccess = createNode(170 /* ElementAccessExpression */, expression.pos); + var indexedAccess = createNode(173 /* ElementAccessExpression */, expression.pos); indexedAccess.expression = expression; // It's not uncommon for a user to write: "new Type[]". // Check for that common pattern and report a better error message. - if (token !== 20 /* CloseBracketToken */) { + if (token() !== 20 /* CloseBracketToken */) { indexedAccess.argumentExpression = allowInAnd(parseExpression); if (indexedAccess.argumentExpression.kind === 9 /* StringLiteral */ || indexedAccess.argumentExpression.kind === 8 /* NumericLiteral */) { var literal = indexedAccess.argumentExpression; @@ -10527,10 +11678,10 @@ var ts; expression = finishNode(indexedAccess); continue; } - if (token === 11 /* NoSubstitutionTemplateLiteral */ || token === 12 /* TemplateHead */) { - var tagExpression = createNode(173 /* TaggedTemplateExpression */, expression.pos); + if (token() === 11 /* NoSubstitutionTemplateLiteral */ || token() === 12 /* TemplateHead */) { + var tagExpression = createNode(176 /* TaggedTemplateExpression */, expression.pos); tagExpression.tag = expression; - tagExpression.template = token === 11 /* NoSubstitutionTemplateLiteral */ + tagExpression.template = token() === 11 /* NoSubstitutionTemplateLiteral */ ? parseLiteralNode() : parseTemplateExpression(); expression = finishNode(tagExpression); @@ -10542,7 +11693,7 @@ var ts; function parseCallExpressionRest(expression) { while (true) { expression = parseMemberExpressionRest(expression); - if (token === 25 /* LessThanToken */) { + if (token() === 25 /* LessThanToken */) { // See if this is the start of a generic invocation. If so, consume it and // keep checking for postfix expressions. Otherwise, it's just a '<' that's // part of an arithmetic expression. Break out so we consume it higher in the @@ -10551,15 +11702,15 @@ var ts; if (!typeArguments) { return expression; } - var callExpr = createNode(171 /* CallExpression */, expression.pos); + var callExpr = createNode(174 /* CallExpression */, expression.pos); callExpr.expression = expression; callExpr.typeArguments = typeArguments; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); continue; } - else if (token === 17 /* OpenParenToken */) { - var callExpr = createNode(171 /* CallExpression */, expression.pos); + else if (token() === 17 /* OpenParenToken */) { + var callExpr = createNode(174 /* CallExpression */, expression.pos); callExpr.expression = expression; callExpr.arguments = parseArgumentList(); expression = finishNode(callExpr); @@ -10583,14 +11734,14 @@ var ts; // If it doesn't have the closing > then it's definitely not an type argument list. return undefined; } - // If we have a '<', then only parse this as a arugment list if the type arguments + // If we have a '<', then only parse this as a argument list if the type arguments // are complete and we have an open paren. if we don't, rewind and return nothing. return typeArguments && canFollowTypeArgumentsInExpression() ? typeArguments : undefined; } function canFollowTypeArgumentsInExpression() { - switch (token) { + switch (token()) { case 17 /* OpenParenToken */: // foo( // this case are the only case where this token can legally follow a type argument // list. So we definitely want to treat this as a type arg list. @@ -10626,7 +11777,7 @@ var ts; } } function parsePrimaryExpression() { - switch (token) { + switch (token()) { case 8 /* NumericLiteral */: case 9 /* StringLiteral */: case 11 /* NoSubstitutionTemplateLiteral */: @@ -10669,41 +11820,42 @@ var ts; return parseIdentifier(ts.Diagnostics.Expression_expected); } function parseParenthesizedExpression() { - var node = createNode(175 /* ParenthesizedExpression */); + var node = createNode(178 /* ParenthesizedExpression */); parseExpected(17 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); parseExpected(18 /* CloseParenToken */); return finishNode(node); } function parseSpreadElement() { - var node = createNode(188 /* SpreadElementExpression */); + var node = createNode(191 /* SpreadElementExpression */); parseExpected(22 /* DotDotDotToken */); node.expression = parseAssignmentExpressionOrHigher(); return finishNode(node); } function parseArgumentOrArrayLiteralElement() { - return token === 22 /* DotDotDotToken */ ? parseSpreadElement() : - token === 24 /* CommaToken */ ? createNode(190 /* OmittedExpression */) : + return token() === 22 /* DotDotDotToken */ ? parseSpreadElement() : + token() === 24 /* CommaToken */ ? createNode(193 /* OmittedExpression */) : parseAssignmentExpressionOrHigher(); } function parseArgumentExpression() { return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); } function parseArrayLiteralExpression() { - var node = createNode(167 /* ArrayLiteralExpression */); + var node = createNode(170 /* ArrayLiteralExpression */); parseExpected(19 /* OpenBracketToken */); - if (scanner.hasPrecedingLineBreak()) - node.flags |= 1024 /* MultiLine */; + if (scanner.hasPrecedingLineBreak()) { + node.multiLine = true; + } node.elements = parseDelimitedList(15 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement); parseExpected(20 /* CloseBracketToken */); return finishNode(node); } function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { if (parseContextualModifier(123 /* GetKeyword */)) { - return parseAccessorDeclaration(146 /* GetAccessor */, fullStart, decorators, modifiers); + return addJSDocComment(parseAccessorDeclaration(149 /* GetAccessor */, fullStart, decorators, modifiers)); } - else if (parseContextualModifier(129 /* SetKeyword */)) { - return parseAccessorDeclaration(147 /* SetAccessor */, fullStart, decorators, modifiers); + else if (parseContextualModifier(131 /* SetKeyword */)) { + return parseAccessorDeclaration(150 /* SetAccessor */, fullStart, decorators, modifiers); } return undefined; } @@ -10720,7 +11872,7 @@ var ts; var propertyName = parsePropertyName(); // Disallowing of optional property assignments happens in the grammar checker. var questionToken = parseOptionalToken(53 /* QuestionToken */); - if (asteriskToken || token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */) { + if (asteriskToken || token() === 17 /* OpenParenToken */ || token() === 25 /* LessThanToken */) { return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken); } // check if it is short-hand property assignment or normal property assignment @@ -10728,9 +11880,9 @@ var ts; // CoverInitializedName[Yield] : // IdentifierReference[?Yield] Initializer[In, ?Yield] // this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern - var isShorthandPropertyAssignment = tokenIsIdentifier && (token === 24 /* CommaToken */ || token === 16 /* CloseBraceToken */ || token === 56 /* EqualsToken */); + var isShorthandPropertyAssignment = tokenIsIdentifier && (token() === 24 /* CommaToken */ || token() === 16 /* CloseBraceToken */ || token() === 56 /* EqualsToken */); if (isShorthandPropertyAssignment) { - var shorthandDeclaration = createNode(249 /* ShorthandPropertyAssignment */, fullStart); + var shorthandDeclaration = createNode(254 /* ShorthandPropertyAssignment */, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; var equalsToken = parseOptionalToken(56 /* EqualsToken */); @@ -10741,7 +11893,7 @@ var ts; return addJSDocComment(finishNode(shorthandDeclaration)); } else { - var propertyAssignment = createNode(248 /* PropertyAssignment */, fullStart); + var propertyAssignment = createNode(253 /* PropertyAssignment */, fullStart); propertyAssignment.modifiers = modifiers; propertyAssignment.name = propertyName; propertyAssignment.questionToken = questionToken; @@ -10751,12 +11903,12 @@ var ts; } } function parseObjectLiteralExpression() { - var node = createNode(168 /* ObjectLiteralExpression */); + var node = createNode(171 /* ObjectLiteralExpression */); parseExpected(15 /* OpenBraceToken */); if (scanner.hasPrecedingLineBreak()) { - node.flags |= 1024 /* MultiLine */; + node.multiLine = true; } - node.properties = parseDelimitedList(12 /* ObjectLiteralMembers */, parseObjectLiteralElement, /*considerSemicolonAsDelimeter*/ true); + node.properties = parseDelimitedList(12 /* ObjectLiteralMembers */, parseObjectLiteralElement, /*considerSemicolonAsDelimiter*/ true); parseExpected(16 /* CloseBraceToken */); return finishNode(node); } @@ -10770,7 +11922,7 @@ var ts; if (saveDecoratorContext) { setDecoratorContext(/*val*/ false); } - var node = createNode(176 /* FunctionExpression */); + var node = createNode(179 /* FunctionExpression */); setModifiers(node, parseModifiers()); parseExpected(87 /* FunctionKeyword */); node.asteriskToken = parseOptionalToken(37 /* AsteriskToken */); @@ -10792,18 +11944,18 @@ var ts; return isIdentifier() ? parseIdentifier() : undefined; } function parseNewExpression() { - var node = createNode(172 /* NewExpression */); + var node = createNode(175 /* NewExpression */); parseExpected(92 /* NewKeyword */); node.expression = parseMemberExpressionOrHigher(); node.typeArguments = tryParse(parseTypeArgumentsInExpression); - if (node.typeArguments || token === 17 /* OpenParenToken */) { + if (node.typeArguments || token() === 17 /* OpenParenToken */) { node.arguments = parseArgumentList(); } return finishNode(node); } // STATEMENTS function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { - var node = createNode(195 /* Block */); + var node = createNode(199 /* Block */); if (parseExpected(15 /* OpenBraceToken */, diagnosticMessage) || ignoreMissingOpenBrace) { node.statements = parseList(1 /* BlockStatements */, parseStatement); parseExpected(16 /* CloseBraceToken */); @@ -10833,12 +11985,12 @@ var ts; return block; } function parseEmptyStatement() { - var node = createNode(197 /* EmptyStatement */); + var node = createNode(201 /* EmptyStatement */); parseExpected(23 /* SemicolonToken */); return finishNode(node); } function parseIfStatement() { - var node = createNode(199 /* IfStatement */); + var node = createNode(203 /* IfStatement */); parseExpected(88 /* IfKeyword */); parseExpected(17 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); @@ -10848,7 +12000,7 @@ var ts; return finishNode(node); } function parseDoStatement() { - var node = createNode(200 /* DoStatement */); + var node = createNode(204 /* DoStatement */); parseExpected(79 /* DoKeyword */); node.statement = parseStatement(); parseExpected(104 /* WhileKeyword */); @@ -10863,7 +12015,7 @@ var ts; return finishNode(node); } function parseWhileStatement() { - var node = createNode(201 /* WhileStatement */); + var node = createNode(205 /* WhileStatement */); parseExpected(104 /* WhileKeyword */); parseExpected(17 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); @@ -10876,8 +12028,8 @@ var ts; parseExpected(86 /* ForKeyword */); parseExpected(17 /* OpenParenToken */); var initializer = undefined; - if (token !== 23 /* SemicolonToken */) { - if (token === 102 /* VarKeyword */ || token === 108 /* LetKeyword */ || token === 74 /* ConstKeyword */) { + if (token() !== 23 /* SemicolonToken */) { + if (token() === 102 /* VarKeyword */ || token() === 108 /* LetKeyword */ || token() === 74 /* ConstKeyword */) { initializer = parseVariableDeclarationList(/*inForStatementInitializer*/ true); } else { @@ -10886,28 +12038,28 @@ var ts; } var forOrForInOrForOfStatement; if (parseOptional(90 /* InKeyword */)) { - var forInStatement = createNode(203 /* ForInStatement */, pos); + var forInStatement = createNode(207 /* ForInStatement */, pos); forInStatement.initializer = initializer; forInStatement.expression = allowInAnd(parseExpression); parseExpected(18 /* CloseParenToken */); forOrForInOrForOfStatement = forInStatement; } - else if (parseOptional(135 /* OfKeyword */)) { - var forOfStatement = createNode(204 /* ForOfStatement */, pos); + else if (parseOptional(138 /* OfKeyword */)) { + var forOfStatement = createNode(208 /* ForOfStatement */, pos); forOfStatement.initializer = initializer; forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); parseExpected(18 /* CloseParenToken */); forOrForInOrForOfStatement = forOfStatement; } else { - var forStatement = createNode(202 /* ForStatement */, pos); + var forStatement = createNode(206 /* ForStatement */, pos); forStatement.initializer = initializer; parseExpected(23 /* SemicolonToken */); - if (token !== 23 /* SemicolonToken */ && token !== 18 /* CloseParenToken */) { + if (token() !== 23 /* SemicolonToken */ && token() !== 18 /* CloseParenToken */) { forStatement.condition = allowInAnd(parseExpression); } parseExpected(23 /* SemicolonToken */); - if (token !== 18 /* CloseParenToken */) { + if (token() !== 18 /* CloseParenToken */) { forStatement.incrementor = allowInAnd(parseExpression); } parseExpected(18 /* CloseParenToken */); @@ -10918,7 +12070,7 @@ var ts; } function parseBreakOrContinueStatement(kind) { var node = createNode(kind); - parseExpected(kind === 206 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */); + parseExpected(kind === 210 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */); if (!canParseSemicolon()) { node.label = parseIdentifier(); } @@ -10926,7 +12078,7 @@ var ts; return finishNode(node); } function parseReturnStatement() { - var node = createNode(207 /* ReturnStatement */); + var node = createNode(211 /* ReturnStatement */); parseExpected(94 /* ReturnKeyword */); if (!canParseSemicolon()) { node.expression = allowInAnd(parseExpression); @@ -10935,7 +12087,7 @@ var ts; return finishNode(node); } function parseWithStatement() { - var node = createNode(208 /* WithStatement */); + var node = createNode(212 /* WithStatement */); parseExpected(105 /* WithKeyword */); parseExpected(17 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); @@ -10944,7 +12096,7 @@ var ts; return finishNode(node); } function parseCaseClause() { - var node = createNode(244 /* CaseClause */); + var node = createNode(249 /* CaseClause */); parseExpected(71 /* CaseKeyword */); node.expression = allowInAnd(parseExpression); parseExpected(54 /* ColonToken */); @@ -10952,22 +12104,22 @@ var ts; return finishNode(node); } function parseDefaultClause() { - var node = createNode(245 /* DefaultClause */); + var node = createNode(250 /* DefaultClause */); parseExpected(77 /* DefaultKeyword */); parseExpected(54 /* ColonToken */); node.statements = parseList(3 /* SwitchClauseStatements */, parseStatement); return finishNode(node); } function parseCaseOrDefaultClause() { - return token === 71 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); + return token() === 71 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); } function parseSwitchStatement() { - var node = createNode(209 /* SwitchStatement */); + var node = createNode(213 /* SwitchStatement */); parseExpected(96 /* SwitchKeyword */); parseExpected(17 /* OpenParenToken */); node.expression = allowInAnd(parseExpression); parseExpected(18 /* CloseParenToken */); - var caseBlock = createNode(223 /* CaseBlock */, scanner.getStartPos()); + var caseBlock = createNode(227 /* CaseBlock */, scanner.getStartPos()); parseExpected(15 /* OpenBraceToken */); caseBlock.clauses = parseList(2 /* SwitchClauses */, parseCaseOrDefaultClause); parseExpected(16 /* CloseBraceToken */); @@ -10982,7 +12134,7 @@ var ts; // directly as that might consume an expression on the following line. // We just return 'undefined' in that case. The actual error will be reported in the // grammar walker. - var node = createNode(211 /* ThrowStatement */); + var node = createNode(215 /* ThrowStatement */); parseExpected(98 /* ThrowKeyword */); node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); parseSemicolon(); @@ -10990,20 +12142,20 @@ var ts; } // TODO: Review for error recovery function parseTryStatement() { - var node = createNode(212 /* TryStatement */); + var node = createNode(216 /* TryStatement */); parseExpected(100 /* TryKeyword */); node.tryBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); - node.catchClause = token === 72 /* CatchKeyword */ ? parseCatchClause() : undefined; + node.catchClause = token() === 72 /* CatchKeyword */ ? parseCatchClause() : undefined; // If we don't have a catch clause, then we must have a finally clause. Try to parse // one out no matter what. - if (!node.catchClause || token === 85 /* FinallyKeyword */) { + if (!node.catchClause || token() === 85 /* FinallyKeyword */) { parseExpected(85 /* FinallyKeyword */); node.finallyBlock = parseBlock(/*ignoreMissingOpenBrace*/ false); } return finishNode(node); } function parseCatchClause() { - var result = createNode(247 /* CatchClause */); + var result = createNode(252 /* CatchClause */); parseExpected(72 /* CatchKeyword */); if (parseExpected(17 /* OpenParenToken */)) { result.variableDeclaration = parseVariableDeclaration(); @@ -11013,7 +12165,7 @@ var ts; return finishNode(result); } function parseDebuggerStatement() { - var node = createNode(213 /* DebuggerStatement */); + var node = createNode(217 /* DebuggerStatement */); parseExpected(76 /* DebuggerKeyword */); parseSemicolon(); return finishNode(node); @@ -11025,13 +12177,13 @@ var ts; var fullStart = scanner.getStartPos(); var expression = allowInAnd(parseExpression); if (expression.kind === 69 /* Identifier */ && parseOptional(54 /* ColonToken */)) { - var labeledStatement = createNode(210 /* LabeledStatement */, fullStart); + var labeledStatement = createNode(214 /* LabeledStatement */, fullStart); labeledStatement.label = expression; labeledStatement.statement = parseStatement(); return addJSDocComment(finishNode(labeledStatement)); } else { - var expressionStatement = createNode(198 /* ExpressionStatement */, fullStart); + var expressionStatement = createNode(202 /* ExpressionStatement */, fullStart); expressionStatement.expression = expression; parseSemicolon(); return addJSDocComment(finishNode(expressionStatement)); @@ -11039,19 +12191,19 @@ var ts; } function nextTokenIsIdentifierOrKeywordOnSameLine() { nextToken(); - return ts.tokenIsIdentifierOrKeyword(token) && !scanner.hasPrecedingLineBreak(); + return ts.tokenIsIdentifierOrKeyword(token()) && !scanner.hasPrecedingLineBreak(); } function nextTokenIsFunctionKeywordOnSameLine() { nextToken(); - return token === 87 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak(); + return token() === 87 /* FunctionKeyword */ && !scanner.hasPrecedingLineBreak(); } function nextTokenIsIdentifierOrKeywordOrNumberOnSameLine() { nextToken(); - return (ts.tokenIsIdentifierOrKeyword(token) || token === 8 /* NumericLiteral */) && !scanner.hasPrecedingLineBreak(); + return (ts.tokenIsIdentifierOrKeyword(token()) || token() === 8 /* NumericLiteral */) && !scanner.hasPrecedingLineBreak(); } function isDeclaration() { while (true) { - switch (token) { + switch (token()) { case 102 /* VarKeyword */: case 108 /* LetKeyword */: case 74 /* ConstKeyword */: @@ -11081,7 +12233,7 @@ var ts; // // could be legal, it would add complexity for very little gain. case 107 /* InterfaceKeyword */: - case 132 /* TypeKeyword */: + case 134 /* TypeKeyword */: return nextTokenIsIdentifierOnSameLine(); case 125 /* ModuleKeyword */: case 126 /* NamespaceKeyword */: @@ -11092,22 +12244,25 @@ var ts; case 110 /* PrivateKeyword */: case 111 /* ProtectedKeyword */: case 112 /* PublicKeyword */: + case 128 /* ReadonlyKeyword */: nextToken(); // ASI takes effect for this modifier. if (scanner.hasPrecedingLineBreak()) { return false; } continue; - case 134 /* GlobalKeyword */: - return nextToken() === 15 /* OpenBraceToken */; + case 137 /* GlobalKeyword */: + nextToken(); + return token() === 15 /* OpenBraceToken */ || token() === 69 /* Identifier */ || token() === 82 /* ExportKeyword */; case 89 /* ImportKeyword */: nextToken(); - return token === 9 /* StringLiteral */ || token === 37 /* AsteriskToken */ || - token === 15 /* OpenBraceToken */ || ts.tokenIsIdentifierOrKeyword(token); + return token() === 9 /* StringLiteral */ || token() === 37 /* AsteriskToken */ || + token() === 15 /* OpenBraceToken */ || ts.tokenIsIdentifierOrKeyword(token()); case 82 /* ExportKeyword */: nextToken(); - if (token === 56 /* EqualsToken */ || token === 37 /* AsteriskToken */ || - token === 15 /* OpenBraceToken */ || token === 77 /* DefaultKeyword */) { + if (token() === 56 /* EqualsToken */ || token() === 37 /* AsteriskToken */ || + token() === 15 /* OpenBraceToken */ || token() === 77 /* DefaultKeyword */ || + token() === 116 /* AsKeyword */) { return true; } continue; @@ -11123,7 +12278,7 @@ var ts; return lookAhead(isDeclaration); } function isStartOfStatement() { - switch (token) { + switch (token()) { case 55 /* AtToken */: case 23 /* SemicolonToken */: case 15 /* OpenBraceToken */: @@ -11158,14 +12313,15 @@ var ts; case 107 /* InterfaceKeyword */: case 125 /* ModuleKeyword */: case 126 /* NamespaceKeyword */: - case 132 /* TypeKeyword */: - case 134 /* GlobalKeyword */: + case 134 /* TypeKeyword */: + case 137 /* GlobalKeyword */: // When these don't start a declaration, they're an identifier in an expression statement return true; case 112 /* PublicKeyword */: case 110 /* PrivateKeyword */: case 111 /* ProtectedKeyword */: case 113 /* StaticKeyword */: + case 128 /* ReadonlyKeyword */: // When these don't start a declaration, they may be the start of a class member if an identifier // immediately follows. Otherwise they're an identifier in an expression statement. return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); @@ -11175,7 +12331,7 @@ var ts; } function nextTokenIsIdentifierOrStartOfDestructuring() { nextToken(); - return isIdentifier() || token === 15 /* OpenBraceToken */ || token === 19 /* OpenBracketToken */; + return isIdentifier() || token() === 15 /* OpenBraceToken */ || token() === 19 /* OpenBracketToken */; } function isLetDeclaration() { // In ES6 'let' always starts a lexical declaration if followed by an identifier or { @@ -11183,7 +12339,7 @@ var ts; return lookAhead(nextTokenIsIdentifierOrStartOfDestructuring); } function parseStatement() { - switch (token) { + switch (token()) { case 23 /* SemicolonToken */: return parseEmptyStatement(); case 15 /* OpenBraceToken */: @@ -11208,9 +12364,9 @@ var ts; case 86 /* ForKeyword */: return parseForOrForInOrForOfStatement(); case 75 /* ContinueKeyword */: - return parseBreakOrContinueStatement(205 /* ContinueStatement */); + return parseBreakOrContinueStatement(209 /* ContinueStatement */); case 70 /* BreakKeyword */: - return parseBreakOrContinueStatement(206 /* BreakStatement */); + return parseBreakOrContinueStatement(210 /* BreakStatement */); case 94 /* ReturnKeyword */: return parseReturnStatement(); case 105 /* WithKeyword */: @@ -11230,7 +12386,7 @@ var ts; return parseDeclaration(); case 118 /* AsyncKeyword */: case 107 /* InterfaceKeyword */: - case 132 /* TypeKeyword */: + case 134 /* TypeKeyword */: case 125 /* ModuleKeyword */: case 126 /* NamespaceKeyword */: case 122 /* DeclareKeyword */: @@ -11243,7 +12399,8 @@ var ts; case 112 /* PublicKeyword */: case 115 /* AbstractKeyword */: case 113 /* StaticKeyword */: - case 134 /* GlobalKeyword */: + case 128 /* ReadonlyKeyword */: + case 137 /* GlobalKeyword */: if (isStartOfDeclaration()) { return parseDeclaration(); } @@ -11255,7 +12412,7 @@ var ts; var fullStart = getNodePos(); var decorators = parseDecorators(); var modifiers = parseModifiers(); - switch (token) { + switch (token()) { case 102 /* VarKeyword */: case 108 /* LetKeyword */: case 74 /* ConstKeyword */: @@ -11266,11 +12423,11 @@ var ts; return parseClassDeclaration(fullStart, decorators, modifiers); case 107 /* InterfaceKeyword */: return parseInterfaceDeclaration(fullStart, decorators, modifiers); - case 132 /* TypeKeyword */: + case 134 /* TypeKeyword */: return parseTypeAliasDeclaration(fullStart, decorators, modifiers); case 81 /* EnumKeyword */: return parseEnumDeclaration(fullStart, decorators, modifiers); - case 134 /* GlobalKeyword */: + case 137 /* GlobalKeyword */: case 125 /* ModuleKeyword */: case 126 /* NamespaceKeyword */: return parseModuleDeclaration(fullStart, decorators, modifiers); @@ -11278,14 +12435,20 @@ var ts; return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers); case 82 /* ExportKeyword */: nextToken(); - return token === 77 /* DefaultKeyword */ || token === 56 /* EqualsToken */ ? - parseExportAssignment(fullStart, decorators, modifiers) : - parseExportDeclaration(fullStart, decorators, modifiers); + switch (token()) { + case 77 /* DefaultKeyword */: + case 56 /* EqualsToken */: + return parseExportAssignment(fullStart, decorators, modifiers); + case 116 /* AsKeyword */: + return parseNamespaceExportDeclaration(fullStart, decorators, modifiers); + default: + return parseExportDeclaration(fullStart, decorators, modifiers); + } default: if (decorators || modifiers) { // We reached this point because we encountered decorators and/or modifiers and assumed a declaration // would follow. For recovery and error reporting purposes, return an incomplete declaration. - var node = createMissingNode(234 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); + var node = createMissingNode(239 /* MissingDeclaration */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.Declaration_expected); node.pos = fullStart; node.decorators = decorators; setModifiers(node, modifiers); @@ -11295,10 +12458,10 @@ var ts; } function nextTokenIsIdentifierOrStringLiteralOnSameLine() { nextToken(); - return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token === 9 /* StringLiteral */); + return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token() === 9 /* StringLiteral */); } function parseFunctionBlockOrSemicolon(isGenerator, isAsync, diagnosticMessage) { - if (token !== 15 /* OpenBraceToken */ && canParseSemicolon()) { + if (token() !== 15 /* OpenBraceToken */ && canParseSemicolon()) { parseSemicolon(); return; } @@ -11306,20 +12469,20 @@ var ts; } // DECLARATIONS function parseArrayBindingElement() { - if (token === 24 /* CommaToken */) { - return createNode(190 /* OmittedExpression */); + if (token() === 24 /* CommaToken */) { + return createNode(193 /* OmittedExpression */); } - var node = createNode(166 /* BindingElement */); + var node = createNode(169 /* BindingElement */); node.dotDotDotToken = parseOptionalToken(22 /* DotDotDotToken */); node.name = parseIdentifierOrPattern(); node.initializer = parseBindingElementInitializer(/*inParameter*/ false); return finishNode(node); } function parseObjectBindingElement() { - var node = createNode(166 /* BindingElement */); + var node = createNode(169 /* BindingElement */); var tokenIsIdentifier = isIdentifier(); var propertyName = parsePropertyName(); - if (tokenIsIdentifier && token !== 54 /* ColonToken */) { + if (tokenIsIdentifier && token() !== 54 /* ColonToken */) { node.name = propertyName; } else { @@ -11331,50 +12494,50 @@ var ts; return finishNode(node); } function parseObjectBindingPattern() { - var node = createNode(164 /* ObjectBindingPattern */); + var node = createNode(167 /* ObjectBindingPattern */); parseExpected(15 /* OpenBraceToken */); node.elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); parseExpected(16 /* CloseBraceToken */); return finishNode(node); } function parseArrayBindingPattern() { - var node = createNode(165 /* ArrayBindingPattern */); + var node = createNode(168 /* ArrayBindingPattern */); parseExpected(19 /* OpenBracketToken */); node.elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); parseExpected(20 /* CloseBracketToken */); return finishNode(node); } function isIdentifierOrPattern() { - return token === 15 /* OpenBraceToken */ || token === 19 /* OpenBracketToken */ || isIdentifier(); + return token() === 15 /* OpenBraceToken */ || token() === 19 /* OpenBracketToken */ || isIdentifier(); } function parseIdentifierOrPattern() { - if (token === 19 /* OpenBracketToken */) { + if (token() === 19 /* OpenBracketToken */) { return parseArrayBindingPattern(); } - if (token === 15 /* OpenBraceToken */) { + if (token() === 15 /* OpenBraceToken */) { return parseObjectBindingPattern(); } return parseIdentifier(); } function parseVariableDeclaration() { - var node = createNode(214 /* VariableDeclaration */); + var node = createNode(218 /* VariableDeclaration */); node.name = parseIdentifierOrPattern(); node.type = parseTypeAnnotation(); - if (!isInOrOfKeyword(token)) { + if (!isInOrOfKeyword(token())) { node.initializer = parseInitializer(/*inParameter*/ false); } return finishNode(node); } function parseVariableDeclarationList(inForStatementInitializer) { - var node = createNode(215 /* VariableDeclarationList */); - switch (token) { + var node = createNode(219 /* VariableDeclarationList */); + switch (token()) { case 102 /* VarKeyword */: break; case 108 /* LetKeyword */: - node.flags |= 8192 /* Let */; + node.flags |= 1024 /* Let */; break; case 74 /* ConstKeyword */: - node.flags |= 16384 /* Const */; + node.flags |= 2048 /* Const */; break; default: ts.Debug.fail(); @@ -11389,7 +12552,7 @@ var ts; // So we need to look ahead to determine if 'of' should be treated as a keyword in // this context. // The checker will then give an error that there is an empty declaration list. - if (token === 135 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { + if (token() === 138 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { node.declarations = createMissingList(); } else { @@ -11404,7 +12567,7 @@ var ts; return nextTokenIsIdentifier() && nextToken() === 18 /* CloseParenToken */; } function parseVariableStatement(fullStart, decorators, modifiers) { - var node = createNode(196 /* VariableStatement */, fullStart); + var node = createNode(200 /* VariableStatement */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); node.declarationList = parseVariableDeclarationList(/*inForStatementInitializer*/ false); @@ -11412,7 +12575,7 @@ var ts; return addJSDocComment(finishNode(node)); } function parseFunctionDeclaration(fullStart, decorators, modifiers) { - var node = createNode(216 /* FunctionDeclaration */, fullStart); + var node = createNode(220 /* FunctionDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(87 /* FunctionKeyword */); @@ -11425,7 +12588,7 @@ var ts; return addJSDocComment(finishNode(node)); } function parseConstructorDeclaration(pos, decorators, modifiers) { - var node = createNode(145 /* Constructor */, pos); + var node = createNode(148 /* Constructor */, pos); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(121 /* ConstructorKeyword */); @@ -11434,7 +12597,7 @@ var ts; return addJSDocComment(finishNode(node)); } function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { - var method = createNode(144 /* MethodDeclaration */, fullStart); + var method = createNode(147 /* MethodDeclaration */, fullStart); method.decorators = decorators; setModifiers(method, modifiers); method.asteriskToken = asteriskToken; @@ -11447,7 +12610,7 @@ var ts; return addJSDocComment(finishNode(method)); } function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { - var property = createNode(142 /* PropertyDeclaration */, fullStart); + var property = createNode(145 /* PropertyDeclaration */, fullStart); property.decorators = decorators; setModifiers(property, modifiers); property.name = name; @@ -11458,13 +12621,13 @@ var ts; // off. The grammar would look something like this: // // MemberVariableDeclaration[Yield]: - // AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initialiser_opt[In]; - // AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initialiser_opt[In, ?Yield]; + // AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initializer_opt[In]; + // AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initializer_opt[In, ?Yield]; // // The checker may still error in the static case to explicitly disallow the yield expression. - property.initializer = modifiers && modifiers.flags & 64 /* Static */ + property.initializer = modifiers && modifiers.flags & 32 /* Static */ ? allowInAnd(parseNonParameterInitializer) - : doOutsideOfContext(2 /* Yield */ | 1 /* DisallowIn */, parseNonParameterInitializer); + : doOutsideOfContext(8388608 /* YieldContext */ | 4194304 /* DisallowInContext */, parseNonParameterInitializer); parseSemicolon(); return finishNode(property); } @@ -11474,7 +12637,7 @@ var ts; // Note: this is not legal as per the grammar. But we allow it in the parser and // report an error in the grammar checker. var questionToken = parseOptionalToken(53 /* QuestionToken */); - if (asteriskToken || token === 17 /* OpenParenToken */ || token === 25 /* LessThanToken */) { + if (asteriskToken || token() === 17 /* OpenParenToken */ || token() === 25 /* LessThanToken */) { return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); } else { @@ -11499,6 +12662,7 @@ var ts; case 110 /* PrivateKeyword */: case 111 /* ProtectedKeyword */: case 113 /* StaticKeyword */: + case 128 /* ReadonlyKeyword */: return true; default: return false; @@ -11506,12 +12670,12 @@ var ts; } function isClassMemberStart() { var idToken; - if (token === 55 /* AtToken */) { + if (token() === 55 /* AtToken */) { return true; } // Eat up all modifiers, but hold on to the last one in case it is actually an identifier. - while (ts.isModifierKind(token)) { - idToken = token; + while (ts.isModifierKind(token())) { + idToken = token(); // If the idToken is a class modifier (protected, private, public, and static), it is // certain that we are starting to parse class member. This allows better error recovery // Example: @@ -11523,28 +12687,28 @@ var ts; } nextToken(); } - if (token === 37 /* AsteriskToken */) { + if (token() === 37 /* AsteriskToken */) { return true; } // Try to get the first property-like token following all modifiers. // This can either be an identifier or the 'get' or 'set' keywords. if (isLiteralPropertyName()) { - idToken = token; + idToken = token(); nextToken(); } // Index signatures and computed properties are class members; we can parse. - if (token === 19 /* OpenBracketToken */) { + if (token() === 19 /* OpenBracketToken */) { return true; } // If we were able to get any potential identifier... if (idToken !== undefined) { // If we have a non-keyword identifier, or if we have an accessor, then it's safe to parse. - if (!ts.isKeyword(idToken) || idToken === 129 /* SetKeyword */ || idToken === 123 /* GetKeyword */) { + if (!ts.isKeyword(idToken) || idToken === 131 /* SetKeyword */ || idToken === 123 /* GetKeyword */) { return true; } // If it *is* a keyword, but not an accessor, check a little farther along // to see if it should actually be parsed as a class member. - switch (token) { + switch (token()) { case 17 /* OpenParenToken */: // Method declaration case 25 /* LessThanToken */: // Generic Method declaration case 54 /* ColonToken */: // Type Annotation for declaration @@ -11573,7 +12737,7 @@ var ts; decorators = []; decorators.pos = decoratorStart; } - var decorator = createNode(140 /* Decorator */, decoratorStart); + var decorator = createNode(143 /* Decorator */, decoratorStart); decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); decorators.push(finishNode(decorator)); } @@ -11594,10 +12758,10 @@ var ts; var modifiers; while (true) { var modifierStart = scanner.getStartPos(); - var modifierKind = token; - if (token === 74 /* ConstKeyword */ && permitInvalidConstAsModifier) { + var modifierKind = token(); + if (token() === 74 /* ConstKeyword */ && permitInvalidConstAsModifier) { // We need to ensure that any subsequent modifiers appear on the same line - // so that when 'const' is a standalone declaration, we don't issue an error. + // so that when 'const' is a standalone declaration, we don't issue an error. if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) { break; } @@ -11623,9 +12787,9 @@ var ts; function parseModifiersForArrowFunction() { var flags = 0; var modifiers; - if (token === 118 /* AsyncKeyword */) { + if (token() === 118 /* AsyncKeyword */) { var modifierStart = scanner.getStartPos(); - var modifierKind = token; + var modifierKind = token(); nextToken(); modifiers = []; modifiers.pos = modifierStart; @@ -11637,8 +12801,8 @@ var ts; return modifiers; } function parseClassElement() { - if (token === 23 /* SemicolonToken */) { - var result = createNode(194 /* SemicolonClassElement */); + if (token() === 23 /* SemicolonToken */) { + var result = createNode(198 /* SemicolonClassElement */); nextToken(); return finishNode(result); } @@ -11649,7 +12813,7 @@ var ts; if (accessor) { return accessor; } - if (token === 121 /* ConstructorKeyword */) { + if (token() === 121 /* ConstructorKeyword */) { return parseConstructorDeclaration(fullStart, decorators, modifiers); } if (isIndexSignature()) { @@ -11657,11 +12821,11 @@ var ts; } // It is very important that we check this *after* checking indexers because // the [ token can start an index signature or a computed property name - if (ts.tokenIsIdentifierOrKeyword(token) || - token === 9 /* StringLiteral */ || - token === 8 /* NumericLiteral */ || - token === 37 /* AsteriskToken */ || - token === 19 /* OpenBracketToken */) { + if (ts.tokenIsIdentifierOrKeyword(token()) || + token() === 9 /* StringLiteral */ || + token() === 8 /* NumericLiteral */ || + token() === 37 /* AsteriskToken */ || + token() === 19 /* OpenBracketToken */) { return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers); } if (decorators || modifiers) { @@ -11676,10 +12840,10 @@ var ts; return parseClassDeclarationOrExpression( /*fullStart*/ scanner.getStartPos(), /*decorators*/ undefined, - /*modifiers*/ undefined, 189 /* ClassExpression */); + /*modifiers*/ undefined, 192 /* ClassExpression */); } function parseClassDeclaration(fullStart, decorators, modifiers) { - return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 217 /* ClassDeclaration */); + return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 221 /* ClassDeclaration */); } function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { var node = createNode(kind, fullStart); @@ -11711,7 +12875,7 @@ var ts; : undefined; } function isImplementsClause() { - return token === 106 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); + return token() === 106 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); } function parseHeritageClauses(isClassHeritageClause) { // ClassTail[Yield,Await] : (Modified) See 14.5 @@ -11722,9 +12886,9 @@ var ts; return undefined; } function parseHeritageClause() { - if (token === 83 /* ExtendsKeyword */ || token === 106 /* ImplementsKeyword */) { - var node = createNode(246 /* HeritageClause */); - node.token = token; + if (token() === 83 /* ExtendsKeyword */ || token() === 106 /* ImplementsKeyword */) { + var node = createNode(251 /* HeritageClause */); + node.token = token(); nextToken(); node.types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); return finishNode(node); @@ -11732,21 +12896,21 @@ var ts; return undefined; } function parseExpressionWithTypeArguments() { - var node = createNode(191 /* ExpressionWithTypeArguments */); + var node = createNode(194 /* ExpressionWithTypeArguments */); node.expression = parseLeftHandSideExpressionOrHigher(); - if (token === 25 /* LessThanToken */) { + if (token() === 25 /* LessThanToken */) { node.typeArguments = parseBracketedList(18 /* TypeArguments */, parseType, 25 /* LessThanToken */, 27 /* GreaterThanToken */); } return finishNode(node); } function isHeritageClause() { - return token === 83 /* ExtendsKeyword */ || token === 106 /* ImplementsKeyword */; + return token() === 83 /* ExtendsKeyword */ || token() === 106 /* ImplementsKeyword */; } function parseClassMembers() { return parseList(5 /* ClassMembers */, parseClassElement); } function parseInterfaceDeclaration(fullStart, decorators, modifiers) { - var node = createNode(218 /* InterfaceDeclaration */, fullStart); + var node = createNode(222 /* InterfaceDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(107 /* InterfaceKeyword */); @@ -11757,10 +12921,10 @@ var ts; return finishNode(node); } function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { - var node = createNode(219 /* TypeAliasDeclaration */, fullStart); + var node = createNode(223 /* TypeAliasDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); - parseExpected(132 /* TypeKeyword */); + parseExpected(134 /* TypeKeyword */); node.name = parseIdentifier(); node.typeParameters = parseTypeParameters(); parseExpected(56 /* EqualsToken */); @@ -11773,13 +12937,13 @@ var ts; // ConstantEnumMemberSection, which starts at the beginning of an enum declaration // or any time an integer literal initializer is encountered. function parseEnumMember() { - var node = createNode(250 /* EnumMember */, scanner.getStartPos()); + var node = createNode(255 /* EnumMember */, scanner.getStartPos()); node.name = parsePropertyName(); node.initializer = allowInAnd(parseNonParameterInitializer); return finishNode(node); } function parseEnumDeclaration(fullStart, decorators, modifiers) { - var node = createNode(220 /* EnumDeclaration */, fullStart); + var node = createNode(224 /* EnumDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); parseExpected(81 /* EnumKeyword */); @@ -11794,7 +12958,7 @@ var ts; return finishNode(node); } function parseModuleBlock() { - var node = createNode(222 /* ModuleBlock */, scanner.getStartPos()); + var node = createNode(226 /* ModuleBlock */, scanner.getStartPos()); if (parseExpected(15 /* OpenBraceToken */)) { node.statements = parseList(1 /* BlockStatements */, parseStatement); parseExpected(16 /* CloseBraceToken */); @@ -11805,53 +12969,58 @@ var ts; return finishNode(node); } function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { - var node = createNode(221 /* ModuleDeclaration */, fullStart); + var node = createNode(225 /* ModuleDeclaration */, fullStart); // If we are parsing a dotted namespace name, we want to // propagate the 'Namespace' flag across the names if set. - var namespaceFlag = flags & 65536 /* Namespace */; + var namespaceFlag = flags & 4096 /* Namespace */; node.decorators = decorators; setModifiers(node, modifiers); node.flags |= flags; node.name = parseIdentifier(); node.body = parseOptional(21 /* DotToken */) - ? parseModuleOrNamespaceDeclaration(getNodePos(), /*decorators*/ undefined, /*modifiers*/ undefined, 2 /* Export */ | namespaceFlag) + ? parseModuleOrNamespaceDeclaration(getNodePos(), /*decorators*/ undefined, /*modifiers*/ undefined, 1 /* Export */ | namespaceFlag) : parseModuleBlock(); return finishNode(node); } function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { - var node = createNode(221 /* ModuleDeclaration */, fullStart); + var node = createNode(225 /* ModuleDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); - if (token === 134 /* GlobalKeyword */) { - // parse 'global' as name of global scope augmentation + if (token() === 137 /* GlobalKeyword */) { + // parse 'global' as name of global scope augmentation node.name = parseIdentifier(); - node.flags |= 2097152 /* GlobalAugmentation */; + node.flags |= 131072 /* GlobalAugmentation */; } else { node.name = parseLiteralNode(/*internName*/ true); } - node.body = parseModuleBlock(); + if (token() === 15 /* OpenBraceToken */) { + node.body = parseModuleBlock(); + } + else { + parseSemicolon(); + } return finishNode(node); } function parseModuleDeclaration(fullStart, decorators, modifiers) { var flags = modifiers ? modifiers.flags : 0; - if (token === 134 /* GlobalKeyword */) { + if (token() === 137 /* GlobalKeyword */) { // global augmentation return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); } else if (parseOptional(126 /* NamespaceKeyword */)) { - flags |= 65536 /* Namespace */; + flags |= 4096 /* Namespace */; } else { parseExpected(125 /* ModuleKeyword */); - if (token === 9 /* StringLiteral */) { + if (token() === 9 /* StringLiteral */) { return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); } } return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags); } function isExternalModuleReference() { - return token === 127 /* RequireKeyword */ && + return token() === 129 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen); } function nextTokenIsOpenParen() { @@ -11860,17 +13029,27 @@ var ts; function nextTokenIsSlash() { return nextToken() === 39 /* SlashToken */; } + function parseNamespaceExportDeclaration(fullStart, decorators, modifiers) { + var exportDeclaration = createNode(228 /* NamespaceExportDeclaration */, fullStart); + exportDeclaration.decorators = decorators; + exportDeclaration.modifiers = modifiers; + parseExpected(116 /* AsKeyword */); + parseExpected(126 /* NamespaceKeyword */); + exportDeclaration.name = parseIdentifier(); + parseExpected(23 /* SemicolonToken */); + return finishNode(exportDeclaration); + } function parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers) { parseExpected(89 /* ImportKeyword */); var afterImportPos = scanner.getStartPos(); var identifier; if (isIdentifier()) { identifier = parseIdentifier(); - if (token !== 24 /* CommaToken */ && token !== 133 /* FromKeyword */) { + if (token() !== 24 /* CommaToken */ && token() !== 136 /* FromKeyword */) { // ImportEquals declaration of type: // import x = require("mod"); or // import x = M.x; - var importEqualsDeclaration = createNode(224 /* ImportEqualsDeclaration */, fullStart); + var importEqualsDeclaration = createNode(229 /* ImportEqualsDeclaration */, fullStart); importEqualsDeclaration.decorators = decorators; setModifiers(importEqualsDeclaration, modifiers); importEqualsDeclaration.name = identifier; @@ -11881,17 +13060,17 @@ var ts; } } // Import statement - var importDeclaration = createNode(225 /* ImportDeclaration */, fullStart); + var importDeclaration = createNode(230 /* ImportDeclaration */, fullStart); importDeclaration.decorators = decorators; setModifiers(importDeclaration, modifiers); // ImportDeclaration: // import ImportClause from ModuleSpecifier ; // import ModuleSpecifier; if (identifier || - token === 37 /* AsteriskToken */ || - token === 15 /* OpenBraceToken */) { + token() === 37 /* AsteriskToken */ || + token() === 15 /* OpenBraceToken */) { importDeclaration.importClause = parseImportClause(identifier, afterImportPos); - parseExpected(133 /* FromKeyword */); + parseExpected(136 /* FromKeyword */); } importDeclaration.moduleSpecifier = parseModuleSpecifier(); parseSemicolon(); @@ -11904,7 +13083,7 @@ var ts; // NamedImports // ImportedDefaultBinding, NameSpaceImport // ImportedDefaultBinding, NamedImports - var importClause = createNode(226 /* ImportClause */, fullStart); + var importClause = createNode(231 /* ImportClause */, fullStart); if (identifier) { // ImportedDefaultBinding: // ImportedBinding @@ -11914,7 +13093,7 @@ var ts; // parse namespace or named imports if (!importClause.name || parseOptional(24 /* CommaToken */)) { - importClause.namedBindings = token === 37 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(228 /* NamedImports */); + importClause.namedBindings = token() === 37 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(233 /* NamedImports */); } return finishNode(importClause); } @@ -11924,15 +13103,15 @@ var ts; : parseEntityName(/*allowReservedWords*/ false); } function parseExternalModuleReference() { - var node = createNode(235 /* ExternalModuleReference */); - parseExpected(127 /* RequireKeyword */); + var node = createNode(240 /* ExternalModuleReference */); + parseExpected(129 /* RequireKeyword */); parseExpected(17 /* OpenParenToken */); node.expression = parseModuleSpecifier(); parseExpected(18 /* CloseParenToken */); return finishNode(node); } function parseModuleSpecifier() { - if (token === 9 /* StringLiteral */) { + if (token() === 9 /* StringLiteral */) { var result = parseLiteralNode(); internIdentifier(result.text); return result; @@ -11947,7 +13126,7 @@ var ts; function parseNamespaceImport() { // NameSpaceImport: // * as ImportedBinding - var namespaceImport = createNode(227 /* NamespaceImport */); + var namespaceImport = createNode(232 /* NamespaceImport */); parseExpected(37 /* AsteriskToken */); parseExpected(116 /* AsKeyword */); namespaceImport.name = parseIdentifier(); @@ -11962,31 +13141,31 @@ var ts; // ImportsList: // ImportSpecifier // ImportsList, ImportSpecifier - node.elements = parseBracketedList(21 /* ImportOrExportSpecifiers */, kind === 228 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 15 /* OpenBraceToken */, 16 /* CloseBraceToken */); + node.elements = parseBracketedList(21 /* ImportOrExportSpecifiers */, kind === 233 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 15 /* OpenBraceToken */, 16 /* CloseBraceToken */); return finishNode(node); } function parseExportSpecifier() { - return parseImportOrExportSpecifier(233 /* ExportSpecifier */); + return parseImportOrExportSpecifier(238 /* ExportSpecifier */); } function parseImportSpecifier() { - return parseImportOrExportSpecifier(229 /* ImportSpecifier */); + return parseImportOrExportSpecifier(234 /* ImportSpecifier */); } function parseImportOrExportSpecifier(kind) { var node = createNode(kind); // ImportSpecifier: // BindingIdentifier // IdentifierName as BindingIdentifier - // ExportSpecififer: + // ExportSpecifier: // IdentifierName // IdentifierName as IdentifierName - var checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); + var checkIdentifierIsKeyword = ts.isKeyword(token()) && !isIdentifier(); var checkIdentifierStart = scanner.getTokenPos(); var checkIdentifierEnd = scanner.getTextPos(); var identifierName = parseIdentifierName(); - if (token === 116 /* AsKeyword */) { + if (token() === 116 /* AsKeyword */) { node.propertyName = identifierName; parseExpected(116 /* AsKeyword */); - checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); + checkIdentifierIsKeyword = ts.isKeyword(token()) && !isIdentifier(); checkIdentifierStart = scanner.getTokenPos(); checkIdentifierEnd = scanner.getTextPos(); node.name = parseIdentifierName(); @@ -11994,27 +13173,27 @@ var ts; else { node.name = identifierName; } - if (kind === 229 /* ImportSpecifier */ && checkIdentifierIsKeyword) { + if (kind === 234 /* ImportSpecifier */ && checkIdentifierIsKeyword) { // Report error identifier expected parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); } return finishNode(node); } function parseExportDeclaration(fullStart, decorators, modifiers) { - var node = createNode(231 /* ExportDeclaration */, fullStart); + var node = createNode(236 /* ExportDeclaration */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); if (parseOptional(37 /* AsteriskToken */)) { - parseExpected(133 /* FromKeyword */); + parseExpected(136 /* FromKeyword */); node.moduleSpecifier = parseModuleSpecifier(); } else { - node.exportClause = parseNamedImportsOrExports(232 /* NamedExports */); + node.exportClause = parseNamedImportsOrExports(237 /* NamedExports */); // It is not uncommon to accidentally omit the 'from' keyword. Additionally, in editing scenarios, // the 'from' keyword can be parsed as a named export when the export clause is unterminated (i.e. `export { from "moduleName";`) // If we don't have a 'from' keyword, see if we have a string literal such that ASI won't take effect. - if (token === 133 /* FromKeyword */ || (token === 9 /* StringLiteral */ && !scanner.hasPrecedingLineBreak())) { - parseExpected(133 /* FromKeyword */); + if (token() === 136 /* FromKeyword */ || (token() === 9 /* StringLiteral */ && !scanner.hasPrecedingLineBreak())) { + parseExpected(136 /* FromKeyword */); node.moduleSpecifier = parseModuleSpecifier(); } } @@ -12022,7 +13201,7 @@ var ts; return finishNode(node); } function parseExportAssignment(fullStart, decorators, modifiers) { - var node = createNode(230 /* ExportAssignment */, fullStart); + var node = createNode(235 /* ExportAssignment */, fullStart); node.decorators = decorators; setModifiers(node, modifiers); if (parseOptional(56 /* EqualsToken */)) { @@ -12038,6 +13217,7 @@ var ts; function processReferenceComments(sourceFile) { var triviaScanner = ts.createScanner(sourceFile.languageVersion, /*skipTrivia*/ false, 0 /* Standard */, sourceText); var referencedFiles = []; + var typeReferenceDirectives = []; var amdDependencies = []; var amdModuleName; // Keep scanning all the leading trivia in the file until we get to something that @@ -12061,7 +13241,12 @@ var ts; sourceFile.hasNoDefaultLib = referencePathMatchResult.isNoDefaultLib; var diagnosticMessage = referencePathMatchResult.diagnosticMessage; if (fileReference) { - referencedFiles.push(fileReference); + if (referencePathMatchResult.isTypeReferenceDirective) { + typeReferenceDirectives.push(fileReference); + } + else { + referencedFiles.push(fileReference); + } } if (diagnosticMessage) { parseDiagnostics.push(ts.createFileDiagnostic(sourceFile, range.pos, range.end - range.pos, diagnosticMessage)); @@ -12091,16 +13276,17 @@ var ts; } } sourceFile.referencedFiles = referencedFiles; + sourceFile.typeReferenceDirectives = typeReferenceDirectives; sourceFile.amdDependencies = amdDependencies; sourceFile.moduleName = amdModuleName; } function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) { - return node.flags & 2 /* Export */ - || node.kind === 224 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 235 /* ExternalModuleReference */ - || node.kind === 225 /* ImportDeclaration */ - || node.kind === 230 /* ExportAssignment */ - || node.kind === 231 /* ExportDeclaration */ + return node.flags & 1 /* Export */ + || node.kind === 229 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 240 /* ExternalModuleReference */ + || node.kind === 230 /* ImportDeclaration */ + || node.kind === 235 /* ExportAssignment */ + || node.kind === 236 /* ExportDeclaration */ ? node : undefined; }); @@ -12144,7 +13330,7 @@ var ts; var JSDocParser; (function (JSDocParser) { function isJSDocType() { - switch (token) { + switch (token()) { case 37 /* AsteriskToken */: case 53 /* QuestionToken */: case 17 /* OpenParenToken */: @@ -12157,13 +13343,13 @@ var ts; case 97 /* ThisKeyword */: return true; } - return ts.tokenIsIdentifierOrKeyword(token); + return ts.tokenIsIdentifierOrKeyword(token()); } JSDocParser.isJSDocType = isJSDocType; function parseJSDocTypeExpressionForTests(content, start, length) { initializeState("file.js", content, 2 /* Latest */, /*_syntaxCursor:*/ undefined, 1 /* JS */); scanner.setText(content, start, length); - token = scanner.scan(); + currentToken = scanner.scan(); var jsDocTypeExpression = parseJSDocTypeExpression(); var diagnostics = parseDiagnostics; clearState(); @@ -12173,7 +13359,7 @@ var ts; // Parses out a JSDoc type expression. /* @internal */ function parseJSDocTypeExpression() { - var result = createNode(252 /* JSDocTypeExpression */, scanner.getTokenPos()); + var result = createNode(257 /* JSDocTypeExpression */, scanner.getTokenPos()); parseExpected(15 /* OpenBraceToken */); result.type = parseJSDocTopLevelType(); parseExpected(16 /* CloseBraceToken */); @@ -12183,13 +13369,13 @@ var ts; JSDocParser.parseJSDocTypeExpression = parseJSDocTypeExpression; function parseJSDocTopLevelType() { var type = parseJSDocType(); - if (token === 47 /* BarToken */) { - var unionType = createNode(256 /* JSDocUnionType */, type.pos); + if (token() === 47 /* BarToken */) { + var unionType = createNode(261 /* JSDocUnionType */, type.pos); unionType.types = parseJSDocTypeList(type); type = finishNode(unionType); } - if (token === 56 /* EqualsToken */) { - var optionalType = createNode(263 /* JSDocOptionalType */, type.pos); + if (token() === 56 /* EqualsToken */) { + var optionalType = createNode(268 /* JSDocOptionalType */, type.pos); nextToken(); optionalType.type = type; type = finishNode(optionalType); @@ -12199,21 +13385,21 @@ var ts; function parseJSDocType() { var type = parseBasicTypeExpression(); while (true) { - if (token === 19 /* OpenBracketToken */) { - var arrayType = createNode(255 /* JSDocArrayType */, type.pos); + if (token() === 19 /* OpenBracketToken */) { + var arrayType = createNode(260 /* JSDocArrayType */, type.pos); arrayType.elementType = type; nextToken(); parseExpected(20 /* CloseBracketToken */); type = finishNode(arrayType); } - else if (token === 53 /* QuestionToken */) { - var nullableType = createNode(258 /* JSDocNullableType */, type.pos); + else if (token() === 53 /* QuestionToken */) { + var nullableType = createNode(263 /* JSDocNullableType */, type.pos); nullableType.type = type; nextToken(); type = finishNode(nullableType); } - else if (token === 49 /* ExclamationToken */) { - var nonNullableType = createNode(259 /* JSDocNonNullableType */, type.pos); + else if (token() === 49 /* ExclamationToken */) { + var nonNullableType = createNode(264 /* JSDocNonNullableType */, type.pos); nonNullableType.type = type; nextToken(); type = finishNode(nonNullableType); @@ -12225,7 +13411,7 @@ var ts; return type; } function parseBasicTypeExpression() { - switch (token) { + switch (token()) { case 37 /* AsteriskToken */: return parseJSDocAllType(); case 53 /* QuestionToken */: @@ -12247,51 +13433,58 @@ var ts; case 97 /* ThisKeyword */: return parseJSDocThisType(); case 117 /* AnyKeyword */: - case 130 /* StringKeyword */: - case 128 /* NumberKeyword */: + case 132 /* StringKeyword */: + case 130 /* NumberKeyword */: case 120 /* BooleanKeyword */: - case 131 /* SymbolKeyword */: + case 133 /* SymbolKeyword */: case 103 /* VoidKeyword */: + case 93 /* NullKeyword */: + case 135 /* UndefinedKeyword */: + case 127 /* NeverKeyword */: return parseTokenNode(); + case 9 /* StringLiteral */: + case 8 /* NumericLiteral */: + case 99 /* TrueKeyword */: + case 84 /* FalseKeyword */: + return parseJSDocLiteralType(); } - // TODO (drosen): Parse string literal types in JSDoc as well. return parseJSDocTypeReference(); } function parseJSDocThisType() { - var result = createNode(267 /* JSDocThisType */); + var result = createNode(272 /* JSDocThisType */); nextToken(); parseExpected(54 /* ColonToken */); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocConstructorType() { - var result = createNode(266 /* JSDocConstructorType */); + var result = createNode(271 /* JSDocConstructorType */); nextToken(); parseExpected(54 /* ColonToken */); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocVariadicType() { - var result = createNode(265 /* JSDocVariadicType */); + var result = createNode(270 /* JSDocVariadicType */); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocFunctionType() { - var result = createNode(264 /* JSDocFunctionType */); + var result = createNode(269 /* JSDocFunctionType */); nextToken(); parseExpected(17 /* OpenParenToken */); result.parameters = parseDelimitedList(22 /* JSDocFunctionParameters */, parseJSDocParameter); checkForTrailingComma(result.parameters); parseExpected(18 /* CloseParenToken */); - if (token === 54 /* ColonToken */) { + if (token() === 54 /* ColonToken */) { nextToken(); result.type = parseJSDocType(); } return finishNode(result); } function parseJSDocParameter() { - var parameter = createNode(139 /* Parameter */); + var parameter = createNode(142 /* Parameter */); parameter.type = parseJSDocType(); if (parseOptional(56 /* EqualsToken */)) { parameter.questionToken = createNode(56 /* EqualsToken */); @@ -12299,14 +13492,14 @@ var ts; return finishNode(parameter); } function parseJSDocTypeReference() { - var result = createNode(262 /* JSDocTypeReference */); + var result = createNode(267 /* JSDocTypeReference */); result.name = parseSimplePropertyName(); - if (token === 25 /* LessThanToken */) { + if (token() === 25 /* LessThanToken */) { result.typeArguments = parseTypeArguments(); } else { while (parseOptional(21 /* DotToken */)) { - if (token === 25 /* LessThanToken */) { + if (token() === 25 /* LessThanToken */) { result.typeArguments = parseTypeArguments(); break; } @@ -12334,13 +13527,13 @@ var ts; } } function parseQualifiedName(left) { - var result = createNode(136 /* QualifiedName */, left.pos); + var result = createNode(139 /* QualifiedName */, left.pos); result.left = left; result.right = parseIdentifierName(); return finishNode(result); } function parseJSDocRecordType() { - var result = createNode(260 /* JSDocRecordType */); + var result = createNode(265 /* JSDocRecordType */); nextToken(); result.members = parseDelimitedList(24 /* JSDocRecordMembers */, parseJSDocRecordMember); checkForTrailingComma(result.members); @@ -12348,22 +13541,22 @@ var ts; return finishNode(result); } function parseJSDocRecordMember() { - var result = createNode(261 /* JSDocRecordMember */); + var result = createNode(266 /* JSDocRecordMember */); result.name = parseSimplePropertyName(); - if (token === 54 /* ColonToken */) { + if (token() === 54 /* ColonToken */) { nextToken(); result.type = parseJSDocType(); } return finishNode(result); } function parseJSDocNonNullableType() { - var result = createNode(259 /* JSDocNonNullableType */); + var result = createNode(264 /* JSDocNonNullableType */); nextToken(); result.type = parseJSDocType(); return finishNode(result); } function parseJSDocTupleType() { - var result = createNode(257 /* JSDocTupleType */); + var result = createNode(262 /* JSDocTupleType */); nextToken(); result.types = parseDelimitedList(25 /* JSDocTupleTypes */, parseJSDocType); checkForTrailingComma(result.types); @@ -12377,7 +13570,7 @@ var ts; } } function parseJSDocUnionType() { - var result = createNode(256 /* JSDocUnionType */); + var result = createNode(261 /* JSDocUnionType */); nextToken(); result.types = parseJSDocTypeList(parseJSDocType()); parseExpected(18 /* CloseParenToken */); @@ -12395,10 +13588,15 @@ var ts; return types; } function parseJSDocAllType() { - var result = createNode(253 /* JSDocAllType */); + var result = createNode(258 /* JSDocAllType */); nextToken(); return finishNode(result); } + function parseJSDocLiteralType() { + var result = createNode(282 /* JSDocLiteralType */); + result.literal = parseLiteralTypeNode(); + return finishNode(result); + } function parseJSDocUnknownOrNullableType() { var pos = scanner.getStartPos(); // skip the ? @@ -12412,17 +13610,17 @@ var ts; // Foo // Foo(?= // (?| - if (token === 24 /* CommaToken */ || - token === 16 /* CloseBraceToken */ || - token === 18 /* CloseParenToken */ || - token === 27 /* GreaterThanToken */ || - token === 56 /* EqualsToken */ || - token === 47 /* BarToken */) { - var result = createNode(254 /* JSDocUnknownType */, pos); + if (token() === 24 /* CommaToken */ || + token() === 16 /* CloseBraceToken */ || + token() === 18 /* CloseParenToken */ || + token() === 27 /* GreaterThanToken */ || + token() === 56 /* EqualsToken */ || + token() === 47 /* BarToken */) { + var result = createNode(259 /* JSDocUnknownType */, pos); return finishNode(result); } else { - var result = createNode(258 /* JSDocNullableType */, pos); + var result = createNode(263 /* JSDocNullableType */, pos); result.type = parseJSDocType(); return finishNode(result); } @@ -12437,14 +13635,14 @@ var ts; } JSDocParser.parseIsolatedJSDocComment = parseIsolatedJSDocComment; function parseJSDocComment(parent, start, length) { - var saveToken = token; + var saveToken = currentToken; var saveParseDiagnosticsLength = parseDiagnostics.length; var saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; var comment = parseJSDocCommentWorker(start, length); if (comment) { comment.parent = parent; } - token = saveToken; + currentToken = saveToken; parseDiagnostics.length = saveParseDiagnosticsLength; parseErrorBeforeNextFinishedNode = saveParseErrorBeforeNextFinishedNode; return comment; @@ -12472,8 +13670,8 @@ var ts; var canParseTag = true; var seenAsterisk = true; nextJSDocToken(); - while (token !== 1 /* EndOfFileToken */) { - switch (token) { + while (token() !== 1 /* EndOfFileToken */) { + switch (token()) { case 55 /* AtToken */: if (canParseTag) { parseTag(); @@ -12513,21 +13711,21 @@ var ts; if (!tags) { return undefined; } - var result = createNode(268 /* JSDocComment */, start); + var result = createNode(273 /* JSDocComment */, start); result.tags = tags; return finishNode(result, end); } function skipWhitespace() { - while (token === 5 /* WhitespaceTrivia */ || token === 4 /* NewLineTrivia */) { + while (token() === 5 /* WhitespaceTrivia */ || token() === 4 /* NewLineTrivia */) { nextJSDocToken(); } } function parseTag() { - ts.Debug.assert(token === 55 /* AtToken */); + ts.Debug.assert(token() === 55 /* AtToken */); var atToken = createNode(55 /* AtToken */, scanner.getTokenPos()); atToken.end = scanner.getTextPos(); nextJSDocToken(); - var tagName = parseJSDocIdentifier(); + var tagName = parseJSDocIdentifierName(); if (!tagName) { return; } @@ -12546,12 +13744,14 @@ var ts; return handleTemplateTag(atToken, tagName); case "type": return handleTypeTag(atToken, tagName); + case "typedef": + return handleTypedefTag(atToken, tagName); } } return undefined; } function handleUnknownTag(atToken, tagName) { - var result = createNode(269 /* JSDocTag */, atToken.pos); + var result = createNode(274 /* JSDocTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; return finishNode(result); @@ -12567,7 +13767,7 @@ var ts; } } function tryParseTypeExpression() { - if (token !== 15 /* OpenBraceToken */) { + if (token() !== 15 /* OpenBraceToken */) { return undefined; } var typeExpression = parseJSDocTypeExpression(); @@ -12580,7 +13780,7 @@ var ts; var isBracketed; // Looking for something like '[foo]' or 'foo' if (parseOptionalToken(19 /* OpenBracketToken */)) { - name = parseJSDocIdentifier(); + name = parseJSDocIdentifierName(); isBracketed = true; // May have an optional default, e.g. '[foo = 42]' if (parseOptionalToken(56 /* EqualsToken */)) { @@ -12588,8 +13788,8 @@ var ts; } parseExpected(20 /* CloseBracketToken */); } - else if (token === 69 /* Identifier */) { - name = parseJSDocIdentifier(); + else if (ts.tokenIsIdentifierOrKeyword(token())) { + name = parseJSDocIdentifierName(); } if (!name) { parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected); @@ -12605,7 +13805,7 @@ var ts; if (!typeExpression) { typeExpression = tryParseTypeExpression(); } - var result = createNode(270 /* JSDocParameterTag */, atToken.pos); + var result = createNode(275 /* JSDocParameterTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.preParameterName = preName; @@ -12615,50 +13815,158 @@ var ts; return finishNode(result); } function handleReturnTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 271 /* JSDocReturnTag */; })) { + if (ts.forEach(tags, function (t) { return t.kind === 276 /* JSDocReturnTag */; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(271 /* JSDocReturnTag */, atToken.pos); + var result = createNode(276 /* JSDocReturnTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result); } function handleTypeTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 272 /* JSDocTypeTag */; })) { + if (ts.forEach(tags, function (t) { return t.kind === 277 /* JSDocTypeTag */; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } - var result = createNode(272 /* JSDocTypeTag */, atToken.pos); + var result = createNode(277 /* JSDocTypeTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeExpression = tryParseTypeExpression(); return finishNode(result); } + function handlePropertyTag(atToken, tagName) { + var typeExpression = tryParseTypeExpression(); + skipWhitespace(); + var name = parseJSDocIdentifierName(); + if (!name) { + parseErrorAtPosition(scanner.getStartPos(), /*length*/ 0, ts.Diagnostics.Identifier_expected); + return undefined; + } + var result = createNode(280 /* JSDocPropertyTag */, atToken.pos); + result.atToken = atToken; + result.tagName = tagName; + result.name = name; + result.typeExpression = typeExpression; + return finishNode(result); + } + function handleTypedefTag(atToken, tagName) { + var typeExpression = tryParseTypeExpression(); + skipWhitespace(); + var typedefTag = createNode(279 /* JSDocTypedefTag */, atToken.pos); + typedefTag.atToken = atToken; + typedefTag.tagName = tagName; + typedefTag.name = parseJSDocIdentifierName(); + typedefTag.typeExpression = typeExpression; + if (typeExpression) { + if (typeExpression.type.kind === 267 /* JSDocTypeReference */) { + var jsDocTypeReference = typeExpression.type; + if (jsDocTypeReference.name.kind === 69 /* Identifier */) { + var name_8 = jsDocTypeReference.name; + if (name_8.text === "Object") { + typedefTag.jsDocTypeLiteral = scanChildTags(); + } + } + } + if (!typedefTag.jsDocTypeLiteral) { + typedefTag.jsDocTypeLiteral = typeExpression.type; + } + } + else { + typedefTag.jsDocTypeLiteral = scanChildTags(); + } + return finishNode(typedefTag); + function scanChildTags() { + var jsDocTypeLiteral = createNode(281 /* JSDocTypeLiteral */, scanner.getStartPos()); + var resumePos = scanner.getStartPos(); + var canParseTag = true; + var seenAsterisk = false; + var parentTagTerminated = false; + while (token() !== 1 /* EndOfFileToken */ && !parentTagTerminated) { + nextJSDocToken(); + switch (token()) { + case 55 /* AtToken */: + if (canParseTag) { + parentTagTerminated = !tryParseChildTag(jsDocTypeLiteral); + if (!parentTagTerminated) { + resumePos = scanner.getStartPos(); + } + } + seenAsterisk = false; + break; + case 4 /* NewLineTrivia */: + resumePos = scanner.getStartPos() - 1; + canParseTag = true; + seenAsterisk = false; + break; + case 37 /* AsteriskToken */: + if (seenAsterisk) { + canParseTag = false; + } + seenAsterisk = true; + break; + case 69 /* Identifier */: + canParseTag = false; + case 1 /* EndOfFileToken */: + break; + } + } + scanner.setTextPos(resumePos); + return finishNode(jsDocTypeLiteral); + } + } + function tryParseChildTag(parentTag) { + ts.Debug.assert(token() === 55 /* AtToken */); + var atToken = createNode(55 /* AtToken */, scanner.getStartPos()); + atToken.end = scanner.getTextPos(); + nextJSDocToken(); + var tagName = parseJSDocIdentifierName(); + if (!tagName) { + return false; + } + switch (tagName.text) { + case "type": + if (parentTag.jsDocTypeTag) { + // already has a @type tag, terminate the parent tag now. + return false; + } + parentTag.jsDocTypeTag = handleTypeTag(atToken, tagName); + return true; + case "prop": + case "property": + if (!parentTag.jsDocPropertyTags) { + parentTag.jsDocPropertyTags = []; + } + var propertyTag = handlePropertyTag(atToken, tagName); + parentTag.jsDocPropertyTags.push(propertyTag); + return true; + } + return false; + } function handleTemplateTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 273 /* JSDocTemplateTag */; })) { + if (ts.forEach(tags, function (t) { return t.kind === 278 /* JSDocTemplateTag */; })) { parseErrorAtPosition(tagName.pos, scanner.getTokenPos() - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); } // Type parameter list looks like '@template T,U,V' var typeParameters = []; typeParameters.pos = scanner.getStartPos(); while (true) { - var name_8 = parseJSDocIdentifier(); - if (!name_8) { + var name_9 = parseJSDocIdentifierName(); + if (!name_9) { parseErrorAtPosition(scanner.getStartPos(), 0, ts.Diagnostics.Identifier_expected); return undefined; } - var typeParameter = createNode(138 /* TypeParameter */, name_8.pos); - typeParameter.name = name_8; + var typeParameter = createNode(141 /* TypeParameter */, name_9.pos); + typeParameter.name = name_9; finishNode(typeParameter); typeParameters.push(typeParameter); - if (token === 24 /* CommaToken */) { + if (token() === 24 /* CommaToken */) { nextJSDocToken(); } else { break; } } - var result = createNode(273 /* JSDocTemplateTag */, atToken.pos); + var result = createNode(278 /* JSDocTemplateTag */, atToken.pos); result.atToken = atToken; result.tagName = tagName; result.typeParameters = typeParameters; @@ -12667,10 +13975,13 @@ var ts; return result; } function nextJSDocToken() { - return token = scanner.scanJSDocToken(); + return currentToken = scanner.scanJSDocToken(); } - function parseJSDocIdentifier() { - if (token !== 69 /* Identifier */) { + function parseJSDocIdentifierName() { + return createJSDocIdentifier(ts.tokenIsIdentifierOrKeyword(token())); + } + function createJSDocIdentifier(isIdentifier) { + if (!isIdentifier) { parseErrorAtCurrentToken(ts.Diagnostics.Identifier_expected); return undefined; } @@ -12701,7 +14012,7 @@ var ts; return Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, /*syntaxCursor*/ undefined, /*setParentNodes*/ true, sourceFile.scriptKind); } // Make sure we're not trying to incrementally update a source file more than once. Once - // we do an update the original source file is considered unusbale from that point onwards. + // we do an update the original source file is considered unusable from that point onwards. // // This is because we do incremental parsing in-place. i.e. we take nodes from the old // tree and give them new positions and parents. From that point on, trusting the old @@ -12776,23 +14087,26 @@ var ts; if (node._children) { node._children = undefined; } - if (node.jsDocComment) { - node.jsDocComment = undefined; - } node.pos += delta; node.end += delta; if (aggressiveChecks && shouldCheckNode(node)) { ts.Debug.assert(text === newText.substring(node.pos, node.end)); } forEachChild(node, visitNode, visitArray); + if (node.jsDocComments) { + for (var _i = 0, _a = node.jsDocComments; _i < _a.length; _i++) { + var jsDocComment = _a[_i]; + forEachChild(jsDocComment, visitNode, visitArray); + } + } checkNodePositions(node, aggressiveChecks); } function visitArray(array) { array._children = undefined; array.pos += delta; array.end += delta; - for (var _i = 0, array_7 = array; _i < array_7.length; _i++) { - var node = array_7[_i]; + for (var _i = 0, array_9 = array; _i < array_9.length; _i++) { + var node = array_9[_i]; visitNode(node); } } @@ -12813,7 +14127,7 @@ var ts; // We have an element that intersects the change range in some way. It may have its // start, or its end (or both) in the changed range. We want to adjust any part // that intersects such that the final tree is in a consistent state. i.e. all - // chlidren have spans within the span of their parent, and all siblings are ordered + // children have spans within the span of their parent, and all siblings are ordered // properly. // We may need to update both the 'pos' and the 'end' of the element. // If the 'pos' is before the start of the change, then we don't need to touch it. @@ -12833,7 +14147,7 @@ var ts; // -------------------ZZZ----------------- // // In this case, any element that started in the 'X' range will keep its position. - // However any element htat started after that will have their pos adjusted to be + // However any element that started after that will have their pos adjusted to be // at the end of the new range. i.e. any node that started in the 'Y' range will // be adjusted to have their start at the end of the 'Z' range. // @@ -12857,7 +14171,7 @@ var ts; // -------------------ZZZ----------------- // // In this case, any element that ended in the 'X' range will keep its position. - // However any element htat ended after that will have their pos adjusted to be + // However any element that ended after that will have their pos adjusted to be // at the end of the new range. i.e. any node that ended in the 'Y' range will // be adjusted to have their end at the end of the 'Z' range. if (element.end >= changeRangeOldEnd) { @@ -12929,8 +14243,8 @@ var ts; array._children = undefined; // Adjust the pos or end (or both) of the intersecting array accordingly. adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - for (var _i = 0, array_8 = array; _i < array_8.length; _i++) { - var node = array_8[_i]; + for (var _i = 0, array_10 = array; _i < array_10.length; _i++) { + var node = array_10[_i]; visitNode(node); } return; @@ -13116,7 +14430,7 @@ var ts; if (position >= node.pos && position < node.end) { // Position was within this node. Keep searching deeper to find the node. forEachChild(node, visitNode, visitArray); - // don't procede any futher in the search. + // don't proceed any further in the search. return true; } // position wasn't in this node, have to keep searching. @@ -13163,40 +14477,25 @@ var ts; /* @internal */ var ts; (function (ts) { - ts.bindTime = 0; (function (ModuleInstanceState) { ModuleInstanceState[ModuleInstanceState["NonInstantiated"] = 0] = "NonInstantiated"; ModuleInstanceState[ModuleInstanceState["Instantiated"] = 1] = "Instantiated"; ModuleInstanceState[ModuleInstanceState["ConstEnumOnly"] = 2] = "ConstEnumOnly"; })(ts.ModuleInstanceState || (ts.ModuleInstanceState = {})); var ModuleInstanceState = ts.ModuleInstanceState; - var Reachability; - (function (Reachability) { - Reachability[Reachability["Unintialized"] = 1] = "Unintialized"; - Reachability[Reachability["Reachable"] = 2] = "Reachable"; - Reachability[Reachability["Unreachable"] = 4] = "Unreachable"; - Reachability[Reachability["ReportedUnreachable"] = 8] = "ReportedUnreachable"; - })(Reachability || (Reachability = {})); - function or(state1, state2) { - return (state1 | state2) & 2 /* Reachable */ - ? 2 /* Reachable */ - : (state1 & state2) & 8 /* ReportedUnreachable */ - ? 8 /* ReportedUnreachable */ - : 4 /* Unreachable */; - } function getModuleInstanceState(node) { // A module is uninstantiated if it contains only // 1. interface declarations, type alias declarations - if (node.kind === 218 /* InterfaceDeclaration */ || node.kind === 219 /* TypeAliasDeclaration */) { + if (node.kind === 222 /* InterfaceDeclaration */ || node.kind === 223 /* TypeAliasDeclaration */) { return 0 /* NonInstantiated */; } else if (ts.isConstEnumDeclaration(node)) { return 2 /* ConstEnumOnly */; } - else if ((node.kind === 225 /* ImportDeclaration */ || node.kind === 224 /* ImportEqualsDeclaration */) && !(node.flags & 2 /* Export */)) { + else if ((node.kind === 230 /* ImportDeclaration */ || node.kind === 229 /* ImportEqualsDeclaration */) && !(node.flags & 1 /* Export */)) { return 0 /* NonInstantiated */; } - else if (node.kind === 222 /* ModuleBlock */) { + else if (node.kind === 226 /* ModuleBlock */) { var state_1 = 0 /* NonInstantiated */; ts.forEachChild(node, function (n) { switch (getModuleInstanceState(n)) { @@ -13215,8 +14514,9 @@ var ts; }); return state_1; } - else if (node.kind === 221 /* ModuleDeclaration */) { - return getModuleInstanceState(node.body); + else if (node.kind === 225 /* ModuleDeclaration */) { + var body = node.body; + return body ? getModuleInstanceState(body) : 1 /* Instantiated */; } else { return 1 /* Instantiated */; @@ -13238,39 +14538,43 @@ var ts; // // Blocks (when not parented by functions), Catch clauses, For/For-in/For-of statements... ContainerFlags[ContainerFlags["IsBlockScopedContainer"] = 2] = "IsBlockScopedContainer"; - ContainerFlags[ContainerFlags["HasLocals"] = 4] = "HasLocals"; - // If the current node is a container that also container that also contains locals. Examples: - // - // Functions, Methods, Modules, Source-files. - ContainerFlags[ContainerFlags["IsContainerWithLocals"] = 5] = "IsContainerWithLocals"; + // The current node is the container of a control flow path. The current control flow should + // be saved and restored, and a new control flow initialized within the container. + ContainerFlags[ContainerFlags["IsControlFlowContainer"] = 4] = "IsControlFlowContainer"; + ContainerFlags[ContainerFlags["IsFunctionLike"] = 8] = "IsFunctionLike"; + ContainerFlags[ContainerFlags["IsFunctionExpression"] = 16] = "IsFunctionExpression"; + ContainerFlags[ContainerFlags["HasLocals"] = 32] = "HasLocals"; + ContainerFlags[ContainerFlags["IsInterface"] = 64] = "IsInterface"; })(ContainerFlags || (ContainerFlags = {})); var binder = createBinder(); function bindSourceFile(file, options) { - var start = new Date().getTime(); + ts.performance.mark("beforeBind"); binder(file, options); - ts.bindTime += new Date().getTime() - start; + ts.performance.mark("afterBind"); + ts.performance.measure("Bind", "beforeBind", "afterBind"); } ts.bindSourceFile = bindSourceFile; function createBinder() { var file; var options; + var languageVersion; var parent; var container; var blockScopeContainer; var lastContainer; var seenThisKeyword; - // state used by reachability checks + // state used by control flow analysis + var currentFlow; + var currentBreakTarget; + var currentContinueTarget; + var currentReturnTarget; + var currentTrueTarget; + var currentFalseTarget; + var preSwitchCaseFlow; + var activeLabels; var hasExplicitReturn; - var currentReachabilityState; - var labelStack; - var labelIndexMap; - var implicitLabels; // state used for emit helpers - var hasClassExtends; - var hasAsyncFunctions; - var hasDecorators; - var hasParameterDecorators; - var hasJsxSpreadAttribute; + var emitFlags; // If this file is an external module, then it is automatically in strict-mode according to // ES6. If it is not an external module, then we'll determine if it is in strict mode or // not depending on if we see "use strict" in certain places (or if we hit a class/namespace). @@ -13278,11 +14582,15 @@ var ts; var symbolCount = 0; var Symbol; var classifiableNames; + var unreachableFlow = { flags: 1 /* Unreachable */ }; + var reportedUnreachableFlow = { flags: 1 /* Unreachable */ }; function bindSourceFile(f, opts) { file = f; options = opts; + languageVersion = ts.getEmitScriptTarget(options); inStrictMode = !!file.externalModuleIndicator; - classifiableNames = {}; + classifiableNames = ts.createMap(); + symbolCount = 0; Symbol = ts.objectAllocator.getSymbolConstructor(); if (!file.locals) { bind(file); @@ -13291,20 +14599,21 @@ var ts; } file = undefined; options = undefined; + languageVersion = undefined; parent = undefined; container = undefined; blockScopeContainer = undefined; lastContainer = undefined; seenThisKeyword = false; + currentFlow = undefined; + currentBreakTarget = undefined; + currentContinueTarget = undefined; + currentReturnTarget = undefined; + currentTrueTarget = undefined; + currentFalseTarget = undefined; + activeLabels = undefined; hasExplicitReturn = false; - labelStack = undefined; - labelIndexMap = undefined; - implicitLabels = undefined; - hasClassExtends = false; - hasAsyncFunctions = false; - hasDecorators = false; - hasParameterDecorators = false; - hasJsxSpreadAttribute = false; + emitFlags = 0 /* None */; } return bindSourceFile; function createSymbol(flags, name) { @@ -13319,15 +14628,15 @@ var ts; } symbol.declarations.push(node); if (symbolFlags & 1952 /* HasExports */ && !symbol.exports) { - symbol.exports = {}; + symbol.exports = ts.createMap(); } if (symbolFlags & 6240 /* HasMembers */ && !symbol.members) { - symbol.members = {}; + symbol.members = ts.createMap(); } if (symbolFlags & 107455 /* Value */) { var valueDeclaration = symbol.valueDeclaration; if (!valueDeclaration || - (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 221 /* ModuleDeclaration */)) { + (valueDeclaration.kind !== node.kind && valueDeclaration.kind === 225 /* ModuleDeclaration */)) { // other kinds of value declarations take precedence over modules symbol.valueDeclaration = node; } @@ -13340,7 +14649,7 @@ var ts; if (ts.isAmbientModule(node)) { return ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + node.name.text + "\""; } - if (node.name.kind === 137 /* ComputedPropertyName */) { + if (node.name.kind === 140 /* ComputedPropertyName */) { var nameExpression = node.name.expression; // treat computed property names where expression is string/numeric literal as just string/numeric literal if (ts.isStringOrNumericLiteral(nameExpression.kind)) { @@ -13352,21 +14661,21 @@ var ts; return node.name.text; } switch (node.kind) { - case 145 /* Constructor */: + case 148 /* Constructor */: return "__constructor"; - case 153 /* FunctionType */: - case 148 /* CallSignature */: + case 156 /* FunctionType */: + case 151 /* CallSignature */: return "__call"; - case 154 /* ConstructorType */: - case 149 /* ConstructSignature */: + case 157 /* ConstructorType */: + case 152 /* ConstructSignature */: return "__new"; - case 150 /* IndexSignature */: + case 153 /* IndexSignature */: return "__index"; - case 231 /* ExportDeclaration */: + case 236 /* ExportDeclaration */: return "__export"; - case 230 /* ExportAssignment */: + case 235 /* ExportAssignment */: return node.isExportEquals ? "export=" : "default"; - case 184 /* BinaryExpression */: + case 187 /* BinaryExpression */: switch (ts.getSpecialPropertyAssignmentKind(node)) { case 2 /* ModuleExports */: // module.exports = ... @@ -13381,18 +14690,30 @@ var ts; } ts.Debug.fail("Unknown binary declaration kind"); break; - case 216 /* FunctionDeclaration */: - case 217 /* ClassDeclaration */: + case 220 /* FunctionDeclaration */: + case 221 /* ClassDeclaration */: return node.flags & 512 /* Default */ ? "default" : undefined; - case 264 /* JSDocFunctionType */: + case 269 /* JSDocFunctionType */: return ts.isJSDocConstructSignature(node) ? "__new" : "__call"; - case 139 /* Parameter */: + case 142 /* Parameter */: // Parameters with names are handled at the top of this function. Parameters // without names can only come from JSDocFunctionTypes. - ts.Debug.assert(node.parent.kind === 264 /* JSDocFunctionType */); + ts.Debug.assert(node.parent.kind === 269 /* JSDocFunctionType */); var functionType = node.parent; var index = ts.indexOf(functionType.parameters, node); return "p" + index; + case 279 /* JSDocTypedefTag */: + var parentNode = node.parent && node.parent.parent; + var nameFromParentNode = void 0; + if (parentNode && parentNode.kind === 200 /* VariableStatement */) { + if (parentNode.declarationList.declarations.length > 0) { + var nameIdentifier = parentNode.declarationList.declarations[0].name; + if (nameIdentifier.kind === 69 /* Identifier */) { + nameFromParentNode = nameIdentifier.text; + } + } + } + return nameFromParentNode; } } function getDisplayName(node) { @@ -13412,7 +14733,10 @@ var ts; // The exported symbol for an export default function/class node is always named "default" var name = isDefaultExport && parent ? "default" : getDeclarationName(node); var symbol; - if (name !== undefined) { + if (name === undefined) { + symbol = createSymbol(0 /* None */, "__missing"); + } + else { // Check and see if the symbol table already has a symbol with this name. If not, // create a new symbol with this name and add it to the table. Note that we don't // give the new symbol any flags *yet*. This ensures that it will not conflict @@ -13424,6 +14748,11 @@ var ts; // declaration we have for this symbol, and then create a new symbol for this // declaration. // + // Note that when properties declared in Javascript constructors + // (marked by isReplaceableByMethod) conflict with another symbol, the property loses. + // Always. This allows the common Javascript pattern of overwriting a prototype method + // with an bound instance method of the same type: `this.method = this.method.bind(this)` + // // If we created a new symbol, either because we didn't have a symbol with this name // in the symbol table, or we conflicted with an existing symbol, then just add this // node as the sole declaration of the new symbol. @@ -13431,44 +14760,46 @@ var ts; // Otherwise, we'll be merging into a compatible existing symbol (for example when // you have multiple 'vars' with the same name in the same container). In this case // just add this node into the declarations list of the symbol. - symbol = ts.hasProperty(symbolTable, name) - ? symbolTable[name] - : (symbolTable[name] = createSymbol(0 /* None */, name)); + symbol = symbolTable[name] || (symbolTable[name] = createSymbol(0 /* None */, name)); if (name && (includes & 788448 /* Classifiable */)) { classifiableNames[name] = name; } if (symbol.flags & excludes) { - if (node.name) { - node.name.parent = node; + if (symbol.isReplaceableByMethod) { + // Javascript constructor-declared symbols can be discarded in favor of + // prototype symbols like methods. + symbol = symbolTable[name] = createSymbol(0 /* None */, name); } - // Report errors every position with duplicate declaration - // Report errors on previous encountered declarations - var message_1 = symbol.flags & 2 /* BlockScopedVariable */ - ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 - : ts.Diagnostics.Duplicate_identifier_0; - ts.forEach(symbol.declarations, function (declaration) { - if (declaration.flags & 512 /* Default */) { - message_1 = ts.Diagnostics.A_module_cannot_have_multiple_default_exports; + else { + if (node.name) { + node.name.parent = node; } - }); - ts.forEach(symbol.declarations, function (declaration) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message_1, getDisplayName(declaration))); - }); - file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message_1, getDisplayName(node))); - symbol = createSymbol(0 /* None */, name); + // Report errors every position with duplicate declaration + // Report errors on previous encountered declarations + var message_1 = symbol.flags & 2 /* BlockScopedVariable */ + ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 + : ts.Diagnostics.Duplicate_identifier_0; + ts.forEach(symbol.declarations, function (declaration) { + if (declaration.flags & 512 /* Default */) { + message_1 = ts.Diagnostics.A_module_cannot_have_multiple_default_exports; + } + }); + ts.forEach(symbol.declarations, function (declaration) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message_1, getDisplayName(declaration))); + }); + file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message_1, getDisplayName(node))); + symbol = createSymbol(0 /* None */, name); + } } } - else { - symbol = createSymbol(0 /* None */, "__missing"); - } addDeclarationToSymbol(symbol, node, includes); symbol.parent = parent; return symbol; } function declareModuleMember(node, symbolFlags, symbolExcludes) { - var hasExportModifier = ts.getCombinedNodeFlags(node) & 2 /* Export */; + var hasExportModifier = ts.getCombinedNodeFlags(node) & 1 /* Export */; if (symbolFlags & 8388608 /* Alias */) { - if (node.kind === 233 /* ExportSpecifier */ || (node.kind === 224 /* ImportEqualsDeclaration */ && hasExportModifier)) { + if (node.kind === 238 /* ExportSpecifier */ || (node.kind === 229 /* ImportEqualsDeclaration */ && hasExportModifier)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } else { @@ -13491,10 +14822,10 @@ var ts; // during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation // and this case is specially handled. Module augmentations should only be merged with original module definition // and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed. - if (!ts.isAmbientModule(node) && (hasExportModifier || container.flags & 131072 /* ExportContext */)) { + if (!ts.isAmbientModule(node) && (hasExportModifier || container.flags & 8192 /* ExportContext */)) { var exportKind = (symbolFlags & 107455 /* Value */ ? 1048576 /* ExportValue */ : 0) | - (symbolFlags & 793056 /* Type */ ? 2097152 /* ExportType */ : 0) | - (symbolFlags & 1536 /* Namespace */ ? 4194304 /* ExportNamespace */ : 0); + (symbolFlags & 793064 /* Type */ ? 2097152 /* ExportType */ : 0) | + (symbolFlags & 1920 /* Namespace */ ? 4194304 /* ExportNamespace */ : 0); var local = declareSymbol(container.locals, undefined, node, exportKind, symbolExcludes); local.exportSymbol = declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); node.localSymbol = local; @@ -13508,15 +14839,12 @@ var ts; // All container nodes are kept on a linked list in declaration order. This list is used by // the getLocalNameOfContainer function in the type checker to validate that the local name // used for a container is unique. - function bindChildren(node) { - // Before we recurse into a node's chilren, we first save the existing parent, container + function bindContainer(node, containerFlags) { + // Before we recurse into a node's children, we first save the existing parent, container // and block-container. Then after we pop out of processing the children, we restore // these saved values. - var saveParent = parent; var saveContainer = container; var savedBlockScopeContainer = blockScopeContainer; - // This node will now be set as the parent of all of its children as we recurse into them. - parent = node; // Depending on what kind of node this is, we may have to adjust the current container // and block-container. If the current node is a container, then it is automatically // considered the current block-container as well. Also, for containers that we know @@ -13532,13 +14860,12 @@ var ts; // Finally, if this is a block-container, then we clear out any existing .locals object // it may contain within it. This happens in incremental scenarios. Because we can be // reusing a node from a previous compilation, that node may have had 'locals' created - // for it. We must clear this so we don't accidently move any stale data forward from + // for it. We must clear this so we don't accidentally move any stale data forward from // a previous compilation. - var containerFlags = getContainerFlags(node); if (containerFlags & 1 /* IsContainer */) { container = blockScopeContainer = node; - if (containerFlags & 4 /* HasLocals */) { - container.locals = {}; + if (containerFlags & 32 /* HasLocals */) { + container.locals = ts.createMap(); } addToContainerChain(container); } @@ -13546,288 +14873,723 @@ var ts; blockScopeContainer = node; blockScopeContainer.locals = undefined; } - var savedReachabilityState; - var savedLabelStack; - var savedLabels; - var savedImplicitLabels; - var savedHasExplicitReturn; - var kind = node.kind; - var flags = node.flags; - // reset all reachability check related flags on node (for incremental scenarios) - flags &= ~1572864 /* ReachabilityCheckFlags */; - // reset all emit helper flags on node (for incremental scenarios) - flags &= ~62914560 /* EmitHelperFlags */; - if (kind === 218 /* InterfaceDeclaration */) { - seenThisKeyword = false; - } - var saveState = kind === 251 /* SourceFile */ || kind === 222 /* ModuleBlock */ || ts.isFunctionLikeKind(kind); - if (saveState) { - savedReachabilityState = currentReachabilityState; - savedLabelStack = labelStack; - savedLabels = labelIndexMap; - savedImplicitLabels = implicitLabels; - savedHasExplicitReturn = hasExplicitReturn; - currentReachabilityState = 2 /* Reachable */; + if (containerFlags & 4 /* IsControlFlowContainer */) { + var saveCurrentFlow = currentFlow; + var saveBreakTarget = currentBreakTarget; + var saveContinueTarget = currentContinueTarget; + var saveReturnTarget = currentReturnTarget; + var saveActiveLabels = activeLabels; + var saveHasExplicitReturn = hasExplicitReturn; + var isIIFE = containerFlags & 16 /* IsFunctionExpression */ && !!ts.getImmediatelyInvokedFunctionExpression(node); + // An IIFE is considered part of the containing control flow. Return statements behave + // similarly to break statements that exit to a label just past the statement body. + if (isIIFE) { + currentReturnTarget = createBranchLabel(); + } + else { + currentFlow = { flags: 2 /* Start */ }; + if (containerFlags & 16 /* IsFunctionExpression */) { + currentFlow.container = node; + } + currentReturnTarget = undefined; + } + currentBreakTarget = undefined; + currentContinueTarget = undefined; + activeLabels = undefined; hasExplicitReturn = false; - labelStack = labelIndexMap = implicitLabels = undefined; + bindChildren(node); + // Reset all reachability check related flags on node (for incremental scenarios) + // Reset all emit helper flags on node (for incremental scenarios) + node.flags &= ~4030464 /* ReachabilityAndEmitFlags */; + if (!(currentFlow.flags & 1 /* Unreachable */) && containerFlags & 8 /* IsFunctionLike */ && ts.nodeIsPresent(node.body)) { + node.flags |= 32768 /* HasImplicitReturn */; + if (hasExplicitReturn) + node.flags |= 65536 /* HasExplicitReturn */; + } + if (node.kind === 256 /* SourceFile */) { + node.flags |= emitFlags; + } + if (isIIFE) { + addAntecedent(currentReturnTarget, currentFlow); + currentFlow = finishFlowLabel(currentReturnTarget); + } + else { + currentFlow = saveCurrentFlow; + } + currentBreakTarget = saveBreakTarget; + currentContinueTarget = saveContinueTarget; + currentReturnTarget = saveReturnTarget; + activeLabels = saveActiveLabels; + hasExplicitReturn = saveHasExplicitReturn; } - if (ts.isInJavaScriptFile(node) && node.jsDocComment) { - bind(node.jsDocComment); + else if (containerFlags & 64 /* IsInterface */) { + seenThisKeyword = false; + bindChildren(node); + node.flags = seenThisKeyword ? node.flags | 16384 /* ContainsThis */ : node.flags & ~16384 /* ContainsThis */; } - bindReachableStatement(node); - if (currentReachabilityState === 2 /* Reachable */ && ts.isFunctionLikeKind(kind) && ts.nodeIsPresent(node.body)) { - flags |= 524288 /* HasImplicitReturn */; - if (hasExplicitReturn) { - flags |= 1048576 /* HasExplicitReturn */; - } - } - if (kind === 218 /* InterfaceDeclaration */) { - flags = seenThisKeyword ? flags | 262144 /* ContainsThis */ : flags & ~262144 /* ContainsThis */; - } - if (kind === 251 /* SourceFile */) { - if (hasClassExtends) { - flags |= 4194304 /* HasClassExtends */; - } - if (hasDecorators) { - flags |= 8388608 /* HasDecorators */; - } - if (hasParameterDecorators) { - flags |= 16777216 /* HasParamDecorators */; - } - if (hasAsyncFunctions) { - flags |= 33554432 /* HasAsyncFunctions */; - } - if (hasJsxSpreadAttribute) { - flags |= 1073741824 /* HasJsxSpreadAttribute */; - } - } - node.flags = flags; - if (saveState) { - hasExplicitReturn = savedHasExplicitReturn; - currentReachabilityState = savedReachabilityState; - labelStack = savedLabelStack; - labelIndexMap = savedLabels; - implicitLabels = savedImplicitLabels; + else { + bindChildren(node); } container = saveContainer; - parent = saveParent; blockScopeContainer = savedBlockScopeContainer; } - /** - * Returns true if node and its subnodes were successfully traversed. - * Returning false means that node was not examined and caller needs to dive into the node himself. - */ - function bindReachableStatement(node) { + function bindChildren(node) { + // Binding of JsDocComment should be done before the current block scope container changes. + // because the scope of JsDocComment should not be affected by whether the current node is a + // container or not. + if (ts.isInJavaScriptFile(node) && node.jsDocComments) { + for (var _i = 0, _a = node.jsDocComments; _i < _a.length; _i++) { + var jsDocComment = _a[_i]; + bind(jsDocComment); + } + } if (checkUnreachable(node)) { ts.forEachChild(node, bind); return; } switch (node.kind) { - case 201 /* WhileStatement */: + case 205 /* WhileStatement */: bindWhileStatement(node); break; - case 200 /* DoStatement */: + case 204 /* DoStatement */: bindDoStatement(node); break; - case 202 /* ForStatement */: + case 206 /* ForStatement */: bindForStatement(node); break; - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: bindForInOrForOfStatement(node); break; - case 199 /* IfStatement */: + case 203 /* IfStatement */: bindIfStatement(node); break; - case 207 /* ReturnStatement */: - case 211 /* ThrowStatement */: + case 211 /* ReturnStatement */: + case 215 /* ThrowStatement */: bindReturnOrThrow(node); break; - case 206 /* BreakStatement */: - case 205 /* ContinueStatement */: + case 210 /* BreakStatement */: + case 209 /* ContinueStatement */: bindBreakOrContinueStatement(node); break; - case 212 /* TryStatement */: + case 216 /* TryStatement */: bindTryStatement(node); break; - case 209 /* SwitchStatement */: + case 213 /* SwitchStatement */: bindSwitchStatement(node); break; - case 223 /* CaseBlock */: + case 227 /* CaseBlock */: bindCaseBlock(node); break; - case 210 /* LabeledStatement */: + case 249 /* CaseClause */: + bindCaseClause(node); + break; + case 214 /* LabeledStatement */: bindLabeledStatement(node); break; + case 185 /* PrefixUnaryExpression */: + bindPrefixUnaryExpressionFlow(node); + break; + case 187 /* BinaryExpression */: + bindBinaryExpressionFlow(node); + break; + case 181 /* DeleteExpression */: + bindDeleteExpressionFlow(node); + break; + case 188 /* ConditionalExpression */: + bindConditionalExpressionFlow(node); + break; + case 218 /* VariableDeclaration */: + bindVariableDeclarationFlow(node); + break; + case 174 /* CallExpression */: + bindCallExpressionFlow(node); + break; default: ts.forEachChild(node, bind); break; } } - function bindWhileStatement(n) { - var preWhileState = n.expression.kind === 84 /* FalseKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; - var postWhileState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; - // bind expressions (don't affect reachability) - bind(n.expression); - currentReachabilityState = preWhileState; - var postWhileLabel = pushImplicitLabel(); - bind(n.statement); - popImplicitLabel(postWhileLabel, postWhileState); + function isNarrowingExpression(expr) { + switch (expr.kind) { + case 69 /* Identifier */: + case 97 /* ThisKeyword */: + case 172 /* PropertyAccessExpression */: + return isNarrowableReference(expr); + case 174 /* CallExpression */: + return hasNarrowableArgument(expr); + case 178 /* ParenthesizedExpression */: + return isNarrowingExpression(expr.expression); + case 187 /* BinaryExpression */: + return isNarrowingBinaryExpression(expr); + case 185 /* PrefixUnaryExpression */: + return expr.operator === 49 /* ExclamationToken */ && isNarrowingExpression(expr.operand); + } + return false; } - function bindDoStatement(n) { - var preDoState = currentReachabilityState; - var postDoLabel = pushImplicitLabel(); - bind(n.statement); - var postDoState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : preDoState; - popImplicitLabel(postDoLabel, postDoState); - // bind expressions (don't affect reachability) - bind(n.expression); + function isNarrowableReference(expr) { + return expr.kind === 69 /* Identifier */ || + expr.kind === 97 /* ThisKeyword */ || + expr.kind === 172 /* PropertyAccessExpression */ && isNarrowableReference(expr.expression); } - function bindForStatement(n) { - var preForState = currentReachabilityState; - var postForLabel = pushImplicitLabel(); - // bind expressions (don't affect reachability) - bind(n.initializer); - bind(n.condition); - bind(n.incrementor); - bind(n.statement); - // for statement is considered infinite when it condition is either omitted or is true keyword - // - for(..;;..) - // - for(..;true;..) - var isInfiniteLoop = (!n.condition || n.condition.kind === 99 /* TrueKeyword */); - var postForState = isInfiniteLoop ? 4 /* Unreachable */ : preForState; - popImplicitLabel(postForLabel, postForState); + function hasNarrowableArgument(expr) { + if (expr.arguments) { + for (var _i = 0, _a = expr.arguments; _i < _a.length; _i++) { + var argument = _a[_i]; + if (isNarrowableReference(argument)) { + return true; + } + } + } + if (expr.expression.kind === 172 /* PropertyAccessExpression */ && + isNarrowableReference(expr.expression.expression)) { + return true; + } + return false; } - function bindForInOrForOfStatement(n) { - var preStatementState = currentReachabilityState; - var postStatementLabel = pushImplicitLabel(); - // bind expressions (don't affect reachability) - bind(n.initializer); - bind(n.expression); - bind(n.statement); - popImplicitLabel(postStatementLabel, preStatementState); + function isNarrowingTypeofOperands(expr1, expr2) { + return expr1.kind === 182 /* TypeOfExpression */ && isNarrowableOperand(expr1.expression) && expr2.kind === 9 /* StringLiteral */; } - function bindIfStatement(n) { - // denotes reachability state when entering 'thenStatement' part of the if statement: - // i.e. if condition is false then thenStatement is unreachable - var ifTrueState = n.expression.kind === 84 /* FalseKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; - // denotes reachability state when entering 'elseStatement': - // i.e. if condition is true then elseStatement is unreachable - var ifFalseState = n.expression.kind === 99 /* TrueKeyword */ ? 4 /* Unreachable */ : currentReachabilityState; - currentReachabilityState = ifTrueState; - // bind expression (don't affect reachability) - bind(n.expression); - bind(n.thenStatement); - if (n.elseStatement) { - var preElseState = currentReachabilityState; - currentReachabilityState = ifFalseState; - bind(n.elseStatement); - currentReachabilityState = or(currentReachabilityState, preElseState); + function isNarrowingBinaryExpression(expr) { + switch (expr.operatorToken.kind) { + case 56 /* EqualsToken */: + return isNarrowableReference(expr.left); + case 30 /* EqualsEqualsToken */: + case 31 /* ExclamationEqualsToken */: + case 32 /* EqualsEqualsEqualsToken */: + case 33 /* ExclamationEqualsEqualsToken */: + return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || + isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right); + case 91 /* InstanceOfKeyword */: + return isNarrowableOperand(expr.left); + case 24 /* CommaToken */: + return isNarrowingExpression(expr.right); + } + return false; + } + function isNarrowableOperand(expr) { + switch (expr.kind) { + case 178 /* ParenthesizedExpression */: + return isNarrowableOperand(expr.expression); + case 187 /* BinaryExpression */: + switch (expr.operatorToken.kind) { + case 56 /* EqualsToken */: + return isNarrowableOperand(expr.left); + case 24 /* CommaToken */: + return isNarrowableOperand(expr.right); + } + } + return isNarrowableReference(expr); + } + function createBranchLabel() { + return { + flags: 4 /* BranchLabel */, + antecedents: undefined + }; + } + function createLoopLabel() { + return { + flags: 8 /* LoopLabel */, + antecedents: undefined + }; + } + function setFlowNodeReferenced(flow) { + // On first reference we set the Referenced flag, thereafter we set the Shared flag + flow.flags |= flow.flags & 256 /* Referenced */ ? 512 /* Shared */ : 256 /* Referenced */; + } + function addAntecedent(label, antecedent) { + if (!(antecedent.flags & 1 /* Unreachable */) && !ts.contains(label.antecedents, antecedent)) { + (label.antecedents || (label.antecedents = [])).push(antecedent); + setFlowNodeReferenced(antecedent); + } + } + function createFlowCondition(flags, antecedent, expression) { + if (antecedent.flags & 1 /* Unreachable */) { + return antecedent; + } + if (!expression) { + return flags & 32 /* TrueCondition */ ? antecedent : unreachableFlow; + } + if (expression.kind === 99 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || + expression.kind === 84 /* FalseKeyword */ && flags & 32 /* TrueCondition */) { + return unreachableFlow; + } + if (!isNarrowingExpression(expression)) { + return antecedent; + } + setFlowNodeReferenced(antecedent); + return { + flags: flags, + expression: expression, + antecedent: antecedent + }; + } + function createFlowSwitchClause(antecedent, switchStatement, clauseStart, clauseEnd) { + if (!isNarrowingExpression(switchStatement.expression)) { + return antecedent; + } + setFlowNodeReferenced(antecedent); + return { + flags: 128 /* SwitchClause */, + switchStatement: switchStatement, + clauseStart: clauseStart, + clauseEnd: clauseEnd, + antecedent: antecedent + }; + } + function createFlowAssignment(antecedent, node) { + setFlowNodeReferenced(antecedent); + return { + flags: 16 /* Assignment */, + antecedent: antecedent, + node: node + }; + } + function finishFlowLabel(flow) { + var antecedents = flow.antecedents; + if (!antecedents) { + return unreachableFlow; + } + if (antecedents.length === 1) { + return antecedents[0]; + } + return flow; + } + function isStatementCondition(node) { + var parent = node.parent; + switch (parent.kind) { + case 203 /* IfStatement */: + case 205 /* WhileStatement */: + case 204 /* DoStatement */: + return parent.expression === node; + case 206 /* ForStatement */: + case 188 /* ConditionalExpression */: + return parent.condition === node; + } + return false; + } + function isLogicalExpression(node) { + while (true) { + if (node.kind === 178 /* ParenthesizedExpression */) { + node = node.expression; + } + else if (node.kind === 185 /* PrefixUnaryExpression */ && node.operator === 49 /* ExclamationToken */) { + node = node.operand; + } + else { + return node.kind === 187 /* BinaryExpression */ && (node.operatorToken.kind === 51 /* AmpersandAmpersandToken */ || + node.operatorToken.kind === 52 /* BarBarToken */); + } + } + } + function isTopLevelLogicalExpression(node) { + while (node.parent.kind === 178 /* ParenthesizedExpression */ || + node.parent.kind === 185 /* PrefixUnaryExpression */ && + node.parent.operator === 49 /* ExclamationToken */) { + node = node.parent; + } + return !isStatementCondition(node) && !isLogicalExpression(node.parent); + } + function bindCondition(node, trueTarget, falseTarget) { + var saveTrueTarget = currentTrueTarget; + var saveFalseTarget = currentFalseTarget; + currentTrueTarget = trueTarget; + currentFalseTarget = falseTarget; + bind(node); + currentTrueTarget = saveTrueTarget; + currentFalseTarget = saveFalseTarget; + if (!node || !isLogicalExpression(node)) { + addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); + addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); + } + } + function bindIterativeStatement(node, breakTarget, continueTarget) { + var saveBreakTarget = currentBreakTarget; + var saveContinueTarget = currentContinueTarget; + currentBreakTarget = breakTarget; + currentContinueTarget = continueTarget; + bind(node); + currentBreakTarget = saveBreakTarget; + currentContinueTarget = saveContinueTarget; + } + function bindWhileStatement(node) { + var preWhileLabel = createLoopLabel(); + var preBodyLabel = createBranchLabel(); + var postWhileLabel = createBranchLabel(); + addAntecedent(preWhileLabel, currentFlow); + currentFlow = preWhileLabel; + bindCondition(node.expression, preBodyLabel, postWhileLabel); + currentFlow = finishFlowLabel(preBodyLabel); + bindIterativeStatement(node.statement, postWhileLabel, preWhileLabel); + addAntecedent(preWhileLabel, currentFlow); + currentFlow = finishFlowLabel(postWhileLabel); + } + function bindDoStatement(node) { + var preDoLabel = createLoopLabel(); + var preConditionLabel = createBranchLabel(); + var postDoLabel = createBranchLabel(); + addAntecedent(preDoLabel, currentFlow); + currentFlow = preDoLabel; + bindIterativeStatement(node.statement, postDoLabel, preConditionLabel); + addAntecedent(preConditionLabel, currentFlow); + currentFlow = finishFlowLabel(preConditionLabel); + bindCondition(node.expression, preDoLabel, postDoLabel); + currentFlow = finishFlowLabel(postDoLabel); + } + function bindForStatement(node) { + var preLoopLabel = createLoopLabel(); + var preBodyLabel = createBranchLabel(); + var postLoopLabel = createBranchLabel(); + bind(node.initializer); + addAntecedent(preLoopLabel, currentFlow); + currentFlow = preLoopLabel; + bindCondition(node.condition, preBodyLabel, postLoopLabel); + currentFlow = finishFlowLabel(preBodyLabel); + bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); + bind(node.incrementor); + addAntecedent(preLoopLabel, currentFlow); + currentFlow = finishFlowLabel(postLoopLabel); + } + function bindForInOrForOfStatement(node) { + var preLoopLabel = createLoopLabel(); + var postLoopLabel = createBranchLabel(); + addAntecedent(preLoopLabel, currentFlow); + currentFlow = preLoopLabel; + bind(node.expression); + addAntecedent(postLoopLabel, currentFlow); + bind(node.initializer); + if (node.initializer.kind !== 219 /* VariableDeclarationList */) { + bindAssignmentTargetFlow(node.initializer); + } + bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); + addAntecedent(preLoopLabel, currentFlow); + currentFlow = finishFlowLabel(postLoopLabel); + } + function bindIfStatement(node) { + var thenLabel = createBranchLabel(); + var elseLabel = createBranchLabel(); + var postIfLabel = createBranchLabel(); + bindCondition(node.expression, thenLabel, elseLabel); + currentFlow = finishFlowLabel(thenLabel); + bind(node.thenStatement); + addAntecedent(postIfLabel, currentFlow); + currentFlow = finishFlowLabel(elseLabel); + bind(node.elseStatement); + addAntecedent(postIfLabel, currentFlow); + currentFlow = finishFlowLabel(postIfLabel); + } + function bindReturnOrThrow(node) { + bind(node.expression); + if (node.kind === 211 /* ReturnStatement */) { + hasExplicitReturn = true; + if (currentReturnTarget) { + addAntecedent(currentReturnTarget, currentFlow); + } + } + currentFlow = unreachableFlow; + } + function findActiveLabel(name) { + if (activeLabels) { + for (var _i = 0, activeLabels_1 = activeLabels; _i < activeLabels_1.length; _i++) { + var label = activeLabels_1[_i]; + if (label.name === name) { + return label; + } + } + } + return undefined; + } + function bindbreakOrContinueFlow(node, breakTarget, continueTarget) { + var flowLabel = node.kind === 210 /* BreakStatement */ ? breakTarget : continueTarget; + if (flowLabel) { + addAntecedent(flowLabel, currentFlow); + currentFlow = unreachableFlow; + } + } + function bindBreakOrContinueStatement(node) { + bind(node.label); + if (node.label) { + var activeLabel = findActiveLabel(node.label.text); + if (activeLabel) { + activeLabel.referenced = true; + bindbreakOrContinueFlow(node, activeLabel.breakTarget, activeLabel.continueTarget); + } } else { - currentReachabilityState = or(currentReachabilityState, ifFalseState); + bindbreakOrContinueFlow(node, currentBreakTarget, currentContinueTarget); } } - function bindReturnOrThrow(n) { - // bind expression (don't affect reachability) - bind(n.expression); - if (n.kind === 207 /* ReturnStatement */) { - hasExplicitReturn = true; + function bindTryStatement(node) { + var postFinallyLabel = createBranchLabel(); + var preTryFlow = currentFlow; + // TODO: Every statement in try block is potentially an exit point! + bind(node.tryBlock); + addAntecedent(postFinallyLabel, currentFlow); + if (node.catchClause) { + currentFlow = preTryFlow; + bind(node.catchClause); + addAntecedent(postFinallyLabel, currentFlow); } - currentReachabilityState = 4 /* Unreachable */; - } - function bindBreakOrContinueStatement(n) { - // call bind on label (don't affect reachability) - bind(n.label); - // for continue case touch label so it will be marked a used - var isValidJump = jumpToLabel(n.label, n.kind === 206 /* BreakStatement */ ? currentReachabilityState : 4 /* Unreachable */); - if (isValidJump) { - currentReachabilityState = 4 /* Unreachable */; + if (node.finallyBlock) { + currentFlow = preTryFlow; + bind(node.finallyBlock); } + currentFlow = finishFlowLabel(postFinallyLabel); } - function bindTryStatement(n) { - // catch\finally blocks has the same reachability as try block - var preTryState = currentReachabilityState; - bind(n.tryBlock); - var postTryState = currentReachabilityState; - currentReachabilityState = preTryState; - bind(n.catchClause); - var postCatchState = currentReachabilityState; - currentReachabilityState = preTryState; - bind(n.finallyBlock); - // post catch/finally state is reachable if - // - post try state is reachable - control flow can fall out of try block - // - post catch state is reachable - control flow can fall out of catch block - currentReachabilityState = or(postTryState, postCatchState); + function bindSwitchStatement(node) { + var postSwitchLabel = createBranchLabel(); + bind(node.expression); + var saveBreakTarget = currentBreakTarget; + var savePreSwitchCaseFlow = preSwitchCaseFlow; + currentBreakTarget = postSwitchLabel; + preSwitchCaseFlow = currentFlow; + bind(node.caseBlock); + addAntecedent(postSwitchLabel, currentFlow); + var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 250 /* DefaultClause */; }); + // We mark a switch statement as possibly exhaustive if it has no default clause and if all + // case clauses have unreachable end points (e.g. they all return). + node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; + if (!hasDefault) { + addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); + } + currentBreakTarget = saveBreakTarget; + preSwitchCaseFlow = savePreSwitchCaseFlow; + currentFlow = finishFlowLabel(postSwitchLabel); } - function bindSwitchStatement(n) { - var preSwitchState = currentReachabilityState; - var postSwitchLabel = pushImplicitLabel(); - // bind expression (don't affect reachability) - bind(n.expression); - bind(n.caseBlock); - var hasDefault = ts.forEach(n.caseBlock.clauses, function (c) { return c.kind === 245 /* DefaultClause */; }); - // post switch state is unreachable if switch is exaustive (has a default case ) and does not have fallthrough from the last case - var postSwitchState = hasDefault && currentReachabilityState !== 2 /* Reachable */ ? 4 /* Unreachable */ : preSwitchState; - popImplicitLabel(postSwitchLabel, postSwitchState); - } - function bindCaseBlock(n) { - var startState = currentReachabilityState; - for (var _i = 0, _a = n.clauses; _i < _a.length; _i++) { - var clause = _a[_i]; - currentReachabilityState = startState; + function bindCaseBlock(node) { + var clauses = node.clauses; + var fallthroughFlow = unreachableFlow; + for (var i = 0; i < clauses.length; i++) { + var clauseStart = i; + while (!clauses[i].statements.length && i + 1 < clauses.length) { + bind(clauses[i]); + i++; + } + var preCaseLabel = createBranchLabel(); + addAntecedent(preCaseLabel, createFlowSwitchClause(preSwitchCaseFlow, node.parent, clauseStart, i + 1)); + addAntecedent(preCaseLabel, fallthroughFlow); + currentFlow = finishFlowLabel(preCaseLabel); + var clause = clauses[i]; bind(clause); - if (clause.statements.length && currentReachabilityState === 2 /* Reachable */ && options.noFallthroughCasesInSwitch) { + fallthroughFlow = currentFlow; + if (!(currentFlow.flags & 1 /* Unreachable */) && i !== clauses.length - 1 && options.noFallthroughCasesInSwitch) { errorOnFirstToken(clause, ts.Diagnostics.Fallthrough_case_in_switch); } } } - function bindLabeledStatement(n) { - // call bind on label (don't affect reachability) - bind(n.label); - var ok = pushNamedLabel(n.label); - bind(n.statement); - if (ok) { - popNamedLabel(n.label, currentReachabilityState); + function bindCaseClause(node) { + var saveCurrentFlow = currentFlow; + currentFlow = preSwitchCaseFlow; + bind(node.expression); + currentFlow = saveCurrentFlow; + ts.forEach(node.statements, bind); + } + function pushActiveLabel(name, breakTarget, continueTarget) { + var activeLabel = { + name: name, + breakTarget: breakTarget, + continueTarget: continueTarget, + referenced: false + }; + (activeLabels || (activeLabels = [])).push(activeLabel); + return activeLabel; + } + function popActiveLabel() { + activeLabels.pop(); + } + function bindLabeledStatement(node) { + var preStatementLabel = createLoopLabel(); + var postStatementLabel = createBranchLabel(); + bind(node.label); + addAntecedent(preStatementLabel, currentFlow); + var activeLabel = pushActiveLabel(node.label.text, postStatementLabel, preStatementLabel); + bind(node.statement); + popActiveLabel(); + if (!activeLabel.referenced && !options.allowUnusedLabels) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(node.label, ts.Diagnostics.Unused_label)); + } + addAntecedent(postStatementLabel, currentFlow); + currentFlow = finishFlowLabel(postStatementLabel); + } + function bindDestructuringTargetFlow(node) { + if (node.kind === 187 /* BinaryExpression */ && node.operatorToken.kind === 56 /* EqualsToken */) { + bindAssignmentTargetFlow(node.left); + } + else { + bindAssignmentTargetFlow(node); + } + } + function bindAssignmentTargetFlow(node) { + if (isNarrowableReference(node)) { + currentFlow = createFlowAssignment(currentFlow, node); + } + else if (node.kind === 170 /* ArrayLiteralExpression */) { + for (var _i = 0, _a = node.elements; _i < _a.length; _i++) { + var e = _a[_i]; + if (e.kind === 191 /* SpreadElementExpression */) { + bindAssignmentTargetFlow(e.expression); + } + else { + bindDestructuringTargetFlow(e); + } + } + } + else if (node.kind === 171 /* ObjectLiteralExpression */) { + for (var _b = 0, _c = node.properties; _b < _c.length; _b++) { + var p = _c[_b]; + if (p.kind === 253 /* PropertyAssignment */) { + bindDestructuringTargetFlow(p.initializer); + } + else if (p.kind === 254 /* ShorthandPropertyAssignment */) { + bindAssignmentTargetFlow(p.name); + } + } + } + } + function bindLogicalExpression(node, trueTarget, falseTarget) { + var preRightLabel = createBranchLabel(); + if (node.operatorToken.kind === 51 /* AmpersandAmpersandToken */) { + bindCondition(node.left, preRightLabel, falseTarget); + } + else { + bindCondition(node.left, trueTarget, preRightLabel); + } + currentFlow = finishFlowLabel(preRightLabel); + bind(node.operatorToken); + bindCondition(node.right, trueTarget, falseTarget); + } + function bindPrefixUnaryExpressionFlow(node) { + if (node.operator === 49 /* ExclamationToken */) { + var saveTrueTarget = currentTrueTarget; + currentTrueTarget = currentFalseTarget; + currentFalseTarget = saveTrueTarget; + ts.forEachChild(node, bind); + currentFalseTarget = currentTrueTarget; + currentTrueTarget = saveTrueTarget; + } + else { + ts.forEachChild(node, bind); + } + } + function bindBinaryExpressionFlow(node) { + var operator = node.operatorToken.kind; + if (operator === 51 /* AmpersandAmpersandToken */ || operator === 52 /* BarBarToken */) { + if (isTopLevelLogicalExpression(node)) { + var postExpressionLabel = createBranchLabel(); + bindLogicalExpression(node, postExpressionLabel, postExpressionLabel); + currentFlow = finishFlowLabel(postExpressionLabel); + } + else { + bindLogicalExpression(node, currentTrueTarget, currentFalseTarget); + } + } + else { + ts.forEachChild(node, bind); + if (operator === 56 /* EqualsToken */ && !ts.isAssignmentTarget(node)) { + bindAssignmentTargetFlow(node.left); + } + } + } + function bindDeleteExpressionFlow(node) { + ts.forEachChild(node, bind); + if (node.expression.kind === 172 /* PropertyAccessExpression */) { + bindAssignmentTargetFlow(node.expression); + } + } + function bindConditionalExpressionFlow(node) { + var trueLabel = createBranchLabel(); + var falseLabel = createBranchLabel(); + var postExpressionLabel = createBranchLabel(); + bindCondition(node.condition, trueLabel, falseLabel); + currentFlow = finishFlowLabel(trueLabel); + bind(node.whenTrue); + addAntecedent(postExpressionLabel, currentFlow); + currentFlow = finishFlowLabel(falseLabel); + bind(node.whenFalse); + addAntecedent(postExpressionLabel, currentFlow); + currentFlow = finishFlowLabel(postExpressionLabel); + } + function bindInitializedVariableFlow(node) { + var name = node.name; + if (ts.isBindingPattern(name)) { + for (var _i = 0, _a = name.elements; _i < _a.length; _i++) { + var child = _a[_i]; + bindInitializedVariableFlow(child); + } + } + else { + currentFlow = createFlowAssignment(currentFlow, node); + } + } + function bindVariableDeclarationFlow(node) { + ts.forEachChild(node, bind); + if (node.initializer || node.parent.parent.kind === 207 /* ForInStatement */ || node.parent.parent.kind === 208 /* ForOfStatement */) { + bindInitializedVariableFlow(node); + } + } + function bindCallExpressionFlow(node) { + // If the target of the call expression is a function expression or arrow function we have + // an immediately invoked function expression (IIFE). Initialize the flowNode property to + // the current control flow (which includes evaluation of the IIFE arguments). + var expr = node.expression; + while (expr.kind === 178 /* ParenthesizedExpression */) { + expr = expr.expression; + } + if (expr.kind === 179 /* FunctionExpression */ || expr.kind === 180 /* ArrowFunction */) { + ts.forEach(node.typeArguments, bind); + ts.forEach(node.arguments, bind); + bind(node.expression); + } + else { + ts.forEachChild(node, bind); } } function getContainerFlags(node) { switch (node.kind) { - case 189 /* ClassExpression */: - case 217 /* ClassDeclaration */: - case 218 /* InterfaceDeclaration */: - case 220 /* EnumDeclaration */: - case 168 /* ObjectLiteralExpression */: - case 156 /* TypeLiteral */: - case 260 /* JSDocRecordType */: + case 192 /* ClassExpression */: + case 221 /* ClassDeclaration */: + case 224 /* EnumDeclaration */: + case 171 /* ObjectLiteralExpression */: + case 159 /* TypeLiteral */: + case 281 /* JSDocTypeLiteral */: + case 265 /* JSDocRecordType */: return 1 /* IsContainer */; - case 148 /* CallSignature */: - case 149 /* ConstructSignature */: - case 150 /* IndexSignature */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 216 /* FunctionDeclaration */: - case 145 /* Constructor */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 153 /* FunctionType */: - case 264 /* JSDocFunctionType */: - case 154 /* ConstructorType */: - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: - case 221 /* ModuleDeclaration */: - case 251 /* SourceFile */: - case 219 /* TypeAliasDeclaration */: - return 5 /* IsContainerWithLocals */; - case 247 /* CatchClause */: - case 202 /* ForStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: - case 223 /* CaseBlock */: + case 222 /* InterfaceDeclaration */: + return 1 /* IsContainer */ | 64 /* IsInterface */; + case 269 /* JSDocFunctionType */: + case 225 /* ModuleDeclaration */: + case 223 /* TypeAliasDeclaration */: + return 1 /* IsContainer */ | 32 /* HasLocals */; + case 256 /* SourceFile */: + return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; + case 148 /* Constructor */: + case 220 /* FunctionDeclaration */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: + case 153 /* IndexSignature */: + case 156 /* FunctionType */: + case 157 /* ConstructorType */: + return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: + return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; + case 226 /* ModuleBlock */: + return 4 /* IsControlFlowContainer */; + case 145 /* PropertyDeclaration */: + return node.initializer ? 4 /* IsControlFlowContainer */ : 0; + case 252 /* CatchClause */: + case 206 /* ForStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: + case 227 /* CaseBlock */: return 2 /* IsBlockScopedContainer */; - case 195 /* Block */: + case 199 /* Block */: // do not treat blocks directly inside a function as a block-scoped-container. - // Locals that reside in this block should go to the function locals. Othewise 'x' + // Locals that reside in this block should go to the function locals. Otherwise 'x' // would not appear to be a redeclaration of a block scoped local in the following // example: // @@ -13854,7 +15616,7 @@ var ts; } function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { // Just call this directly so that the return type of this function stays "void". - declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes); + return declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes); } function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) { switch (container.kind) { @@ -13862,51 +15624,52 @@ var ts; // members are declared (for example, a member of a class will go into a specific // symbol table depending on if it is static or not). We defer to specialized // handlers to take care of declaring these child members. - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: return declareModuleMember(node, symbolFlags, symbolExcludes); - case 251 /* SourceFile */: + case 256 /* SourceFile */: return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 189 /* ClassExpression */: - case 217 /* ClassDeclaration */: + case 192 /* ClassExpression */: + case 221 /* ClassDeclaration */: return declareClassMember(node, symbolFlags, symbolExcludes); - case 220 /* EnumDeclaration */: + case 224 /* EnumDeclaration */: return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 156 /* TypeLiteral */: - case 168 /* ObjectLiteralExpression */: - case 218 /* InterfaceDeclaration */: - case 260 /* JSDocRecordType */: + case 159 /* TypeLiteral */: + case 171 /* ObjectLiteralExpression */: + case 222 /* InterfaceDeclaration */: + case 265 /* JSDocRecordType */: + case 281 /* JSDocTypeLiteral */: // Interface/Object-types always have their children added to the 'members' of // their container. They are only accessible through an instance of their // container, and are never in scope otherwise (even inside the body of the // object / type / interface declaring them). An exception is type parameters, // which are in scope without qualification (similar to 'locals'). return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 153 /* FunctionType */: - case 154 /* ConstructorType */: - case 148 /* CallSignature */: - case 149 /* ConstructSignature */: - case 150 /* IndexSignature */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 145 /* Constructor */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: - case 264 /* JSDocFunctionType */: - case 219 /* TypeAliasDeclaration */: + case 156 /* FunctionType */: + case 157 /* ConstructorType */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: + case 153 /* IndexSignature */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 148 /* Constructor */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: + case 269 /* JSDocFunctionType */: + case 223 /* TypeAliasDeclaration */: // All the children of these container types are never visible through another // symbol (i.e. through another symbol's 'exports' or 'members'). Instead, // they're only accessed 'lexically' (i.e. from code that exists underneath // their container in the tree. To accomplish this, we simply add their declared // symbol to the 'locals' of the container. These symbols can then be found as // the type checker walks up the containers, checking them for matching names. - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); + return declareSymbol(container.locals, /*parent*/ undefined, node, symbolFlags, symbolExcludes); } } function declareClassMember(node, symbolFlags, symbolExcludes) { - return node.flags & 64 /* Static */ + return node.flags & 32 /* Static */ ? declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes) : declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); } @@ -13916,11 +15679,11 @@ var ts; : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); } function hasExportDeclarations(node) { - var body = node.kind === 251 /* SourceFile */ ? node : node.body; - if (body.kind === 251 /* SourceFile */ || body.kind === 222 /* ModuleBlock */) { + var body = node.kind === 256 /* SourceFile */ ? node : node.body; + if (body && (body.kind === 256 /* SourceFile */ || body.kind === 226 /* ModuleBlock */)) { for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { var stat = _a[_i]; - if (stat.kind === 231 /* ExportDeclaration */ || stat.kind === 230 /* ExportAssignment */) { + if (stat.kind === 236 /* ExportDeclaration */ || stat.kind === 235 /* ExportAssignment */) { return true; } } @@ -13931,19 +15694,37 @@ var ts; // A declaration source file or ambient module declaration that contains no export declarations (but possibly regular // declarations with export modifiers) is an export context in which declarations are implicitly exported. if (ts.isInAmbientContext(node) && !hasExportDeclarations(node)) { - node.flags |= 131072 /* ExportContext */; + node.flags |= 8192 /* ExportContext */; } else { - node.flags &= ~131072 /* ExportContext */; + node.flags &= ~8192 /* ExportContext */; } } function bindModuleDeclaration(node) { setExportContextFlag(node); if (ts.isAmbientModule(node)) { - if (node.flags & 2 /* Export */) { + if (node.flags & 1 /* Export */) { errorOnFirstToken(node, ts.Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible); } - declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); + if (ts.isExternalModuleAugmentation(node)) { + declareSymbolAndAddToSymbolTable(node, 1024 /* NamespaceModule */, 0 /* NamespaceModuleExcludes */); + } + else { + var pattern = void 0; + if (node.name.kind === 9 /* StringLiteral */) { + var text = node.name.text; + if (ts.hasZeroOrOneAsteriskCharacter(text)) { + pattern = ts.tryParsePattern(text); + } + else { + errorOnFirstToken(node.name, ts.Diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character, text); + } + } + var symbol = declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); + if (pattern) { + (file.patternAmbientModules || (file.patternAmbientModules = [])).push({ pattern: pattern, symbol: symbol }); + } + } } else { var state = getModuleInstanceState(node); @@ -13982,8 +15763,8 @@ var ts; addDeclarationToSymbol(symbol, node, 131072 /* Signature */); var typeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type"); addDeclarationToSymbol(typeLiteralSymbol, node, 2048 /* TypeLiteral */); - typeLiteralSymbol.members = (_a = {}, _a[symbol.name] = symbol, _a); - var _a; + typeLiteralSymbol.members = ts.createMap(); + typeLiteralSymbol.members[symbol.name] = symbol; } function bindObjectLiteralExpression(node) { var ElementKind; @@ -13992,14 +15773,14 @@ var ts; ElementKind[ElementKind["Accessor"] = 2] = "Accessor"; })(ElementKind || (ElementKind = {})); if (inStrictMode) { - var seen = {}; + var seen = ts.createMap(); for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var prop = _a[_i]; if (prop.name.kind !== 69 /* Identifier */) { continue; } var identifier = prop.name; - // ECMA-262 11.1.5 Object Initialiser + // ECMA-262 11.1.5 Object Initializer // If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true // a.This production is contained in strict code and IsDataDescriptor(previous) is true and // IsDataDescriptor(propId.descriptor) is true. @@ -14007,7 +15788,7 @@ var ts; // c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true. // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields - var currentKind = prop.kind === 248 /* PropertyAssignment */ || prop.kind === 249 /* ShorthandPropertyAssignment */ || prop.kind === 144 /* MethodDeclaration */ + var currentKind = prop.kind === 253 /* PropertyAssignment */ || prop.kind === 254 /* ShorthandPropertyAssignment */ || prop.kind === 147 /* MethodDeclaration */ ? 1 /* Property */ : 2 /* Accessor */; var existingKind = seen[identifier.text]; @@ -14029,10 +15810,10 @@ var ts; } function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { switch (blockScopeContainer.kind) { - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: declareModuleMember(node, symbolFlags, symbolExcludes); break; - case 251 /* SourceFile */: + case 256 /* SourceFile */: if (ts.isExternalModule(container)) { declareModuleMember(node, symbolFlags, symbolExcludes); break; @@ -14040,7 +15821,7 @@ var ts; // fall through. default: if (!blockScopeContainer.locals) { - blockScopeContainer.locals = {}; + blockScopeContainer.locals = ts.createMap(); addToContainerChain(blockScopeContainer); } declareSymbol(blockScopeContainer.locals, undefined, node, symbolFlags, symbolExcludes); @@ -14055,7 +15836,8 @@ var ts; if (inStrictMode && node.originalKeywordKind >= 106 /* FirstFutureReservedWord */ && node.originalKeywordKind <= 114 /* LastFutureReservedWord */ && - !ts.isIdentifierName(node)) { + !ts.isIdentifierName(node) && + !ts.isInAmbientContext(node)) { // Report error only if there are no parse errors in file if (!file.parseDiagnostics.length) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node, getStrictModeIdentifierMessage(node), ts.declarationNameToString(node))); @@ -14128,8 +15910,32 @@ var ts; checkStrictModeEvalOrArguments(node, node.name); } } + function getStrictModeBlockScopeFunctionDeclarationMessage(node) { + // Provide specialized messages to help the user understand why we think they're in + // strict mode. + if (ts.getContainingClass(node)) { + return ts.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode; + } + if (file.externalModuleIndicator) { + return ts.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode; + } + return ts.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5; + } + function checkStrictModeFunctionDeclaration(node) { + if (languageVersion < 2 /* ES6 */) { + // Report error if function is not top level function declaration + if (blockScopeContainer.kind !== 256 /* SourceFile */ && + blockScopeContainer.kind !== 225 /* ModuleDeclaration */ && + !ts.isFunctionLike(blockScopeContainer)) { + // We check first if the name is inside class declaration or class expression; if so give explicit message + // otherwise report generic error message. + var errorSpan = ts.getErrorSpanForNode(file, node); + file.bindDiagnostics.push(ts.createFileDiagnostic(file, errorSpan.start, errorSpan.length, getStrictModeBlockScopeFunctionDeclarationMessage(node))); + } + } + } function checkStrictModeNumericLiteral(node) { - if (inStrictMode && node.flags & 32768 /* OctalLiteral */) { + if (inStrictMode && node.isOctalLiteral) { file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode)); } } @@ -14168,11 +15974,8 @@ var ts; return; } node.parent = parent; - var savedInStrictMode = inStrictMode; - if (!savedInStrictMode) { - updateStrictMode(node); - } - // First we bind declaration nodes to a symbol if possible. We'll both create a symbol + var saveInStrictMode = inStrictMode; + // First we bind declaration nodes to a symbol if possible. We'll both create a symbol // and then potentially add the symbol to an appropriate symbol table. Possible // destination symbol tables are: // @@ -14180,43 +15983,39 @@ var ts; // 2) The 'members' table of the current container's symbol. // 3) The 'locals' table of the current container. // - // However, not all symbols will end up in any of these tables. 'Anonymous' symbols + // However, not all symbols will end up in any of these tables. 'Anonymous' symbols // (like TypeLiterals for example) will not be put in any table. bindWorker(node); - // Then we recurse into the children of the node to bind them as well. For certain - // symbols we do specialized work when we recurse. For example, we'll keep track of - // the current 'container' node when it changes. This helps us know which symbol table - // a local should go into for example. - bindChildren(node); - inStrictMode = savedInStrictMode; - } - function updateStrictMode(node) { - switch (node.kind) { - case 251 /* SourceFile */: - case 222 /* ModuleBlock */: - updateStrictModeStatementList(node.statements); - return; - case 195 /* Block */: - if (ts.isFunctionLike(node.parent)) { - updateStrictModeStatementList(node.statements); - } - return; - case 217 /* ClassDeclaration */: - case 189 /* ClassExpression */: - // All classes are automatically in strict mode in ES6. - inStrictMode = true; - return; + // Then we recurse into the children of the node to bind them as well. For certain + // symbols we do specialized work when we recurse. For example, we'll keep track of + // the current 'container' node when it changes. This helps us know which symbol table + // a local should go into for example. Since terminal nodes are known not to have + // children, as an optimization we don't process those. + if (node.kind > 138 /* LastToken */) { + var saveParent = parent; + parent = node; + var containerFlags = getContainerFlags(node); + if (containerFlags === 0 /* None */) { + bindChildren(node); + } + else { + bindContainer(node, containerFlags); + } + parent = saveParent; } + inStrictMode = saveInStrictMode; } function updateStrictModeStatementList(statements) { - for (var _i = 0, statements_1 = statements; _i < statements_1.length; _i++) { - var statement = statements_1[_i]; - if (!ts.isPrologueDirective(statement)) { - return; - } - if (isUseStrictPrologueDirective(statement)) { - inStrictMode = true; - return; + if (!inStrictMode) { + for (var _i = 0, statements_1 = statements; _i < statements_1.length; _i++) { + var statement = statements_1[_i]; + if (!ts.isPrologueDirective(statement)) { + return; + } + if (isUseStrictPrologueDirective(statement)) { + inStrictMode = true; + return; + } } } } @@ -14225,14 +16024,23 @@ var ts; var nodeText = ts.getTextOfNodeFromSourceText(file.text, node.expression); // Note: the node text must be exactly "use strict" or 'use strict'. It is not ok for the // string to contain unicode escapes (as per ES5). - return nodeText === "\"use strict\"" || nodeText === "'use strict'"; + return nodeText === '"use strict"' || nodeText === "'use strict'"; } function bindWorker(node) { switch (node.kind) { /* Strict mode checks */ case 69 /* Identifier */: + case 97 /* ThisKeyword */: + if (currentFlow && (ts.isExpression(node) || parent.kind === 254 /* ShorthandPropertyAssignment */)) { + node.flowNode = currentFlow; + } return checkStrictModeIdentifier(node); - case 184 /* BinaryExpression */: + case 172 /* PropertyAccessExpression */: + if (currentFlow && isNarrowableReference(node)) { + node.flowNode = currentFlow; + } + break; + case 187 /* BinaryExpression */: if (ts.isInJavaScriptFile(node)) { var specialKind = ts.getSpecialPropertyAssignmentKind(node); switch (specialKind) { @@ -14256,104 +16064,120 @@ var ts; } } return checkStrictModeBinaryExpression(node); - case 247 /* CatchClause */: + case 252 /* CatchClause */: return checkStrictModeCatchClause(node); - case 178 /* DeleteExpression */: + case 181 /* DeleteExpression */: return checkStrictModeDeleteExpression(node); case 8 /* NumericLiteral */: return checkStrictModeNumericLiteral(node); - case 183 /* PostfixUnaryExpression */: + case 186 /* PostfixUnaryExpression */: return checkStrictModePostfixUnaryExpression(node); - case 182 /* PrefixUnaryExpression */: + case 185 /* PrefixUnaryExpression */: return checkStrictModePrefixUnaryExpression(node); - case 208 /* WithStatement */: + case 212 /* WithStatement */: return checkStrictModeWithStatement(node); - case 162 /* ThisType */: + case 165 /* ThisType */: seenThisKeyword = true; return; - case 151 /* TypePredicate */: + case 154 /* TypePredicate */: return checkTypePredicate(node); - case 138 /* TypeParameter */: - return declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 530912 /* TypeParameterExcludes */); - case 139 /* Parameter */: + case 141 /* TypeParameter */: + return declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 530920 /* TypeParameterExcludes */); + case 142 /* Parameter */: return bindParameter(node); - case 214 /* VariableDeclaration */: - case 166 /* BindingElement */: + case 218 /* VariableDeclaration */: + case 169 /* BindingElement */: return bindVariableDeclarationOrBindingElement(node); - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - case 261 /* JSDocRecordMember */: - return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), 107455 /* PropertyExcludes */); - case 248 /* PropertyAssignment */: - case 249 /* ShorthandPropertyAssignment */: - return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 107455 /* PropertyExcludes */); - case 250 /* EnumMember */: - return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 107455 /* EnumMemberExcludes */); - case 242 /* JsxSpreadAttribute */: - hasJsxSpreadAttribute = true; + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + case 266 /* JSDocRecordMember */: + return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */); + case 280 /* JSDocPropertyTag */: + return bindJSDocProperty(node); + case 253 /* PropertyAssignment */: + case 254 /* ShorthandPropertyAssignment */: + return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); + case 255 /* EnumMember */: + return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); + case 247 /* JsxSpreadAttribute */: + emitFlags |= 1073741824 /* HasJsxSpreadAttribute */; return; - case 148 /* CallSignature */: - case 149 /* ConstructSignature */: - case 150 /* IndexSignature */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: + case 153 /* IndexSignature */: return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: // If this is an ObjectLiteralExpression method, then it sits in the same space // as other properties in the object literal. So we use SymbolFlags.PropertyExcludes // so that it will conflict with any other object literal members with the same // name. - return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 107455 /* PropertyExcludes */ : 99263 /* MethodExcludes */); - case 216 /* FunctionDeclaration */: + return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 99263 /* MethodExcludes */); + case 220 /* FunctionDeclaration */: return bindFunctionDeclaration(node); - case 145 /* Constructor */: + case 148 /* Constructor */: return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, /*symbolExcludes:*/ 0 /* None */); - case 146 /* GetAccessor */: + case 149 /* GetAccessor */: return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 41919 /* GetAccessorExcludes */); - case 147 /* SetAccessor */: + case 150 /* SetAccessor */: return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 74687 /* SetAccessorExcludes */); - case 153 /* FunctionType */: - case 154 /* ConstructorType */: - case 264 /* JSDocFunctionType */: + case 156 /* FunctionType */: + case 157 /* ConstructorType */: + case 269 /* JSDocFunctionType */: return bindFunctionOrConstructorType(node); - case 156 /* TypeLiteral */: - case 260 /* JSDocRecordType */: + case 159 /* TypeLiteral */: + case 281 /* JSDocTypeLiteral */: + case 265 /* JSDocRecordType */: return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type"); - case 168 /* ObjectLiteralExpression */: + case 171 /* ObjectLiteralExpression */: return bindObjectLiteralExpression(node); - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: return bindFunctionExpression(node); - case 171 /* CallExpression */: + case 174 /* CallExpression */: if (ts.isInJavaScriptFile(node)) { bindCallExpression(node); } break; // Members of classes, interfaces, and modules - case 189 /* ClassExpression */: - case 217 /* ClassDeclaration */: + case 192 /* ClassExpression */: + case 221 /* ClassDeclaration */: + // All classes are automatically in strict mode in ES6. + inStrictMode = true; return bindClassLikeDeclaration(node); - case 218 /* InterfaceDeclaration */: - return bindBlockScopedDeclaration(node, 64 /* Interface */, 792960 /* InterfaceExcludes */); - case 219 /* TypeAliasDeclaration */: - return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793056 /* TypeAliasExcludes */); - case 220 /* EnumDeclaration */: + case 222 /* InterfaceDeclaration */: + return bindBlockScopedDeclaration(node, 64 /* Interface */, 792968 /* InterfaceExcludes */); + case 279 /* JSDocTypedefTag */: + case 223 /* TypeAliasDeclaration */: + return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793064 /* TypeAliasExcludes */); + case 224 /* EnumDeclaration */: return bindEnumDeclaration(node); - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: return bindModuleDeclaration(node); // Imports and exports - case 224 /* ImportEqualsDeclaration */: - case 227 /* NamespaceImport */: - case 229 /* ImportSpecifier */: - case 233 /* ExportSpecifier */: + case 229 /* ImportEqualsDeclaration */: + case 232 /* NamespaceImport */: + case 234 /* ImportSpecifier */: + case 238 /* ExportSpecifier */: return declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); - case 226 /* ImportClause */: + case 228 /* NamespaceExportDeclaration */: + return bindNamespaceExportDeclaration(node); + case 231 /* ImportClause */: return bindImportClause(node); - case 231 /* ExportDeclaration */: + case 236 /* ExportDeclaration */: return bindExportDeclaration(node); - case 230 /* ExportAssignment */: + case 235 /* ExportAssignment */: return bindExportAssignment(node); - case 251 /* SourceFile */: + case 256 /* SourceFile */: + updateStrictModeStatementList(node.statements); return bindSourceFileIfExternalModule(); + case 199 /* Block */: + if (!ts.isFunctionLike(node.parent)) { + return; + } + // Fall through + case 226 /* ModuleBlock */: + return updateStrictModeStatementList(node.statements); } } function checkTypePredicate(node) { @@ -14361,7 +16185,7 @@ var ts; if (parameterName && parameterName.kind === 69 /* Identifier */) { checkStrictModeIdentifier(parameterName); } - if (parameterName && parameterName.kind === 162 /* ThisType */) { + if (parameterName && parameterName.kind === 165 /* ThisType */) { seenThisKeyword = true; } bind(type); @@ -14376,19 +16200,38 @@ var ts; bindAnonymousDeclaration(file, 512 /* ValueModule */, "\"" + ts.removeFileExtension(file.fileName) + "\""); } function bindExportAssignment(node) { - var boundExpression = node.kind === 230 /* ExportAssignment */ ? node.expression : node.right; if (!container.symbol || !container.symbol.exports) { // Export assignment in some sort of block construct bindAnonymousDeclaration(node, 8388608 /* Alias */, getDeclarationName(node)); } - else if (boundExpression.kind === 69 /* Identifier */ && node.kind === 230 /* ExportAssignment */) { - // An export default clause with an identifier exports all meanings of that identifier - declareSymbol(container.symbol.exports, container.symbol, node, 8388608 /* Alias */, 107455 /* PropertyExcludes */ | 8388608 /* AliasExcludes */); + else { + var flags = node.kind === 235 /* ExportAssignment */ && ts.exportAssignmentIsAlias(node) + ? 8388608 /* Alias */ + : 4 /* Property */; + declareSymbol(container.symbol.exports, container.symbol, node, flags, 0 /* PropertyExcludes */ | 8388608 /* AliasExcludes */); + } + } + function bindNamespaceExportDeclaration(node) { + if (node.modifiers && node.modifiers.length) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Modifiers_cannot_appear_here)); + } + if (node.parent.kind !== 256 /* SourceFile */) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_at_top_level)); + return; } else { - // An export default clause with an expression exports a value - declareSymbol(container.symbol.exports, container.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */ | 8388608 /* AliasExcludes */); + var parent_6 = node.parent; + if (!ts.isExternalModule(parent_6)) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_in_module_files)); + return; + } + if (!parent_6.isDeclarationFile) { + file.bindDiagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Global_module_exports_may_only_appear_in_declaration_files)); + return; + } } + file.symbol.globalExports = file.symbol.globalExports || ts.createMap(); + declareSymbol(file.symbol.globalExports, file.symbol, node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); } function bindExportDeclaration(node) { if (!container.symbol || !container.symbol.exports) { @@ -14423,11 +16266,24 @@ var ts; declareSymbol(file.symbol.exports, file.symbol, node, 4 /* Property */ | 7340032 /* Export */ | 512 /* ValueModule */, 0 /* None */); } function bindThisPropertyAssignment(node) { - // Declare a 'member' in case it turns out the container was an ES5 class - if (container.kind === 176 /* FunctionExpression */ || container.kind === 216 /* FunctionDeclaration */) { - container.symbol.members = container.symbol.members || {}; + ts.Debug.assert(ts.isInJavaScriptFile(node)); + // Declare a 'member' if the container is an ES5 class or ES6 constructor + if (container.kind === 220 /* FunctionDeclaration */ || container.kind === 179 /* FunctionExpression */) { + container.symbol.members = container.symbol.members || ts.createMap(); // It's acceptable for multiple 'this' assignments of the same identifier to occur - declareSymbol(container.symbol.members, container.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */ & ~4 /* Property */); + declareSymbol(container.symbol.members, container.symbol, node, 4 /* Property */, 0 /* PropertyExcludes */ & ~4 /* Property */); + } + else if (container.kind === 148 /* Constructor */) { + // this.foo assignment in a JavaScript class + // Bind this property to the containing class + var saveContainer = container; + container = container.parent; + var symbol = bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* None */); + if (symbol) { + // constructor-declared symbols can be overwritten by subsequent method declarations + symbol.isReplaceableByMethod = true; + } + container = saveContainer; } } function bindPrototypePropertyAssignment(node) { @@ -14442,16 +16298,15 @@ var ts; constructorFunction.parent = classPrototype; classPrototype.parent = leftSideOfAssignment; var funcSymbol = container.locals[constructorFunction.text]; - if (!funcSymbol || !(funcSymbol.flags & 16 /* Function */)) { + if (!funcSymbol || !(funcSymbol.flags & 16 /* Function */ || ts.isDeclarationOfFunctionExpression(funcSymbol))) { return; } // Set up the members collection if it doesn't exist already if (!funcSymbol.members) { - funcSymbol.members = {}; + funcSymbol.members = ts.createMap(); } // Declare the method/property - // It's acceptable for multiple prototype property assignments of the same identifier to occur - declareSymbol(funcSymbol.members, funcSymbol, leftSideOfAssignment, 4 /* Property */, 107455 /* PropertyExcludes */ & ~4 /* Property */); + declareSymbol(funcSymbol.members, funcSymbol, leftSideOfAssignment, 4 /* Property */, 0 /* PropertyExcludes */); } function bindCallExpression(node) { // We're only inspecting call expressions to detect CommonJS modules, so we can skip @@ -14463,13 +16318,13 @@ var ts; function bindClassLikeDeclaration(node) { if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { if (ts.getClassExtendsHeritageClauseElement(node) !== undefined) { - hasClassExtends = true; + emitFlags |= 262144 /* HasClassExtends */; } if (ts.nodeIsDecorated(node)) { - hasDecorators = true; + emitFlags |= 524288 /* HasDecorators */; } } - if (node.kind === 217 /* ClassDeclaration */) { + if (node.kind === 221 /* ClassDeclaration */) { bindBlockScopedDeclaration(node, 32 /* Class */, 899519 /* ClassExcludes */); } else { @@ -14491,7 +16346,7 @@ var ts; // module might have an exported variable called 'prototype'. We can't allow that as // that would clash with the built-in 'prototype' for the class. var prototypeSymbol = createSymbol(4 /* Property */ | 134217728 /* Prototype */, "prototype"); - if (ts.hasProperty(symbol.exports, prototypeSymbol.name)) { + if (symbol.exports[prototypeSymbol.name]) { if (node.name) { node.name.parent = node; } @@ -14534,8 +16389,7 @@ var ts; if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node) && ts.nodeIsDecorated(node)) { - hasDecorators = true; - hasParameterDecorators = true; + emitFlags |= (524288 /* HasDecorators */ | 1048576 /* HasParamDecorators */); } if (inStrictMode) { // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a @@ -14552,24 +16406,33 @@ var ts; // containing class. if (ts.isParameterPropertyDeclaration(node)) { var classDeclaration = node.parent.parent; - declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */); + declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */); } } function bindFunctionDeclaration(node) { if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { if (ts.isAsyncFunctionLike(node)) { - hasAsyncFunctions = true; + emitFlags |= 2097152 /* HasAsyncFunctions */; } } checkStrictModeFunctionName(node); - return declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 106927 /* FunctionExcludes */); + if (inStrictMode) { + checkStrictModeFunctionDeclaration(node); + bindBlockScopedDeclaration(node, 16 /* Function */, 106927 /* FunctionExcludes */); + } + else { + declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 106927 /* FunctionExcludes */); + } } function bindFunctionExpression(node) { if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { if (ts.isAsyncFunctionLike(node)) { - hasAsyncFunctions = true; + emitFlags |= 2097152 /* HasAsyncFunctions */; } } + if (currentFlow) { + node.flowNode = currentFlow; + } checkStrictModeFunctionName(node); var bindingName = node.name ? node.name.text : "__function"; return bindAnonymousDeclaration(node, 16 /* Function */, bindingName); @@ -14577,121 +16440,60 @@ var ts; function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { if (!ts.isDeclarationFile(file) && !ts.isInAmbientContext(node)) { if (ts.isAsyncFunctionLike(node)) { - hasAsyncFunctions = true; + emitFlags |= 2097152 /* HasAsyncFunctions */; } if (ts.nodeIsDecorated(node)) { - hasDecorators = true; + emitFlags |= 524288 /* HasDecorators */; } } return ts.hasDynamicName(node) ? bindAnonymousDeclaration(node, symbolFlags, "__computed") : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); } + function bindJSDocProperty(node) { + return declareSymbolAndAddToSymbolTable(node, 4 /* Property */, 0 /* PropertyExcludes */); + } // reachability checks - function pushNamedLabel(name) { - initializeReachabilityStateIfNecessary(); - if (ts.hasProperty(labelIndexMap, name.text)) { - return false; - } - labelIndexMap[name.text] = labelStack.push(1 /* Unintialized */) - 1; - return true; - } - function pushImplicitLabel() { - initializeReachabilityStateIfNecessary(); - var index = labelStack.push(1 /* Unintialized */) - 1; - implicitLabels.push(index); - return index; - } - function popNamedLabel(label, outerState) { - var index = labelIndexMap[label.text]; - ts.Debug.assert(index !== undefined); - ts.Debug.assert(labelStack.length == index + 1); - labelIndexMap[label.text] = undefined; - setCurrentStateAtLabel(labelStack.pop(), outerState, label); - } - function popImplicitLabel(implicitLabelIndex, outerState) { - if (labelStack.length !== implicitLabelIndex + 1) { - ts.Debug.assert(false, "Label stack: " + labelStack.length + ", index:" + implicitLabelIndex); - } - var i = implicitLabels.pop(); - if (implicitLabelIndex !== i) { - ts.Debug.assert(false, "i: " + i + ", index: " + implicitLabelIndex); - } - setCurrentStateAtLabel(labelStack.pop(), outerState, /*name*/ undefined); - } - function setCurrentStateAtLabel(innerMergedState, outerState, label) { - if (innerMergedState === 1 /* Unintialized */) { - if (label && !options.allowUnusedLabels) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(label, ts.Diagnostics.Unused_label)); - } - currentReachabilityState = outerState; - } - else { - currentReachabilityState = or(innerMergedState, outerState); - } - } - function jumpToLabel(label, outerState) { - initializeReachabilityStateIfNecessary(); - var index = label ? labelIndexMap[label.text] : ts.lastOrUndefined(implicitLabels); - if (index === undefined) { - // reference to unknown label or - // break/continue used outside of loops - return false; - } - var stateAtLabel = labelStack[index]; - labelStack[index] = stateAtLabel === 1 /* Unintialized */ ? outerState : or(stateAtLabel, outerState); - return true; + function shouldReportErrorOnModuleDeclaration(node) { + var instanceState = getModuleInstanceState(node); + return instanceState === 1 /* Instantiated */ || (instanceState === 2 /* ConstEnumOnly */ && options.preserveConstEnums); } function checkUnreachable(node) { - switch (currentReachabilityState) { - case 4 /* Unreachable */: - var reportError = - // report error on all statements except empty ones - (ts.isStatement(node) && node.kind !== 197 /* EmptyStatement */) || - // report error on class declarations - node.kind === 217 /* ClassDeclaration */ || - // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - (node.kind === 221 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) || - // report error on regular enums and const enums if preserveConstEnums is set - (node.kind === 220 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); - if (reportError) { - currentReachabilityState = 8 /* ReportedUnreachable */; - // unreachable code is reported if - // - user has explicitly asked about it AND - // - statement is in not ambient context (statements in ambient context is already an error - // so we should not report extras) AND - // - node is not variable statement OR - // - node is block scoped variable statement OR - // - node is not block scoped variable statement and at least one variable declaration has initializer - // Rationale: we don't want to report errors on non-initialized var's since they are hoisted - // On the other side we do want to report errors on non-initialized 'lets' because of TDZ - var reportUnreachableCode = !options.allowUnreachableCode && - !ts.isInAmbientContext(node) && - (node.kind !== 196 /* VariableStatement */ || - ts.getCombinedNodeFlags(node.declarationList) & 24576 /* BlockScoped */ || - ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); - if (reportUnreachableCode) { - errorOnFirstToken(node, ts.Diagnostics.Unreachable_code_detected); - } + if (!(currentFlow.flags & 1 /* Unreachable */)) { + return false; + } + if (currentFlow === unreachableFlow) { + var reportError = + // report error on all statements except empty ones + (ts.isStatement(node) && node.kind !== 201 /* EmptyStatement */) || + // report error on class declarations + node.kind === 221 /* ClassDeclaration */ || + // report error on instantiated modules or const-enums only modules if preserveConstEnums is set + (node.kind === 225 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)) || + // report error on regular enums and const enums if preserveConstEnums is set + (node.kind === 224 /* EnumDeclaration */ && (!ts.isConstEnumDeclaration(node) || options.preserveConstEnums)); + if (reportError) { + currentFlow = reportedUnreachableFlow; + // unreachable code is reported if + // - user has explicitly asked about it AND + // - statement is in not ambient context (statements in ambient context is already an error + // so we should not report extras) AND + // - node is not variable statement OR + // - node is block scoped variable statement OR + // - node is not block scoped variable statement and at least one variable declaration has initializer + // Rationale: we don't want to report errors on non-initialized var's since they are hoisted + // On the other side we do want to report errors on non-initialized 'lets' because of TDZ + var reportUnreachableCode = !options.allowUnreachableCode && + !ts.isInAmbientContext(node) && + (node.kind !== 200 /* VariableStatement */ || + ts.getCombinedNodeFlags(node.declarationList) & 3072 /* BlockScoped */ || + ts.forEach(node.declarationList.declarations, function (d) { return d.initializer; })); + if (reportUnreachableCode) { + errorOnFirstToken(node, ts.Diagnostics.Unreachable_code_detected); } - case 8 /* ReportedUnreachable */: - return true; - default: - return false; + } } - function shouldReportErrorOnModuleDeclaration(node) { - var instanceState = getModuleInstanceState(node); - return instanceState === 1 /* Instantiated */ || (instanceState === 2 /* ConstEnumOnly */ && options.preserveConstEnums); - } - } - function initializeReachabilityStateIfNecessary() { - if (labelIndexMap) { - return; - } - currentReachabilityState = 2 /* Reachable */; - labelIndexMap = {}; - labelStack = []; - implicitLabels = []; + return true; } } })(ts || (ts = {})); @@ -14702,6 +16504,7 @@ var ts; var nextSymbolId = 1; var nextNodeId = 1; var nextMergeId = 1; + var nextFlowId = 1; function getNodeId(node) { if (!node.id) { node.id = nextNodeId; @@ -14710,7 +16513,6 @@ var ts; return node.id; } ts.getNodeId = getNodeId; - ts.checkTime = 0; function getSymbolId(symbol) { if (!symbol.id) { symbol.id = nextSymbolId; @@ -14736,11 +16538,13 @@ var ts; var typeCount = 0; var symbolCount = 0; var emptyArray = []; - var emptySymbols = {}; + var emptySymbols = ts.createMap(); var compilerOptions = host.getCompilerOptions(); var languageVersion = compilerOptions.target || 0 /* ES3 */; var modulekind = ts.getEmitModuleKind(compilerOptions); - var allowSyntheticDefaultImports = typeof compilerOptions.allowSyntheticDefaultImports !== "undefined" ? compilerOptions.allowSyntheticDefaultImports : modulekind === 4 /* System */; + var noUnusedIdentifiers = !!compilerOptions.noUnusedLocals || !!compilerOptions.noUnusedParameters; + var allowSyntheticDefaultImports = typeof compilerOptions.allowSyntheticDefaultImports !== "undefined" ? compilerOptions.allowSyntheticDefaultImports : modulekind === ts.ModuleKind.System; + var strictNullChecks = compilerOptions.strictNullChecks; var emitResolver = createResolver(); var undefinedSymbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "undefined"); undefinedSymbol.declarations = []; @@ -14755,9 +16559,7 @@ var ts; isUnknownSymbol: function (symbol) { return symbol === unknownSymbol; }, getDiagnostics: getDiagnostics, getGlobalDiagnostics: getGlobalDiagnostics, - // The language service will always care about the narrowed type of a symbol, because that is - // the type the language says the symbol should have. - getTypeOfSymbolAtLocation: getNarrowedTypeOfSymbol, + getTypeOfSymbolAtLocation: getTypeOfSymbolAtLocation, getSymbolsOfParameterPropertyDeclaration: getSymbolsOfParameterPropertyDeclaration, getDeclaredTypeOfSymbol: getDeclaredTypeOfSymbol, getPropertiesOfType: getPropertiesOfType, @@ -14766,11 +16568,13 @@ var ts; getIndexTypeOfType: getIndexTypeOfType, getBaseTypes: getBaseTypes, getReturnTypeOfSignature: getReturnTypeOfSignature, + getNonNullableType: getNonNullableType, getSymbolsInScope: getSymbolsInScope, getSymbolAtLocation: getSymbolAtLocation, getShorthandAssignmentValueSymbol: getShorthandAssignmentValueSymbol, getExportSpecifierLocalTargetSymbol: getExportSpecifierLocalTargetSymbol, getTypeAtLocation: getTypeOfNode, + getPropertySymbolOfDestructuringAssignment: getPropertySymbolOfDestructuringAssignment, typeToString: typeToString, getSymbolDisplayBuilder: getSymbolDisplayBuilder, symbolToString: symbolToString, @@ -14790,44 +16594,66 @@ var ts; getJsxIntrinsicTagNames: getJsxIntrinsicTagNames, isOptionalParameter: isOptionalParameter }; + var tupleTypes = []; + var unionTypes = ts.createMap(); + var intersectionTypes = ts.createMap(); + var stringLiteralTypes = ts.createMap(); + var numericLiteralTypes = ts.createMap(); var unknownSymbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "unknown"); var resolvingSymbol = createSymbol(67108864 /* Transient */, "__resolving__"); var anyType = createIntrinsicType(1 /* Any */, "any"); + var unknownType = createIntrinsicType(1 /* Any */, "unknown"); + var undefinedType = createIntrinsicType(2048 /* Undefined */, "undefined"); + var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(2048 /* Undefined */ | 33554432 /* ContainsWideningType */, "undefined"); + var nullType = createIntrinsicType(4096 /* Null */, "null"); + var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(4096 /* Null */ | 33554432 /* ContainsWideningType */, "null"); var stringType = createIntrinsicType(2 /* String */, "string"); var numberType = createIntrinsicType(4 /* Number */, "number"); - var booleanType = createIntrinsicType(8 /* Boolean */, "boolean"); - var esSymbolType = createIntrinsicType(16777216 /* ESSymbol */, "symbol"); - var voidType = createIntrinsicType(16 /* Void */, "void"); - var undefinedType = createIntrinsicType(32 /* Undefined */ | 2097152 /* ContainsUndefinedOrNull */, "undefined"); - var nullType = createIntrinsicType(64 /* Null */ | 2097152 /* ContainsUndefinedOrNull */, "null"); - var unknownType = createIntrinsicType(1 /* Any */, "unknown"); + var trueType = createIntrinsicType(128 /* BooleanLiteral */, "true"); + var falseType = createIntrinsicType(128 /* BooleanLiteral */, "false"); + var booleanType = createBooleanType([trueType, falseType]); + var esSymbolType = createIntrinsicType(512 /* ESSymbol */, "symbol"); + var voidType = createIntrinsicType(1024 /* Void */, "void"); + var neverType = createIntrinsicType(8192 /* Never */, "never"); var emptyObjectType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - var emptyUnionType = emptyObjectType; var emptyGenericType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - emptyGenericType.instantiations = {}; + emptyGenericType.instantiations = ts.createMap(); var anyFunctionType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); // The anyFunctionType contains the anyFunctionType by definition. The flag is further propagated // in getPropagatingFlagsOfTypes, and it is checked in inferFromTypes. - anyFunctionType.flags |= 8388608 /* ContainsAnyFunctionType */; + anyFunctionType.flags |= 134217728 /* ContainsAnyFunctionType */; var noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - var anySignature = createSignature(undefined, undefined, emptyArray, anyType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasStringLiterals*/ false); - var unknownSignature = createSignature(undefined, undefined, emptyArray, unknownType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasStringLiterals*/ false); - var globals = {}; - var globalESSymbolConstructorSymbol; + var anySignature = createSignature(undefined, undefined, undefined, emptyArray, anyType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + var unknownSignature = createSignature(undefined, undefined, undefined, emptyArray, unknownType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + var resolvingSignature = createSignature(undefined, undefined, undefined, emptyArray, anyType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + var enumNumberIndexInfo = createIndexInfo(stringType, /*isReadonly*/ true); + var globals = ts.createMap(); + /** + * List of every ambient module with a "*" wildcard. + * Unlike other ambient modules, these can't be stored in `globals` because symbol tables only deal with exact matches. + * This is only used if there is no exact match. + */ + var patternAmbientModules; + var getGlobalESSymbolConstructorSymbol; var getGlobalPromiseConstructorSymbol; var globalObjectType; var globalFunctionType; var globalArrayType; + var globalReadonlyArrayType; var globalStringType; var globalNumberType; var globalBooleanType; var globalRegExpType; - var globalTemplateStringsArrayType; - var globalESSymbolType; - var globalIterableType; - var globalIteratorType; - var globalIterableIteratorType; var anyArrayType; + var anyReadonlyArrayType; + // The library files are only loaded when the feature is used. + // This allows users to just specify library files they want to used through --lib + // and they will not get an error from not having unrelated library files + var getGlobalTemplateStringsArrayType; + var getGlobalESSymbolType; + var getGlobalIterableType; + var getGlobalIteratorType; + var getGlobalIterableIteratorType; var getGlobalClassDecoratorType; var getGlobalParameterDecoratorType; var getGlobalPropertyDecoratorType; @@ -14841,44 +16667,118 @@ var ts; var getGlobalThenableType; var jsxElementClassType; var deferredNodes; - var tupleTypes = {}; - var unionTypes = {}; - var intersectionTypes = {}; - var stringLiteralTypes = {}; + var deferredUnusedIdentifierNodes; + var flowLoopStart = 0; + var flowLoopCount = 0; + var visitedFlowCount = 0; + var emptyStringType = getLiteralTypeForText(32 /* StringLiteral */, ""); + var zeroType = getLiteralTypeForText(64 /* NumberLiteral */, "0"); var resolutionTargets = []; var resolutionResults = []; var resolutionPropertyNames = []; var mergedSymbols = []; var symbolLinks = []; var nodeLinks = []; + var flowLoopCaches = []; + var flowLoopNodes = []; + var flowLoopKeys = []; + var flowLoopTypes = []; + var visitedFlowNodes = []; + var visitedFlowTypes = []; var potentialThisCollisions = []; var awaitedTypeStack = []; var diagnostics = ts.createDiagnosticCollection(); - var primitiveTypeInfo = { - "string": { - type: stringType, - flags: 258 /* StringLike */ - }, - "number": { - type: numberType, - flags: 132 /* NumberLike */ - }, - "boolean": { - type: booleanType, - flags: 8 /* Boolean */ - }, - "symbol": { - type: esSymbolType, - flags: 16777216 /* ESSymbol */ - }, - "undefined": { - type: undefinedType, - flags: 2097152 /* ContainsUndefinedOrNull */ - } - }; + var TypeFacts; + (function (TypeFacts) { + TypeFacts[TypeFacts["None"] = 0] = "None"; + TypeFacts[TypeFacts["TypeofEQString"] = 1] = "TypeofEQString"; + TypeFacts[TypeFacts["TypeofEQNumber"] = 2] = "TypeofEQNumber"; + TypeFacts[TypeFacts["TypeofEQBoolean"] = 4] = "TypeofEQBoolean"; + TypeFacts[TypeFacts["TypeofEQSymbol"] = 8] = "TypeofEQSymbol"; + TypeFacts[TypeFacts["TypeofEQObject"] = 16] = "TypeofEQObject"; + TypeFacts[TypeFacts["TypeofEQFunction"] = 32] = "TypeofEQFunction"; + TypeFacts[TypeFacts["TypeofEQHostObject"] = 64] = "TypeofEQHostObject"; + TypeFacts[TypeFacts["TypeofNEString"] = 128] = "TypeofNEString"; + TypeFacts[TypeFacts["TypeofNENumber"] = 256] = "TypeofNENumber"; + TypeFacts[TypeFacts["TypeofNEBoolean"] = 512] = "TypeofNEBoolean"; + TypeFacts[TypeFacts["TypeofNESymbol"] = 1024] = "TypeofNESymbol"; + TypeFacts[TypeFacts["TypeofNEObject"] = 2048] = "TypeofNEObject"; + TypeFacts[TypeFacts["TypeofNEFunction"] = 4096] = "TypeofNEFunction"; + TypeFacts[TypeFacts["TypeofNEHostObject"] = 8192] = "TypeofNEHostObject"; + TypeFacts[TypeFacts["EQUndefined"] = 16384] = "EQUndefined"; + TypeFacts[TypeFacts["EQNull"] = 32768] = "EQNull"; + TypeFacts[TypeFacts["EQUndefinedOrNull"] = 65536] = "EQUndefinedOrNull"; + TypeFacts[TypeFacts["NEUndefined"] = 131072] = "NEUndefined"; + TypeFacts[TypeFacts["NENull"] = 262144] = "NENull"; + TypeFacts[TypeFacts["NEUndefinedOrNull"] = 524288] = "NEUndefinedOrNull"; + TypeFacts[TypeFacts["Truthy"] = 1048576] = "Truthy"; + TypeFacts[TypeFacts["Falsy"] = 2097152] = "Falsy"; + TypeFacts[TypeFacts["Discriminatable"] = 4194304] = "Discriminatable"; + TypeFacts[TypeFacts["All"] = 8388607] = "All"; + // The following members encode facts about particular kinds of types for use in the getTypeFacts function. + // The presence of a particular fact means that the given test is true for some (and possibly all) values + // of that kind of type. + TypeFacts[TypeFacts["BaseStringStrictFacts"] = 933633] = "BaseStringStrictFacts"; + TypeFacts[TypeFacts["BaseStringFacts"] = 3145473] = "BaseStringFacts"; + TypeFacts[TypeFacts["StringStrictFacts"] = 4079361] = "StringStrictFacts"; + TypeFacts[TypeFacts["StringFacts"] = 4194049] = "StringFacts"; + TypeFacts[TypeFacts["EmptyStringStrictFacts"] = 3030785] = "EmptyStringStrictFacts"; + TypeFacts[TypeFacts["EmptyStringFacts"] = 3145473] = "EmptyStringFacts"; + TypeFacts[TypeFacts["NonEmptyStringStrictFacts"] = 1982209] = "NonEmptyStringStrictFacts"; + TypeFacts[TypeFacts["NonEmptyStringFacts"] = 4194049] = "NonEmptyStringFacts"; + TypeFacts[TypeFacts["BaseNumberStrictFacts"] = 933506] = "BaseNumberStrictFacts"; + TypeFacts[TypeFacts["BaseNumberFacts"] = 3145346] = "BaseNumberFacts"; + TypeFacts[TypeFacts["NumberStrictFacts"] = 4079234] = "NumberStrictFacts"; + TypeFacts[TypeFacts["NumberFacts"] = 4193922] = "NumberFacts"; + TypeFacts[TypeFacts["ZeroStrictFacts"] = 3030658] = "ZeroStrictFacts"; + TypeFacts[TypeFacts["ZeroFacts"] = 3145346] = "ZeroFacts"; + TypeFacts[TypeFacts["NonZeroStrictFacts"] = 1982082] = "NonZeroStrictFacts"; + TypeFacts[TypeFacts["NonZeroFacts"] = 4193922] = "NonZeroFacts"; + TypeFacts[TypeFacts["BaseBooleanStrictFacts"] = 933252] = "BaseBooleanStrictFacts"; + TypeFacts[TypeFacts["BaseBooleanFacts"] = 3145092] = "BaseBooleanFacts"; + TypeFacts[TypeFacts["BooleanStrictFacts"] = 4078980] = "BooleanStrictFacts"; + TypeFacts[TypeFacts["BooleanFacts"] = 4193668] = "BooleanFacts"; + TypeFacts[TypeFacts["FalseStrictFacts"] = 3030404] = "FalseStrictFacts"; + TypeFacts[TypeFacts["FalseFacts"] = 3145092] = "FalseFacts"; + TypeFacts[TypeFacts["TrueStrictFacts"] = 1981828] = "TrueStrictFacts"; + TypeFacts[TypeFacts["TrueFacts"] = 4193668] = "TrueFacts"; + TypeFacts[TypeFacts["SymbolStrictFacts"] = 1981320] = "SymbolStrictFacts"; + TypeFacts[TypeFacts["SymbolFacts"] = 4193160] = "SymbolFacts"; + TypeFacts[TypeFacts["ObjectStrictFacts"] = 6166480] = "ObjectStrictFacts"; + TypeFacts[TypeFacts["ObjectFacts"] = 8378320] = "ObjectFacts"; + TypeFacts[TypeFacts["FunctionStrictFacts"] = 6164448] = "FunctionStrictFacts"; + TypeFacts[TypeFacts["FunctionFacts"] = 8376288] = "FunctionFacts"; + TypeFacts[TypeFacts["UndefinedFacts"] = 2457472] = "UndefinedFacts"; + TypeFacts[TypeFacts["NullFacts"] = 2340752] = "NullFacts"; + })(TypeFacts || (TypeFacts = {})); + var typeofEQFacts = ts.createMap({ + "string": 1 /* TypeofEQString */, + "number": 2 /* TypeofEQNumber */, + "boolean": 4 /* TypeofEQBoolean */, + "symbol": 8 /* TypeofEQSymbol */, + "undefined": 16384 /* EQUndefined */, + "object": 16 /* TypeofEQObject */, + "function": 32 /* TypeofEQFunction */ + }); + var typeofNEFacts = ts.createMap({ + "string": 128 /* TypeofNEString */, + "number": 256 /* TypeofNENumber */, + "boolean": 512 /* TypeofNEBoolean */, + "symbol": 1024 /* TypeofNESymbol */, + "undefined": 131072 /* NEUndefined */, + "object": 2048 /* TypeofNEObject */, + "function": 4096 /* TypeofNEFunction */ + }); + var typeofTypesByName = ts.createMap({ + "string": stringType, + "number": numberType, + "boolean": booleanType, + "symbol": esSymbolType, + "undefined": undefinedType + }); var jsxElementType; /** Things we lazy load from the JSX namespace */ - var jsxTypes = {}; + var jsxTypes = ts.createMap(); var JsxNames = { JSX: "JSX", IntrinsicElements: "IntrinsicElements", @@ -14888,9 +16788,11 @@ var ts; IntrinsicAttributes: "IntrinsicAttributes", IntrinsicClassAttributes: "IntrinsicClassAttributes" }; - var subtypeRelation = {}; - var assignableRelation = {}; - var identityRelation = {}; + var subtypeRelation = ts.createMap(); + var assignableRelation = ts.createMap(); + var comparableRelation = ts.createMap(); + var identityRelation = ts.createMap(); + var enumRelation = ts.createMap(); // This is for caching the result of getSymbolDisplayBuilder. Do not access directly. var _displayBuilder; var TypeSystemPropertyName; @@ -14900,10 +16802,8 @@ var ts; TypeSystemPropertyName[TypeSystemPropertyName["DeclaredType"] = 2] = "DeclaredType"; TypeSystemPropertyName[TypeSystemPropertyName["ResolvedReturnType"] = 3] = "ResolvedReturnType"; })(TypeSystemPropertyName || (TypeSystemPropertyName = {})); - var builtinGlobals = (_a = {}, - _a[undefinedSymbol.name] = undefinedSymbol, - _a - ); + var builtinGlobals = ts.createMap(); + builtinGlobals[undefinedSymbol.name] = undefinedSymbol; initializeTypeChecker(); return checker; function getEmitResolver(sourceFile, cancellationToken) { @@ -14929,15 +16829,15 @@ var ts; if (flags & 1 /* FunctionScopedVariable */) result |= 107454 /* FunctionScopedVariableExcludes */; if (flags & 4 /* Property */) - result |= 107455 /* PropertyExcludes */; + result |= 0 /* PropertyExcludes */; if (flags & 8 /* EnumMember */) - result |= 107455 /* EnumMemberExcludes */; + result |= 900095 /* EnumMemberExcludes */; if (flags & 16 /* Function */) result |= 106927 /* FunctionExcludes */; if (flags & 32 /* Class */) result |= 899519 /* ClassExcludes */; if (flags & 64 /* Interface */) - result |= 792960 /* InterfaceExcludes */; + result |= 792968 /* InterfaceExcludes */; if (flags & 256 /* RegularEnum */) result |= 899327 /* RegularEnumExcludes */; if (flags & 128 /* ConstEnum */) @@ -14951,9 +16851,9 @@ var ts; if (flags & 65536 /* SetAccessor */) result |= 74687 /* SetAccessorExcludes */; if (flags & 262144 /* TypeParameter */) - result |= 530912 /* TypeParameterExcludes */; + result |= 530920 /* TypeParameterExcludes */; if (flags & 524288 /* TypeAlias */) - result |= 793056 /* TypeAliasExcludes */; + result |= 793064 /* TypeAliasExcludes */; if (flags & 8388608 /* Alias */) result |= 8388608 /* AliasExcludes */; return result; @@ -14974,9 +16874,9 @@ var ts; if (symbol.constEnumOnlyModule) result.constEnumOnlyModule = true; if (symbol.members) - result.members = cloneSymbolTable(symbol.members); + result.members = ts.cloneMap(symbol.members); if (symbol.exports) - result.exports = cloneSymbolTable(symbol.exports); + result.exports = ts.cloneMap(symbol.exports); recordMergedSymbol(result, symbol); return result; } @@ -14989,7 +16889,7 @@ var ts; target.flags |= source.flags; if (source.valueDeclaration && (!target.valueDeclaration || - (target.valueDeclaration.kind === 221 /* ModuleDeclaration */ && source.valueDeclaration.kind !== 221 /* ModuleDeclaration */))) { + (target.valueDeclaration.kind === 225 /* ModuleDeclaration */ && source.valueDeclaration.kind !== 225 /* ModuleDeclaration */))) { // other kinds of value declarations take precedence over modules target.valueDeclaration = source.valueDeclaration; } @@ -14998,12 +16898,12 @@ var ts; }); if (source.members) { if (!target.members) - target.members = {}; + target.members = ts.createMap(); mergeSymbolTable(target.members, source.members); } if (source.exports) { if (!target.exports) - target.exports = {}; + target.exports = ts.createMap(); mergeSymbolTable(target.exports, source.exports); } recordMergedSymbol(target, source); @@ -15019,34 +16919,23 @@ var ts; }); } } - function cloneSymbolTable(symbolTable) { - var result = {}; - for (var id in symbolTable) { - if (ts.hasProperty(symbolTable, id)) { - result[id] = symbolTable[id]; - } - } - return result; - } function mergeSymbolTable(target, source) { for (var id in source) { - if (ts.hasProperty(source, id)) { - if (!ts.hasProperty(target, id)) { - target[id] = source[id]; - } - else { - var symbol = target[id]; - if (!(symbol.flags & 33554432 /* Merged */)) { - target[id] = symbol = cloneSymbol(symbol); - } - mergeSymbol(symbol, source[id]); + var targetSymbol = target[id]; + if (!targetSymbol) { + target[id] = source[id]; + } + else { + if (!(targetSymbol.flags & 33554432 /* Merged */)) { + target[id] = targetSymbol = cloneSymbol(targetSymbol); } + mergeSymbol(targetSymbol, source[id]); } } } function mergeModuleAugmentation(moduleName) { var moduleAugmentation = moduleName.parent; - if (moduleAugmentation.symbol.valueDeclaration !== moduleAugmentation) { + if (moduleAugmentation.symbol.declarations[0] !== moduleAugmentation) { // this is a combined symbol for multiple augmentations within the same file. // its symbol already has accumulated information for all declarations // so we need to add it just once - do the work only for first declaration @@ -15058,13 +16947,17 @@ var ts; } else { // find a module that about to be augmented - var mainModule = resolveExternalModuleNameWorker(moduleName, moduleName, ts.Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found); + // do not validate names of augmentations that are defined in ambient context + var moduleNotFoundError = !ts.isInAmbientContext(moduleName.parent.parent) + ? ts.Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found + : undefined; + var mainModule = resolveExternalModuleNameWorker(moduleName, moduleName, moduleNotFoundError); if (!mainModule) { return; } // obtain item referenced by 'export=' mainModule = resolveExternalModuleSymbol(mainModule); - if (mainModule.flags & 1536 /* Namespace */) { + if (mainModule.flags & 1920 /* Namespace */) { // if module symbol has already been merged - it is safe to use it. // otherwise clone it mainModule = mainModule.flags & 33554432 /* Merged */ ? mainModule : cloneSymbol(mainModule); @@ -15077,14 +16970,12 @@ var ts; } function addToSymbolTable(target, source, message) { for (var id in source) { - if (ts.hasProperty(source, id)) { - if (ts.hasProperty(target, id)) { - // Error on redeclarations - ts.forEach(target[id].declarations, addDeclarationDiagnostic(id, message)); - } - else { - target[id] = source[id]; - } + if (target[id]) { + // Error on redeclarations + ts.forEach(target[id].declarations, addDeclarationDiagnostic(id, message)); + } + else { + target[id] = source[id]; } } function addDeclarationDiagnostic(id, message) { @@ -15099,24 +16990,26 @@ var ts; } function getNodeLinks(node) { var nodeId = getNodeId(node); - return nodeLinks[nodeId] || (nodeLinks[nodeId] = {}); + return nodeLinks[nodeId] || (nodeLinks[nodeId] = { flags: 0 }); } function isGlobalSourceFile(node) { - return node.kind === 251 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node); + return node.kind === 256 /* SourceFile */ && !ts.isExternalOrCommonJsModule(node); } function getSymbol(symbols, name, meaning) { - if (meaning && ts.hasProperty(symbols, name)) { + if (meaning) { var symbol = symbols[name]; - ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - if (symbol.flags & meaning) { - return symbol; - } - if (symbol.flags & 8388608 /* Alias */) { - var target = resolveAlias(symbol); - // Unknown symbol means an error occurred in alias resolution, treat it as positive answer to avoid cascading errors - if (target === unknownSymbol || target.flags & meaning) { + if (symbol) { + ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); + if (symbol.flags & meaning) { return symbol; } + if (symbol.flags & 8388608 /* Alias */) { + var target = resolveAlias(symbol); + // Unknown symbol means an error occurred in alias resolution, treat it as positive answer to avoid cascading errors + if (target === unknownSymbol || target.flags & meaning) { + return symbol; + } + } } } // return undefined if we can't find a symbol. @@ -15128,9 +17021,9 @@ var ts; * @return a tuple of two symbols */ function getSymbolsOfParameterPropertyDeclaration(parameter, parameterName) { - var constructoDeclaration = parameter.parent; + var constructorDeclaration = parameter.parent; var classDeclaration = parameter.parent.parent; - var parameterSymbol = getSymbol(constructoDeclaration.locals, parameterName, 107455 /* Value */); + var parameterSymbol = getSymbol(constructorDeclaration.locals, parameterName, 107455 /* Value */); var propertySymbol = getSymbol(classDeclaration.symbol.members, parameterName, 107455 /* Value */); if (parameterSymbol && propertySymbol) { return [parameterSymbol, propertySymbol]; @@ -15141,7 +17034,8 @@ var ts; var declarationFile = ts.getSourceFileOfNode(declaration); var useFile = ts.getSourceFileOfNode(usage); if (declarationFile !== useFile) { - if (modulekind || (!compilerOptions.outFile && !compilerOptions.out)) { + if ((modulekind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator)) || + (!compilerOptions.outFile && !compilerOptions.out)) { // nodes are in different files and order cannot be determines return true; } @@ -15151,7 +17045,7 @@ var ts; if (declaration.pos <= usage.pos) { // declaration is before usage // still might be illegal if usage is in the initializer of the variable declaration - return declaration.kind !== 214 /* VariableDeclaration */ || + return declaration.kind !== 218 /* VariableDeclaration */ || !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } // declaration is after usage @@ -15159,18 +17053,26 @@ var ts; return isUsedInFunctionOrNonStaticProperty(declaration, usage); function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); - if (declaration.parent.parent.kind === 196 /* VariableStatement */ || - declaration.parent.parent.kind === 202 /* ForStatement */) { - // variable statement/for statement case, - // use site should not be inside variable declaration (initializer of declaration or binding element) - return isSameScopeDescendentOf(usage, declaration, container); + switch (declaration.parent.parent.kind) { + case 200 /* VariableStatement */: + case 206 /* ForStatement */: + case 208 /* ForOfStatement */: + // variable statement/for/for-of statement case, + // use site should not be inside variable declaration (initializer of declaration or binding element) + if (isSameScopeDescendentOf(usage, declaration, container)) { + return true; + } + break; } - else if (declaration.parent.parent.kind === 204 /* ForOfStatement */ || - declaration.parent.parent.kind === 203 /* ForInStatement */) { - // ForIn/ForOf case - use site should not be used in expression part - var expression = declaration.parent.parent.expression; - return isSameScopeDescendentOf(usage, expression, container); + switch (declaration.parent.parent.kind) { + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: + // ForIn/ForOf case - use site should not be used in expression part + if (isSameScopeDescendentOf(usage, declaration.parent.parent.expression, container)) { + return true; + } } + return false; } function isUsedInFunctionOrNonStaticProperty(declaration, usage) { var container = ts.getEnclosingBlockScopeContainer(declaration); @@ -15183,8 +17085,8 @@ var ts; return true; } var initializerOfNonStaticProperty = current.parent && - current.parent.kind === 142 /* PropertyDeclaration */ && - (current.parent.flags & 64 /* Static */) === 0 && + current.parent.kind === 145 /* PropertyDeclaration */ && + (current.parent.flags & 32 /* Static */) === 0 && current.parent.initializer === current; if (initializerOfNonStaticProperty) { return true; @@ -15203,6 +17105,7 @@ var ts; var propertyWithInvalidInitializer; var errorLocation = location; var grandparent; + var isInExternalModule = false; loop: while (location) { // Locals of a source file are not in scope (because they get merged into the global symbol table) if (location.locals && !isGlobalSourceFile(location)) { @@ -15215,11 +17118,11 @@ var ts; // - parameters are only in the scope of function body // This restriction does not apply to JSDoc comment types because they are parented // at a higher level than type parameters would normally be - if (meaning & result.flags & 793056 /* Type */ && lastLocation.kind !== 268 /* JSDocComment */) { + if (meaning & result.flags & 793064 /* Type */ && lastLocation.kind !== 273 /* JSDocComment */) { useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || - lastLocation.kind === 139 /* Parameter */ || - lastLocation.kind === 138 /* TypeParameter */ + lastLocation.kind === 142 /* Parameter */ || + lastLocation.kind === 141 /* TypeParameter */ : false; } if (meaning & 107455 /* Value */ && result.flags & 1 /* FunctionScopedVariable */) { @@ -15228,9 +17131,9 @@ var ts; // however it is detected separately when checking initializers of parameters // to make sure that they reference no variables declared after them. useResult = - lastLocation.kind === 139 /* Parameter */ || + lastLocation.kind === 142 /* Parameter */ || (lastLocation === location.type && - result.valueDeclaration.kind === 139 /* Parameter */); + result.valueDeclaration.kind === 142 /* Parameter */); } } if (useResult) { @@ -15242,12 +17145,13 @@ var ts; } } switch (location.kind) { - case 251 /* SourceFile */: + case 256 /* SourceFile */: if (!ts.isExternalOrCommonJsModule(location)) break; - case 221 /* ModuleDeclaration */: + isInExternalModule = true; + case 225 /* ModuleDeclaration */: var moduleExports = getSymbolOfNode(location).exports; - if (location.kind === 251 /* SourceFile */ || ts.isAmbientModule(location)) { + if (location.kind === 256 /* SourceFile */ || ts.isAmbientModule(location)) { // It's an external module. First see if the module has an export default and if the local // name of that export default matches. if (result = moduleExports["default"]) { @@ -15268,9 +17172,9 @@ var ts; // 2. We check === SymbolFlags.Alias in order to check that the symbol is *purely* // an alias. If we used &, we'd be throwing out symbols that have non alias aspects, // which is not the desired behavior. - if (ts.hasProperty(moduleExports, name) && + if (moduleExports[name] && moduleExports[name].flags === 8388608 /* Alias */ && - ts.getDeclarationOfKind(moduleExports[name], 233 /* ExportSpecifier */)) { + ts.getDeclarationOfKind(moduleExports[name], 238 /* ExportSpecifier */)) { break; } } @@ -15278,20 +17182,20 @@ var ts; break loop; } break; - case 220 /* EnumDeclaration */: + case 224 /* EnumDeclaration */: if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8 /* EnumMember */)) { break loop; } break; - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: // TypeScript 1.0 spec (April 2014): 8.4.1 // Initializer expressions for instance member variables are evaluated in the scope // of the class constructor body but are not permitted to reference parameters or // local variables of the constructor. This effectively means that entities from outer scopes // by the same name as a constructor parameter or local variable are inaccessible // in initializer expressions for instance member variables. - if (ts.isClassLike(location.parent) && !(location.flags & 64 /* Static */)) { + if (ts.isClassLike(location.parent) && !(location.flags & 32 /* Static */)) { var ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { if (getSymbol(ctor.locals, name, meaning & 107455 /* Value */)) { @@ -15301,11 +17205,11 @@ var ts; } } break; - case 217 /* ClassDeclaration */: - case 189 /* ClassExpression */: - case 218 /* InterfaceDeclaration */: - if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793056 /* Type */)) { - if (lastLocation && lastLocation.flags & 64 /* Static */) { + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: + case 222 /* InterfaceDeclaration */: + if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793064 /* Type */)) { + if (lastLocation && lastLocation.flags & 32 /* Static */) { // TypeScript 1.0 spec (April 2014): 3.4.1 // The scope of a type parameter extends over the entire declaration with which the type // parameter list is associated, with the exception of static member declarations in classes. @@ -15314,7 +17218,7 @@ var ts; } break loop; } - if (location.kind === 189 /* ClassExpression */ && meaning & 32 /* Class */) { + if (location.kind === 192 /* ClassExpression */ && meaning & 32 /* Class */) { var className = location.name; if (className && name === className.text) { result = location.symbol; @@ -15330,29 +17234,29 @@ var ts; // [foo()]() { } // <-- Reference to T from class's own computed property // } // - case 137 /* ComputedPropertyName */: + case 140 /* ComputedPropertyName */: grandparent = location.parent.parent; - if (ts.isClassLike(grandparent) || grandparent.kind === 218 /* InterfaceDeclaration */) { + if (ts.isClassLike(grandparent) || grandparent.kind === 222 /* InterfaceDeclaration */) { // A reference to this grandparent's type parameters would be an error - if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793056 /* Type */)) { + if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793064 /* Type */)) { error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); return undefined; } } break; - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 145 /* Constructor */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 216 /* FunctionDeclaration */: - case 177 /* ArrowFunction */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 148 /* Constructor */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 220 /* FunctionDeclaration */: + case 180 /* ArrowFunction */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; } break; - case 176 /* FunctionExpression */: + case 179 /* FunctionExpression */: if (meaning & 3 /* Variable */ && name === "arguments") { result = argumentsSymbol; break loop; @@ -15365,7 +17269,7 @@ var ts; } } break; - case 140 /* Decorator */: + case 143 /* Decorator */: // Decorators are resolved at the class declaration. Resolving at the parameter // or member would result in looking up locals in the method. // @@ -15374,7 +17278,7 @@ var ts; // method(@y x, y) {} // <-- decorator y should be resolved at the class declaration, not the parameter. // } // - if (location.parent && location.parent.kind === 139 /* Parameter */) { + if (location.parent && location.parent.kind === 142 /* Parameter */) { location = location.parent; } // @@ -15391,12 +17295,17 @@ var ts; lastLocation = location; location = location.parent; } + if (result && nameNotFoundMessage && noUnusedIdentifiers) { + result.isReferenced = true; + } if (!result) { result = getSymbol(globals, name, meaning); } if (!result) { if (nameNotFoundMessage) { - if (!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg)) { + if (!errorLocation || + !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && + !checkAndReportErrorForExtendingInterface(errorLocation)) { error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); } } @@ -15428,11 +17337,18 @@ var ts; checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation); } } + // If we're in an external module, we can't reference value symbols created from UMD export declarations + if (result && isInExternalModule && (meaning & 107455 /* Value */) === 107455 /* Value */) { + var decls = result.declarations; + if (decls && decls.length === 1 && decls[0].kind === 228 /* NamespaceExportDeclaration */) { + error(errorLocation, ts.Diagnostics.Identifier_0_must_be_imported_from_a_module, name); + } + } } return result; } function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) { - if (!errorLocation || (errorLocation.kind === 69 /* Identifier */ && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { + if ((errorLocation.kind === 69 /* Identifier */ && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { return false; } var container = ts.getThisContainer(errorLocation, /* includeArrowFunctions */ true); @@ -15451,7 +17367,7 @@ var ts; } // No static member is present. // Check if we're in an instance method and look for a relevant instance member. - if (location === container && !(location.flags & 64 /* Static */)) { + if (location === container && !(location.flags & 32 /* Static */)) { var instanceType = getDeclaredTypeOfSymbol(classSymbol).thisType; if (getPropertyOfType(instanceType, name)) { error(errorLocation, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); @@ -15463,12 +17379,36 @@ var ts; } return false; } + function checkAndReportErrorForExtendingInterface(errorLocation) { + var expression = getEntityNameForExtendingInterface(errorLocation); + var isError = !!(expression && resolveEntityName(expression, 64 /* Interface */, /*ignoreErrors*/ true)); + if (isError) { + error(errorLocation, ts.Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements, ts.getTextOfNode(expression)); + } + return isError; + } + /** + * Climbs up parents to an ExpressionWithTypeArguments, and returns its expression, + * but returns undefined if that expression is not an EntityNameExpression. + */ + function getEntityNameForExtendingInterface(node) { + switch (node.kind) { + case 69 /* Identifier */: + case 172 /* PropertyAccessExpression */: + return node.parent ? getEntityNameForExtendingInterface(node.parent) : undefined; + case 194 /* ExpressionWithTypeArguments */: + ts.Debug.assert(ts.isEntityNameExpression(node.expression)); + return node.expression; + default: + return undefined; + } + } function checkResolvedBlockScopedVariable(result, errorLocation) { ts.Debug.assert((result.flags & 2 /* BlockScopedVariable */) !== 0); // Block-scoped variables cannot be used before their definition var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; }); ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); - if (!isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 214 /* VariableDeclaration */), errorLocation)) { + if (!ts.isInAmbientContext(declaration) && !isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 218 /* VariableDeclaration */), errorLocation)) { error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); } } @@ -15489,10 +17429,10 @@ var ts; } function getAnyImportSyntax(node) { if (ts.isAliasSymbolDeclaration(node)) { - if (node.kind === 224 /* ImportEqualsDeclaration */) { + if (node.kind === 229 /* ImportEqualsDeclaration */) { return node; } - while (node && node.kind !== 225 /* ImportDeclaration */) { + while (node && node.kind !== 230 /* ImportDeclaration */) { node = node.parent; } return node; @@ -15502,7 +17442,7 @@ var ts; return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; }); } function getTargetOfImportEqualsDeclaration(node) { - if (node.moduleReference.kind === 235 /* ExternalModuleReference */) { + if (node.moduleReference.kind === 240 /* ExternalModuleReference */) { return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); } return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, node); @@ -15510,9 +17450,11 @@ var ts; function getTargetOfImportClause(node) { var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier); if (moduleSymbol) { - var exportDefaultSymbol = moduleSymbol.exports["export="] ? - getPropertyOfType(getTypeOfSymbol(moduleSymbol.exports["export="]), "default") : - resolveSymbol(moduleSymbol.exports["default"]); + var exportDefaultSymbol = ts.isShorthandAmbientModuleSymbol(moduleSymbol) ? + moduleSymbol : + moduleSymbol.exports["export="] ? + getPropertyOfType(getTypeOfSymbol(moduleSymbol.exports["export="]), "default") : + resolveSymbol(moduleSymbol.exports["default"]); if (!exportDefaultSymbol && !allowSyntheticDefaultImports) { error(node.name, ts.Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); } @@ -15545,7 +17487,7 @@ var ts; // An 'import { Point } from "graphics"' needs to create a symbol that combines the value side 'Point' // property with the type/namespace side interface 'Point'. function combineValueAndTypeSymbols(valueSymbol, typeSymbol) { - if (valueSymbol.flags & (793056 /* Type */ | 1536 /* Namespace */)) { + if (valueSymbol.flags & (793064 /* Type */ | 1920 /* Namespace */)) { return valueSymbol; } var result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.name); @@ -15561,9 +17503,9 @@ var ts; } function getExportOfModule(symbol, name) { if (symbol.flags & 1536 /* Module */) { - var exports = getExportsOfSymbol(symbol); - if (ts.hasProperty(exports, name)) { - return resolveSymbol(exports[name]); + var exportedSymbol = getExportsOfSymbol(symbol)[name]; + if (exportedSymbol) { + return resolveSymbol(exportedSymbol); } } } @@ -15579,22 +17521,31 @@ var ts; var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); var targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier); if (targetSymbol) { - var name_9 = specifier.propertyName || specifier.name; - if (name_9.text) { + var name_10 = specifier.propertyName || specifier.name; + if (name_10.text) { + if (ts.isShorthandAmbientModuleSymbol(moduleSymbol)) { + return moduleSymbol; + } var symbolFromVariable = void 0; // First check if module was specified with "export=". If so, get the member from the resolved type if (moduleSymbol && moduleSymbol.exports && moduleSymbol.exports["export="]) { - symbolFromVariable = getPropertyOfType(getTypeOfSymbol(targetSymbol), name_9.text); + symbolFromVariable = getPropertyOfType(getTypeOfSymbol(targetSymbol), name_10.text); } else { - symbolFromVariable = getPropertyOfVariable(targetSymbol, name_9.text); + symbolFromVariable = getPropertyOfVariable(targetSymbol, name_10.text); + } + // if symbolFromVariable is export - get its final target + symbolFromVariable = resolveSymbol(symbolFromVariable); + var symbolFromModule = getExportOfModule(targetSymbol, name_10.text); + // If the export member we're looking for is default, and there is no real default but allowSyntheticDefaultImports is on, return the entire module as the default + if (!symbolFromModule && allowSyntheticDefaultImports && name_10.text === "default") { + symbolFromModule = resolveExternalModuleSymbol(moduleSymbol) || resolveSymbol(moduleSymbol); } - var symbolFromModule = getExportOfModule(targetSymbol, name_9.text); var symbol = symbolFromModule && symbolFromVariable ? combineValueAndTypeSymbols(symbolFromVariable, symbolFromModule) : symbolFromModule || symbolFromVariable; if (!symbol) { - error(name_9, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name_9)); + error(name_10, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name_10)); } return symbol; } @@ -15603,32 +17554,37 @@ var ts; function getTargetOfImportSpecifier(node) { return getExternalModuleMember(node.parent.parent.parent, node); } + function getTargetOfNamespaceExportDeclaration(node) { + return resolveExternalModuleSymbol(node.parent.symbol); + } function getTargetOfExportSpecifier(node) { return node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node) : - resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */); + resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */); } function getTargetOfExportAssignment(node) { - return resolveEntityName(node.expression, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */); + return resolveEntityName(node.expression, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */); } function getTargetOfAliasDeclaration(node) { switch (node.kind) { - case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportEqualsDeclaration */: return getTargetOfImportEqualsDeclaration(node); - case 226 /* ImportClause */: + case 231 /* ImportClause */: return getTargetOfImportClause(node); - case 227 /* NamespaceImport */: + case 232 /* NamespaceImport */: return getTargetOfNamespaceImport(node); - case 229 /* ImportSpecifier */: + case 234 /* ImportSpecifier */: return getTargetOfImportSpecifier(node); - case 233 /* ExportSpecifier */: + case 238 /* ExportSpecifier */: return getTargetOfExportSpecifier(node); - case 230 /* ExportAssignment */: + case 235 /* ExportAssignment */: return getTargetOfExportAssignment(node); + case 228 /* NamespaceExportDeclaration */: + return getTargetOfNamespaceExportDeclaration(node); } } function resolveSymbol(symbol) { - return symbol && symbol.flags & 8388608 /* Alias */ && !(symbol.flags & (107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */)) ? resolveAlias(symbol) : symbol; + return symbol && symbol.flags & 8388608 /* Alias */ && !(symbol.flags & (107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */)) ? resolveAlias(symbol) : symbol; } function resolveAlias(symbol) { ts.Debug.assert((symbol.flags & 8388608 /* Alias */) !== 0, "Should only get Alias here."); @@ -15636,6 +17592,7 @@ var ts; if (!links.target) { links.target = resolvingSymbol; var node = getDeclarationOfAliasSymbol(symbol); + ts.Debug.assert(!!node); var target = getTargetOfAliasDeclaration(node); if (links.target === resolvingSymbol) { links.target = target || unknownSymbol; @@ -15653,8 +17610,8 @@ var ts; var symbol = getSymbolOfNode(node); var target = resolveAlias(symbol); if (target) { - var markAlias = (target === unknownSymbol && compilerOptions.isolatedModules) || - (target !== unknownSymbol && (target.flags & 107455 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target)); + var markAlias = target === unknownSymbol || + ((target.flags & 107455 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target)); if (markAlias) { markAliasSymbolAsReferenced(symbol); } @@ -15668,11 +17625,12 @@ var ts; if (!links.referenced) { links.referenced = true; var node = getDeclarationOfAliasSymbol(symbol); - if (node.kind === 230 /* ExportAssignment */) { + ts.Debug.assert(!!node); + if (node.kind === 235 /* ExportAssignment */) { // export default checkExpressionCached(node.expression); } - else if (node.kind === 233 /* ExportSpecifier */) { + else if (node.kind === 238 /* ExportSpecifier */) { // export { } or export { as foo } checkExpressionCached(node.propertyName || node.name); } @@ -15683,11 +17641,7 @@ var ts; } } // This function is only for imports with entity names - function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importDeclaration) { - if (!importDeclaration) { - importDeclaration = ts.getAncestor(entityName, 224 /* ImportEqualsDeclaration */); - ts.Debug.assert(importDeclaration !== undefined); - } + function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importDeclaration, dontResolveAlias) { // There are three things we might try to look for. In the following examples, // the search term is enclosed in |...|: // @@ -15698,39 +17652,42 @@ var ts; entityName = entityName.parent; } // Check for case 1 and 3 in the above example - if (entityName.kind === 69 /* Identifier */ || entityName.parent.kind === 136 /* QualifiedName */) { - return resolveEntityName(entityName, 1536 /* Namespace */); + if (entityName.kind === 69 /* Identifier */ || entityName.parent.kind === 139 /* QualifiedName */) { + return resolveEntityName(entityName, 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias); } else { // Case 2 in above example // entityName.kind could be a QualifiedName or a Missing identifier - ts.Debug.assert(entityName.parent.kind === 224 /* ImportEqualsDeclaration */); - return resolveEntityName(entityName, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */); + ts.Debug.assert(entityName.parent.kind === 229 /* ImportEqualsDeclaration */); + return resolveEntityName(entityName, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, /*ignoreErrors*/ false, dontResolveAlias); } } function getFullyQualifiedName(symbol) { return symbol.parent ? getFullyQualifiedName(symbol.parent) + "." + symbolToString(symbol) : symbolToString(symbol); } // Resolves a qualified name and any involved aliases - function resolveEntityName(name, meaning, ignoreErrors) { + function resolveEntityName(name, meaning, ignoreErrors, dontResolveAlias) { if (ts.nodeIsMissing(name)) { return undefined; } var symbol; if (name.kind === 69 /* Identifier */) { - var message = meaning === 1536 /* Namespace */ ? ts.Diagnostics.Cannot_find_namespace_0 : ts.Diagnostics.Cannot_find_name_0; + var message = meaning === 1920 /* Namespace */ ? ts.Diagnostics.Cannot_find_namespace_0 : ts.Diagnostics.Cannot_find_name_0; symbol = resolveName(name, name.text, meaning, ignoreErrors ? undefined : message, name); if (!symbol) { return undefined; } } - else if (name.kind === 136 /* QualifiedName */ || name.kind === 169 /* PropertyAccessExpression */) { - var left = name.kind === 136 /* QualifiedName */ ? name.left : name.expression; - var right = name.kind === 136 /* QualifiedName */ ? name.right : name.name; - var namespace = resolveEntityName(left, 1536 /* Namespace */, ignoreErrors); - if (!namespace || namespace === unknownSymbol || ts.nodeIsMissing(right)) { + else if (name.kind === 139 /* QualifiedName */ || name.kind === 172 /* PropertyAccessExpression */) { + var left = name.kind === 139 /* QualifiedName */ ? name.left : name.expression; + var right = name.kind === 139 /* QualifiedName */ ? name.right : name.name; + var namespace = resolveEntityName(left, 1920 /* Namespace */, ignoreErrors); + if (!namespace || ts.nodeIsMissing(right)) { return undefined; } + else if (namespace === unknownSymbol) { + return namespace; + } symbol = getSymbol(getExportsOfSymbol(namespace), right.text, meaning); if (!symbol) { if (!ignoreErrors) { @@ -15743,7 +17700,7 @@ var ts; ts.Debug.fail("Unknown entity name kind."); } ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - return symbol.flags & meaning ? symbol : resolveAlias(symbol); + return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol); } function resolveExternalModuleName(location, moduleReferenceExpression) { return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ts.Diagnostics.Cannot_find_module_0); @@ -15761,7 +17718,7 @@ var ts; } var isRelative = ts.isExternalModuleNameRelative(moduleName); if (!isRelative) { - var symbol = getSymbol(globals, "\"" + moduleName + "\"", 512 /* ValueModule */); + var symbol = getSymbol(globals, '"' + moduleName + '"', 512 /* ValueModule */); if (symbol) { // merged symbol is module declaration symbol combined with all augmentations return getMergedSymbol(symbol); @@ -15780,9 +17737,22 @@ var ts; } return undefined; } + if (patternAmbientModules) { + var pattern = ts.findBestPatternMatch(patternAmbientModules, function (_) { return _.pattern; }, moduleName); + if (pattern) { + return getMergedSymbol(pattern.symbol); + } + } if (moduleNotFoundError) { // report errors only if it was requested - error(moduleReferenceLiteral, moduleNotFoundError, moduleName); + var tsExtension = ts.tryExtractTypeScriptExtension(moduleName); + if (tsExtension) { + var diag = ts.Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead; + error(moduleReferenceLiteral, diag, tsExtension, ts.removeExtension(moduleName, tsExtension)); + } + else { + error(moduleReferenceLiteral, moduleNotFoundError, moduleName); + } } return undefined; } @@ -15821,7 +17791,7 @@ var ts; */ function extendExportSymbols(target, source, lookupTable, exportNode) { for (var id in source) { - if (id !== "default" && !ts.hasProperty(target, id)) { + if (id !== "default" && !target[id]) { target[id] = source[id]; if (lookupTable && exportNode) { lookupTable[id] = { @@ -15829,7 +17799,7 @@ var ts; }; } } - else if (lookupTable && exportNode && id !== "default" && ts.hasProperty(target, id) && resolveSymbol(target[id]) !== resolveSymbol(source[id])) { + else if (lookupTable && exportNode && id !== "default" && target[id] && resolveSymbol(target[id]) !== resolveSymbol(source[id])) { if (!lookupTable[id].exportsWithDuplicate) { lookupTable[id].exportsWithDuplicate = [exportNode]; } @@ -15849,12 +17819,12 @@ var ts; return; } visitedSymbols.push(symbol); - var symbols = cloneSymbolTable(symbol.exports); + var symbols = ts.cloneMap(symbol.exports); // All export * declarations are collected in an __export symbol by the binder var exportStars = symbol.exports["__export"]; if (exportStars) { - var nestedSymbols = {}; - var lookupTable = {}; + var nestedSymbols = ts.createMap(); + var lookupTable = ts.createMap(); for (var _i = 0, _a = exportStars.declarations; _i < _a.length; _i++) { var node = _a[_i]; var resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier); @@ -15864,7 +17834,7 @@ var ts; for (var id in lookupTable) { var exportsWithDuplicate = lookupTable[id].exportsWithDuplicate; // It's not an error if the file with multiple `export *`s with duplicate names exports a member with that name itself - if (id === "export=" || !(exportsWithDuplicate && exportsWithDuplicate.length) || ts.hasProperty(symbols, id)) { + if (id === "export=" || !(exportsWithDuplicate && exportsWithDuplicate.length) || symbols[id]) { continue; } for (var _b = 0, exportsWithDuplicate_1 = exportsWithDuplicate; _b < exportsWithDuplicate_1.length; _b++) { @@ -15912,15 +17882,15 @@ var ts; var members = node.members; for (var _i = 0, members_1 = members; _i < members_1.length; _i++) { var member = members_1[_i]; - if (member.kind === 145 /* Constructor */ && ts.nodeIsPresent(member.body)) { + if (member.kind === 148 /* Constructor */ && ts.nodeIsPresent(member.body)) { return member; } } } function createType(flags) { var result = new Type(checker, flags); - result.id = typeCount; typeCount++; + result.id = typeCount; return result; } function createIntrinsicType(kind, intrinsicName) { @@ -15928,6 +17898,12 @@ var ts; type.intrinsicName = intrinsicName; return type; } + function createBooleanType(trueFalseTypes) { + var type = getUnionType(trueFalseTypes); + type.flags |= 8 /* Boolean */; + type.intrinsicName = "boolean"; + return type; + } function createObjectType(kind, symbol) { var type = createType(kind); type.symbol = symbol; @@ -15946,32 +17922,30 @@ var ts; function getNamedMembers(members) { var result; for (var id in members) { - if (ts.hasProperty(members, id)) { - if (!isReservedMemberName(id)) { - if (!result) - result = []; - var symbol = members[id]; - if (symbolIsValue(symbol)) { - result.push(symbol); - } + if (!isReservedMemberName(id)) { + if (!result) + result = []; + var symbol = members[id]; + if (symbolIsValue(symbol)) { + result.push(symbol); } } } return result || emptyArray; } - function setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType) { + function setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) { type.members = members; type.properties = getNamedMembers(members); type.callSignatures = callSignatures; type.constructSignatures = constructSignatures; - if (stringIndexType) - type.stringIndexType = stringIndexType; - if (numberIndexType) - type.numberIndexType = numberIndexType; + if (stringIndexInfo) + type.stringIndexInfo = stringIndexInfo; + if (numberIndexInfo) + type.numberIndexInfo = numberIndexInfo; return type; } - function createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexType, numberIndexType) { - return setObjectTypeMembers(createObjectType(65536 /* Anonymous */, symbol), members, callSignatures, constructSignatures, stringIndexType, numberIndexType); + function createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) { + return setObjectTypeMembers(createObjectType(2097152 /* Anonymous */, symbol), members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo); } function forEachSymbolTableInScope(enclosingDeclaration, callback) { var result; @@ -15983,28 +17957,22 @@ var ts; } } switch (location_1.kind) { - case 251 /* SourceFile */: + case 256 /* SourceFile */: if (!ts.isExternalOrCommonJsModule(location_1)) { break; } - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: if (result = callback(getSymbolOfNode(location_1).exports)) { return result; } break; - case 217 /* ClassDeclaration */: - case 218 /* InterfaceDeclaration */: - if (result = callback(getSymbolOfNode(location_1).members)) { - return result; - } - break; } } return callback(globals); } function getQualifiedLeftMeaning(rightMeaning) { // If we are looking in value space, the parent meaning is value, other wise it is namespace - return rightMeaning === 107455 /* Value */ ? 107455 /* Value */ : 1536 /* Namespace */; + return rightMeaning === 107455 /* Value */ ? 107455 /* Value */ : 1920 /* Namespace */; } function getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, useOnlyExternalAliasing) { function getAccessibleSymbolChainFromSymbolTable(symbols) { @@ -16020,21 +17988,21 @@ var ts; function isAccessible(symbolFromSymbolTable, resolvedAliasSymbol) { if (symbol === (resolvedAliasSymbol || symbolFromSymbolTable)) { // if the symbolFromSymbolTable is not external module (it could be if it was determined as ambient external module and would be in globals table) - // and if symbolfrom symbolTable or alias resolution matches the symbol, + // and if symbolFromSymbolTable or alias resolution matches the symbol, // check the symbol can be qualified, it is only then this symbol is accessible return !ts.forEach(symbolFromSymbolTable.declarations, hasExternalModuleSymbol) && canQualifySymbol(symbolFromSymbolTable, meaning); } } // If symbol is directly available by its name in the symbol table - if (isAccessible(ts.lookUp(symbols, symbol.name))) { + if (isAccessible(symbols[symbol.name])) { return [symbol]; } // Check if symbol is any of the alias - return ts.forEachValue(symbols, function (symbolFromSymbolTable) { + return ts.forEachProperty(symbols, function (symbolFromSymbolTable) { if (symbolFromSymbolTable.flags & 8388608 /* Alias */ && symbolFromSymbolTable.name !== "export=" - && !ts.getDeclarationOfKind(symbolFromSymbolTable, 233 /* ExportSpecifier */)) { + && !ts.getDeclarationOfKind(symbolFromSymbolTable, 238 /* ExportSpecifier */)) { if (!useOnlyExternalAliasing || // Is this external alias, then use it to name ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { @@ -16053,25 +18021,27 @@ var ts; }); } if (symbol) { - return forEachSymbolTableInScope(enclosingDeclaration, getAccessibleSymbolChainFromSymbolTable); + if (!(isPropertyOrMethodDeclarationSymbol(symbol))) { + return forEachSymbolTableInScope(enclosingDeclaration, getAccessibleSymbolChainFromSymbolTable); + } } } function needsQualification(symbol, enclosingDeclaration, meaning) { var qualify = false; forEachSymbolTableInScope(enclosingDeclaration, function (symbolTable) { // If symbol of this name is not available in the symbol table we are ok - if (!ts.hasProperty(symbolTable, symbol.name)) { + var symbolFromSymbolTable = symbolTable[symbol.name]; + if (!symbolFromSymbolTable) { // Continue to the next symbol table return false; } // If the symbol with this name is present it should refer to the symbol - var symbolFromSymbolTable = symbolTable[symbol.name]; if (symbolFromSymbolTable === symbol) { // No need to qualify return true; } // Qualify if the symbol from symbol table has same meaning as expected - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 233 /* ExportSpecifier */)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; + symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 238 /* ExportSpecifier */)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; if (symbolFromSymbolTable.flags & meaning) { qualify = true; return true; @@ -16081,6 +18051,24 @@ var ts; }); return qualify; } + function isPropertyOrMethodDeclarationSymbol(symbol) { + if (symbol.declarations && symbol.declarations.length) { + for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { + var declaration = _a[_i]; + switch (declaration.kind) { + case 145 /* PropertyDeclaration */: + case 147 /* MethodDeclaration */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + continue; + default: + return false; + } + } + return true; + } + return false; + } function isSymbolAccessible(symbol, enclosingDeclaration, meaning) { if (symbol && enclosingDeclaration && !(symbol.flags & 262144 /* TypeParameter */)) { var initialSymbol = symbol; @@ -16094,7 +18082,7 @@ var ts; return { accessibility: 1 /* NotAccessible */, errorSymbolName: symbolToString(initialSymbol, enclosingDeclaration, meaning), - errorModuleName: symbol !== initialSymbol ? symbolToString(symbol, enclosingDeclaration, 1536 /* Namespace */) : undefined + errorModuleName: symbol !== initialSymbol ? symbolToString(symbol, enclosingDeclaration, 1920 /* Namespace */) : undefined }; } return hasAccessibleDeclarations; @@ -16144,7 +18132,7 @@ var ts; } } function hasExternalModuleSymbol(declaration) { - return ts.isAmbientModule(declaration) || (declaration.kind === 251 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration)); + return ts.isAmbientModule(declaration) || (declaration.kind === 256 /* SourceFile */ && ts.isExternalOrCommonJsModule(declaration)); } function hasVisibleDeclarations(symbol) { var aliasesToMakeVisible; @@ -16158,7 +18146,7 @@ var ts; // because these kind of aliases can be used to name types in declaration file var anyImportSyntax = getAnyImportSyntax(declaration); if (anyImportSyntax && - !(anyImportSyntax.flags & 2 /* Export */) && + !(anyImportSyntax.flags & 1 /* Export */) && isDeclarationVisible(anyImportSyntax.parent)) { getNodeLinks(declaration).isVisible = true; if (aliasesToMakeVisible) { @@ -16180,19 +18168,19 @@ var ts; function isEntityNameVisible(entityName, enclosingDeclaration) { // get symbol of the first identifier of the entityName var meaning; - if (entityName.parent.kind === 155 /* TypeQuery */) { + if (entityName.parent.kind === 158 /* TypeQuery */ || ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { // Typeof value meaning = 107455 /* Value */ | 1048576 /* ExportValue */; } - else if (entityName.kind === 136 /* QualifiedName */ || entityName.kind === 169 /* PropertyAccessExpression */ || - entityName.parent.kind === 224 /* ImportEqualsDeclaration */) { + else if (entityName.kind === 139 /* QualifiedName */ || entityName.kind === 172 /* PropertyAccessExpression */ || + entityName.parent.kind === 229 /* ImportEqualsDeclaration */) { // Left identifier from type reference or TypeAlias // Entity name of the import declaration - meaning = 1536 /* Namespace */; + meaning = 1920 /* Namespace */; } else { // Type Reference or TypeAlias entity = Identifier - meaning = 793056 /* Type */; + meaning = 793064 /* Type */; } var firstIdentifier = getFirstIdentifier(entityName); var symbol = resolveName(enclosingDeclaration, firstIdentifier.text, meaning, /*nodeNotFoundErrorMessage*/ undefined, /*nameArg*/ undefined); @@ -16244,13 +18232,47 @@ var ts; ts.releaseStringWriter(writer); return result; } + function formatUnionTypes(types) { + var result = []; + var flags = 0; + for (var i = 0; i < types.length; i++) { + var t = types[i]; + flags |= t.flags; + if (!(t.flags & 6144 /* Nullable */)) { + if (t.flags & (128 /* BooleanLiteral */ | 256 /* EnumLiteral */)) { + var baseType = t.flags & 128 /* BooleanLiteral */ ? booleanType : t.baseType; + var count = baseType.types.length; + if (i + count <= types.length && types[i + count - 1] === baseType.types[count - 1]) { + result.push(baseType); + i += count - 1; + continue; + } + } + result.push(t); + } + } + if (flags & 4096 /* Null */) + result.push(nullType); + if (flags & 2048 /* Undefined */) + result.push(undefinedType); + return result || types; + } + function visibilityToString(flags) { + if (flags === 8 /* Private */) { + return "private"; + } + if (flags === 16 /* Protected */) { + return "protected"; + } + return "public"; + } function getTypeAliasForTypeLiteral(type) { if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */) { var node = type.symbol.declarations[0].parent; - while (node.kind === 161 /* ParenthesizedType */) { + while (node.kind === 164 /* ParenthesizedType */) { node = node.parent; } - if (node.kind === 219 /* TypeAliasDeclaration */) { + if (node.kind === 223 /* TypeAliasDeclaration */) { return getSymbolOfNode(node); } } @@ -16258,7 +18280,7 @@ var ts; } function isTopLevelInExternalModuleAugmentation(node) { return node && node.parent && - node.parent.kind === 222 /* ModuleBlock */ && + node.parent.kind === 226 /* ModuleBlock */ && ts.isExternalModuleAugmentation(node.parent.parent); } function getSymbolDisplayBuilder() { @@ -16269,10 +18291,10 @@ var ts; return ts.declarationNameToString(declaration.name); } switch (declaration.kind) { - case 189 /* ClassExpression */: + case 192 /* ClassExpression */: return "(Anonymous class)"; - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: return "(Anonymous function)"; } } @@ -16280,11 +18302,35 @@ var ts; } /** * Writes only the name of the symbol out to the writer. Uses the original source text - * for the name of the symbol if it is available to match how the user inputted the name. + * for the name of the symbol if it is available to match how the user wrote the name. */ function appendSymbolNameOnly(symbol, writer) { writer.writeSymbol(getNameOfSymbol(symbol), symbol); } + /** + * Writes a property access or element access with the name of the symbol out to the writer. + * Uses the original source text for the name of the symbol if it is available to match how the user wrote the name, + * ensuring that any names written with literals use element accesses. + */ + function appendPropertyOrElementAccessForSymbol(symbol, writer) { + var symbolName = getNameOfSymbol(symbol); + var firstChar = symbolName.charCodeAt(0); + var needsElementAccess = !ts.isIdentifierStart(firstChar, languageVersion); + if (needsElementAccess) { + writePunctuation(writer, 19 /* OpenBracketToken */); + if (ts.isSingleOrDoubleQuote(firstChar)) { + writer.writeStringLiteral(symbolName); + } + else { + writer.writeSymbol(symbolName, symbol); + } + writePunctuation(writer, 20 /* CloseBracketToken */); + } + else { + writePunctuation(writer, 21 /* DotToken */); + writer.writeSymbol(symbolName, symbol); + } + } /** * Enclosing declaration is optional when we don't want to get qualified name in the enclosing declaration scope * Meaning needs to be specified if the enclosing declaration is given @@ -16302,10 +18348,12 @@ var ts; buildTypeParameterDisplayFromSymbol(parentSymbol, writer, enclosingDeclaration); } } - writePunctuation(writer, 21 /* DotToken */); + appendPropertyOrElementAccessForSymbol(symbol, writer); + } + else { + appendSymbolNameOnly(symbol, writer); } parentSymbol = symbol; - appendSymbolNameOnly(symbol, writer); } // const the writer know we just wrote out a symbol. The declaration emitter writer uses // this to determine if an import it has previously seen (and not written out) needs @@ -16358,38 +18406,53 @@ var ts; var inObjectTypeLiteral = false; return writeType(type, globalFlags); function writeType(type, flags) { + var nextFlags = flags & ~512 /* InTypeAlias */; // Write undefined/null type as any - if (type.flags & 16777343 /* Intrinsic */) { + if (type.flags & 16015 /* Intrinsic */) { // Special handling for unknown / resolving types, they should show up as any and not unknown or __resolving writer.writeKeyword(!(globalFlags & 16 /* WriteOwnNameForAnyLike */) && isTypeAny(type) ? "any" : type.intrinsicName); } - else if (type.flags & 33554432 /* ThisType */) { + else if (type.flags & 268435456 /* ThisType */) { if (inObjectTypeLiteral) { writer.reportInaccessibleThisError(); } writer.writeKeyword("this"); } - else if (type.flags & 4096 /* Reference */) { - writeTypeReference(type, flags); + else if (type.flags & 131072 /* Reference */) { + writeTypeReference(type, nextFlags); } - else if (type.flags & (1024 /* Class */ | 2048 /* Interface */ | 128 /* Enum */ | 512 /* TypeParameter */)) { + else if (type.flags & 256 /* EnumLiteral */) { + buildSymbolDisplay(getParentOfSymbol(type.symbol), writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, nextFlags); + writePunctuation(writer, 21 /* DotToken */); + appendSymbolNameOnly(type.symbol, writer); + } + else if (type.flags & (32768 /* Class */ | 65536 /* Interface */ | 16 /* Enum */ | 16384 /* TypeParameter */)) { // The specified symbol flags need to be reinterpreted as type flags - buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 793056 /* Type */, 0 /* None */, flags); + buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, nextFlags); } - else if (type.flags & 8192 /* Tuple */) { - writeTupleType(type); + else if (!(flags & 512 /* InTypeAlias */) && type.flags & (2097152 /* Anonymous */ | 1572864 /* UnionOrIntersection */) && type.aliasSymbol) { + if (type.flags & 2097152 /* Anonymous */ || !(flags & 1024 /* UseTypeAliasValue */)) { + var typeArguments = type.aliasTypeArguments; + writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags); + } + else { + writeUnionOrIntersectionType(type, nextFlags); + } } - else if (type.flags & 49152 /* UnionOrIntersection */) { - writeUnionOrIntersectionType(type, flags); + else if (type.flags & 1572864 /* UnionOrIntersection */) { + writeUnionOrIntersectionType(type, nextFlags); } - else if (type.flags & 65536 /* Anonymous */) { - writeAnonymousType(type, flags); + else if (type.flags & 2097152 /* Anonymous */) { + writeAnonymousType(type, nextFlags); } - else if (type.flags & 256 /* StringLiteral */) { + else if (type.flags & 32 /* StringLiteral */) { writer.writeStringLiteral("\"" + ts.escapeString(type.text) + "\""); } + else if (type.flags & 64 /* NumberLiteral */) { + writer.writeStringLiteral(type.text); + } else { // Should never get here // { ... } @@ -16415,11 +18478,11 @@ var ts; function writeSymbolTypeReference(symbol, typeArguments, pos, end, flags) { // Unnamed function expressions and arrow functions have reserved names that we don't want to display if (symbol.flags & 32 /* Class */ || !isReservedMemberName(symbol.name)) { - buildSymbolDisplay(symbol, writer, enclosingDeclaration, 793056 /* Type */, 0 /* None */, flags); + buildSymbolDisplay(symbol, writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, flags); } if (pos < end) { writePunctuation(writer, 25 /* LessThanToken */); - writeType(typeArguments[pos], 0 /* None */); + writeType(typeArguments[pos], 256 /* InFirstTypeArgument */); pos++; while (pos < end) { writePunctuation(writer, 24 /* CommaToken */); @@ -16437,6 +18500,11 @@ var ts; writePunctuation(writer, 19 /* OpenBracketToken */); writePunctuation(writer, 20 /* CloseBracketToken */); } + else if (type.target.flags & 262144 /* Tuple */) { + writePunctuation(writer, 19 /* OpenBracketToken */); + writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), 24 /* CommaToken */); + writePunctuation(writer, 20 /* CloseBracketToken */); + } else { // Write the type reference in the format f.g.C where A and B are type arguments // for outer type parameters, and f and g are the respective declaring containers of those @@ -16448,14 +18516,14 @@ var ts; while (i < length_1) { // Find group of type arguments for type parameters with the same declaring container. var start = i; - var parent_4 = getParentSymbolOfTypeParameter(outerTypeParameters[i]); + var parent_7 = getParentSymbolOfTypeParameter(outerTypeParameters[i]); do { i++; - } while (i < length_1 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent_4); + } while (i < length_1 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent_7); // When type parameters are their own type arguments for the whole group (i.e. we have // the default outer type arguments), we don't show the group. if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) { - writeSymbolTypeReference(parent_4, typeArguments, start, i, flags); + writeSymbolTypeReference(parent_7, typeArguments, start, i, flags); writePunctuation(writer, 21 /* DotToken */); } } @@ -16464,16 +18532,16 @@ var ts; writeSymbolTypeReference(type.symbol, typeArguments, i, typeParameterCount, flags); } } - function writeTupleType(type) { - writePunctuation(writer, 19 /* OpenBracketToken */); - writeTypeList(type.elementTypes, 24 /* CommaToken */); - writePunctuation(writer, 20 /* CloseBracketToken */); - } function writeUnionOrIntersectionType(type, flags) { if (flags & 64 /* InElementType */) { writePunctuation(writer, 17 /* OpenParenToken */); } - writeTypeList(type.types, type.flags & 16384 /* Union */ ? 47 /* BarToken */ : 46 /* AmpersandToken */); + if (type.flags & 524288 /* Union */) { + writeTypeList(formatUnionTypes(type.types), 47 /* BarToken */); + } + else { + writeTypeList(type.types, 46 /* AmpersandToken */); + } if (flags & 64 /* InElementType */) { writePunctuation(writer, 18 /* CloseParenToken */); } @@ -16483,17 +18551,17 @@ var ts; if (symbol) { // Always use 'typeof T' for type of class, enum, and module objects if (symbol.flags & (32 /* Class */ | 384 /* Enum */ | 512 /* ValueModule */)) { - writeTypeofSymbol(type, flags); + writeTypeOfSymbol(type, flags); } else if (shouldWriteTypeOfFunctionSymbol()) { - writeTypeofSymbol(type, flags); + writeTypeOfSymbol(type, flags); } else if (ts.contains(symbolStack, symbol)) { // If type is an anonymous type literal in a type alias declaration, use type alias name var typeAlias = getTypeAliasForTypeLiteral(type); if (typeAlias) { // The specified symbol flags need to be reinterpreted as type flags - buildSymbolDisplay(typeAlias, writer, enclosingDeclaration, 793056 /* Type */, 0 /* None */, flags); + buildSymbolDisplay(typeAlias, writer, enclosingDeclaration, 793064 /* Type */, 0 /* None */, flags); } else { // Recursive usage, use any @@ -16517,11 +18585,11 @@ var ts; } function shouldWriteTypeOfFunctionSymbol() { var isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */ && - ts.forEach(symbol.declarations, function (declaration) { return declaration.flags & 64 /* Static */; })); + ts.forEach(symbol.declarations, function (declaration) { return declaration.flags & 32 /* Static */; })); var isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 251 /* SourceFile */ || declaration.parent.kind === 222 /* ModuleBlock */; + return declaration.parent.kind === 256 /* SourceFile */ || declaration.parent.kind === 226 /* ModuleBlock */; })); if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { // typeof is allowed only for static/non local functions @@ -16530,35 +18598,67 @@ var ts; } } } - function writeTypeofSymbol(type, typeFormatFlags) { + function writeTypeOfSymbol(type, typeFormatFlags) { writeKeyword(writer, 101 /* TypeOfKeyword */); writeSpace(writer); buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 107455 /* Value */, 0 /* None */, typeFormatFlags); } - function getIndexerParameterName(type, indexKind, fallbackName) { - var declaration = getIndexDeclarationOfSymbol(type.symbol, indexKind); - if (!declaration) { - // declaration might not be found if indexer was added from the contextual type. - // in this case use fallback name - return fallbackName; + function writeIndexSignature(info, keyword) { + if (info) { + if (info.isReadonly) { + writeKeyword(writer, 128 /* ReadonlyKeyword */); + writeSpace(writer); + } + writePunctuation(writer, 19 /* OpenBracketToken */); + writer.writeParameter(info.declaration ? ts.declarationNameToString(info.declaration.parameters[0].name) : "x"); + writePunctuation(writer, 54 /* ColonToken */); + writeSpace(writer); + writeKeyword(writer, keyword); + writePunctuation(writer, 20 /* CloseBracketToken */); + writePunctuation(writer, 54 /* ColonToken */); + writeSpace(writer); + writeType(info.type, 0 /* None */); + writePunctuation(writer, 23 /* SemicolonToken */); + writer.writeLine(); } - ts.Debug.assert(declaration.parameters.length !== 0); - return ts.declarationNameToString(declaration.parameters[0].name); + } + function writePropertyWithModifiers(prop) { + if (isReadonlySymbol(prop)) { + writeKeyword(writer, 128 /* ReadonlyKeyword */); + writeSpace(writer); + } + buildSymbolDisplay(prop, writer); + if (prop.flags & 536870912 /* Optional */) { + writePunctuation(writer, 53 /* QuestionToken */); + } + } + function shouldAddParenthesisAroundFunctionType(callSignature, flags) { + if (flags & 64 /* InElementType */) { + return true; + } + else if (flags & 256 /* InFirstTypeArgument */) { + // Add parenthesis around function type for the first type argument to avoid ambiguity + var typeParameters = callSignature.target && (flags & 32 /* WriteTypeArgumentsOfSignature */) ? + callSignature.target.typeParameters : callSignature.typeParameters; + return typeParameters && typeParameters.length !== 0; + } + return false; } function writeLiteralType(type, flags) { var resolved = resolveStructuredTypeMembers(type); - if (!resolved.properties.length && !resolved.stringIndexType && !resolved.numberIndexType) { + if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) { if (!resolved.callSignatures.length && !resolved.constructSignatures.length) { writePunctuation(writer, 15 /* OpenBraceToken */); writePunctuation(writer, 16 /* CloseBraceToken */); return; } if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { - if (flags & 64 /* InElementType */) { + var parenthesizeSignature = shouldAddParenthesisAroundFunctionType(resolved.callSignatures[0], flags); + if (parenthesizeSignature) { writePunctuation(writer, 17 /* OpenParenToken */); } buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8 /* WriteArrowStyleSignature */, /*kind*/ undefined, symbolStack); - if (flags & 64 /* InElementType */) { + if (parenthesizeSignature) { writePunctuation(writer, 18 /* CloseParenToken */); } return; @@ -16593,34 +18693,8 @@ var ts; writePunctuation(writer, 23 /* SemicolonToken */); writer.writeLine(); } - if (resolved.stringIndexType) { - // [x: string]: - writePunctuation(writer, 19 /* OpenBracketToken */); - writer.writeParameter(getIndexerParameterName(resolved, 0 /* String */, /*fallbackName*/ "x")); - writePunctuation(writer, 54 /* ColonToken */); - writeSpace(writer); - writeKeyword(writer, 130 /* StringKeyword */); - writePunctuation(writer, 20 /* CloseBracketToken */); - writePunctuation(writer, 54 /* ColonToken */); - writeSpace(writer); - writeType(resolved.stringIndexType, 0 /* None */); - writePunctuation(writer, 23 /* SemicolonToken */); - writer.writeLine(); - } - if (resolved.numberIndexType) { - // [x: number]: - writePunctuation(writer, 19 /* OpenBracketToken */); - writer.writeParameter(getIndexerParameterName(resolved, 1 /* Number */, /*fallbackName*/ "x")); - writePunctuation(writer, 54 /* ColonToken */); - writeSpace(writer); - writeKeyword(writer, 128 /* NumberKeyword */); - writePunctuation(writer, 20 /* CloseBracketToken */); - writePunctuation(writer, 54 /* ColonToken */); - writeSpace(writer); - writeType(resolved.numberIndexType, 0 /* None */); - writePunctuation(writer, 23 /* SemicolonToken */); - writer.writeLine(); - } + writeIndexSignature(resolved.stringIndexInfo, 132 /* StringKeyword */); + writeIndexSignature(resolved.numberIndexInfo, 130 /* NumberKeyword */); for (var _d = 0, _e = resolved.properties; _d < _e.length; _d++) { var p = _e[_d]; var t = getTypeOfSymbol(p); @@ -16628,20 +18702,14 @@ var ts; var signatures = getSignaturesOfType(t, 0 /* Call */); for (var _f = 0, signatures_1 = signatures; _f < signatures_1.length; _f++) { var signature = signatures_1[_f]; - buildSymbolDisplay(p, writer); - if (p.flags & 536870912 /* Optional */) { - writePunctuation(writer, 53 /* QuestionToken */); - } + writePropertyWithModifiers(p); buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, /*kind*/ undefined, symbolStack); writePunctuation(writer, 23 /* SemicolonToken */); writer.writeLine(); } } else { - buildSymbolDisplay(p, writer); - if (p.flags & 536870912 /* Optional */) { - writePunctuation(writer, 53 /* QuestionToken */); - } + writePropertyWithModifiers(p); writePunctuation(writer, 54 /* ColonToken */); writeSpace(writer); writeType(t, 0 /* None */); @@ -16675,7 +18743,12 @@ var ts; if (ts.isRestParameter(parameterNode)) { writePunctuation(writer, 22 /* DotDotDotToken */); } - appendSymbolNameOnly(p, writer); + if (ts.isBindingPattern(parameterNode.name)) { + buildBindingPatternDisplay(parameterNode.name, writer, enclosingDeclaration, flags, symbolStack); + } + else { + appendSymbolNameOnly(p, writer); + } if (isOptionalParameter(parameterNode)) { writePunctuation(writer, 53 /* QuestionToken */); } @@ -16683,36 +18756,81 @@ var ts; writeSpace(writer); buildTypeDisplay(getTypeOfSymbol(p), writer, enclosingDeclaration, flags, symbolStack); } + function buildBindingPatternDisplay(bindingPattern, writer, enclosingDeclaration, flags, symbolStack) { + // We have to explicitly emit square bracket and bracket because these tokens are not stored inside the node. + if (bindingPattern.kind === 167 /* ObjectBindingPattern */) { + writePunctuation(writer, 15 /* OpenBraceToken */); + buildDisplayForCommaSeparatedList(bindingPattern.elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); }); + writePunctuation(writer, 16 /* CloseBraceToken */); + } + else if (bindingPattern.kind === 168 /* ArrayBindingPattern */) { + writePunctuation(writer, 19 /* OpenBracketToken */); + var elements = bindingPattern.elements; + buildDisplayForCommaSeparatedList(elements, writer, function (e) { return buildBindingElementDisplay(e, writer, enclosingDeclaration, flags, symbolStack); }); + if (elements && elements.hasTrailingComma) { + writePunctuation(writer, 24 /* CommaToken */); + } + writePunctuation(writer, 20 /* CloseBracketToken */); + } + } + function buildBindingElementDisplay(bindingElement, writer, enclosingDeclaration, flags, symbolStack) { + if (bindingElement.kind === 193 /* OmittedExpression */) { + return; + } + ts.Debug.assert(bindingElement.kind === 169 /* BindingElement */); + if (bindingElement.propertyName) { + writer.writeSymbol(ts.getTextOfNode(bindingElement.propertyName), bindingElement.symbol); + writePunctuation(writer, 54 /* ColonToken */); + writeSpace(writer); + } + if (ts.isBindingPattern(bindingElement.name)) { + buildBindingPatternDisplay(bindingElement.name, writer, enclosingDeclaration, flags, symbolStack); + } + else { + if (bindingElement.dotDotDotToken) { + writePunctuation(writer, 22 /* DotDotDotToken */); + } + appendSymbolNameOnly(bindingElement.symbol, writer); + } + } function buildDisplayForTypeParametersAndDelimiters(typeParameters, writer, enclosingDeclaration, flags, symbolStack) { if (typeParameters && typeParameters.length) { writePunctuation(writer, 25 /* LessThanToken */); - for (var i = 0; i < typeParameters.length; i++) { - if (i > 0) { - writePunctuation(writer, 24 /* CommaToken */); - writeSpace(writer); - } - buildTypeParameterDisplay(typeParameters[i], writer, enclosingDeclaration, flags, symbolStack); - } + buildDisplayForCommaSeparatedList(typeParameters, writer, function (p) { return buildTypeParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack); }); writePunctuation(writer, 27 /* GreaterThanToken */); } } + function buildDisplayForCommaSeparatedList(list, writer, action) { + for (var i = 0; i < list.length; i++) { + if (i > 0) { + writePunctuation(writer, 24 /* CommaToken */); + writeSpace(writer); + } + action(list[i]); + } + } function buildDisplayForTypeArgumentsAndDelimiters(typeParameters, mapper, writer, enclosingDeclaration, flags, symbolStack) { if (typeParameters && typeParameters.length) { writePunctuation(writer, 25 /* LessThanToken */); + var flags_1 = 256 /* InFirstTypeArgument */; for (var i = 0; i < typeParameters.length; i++) { if (i > 0) { writePunctuation(writer, 24 /* CommaToken */); writeSpace(writer); + flags_1 = 0 /* None */; } - buildTypeDisplay(mapper(typeParameters[i]), writer, enclosingDeclaration, 0 /* None */); + buildTypeDisplay(mapper(typeParameters[i]), writer, enclosingDeclaration, flags_1); } writePunctuation(writer, 27 /* GreaterThanToken */); } } - function buildDisplayForParametersAndDelimiters(parameters, writer, enclosingDeclaration, flags, symbolStack) { + function buildDisplayForParametersAndDelimiters(thisParameter, parameters, writer, enclosingDeclaration, flags, symbolStack) { writePunctuation(writer, 17 /* OpenParenToken */); + if (thisParameter) { + buildParameterDisplay(thisParameter, writer, enclosingDeclaration, flags, symbolStack); + } for (var i = 0; i < parameters.length; i++) { - if (i > 0) { + if (i > 0 || thisParameter) { writePunctuation(writer, 24 /* CommaToken */); writeSpace(writer); } @@ -16762,7 +18880,7 @@ var ts; else { buildDisplayForTypeParametersAndDelimiters(signature.typeParameters, writer, enclosingDeclaration, flags, symbolStack); } - buildDisplayForParametersAndDelimiters(signature.parameters, writer, enclosingDeclaration, flags, symbolStack); + buildDisplayForParametersAndDelimiters(signature.thisParameter, signature.parameters, writer, enclosingDeclaration, flags, symbolStack); buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack); } return _displayBuilder || (_displayBuilder = { @@ -16789,90 +18907,90 @@ var ts; return false; function determineIfDeclarationIsVisible() { switch (node.kind) { - case 166 /* BindingElement */: + case 169 /* BindingElement */: return isDeclarationVisible(node.parent.parent); - case 214 /* VariableDeclaration */: + case 218 /* VariableDeclaration */: if (ts.isBindingPattern(node.name) && !node.name.elements.length) { // If the binding pattern is empty, this variable declaration is not visible return false; } // Otherwise fall through - case 221 /* ModuleDeclaration */: - case 217 /* ClassDeclaration */: - case 218 /* InterfaceDeclaration */: - case 219 /* TypeAliasDeclaration */: - case 216 /* FunctionDeclaration */: - case 220 /* EnumDeclaration */: - case 224 /* ImportEqualsDeclaration */: + case 225 /* ModuleDeclaration */: + case 221 /* ClassDeclaration */: + case 222 /* InterfaceDeclaration */: + case 223 /* TypeAliasDeclaration */: + case 220 /* FunctionDeclaration */: + case 224 /* EnumDeclaration */: + case 229 /* ImportEqualsDeclaration */: // external module augmentation is always visible if (ts.isExternalModuleAugmentation(node)) { return true; } - var parent_5 = getDeclarationContainer(node); + var parent_8 = getDeclarationContainer(node); // If the node is not exported or it is not ambient module element (except import declaration) - if (!(ts.getCombinedNodeFlags(node) & 2 /* Export */) && - !(node.kind !== 224 /* ImportEqualsDeclaration */ && parent_5.kind !== 251 /* SourceFile */ && ts.isInAmbientContext(parent_5))) { - return isGlobalSourceFile(parent_5); + if (!(ts.getCombinedNodeFlags(node) & 1 /* Export */) && + !(node.kind !== 229 /* ImportEqualsDeclaration */ && parent_8.kind !== 256 /* SourceFile */ && ts.isInAmbientContext(parent_8))) { + return isGlobalSourceFile(parent_8); } // Exported members/ambient module elements (exception import declaration) are visible if parent is visible - return isDeclarationVisible(parent_5); - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - if (node.flags & (16 /* Private */ | 32 /* Protected */)) { + return isDeclarationVisible(parent_8); + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + if (node.flags & (8 /* Private */ | 16 /* Protected */)) { // Private/protected properties/methods are not visible return false; } // Public properties/methods are visible if its parents are visible, so const it fall into next case statement - case 145 /* Constructor */: - case 149 /* ConstructSignature */: - case 148 /* CallSignature */: - case 150 /* IndexSignature */: - case 139 /* Parameter */: - case 222 /* ModuleBlock */: - case 153 /* FunctionType */: - case 154 /* ConstructorType */: - case 156 /* TypeLiteral */: - case 152 /* TypeReference */: - case 157 /* ArrayType */: - case 158 /* TupleType */: - case 159 /* UnionType */: - case 160 /* IntersectionType */: - case 161 /* ParenthesizedType */: + case 148 /* Constructor */: + case 152 /* ConstructSignature */: + case 151 /* CallSignature */: + case 153 /* IndexSignature */: + case 142 /* Parameter */: + case 226 /* ModuleBlock */: + case 156 /* FunctionType */: + case 157 /* ConstructorType */: + case 159 /* TypeLiteral */: + case 155 /* TypeReference */: + case 160 /* ArrayType */: + case 161 /* TupleType */: + case 162 /* UnionType */: + case 163 /* IntersectionType */: + case 164 /* ParenthesizedType */: return isDeclarationVisible(node.parent); // Default binding, import specifier and namespace import is visible // only on demand so by default it is not visible - case 226 /* ImportClause */: - case 227 /* NamespaceImport */: - case 229 /* ImportSpecifier */: + case 231 /* ImportClause */: + case 232 /* NamespaceImport */: + case 234 /* ImportSpecifier */: return false; // Type parameters are always visible - case 138 /* TypeParameter */: + case 141 /* TypeParameter */: // Source file is always visible - case 251 /* SourceFile */: + case 256 /* SourceFile */: return true; // Export assignments do not create name bindings outside the module - case 230 /* ExportAssignment */: + case 235 /* ExportAssignment */: return false; default: - ts.Debug.fail("isDeclarationVisible unknown: SyntaxKind: " + node.kind); + return false; } } } function collectLinkedAliases(node) { var exportSymbol; - if (node.parent && node.parent.kind === 230 /* ExportAssignment */) { - exportSymbol = resolveName(node.parent, node.text, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */, ts.Diagnostics.Cannot_find_name_0, node); + if (node.parent && node.parent.kind === 235 /* ExportAssignment */) { + exportSymbol = resolveName(node.parent, node.text, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */, ts.Diagnostics.Cannot_find_name_0, node); } - else if (node.parent.kind === 233 /* ExportSpecifier */) { + else if (node.parent.kind === 238 /* ExportSpecifier */) { var exportSpecifier = node.parent; exportSymbol = exportSpecifier.parent.parent.moduleSpecifier ? getExternalModuleMember(exportSpecifier.parent.parent, exportSpecifier) : - resolveEntityName(exportSpecifier.propertyName || exportSpecifier.name, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */); + resolveEntityName(exportSpecifier.propertyName || exportSpecifier.name, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */); } var result = []; if (exportSymbol) { @@ -16890,7 +19008,7 @@ var ts; // Add the referenced top container visible var internalModuleReference = declaration.moduleReference; var firstIdentifier = getFirstIdentifier(internalModuleReference); - var importSymbol = resolveName(declaration, firstIdentifier.text, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */, ts.Diagnostics.Cannot_find_name_0, firstIdentifier); + var importSymbol = resolveName(declaration, firstIdentifier.text, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */, undefined, undefined); if (importSymbol) { buildVisibleNodeList(importSymbol.declarations); } @@ -16943,7 +19061,7 @@ var ts; return getSymbolLinks(target).declaredType; } if (propertyName === 1 /* ResolvedBaseConstructorType */) { - ts.Debug.assert(!!(target.flags & 1024 /* Class */)); + ts.Debug.assert(!!(target.flags & 32768 /* Class */)); return target.resolvedBaseConstructorType; } if (propertyName === 3 /* ResolvedReturnType */) { @@ -16962,12 +19080,12 @@ var ts; node = ts.getRootDeclaration(node); while (node) { switch (node.kind) { - case 214 /* VariableDeclaration */: - case 215 /* VariableDeclarationList */: - case 229 /* ImportSpecifier */: - case 228 /* NamedImports */: - case 227 /* NamespaceImport */: - case 226 /* ImportClause */: + case 218 /* VariableDeclaration */: + case 219 /* VariableDeclarationList */: + case 234 /* ImportSpecifier */: + case 233 /* NamedImports */: + case 232 /* NamespaceImport */: + case 231 /* ImportClause */: node = node.parent; break; default: @@ -16991,11 +19109,14 @@ var ts; function isTypeAny(type) { return type && (type.flags & 1 /* Any */) !== 0; } + function isTypeNever(type) { + return type && (type.flags & 8192 /* Never */) !== 0; + } // Return the type of a binding element parent. We check SymbolLinks first to see if a type has been // assigned by contextual typing. function getTypeForBindingElementParent(node) { var symbol = getSymbolOfNode(node); - return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node); + return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, /*includeOptionality*/ false); } function getTextOfPropertyName(name) { switch (name.kind) { @@ -17004,7 +19125,7 @@ var ts; case 9 /* StringLiteral */: case 8 /* NumericLiteral */: return name.text; - case 137 /* ComputedPropertyName */: + case 140 /* ComputedPropertyName */: if (ts.isStringOrNumericLiteral(name.expression.kind)) { return name.expression.text; } @@ -17012,9 +19133,9 @@ var ts; return undefined; } function isComputedNonLiteralName(name) { - return name.kind === 137 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression.kind); + return name.kind === 140 /* ComputedPropertyName */ && !ts.isStringOrNumericLiteral(name.expression.kind); } - // Return the inferred type for a binding element + /** Return the inferred type for a binding element */ function getTypeForBindingElement(declaration) { var pattern = declaration.parent; var parentType = getTypeForBindingElementParent(pattern.parent); @@ -17032,21 +19153,24 @@ var ts; return parentType; } var type; - if (pattern.kind === 164 /* ObjectBindingPattern */) { + if (pattern.kind === 167 /* ObjectBindingPattern */) { // Use explicitly specified property name ({ p: xxx } form), or otherwise the implied name ({ p } form) - var name_10 = declaration.propertyName || declaration.name; - if (isComputedNonLiteralName(name_10)) { + var name_11 = declaration.propertyName || declaration.name; + if (isComputedNonLiteralName(name_11)) { // computed properties with non-literal names are treated as 'any' return anyType; } + if (declaration.initializer) { + getContextualType(declaration.initializer); + } // Use type of the specified property, or otherwise, for a numeric name, the type of the numeric index signature, // or otherwise the type of the string index signature. - var text = getTextOfPropertyName(name_10); + var text = getTextOfPropertyName(name_11); type = getTypeOfPropertyOfType(parentType, text) || isNumericLiteralName(text) && getIndexTypeOfType(parentType, 1 /* Number */) || getIndexTypeOfType(parentType, 0 /* String */); if (!type) { - error(name_10, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name_10)); + error(name_11, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name_11)); return unknownType; } } @@ -17063,7 +19187,7 @@ var ts; : elementType; if (!type) { if (isTupleType(parentType)) { - error(declaration, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(parentType), parentType.elementTypes.length, pattern.elements.length); + error(declaration, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(parentType), getTypeReferenceArity(parentType), pattern.elements.length); } else { error(declaration, ts.Diagnostics.Type_0_has_no_property_1, typeToString(parentType), propName); @@ -17076,7 +19200,14 @@ var ts; type = createArrayType(elementType); } } - return type; + // In strict null checking mode, if a default value of a non-undefined type is specified, remove + // undefined from the final type. + if (strictNullChecks && declaration.initializer && !(getFalsyFlags(checkExpressionCached(declaration.initializer)) & 2048 /* Undefined */)) { + type = getTypeWithFacts(type, 131072 /* NEUndefined */); + } + return declaration.initializer ? + getUnionType([type, checkExpressionCached(declaration.initializer)], /*subtypeReduction*/ true) : + type; } function getTypeForVariableLikeDeclarationFromJSDocComment(declaration) { var jsDocType = getJSDocTypeForVariableLikeDeclarationFromJSDocComment(declaration); @@ -17090,16 +19221,16 @@ var ts; if (typeTag && typeTag.typeExpression) { return typeTag.typeExpression.type; } - if (declaration.kind === 214 /* VariableDeclaration */ && - declaration.parent.kind === 215 /* VariableDeclarationList */ && - declaration.parent.parent.kind === 196 /* VariableStatement */) { + if (declaration.kind === 218 /* VariableDeclaration */ && + declaration.parent.kind === 219 /* VariableDeclarationList */ && + declaration.parent.parent.kind === 200 /* VariableStatement */) { // @type annotation might have been on the variable statement, try that instead. var annotation = ts.getJSDocTypeTag(declaration.parent.parent); if (annotation && annotation.typeExpression) { return annotation.typeExpression.type; } } - else if (declaration.kind === 139 /* Parameter */) { + else if (declaration.kind === 142 /* Parameter */) { // If it's a parameter, see if the parent has a jsdoc comment with an @param // annotation. var paramTag = ts.getCorrespondingJSDocParameterTag(declaration); @@ -17109,9 +19240,12 @@ var ts; } return undefined; } + function addOptionality(type, optional) { + return strictNullChecks && optional ? includeFalsyTypes(type, 2048 /* Undefined */) : type; + } // Return the inferred type for a variable, parameter, or property declaration - function getTypeForVariableLikeDeclaration(declaration) { - if (declaration.parserContextFlags & 32 /* JavaScriptFile */) { + function getTypeForVariableLikeDeclaration(declaration, includeOptionality) { + if (declaration.flags & 134217728 /* JavaScriptFile */) { // If this is a variable in a JavaScript file, then use the JSDoc type (if it has // one as its type), otherwise fallback to the below standard TS codepaths to // try to figure it out. @@ -17121,10 +19255,10 @@ var ts; } } // A variable declared in a for..in statement is always of type string - if (declaration.parent.parent.kind === 203 /* ForInStatement */) { + if (declaration.parent.parent.kind === 207 /* ForInStatement */) { return stringType; } - if (declaration.parent.parent.kind === 204 /* ForOfStatement */) { + if (declaration.parent.parent.kind === 208 /* ForOfStatement */) { // checkRightHandSideOfForOf will return undefined if the for-of expression type was // missing properties/signatures required to get its iteratedType (like // [Symbol.iterator] or next). This may be because we accessed properties from anyType, @@ -17136,34 +19270,48 @@ var ts; } // Use type from type annotation if one is present if (declaration.type) { - return getTypeFromTypeNode(declaration.type); + return addOptionality(getTypeFromTypeNode(declaration.type), /*optional*/ declaration.questionToken && includeOptionality); } - if (declaration.kind === 139 /* Parameter */) { + if (declaration.kind === 142 /* Parameter */) { var func = declaration.parent; // For a parameter of a set accessor, use the type of the get accessor if one is present - if (func.kind === 147 /* SetAccessor */ && !ts.hasDynamicName(func)) { - var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 146 /* GetAccessor */); + if (func.kind === 150 /* SetAccessor */ && !ts.hasDynamicName(func)) { + var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 149 /* GetAccessor */); if (getter) { - return getReturnTypeOfSignature(getSignatureFromDeclaration(getter)); + var getterSignature = getSignatureFromDeclaration(getter); + var thisParameter = getAccessorThisParameter(func); + if (thisParameter && declaration === thisParameter) { + // Use the type from the *getter* + ts.Debug.assert(!thisParameter.type); + return getTypeOfSymbol(getterSignature.thisParameter); + } + return getReturnTypeOfSignature(getterSignature); } } // Use contextual parameter type if one is available - var type = getContextuallyTypedParameterType(declaration); + var type = void 0; + if (declaration.symbol.name === "this") { + var thisParameter = getContextualThisParameter(func); + type = thisParameter ? getTypeOfSymbol(thisParameter) : undefined; + } + else { + type = getContextuallyTypedParameterType(declaration); + } if (type) { - return type; + return addOptionality(type, /*optional*/ declaration.questionToken && includeOptionality); } } // Use the type of the initializer expression if one is present if (declaration.initializer) { - return checkExpressionCached(declaration.initializer); + return addOptionality(checkExpressionCached(declaration.initializer), /*optional*/ declaration.questionToken && includeOptionality); } // If it is a short-hand property assignment, use the type of the identifier - if (declaration.kind === 249 /* ShorthandPropertyAssignment */) { + if (declaration.kind === 254 /* ShorthandPropertyAssignment */) { return checkIdentifier(declaration.name); } // If the declaration specifies a binding pattern, use the type implied by the binding pattern if (ts.isBindingPattern(declaration.name)) { - return getTypeFromBindingPattern(declaration.name, /*includePatternInType*/ false); + return getTypeFromBindingPattern(declaration.name, /*includePatternInType*/ false, /*reportErrors*/ true); } // No type specified and nothing can be inferred return undefined; @@ -17171,18 +19319,21 @@ var ts; // Return the type implied by a binding pattern element. This is the type of the initializer of the element if // one is present. Otherwise, if the element is itself a binding pattern, it is the type implied by the binding // pattern. Otherwise, it is the type any. - function getTypeFromBindingElement(element, includePatternInType) { + function getTypeFromBindingElement(element, includePatternInType, reportErrors) { if (element.initializer) { - return getWidenedType(checkExpressionCached(element.initializer)); + return checkExpressionCached(element.initializer); } if (ts.isBindingPattern(element.name)) { - return getTypeFromBindingPattern(element.name, includePatternInType); + return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors); + } + if (reportErrors && compilerOptions.noImplicitAny && !declarationBelongsToPrivateAmbientMember(element)) { + reportImplicitAnyError(element, anyType); } return anyType; } // Return the type implied by an object binding pattern - function getTypeFromObjectBindingPattern(pattern, includePatternInType) { - var members = {}; + function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) { + var members = ts.createMap(); var hasComputedProperties = false; ts.forEach(pattern.elements, function (e) { var name = e.propertyName || e.name; @@ -17194,7 +19345,7 @@ var ts; var text = getTextOfPropertyName(name); var flags = 4 /* Property */ | 67108864 /* Transient */ | (e.initializer ? 536870912 /* Optional */ : 0); var symbol = createSymbol(flags, text); - symbol.type = getTypeFromBindingElement(e, includePatternInType); + symbol.type = getTypeFromBindingElement(e, includePatternInType, reportErrors); symbol.bindingElement = e; members[symbol.name] = symbol; }); @@ -17203,24 +19354,24 @@ var ts; result.pattern = pattern; } if (hasComputedProperties) { - result.flags |= 67108864 /* ObjectLiteralPatternWithComputedProperties */; + result.flags |= 536870912 /* ObjectLiteralPatternWithComputedProperties */; } return result; } // Return the type implied by an array binding pattern - function getTypeFromArrayBindingPattern(pattern, includePatternInType) { + function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors) { var elements = pattern.elements; if (elements.length === 0 || elements[elements.length - 1].dotDotDotToken) { return languageVersion >= 2 /* ES6 */ ? createIterableType(anyType) : anyArrayType; } // If the pattern has at least one element, and no rest element, then it should imply a tuple type. - var elementTypes = ts.map(elements, function (e) { return e.kind === 190 /* OmittedExpression */ ? anyType : getTypeFromBindingElement(e, includePatternInType); }); + var elementTypes = ts.map(elements, function (e) { return e.kind === 193 /* OmittedExpression */ ? anyType : getTypeFromBindingElement(e, includePatternInType, reportErrors); }); + var result = createTupleType(elementTypes); if (includePatternInType) { - var result = createNewTupleType(elementTypes); + result = cloneTypeReference(result); result.pattern = pattern; - return result; } - return createTupleType(elementTypes); + return result; } // Return the type implied by a binding pattern. This is the type implied purely by the binding pattern itself // and without regard to its context (i.e. without regard any type annotation or initializer associated with the @@ -17229,10 +19380,10 @@ var ts; // used as the contextual type of an initializer associated with the binding pattern. Also, for a destructuring // parameter with no type annotation or initializer, the type implied by the binding pattern becomes the type of // the parameter. - function getTypeFromBindingPattern(pattern, includePatternInType) { - return pattern.kind === 164 /* ObjectBindingPattern */ - ? getTypeFromObjectBindingPattern(pattern, includePatternInType) - : getTypeFromArrayBindingPattern(pattern, includePatternInType); + function getTypeFromBindingPattern(pattern, includePatternInType, reportErrors) { + return pattern.kind === 167 /* ObjectBindingPattern */ + ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) + : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors); } // Return the type associated with a variable, parameter, or property declaration. In the simple case this is the type // specified in a type annotation or inferred from an initializer. However, in the case of a destructuring declaration it @@ -17244,7 +19395,7 @@ var ts; // binding pattern [x, s = ""]. Because the contextual type is a tuple type, the resulting type of [1, "one"] is the // tuple type [number, string]. Thus, the type inferred for 'x' is number and the type inferred for 's' is string. function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors) { - var type = getTypeForVariableLikeDeclaration(declaration); + var type = getTypeForVariableLikeDeclaration(declaration, /*includeOptionality*/ true); if (type) { if (reportErrors) { reportErrorsFromWidening(declaration, type); @@ -17252,7 +19403,7 @@ var ts; // During a normal type check we'll never get to here with a property assignment (the check of the containing // object literal uses a different path). We exclude widening only so that language services and type verification // tools see the actual type. - if (declaration.kind === 248 /* PropertyAssignment */) { + if (declaration.kind === 253 /* PropertyAssignment */) { return type; } return getWidenedType(type); @@ -17261,13 +19412,17 @@ var ts; type = declaration.dotDotDotToken ? anyArrayType : anyType; // Report implicit any errors unless this is a private property within an ambient declaration if (reportErrors && compilerOptions.noImplicitAny) { - var root = ts.getRootDeclaration(declaration); - if (!isPrivateWithinAmbient(root) && !(root.kind === 139 /* Parameter */ && isPrivateWithinAmbient(root.parent))) { + if (!declarationBelongsToPrivateAmbientMember(declaration)) { reportImplicitAnyError(declaration, type); } } return type; } + function declarationBelongsToPrivateAmbientMember(declaration) { + var root = ts.getRootDeclaration(declaration); + var memberDeclaration = root.kind === 142 /* Parameter */ ? root.parent : root; + return isPrivateWithinAmbient(memberDeclaration); + } function getTypeOfVariableOrParameterOrProperty(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { @@ -17277,30 +19432,43 @@ var ts; } // Handle catch clause variables var declaration = symbol.valueDeclaration; - if (declaration.parent.kind === 247 /* CatchClause */) { + if (declaration.parent.kind === 252 /* CatchClause */) { return links.type = anyType; } // Handle export default expressions - if (declaration.kind === 230 /* ExportAssignment */) { + if (declaration.kind === 235 /* ExportAssignment */) { return links.type = checkExpression(declaration.expression); } - // Handle module.exports = expr - if (declaration.kind === 184 /* BinaryExpression */) { - return links.type = getUnionType(ts.map(symbol.declarations, function (decl) { return checkExpressionCached(decl.right); })); - } - if (declaration.kind === 169 /* PropertyAccessExpression */) { - // Declarations only exist for property access expressions for certain - // special assignment kinds - if (declaration.parent.kind === 184 /* BinaryExpression */) { - // Handle exports.p = expr or this.p = expr or className.prototype.method = expr - return links.type = checkExpressionCached(declaration.parent.right); - } + if (declaration.flags & 134217728 /* JavaScriptFile */ && declaration.kind === 280 /* JSDocPropertyTag */ && declaration.typeExpression) { + return links.type = getTypeFromTypeNode(declaration.typeExpression.type); } // Handle variable, parameter or property if (!pushTypeResolution(symbol, 0 /* Type */)) { return unknownType; } - var type = getWidenedTypeForVariableLikeDeclaration(declaration, /*reportErrors*/ true); + var type = void 0; + // Handle certain special assignment kinds, which happen to union across multiple declarations: + // * module.exports = expr + // * exports.p = expr + // * this.p = expr + // * className.prototype.method = expr + if (declaration.kind === 187 /* BinaryExpression */ || + declaration.kind === 172 /* PropertyAccessExpression */ && declaration.parent.kind === 187 /* BinaryExpression */) { + // Use JS Doc type if present on parent expression statement + if (declaration.flags & 134217728 /* JavaScriptFile */) { + var typeTag = ts.getJSDocTypeTag(declaration.parent); + if (typeTag && typeTag.typeExpression) { + return links.type = getTypeFromTypeNode(typeTag.typeExpression.type); + } + } + var declaredTypes = ts.map(symbol.declarations, function (decl) { return decl.kind === 187 /* BinaryExpression */ ? + checkExpressionCached(decl.right) : + checkExpressionCached(decl.parent.right); }); + type = getUnionType(declaredTypes, /*subtypeReduction*/ true); + } + else { + type = getWidenedTypeForVariableLikeDeclaration(declaration, /*reportErrors*/ true); + } if (!popTypeResolution()) { if (symbol.valueDeclaration.type) { // Variable has type annotation that circularly references the variable itself @@ -17321,7 +19489,7 @@ var ts; } function getAnnotatedAccessorType(accessor) { if (accessor) { - if (accessor.kind === 146 /* GetAccessor */) { + if (accessor.kind === 149 /* GetAccessor */) { return accessor.type && getTypeFromTypeNode(accessor.type); } else { @@ -17331,14 +19499,27 @@ var ts; } return undefined; } + function getAnnotatedAccessorThisParameter(accessor) { + var parameter = getAccessorThisParameter(accessor); + return parameter && parameter.symbol; + } + function getThisTypeOfDeclaration(declaration) { + return getThisTypeOfSignature(getSignatureFromDeclaration(declaration)); + } function getTypeOfAccessors(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { + var getter = ts.getDeclarationOfKind(symbol, 149 /* GetAccessor */); + var setter = ts.getDeclarationOfKind(symbol, 150 /* SetAccessor */); + if (getter && getter.flags & 134217728 /* JavaScriptFile */) { + var jsDocType = getTypeForVariableLikeDeclarationFromJSDocComment(getter); + if (jsDocType) { + return links.type = jsDocType; + } + } if (!pushTypeResolution(symbol, 0 /* Type */)) { return unknownType; } - var getter = ts.getDeclarationOfKind(symbol, 146 /* GetAccessor */); - var setter = ts.getDeclarationOfKind(symbol, 147 /* SetAccessor */); var type = void 0; // First try to see if the user specified a return type on the get-accessor. var getterReturnType = getAnnotatedAccessorType(getter); @@ -17367,7 +19548,7 @@ var ts; if (!popTypeResolution()) { type = anyType; if (compilerOptions.noImplicitAny) { - var getter_1 = ts.getDeclarationOfKind(symbol, 146 /* GetAccessor */); + var getter_1 = ts.getDeclarationOfKind(symbol, 149 /* GetAccessor */); error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); } } @@ -17378,7 +19559,14 @@ var ts; function getTypeOfFuncClassEnumModule(symbol) { var links = getSymbolLinks(symbol); if (!links.type) { - links.type = createObjectType(65536 /* Anonymous */, symbol); + if (symbol.valueDeclaration.kind === 225 /* ModuleDeclaration */ && ts.isShorthandAmbientModuleSymbol(symbol)) { + links.type = anyType; + } + else { + var type = createObjectType(2097152 /* Anonymous */, symbol); + links.type = strictNullChecks && symbol.flags & 536870912 /* Optional */ ? + includeFalsyTypes(type, 2048 /* Undefined */) : type; + } } return links.type; } @@ -17433,7 +19621,7 @@ var ts; return unknownType; } function getTargetType(type) { - return type.flags & 4096 /* Reference */ ? type.target : type; + return type.flags & 131072 /* Reference */ ? type.target : type; } function hasBaseType(type, checkBase) { return check(type); @@ -17467,9 +19655,9 @@ var ts; if (!node) { return typeParameters; } - if (node.kind === 217 /* ClassDeclaration */ || node.kind === 189 /* ClassExpression */ || - node.kind === 216 /* FunctionDeclaration */ || node.kind === 176 /* FunctionExpression */ || - node.kind === 144 /* MethodDeclaration */ || node.kind === 177 /* ArrowFunction */) { + if (node.kind === 221 /* ClassDeclaration */ || node.kind === 192 /* ClassExpression */ || + node.kind === 220 /* FunctionDeclaration */ || node.kind === 179 /* FunctionExpression */ || + node.kind === 147 /* MethodDeclaration */ || node.kind === 180 /* ArrowFunction */) { var declarations = node.typeParameters; if (declarations) { return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations); @@ -17479,7 +19667,7 @@ var ts; } // The outer type parameters are those defined by enclosing generic classes, methods, or functions. function getOuterTypeParametersOfClassOrInterface(symbol) { - var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 218 /* InterfaceDeclaration */); + var declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 222 /* InterfaceDeclaration */); return appendOuterTypeParameters(undefined, declaration); } // The local type parameters are the combined set of type parameters from all declarations of the class, @@ -17488,8 +19676,8 @@ var ts; var result; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var node = _a[_i]; - if (node.kind === 218 /* InterfaceDeclaration */ || node.kind === 217 /* ClassDeclaration */ || - node.kind === 189 /* ClassExpression */ || node.kind === 219 /* TypeAliasDeclaration */) { + if (node.kind === 222 /* InterfaceDeclaration */ || node.kind === 221 /* ClassDeclaration */ || + node.kind === 192 /* ClassExpression */ || node.kind === 223 /* TypeAliasDeclaration */) { var declaration = node; if (declaration.typeParameters) { result = appendTypeParameters(result, declaration.typeParameters); @@ -17504,7 +19692,7 @@ var ts; return ts.concatenate(getOuterTypeParametersOfClassOrInterface(symbol), getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol)); } function isConstructorType(type) { - return type.flags & 80896 /* ObjectType */ && getSignaturesOfType(type, 1 /* Construct */).length > 0; + return type.flags & 2588672 /* ObjectType */ && getSignaturesOfType(type, 1 /* Construct */).length > 0; } function getBaseTypeNodeOfClass(type) { return ts.getClassExtendsHeritageClauseElement(type.symbol.valueDeclaration); @@ -17536,7 +19724,7 @@ var ts; return unknownType; } var baseConstructorType = checkExpression(baseTypeNode.expression); - if (baseConstructorType.flags & 80896 /* ObjectType */) { + if (baseConstructorType.flags & 2588672 /* ObjectType */) { // Resolving the members of a class requires us to resolve the base class of that class. // We force resolution here such that we catch circularities now. resolveStructuredTypeMembers(baseConstructorType); @@ -17545,7 +19733,7 @@ var ts; error(type.symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol)); return type.resolvedBaseConstructorType = unknownType; } - if (baseConstructorType !== unknownType && baseConstructorType !== nullType && !isConstructorType(baseConstructorType)) { + if (baseConstructorType !== unknownType && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) { error(baseTypeNode.expression, ts.Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType)); return type.resolvedBaseConstructorType = unknownType; } @@ -17554,25 +19742,28 @@ var ts; return type.resolvedBaseConstructorType; } function getBaseTypes(type) { - var isClass = type.symbol.flags & 32 /* Class */; - var isInterface = type.symbol.flags & 64 /* Interface */; if (!type.resolvedBaseTypes) { - if (!isClass && !isInterface) { + if (type.flags & 262144 /* Tuple */) { + type.resolvedBaseTypes = [createArrayType(getUnionType(type.typeParameters))]; + } + else if (type.symbol.flags & (32 /* Class */ | 64 /* Interface */)) { + if (type.symbol.flags & 32 /* Class */) { + resolveBaseTypesOfClass(type); + } + if (type.symbol.flags & 64 /* Interface */) { + resolveBaseTypesOfInterface(type); + } + } + else { ts.Debug.fail("type must be class or interface"); } - if (isClass) { - resolveBaseTypesOfClass(type); - } - if (isInterface) { - resolveBaseTypesOfInterface(type); - } } return type.resolvedBaseTypes; } function resolveBaseTypesOfClass(type) { type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; var baseConstructorType = getBaseConstructorTypeOfClass(type); - if (!(baseConstructorType.flags & 80896 /* ObjectType */)) { + if (!(baseConstructorType.flags & 2588672 /* ObjectType */)) { return; } var baseTypeNode = getBaseTypeNodeOfClass(type); @@ -17599,7 +19790,7 @@ var ts; if (baseType === unknownType) { return; } - if (!(getTargetType(baseType).flags & (1024 /* Class */ | 2048 /* Interface */))) { + if (!(getTargetType(baseType).flags & (32768 /* Class */ | 65536 /* Interface */))) { error(baseTypeNode.expression, ts.Diagnostics.Base_constructor_return_type_0_is_not_a_class_or_interface_type, typeToString(baseType)); return; } @@ -17629,12 +19820,12 @@ var ts; type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 218 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) { + if (declaration.kind === 222 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) { for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) { var node = _c[_b]; var baseType = getTypeFromTypeNode(node); if (baseType !== unknownType) { - if (getTargetType(baseType).flags & (1024 /* Class */ | 2048 /* Interface */)) { + if (getTargetType(baseType).flags & (32768 /* Class */ | 65536 /* Interface */)) { if (type !== baseType && !hasBaseType(baseType, type)) { if (type.resolvedBaseTypes === emptyArray) { type.resolvedBaseTypes = [baseType]; @@ -17661,16 +19852,16 @@ var ts; function isIndependentInterface(symbol) { for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var declaration = _a[_i]; - if (declaration.kind === 218 /* InterfaceDeclaration */) { - if (declaration.flags & 262144 /* ContainsThis */) { + if (declaration.kind === 222 /* InterfaceDeclaration */) { + if (declaration.flags & 16384 /* ContainsThis */) { return false; } var baseTypeNodes = ts.getInterfaceBaseTypeNodes(declaration); if (baseTypeNodes) { for (var _b = 0, baseTypeNodes_1 = baseTypeNodes; _b < baseTypeNodes_1.length; _b++) { var node = baseTypeNodes_1[_b]; - if (ts.isSupportedExpressionWithTypeArguments(node)) { - var baseSymbol = resolveEntityName(node.expression, 793056 /* Type */, /*ignoreErrors*/ true); + if (ts.isEntityNameExpression(node.expression)) { + var baseSymbol = resolveEntityName(node.expression, 793064 /* Type */, /*ignoreErrors*/ true); if (!baseSymbol || !(baseSymbol.flags & 64 /* Interface */) || getDeclaredTypeOfClassOrInterface(baseSymbol).thisType) { return false; } @@ -17684,7 +19875,7 @@ var ts; function getDeclaredTypeOfClassOrInterface(symbol) { var links = getSymbolLinks(symbol); if (!links.declaredType) { - var kind = symbol.flags & 32 /* Class */ ? 1024 /* Class */ : 2048 /* Interface */; + var kind = symbol.flags & 32 /* Class */ ? 32768 /* Class */ : 65536 /* Interface */; var type = links.declaredType = createObjectType(kind, symbol); var outerTypeParameters = getOuterTypeParametersOfClassOrInterface(symbol); var localTypeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); @@ -17693,16 +19884,16 @@ var ts; // property types inferred from initializers and method return types inferred from return statements are very hard // to exhaustively analyze). We give interfaces a "this" type if we can't definitely determine that they are free of // "this" references. - if (outerTypeParameters || localTypeParameters || kind === 1024 /* Class */ || !isIndependentInterface(symbol)) { - type.flags |= 4096 /* Reference */; + if (outerTypeParameters || localTypeParameters || kind === 32768 /* Class */ || !isIndependentInterface(symbol)) { + type.flags |= 131072 /* Reference */; type.typeParameters = ts.concatenate(outerTypeParameters, localTypeParameters); type.outerTypeParameters = outerTypeParameters; type.localTypeParameters = localTypeParameters; - type.instantiations = {}; + type.instantiations = ts.createMap(); type.instantiations[getTypeListId(type.typeParameters)] = type; type.target = type; type.typeArguments = type.typeParameters; - type.thisType = createType(512 /* TypeParameter */ | 33554432 /* ThisType */); + type.thisType = createType(16384 /* TypeParameter */ | 268435456 /* ThisType */); type.thisType.symbol = symbol; type.thisType.constraint = type; } @@ -17717,14 +19908,27 @@ var ts; if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) { return unknownType; } - var declaration = ts.getDeclarationOfKind(symbol, 219 /* TypeAliasDeclaration */); - var type = getTypeFromTypeNode(declaration.type); + var typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); + var declaration = ts.getDeclarationOfKind(symbol, 279 /* JSDocTypedefTag */); + var type = void 0; + if (declaration) { + if (declaration.jsDocTypeLiteral) { + type = getTypeFromTypeNode(declaration.jsDocTypeLiteral); + } + else { + type = getTypeFromTypeNode(declaration.typeExpression.type); + } + } + else { + declaration = ts.getDeclarationOfKind(symbol, 223 /* TypeAliasDeclaration */); + type = getTypeFromTypeNode(declaration.type, symbol, typeParameters); + } if (popTypeResolution()) { - links.typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); - if (links.typeParameters) { + links.typeParameters = typeParameters; + if (typeParameters) { // Initialize the instantiation cache for generic type aliases. The declared type corresponds to // an instantiation of the type alias with the type parameters supplied as type arguments. - links.instantiations = {}; + links.instantiations = ts.createMap(); links.instantiations[getTypeListId(links.typeParameters)] = type; } } @@ -17736,21 +19940,82 @@ var ts; } return links.declaredType; } + function isLiteralEnumMember(symbol, member) { + var expr = member.initializer; + if (!expr) { + return !ts.isInAmbientContext(member); + } + return expr.kind === 8 /* NumericLiteral */ || + expr.kind === 185 /* PrefixUnaryExpression */ && expr.operator === 36 /* MinusToken */ && + expr.operand.kind === 8 /* NumericLiteral */ || + expr.kind === 69 /* Identifier */ && !!symbol.exports[expr.text]; + } + function enumHasLiteralMembers(symbol) { + for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { + var declaration = _a[_i]; + if (declaration.kind === 224 /* EnumDeclaration */) { + for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) { + var member = _c[_b]; + if (!isLiteralEnumMember(symbol, member)) { + return false; + } + } + } + } + return true; + } function getDeclaredTypeOfEnum(symbol) { var links = getSymbolLinks(symbol); if (!links.declaredType) { - var type = createType(128 /* Enum */); - type.symbol = symbol; - links.declaredType = type; + var enumType = links.declaredType = createType(16 /* Enum */); + enumType.symbol = symbol; + if (enumHasLiteralMembers(symbol)) { + var memberTypeList = []; + var memberTypes = ts.createMap(); + for (var _i = 0, _a = enumType.symbol.declarations; _i < _a.length; _i++) { + var declaration = _a[_i]; + if (declaration.kind === 224 /* EnumDeclaration */) { + computeEnumMemberValues(declaration); + for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) { + var member = _c[_b]; + var memberSymbol = getSymbolOfNode(member); + var value = getEnumMemberValue(member); + if (!memberTypes[value]) { + var memberType = memberTypes[value] = createType(256 /* EnumLiteral */); + memberType.symbol = memberSymbol; + memberType.baseType = enumType; + memberType.text = "" + value; + memberTypeList.push(memberType); + } + } + } + } + enumType.memberTypes = memberTypes; + if (memberTypeList.length > 1) { + enumType.flags |= 524288 /* Union */; + enumType.types = memberTypeList; + unionTypes[getTypeListId(memberTypeList)] = enumType; + } + } + } + return links.declaredType; + } + function getDeclaredTypeOfEnumMember(symbol) { + var links = getSymbolLinks(symbol); + if (!links.declaredType) { + var enumType = getDeclaredTypeOfEnum(getParentOfSymbol(symbol)); + links.declaredType = enumType.flags & 524288 /* Union */ ? + enumType.memberTypes[getEnumMemberValue(symbol.valueDeclaration)] : + enumType; } return links.declaredType; } function getDeclaredTypeOfTypeParameter(symbol) { var links = getSymbolLinks(symbol); if (!links.declaredType) { - var type = createType(512 /* TypeParameter */); + var type = createType(16384 /* TypeParameter */); type.symbol = symbol; - if (!ts.getDeclarationOfKind(symbol, 138 /* TypeParameter */).constraint) { + if (!ts.getDeclarationOfKind(symbol, 141 /* TypeParameter */).constraint) { type.constraint = noConstraintType; } links.declaredType = type; @@ -17772,11 +20037,14 @@ var ts; if (symbol.flags & 524288 /* TypeAlias */) { return getDeclaredTypeOfTypeAlias(symbol); } + if (symbol.flags & 262144 /* TypeParameter */) { + return getDeclaredTypeOfTypeParameter(symbol); + } if (symbol.flags & 384 /* Enum */) { return getDeclaredTypeOfEnum(symbol); } - if (symbol.flags & 262144 /* TypeParameter */) { - return getDeclaredTypeOfTypeParameter(symbol); + if (symbol.flags & 8 /* EnumMember */) { + return getDeclaredTypeOfEnumMember(symbol); } if (symbol.flags & 8388608 /* Alias */) { return getDeclaredTypeOfAlias(symbol); @@ -17801,16 +20069,19 @@ var ts; function isIndependentType(node) { switch (node.kind) { case 117 /* AnyKeyword */: - case 130 /* StringKeyword */: - case 128 /* NumberKeyword */: + case 132 /* StringKeyword */: + case 130 /* NumberKeyword */: case 120 /* BooleanKeyword */: - case 131 /* SymbolKeyword */: + case 133 /* SymbolKeyword */: case 103 /* VoidKeyword */: - case 163 /* StringLiteralType */: + case 135 /* UndefinedKeyword */: + case 93 /* NullKeyword */: + case 127 /* NeverKeyword */: + case 166 /* LiteralType */: return true; - case 157 /* ArrayType */: + case 160 /* ArrayType */: return isIndependentType(node.elementType); - case 152 /* TypeReference */: + case 155 /* TypeReference */: return isIndependentTypeReference(node); } return false; @@ -17823,7 +20094,7 @@ var ts; // A function-like declaration is considered independent (free of this references) if it has a return type // annotation that is considered independent and if each parameter is considered independent. function isIndependentFunctionLikeDeclaration(node) { - if (node.kind !== 145 /* Constructor */ && (!node.type || !isIndependentType(node.type))) { + if (node.kind !== 148 /* Constructor */ && (!node.type || !isIndependentType(node.type))) { return false; } for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { @@ -17837,19 +20108,19 @@ var ts; // Returns true if the class or interface member given by the symbol is free of "this" references. The // function may return false for symbols that are actually free of "this" references because it is not // feasible to perform a complete analysis in all cases. In particular, property members with types - // inferred from their initializers and function members with inferred return types are convervatively + // inferred from their initializers and function members with inferred return types are conservatively // assumed not to be free of "this" references. function isIndependentMember(symbol) { if (symbol.declarations && symbol.declarations.length === 1) { var declaration = symbol.declarations[0]; if (declaration) { switch (declaration.kind) { - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: return isIndependentVariableLikeDeclaration(declaration); - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 145 /* Constructor */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 148 /* Constructor */: return isIndependentFunctionLikeDeclaration(declaration); } } @@ -17857,7 +20128,7 @@ var ts; return false; } function createSymbolTable(symbols) { - var result = {}; + var result = ts.createMap(); for (var _i = 0, symbols_1 = symbols; _i < symbols_1.length; _i++) { var symbol = symbols_1[_i]; result[symbol.name] = symbol; @@ -17867,7 +20138,7 @@ var ts; // The mappingThisOnly flag indicates that the only type parameter being mapped is "this". When the flag is true, // we check symbols to see if we can quickly conclude they are free of "this" references, thus needing no instantiation. function createInstantiatedSymbolTable(symbols, mapper, mappingThisOnly) { - var result = {}; + var result = ts.createMap(); for (var _i = 0, symbols_2 = symbols; _i < symbols_2.length; _i++) { var symbol = symbols_2[_i]; result[symbol.name] = mappingThisOnly && isIndependentMember(symbol) ? symbol : instantiateSymbol(symbol, mapper); @@ -17877,7 +20148,7 @@ var ts; function addInheritedMembers(symbols, baseSymbols) { for (var _i = 0, baseSymbols_1 = baseSymbols; _i < baseSymbols_1.length; _i++) { var s = baseSymbols_1[_i]; - if (!ts.hasProperty(symbols, s.name)) { + if (!symbols[s.name]) { symbols[s.name] = s; } } @@ -17888,35 +20159,43 @@ var ts; type.declaredProperties = getNamedMembers(symbol.members); type.declaredCallSignatures = getSignaturesOfSymbol(symbol.members["__call"]); type.declaredConstructSignatures = getSignaturesOfSymbol(symbol.members["__new"]); - type.declaredStringIndexType = getIndexTypeOfSymbol(symbol, 0 /* String */); - type.declaredNumberIndexType = getIndexTypeOfSymbol(symbol, 1 /* Number */); + type.declaredStringIndexInfo = getIndexInfoOfSymbol(symbol, 0 /* String */); + type.declaredNumberIndexInfo = getIndexInfoOfSymbol(symbol, 1 /* Number */); } return type; } function getTypeWithThisArgument(type, thisArgument) { - if (type.flags & 4096 /* Reference */) { + if (type.flags & 131072 /* Reference */) { return createTypeReference(type.target, ts.concatenate(type.typeArguments, [thisArgument || type.target.thisType])); } return type; } function resolveObjectTypeMembers(type, source, typeParameters, typeArguments) { - var mapper = identityMapper; - var members = source.symbol.members; - var callSignatures = source.declaredCallSignatures; - var constructSignatures = source.declaredConstructSignatures; - var stringIndexType = source.declaredStringIndexType; - var numberIndexType = source.declaredNumberIndexType; - if (!ts.rangeEquals(typeParameters, typeArguments, 0, typeParameters.length)) { + var mapper; + var members; + var callSignatures; + var constructSignatures; + var stringIndexInfo; + var numberIndexInfo; + if (ts.rangeEquals(typeParameters, typeArguments, 0, typeParameters.length)) { + mapper = identityMapper; + members = source.symbol ? source.symbol.members : createSymbolTable(source.declaredProperties); + callSignatures = source.declaredCallSignatures; + constructSignatures = source.declaredConstructSignatures; + stringIndexInfo = source.declaredStringIndexInfo; + numberIndexInfo = source.declaredNumberIndexInfo; + } + else { mapper = createTypeMapper(typeParameters, typeArguments); members = createInstantiatedSymbolTable(source.declaredProperties, mapper, /*mappingThisOnly*/ typeParameters.length === 1); callSignatures = instantiateList(source.declaredCallSignatures, mapper, instantiateSignature); constructSignatures = instantiateList(source.declaredConstructSignatures, mapper, instantiateSignature); - stringIndexType = instantiateType(source.declaredStringIndexType, mapper); - numberIndexType = instantiateType(source.declaredNumberIndexType, mapper); + stringIndexInfo = instantiateIndexInfo(source.declaredStringIndexInfo, mapper); + numberIndexInfo = instantiateIndexInfo(source.declaredNumberIndexInfo, mapper); } var baseTypes = getBaseTypes(source); if (baseTypes.length) { - if (members === source.symbol.members) { + if (source.symbol && members === source.symbol.members) { members = createSymbolTable(source.declaredProperties); } var thisArgument = ts.lastOrUndefined(typeArguments); @@ -17926,11 +20205,11 @@ var ts; addInheritedMembers(members, getPropertiesOfObjectType(instantiatedBaseType)); callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0 /* Call */)); constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1 /* Construct */)); - stringIndexType = stringIndexType || getIndexTypeOfType(instantiatedBaseType, 0 /* String */); - numberIndexType = numberIndexType || getIndexTypeOfType(instantiatedBaseType, 1 /* Number */); + stringIndexInfo = stringIndexInfo || getIndexInfoOfType(instantiatedBaseType, 0 /* String */); + numberIndexInfo = numberIndexInfo || getIndexInfoOfType(instantiatedBaseType, 1 /* Number */); } } - setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); + setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo); } function resolveClassOrInterfaceMembers(type) { resolveObjectTypeMembers(type, resolveDeclaredMembers(type), emptyArray, emptyArray); @@ -17942,26 +20221,27 @@ var ts; type.typeArguments : ts.concatenate(type.typeArguments, [type]); resolveObjectTypeMembers(type, source, typeParameters, typeArguments); } - function createSignature(declaration, typeParameters, parameters, resolvedReturnType, typePredicate, minArgumentCount, hasRestParameter, hasStringLiterals) { + function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, typePredicate, minArgumentCount, hasRestParameter, hasLiteralTypes) { var sig = new Signature(checker); sig.declaration = declaration; sig.typeParameters = typeParameters; sig.parameters = parameters; + sig.thisParameter = thisParameter; sig.resolvedReturnType = resolvedReturnType; sig.typePredicate = typePredicate; sig.minArgumentCount = minArgumentCount; sig.hasRestParameter = hasRestParameter; - sig.hasStringLiterals = hasStringLiterals; + sig.hasLiteralTypes = hasLiteralTypes; return sig; } function cloneSignature(sig) { - return createSignature(sig.declaration, sig.typeParameters, sig.parameters, sig.resolvedReturnType, sig.typePredicate, sig.minArgumentCount, sig.hasRestParameter, sig.hasStringLiterals); + return createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, sig.resolvedReturnType, sig.typePredicate, sig.minArgumentCount, sig.hasRestParameter, sig.hasLiteralTypes); } function getDefaultConstructSignatures(classType) { var baseConstructorType = getBaseConstructorTypeOfClass(classType); var baseSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); if (baseSignatures.length === 0) { - return [createSignature(undefined, classType.localTypeParameters, emptyArray, classType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasStringLiterals*/ false)]; + return [createSignature(undefined, classType.localTypeParameters, undefined, emptyArray, classType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false)]; } var baseTypeNode = getBaseTypeNodeOfClass(classType); var typeArguments = ts.map(baseTypeNode.typeArguments, getTypeFromTypeNode); @@ -17979,27 +20259,10 @@ var ts; } return result; } - function createTupleTypeMemberSymbols(memberTypes) { - var members = {}; - for (var i = 0; i < memberTypes.length; i++) { - var symbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "" + i); - symbol.type = memberTypes[i]; - members[i] = symbol; - } - return members; - } - function resolveTupleTypeMembers(type) { - var arrayElementType = getUnionType(type.elementTypes, /*noSubtypeReduction*/ true); - // Make the tuple type itself the 'this' type by including an extra type argument - var arrayType = resolveStructuredTypeMembers(createTypeFromGenericGlobalType(globalArrayType, [arrayElementType, type])); - var members = createTupleTypeMemberSymbols(type.elementTypes); - addInheritedMembers(members, arrayType.properties); - setObjectTypeMembers(type, members, arrayType.callSignatures, arrayType.constructSignatures, arrayType.stringIndexType, arrayType.numberIndexType); - } - function findMatchingSignature(signatureList, signature, partialMatch, ignoreReturnTypes) { + function findMatchingSignature(signatureList, signature, partialMatch, ignoreThisTypes, ignoreReturnTypes) { for (var _i = 0, signatureList_1 = signatureList; _i < signatureList_1.length; _i++) { var s = signatureList_1[_i]; - if (compareSignaturesIdentical(s, signature, partialMatch, ignoreReturnTypes, compareTypesIdentical)) { + if (compareSignaturesIdentical(s, signature, partialMatch, ignoreThisTypes, ignoreReturnTypes, compareTypesIdentical)) { return s; } } @@ -18012,7 +20275,7 @@ var ts; return undefined; } for (var i = 1; i < signatureLists.length; i++) { - if (!findMatchingSignature(signatureLists[i], signature, /*partialMatch*/ false, /*ignoreReturnTypes*/ false)) { + if (!findMatchingSignature(signatureLists[i], signature, /*partialMatch*/ false, /*ignoreThisTypes*/ false, /*ignoreReturnTypes*/ false)) { return undefined; } } @@ -18021,7 +20284,7 @@ var ts; var result = undefined; for (var i = 0; i < signatureLists.length; i++) { // Allow matching non-generic signatures to have excess parameters and different return types - var match = i === listIndex ? signature : findMatchingSignature(signatureLists[i], signature, /*partialMatch*/ true, /*ignoreReturnTypes*/ true); + var match = i === listIndex ? signature : findMatchingSignature(signatureLists[i], signature, /*partialMatch*/ true, /*ignoreThisTypes*/ true, /*ignoreReturnTypes*/ true); if (!match) { return undefined; } @@ -18042,13 +20305,17 @@ var ts; for (var _i = 0, _a = signatureLists[i]; _i < _a.length; _i++) { var signature = _a[_i]; // Only process signatures with parameter lists that aren't already in the result list - if (!result || !findMatchingSignature(result, signature, /*partialMatch*/ false, /*ignoreReturnTypes*/ true)) { + if (!result || !findMatchingSignature(result, signature, /*partialMatch*/ false, /*ignoreThisTypes*/ true, /*ignoreReturnTypes*/ true)) { var unionSignatures = findMatchingSignatures(signatureLists, signature, i); if (unionSignatures) { var s = signature; // Union the result types when more than one signature matches if (unionSignatures.length > 1) { s = cloneSignature(signature); + if (ts.forEach(unionSignatures, function (sig) { return sig.thisParameter; })) { + var thisType = getUnionType(ts.map(unionSignatures, function (sig) { return getTypeOfSymbol(sig.thisParameter) || anyType; }), /*subtypeReduction*/ true); + s.thisParameter = createTransientSymbol(signature.thisParameter, thisType); + } // Clear resolved return type we possibly got from cloneSignature s.resolvedReturnType = undefined; s.unionSignatures = unionSignatures; @@ -18060,45 +20327,50 @@ var ts; } return result || emptyArray; } - function getUnionIndexType(types, kind) { + function getUnionIndexInfo(types, kind) { var indexTypes = []; + var isAnyReadonly = false; for (var _i = 0, types_1 = types; _i < types_1.length; _i++) { var type = types_1[_i]; - var indexType = getIndexTypeOfType(type, kind); - if (!indexType) { + var indexInfo = getIndexInfoOfType(type, kind); + if (!indexInfo) { return undefined; } - indexTypes.push(indexType); + indexTypes.push(indexInfo.type); + isAnyReadonly = isAnyReadonly || indexInfo.isReadonly; } - return getUnionType(indexTypes); + return createIndexInfo(getUnionType(indexTypes, /*subtypeReduction*/ true), isAnyReadonly); } function resolveUnionTypeMembers(type) { // The members and properties collections are empty for union types. To get all properties of a union // type use getPropertiesOfType (only the language service uses this). var callSignatures = getUnionSignatures(type.types, 0 /* Call */); var constructSignatures = getUnionSignatures(type.types, 1 /* Construct */); - var stringIndexType = getUnionIndexType(type.types, 0 /* String */); - var numberIndexType = getUnionIndexType(type.types, 1 /* Number */); - setObjectTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexType, numberIndexType); + var stringIndexInfo = getUnionIndexInfo(type.types, 0 /* String */); + var numberIndexInfo = getUnionIndexInfo(type.types, 1 /* Number */); + setObjectTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo); } function intersectTypes(type1, type2) { return !type1 ? type2 : !type2 ? type1 : getIntersectionType([type1, type2]); } + function intersectIndexInfos(info1, info2) { + return !info1 ? info2 : !info2 ? info1 : createIndexInfo(getIntersectionType([info1.type, info2.type]), info1.isReadonly && info2.isReadonly); + } function resolveIntersectionTypeMembers(type) { // The members and properties collections are empty for intersection types. To get all properties of an // intersection type use getPropertiesOfType (only the language service uses this). var callSignatures = emptyArray; var constructSignatures = emptyArray; - var stringIndexType = undefined; - var numberIndexType = undefined; + var stringIndexInfo = undefined; + var numberIndexInfo = undefined; for (var _i = 0, _a = type.types; _i < _a.length; _i++) { var t = _a[_i]; callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(t, 0 /* Call */)); constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(t, 1 /* Construct */)); - stringIndexType = intersectTypes(stringIndexType, getIndexTypeOfType(t, 0 /* String */)); - numberIndexType = intersectTypes(numberIndexType, getIndexTypeOfType(t, 1 /* Number */)); + stringIndexInfo = intersectIndexInfos(stringIndexInfo, getIndexInfoOfType(t, 0 /* String */)); + numberIndexInfo = intersectIndexInfos(numberIndexInfo, getIndexInfoOfType(t, 1 /* Number */)); } - setObjectTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexType, numberIndexType); + setObjectTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo); } function resolveAnonymousTypeMembers(type) { var symbol = type.symbol; @@ -18106,17 +20378,17 @@ var ts; var members = createInstantiatedSymbolTable(getPropertiesOfObjectType(type.target), type.mapper, /*mappingThisOnly*/ false); var callSignatures = instantiateList(getSignaturesOfType(type.target, 0 /* Call */), type.mapper, instantiateSignature); var constructSignatures = instantiateList(getSignaturesOfType(type.target, 1 /* Construct */), type.mapper, instantiateSignature); - var stringIndexType = instantiateType(getIndexTypeOfType(type.target, 0 /* String */), type.mapper); - var numberIndexType = instantiateType(getIndexTypeOfType(type.target, 1 /* Number */), type.mapper); - setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); + var stringIndexInfo = instantiateIndexInfo(getIndexInfoOfType(type.target, 0 /* String */), type.mapper); + var numberIndexInfo = instantiateIndexInfo(getIndexInfoOfType(type.target, 1 /* Number */), type.mapper); + setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo); } else if (symbol.flags & 2048 /* TypeLiteral */) { var members = symbol.members; var callSignatures = getSignaturesOfSymbol(members["__call"]); var constructSignatures = getSignaturesOfSymbol(members["__new"]); - var stringIndexType = getIndexTypeOfSymbol(symbol, 0 /* String */); - var numberIndexType = getIndexTypeOfSymbol(symbol, 1 /* Number */); - setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); + var stringIndexInfo = getIndexInfoOfSymbol(symbol, 0 /* String */); + var numberIndexInfo = getIndexInfoOfSymbol(symbol, 1 /* Number */); + setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo); } else { // Combinations of function, class, enum and module @@ -18132,13 +20404,13 @@ var ts; constructSignatures = getDefaultConstructSignatures(classType); } var baseConstructorType = getBaseConstructorTypeOfClass(classType); - if (baseConstructorType.flags & 80896 /* ObjectType */) { + if (baseConstructorType.flags & 2588672 /* ObjectType */) { members = createSymbolTable(getNamedMembers(members)); addInheritedMembers(members, getPropertiesOfObjectType(baseConstructorType)); } } - var numberIndexType = (symbol.flags & 384 /* Enum */) ? stringType : undefined; - setObjectTypeMembers(type, members, emptyArray, constructSignatures, undefined, numberIndexType); + var numberIndexInfo = symbol.flags & 384 /* Enum */ ? enumNumberIndexInfo : undefined; + setObjectTypeMembers(type, members, emptyArray, constructSignatures, undefined, numberIndexInfo); // We resolve the members before computing the signatures because a signature may use // typeof with a qualified name expression that circularly references the type we are // in the process of resolving (see issue #6072). The temporarily empty signature list @@ -18150,22 +20422,19 @@ var ts; } function resolveStructuredTypeMembers(type) { if (!type.members) { - if (type.flags & 4096 /* Reference */) { + if (type.flags & 131072 /* Reference */) { resolveTypeReferenceMembers(type); } - else if (type.flags & (1024 /* Class */ | 2048 /* Interface */)) { + else if (type.flags & (32768 /* Class */ | 65536 /* Interface */)) { resolveClassOrInterfaceMembers(type); } - else if (type.flags & 65536 /* Anonymous */) { + else if (type.flags & 2097152 /* Anonymous */) { resolveAnonymousTypeMembers(type); } - else if (type.flags & 8192 /* Tuple */) { - resolveTupleTypeMembers(type); - } - else if (type.flags & 16384 /* Union */) { + else if (type.flags & 524288 /* Union */) { resolveUnionTypeMembers(type); } - else if (type.flags & 32768 /* Intersection */) { + else if (type.flags & 1048576 /* Intersection */) { resolveIntersectionTypeMembers(type); } } @@ -18173,7 +20442,7 @@ var ts; } /** Return properties of an object type or an empty array for other types */ function getPropertiesOfObjectType(type) { - if (type.flags & 80896 /* ObjectType */) { + if (type.flags & 2588672 /* ObjectType */) { return resolveStructuredTypeMembers(type).properties; } return emptyArray; @@ -18181,13 +20450,11 @@ var ts; /** If the given type is an object type and that type has a property by the given name, * return the symbol for that property. Otherwise return undefined. */ function getPropertyOfObjectType(type, name) { - if (type.flags & 80896 /* ObjectType */) { + if (type.flags & 2588672 /* ObjectType */) { var resolved = resolveStructuredTypeMembers(type); - if (ts.hasProperty(resolved.members, name)) { - var symbol = resolved.members[name]; - if (symbolIsValue(symbol)) { - return symbol; - } + var symbol = resolved.members[name]; + if (symbol && symbolIsValue(symbol)) { + return symbol; } } } @@ -18200,7 +20467,7 @@ var ts; } // The properties of a union type are those that are present in all constituent types, so // we only need to check the properties of the first type - if (type.flags & 16384 /* Union */) { + if (type.flags & 524288 /* Union */) { break; } } @@ -18208,7 +20475,7 @@ var ts; } function getPropertiesOfType(type) { type = getApparentType(type); - return type.flags & 49152 /* UnionOrIntersection */ ? getPropertiesOfUnionOrIntersectionType(type) : getPropertiesOfObjectType(type); + return type.flags & 1572864 /* UnionOrIntersection */ ? getPropertiesOfUnionOrIntersectionType(type) : getPropertiesOfObjectType(type); } /** * The apparent type of a type parameter is the base constraint instantiated with the type parameter @@ -18217,7 +20484,7 @@ var ts; function getApparentTypeOfTypeParameter(type) { if (!type.resolvedApparentType) { var constraintType = getConstraintOfTypeParameter(type); - while (constraintType && constraintType.flags & 512 /* TypeParameter */) { + while (constraintType && constraintType.flags & 16384 /* TypeParameter */) { constraintType = getConstraintOfTypeParameter(constraintType); } type.resolvedApparentType = getTypeWithThisArgument(constraintType || emptyObjectType, type); @@ -18230,20 +20497,20 @@ var ts; * type itself. Note that the apparent type of a union type is the union type itself. */ function getApparentType(type) { - if (type.flags & 512 /* TypeParameter */) { + if (type.flags & 16384 /* TypeParameter */) { type = getApparentTypeOfTypeParameter(type); } - if (type.flags & 258 /* StringLike */) { + if (type.flags & 34 /* StringLike */) { type = globalStringType; } - else if (type.flags & 132 /* NumberLike */) { + else if (type.flags & 340 /* NumberLike */) { type = globalNumberType; } - else if (type.flags & 8 /* Boolean */) { + else if (type.flags & 136 /* BooleanLike */) { type = globalBooleanType; } - else if (type.flags & 16777216 /* ESSymbol */) { - type = globalESSymbolType; + else if (type.flags & 512 /* ESSymbol */) { + type = getGlobalESSymbolType(); } return type; } @@ -18251,13 +20518,14 @@ var ts; var types = containingType.types; var props; // Flags we want to propagate to the result if they exist in all source symbols - var commonFlags = (containingType.flags & 32768 /* Intersection */) ? 536870912 /* Optional */ : 0 /* None */; + var commonFlags = (containingType.flags & 1048576 /* Intersection */) ? 536870912 /* Optional */ : 0 /* None */; + var isReadonly = false; for (var _i = 0, types_2 = types; _i < types_2.length; _i++) { var current = types_2[_i]; var type = getApparentType(current); if (type !== unknownType) { var prop = getPropertyOfType(type, name); - if (prop && !(getDeclarationFlagsFromSymbol(prop) & (16 /* Private */ | 32 /* Protected */))) { + if (prop && !(getDeclarationFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */))) { commonFlags &= prop.flags; if (!props) { props = [prop]; @@ -18265,8 +20533,11 @@ var ts; else if (!ts.contains(props, prop)) { props.push(prop); } + if (isReadonlySymbol(prop)) { + isReadonly = true; + } } - else if (containingType.flags & 16384 /* Union */) { + else if (containingType.flags & 524288 /* Union */) { // A union type requires the property to be present in all constituent types return undefined; } @@ -18280,11 +20551,20 @@ var ts; } var propTypes = []; var declarations = []; + var commonType = undefined; + var hasCommonType = true; for (var _a = 0, props_1 = props; _a < props_1.length; _a++) { var prop = props_1[_a]; if (prop.declarations) { ts.addRange(declarations, prop.declarations); } + var type = getTypeOfSymbol(prop); + if (!commonType) { + commonType = type; + } + else if (type !== commonType) { + hasCommonType = false; + } propTypes.push(getTypeOfSymbol(prop)); } var result = createSymbol(4 /* Property */ | @@ -18292,49 +20572,54 @@ var ts; 268435456 /* SyntheticProperty */ | commonFlags, name); result.containingType = containingType; + result.hasCommonType = hasCommonType; result.declarations = declarations; - result.type = containingType.flags & 16384 /* Union */ ? getUnionType(propTypes) : getIntersectionType(propTypes); + result.isReadonly = isReadonly; + result.type = containingType.flags & 524288 /* Union */ ? getUnionType(propTypes) : getIntersectionType(propTypes); return result; } function getPropertyOfUnionOrIntersectionType(type, name) { - var properties = type.resolvedProperties || (type.resolvedProperties = {}); - if (ts.hasProperty(properties, name)) { - return properties[name]; - } - var property = createUnionOrIntersectionProperty(type, name); - if (property) { - properties[name] = property; + var properties = type.resolvedProperties || (type.resolvedProperties = ts.createMap()); + var property = properties[name]; + if (!property) { + property = createUnionOrIntersectionProperty(type, name); + if (property) { + properties[name] = property; + } } return property; } - // Return the symbol for the property with the given name in the given type. Creates synthetic union properties when - // necessary, maps primitive types and type parameters are to their apparent types, and augments with properties from - // Object and Function as appropriate. + /** + * Return the symbol for the property with the given name in the given type. Creates synthetic union properties when + * necessary, maps primitive types and type parameters are to their apparent types, and augments with properties from + * Object and Function as appropriate. + * + * @param type a type to look up property from + * @param name a name of property to look up in a given type + */ function getPropertyOfType(type, name) { type = getApparentType(type); - if (type.flags & 80896 /* ObjectType */) { + if (type.flags & 2588672 /* ObjectType */) { var resolved = resolveStructuredTypeMembers(type); - if (ts.hasProperty(resolved.members, name)) { - var symbol = resolved.members[name]; - if (symbolIsValue(symbol)) { - return symbol; - } + var symbol = resolved.members[name]; + if (symbol && symbolIsValue(symbol)) { + return symbol; } if (resolved === anyFunctionType || resolved.callSignatures.length || resolved.constructSignatures.length) { - var symbol = getPropertyOfObjectType(globalFunctionType, name); - if (symbol) { - return symbol; + var symbol_1 = getPropertyOfObjectType(globalFunctionType, name); + if (symbol_1) { + return symbol_1; } } return getPropertyOfObjectType(globalObjectType, name); } - if (type.flags & 49152 /* UnionOrIntersection */) { + if (type.flags & 1572864 /* UnionOrIntersection */) { return getPropertyOfUnionOrIntersectionType(type, name); } return undefined; } function getSignaturesOfStructuredType(type, kind) { - if (type.flags & 130048 /* StructuredType */) { + if (type.flags & 4161536 /* StructuredType */) { var resolved = resolveStructuredTypeMembers(type); return kind === 0 /* Call */ ? resolved.callSignatures : resolved.constructSignatures; } @@ -18347,19 +20632,43 @@ var ts; function getSignaturesOfType(type, kind) { return getSignaturesOfStructuredType(getApparentType(type), kind); } - function getIndexTypeOfStructuredType(type, kind) { - if (type.flags & 130048 /* StructuredType */) { + function getIndexInfoOfStructuredType(type, kind) { + if (type.flags & 4161536 /* StructuredType */) { var resolved = resolveStructuredTypeMembers(type); - return kind === 0 /* String */ ? resolved.stringIndexType : resolved.numberIndexType; + return kind === 0 /* String */ ? resolved.stringIndexInfo : resolved.numberIndexInfo; } } + function getIndexTypeOfStructuredType(type, kind) { + var info = getIndexInfoOfStructuredType(type, kind); + return info && info.type; + } + // Return the indexing info of the given kind in the given type. Creates synthetic union index types when necessary and + // maps primitive types and type parameters are to their apparent types. + function getIndexInfoOfType(type, kind) { + return getIndexInfoOfStructuredType(getApparentType(type), kind); + } // Return the index type of the given kind in the given type. Creates synthetic union index types when necessary and // maps primitive types and type parameters are to their apparent types. function getIndexTypeOfType(type, kind) { return getIndexTypeOfStructuredType(getApparentType(type), kind); } + function getImplicitIndexTypeOfType(type, kind) { + if (isObjectLiteralType(type)) { + var propTypes = []; + for (var _i = 0, _a = getPropertiesOfType(type); _i < _a.length; _i++) { + var prop = _a[_i]; + if (kind === 0 /* String */ || isNumericLiteralName(prop.name)) { + propTypes.push(getTypeOfSymbol(prop)); + } + } + if (propTypes.length) { + return getUnionType(propTypes, /*subtypeReduction*/ true); + } + } + return undefined; + } function getTypeParametersFromJSDocTemplate(declaration) { - if (declaration.parserContextFlags & 32 /* JavaScriptFile */) { + if (declaration.flags & 134217728 /* JavaScriptFile */) { var templateTag = ts.getJSDocTemplateTag(declaration); if (templateTag) { return getTypeParametersFromDeclaration(templateTag.typeParameters); @@ -18388,9 +20697,9 @@ var ts; } return result; } - function isOptionalParameter(node) { - if (node.parserContextFlags & 32 /* JavaScriptFile */) { - if (node.type && node.type.kind === 263 /* JSDocOptionalType */) { + function isJSDocOptionalParameter(node) { + if (node.flags & 134217728 /* JavaScriptFile */) { + if (node.type && node.type.kind === 268 /* JSDocOptionalType */) { return true; } var paramTag = ts.getCorrespondingJSDocParameterTag(node); @@ -18399,11 +20708,13 @@ var ts; return true; } if (paramTag.typeExpression) { - return paramTag.typeExpression.type.kind === 263 /* JSDocOptionalType */; + return paramTag.typeExpression.type.kind === 268 /* JSDocOptionalType */; } } } - if (ts.hasQuestionToken(node)) { + } + function isOptionalParameter(node) { + if (ts.hasQuestionToken(node) || isJSDocOptionalParameter(node)) { return true; } if (node.initializer) { @@ -18435,18 +20746,12 @@ var ts; function getSignatureFromDeclaration(declaration) { var links = getNodeLinks(declaration); if (!links.resolvedSignature) { - var classType = declaration.kind === 145 /* Constructor */ ? - getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) - : undefined; - var typeParameters = classType ? classType.localTypeParameters : - declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : - getTypeParametersFromJSDocTemplate(declaration); var parameters = []; - var hasStringLiterals = false; + var hasLiteralTypes = false; var minArgumentCount = -1; + var thisParameter = undefined; + var hasThisParameter = void 0; var isJSConstructSignature = ts.isJSDocConstructSignature(declaration); - var returnType = undefined; - var typePredicate = undefined; // If this is a JSDoc construct signature, then skip the first parameter in the // parameter list. The first parameter represents the return type of the construct // signature. @@ -18458,13 +20763,19 @@ var ts; var resolvedSymbol = resolveName(param, paramSymbol.name, 107455 /* Value */, undefined, undefined); paramSymbol = resolvedSymbol; } - parameters.push(paramSymbol); - if (param.type && param.type.kind === 163 /* StringLiteralType */) { - hasStringLiterals = true; + if (i === 0 && paramSymbol.name === "this") { + hasThisParameter = true; + thisParameter = param.symbol; } - if (param.initializer || param.questionToken || param.dotDotDotToken) { + else { + parameters.push(paramSymbol); + } + if (param.type && param.type.kind === 166 /* LiteralType */) { + hasLiteralTypes = true; + } + if (param.initializer || param.questionToken || param.dotDotDotToken || isJSDocOptionalParameter(param)) { if (minArgumentCount < 0) { - minArgumentCount = i; + minArgumentCount = i - (hasThisParameter ? 1 : 0); } } else { @@ -18472,43 +20783,65 @@ var ts; minArgumentCount = -1; } } + // If only one accessor includes a this-type annotation, the other behaves as if it had the same type annotation + if ((declaration.kind === 149 /* GetAccessor */ || declaration.kind === 150 /* SetAccessor */) && + !ts.hasDynamicName(declaration) && + (!hasThisParameter || !thisParameter)) { + var otherKind = declaration.kind === 149 /* GetAccessor */ ? 150 /* SetAccessor */ : 149 /* GetAccessor */; + var other = ts.getDeclarationOfKind(declaration.symbol, otherKind); + if (other) { + thisParameter = getAnnotatedAccessorThisParameter(other); + } + } if (minArgumentCount < 0) { - minArgumentCount = declaration.parameters.length; + minArgumentCount = declaration.parameters.length - (hasThisParameter ? 1 : 0); } if (isJSConstructSignature) { minArgumentCount--; - returnType = getTypeFromTypeNode(declaration.parameters[0].type); } - else if (classType) { - returnType = classType; + if (!thisParameter && ts.isObjectLiteralMethod(declaration)) { + thisParameter = getContextualThisParameter(declaration); } - else if (declaration.type) { - returnType = getTypeFromTypeNode(declaration.type); - if (declaration.type.kind === 151 /* TypePredicate */) { - typePredicate = createTypePredicateFromTypePredicateNode(declaration.type); - } - } - else { - if (declaration.parserContextFlags & 32 /* JavaScriptFile */) { - var type = getReturnTypeFromJSDocComment(declaration); - if (type && type !== unknownType) { - returnType = type; - } - } - // TypeScript 1.0 spec (April 2014): - // If only one accessor includes a type annotation, the other behaves as if it had the same type annotation. - if (declaration.kind === 146 /* GetAccessor */ && !ts.hasDynamicName(declaration)) { - var setter = ts.getDeclarationOfKind(declaration.symbol, 147 /* SetAccessor */); - returnType = getAnnotatedAccessorType(setter); - } - if (!returnType && ts.nodeIsMissing(declaration.body)) { - returnType = anyType; - } - } - links.resolvedSignature = createSignature(declaration, typeParameters, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasStringLiterals); + var classType = declaration.kind === 148 /* Constructor */ ? + getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) + : undefined; + var typeParameters = classType ? classType.localTypeParameters : + declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : + getTypeParametersFromJSDocTemplate(declaration); + var returnType = getSignatureReturnTypeFromDeclaration(declaration, minArgumentCount, isJSConstructSignature, classType); + var typePredicate = declaration.type && declaration.type.kind === 154 /* TypePredicate */ ? + createTypePredicateFromTypePredicateNode(declaration.type) : + undefined; + links.resolvedSignature = createSignature(declaration, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasLiteralTypes); } return links.resolvedSignature; } + function getSignatureReturnTypeFromDeclaration(declaration, minArgumentCount, isJSConstructSignature, classType) { + if (isJSConstructSignature) { + return getTypeFromTypeNode(declaration.parameters[0].type); + } + else if (classType) { + return classType; + } + else if (declaration.type) { + return getTypeFromTypeNode(declaration.type); + } + if (declaration.flags & 134217728 /* JavaScriptFile */) { + var type = getReturnTypeFromJSDocComment(declaration); + if (type && type !== unknownType) { + return type; + } + } + // TypeScript 1.0 spec (April 2014): + // If only one accessor includes a type annotation, the other behaves as if it had the same type annotation. + if (declaration.kind === 149 /* GetAccessor */ && !ts.hasDynamicName(declaration)) { + var setter = ts.getDeclarationOfKind(declaration.symbol, 150 /* SetAccessor */); + return getAnnotatedAccessorType(setter); + } + if (ts.nodeIsMissing(declaration.body)) { + return anyType; + } + } function getSignaturesOfSymbol(symbol) { if (!symbol) return emptyArray; @@ -18516,20 +20849,20 @@ var ts; for (var i = 0, len = symbol.declarations.length; i < len; i++) { var node = symbol.declarations[i]; switch (node.kind) { - case 153 /* FunctionType */: - case 154 /* ConstructorType */: - case 216 /* FunctionDeclaration */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 145 /* Constructor */: - case 148 /* CallSignature */: - case 149 /* ConstructSignature */: - case 150 /* IndexSignature */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: - case 264 /* JSDocFunctionType */: + case 156 /* FunctionType */: + case 157 /* ConstructorType */: + case 220 /* FunctionDeclaration */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 148 /* Constructor */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: + case 153 /* IndexSignature */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: + case 269 /* JSDocFunctionType */: // Don't include signature if node is the implementation of an overloaded function. A node is considered // an implementation node if it has a body and the previous node is of the same kind and immediately // precedes the implementation node (i.e. has the same parent and ends where the implementation starts). @@ -18554,6 +20887,11 @@ var ts; } return anyType; } + function getThisTypeOfSignature(signature) { + if (signature.thisParameter) { + return getTypeOfSymbol(signature.thisParameter); + } + } function getReturnTypeOfSignature(signature) { if (!signature.resolvedReturnType) { if (!pushTypeResolution(signature, 3 /* ResolvedReturnType */)) { @@ -18564,7 +20902,7 @@ var ts; type = instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper); } else if (signature.unionSignatures) { - type = getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature)); + type = getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature), /*subtypeReduction*/ true); } else { type = getReturnTypeFromBody(signature.declaration); @@ -18588,7 +20926,7 @@ var ts; function getRestTypeOfSignature(signature) { if (signature.hasRestParameter) { var type = getTypeOfSymbol(ts.lastOrUndefined(signature.parameters)); - if (type.flags & 4096 /* Reference */ && type.target === globalArrayType) { + if (type.flags & 131072 /* Reference */ && type.target === globalArrayType) { return type.typeArguments[0]; } } @@ -18601,12 +20939,7 @@ var ts; if (!signature.typeParameters) return signature; if (!signature.erasedSignatureCache) { - if (signature.target) { - signature.erasedSignatureCache = instantiateSignature(getErasedSignature(signature.target), signature.mapper); - } - else { - signature.erasedSignatureCache = instantiateSignature(signature, createTypeEraser(signature.typeParameters), /*eraseTypeParameters*/ true); - } + signature.erasedSignatureCache = instantiateSignature(signature, createTypeEraser(signature.typeParameters), /*eraseTypeParameters*/ true); } return signature.erasedSignatureCache; } @@ -18616,8 +20949,8 @@ var ts; // object type literal or interface (using the new keyword). Each way of declaring a constructor // will result in a different declaration kind. if (!signature.isolatedSignatureType) { - var isConstructor = signature.declaration.kind === 145 /* Constructor */ || signature.declaration.kind === 149 /* ConstructSignature */; - var type = createObjectType(65536 /* Anonymous */ | 262144 /* FromSignature */); + var isConstructor = signature.declaration.kind === 148 /* Constructor */ || signature.declaration.kind === 152 /* ConstructSignature */; + var type = createObjectType(2097152 /* Anonymous */); type.members = emptySymbols; type.properties = emptyArray; type.callSignatures = !isConstructor ? [signature] : emptyArray; @@ -18630,7 +20963,7 @@ var ts; return symbol.members["__index"]; } function getIndexDeclarationOfSymbol(symbol, kind) { - var syntaxKind = kind === 1 /* Number */ ? 128 /* NumberKeyword */ : 130 /* StringKeyword */; + var syntaxKind = kind === 1 /* Number */ ? 130 /* NumberKeyword */ : 132 /* StringKeyword */; var indexSymbol = getIndexSymbol(symbol); if (indexSymbol) { for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) { @@ -18646,18 +20979,22 @@ var ts; } return undefined; } - function getIndexTypeOfSymbol(symbol, kind) { + function createIndexInfo(type, isReadonly, declaration) { + return { type: type, isReadonly: isReadonly, declaration: declaration }; + } + function getIndexInfoOfSymbol(symbol, kind) { var declaration = getIndexDeclarationOfSymbol(symbol, kind); - return declaration - ? declaration.type ? getTypeFromTypeNode(declaration.type) : anyType - : undefined; + if (declaration) { + return createIndexInfo(declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, (declaration.flags & 64 /* Readonly */) !== 0, declaration); + } + return undefined; } function getConstraintDeclaration(type) { - return ts.getDeclarationOfKind(type.symbol, 138 /* TypeParameter */).constraint; + return ts.getDeclarationOfKind(type.symbol, 141 /* TypeParameter */).constraint; } function hasConstraintReferenceTo(type, target) { var checked; - while (type && !(type.flags & 33554432 /* ThisType */) && type.flags & 512 /* TypeParameter */ && !ts.contains(checked, type)) { + while (type && !(type.flags & 268435456 /* ThisType */) && type.flags & 16384 /* TypeParameter */ && !ts.contains(checked, type)) { if (type === target) { return true; } @@ -18686,54 +21023,69 @@ var ts; return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint; } function getParentSymbolOfTypeParameter(typeParameter) { - return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 138 /* TypeParameter */).parent); + return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 141 /* TypeParameter */).parent); } function getTypeListId(types) { + var result = ""; if (types) { - switch (types.length) { - case 1: - return "" + types[0].id; - case 2: - return types[0].id + "," + types[1].id; - default: - var result = ""; - for (var i = 0; i < types.length; i++) { - if (i > 0) { - result += ","; - } - result += types[i].id; - } - return result; + var length_3 = types.length; + var i = 0; + while (i < length_3) { + var startId = types[i].id; + var count = 1; + while (i + count < length_3 && types[i + count].id === startId + count) { + count++; + } + if (result.length) { + result += ","; + } + result += startId; + if (count > 1) { + result += ":" + count; + } + i += count; } } - return ""; + return result; } // This function is used to propagate certain flags when creating new object type references and union types. // It is only necessary to do so if a constituent type might be the undefined type, the null type, the type // of an object literal or the anyFunctionType. This is because there are operations in the type checker // that care about the presence of such types at arbitrary depth in a containing type. - function getPropagatingFlagsOfTypes(types) { + function getPropagatingFlagsOfTypes(types, excludeKinds) { var result = 0; for (var _i = 0, types_3 = types; _i < types_3.length; _i++) { var type = types_3[_i]; - result |= type.flags; + if (!(type.flags & excludeKinds)) { + result |= type.flags; + } } - return result & 14680064 /* PropagatingFlags */; + return result & 234881024 /* PropagatingFlags */; } function createTypeReference(target, typeArguments) { var id = getTypeListId(typeArguments); var type = target.instantiations[id]; if (!type) { - var flags = 4096 /* Reference */ | (typeArguments ? getPropagatingFlagsOfTypes(typeArguments) : 0); + var propagatedFlags = typeArguments ? getPropagatingFlagsOfTypes(typeArguments, /*excludeKinds*/ 0) : 0; + var flags = 131072 /* Reference */ | propagatedFlags; type = target.instantiations[id] = createObjectType(flags, target.symbol); type.target = target; type.typeArguments = typeArguments; } return type; } + function cloneTypeReference(source) { + var type = createObjectType(source.flags, source.symbol); + type.target = source.target; + type.typeArguments = source.typeArguments; + return type; + } + function getTypeReferenceArity(type) { + return type.target.typeParameters ? type.target.typeParameters.length : 0; + } // Get type from reference to class or interface function getTypeFromClassOrInterfaceReference(node, symbol) { - var type = getDeclaredTypeOfSymbol(symbol); + var type = getDeclaredTypeOfSymbol(getMergedSymbol(symbol)); var typeParameters = type.localTypeParameters; if (typeParameters) { if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) { @@ -18783,15 +21135,16 @@ var ts; } function getTypeReferenceName(node) { switch (node.kind) { - case 152 /* TypeReference */: + case 155 /* TypeReference */: return node.typeName; - case 262 /* JSDocTypeReference */: + case 267 /* JSDocTypeReference */: return node.name; - case 191 /* ExpressionWithTypeArguments */: + case 194 /* ExpressionWithTypeArguments */: // We only support expressions that are simple qualified names. For other // expressions this produces undefined. - if (ts.isSupportedExpressionWithTypeArguments(node)) { - return node.expression; + var expr = node.expression; + if (ts.isEntityNameExpression(expr)) { + return expr; } } return undefined; @@ -18800,7 +21153,7 @@ var ts; if (!typeReferenceName) { return unknownSymbol; } - return resolveEntityName(typeReferenceName, 793056 /* Type */) || unknownSymbol; + return resolveEntityName(typeReferenceName, 793064 /* Type */) || unknownSymbol; } function getTypeReferenceType(node, symbol) { if (symbol === unknownSymbol) { @@ -18812,7 +21165,7 @@ var ts; if (symbol.flags & 524288 /* TypeAlias */) { return getTypeFromTypeAliasReference(node, symbol); } - if (symbol.flags & 107455 /* Value */ && node.kind === 262 /* JSDocTypeReference */) { + if (symbol.flags & 107455 /* Value */ && node.kind === 267 /* JSDocTypeReference */) { // A JSDocTypeReference may have resolved to a value (as opposed to a type). In // that case, the type of this reference is just the type of the value we resolved // to. @@ -18825,19 +21178,19 @@ var ts; if (!links.resolvedType) { var symbol = void 0; var type = void 0; - if (node.kind === 262 /* JSDocTypeReference */) { + if (node.kind === 267 /* JSDocTypeReference */) { var typeReferenceName = getTypeReferenceName(node); symbol = resolveTypeReferenceName(node, typeReferenceName); type = getTypeReferenceType(node, symbol); - links.resolvedSymbol = symbol; - links.resolvedType = type; } else { // We only support expressions that are simple qualified names. For other expressions this produces undefined. - var typeNameOrExpression = node.kind === 152 /* TypeReference */ ? node.typeName : - ts.isSupportedExpressionWithTypeArguments(node) ? node.expression : - undefined; - symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, 793056 /* Type */) || unknownSymbol; + var typeNameOrExpression = node.kind === 155 /* TypeReference */ + ? node.typeName + : ts.isEntityNameExpression(node.expression) + ? node.expression + : undefined; + symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, 793064 /* Type */) || unknownSymbol; type = symbol === unknownSymbol ? unknownType : symbol.flags & (32 /* Class */ | 64 /* Interface */) ? getTypeFromClassOrInterfaceReference(node, symbol) : symbol.flags & 524288 /* TypeAlias */ ? getTypeFromTypeAliasReference(node, symbol) : @@ -18867,9 +21220,9 @@ var ts; for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) { var declaration = declarations_3[_i]; switch (declaration.kind) { - case 217 /* ClassDeclaration */: - case 218 /* InterfaceDeclaration */: - case 220 /* EnumDeclaration */: + case 221 /* ClassDeclaration */: + case 222 /* InterfaceDeclaration */: + case 224 /* EnumDeclaration */: return declaration; } } @@ -18878,7 +21231,7 @@ var ts; return arity ? emptyGenericType : emptyObjectType; } var type = getDeclaredTypeOfSymbol(symbol); - if (!(type.flags & 80896 /* ObjectType */)) { + if (!(type.flags & 2588672 /* ObjectType */)) { error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbol.name); return arity ? emptyGenericType : emptyObjectType; } @@ -18892,7 +21245,7 @@ var ts; return getGlobalSymbol(name, 107455 /* Value */, ts.Diagnostics.Cannot_find_global_value_0); } function getGlobalTypeSymbol(name) { - return getGlobalSymbol(name, 793056 /* Type */, ts.Diagnostics.Cannot_find_global_type_0); + return getGlobalSymbol(name, 793064 /* Type */, ts.Diagnostics.Cannot_find_global_type_0); } function getGlobalSymbol(name, meaning, diagnostic) { return resolveName(undefined, name, meaning, diagnostic, name); @@ -18906,13 +21259,10 @@ var ts; * getExportedTypeFromNamespace('JSX', 'Element') returns the JSX.Element type */ function getExportedTypeFromNamespace(namespace, name) { - var namespaceSymbol = getGlobalSymbol(namespace, 1536 /* Namespace */, /*diagnosticMessage*/ undefined); - var typeSymbol = namespaceSymbol && getSymbol(namespaceSymbol.exports, name, 793056 /* Type */); + var namespaceSymbol = getGlobalSymbol(namespace, 1920 /* Namespace */, /*diagnosticMessage*/ undefined); + var typeSymbol = namespaceSymbol && getSymbol(namespaceSymbol.exports, name, 793064 /* Type */); return typeSymbol && getDeclaredTypeOfSymbol(typeSymbol); } - function getGlobalESSymbolConstructorSymbol() { - return globalESSymbolConstructorSymbol || (globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol")); - } /** * Creates a TypeReference for a generic `TypedPropertyDescriptor`. */ @@ -18929,10 +21279,10 @@ var ts; return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType; } function createIterableType(elementType) { - return createTypeFromGenericGlobalType(globalIterableType, [elementType]); + return createTypeFromGenericGlobalType(getGlobalIterableType(), [elementType]); } function createIterableIteratorType(elementType) { - return createTypeFromGenericGlobalType(globalIterableIteratorType, [elementType]); + return createTypeFromGenericGlobalType(getGlobalIterableIteratorType(), [elementType]); } function createArrayType(elementType) { return createTypeFromGenericGlobalType(globalArrayType, [elementType]); @@ -18944,15 +21294,46 @@ var ts; } return links.resolvedType; } - function createTupleType(elementTypes) { - var id = getTypeListId(elementTypes); - return tupleTypes[id] || (tupleTypes[id] = createNewTupleType(elementTypes)); - } - function createNewTupleType(elementTypes) { - var type = createObjectType(8192 /* Tuple */ | getPropagatingFlagsOfTypes(elementTypes)); - type.elementTypes = elementTypes; + // We represent tuple types as type references to synthesized generic interface types created by + // this function. The types are of the form: + // + // interface Tuple extends Array { 0: T0, 1: T1, 2: T2, ... } + // + // Note that the generic type created by this function has no symbol associated with it. The same + // is true for each of the synthesized type parameters. + function createTupleTypeOfArity(arity) { + var typeParameters = []; + var properties = []; + for (var i = 0; i < arity; i++) { + var typeParameter = createType(16384 /* TypeParameter */); + typeParameters.push(typeParameter); + var property = createSymbol(4 /* Property */ | 67108864 /* Transient */, "" + i); + property.type = typeParameter; + properties.push(property); + } + var type = createObjectType(262144 /* Tuple */ | 131072 /* Reference */); + type.typeParameters = typeParameters; + type.outerTypeParameters = undefined; + type.localTypeParameters = typeParameters; + type.instantiations = ts.createMap(); + type.instantiations[getTypeListId(type.typeParameters)] = type; + type.target = type; + type.typeArguments = type.typeParameters; + type.thisType = createType(16384 /* TypeParameter */ | 268435456 /* ThisType */); + type.thisType.constraint = type; + type.declaredProperties = properties; + type.declaredCallSignatures = emptyArray; + type.declaredConstructSignatures = emptyArray; + type.declaredStringIndexInfo = undefined; + type.declaredNumberIndexInfo = undefined; return type; } + function getTupleTypeOfArity(arity) { + return tupleTypes[arity] || (tupleTypes[arity] = createTupleTypeOfArity(arity)); + } + function createTupleType(elementTypes) { + return createTypeReference(getTupleTypeOfArity(elementTypes.length), elementTypes); + } function getTypeFromTupleTypeNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { @@ -18960,22 +21341,70 @@ var ts; } return links.resolvedType; } - function addTypeToSet(typeSet, type, typeSetKind) { - if (type.flags & typeSetKind) { - addTypesToSet(typeSet, type.types, typeSetKind); + function binarySearchTypes(types, type) { + var low = 0; + var high = types.length - 1; + var typeId = type.id; + while (low <= high) { + var middle = low + ((high - low) >> 1); + var id = types[middle].id; + if (id === typeId) { + return middle; + } + else if (id > typeId) { + high = middle - 1; + } + else { + low = middle + 1; + } } - else if (!ts.contains(typeSet, type)) { - typeSet.push(type); + return ~low; + } + function containsType(types, type) { + return binarySearchTypes(types, type) >= 0; + } + function addTypeToUnion(typeSet, type) { + if (type.flags & 524288 /* Union */) { + addTypesToUnion(typeSet, type.types); + } + else if (type.flags & 1 /* Any */) { + typeSet.containsAny = true; + } + else if (!strictNullChecks && type.flags & 6144 /* Nullable */) { + if (type.flags & 2048 /* Undefined */) + typeSet.containsUndefined = true; + if (type.flags & 4096 /* Null */) + typeSet.containsNull = true; + if (!(type.flags & 33554432 /* ContainsWideningType */)) + typeSet.containsNonWideningType = true; + } + else if (!(type.flags & 8192 /* Never */)) { + var len = typeSet.length; + var index = len && type.id > typeSet[len - 1].id ? ~len : binarySearchTypes(typeSet, type); + if (index < 0) { + if (!(type.flags & 2097152 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */) && containsIdenticalType(typeSet, type))) { + typeSet.splice(~index, 0, type); + } + } } } // Add the given types to the given type set. Order is preserved, duplicates are removed, // and nested types of the given kind are flattened into the set. - function addTypesToSet(typeSet, types, typeSetKind) { + function addTypesToUnion(typeSet, types) { for (var _i = 0, types_4 = types; _i < types_4.length; _i++) { var type = types_4[_i]; - addTypeToSet(typeSet, type, typeSetKind); + addTypeToUnion(typeSet, type); } } + function containsIdenticalType(types, type) { + for (var _i = 0, types_5 = types; _i < types_5.length; _i++) { + var t = types_5[_i]; + if (isTypeIdenticalTo(t, type)) { + return true; + } + } + return false; + } function isSubtypeOfAny(candidate, types) { for (var i = 0, len = types.length; i < len; i++) { if (candidate !== types[i] && isTypeSubtypeOf(candidate, types[i])) { @@ -18993,77 +21422,92 @@ var ts; } } } - function containsTypeAny(types) { - for (var _i = 0, types_5 = types; _i < types_5.length; _i++) { - var type = types_5[_i]; - if (isTypeAny(type)) { - return true; - } - } - return false; - } - function removeAllButLast(types, typeToRemove) { - var i = types.length; - while (i > 0 && types.length > 1) { - i--; - if (types[i] === typeToRemove) { - types.splice(i, 1); - } - } - } - // We reduce the constituent type set to only include types that aren't subtypes of other types, unless - // the noSubtypeReduction flag is specified, in which case we perform a simple deduplication based on - // object identity. Subtype reduction is possible only when union types are known not to circularly - // reference themselves (as is the case with union types created by expression constructs such as array - // literals and the || and ?: operators). Named types can circularly reference themselves and therefore - // cannot be deduplicated during their declaration. For example, "type Item = string | (() => Item" is - // a named type that circularly references itself. - function getUnionType(types, noSubtypeReduction) { + // We sort and deduplicate the constituent types based on object identity. If the subtypeReduction + // flag is specified we also reduce the constituent type set to only include types that aren't subtypes + // of other types. Subtype reduction is expensive for large union types and is possible only when union + // types are known not to circularly reference themselves (as is the case with union types created by + // expression constructs such as array literals and the || and ?: operators). Named types can + // circularly reference themselves and therefore cannot be subtype reduced during their declaration. + // For example, "type Item = string | (() => Item" is a named type that circularly references itself. + function getUnionType(types, subtypeReduction, aliasSymbol, aliasTypeArguments) { if (types.length === 0) { - return emptyUnionType; + return neverType; + } + if (types.length === 1) { + return types[0]; } var typeSet = []; - addTypesToSet(typeSet, types, 16384 /* Union */); - if (containsTypeAny(typeSet)) { + addTypesToUnion(typeSet, types); + if (typeSet.containsAny) { return anyType; } - if (noSubtypeReduction) { - removeAllButLast(typeSet, undefinedType); - removeAllButLast(typeSet, nullType); - } - else { + if (subtypeReduction) { removeSubtypes(typeSet); } - if (typeSet.length === 1) { - return typeSet[0]; + if (typeSet.length === 0) { + return typeSet.containsNull ? typeSet.containsNonWideningType ? nullType : nullWideningType : + typeSet.containsUndefined ? typeSet.containsNonWideningType ? undefinedType : undefinedWideningType : + neverType; } - var id = getTypeListId(typeSet); + return getUnionTypeFromSortedList(typeSet, aliasSymbol, aliasTypeArguments); + } + // This function assumes the constituent type list is sorted and deduplicated. + function getUnionTypeFromSortedList(types, aliasSymbol, aliasTypeArguments) { + if (types.length === 0) { + return neverType; + } + if (types.length === 1) { + return types[0]; + } + var id = getTypeListId(types); var type = unionTypes[id]; if (!type) { - type = unionTypes[id] = createObjectType(16384 /* Union */ | getPropagatingFlagsOfTypes(typeSet)); - type.types = typeSet; + var propagatedFlags = getPropagatingFlagsOfTypes(types, /*excludeKinds*/ 6144 /* Nullable */); + type = unionTypes[id] = createObjectType(524288 /* Union */ | propagatedFlags); + type.types = types; + type.aliasSymbol = aliasSymbol; + type.aliasTypeArguments = aliasTypeArguments; } return type; } - function getTypeFromUnionTypeNode(node) { + function getTypeFromUnionTypeNode(node, aliasSymbol, aliasTypeArguments) { var links = getNodeLinks(node); if (!links.resolvedType) { - links.resolvedType = getUnionType(ts.map(node.types, getTypeFromTypeNode), /*noSubtypeReduction*/ true); + links.resolvedType = getUnionType(ts.map(node.types, getTypeFromTypeNode), /*subtypeReduction*/ false, aliasSymbol, aliasTypeArguments); } return links.resolvedType; } + function addTypeToIntersection(typeSet, type) { + if (type.flags & 1048576 /* Intersection */) { + addTypesToIntersection(typeSet, type.types); + } + else if (type.flags & 1 /* Any */) { + typeSet.containsAny = true; + } + else if (!(type.flags & 8192 /* Never */) && (strictNullChecks || !(type.flags & 6144 /* Nullable */)) && !ts.contains(typeSet, type)) { + typeSet.push(type); + } + } + // Add the given types to the given type set. Order is preserved, duplicates are removed, + // and nested types of the given kind are flattened into the set. + function addTypesToIntersection(typeSet, types) { + for (var _i = 0, types_6 = types; _i < types_6.length; _i++) { + var type = types_6[_i]; + addTypeToIntersection(typeSet, type); + } + } // We do not perform structural deduplication on intersection types. Intersection types are created only by the & // type operator and we can't reduce those because we want to support recursive intersection types. For example, // a type alias of the form "type List = T & { next: List }" cannot be reduced during its declaration. // Also, unlike union types, the order of the constituent types is preserved in order that overload resolution // for intersections of types with signatures can be deterministic. - function getIntersectionType(types) { + function getIntersectionType(types, aliasSymbol, aliasTypeArguments) { if (types.length === 0) { return emptyObjectType; } var typeSet = []; - addTypesToSet(typeSet, types, 32768 /* Intersection */); - if (containsTypeAny(typeSet)) { + addTypesToIntersection(typeSet, types); + if (typeSet.containsAny) { return anyType; } if (typeSet.length === 1) { @@ -19072,38 +21516,45 @@ var ts; var id = getTypeListId(typeSet); var type = intersectionTypes[id]; if (!type) { - type = intersectionTypes[id] = createObjectType(32768 /* Intersection */ | getPropagatingFlagsOfTypes(typeSet)); + var propagatedFlags = getPropagatingFlagsOfTypes(typeSet, /*excludeKinds*/ 6144 /* Nullable */); + type = intersectionTypes[id] = createObjectType(1048576 /* Intersection */ | propagatedFlags); type.types = typeSet; + type.aliasSymbol = aliasSymbol; + type.aliasTypeArguments = aliasTypeArguments; } return type; } - function getTypeFromIntersectionTypeNode(node) { + function getTypeFromIntersectionTypeNode(node, aliasSymbol, aliasTypeArguments) { var links = getNodeLinks(node); if (!links.resolvedType) { - links.resolvedType = getIntersectionType(ts.map(node.types, getTypeFromTypeNode)); + links.resolvedType = getIntersectionType(ts.map(node.types, getTypeFromTypeNode), aliasSymbol, aliasTypeArguments); } return links.resolvedType; } - function getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node) { + function getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node, aliasSymbol, aliasTypeArguments) { var links = getNodeLinks(node); if (!links.resolvedType) { // Deferred resolution of members is handled by resolveObjectTypeMembers - links.resolvedType = createObjectType(65536 /* Anonymous */, node.symbol); + var type = createObjectType(2097152 /* Anonymous */, node.symbol); + type.aliasSymbol = aliasSymbol; + type.aliasTypeArguments = aliasTypeArguments; + links.resolvedType = type; } return links.resolvedType; } - function getStringLiteralTypeForText(text) { - if (ts.hasProperty(stringLiteralTypes, text)) { - return stringLiteralTypes[text]; - } - var type = stringLiteralTypes[text] = createType(256 /* StringLiteral */); + function createLiteralType(flags, text) { + var type = createType(flags); type.text = text; return type; } - function getTypeFromStringLiteralTypeNode(node) { + function getLiteralTypeForText(flags, text) { + var map = flags & 32 /* StringLiteral */ ? stringLiteralTypes : numericLiteralTypes; + return map[text] || (map[text] = createLiteralType(flags, text)); + } + function getTypeFromLiteralTypeNode(node) { var links = getNodeLinks(node); if (!links.resolvedType) { - links.resolvedType = getStringLiteralTypeForText(node.text); + links.resolvedType = checkExpression(node.literal); } return links.resolvedType; } @@ -19126,9 +21577,9 @@ var ts; function getThisType(node) { var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false); var parent = container && container.parent; - if (parent && (ts.isClassLike(parent) || parent.kind === 218 /* InterfaceDeclaration */)) { - if (!(container.flags & 64 /* Static */) && - (container.kind !== 145 /* Constructor */ || ts.isNodeDescendentOf(node, container.body))) { + if (parent && (ts.isClassLike(parent) || parent.kind === 222 /* InterfaceDeclaration */)) { + if (!(container.flags & 32 /* Static */) && + (container.kind !== 148 /* Constructor */ || ts.isNodeDescendentOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType; } } @@ -19142,67 +21593,83 @@ var ts; } return links.resolvedType; } - function getTypeFromTypeNode(node) { + function getTypeFromTypeNode(node, aliasSymbol, aliasTypeArguments) { switch (node.kind) { case 117 /* AnyKeyword */: - case 253 /* JSDocAllType */: - case 254 /* JSDocUnknownType */: + case 258 /* JSDocAllType */: + case 259 /* JSDocUnknownType */: return anyType; - case 130 /* StringKeyword */: + case 132 /* StringKeyword */: return stringType; - case 128 /* NumberKeyword */: + case 130 /* NumberKeyword */: return numberType; case 120 /* BooleanKeyword */: return booleanType; - case 131 /* SymbolKeyword */: + case 133 /* SymbolKeyword */: return esSymbolType; case 103 /* VoidKeyword */: return voidType; - case 162 /* ThisType */: + case 135 /* UndefinedKeyword */: + return undefinedType; + case 93 /* NullKeyword */: + return nullType; + case 127 /* NeverKeyword */: + return neverType; + case 283 /* JSDocNullKeyword */: + return nullType; + case 284 /* JSDocUndefinedKeyword */: + return undefinedType; + case 285 /* JSDocNeverKeyword */: + return neverType; + case 165 /* ThisType */: + case 97 /* ThisKeyword */: return getTypeFromThisTypeNode(node); - case 163 /* StringLiteralType */: - return getTypeFromStringLiteralTypeNode(node); - case 152 /* TypeReference */: - case 262 /* JSDocTypeReference */: + case 166 /* LiteralType */: + return getTypeFromLiteralTypeNode(node); + case 282 /* JSDocLiteralType */: + return getTypeFromLiteralTypeNode(node.literal); + case 155 /* TypeReference */: + case 267 /* JSDocTypeReference */: return getTypeFromTypeReference(node); - case 151 /* TypePredicate */: + case 154 /* TypePredicate */: return booleanType; - case 191 /* ExpressionWithTypeArguments */: + case 194 /* ExpressionWithTypeArguments */: return getTypeFromTypeReference(node); - case 155 /* TypeQuery */: + case 158 /* TypeQuery */: return getTypeFromTypeQueryNode(node); - case 157 /* ArrayType */: - case 255 /* JSDocArrayType */: + case 160 /* ArrayType */: + case 260 /* JSDocArrayType */: return getTypeFromArrayTypeNode(node); - case 158 /* TupleType */: + case 161 /* TupleType */: return getTypeFromTupleTypeNode(node); - case 159 /* UnionType */: - case 256 /* JSDocUnionType */: - return getTypeFromUnionTypeNode(node); - case 160 /* IntersectionType */: - return getTypeFromIntersectionTypeNode(node); - case 161 /* ParenthesizedType */: - case 258 /* JSDocNullableType */: - case 259 /* JSDocNonNullableType */: - case 266 /* JSDocConstructorType */: - case 267 /* JSDocThisType */: - case 263 /* JSDocOptionalType */: + case 162 /* UnionType */: + case 261 /* JSDocUnionType */: + return getTypeFromUnionTypeNode(node, aliasSymbol, aliasTypeArguments); + case 163 /* IntersectionType */: + return getTypeFromIntersectionTypeNode(node, aliasSymbol, aliasTypeArguments); + case 164 /* ParenthesizedType */: + case 263 /* JSDocNullableType */: + case 264 /* JSDocNonNullableType */: + case 271 /* JSDocConstructorType */: + case 272 /* JSDocThisType */: + case 268 /* JSDocOptionalType */: return getTypeFromTypeNode(node.type); - case 153 /* FunctionType */: - case 154 /* ConstructorType */: - case 156 /* TypeLiteral */: - case 264 /* JSDocFunctionType */: - case 260 /* JSDocRecordType */: - return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); + case 156 /* FunctionType */: + case 157 /* ConstructorType */: + case 159 /* TypeLiteral */: + case 281 /* JSDocTypeLiteral */: + case 269 /* JSDocFunctionType */: + case 265 /* JSDocRecordType */: + return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node, aliasSymbol, aliasTypeArguments); // This function assumes that an identifier or qualified name is a type expression // Callers should first ensure this by calling isTypeNode case 69 /* Identifier */: - case 136 /* QualifiedName */: + case 139 /* QualifiedName */: var symbol = getSymbolAtLocation(node); return symbol && getDeclaredTypeOfSymbol(symbol); - case 257 /* JSDocTupleType */: + case 262 /* JSDocTupleType */: return getTypeFromJSDocTupleType(node); - case 265 /* JSDocVariadicType */: + case 270 /* JSDocVariadicType */: return getTypeFromJSDocVariadicType(node); default: return unknownType; @@ -19225,40 +21692,27 @@ var ts; function createBinaryTypeMapper(source1, target1, source2, target2) { return function (t) { return t === source1 ? target1 : t === source2 ? target2 : t; }; } - function createTypeMapper(sources, targets) { - switch (sources.length) { - case 1: return createUnaryTypeMapper(sources[0], targets[0]); - case 2: return createBinaryTypeMapper(sources[0], targets[0], sources[1], targets[1]); - } + function createArrayTypeMapper(sources, targets) { return function (t) { for (var i = 0; i < sources.length; i++) { if (t === sources[i]) { - return targets[i]; + return targets ? targets[i] : anyType; } } return t; }; } - function createUnaryTypeEraser(source) { - return function (t) { return t === source ? anyType : t; }; - } - function createBinaryTypeEraser(source1, source2) { - return function (t) { return t === source1 || t === source2 ? anyType : t; }; + function createTypeMapper(sources, targets) { + var count = sources.length; + var mapper = count == 1 ? createUnaryTypeMapper(sources[0], targets ? targets[0] : anyType) : + count == 2 ? createBinaryTypeMapper(sources[0], targets ? targets[0] : anyType, sources[1], targets ? targets[1] : anyType) : + createArrayTypeMapper(sources, targets); + mapper.mappedTypes = sources; + mapper.targetTypes = targets; + return mapper; } function createTypeEraser(sources) { - switch (sources.length) { - case 1: return createUnaryTypeEraser(sources[0]); - case 2: return createBinaryTypeEraser(sources[0], sources[1]); - } - return function (t) { - for (var _i = 0, sources_1 = sources; _i < sources_1.length; _i++) { - var source = sources_1[_i]; - if (t === source) { - return anyType; - } - } - return t; - }; + return createTypeMapper(sources, undefined); } function getInferenceMapper(context) { if (!context.mapper) { @@ -19272,6 +21726,7 @@ var ts; } return t; }; + mapper.mappedTypes = context.typeParameters; mapper.context = context; context.mapper = mapper; } @@ -19281,10 +21736,12 @@ var ts; return type; } function combineTypeMappers(mapper1, mapper2) { - return function (t) { return instantiateType(mapper1(t), mapper2); }; + var mapper = function (t) { return instantiateType(mapper1(t), mapper2); }; + mapper.mappedTypes = mapper1.mappedTypes; + return mapper; } function cloneTypeParameter(typeParameter) { - var result = createType(512 /* TypeParameter */); + var result = createType(16384 /* TypeParameter */); result.symbol = typeParameter.symbol; result.target = typeParameter; return result; @@ -19322,7 +21779,7 @@ var ts; if (signature.typePredicate) { freshTypePredicate = cloneTypePredicate(signature.typePredicate, mapper); } - var result = createSignature(signature.declaration, freshTypeParameters, instantiateList(signature.parameters, mapper, instantiateSymbol), instantiateType(signature.resolvedReturnType, mapper), freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasStringLiterals); + var result = createSignature(signature.declaration, freshTypeParameters, signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), instantiateList(signature.parameters, mapper, instantiateSymbol), instantiateType(signature.resolvedReturnType, mapper), freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasLiteralTypes); result.target = signature; result.mapper = mapper; return result; @@ -19359,72 +21816,136 @@ var ts; mapper.instantiations = []; } // Mark the anonymous type as instantiated such that our infinite instantiation detection logic can recognize it - var result = createObjectType(65536 /* Anonymous */ | 131072 /* Instantiated */, type.symbol); + var result = createObjectType(2097152 /* Anonymous */ | 4194304 /* Instantiated */, type.symbol); result.target = type; result.mapper = mapper; + result.aliasSymbol = type.aliasSymbol; + result.aliasTypeArguments = mapper.targetTypes; mapper.instantiations[type.id] = result; return result; } + function isSymbolInScopeOfMappedTypeParameter(symbol, mapper) { + var mappedTypes = mapper.mappedTypes; + // Starting with the parent of the symbol's declaration, check if the mapper maps any of + // the type parameters introduced by enclosing declarations. We just pick the first + // declaration since multiple declarations will all have the same parent anyway. + var node = symbol.declarations[0].parent; + while (node) { + switch (node.kind) { + case 156 /* FunctionType */: + case 157 /* ConstructorType */: + case 220 /* FunctionDeclaration */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 148 /* Constructor */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: + case 153 /* IndexSignature */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: + case 222 /* InterfaceDeclaration */: + case 223 /* TypeAliasDeclaration */: + var declaration = node; + if (declaration.typeParameters) { + for (var _i = 0, _a = declaration.typeParameters; _i < _a.length; _i++) { + var d = _a[_i]; + if (ts.contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(d)))) { + return true; + } + } + } + if (ts.isClassLike(node) || node.kind === 222 /* InterfaceDeclaration */) { + var thisType = getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType; + if (thisType && ts.contains(mappedTypes, thisType)) { + return true; + } + } + break; + case 225 /* ModuleDeclaration */: + case 256 /* SourceFile */: + return false; + } + node = node.parent; + } + return false; + } function instantiateType(type, mapper) { if (type && mapper !== identityMapper) { - if (type.flags & 512 /* TypeParameter */) { + if (type.flags & 16384 /* TypeParameter */) { return mapper(type); } - if (type.flags & 65536 /* Anonymous */) { - return type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) ? + if (type.flags & 2097152 /* Anonymous */) { + // If the anonymous type originates in a declaration of a function, method, class, or + // interface, in an object type literal, or in an object literal expression, we may need + // to instantiate the type because it might reference a type parameter. We skip instantiation + // if none of the type parameters that are in scope in the type's declaration are mapped by + // the given mapper, however we can only do that analysis if the type isn't itself an + // instantiation. + return type.symbol && + type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && + (type.flags & 4194304 /* Instantiated */ || isSymbolInScopeOfMappedTypeParameter(type.symbol, mapper)) ? instantiateAnonymousType(type, mapper) : type; } - if (type.flags & 4096 /* Reference */) { + if (type.flags & 131072 /* Reference */) { return createTypeReference(type.target, instantiateList(type.typeArguments, mapper, instantiateType)); } - if (type.flags & 8192 /* Tuple */) { - return createTupleType(instantiateList(type.elementTypes, mapper, instantiateType)); + if (type.flags & 524288 /* Union */ && !(type.flags & 8190 /* Primitive */)) { + return getUnionType(instantiateList(type.types, mapper, instantiateType), /*subtypeReduction*/ false, type.aliasSymbol, mapper.targetTypes); } - if (type.flags & 16384 /* Union */) { - return getUnionType(instantiateList(type.types, mapper, instantiateType), /*noSubtypeReduction*/ true); - } - if (type.flags & 32768 /* Intersection */) { - return getIntersectionType(instantiateList(type.types, mapper, instantiateType)); + if (type.flags & 1048576 /* Intersection */) { + return getIntersectionType(instantiateList(type.types, mapper, instantiateType), type.aliasSymbol, mapper.targetTypes); } } return type; } + function instantiateIndexInfo(info, mapper) { + return info && createIndexInfo(instantiateType(info.type, mapper), info.isReadonly, info.declaration); + } // Returns true if the given expression contains (at any level of nesting) a function or arrow expression // that is subject to contextual typing. function isContextSensitive(node) { - ts.Debug.assert(node.kind !== 144 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 147 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); switch (node.kind) { - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: return isContextSensitiveFunctionLikeDeclaration(node); - case 168 /* ObjectLiteralExpression */: + case 171 /* ObjectLiteralExpression */: return ts.forEach(node.properties, isContextSensitive); - case 167 /* ArrayLiteralExpression */: + case 170 /* ArrayLiteralExpression */: return ts.forEach(node.elements, isContextSensitive); - case 185 /* ConditionalExpression */: + case 188 /* ConditionalExpression */: return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 184 /* BinaryExpression */: + case 187 /* BinaryExpression */: return node.operatorToken.kind === 52 /* BarBarToken */ && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 248 /* PropertyAssignment */: + case 253 /* PropertyAssignment */: return isContextSensitive(node.initializer); - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: return isContextSensitiveFunctionLikeDeclaration(node); - case 175 /* ParenthesizedExpression */: + case 178 /* ParenthesizedExpression */: return isContextSensitive(node.expression); } return false; } function isContextSensitiveFunctionLikeDeclaration(node) { - return !node.typeParameters && node.parameters.length && !ts.forEach(node.parameters, function (p) { return p.type; }); + var areAllParametersUntyped = !ts.forEach(node.parameters, function (p) { return p.type; }); + var isNullaryArrow = node.kind === 180 /* ArrowFunction */ && !node.parameters.length; + return !node.typeParameters && areAllParametersUntyped && !isNullaryArrow; + } + function isContextSensitiveFunctionOrObjectLiteralMethod(func) { + return (isFunctionExpressionOrArrowFunction(func) || ts.isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func); } function getTypeWithoutSignatures(type) { - if (type.flags & 80896 /* ObjectType */) { + if (type.flags & 2588672 /* ObjectType */) { var resolved = resolveStructuredTypeMembers(type); if (resolved.constructSignatures.length) { - var result = createObjectType(65536 /* Anonymous */, type.symbol); + var result = createObjectType(2097152 /* Anonymous */, type.symbol); result.members = resolved.members; result.properties = resolved.properties; result.callSignatures = emptyArray; @@ -19436,19 +21957,35 @@ var ts; } // TYPE CHECKING function isTypeIdenticalTo(source, target) { - return checkTypeRelatedTo(source, target, identityRelation, /*errorNode*/ undefined); + return isTypeRelatedTo(source, target, identityRelation); } function compareTypesIdentical(source, target) { - return checkTypeRelatedTo(source, target, identityRelation, /*errorNode*/ undefined) ? -1 /* True */ : 0 /* False */; + return isTypeRelatedTo(source, target, identityRelation) ? -1 /* True */ : 0 /* False */; } function compareTypesAssignable(source, target) { - return checkTypeRelatedTo(source, target, assignableRelation, /*errorNode*/ undefined) ? -1 /* True */ : 0 /* False */; + return isTypeRelatedTo(source, target, assignableRelation) ? -1 /* True */ : 0 /* False */; } function isTypeSubtypeOf(source, target) { - return checkTypeSubtypeOf(source, target, /*errorNode*/ undefined); + return isTypeRelatedTo(source, target, subtypeRelation); } function isTypeAssignableTo(source, target) { - return checkTypeAssignableTo(source, target, /*errorNode*/ undefined); + return isTypeRelatedTo(source, target, assignableRelation); + } + // A type S is considered to be an instance of a type T if S and T are the same type or if S is a + // subtype of T but not structurally identical to T. This specifically means that two distinct but + // structurally identical types (such as two classes) are not considered instances of each other. + function isTypeInstanceOf(source, target) { + return source === target || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target); + } + /** + * This is *not* a bi-directional relationship. + * If one needs to check both directions for comparability, use a second call to this function or 'checkTypeComparableTo'. + */ + function isTypeComparableTo(source, target) { + return isTypeRelatedTo(source, target, comparableRelation); + } + function areTypesComparable(type1, type2) { + return isTypeComparableTo(type1, type2) || isTypeComparableTo(type2, type1); } function checkTypeSubtypeOf(source, target, errorNode, headMessage, containingMessageChain) { return checkTypeRelatedTo(source, target, subtypeRelation, errorNode, headMessage, containingMessageChain); @@ -19456,6 +21993,13 @@ var ts; function checkTypeAssignableTo(source, target, errorNode, headMessage, containingMessageChain) { return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage, containingMessageChain); } + /** + * This is *not* a bi-directional relationship. + * If one needs to check both directions for comparability, use a second call to this function or 'isTypeComparableTo'. + */ + function checkTypeComparableTo(source, target, errorNode, headMessage, containingMessageChain) { + return checkTypeRelatedTo(source, target, comparableRelation, errorNode, headMessage, containingMessageChain); + } function isSignatureAssignableTo(source, target, ignoreReturnTypes) { return compareSignaturesRelated(source, target, ignoreReturnTypes, /*reportErrors*/ false, /*errorReporter*/ undefined, compareTypesAssignable) !== 0 /* False */; } @@ -19475,14 +22019,30 @@ var ts; source = getErasedSignature(source); target = getErasedSignature(target); var result = -1 /* True */; + var sourceThisType = getThisTypeOfSignature(source); + if (sourceThisType && sourceThisType !== voidType) { + var targetThisType = getThisTypeOfSignature(target); + if (targetThisType) { + // void sources are assignable to anything. + var related = compareTypes(sourceThisType, targetThisType, /*reportErrors*/ false) + || compareTypes(targetThisType, sourceThisType, reportErrors); + if (!related) { + if (reportErrors) { + errorReporter(ts.Diagnostics.The_this_types_of_each_signature_are_incompatible); + } + return 0 /* False */; + } + result &= related; + } + } var sourceMax = getNumNonRestParameters(source); var targetMax = getNumNonRestParameters(target); var checkCount = getNumParametersToCheckForSignatureRelatability(source, sourceMax, target, targetMax); var sourceParams = source.parameters; var targetParams = target.parameters; for (var i = 0; i < checkCount; i++) { - var s = i < sourceMax ? getTypeOfSymbol(sourceParams[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(targetParams[i]) : getRestTypeOfSignature(target); + var s = i < sourceMax ? getTypeOfParameter(sourceParams[i]) : getRestTypeOfSignature(source); + var t = i < targetMax ? getTypeOfParameter(targetParams[i]) : getRestTypeOfSignature(target); var related = compareTypes(s, t, /*reportErrors*/ false) || compareTypes(t, s, reportErrors); if (!related) { if (reportErrors) { @@ -19548,8 +22108,8 @@ var ts; var sourceReturnType = getReturnTypeOfSignature(erasedSource); var targetReturnType = getReturnTypeOfSignature(erasedTarget); if (targetReturnType === voidType - || checkTypeRelatedTo(targetReturnType, sourceReturnType, assignableRelation, /*errorNode*/ undefined) - || checkTypeRelatedTo(sourceReturnType, targetReturnType, assignableRelation, /*errorNode*/ undefined)) { + || isTypeRelatedTo(targetReturnType, sourceReturnType, assignableRelation) + || isTypeRelatedTo(sourceReturnType, targetReturnType, assignableRelation)) { return isSignatureAssignableTo(erasedSource, erasedTarget, /*ignoreReturnTypes*/ true); } return false; @@ -19578,11 +22138,93 @@ var ts; sourceNonRestParamCount; } } + function isEnumTypeRelatedTo(source, target, errorReporter) { + if (source === target) { + return true; + } + var id = source.id + "," + target.id; + if (enumRelation[id] !== undefined) { + return enumRelation[id]; + } + if (source.symbol.name !== target.symbol.name || + !(source.symbol.flags & 256 /* RegularEnum */) || !(target.symbol.flags & 256 /* RegularEnum */) || + (source.flags & 524288 /* Union */) !== (target.flags & 524288 /* Union */)) { + return enumRelation[id] = false; + } + var targetEnumType = getTypeOfSymbol(target.symbol); + for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) { + var property = _a[_i]; + if (property.flags & 8 /* EnumMember */) { + var targetProperty = getPropertyOfType(targetEnumType, property.name); + if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) { + if (errorReporter) { + errorReporter(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, /*enclosingDeclaration*/ undefined, 128 /* UseFullyQualifiedType */)); + } + return enumRelation[id] = false; + } + } + } + return enumRelation[id] = true; + } + function isSimpleTypeRelatedTo(source, target, relation, errorReporter) { + if (target.flags & 8192 /* Never */) + return false; + if (target.flags & 1 /* Any */ || source.flags & 8192 /* Never */) + return true; + if (source.flags & 34 /* StringLike */ && target.flags & 2 /* String */) + return true; + if (source.flags & 340 /* NumberLike */ && target.flags & 4 /* Number */) + return true; + if (source.flags & 136 /* BooleanLike */ && target.flags & 8 /* Boolean */) + return true; + if (source.flags & 256 /* EnumLiteral */ && target.flags & 16 /* Enum */ && source.baseType === target) + return true; + if (source.flags & 16 /* Enum */ && target.flags & 16 /* Enum */ && isEnumTypeRelatedTo(source, target, errorReporter)) + return true; + if (source.flags & 2048 /* Undefined */ && (!strictNullChecks || target.flags & (2048 /* Undefined */ | 1024 /* Void */))) + return true; + if (source.flags & 4096 /* Null */ && (!strictNullChecks || target.flags & 4096 /* Null */)) + return true; + if (relation === assignableRelation || relation === comparableRelation) { + if (source.flags & 1 /* Any */) + return true; + if ((source.flags & 4 /* Number */ | source.flags & 64 /* NumberLiteral */) && target.flags & 272 /* EnumLike */) + return true; + if (source.flags & 256 /* EnumLiteral */ && + target.flags & 256 /* EnumLiteral */ && + source.text === target.text && + isEnumTypeRelatedTo(source.baseType, target.baseType, errorReporter)) { + return true; + } + if (source.flags & 256 /* EnumLiteral */ && + target.flags & 16 /* Enum */ && + isEnumTypeRelatedTo(target, source.baseType, errorReporter)) { + return true; + } + } + return false; + } + function isTypeRelatedTo(source, target, relation) { + if (source === target || relation !== identityRelation && isSimpleTypeRelatedTo(source, target, relation)) { + return true; + } + if (source.flags & 2588672 /* ObjectType */ && target.flags & 2588672 /* ObjectType */) { + var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id; + var related = relation[id]; + if (related !== undefined) { + return related === 1 /* Succeeded */; + } + } + if (source.flags & 4177920 /* StructuredOrTypeParameter */ || target.flags & 4177920 /* StructuredOrTypeParameter */) { + return checkTypeRelatedTo(source, target, relation, undefined, undefined, undefined); + } + return false; + } /** * Checks if 'source' is related to 'target' (e.g.: is a assignable to). * @param source The left-hand-side of the relation. * @param target The right-hand-side of the relation. - * @param relation The relation considered. One of 'identityRelation', 'assignableRelation', or 'subTypeRelation'. + * @param relation The relation considered. One of 'identityRelation', 'subtypeRelation', 'assignableRelation', or 'comparableRelation'. * Used as both to determine which checks are performed and as a cache of previously computed results. * @param errorNode The suggested node upon which all errors will be reported, if defined. This may or may not be the actual node used. * @param headMessage If the error chain should be prepended by a head message, then headMessage will be used. @@ -19619,7 +22261,22 @@ var ts; sourceType = typeToString(source, /*enclosingDeclaration*/ undefined, 128 /* UseFullyQualifiedType */); targetType = typeToString(target, /*enclosingDeclaration*/ undefined, 128 /* UseFullyQualifiedType */); } - reportError(message || ts.Diagnostics.Type_0_is_not_assignable_to_type_1, sourceType, targetType); + if (!message) { + message = relation === comparableRelation ? + ts.Diagnostics.Type_0_is_not_comparable_to_type_1 : + ts.Diagnostics.Type_0_is_not_assignable_to_type_1; + } + reportError(message, sourceType, targetType); + } + function tryElaborateErrorsForPrimitivesAndObjects(source, target) { + var sourceType = typeToString(source); + var targetType = typeToString(target); + if ((globalStringType === source && stringType === target) || + (globalNumberType === source && numberType === target) || + (globalBooleanType === source && booleanType === target) || + (getGlobalESSymbolType() === source && esSymbolType === target)) { + reportError(ts.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType); + } } // Compare two types and return // Ternary.True if they are related with no assumptions, @@ -19633,31 +22290,9 @@ var ts; if (relation === identityRelation) { return isIdenticalTo(source, target); } - if (isTypeAny(target)) + if (isSimpleTypeRelatedTo(source, target, relation, reportErrors ? reportError : undefined)) return -1 /* True */; - if (source === undefinedType) - return -1 /* True */; - if (source === nullType && target !== undefinedType) - return -1 /* True */; - if (source.flags & 128 /* Enum */ && target === numberType) - return -1 /* True */; - if (source.flags & 128 /* Enum */ && target.flags & 128 /* Enum */) { - if (result = enumRelatedTo(source, target)) { - return result; - } - } - if (source.flags & 256 /* StringLiteral */ && target === stringType) - return -1 /* True */; - if (relation === assignableRelation) { - if (isTypeAny(source)) - return -1 /* True */; - if (source === numberType && target.flags & 128 /* Enum */) - return -1 /* True */; - } - if (source.flags & 8 /* Boolean */ && target.flags & 8 /* Boolean */) { - return -1 /* True */; - } - if (source.flags & 1048576 /* FreshObjectLiteral */) { + if (source.flags & 16777216 /* FreshObjectLiteral */) { if (hasExcessProperties(source, target, reportErrors)) { if (reportErrors) { reportRelationError(headMessage, source, target); @@ -19668,43 +22303,64 @@ var ts; // and intersection types are further deconstructed on the target side, we don't want to // make the check again (as it might fail for a partial target type). Therefore we obtain // the regular source type and proceed with that. - if (target.flags & 49152 /* UnionOrIntersection */) { + if (target.flags & 1572864 /* UnionOrIntersection */) { source = getRegularTypeOfObjectLiteral(source); } } var saveErrorInfo = errorInfo; - // Note that the "each" checks must precede the "some" checks to produce the correct results - if (source.flags & 16384 /* Union */) { - if (result = eachTypeRelatedToType(source, target, reportErrors)) { + // Note that these checks are specifically ordered to produce correct results. + if (source.flags & 524288 /* Union */) { + if (relation === comparableRelation) { + result = someTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */)); + } + else { + result = eachTypeRelatedToType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */)); + } + if (result) { return result; } } - else if (target.flags & 32768 /* Intersection */) { - if (result = typeRelatedToEachType(source, target, reportErrors)) { + else if (target.flags & 1048576 /* Intersection */) { + result = typeRelatedToEachType(source, target, reportErrors); + if (result) { return result; } } else { - // It is necessary to try "some" checks on both sides because there may be nested "each" checks + // It is necessary to try these "some" checks on both sides because there may be nested "each" checks // on either side that need to be prioritized. For example, A | B = (A | B) & (C | D) or // A & B = (A & B) | (C & D). - if (source.flags & 32768 /* Intersection */) { - // If target is a union type the following check will report errors so we suppress them here - if (result = someTypeRelatedToType(source, target, reportErrors && !(target.flags & 16384 /* Union */))) { + if (source.flags & 1048576 /* Intersection */) { + // Check to see if any constituents of the intersection are immediately related to the target. + // + // Don't report errors though. Checking whether a constituent is related to the source is not actually + // useful and leads to some confusing error messages. Instead it is better to let the below checks + // take care of this, or to not elaborate at all. For instance, + // + // - For an object type (such as 'C = A & B'), users are usually more interested in structural errors. + // + // - For a union type (such as '(A | B) = (C & D)'), it's better to hold onto the whole intersection + // than to report that 'D' is not assignable to 'A' or 'B'. + // + // - For a primitive type or type parameter (such as 'number = A & B') there is no point in + // breaking the intersection apart. + if (result = someTypeRelatedToType(source, target, /*reportErrors*/ false)) { return result; } } - if (target.flags & 16384 /* Union */) { - if (result = typeRelatedToSomeType(source, target, reportErrors)) { + if (target.flags & 524288 /* Union */) { + if (result = typeRelatedToSomeType(source, target, reportErrors && !(source.flags & 8190 /* Primitive */) && !(target.flags & 8190 /* Primitive */))) { return result; } } } - if (source.flags & 512 /* TypeParameter */) { + if (source.flags & 16384 /* TypeParameter */) { var constraint = getConstraintOfTypeParameter(source); if (!constraint || constraint.flags & 1 /* Any */) { constraint = emptyObjectType; } + // The constraint may need to be further instantiated with its 'this' type. + constraint = getTypeWithThisArgument(constraint, source); // Report constraint errors only if the constraint is not the empty object type var reportConstraintErrors = reportErrors && constraint !== emptyObjectType; if (result = isRelatedTo(constraint, target, reportConstraintErrors)) { @@ -19713,7 +22369,7 @@ var ts; } } else { - if (source.flags & 4096 /* Reference */ && target.flags & 4096 /* Reference */ && source.target === target.target) { + if (source.flags & 131072 /* Reference */ && target.flags & 131072 /* Reference */ && source.target === target.target) { // We have type references to same target type, see if relationship holds for all type arguments if (result = typeArgumentsRelatedTo(source, target, reportErrors)) { return result; @@ -19725,9 +22381,9 @@ var ts; // In a check of the form X = A & B, we will have previously checked if A relates to X or B relates // to X. Failing both of those we want to check if the aggregation of A and B's members structurally // relates to X. Thus, we include intersection types on the source side here. - if (apparentSource.flags & (80896 /* ObjectType */ | 32768 /* Intersection */) && target.flags & 80896 /* ObjectType */) { + if (apparentSource.flags & (2588672 /* ObjectType */ | 1048576 /* Intersection */) && target.flags & 2588672 /* ObjectType */) { // Report structural errors only if we haven't reported any errors yet - var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !(source.flags & 16777726 /* Primitive */); + var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo && !(source.flags & 8190 /* Primitive */); if (result = objectTypeRelatedTo(apparentSource, source, target, reportStructuralErrors)) { errorInfo = saveErrorInfo; return result; @@ -19735,14 +22391,17 @@ var ts; } } if (reportErrors) { + if (source.flags & 2588672 /* ObjectType */ && target.flags & 8190 /* Primitive */) { + tryElaborateErrorsForPrimitivesAndObjects(source, target); + } reportRelationError(headMessage, source, target); } return 0 /* False */; } function isIdenticalTo(source, target) { var result; - if (source.flags & 80896 /* ObjectType */ && target.flags & 80896 /* ObjectType */) { - if (source.flags & 4096 /* Reference */ && target.flags & 4096 /* Reference */ && source.target === target.target) { + if (source.flags & 2588672 /* ObjectType */ && target.flags & 2588672 /* ObjectType */) { + if (source.flags & 131072 /* Reference */ && target.flags & 131072 /* Reference */ && source.target === target.target) { // We have type references to same target type, see if all type arguments are identical if (result = typeArgumentsRelatedTo(source, target, /*reportErrors*/ false)) { return result; @@ -19750,10 +22409,10 @@ var ts; } return objectTypeRelatedTo(source, source, target, /*reportErrors*/ false); } - if (source.flags & 16384 /* Union */ && target.flags & 16384 /* Union */ || - source.flags & 32768 /* Intersection */ && target.flags & 32768 /* Intersection */) { - if (result = eachTypeRelatedToSomeType(source, target)) { - if (result &= eachTypeRelatedToSomeType(target, source)) { + if (source.flags & 524288 /* Union */ && target.flags & 524288 /* Union */ || + source.flags & 1048576 /* Intersection */ && target.flags & 1048576 /* Intersection */) { + if (result = eachTypeRelatedToSomeType(source, target, /*reportErrors*/ false)) { + if (result &= eachTypeRelatedToSomeType(target, source, /*reportErrors*/ false)) { return result; } } @@ -19765,14 +22424,16 @@ var ts; // index signatures, or if the property is actually declared in the object type. In a union or intersection // type, a property is considered known if it is known in any constituent type. function isKnownProperty(type, name) { - if (type.flags & 80896 /* ObjectType */) { + if (type.flags & 2588672 /* ObjectType */) { var resolved = resolveStructuredTypeMembers(type); - if (relation === assignableRelation && (type === globalObjectType || resolved.properties.length === 0) || - resolved.stringIndexType || resolved.numberIndexType || getPropertyOfType(type, name)) { + if ((relation === assignableRelation || relation === comparableRelation) && (type === globalObjectType || isEmptyObjectType(resolved)) || + resolved.stringIndexInfo || + (resolved.numberIndexInfo && isNumericLiteralName(name)) || + getPropertyOfType(type, name)) { return true; } } - else if (type.flags & 49152 /* UnionOrIntersection */) { + else if (type.flags & 1572864 /* UnionOrIntersection */) { for (var _i = 0, _a = type.types; _i < _a.length; _i++) { var t = _a[_i]; if (isKnownProperty(t, name)) { @@ -19782,8 +22443,15 @@ var ts; } return false; } + function isEmptyObjectType(t) { + return t.properties.length === 0 && + t.callSignatures.length === 0 && + t.constructSignatures.length === 0 && + !t.stringIndexInfo && + !t.numberIndexInfo; + } function hasExcessProperties(source, target, reportErrors) { - if (!(target.flags & 67108864 /* ObjectLiteralPatternWithComputedProperties */) && someConstituentTypeHasKind(target, 80896 /* ObjectType */)) { + if (!(target.flags & 536870912 /* ObjectLiteralPatternWithComputedProperties */) && maybeTypeOfKind(target, 2588672 /* ObjectType */)) { for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) { var prop = _a[_i]; if (!isKnownProperty(target, prop.name)) { @@ -19801,7 +22469,7 @@ var ts; } return false; } - function eachTypeRelatedToSomeType(source, target) { + function eachTypeRelatedToSomeType(source, target, reportErrors) { var result = -1 /* True */; var sourceTypes = source.types; for (var _i = 0, sourceTypes_1 = sourceTypes; _i < sourceTypes_1.length; _i++) { @@ -19816,7 +22484,11 @@ var ts; } function typeRelatedToSomeType(source, target, reportErrors) { var targetTypes = target.types; - for (var i = 0, len = targetTypes.length; i < len; i++) { + if (target.flags & 524288 /* Union */ && containsType(targetTypes, source)) { + return -1 /* True */; + } + var len = targetTypes.length; + for (var i = 0; i < len; i++) { var related = isRelatedTo(source, targetTypes[i], reportErrors && i === len - 1); if (related) { return related; @@ -19839,7 +22511,11 @@ var ts; } function someTypeRelatedToType(source, target, reportErrors) { var sourceTypes = source.types; - for (var i = 0, len = sourceTypes.length; i < len; i++) { + if (source.flags & 524288 /* Union */ && containsType(sourceTypes, target)) { + return -1 /* True */; + } + var len = sourceTypes.length; + for (var i = 0; i < len; i++) { var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1); if (related) { return related; @@ -19918,7 +22594,7 @@ var ts; } sourceStack[depth] = source; targetStack[depth] = target; - maybeStack[depth] = {}; + maybeStack[depth] = ts.createMap(); maybeStack[depth][id] = 1 /* Succeeded */; depth++; var saveExpandingFlags = expandingFlags; @@ -19937,9 +22613,9 @@ var ts; if (result) { result &= signaturesRelatedTo(source, target, 1 /* Construct */, reportErrors); if (result) { - result &= stringIndexTypesRelatedTo(source, originalSource, target, reportErrors); + result &= indexTypesRelatedTo(source, originalSource, target, 0 /* String */, reportErrors); if (result) { - result &= numberIndexTypesRelatedTo(source, originalSource, target, reportErrors); + result &= indexTypesRelatedTo(source, originalSource, target, 1 /* Number */, reportErrors); } } } @@ -19951,7 +22627,7 @@ var ts; var maybeCache = maybeStack[depth]; // If result is definitely true, copy assumptions to global cache, else copy to next level up var destinationCache = (result === -1 /* True */ || depth === 0) ? relation : maybeStack[depth - 1]; - ts.copyMap(maybeCache, destinationCache); + ts.copyProperties(maybeCache, destinationCache); } else { // A false result goes straight into global cache (when something is false under assumptions it @@ -19966,7 +22642,7 @@ var ts; } var result = -1 /* True */; var properties = getPropertiesOfObjectType(target); - var requireOptionalProperties = relation === subtypeRelation && !(source.flags & 524288 /* ObjectLiteral */); + var requireOptionalProperties = relation === subtypeRelation && !(source.flags & 8388608 /* ObjectLiteral */); for (var _i = 0, properties_1 = properties; _i < properties_1.length; _i++) { var targetProp = properties_1[_i]; var sourceProp = getPropertyOfType(source, targetProp.name); @@ -19982,20 +22658,20 @@ var ts; else if (!(targetProp.flags & 134217728 /* Prototype */)) { var sourcePropFlags = getDeclarationFlagsFromSymbol(sourceProp); var targetPropFlags = getDeclarationFlagsFromSymbol(targetProp); - if (sourcePropFlags & 16 /* Private */ || targetPropFlags & 16 /* Private */) { + if (sourcePropFlags & 8 /* Private */ || targetPropFlags & 8 /* Private */) { if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) { if (reportErrors) { - if (sourcePropFlags & 16 /* Private */ && targetPropFlags & 16 /* Private */) { + if (sourcePropFlags & 8 /* Private */ && targetPropFlags & 8 /* Private */) { reportError(ts.Diagnostics.Types_have_separate_declarations_of_a_private_property_0, symbolToString(targetProp)); } else { - reportError(ts.Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2, symbolToString(targetProp), typeToString(sourcePropFlags & 16 /* Private */ ? source : target), typeToString(sourcePropFlags & 16 /* Private */ ? target : source)); + reportError(ts.Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2, symbolToString(targetProp), typeToString(sourcePropFlags & 8 /* Private */ ? source : target), typeToString(sourcePropFlags & 8 /* Private */ ? target : source)); } } return 0 /* False */; } } - else if (targetPropFlags & 32 /* Protected */) { + else if (targetPropFlags & 16 /* Protected */) { var sourceDeclaredInClass = sourceProp.parent && sourceProp.parent.flags & 32 /* Class */; var sourceClass = sourceDeclaredInClass ? getDeclaredTypeOfSymbol(getParentOfSymbol(sourceProp)) : undefined; var targetClass = getDeclaredTypeOfSymbol(getParentOfSymbol(targetProp)); @@ -20006,7 +22682,7 @@ var ts; return 0 /* False */; } } - else if (sourcePropFlags & 32 /* Protected */) { + else if (sourcePropFlags & 16 /* Protected */) { if (reportErrors) { reportError(ts.Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2, symbolToString(targetProp), typeToString(source), typeToString(target)); } @@ -20039,7 +22715,7 @@ var ts; return result; } function propertiesIdenticalTo(source, target) { - if (!(source.flags & 80896 /* ObjectType */ && target.flags & 80896 /* ObjectType */)) { + if (!(source.flags & 2588672 /* ObjectType */ && target.flags & 2588672 /* ObjectType */)) { return 0 /* False */; } var sourceProperties = getPropertiesOfObjectType(source); @@ -20071,43 +22747,41 @@ var ts; } var sourceSignatures = getSignaturesOfType(source, kind); var targetSignatures = getSignaturesOfType(target, kind); - if (kind === 1 /* Construct */ && sourceSignatures.length && targetSignatures.length && - isAbstractConstructorType(source) && !isAbstractConstructorType(target)) { - // An abstract constructor type is not assignable to a non-abstract constructor type - // as it would otherwise be possible to new an abstract class. Note that the assignablity - // check we perform for an extends clause excludes construct signatures from the target, - // so this check never proceeds. - if (reportErrors) { - reportError(ts.Diagnostics.Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type); + if (kind === 1 /* Construct */ && sourceSignatures.length && targetSignatures.length) { + if (isAbstractConstructorType(source) && !isAbstractConstructorType(target)) { + // An abstract constructor type is not assignable to a non-abstract constructor type + // as it would otherwise be possible to new an abstract class. Note that the assignability + // check we perform for an extends clause excludes construct signatures from the target, + // so this check never proceeds. + if (reportErrors) { + reportError(ts.Diagnostics.Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type); + } + return 0 /* False */; + } + if (!constructorVisibilitiesAreCompatible(sourceSignatures[0], targetSignatures[0], reportErrors)) { + return 0 /* False */; } - return 0 /* False */; } var result = -1 /* True */; var saveErrorInfo = errorInfo; outer: for (var _i = 0, targetSignatures_1 = targetSignatures; _i < targetSignatures_1.length; _i++) { var t = targetSignatures_1[_i]; - if (!t.hasStringLiterals || target.flags & 262144 /* FromSignature */) { - // Only elaborate errors from the first failure - var shouldElaborateErrors = reportErrors; - for (var _a = 0, sourceSignatures_1 = sourceSignatures; _a < sourceSignatures_1.length; _a++) { - var s = sourceSignatures_1[_a]; - if (!s.hasStringLiterals || source.flags & 262144 /* FromSignature */) { - var related = signatureRelatedTo(s, t, shouldElaborateErrors); - if (related) { - result &= related; - errorInfo = saveErrorInfo; - continue outer; - } - shouldElaborateErrors = false; - } + // Only elaborate errors from the first failure + var shouldElaborateErrors = reportErrors; + for (var _a = 0, sourceSignatures_1 = sourceSignatures; _a < sourceSignatures_1.length; _a++) { + var s = sourceSignatures_1[_a]; + var related = signatureRelatedTo(s, t, shouldElaborateErrors); + if (related) { + result &= related; + errorInfo = saveErrorInfo; + continue outer; } - // don't elaborate the primitive apparent types (like Number) - // because the actual primitives will have already been reported. - if (shouldElaborateErrors) { - reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind)); - } - return 0 /* False */; + shouldElaborateErrors = false; } + if (shouldElaborateErrors) { + reportError(ts.Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind)); + } + return 0 /* False */; } return result; } @@ -20125,7 +22799,7 @@ var ts; } var result = -1 /* True */; for (var i = 0, len = sourceSignatures.length; i < len; i++) { - var related = compareSignaturesIdentical(sourceSignatures[i], targetSignatures[i], /*partialMatch*/ false, /*ignoreReturnTypes*/ false, isRelatedTo); + var related = compareSignaturesIdentical(sourceSignatures[i], targetSignatures[i], /*partialMatch*/ false, /*ignoreThisTypes*/ false, /*ignoreReturnTypes*/ false, isRelatedTo); if (!related) { return 0 /* False */; } @@ -20133,106 +22807,100 @@ var ts; } return result; } - function stringIndexTypesRelatedTo(source, originalSource, target, reportErrors) { - if (relation === identityRelation) { - return indexTypesIdenticalTo(0 /* String */, source, target); - } - var targetType = getIndexTypeOfType(target, 0 /* String */); - if (targetType) { - if ((targetType.flags & 1 /* Any */) && !(originalSource.flags & 16777726 /* Primitive */)) { - // non-primitive assignment to any is always allowed, eg - // `var x: { [index: string]: any } = { property: 12 };` - return -1 /* True */; - } - var sourceType = getIndexTypeOfType(source, 0 /* String */); - if (!sourceType) { - if (reportErrors) { - reportError(ts.Diagnostics.Index_signature_is_missing_in_type_0, typeToString(source)); + function eachPropertyRelatedTo(source, target, kind, reportErrors) { + var result = -1 /* True */; + for (var _i = 0, _a = getPropertiesOfObjectType(source); _i < _a.length; _i++) { + var prop = _a[_i]; + if (kind === 0 /* String */ || isNumericLiteralName(prop.name)) { + var related = isRelatedTo(getTypeOfSymbol(prop), target, reportErrors); + if (!related) { + if (reportErrors) { + reportError(ts.Diagnostics.Property_0_is_incompatible_with_index_signature, symbolToString(prop)); + } + return 0 /* False */; } - return 0 /* False */; + result &= related; } - var related = isRelatedTo(sourceType, targetType, reportErrors); - if (!related) { - if (reportErrors) { - reportError(ts.Diagnostics.Index_signatures_are_incompatible); - } - return 0 /* False */; - } - return related; } - return -1 /* True */; + return result; } - function numberIndexTypesRelatedTo(source, originalSource, target, reportErrors) { - if (relation === identityRelation) { - return indexTypesIdenticalTo(1 /* Number */, source, target); + function indexInfoRelatedTo(sourceInfo, targetInfo, reportErrors) { + var related = isRelatedTo(sourceInfo.type, targetInfo.type, reportErrors); + if (!related && reportErrors) { + reportError(ts.Diagnostics.Index_signatures_are_incompatible); } - var targetType = getIndexTypeOfType(target, 1 /* Number */); - if (targetType) { - if ((targetType.flags & 1 /* Any */) && !(originalSource.flags & 16777726 /* Primitive */)) { - // non-primitive assignment to any is always allowed, eg - // `var x: { [index: number]: any } = { property: 12 };` - return -1 /* True */; - } - var sourceStringType = getIndexTypeOfType(source, 0 /* String */); - var sourceNumberType = getIndexTypeOfType(source, 1 /* Number */); - if (!(sourceStringType || sourceNumberType)) { - if (reportErrors) { - reportError(ts.Diagnostics.Index_signature_is_missing_in_type_0, typeToString(source)); - } - return 0 /* False */; - } - var related = void 0; - if (sourceStringType && sourceNumberType) { - // If we know for sure we're testing both string and numeric index types then only report errors from the second one - related = isRelatedTo(sourceStringType, targetType, /*reportErrors*/ false) || isRelatedTo(sourceNumberType, targetType, reportErrors); - } - else { - related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); - } - if (!related) { - if (reportErrors) { - reportError(ts.Diagnostics.Index_signatures_are_incompatible); - } - return 0 /* False */; - } - return related; - } - return -1 /* True */; + return related; } - function indexTypesIdenticalTo(indexKind, source, target) { - var targetType = getIndexTypeOfType(target, indexKind); - var sourceType = getIndexTypeOfType(source, indexKind); - if (!sourceType && !targetType) { + function indexTypesRelatedTo(source, originalSource, target, kind, reportErrors) { + if (relation === identityRelation) { + return indexTypesIdenticalTo(source, target, kind); + } + var targetInfo = getIndexInfoOfType(target, kind); + if (!targetInfo || ((targetInfo.type.flags & 1 /* Any */) && !(originalSource.flags & 8190 /* Primitive */))) { + // Index signature of type any permits assignment from everything but primitives return -1 /* True */; } - if (sourceType && targetType) { - return isRelatedTo(sourceType, targetType); + var sourceInfo = getIndexInfoOfType(source, kind) || + kind === 1 /* Number */ && getIndexInfoOfType(source, 0 /* String */); + if (sourceInfo) { + return indexInfoRelatedTo(sourceInfo, targetInfo, reportErrors); + } + if (isObjectLiteralType(source)) { + var related = -1 /* True */; + if (kind === 0 /* String */) { + var sourceNumberInfo = getIndexInfoOfType(source, 1 /* Number */); + if (sourceNumberInfo) { + related = indexInfoRelatedTo(sourceNumberInfo, targetInfo, reportErrors); + } + } + if (related) { + related &= eachPropertyRelatedTo(source, targetInfo.type, kind, reportErrors); + } + return related; + } + if (reportErrors) { + reportError(ts.Diagnostics.Index_signature_is_missing_in_type_0, typeToString(source)); } return 0 /* False */; } - function enumRelatedTo(source, target) { - if (source.symbol.name !== target.symbol.name || - source.symbol.flags & 128 /* ConstEnum */ || - target.symbol.flags & 128 /* ConstEnum */) { - return 0 /* False */; + function indexTypesIdenticalTo(source, target, indexKind) { + var targetInfo = getIndexInfoOfType(target, indexKind); + var sourceInfo = getIndexInfoOfType(source, indexKind); + if (!sourceInfo && !targetInfo) { + return -1 /* True */; } - var targetEnumType = getTypeOfSymbol(target.symbol); - for (var _i = 0, _a = getPropertiesOfType(getTypeOfSymbol(source.symbol)); _i < _a.length; _i++) { - var property = _a[_i]; - if (property.flags & 8 /* EnumMember */) { - var targetProperty = getPropertyOfType(targetEnumType, property.name); - if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) { - reportError(ts.Diagnostics.Property_0_is_missing_in_type_1, property.name, typeToString(target, /*enclosingDeclaration*/ undefined, 128 /* UseFullyQualifiedType */)); - return 0 /* False */; - } - } + if (sourceInfo && targetInfo && sourceInfo.isReadonly === targetInfo.isReadonly) { + return isRelatedTo(sourceInfo.type, targetInfo.type); } - return -1 /* True */; + return 0 /* False */; + } + function constructorVisibilitiesAreCompatible(sourceSignature, targetSignature, reportErrors) { + if (!sourceSignature.declaration || !targetSignature.declaration) { + return true; + } + var sourceAccessibility = sourceSignature.declaration.flags & (8 /* Private */ | 16 /* Protected */); + var targetAccessibility = targetSignature.declaration.flags & (8 /* Private */ | 16 /* Protected */); + // A public, protected and private signature is assignable to a private signature. + if (targetAccessibility === 8 /* Private */) { + return true; + } + // A public and protected signature is assignable to a protected signature. + if (targetAccessibility === 16 /* Protected */ && sourceAccessibility !== 8 /* Private */) { + return true; + } + // Only a public signature is assignable to public signature. + if (targetAccessibility !== 16 /* Protected */ && !sourceAccessibility) { + return true; + } + if (reportErrors) { + reportError(ts.Diagnostics.Cannot_assign_a_0_constructor_type_to_a_1_constructor_type, visibilityToString(sourceAccessibility), visibilityToString(targetAccessibility)); + } + return false; } } // Return true if the given type is the constructor type for an abstract class function isAbstractConstructorType(type) { - if (type.flags & 65536 /* Anonymous */) { + if (type.flags & 2097152 /* Anonymous */) { var symbol = type.symbol; if (symbol && symbol.flags & 32 /* Class */) { var declaration = getClassLikeDeclarationOfSymbol(symbol); @@ -20250,12 +22918,12 @@ var ts; // some level beyond that. function isDeeplyNestedGeneric(type, stack, depth) { // We track type references (created by createTypeReference) and instantiated types (created by instantiateType) - if (type.flags & (4096 /* Reference */ | 131072 /* Instantiated */) && depth >= 5) { + if (type.flags & (131072 /* Reference */ | 4194304 /* Instantiated */) && depth >= 5) { var symbol = type.symbol; var count = 0; for (var i = 0; i < depth; i++) { var t = stack[i]; - if (t.flags & (4096 /* Reference */ | 131072 /* Instantiated */) && t.symbol === symbol) { + if (t.flags & (131072 /* Reference */ | 4194304 /* Instantiated */) && t.symbol === symbol) { count++; if (count >= 5) return true; @@ -20274,8 +22942,8 @@ var ts; if (sourceProp === targetProp) { return -1 /* True */; } - var sourcePropAccessibility = getDeclarationFlagsFromSymbol(sourceProp) & (16 /* Private */ | 32 /* Protected */); - var targetPropAccessibility = getDeclarationFlagsFromSymbol(targetProp) & (16 /* Private */ | 32 /* Protected */); + var sourcePropAccessibility = getDeclarationFlagsFromSymbol(sourceProp) & (8 /* Private */ | 16 /* Protected */); + var targetPropAccessibility = getDeclarationFlagsFromSymbol(targetProp) & (8 /* Private */ | 16 /* Protected */); if (sourcePropAccessibility !== targetPropAccessibility) { return 0 /* False */; } @@ -20289,6 +22957,9 @@ var ts; return 0 /* False */; } } + if (isReadonlySymbol(sourceProp) !== isReadonlySymbol(targetProp)) { + return 0 /* False */; + } return compareTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); } function isMatchingSignature(source, target, partialMatch) { @@ -20302,8 +22973,10 @@ var ts; // A source signature partially matches a target signature if the target signature has no fewer required // parameters and no more overall parameters than the source signature (where a signature with a rest // parameter is always considered to have more overall parameters than one without). - if (partialMatch && source.minArgumentCount <= target.minArgumentCount && (source.hasRestParameter && !target.hasRestParameter || - source.hasRestParameter === target.hasRestParameter && source.parameters.length >= target.parameters.length)) { + var sourceRestCount = source.hasRestParameter ? 1 : 0; + var targetRestCount = target.hasRestParameter ? 1 : 0; + if (partialMatch && source.minArgumentCount <= target.minArgumentCount && (sourceRestCount > targetRestCount || + sourceRestCount === targetRestCount && source.parameters.length >= target.parameters.length)) { return true; } return false; @@ -20311,7 +22984,7 @@ var ts; /** * See signatureRelatedTo, compareSignaturesIdentical */ - function compareSignaturesIdentical(source, target, partialMatch, ignoreReturnTypes, compareTypes) { + function compareSignaturesIdentical(source, target, partialMatch, ignoreThisTypes, ignoreReturnTypes, compareTypes) { // TODO (drosen): De-duplicate code between related functions. if (source === target) { return -1 /* True */; @@ -20332,10 +23005,23 @@ var ts; source = getErasedSignature(source); target = getErasedSignature(target); var result = -1 /* True */; + if (!ignoreThisTypes) { + var sourceThisType = getThisTypeOfSignature(source); + if (sourceThisType) { + var targetThisType = getThisTypeOfSignature(target); + if (targetThisType) { + var related = compareTypes(sourceThisType, targetThisType); + if (!related) { + return 0 /* False */; + } + result &= related; + } + } + } var targetLen = target.parameters.length; for (var i = 0; i < targetLen; i++) { - var s = isRestParameterIndex(source, i) ? getRestTypeOfSignature(source) : getTypeOfSymbol(source.parameters[i]); - var t = isRestParameterIndex(target, i) ? getRestTypeOfSignature(target) : getTypeOfSymbol(target.parameters[i]); + var s = isRestParameterIndex(source, i) ? getRestTypeOfSignature(source) : getTypeOfParameter(source.parameters[i]); + var t = isRestParameterIndex(target, i) ? getRestTypeOfSignature(target) : getTypeOfParameter(target.parameters[i]); var related = compareTypes(s, t); if (!related) { return 0 /* False */; @@ -20351,15 +23037,23 @@ var ts; return signature.hasRestParameter && parameterIndex >= signature.parameters.length - 1; } function isSupertypeOfEach(candidate, types) { - for (var _i = 0, types_6 = types; _i < types_6.length; _i++) { - var type = types_6[_i]; - if (candidate !== type && !isTypeSubtypeOf(type, candidate)) + for (var _i = 0, types_7 = types; _i < types_7.length; _i++) { + var t = types_7[_i]; + if (candidate !== t && !isTypeSubtypeOf(t, candidate)) return false; } return true; } function getCommonSupertype(types) { - return ts.forEach(types, function (t) { return isSupertypeOfEach(t, types) ? t : undefined; }); + if (!strictNullChecks) { + return ts.forEach(types, function (t) { return isSupertypeOfEach(t, types) ? t : undefined; }); + } + var primaryTypes = ts.filter(types, function (t) { return !(t.flags & 6144 /* Nullable */); }); + if (!primaryTypes.length) { + return getUnionType(types, /*subtypeReduction*/ true); + } + var supertype = ts.forEach(primaryTypes, function (t) { return isSupertypeOfEach(t, primaryTypes) ? t : undefined; }); + return supertype && includeFalsyTypes(supertype, getFalsyFlagsOfTypes(types) & 6144 /* Nullable */); } function reportNoCommonSupertypeError(types, errorLocation, errorMessageChainHead) { // The downfallType/bestSupertypeDownfallType is the first type that caused a particular candidate @@ -20395,85 +23089,161 @@ var ts; checkTypeSubtypeOf(bestSupertypeDownfallType, bestSupertype, errorLocation, ts.Diagnostics.Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0, errorMessageChainHead); } function isArrayType(type) { - return type.flags & 4096 /* Reference */ && type.target === globalArrayType; + return type.flags & 131072 /* Reference */ && type.target === globalArrayType; } function isArrayLikeType(type) { - // A type is array-like if it is not the undefined or null type and if it is assignable to any[] - return !(type.flags & (32 /* Undefined */ | 64 /* Null */)) && isTypeAssignableTo(type, anyArrayType); + // A type is array-like if it is a reference to the global Array or global ReadonlyArray type, + // or if it is not the undefined or null type and if it is assignable to ReadonlyArray + return type.flags & 131072 /* Reference */ && (type.target === globalArrayType || type.target === globalReadonlyArrayType) || + !(type.flags & 6144 /* Nullable */) && isTypeAssignableTo(type, anyReadonlyArrayType); } function isTupleLikeType(type) { return !!getPropertyOfType(type, "0"); } - function isStringLiteralType(type) { - return type.flags & 256 /* StringLiteral */; + function isUnitType(type) { + return (type.flags & (480 /* Literal */ | 2048 /* Undefined */ | 4096 /* Null */)) !== 0; + } + function isUnitUnionType(type) { + return type.flags & 8 /* Boolean */ ? true : + type.flags & 524288 /* Union */ ? type.flags & 16 /* Enum */ ? true : !ts.forEach(type.types, function (t) { return !isUnitType(t); }) : + isUnitType(type); + } + function getBaseTypeOfUnitType(type) { + return type.flags & 32 /* StringLiteral */ ? stringType : + type.flags & 64 /* NumberLiteral */ ? numberType : + type.flags & 128 /* BooleanLiteral */ ? booleanType : + type.flags & 256 /* EnumLiteral */ ? type.baseType : + type.flags & 524288 /* Union */ && !(type.flags & 16 /* Enum */) ? getUnionType(ts.map(type.types, getBaseTypeOfUnitType)) : + type; } /** * Check if a Type was written as a tuple type literal. * Prefer using isTupleLikeType() unless the use of `elementTypes` is required. */ function isTupleType(type) { - return !!(type.flags & 8192 /* Tuple */); + return !!(type.flags & 131072 /* Reference */ && type.target.flags & 262144 /* Tuple */); } + function getFalsyFlagsOfTypes(types) { + var result = 0; + for (var _i = 0, types_8 = types; _i < types_8.length; _i++) { + var t = types_8[_i]; + result |= getFalsyFlags(t); + } + return result; + } + // Returns the String, Number, Boolean, StringLiteral, NumberLiteral, BooleanLiteral, Void, Undefined, or Null + // flags for the string, number, boolean, "", 0, false, void, undefined, or null types respectively. Returns + // no flags for all other types (including non-falsy literal types). + function getFalsyFlags(type) { + return type.flags & 524288 /* Union */ ? getFalsyFlagsOfTypes(type.types) : + type.flags & 32 /* StringLiteral */ ? type === emptyStringType ? 32 /* StringLiteral */ : 0 : + type.flags & 64 /* NumberLiteral */ ? type === zeroType ? 64 /* NumberLiteral */ : 0 : + type.flags & 128 /* BooleanLiteral */ ? type === falseType ? 128 /* BooleanLiteral */ : 0 : + type.flags & 7406 /* PossiblyFalsy */; + } + function includeFalsyTypes(type, flags) { + if ((getFalsyFlags(type) & flags) === flags) { + return type; + } + var types = [type]; + if (flags & 34 /* StringLike */) + types.push(emptyStringType); + if (flags & 340 /* NumberLike */) + types.push(zeroType); + if (flags & 136 /* BooleanLike */) + types.push(falseType); + if (flags & 1024 /* Void */) + types.push(voidType); + if (flags & 2048 /* Undefined */) + types.push(undefinedType); + if (flags & 4096 /* Null */) + types.push(nullType); + return getUnionType(types, /*subtypeReduction*/ true); + } + function removeDefinitelyFalsyTypes(type) { + return getFalsyFlags(type) & 7392 /* DefinitelyFalsy */ ? + filterType(type, function (t) { return !(getFalsyFlags(t) & 7392 /* DefinitelyFalsy */); }) : + type; + } + function getNonNullableType(type) { + return strictNullChecks ? getTypeWithFacts(type, 524288 /* NEUndefinedOrNull */) : type; + } + /** + * Return true if type was inferred from an object literal or written as an object type literal + * with no call or construct signatures. + */ + function isObjectLiteralType(type) { + return type.symbol && (type.symbol.flags & (4096 /* ObjectLiteral */ | 2048 /* TypeLiteral */)) !== 0 && + getSignaturesOfType(type, 0 /* Call */).length === 0 && + getSignaturesOfType(type, 1 /* Construct */).length === 0; + } + function createTransientSymbol(source, type) { + var symbol = createSymbol(source.flags | 67108864 /* Transient */, source.name); + symbol.declarations = source.declarations; + symbol.parent = source.parent; + symbol.type = type; + symbol.target = source; + if (source.valueDeclaration) { + symbol.valueDeclaration = source.valueDeclaration; + } + return symbol; + } + function transformTypeOfMembers(type, f) { + var members = ts.createMap(); + for (var _i = 0, _a = getPropertiesOfObjectType(type); _i < _a.length; _i++) { + var property = _a[_i]; + var original = getTypeOfSymbol(property); + var updated = f(original); + members[property.name] = updated === original ? property : createTransientSymbol(property, updated); + } + ; + return members; + } + /** + * If the the provided object literal is subject to the excess properties check, + * create a new that is exempt. Recursively mark object literal members as exempt. + * Leave signatures alone since they are not subject to the check. + */ function getRegularTypeOfObjectLiteral(type) { - if (type.flags & 1048576 /* FreshObjectLiteral */) { - var regularType = type.regularType; - if (!regularType) { - regularType = createType(type.flags & ~1048576 /* FreshObjectLiteral */); - regularType.symbol = type.symbol; - regularType.members = type.members; - regularType.properties = type.properties; - regularType.callSignatures = type.callSignatures; - regularType.constructSignatures = type.constructSignatures; - regularType.stringIndexType = type.stringIndexType; - regularType.numberIndexType = type.numberIndexType; - type.regularType = regularType; - } + if (!(type.flags & 16777216 /* FreshObjectLiteral */)) { + return type; + } + var regularType = type.regularType; + if (regularType) { return regularType; } - return type; + var resolved = type; + var members = transformTypeOfMembers(type, getRegularTypeOfObjectLiteral); + var regularNew = createAnonymousType(resolved.symbol, members, resolved.callSignatures, resolved.constructSignatures, resolved.stringIndexInfo, resolved.numberIndexInfo); + regularNew.flags = resolved.flags & ~16777216 /* FreshObjectLiteral */; + type.regularType = regularNew; + return regularNew; } function getWidenedTypeOfObjectLiteral(type) { - var properties = getPropertiesOfObjectType(type); - var members = {}; - ts.forEach(properties, function (p) { - var propType = getTypeOfSymbol(p); - var widenedType = getWidenedType(propType); - if (propType !== widenedType) { - var symbol = createSymbol(p.flags | 67108864 /* Transient */, p.name); - symbol.declarations = p.declarations; - symbol.parent = p.parent; - symbol.type = widenedType; - symbol.target = p; - if (p.valueDeclaration) - symbol.valueDeclaration = p.valueDeclaration; - p = symbol; - } - members[p.name] = p; + var members = transformTypeOfMembers(type, function (prop) { + var widened = getWidenedType(prop); + return prop === widened ? prop : widened; }); - var stringIndexType = getIndexTypeOfType(type, 0 /* String */); - var numberIndexType = getIndexTypeOfType(type, 1 /* Number */); - if (stringIndexType) - stringIndexType = getWidenedType(stringIndexType); - if (numberIndexType) - numberIndexType = getWidenedType(numberIndexType); - return createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexType, numberIndexType); + var stringIndexInfo = getIndexInfoOfType(type, 0 /* String */); + var numberIndexInfo = getIndexInfoOfType(type, 1 /* Number */); + return createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexInfo && createIndexInfo(getWidenedType(stringIndexInfo.type), stringIndexInfo.isReadonly), numberIndexInfo && createIndexInfo(getWidenedType(numberIndexInfo.type), numberIndexInfo.isReadonly)); + } + function getWidenedConstituentType(type) { + return type.flags & 6144 /* Nullable */ ? type : getWidenedType(type); } function getWidenedType(type) { - if (type.flags & 6291456 /* RequiresWidening */) { - if (type.flags & (32 /* Undefined */ | 64 /* Null */)) { + if (type.flags & 100663296 /* RequiresWidening */) { + if (type.flags & 6144 /* Nullable */) { return anyType; } - if (type.flags & 524288 /* ObjectLiteral */) { + if (type.flags & 8388608 /* ObjectLiteral */) { return getWidenedTypeOfObjectLiteral(type); } - if (type.flags & 16384 /* Union */) { - return getUnionType(ts.map(type.types, getWidenedType), /*noSubtypeReduction*/ true); + if (type.flags & 524288 /* Union */) { + return getUnionType(ts.map(type.types, getWidenedConstituentType)); } - if (isArrayType(type)) { - return createArrayType(getWidenedType(type.typeArguments[0])); - } - if (isTupleType(type)) { - return createTupleType(ts.map(type.elementTypes, getWidenedType)); + if (isArrayType(type) || isTupleType(type)) { + return createTypeReference(type.target, ts.map(type.typeArguments, getWidenedType)); } } return type; @@ -20491,7 +23261,7 @@ var ts; */ function reportWideningErrorsInType(type) { var errorReported = false; - if (type.flags & 16384 /* Union */) { + if (type.flags & 524288 /* Union */) { for (var _i = 0, _a = type.types; _i < _a.length; _i++) { var t = _a[_i]; if (reportWideningErrorsInType(t)) { @@ -20499,22 +23269,19 @@ var ts; } } } - if (isArrayType(type)) { - return reportWideningErrorsInType(type.typeArguments[0]); - } - if (isTupleType(type)) { - for (var _b = 0, _c = type.elementTypes; _b < _c.length; _b++) { + if (isArrayType(type) || isTupleType(type)) { + for (var _b = 0, _c = type.typeArguments; _b < _c.length; _b++) { var t = _c[_b]; if (reportWideningErrorsInType(t)) { errorReported = true; } } } - if (type.flags & 524288 /* ObjectLiteral */) { + if (type.flags & 8388608 /* ObjectLiteral */) { for (var _d = 0, _e = getPropertiesOfObjectType(type); _d < _e.length; _d++) { var p = _e[_d]; var t = getTypeOfSymbol(p); - if (t.flags & 2097152 /* ContainsUndefinedOrNull */) { + if (t.flags & 33554432 /* ContainsWideningType */) { if (!reportWideningErrorsInType(t)) { error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(getWidenedType(t))); } @@ -20528,22 +23295,25 @@ var ts; var typeAsString = typeToString(getWidenedType(type)); var diagnostic; switch (declaration.kind) { - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; break; - case 139 /* Parameter */: + case 142 /* Parameter */: diagnostic = declaration.dotDotDotToken ? ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; break; - case 216 /* FunctionDeclaration */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: + case 169 /* BindingElement */: + diagnostic = ts.Diagnostics.Binding_element_0_implicitly_has_an_1_type; + break; + case 220 /* FunctionDeclaration */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: if (!declaration.name) { error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); return; @@ -20556,7 +23326,7 @@ var ts; error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString); } function reportErrorsFromWidening(declaration, type) { - if (produceDiagnostics && compilerOptions.noImplicitAny && type.flags & 2097152 /* ContainsUndefinedOrNull */) { + if (produceDiagnostics && compilerOptions.noImplicitAny && type.flags & 33554432 /* ContainsWideningType */) { // Report implicit any error within type if possible, otherwise report error on declaration if (!reportWideningErrorsInType(type)) { reportImplicitAnyError(declaration, type); @@ -20568,25 +23338,19 @@ var ts; var targetMax = target.parameters.length; var count; if (source.hasRestParameter && target.hasRestParameter) { - count = sourceMax > targetMax ? sourceMax : targetMax; - sourceMax--; - targetMax--; + count = Math.max(sourceMax, targetMax); } else if (source.hasRestParameter) { - sourceMax--; count = targetMax; } else if (target.hasRestParameter) { - targetMax--; count = sourceMax; } else { - count = sourceMax < targetMax ? sourceMax : targetMax; + count = Math.min(sourceMax, targetMax); } for (var i = 0; i < count; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - callback(s, t); + callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i)); } } function createInferenceContext(typeParameters, inferUnionTypes) { @@ -20605,13 +23369,27 @@ var ts; isFixed: false }; } + // Return true if the given type could possibly reference a type parameter for which + // we perform type inference (i.e. a type parameter of a generic function). We cache + // results for union and intersection types for performance reasons. + function couldContainTypeParameters(type) { + return !!(type.flags & 16384 /* TypeParameter */ || + type.flags & 131072 /* Reference */ && ts.forEach(type.typeArguments, couldContainTypeParameters) || + type.flags & 2097152 /* Anonymous */ && type.symbol && type.symbol.flags & (8192 /* Method */ | 2048 /* TypeLiteral */ | 32 /* Class */) || + type.flags & 1572864 /* UnionOrIntersection */ && couldUnionOrIntersectionContainTypeParameters(type)); + } + function couldUnionOrIntersectionContainTypeParameters(type) { + if (type.couldContainTypeParameters === undefined) { + type.couldContainTypeParameters = ts.forEach(type.types, couldContainTypeParameters); + } + return type.couldContainTypeParameters; + } function inferTypes(context, source, target) { var sourceStack; var targetStack; - var maxDepth = 5; var depth = 0; var inferiority = 0; - var visited = {}; + var visited = ts.createMap(); inferFromTypes(source, target); function isInProcess(source, target) { for (var i = 0; i < depth; i++) { @@ -20622,16 +23400,27 @@ var ts; return false; } function inferFromTypes(source, target) { - if (source.flags & 16384 /* Union */ && target.flags & 16384 /* Union */ || - source.flags & 32768 /* Intersection */ && target.flags & 32768 /* Intersection */) { - // Source and target are both unions or both intersections. First, find each - // target constituent type that has an identically matching source constituent - // type, and for each such target constituent type infer from the type to itself. - // When inferring from a type to itself we effectively find all type parameter + if (!couldContainTypeParameters(target)) { + return; + } + if (source.flags & 524288 /* Union */ && target.flags & 524288 /* Union */ && !(source.flags & 16 /* Enum */ && target.flags & 16 /* Enum */) || + source.flags & 1048576 /* Intersection */ && target.flags & 1048576 /* Intersection */) { + // Source and target are both unions or both intersections. If source and target + // are the same type, just relate each constituent type to itself. + if (source === target) { + for (var _i = 0, _a = source.types; _i < _a.length; _i++) { + var t = _a[_i]; + inferFromTypes(t, t); + } + return; + } + // Find each target constituent type that has an identically matching source + // constituent type, and for each such target constituent type infer from the type to + // itself. When inferring from a type to itself we effectively find all type parameter // occurrences within that type and infer themselves as their type arguments. var matchingTypes = void 0; - for (var _i = 0, _a = target.types; _i < _a.length; _i++) { - var t = _a[_i]; + for (var _b = 0, _c = target.types; _b < _c.length; _b++) { + var t = _c[_b]; if (typeIdenticalToSomeType(t, source.types)) { (matchingTypes || (matchingTypes = [])).push(t); inferFromTypes(t, t); @@ -20645,14 +23434,14 @@ var ts; target = removeTypesFromUnionOrIntersection(target, matchingTypes); } } - if (target.flags & 512 /* TypeParameter */) { + if (target.flags & 16384 /* TypeParameter */) { // If target is a type parameter, make an inference, unless the source type contains // the anyFunctionType (the wildcard type that's used to avoid contextually typing functions). // Because the anyFunctionType is internal, it should not be exposed to the user by adding // it as an inference candidate. Hopefully, a better candidate will come along that does // not contain anyFunctionType when we come back to this argument for its second round // of inference. - if (source.flags & 8388608 /* ContainsAnyFunctionType */) { + if (source.flags & 134217728 /* ContainsAnyFunctionType */) { return; } var typeParameters = context.typeParameters; @@ -20677,7 +23466,7 @@ var ts; } } } - else if (source.flags & 4096 /* Reference */ && target.flags & 4096 /* Reference */ && source.target === target.target) { + else if (source.flags & 131072 /* Reference */ && target.flags & 131072 /* Reference */ && source.target === target.target) { // If source and target are references to the same generic type, infer from type arguments var sourceTypes = source.typeArguments || emptyArray; var targetTypes = target.typeArguments || emptyArray; @@ -20686,22 +23475,14 @@ var ts; inferFromTypes(sourceTypes[i], targetTypes[i]); } } - else if (source.flags & 8192 /* Tuple */ && target.flags & 8192 /* Tuple */ && source.elementTypes.length === target.elementTypes.length) { - // If source and target are tuples of the same size, infer from element types - var sourceTypes = source.elementTypes; - var targetTypes = target.elementTypes; - for (var i = 0; i < sourceTypes.length; i++) { - inferFromTypes(sourceTypes[i], targetTypes[i]); - } - } - else if (target.flags & 49152 /* UnionOrIntersection */) { + else if (target.flags & 1572864 /* UnionOrIntersection */) { var targetTypes = target.types; var typeParameterCount = 0; var typeParameter = void 0; // First infer to each type in union or intersection that isn't a type parameter - for (var _b = 0, targetTypes_2 = targetTypes; _b < targetTypes_2.length; _b++) { - var t = targetTypes_2[_b]; - if (t.flags & 512 /* TypeParameter */ && ts.contains(context.typeParameters, t)) { + for (var _d = 0, targetTypes_2 = targetTypes; _d < targetTypes_2.length; _d++) { + var t = targetTypes_2[_d]; + if (t.flags & 16384 /* TypeParameter */ && ts.contains(context.typeParameters, t)) { typeParameter = t; typeParameterCount++; } @@ -20709,44 +23490,34 @@ var ts; inferFromTypes(source, t); } } - // Next, if target is a union type containing a single naked type parameter, make a - // secondary inference to that type parameter. We don't do this for intersection types - // because in a target type like Foo & T we don't know how which parts of the source type - // should be matched by Foo and which should be inferred to T. - if (target.flags & 16384 /* Union */ && typeParameterCount === 1) { + // Next, if target containings a single naked type parameter, make a secondary inference to that type + // parameter. This gives meaningful results for union types in co-variant positions and intersection + // types in contra-variant positions (such as callback parameters). + if (typeParameterCount === 1) { inferiority++; inferFromTypes(source, typeParameter); inferiority--; } } - else if (source.flags & 49152 /* UnionOrIntersection */) { - // Source is a union or intersection type, infer from each consituent type + else if (source.flags & 1572864 /* UnionOrIntersection */) { + // Source is a union or intersection type, infer from each constituent type var sourceTypes = source.types; - for (var _c = 0, sourceTypes_3 = sourceTypes; _c < sourceTypes_3.length; _c++) { - var sourceType = sourceTypes_3[_c]; + for (var _e = 0, sourceTypes_3 = sourceTypes; _e < sourceTypes_3.length; _e++) { + var sourceType = sourceTypes_3[_e]; inferFromTypes(sourceType, target); } } else { source = getApparentType(source); - if (source.flags & 80896 /* ObjectType */ && (target.flags & 4096 /* Reference */ && target.typeArguments || - target.flags & 8192 /* Tuple */ || - target.flags & 65536 /* Anonymous */ && target.symbol && target.symbol.flags & (8192 /* Method */ | 2048 /* TypeLiteral */ | 32 /* Class */))) { - // If source is an object type, and target is a type reference with type arguments, a tuple type, - // the type of a method, or a type literal, infer from members + if (source.flags & 2588672 /* ObjectType */) { if (isInProcess(source, target)) { return; } - // we delibirately limit the depth we examine to infer types: this speeds up the overall inference process - // and user rarely expects inferences to be made from the deeply nested constituents. - if (depth > maxDepth) { - return; - } if (isDeeplyNestedGeneric(source, sourceStack, depth) && isDeeplyNestedGeneric(target, targetStack, depth)) { return; } var key = source.id + "," + target.id; - if (ts.hasProperty(visited, key)) { + if (visited[key]) { return; } visited[key] = true; @@ -20760,9 +23531,7 @@ var ts; inferFromProperties(source, target); inferFromSignatures(source, target, 0 /* Call */); inferFromSignatures(source, target, 1 /* Construct */); - inferFromIndexTypes(source, target, 0 /* String */, 0 /* String */); - inferFromIndexTypes(source, target, 1 /* Number */, 1 /* Number */); - inferFromIndexTypes(source, target, 0 /* String */, 1 /* Number */); + inferFromIndexTypes(source, target); depth--; } } @@ -20796,19 +23565,29 @@ var ts; inferFromTypes(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target)); } } - function inferFromIndexTypes(source, target, sourceKind, targetKind) { - var targetIndexType = getIndexTypeOfType(target, targetKind); - if (targetIndexType) { - var sourceIndexType = getIndexTypeOfType(source, sourceKind); + function inferFromIndexTypes(source, target) { + var targetStringIndexType = getIndexTypeOfType(target, 0 /* String */); + if (targetStringIndexType) { + var sourceIndexType = getIndexTypeOfType(source, 0 /* String */) || + getImplicitIndexTypeOfType(source, 0 /* String */); if (sourceIndexType) { - inferFromTypes(sourceIndexType, targetIndexType); + inferFromTypes(sourceIndexType, targetStringIndexType); + } + } + var targetNumberIndexType = getIndexTypeOfType(target, 1 /* Number */); + if (targetNumberIndexType) { + var sourceIndexType = getIndexTypeOfType(source, 1 /* Number */) || + getIndexTypeOfType(source, 0 /* String */) || + getImplicitIndexTypeOfType(source, 1 /* Number */); + if (sourceIndexType) { + inferFromTypes(sourceIndexType, targetNumberIndexType); } } } } function typeIdenticalToSomeType(type, types) { - for (var _i = 0, types_7 = types; _i < types_7.length; _i++) { - var t = types_7[_i]; + for (var _i = 0, types_9 = types; _i < types_9.length; _i++) { + var t = types_9[_i]; if (isTypeIdenticalTo(t, type)) { return true; } @@ -20827,7 +23606,7 @@ var ts; reducedTypes.push(t); } } - return type.flags & 16384 /* Union */ ? getUnionType(reducedTypes, /*noSubtypeReduction*/ true) : getIntersectionType(reducedTypes); + return type.flags & 524288 /* Union */ ? getUnionType(reducedTypes) : getIntersectionType(reducedTypes); } function getInferenceCandidates(context, index) { var inferences = context.inferences[index]; @@ -20840,7 +23619,7 @@ var ts; var inferences = getInferenceCandidates(context, index); if (inferences.length) { // Infer widened union or supertype, or the unknown type for no common supertype - var unionOrSuperType = context.inferUnionTypes ? getUnionType(inferences) : getCommonSupertype(inferences); + var unionOrSuperType = context.inferUnionTypes ? getUnionType(inferences, /*subtypeReduction*/ true) : getCommonSupertype(inferences); inferredType = unionOrSuperType ? getWidenedType(unionOrSuperType) : unknownType; inferenceSucceeded = !!unionOrSuperType; } @@ -20882,7 +23661,7 @@ var ts; function getResolvedSymbol(node) { var links = getNodeLinks(node); if (!links.resolvedSymbol) { - links.resolvedSymbol = (!ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 /* Value */ | 1048576 /* ExportValue */, ts.Diagnostics.Cannot_find_name_0, node)) || unknownSymbol; + links.resolvedSymbol = !ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 /* Value */ | 1048576 /* ExportValue */, ts.Diagnostics.Cannot_find_name_0, node) || unknownSymbol; } return links.resolvedSymbol; } @@ -20892,10 +23671,10 @@ var ts; // The expression is restricted to a single identifier or a sequence of identifiers separated by periods while (node) { switch (node.kind) { - case 155 /* TypeQuery */: + case 158 /* TypeQuery */: return true; case 69 /* Identifier */: - case 136 /* QualifiedName */: + case 139 /* QualifiedName */: node = node.parent; continue; default: @@ -20904,234 +23683,749 @@ var ts; } ts.Debug.fail("should not get here"); } - function hasInitializer(node) { - return !!(node.initializer || ts.isBindingPattern(node.parent) && hasInitializer(node.parent.parent)); + // Return the flow cache key for a "dotted name" (i.e. a sequence of identifiers + // separated by dots). The key consists of the id of the symbol referenced by the + // leftmost identifier followed by zero or more property names separated by dots. + // The result is undefined if the reference isn't a dotted name. + function getFlowCacheKey(node) { + if (node.kind === 69 /* Identifier */) { + var symbol = getResolvedSymbol(node); + return symbol !== unknownSymbol ? "" + getSymbolId(symbol) : undefined; + } + if (node.kind === 97 /* ThisKeyword */) { + return "0"; + } + if (node.kind === 172 /* PropertyAccessExpression */) { + var key = getFlowCacheKey(node.expression); + return key && key + "." + node.name.text; + } + return undefined; } - // Check if a given variable is assigned within a given syntax node - function isVariableAssignedWithin(symbol, node) { - var links = getNodeLinks(node); - if (links.assignmentChecks) { - var cachedResult = links.assignmentChecks[symbol.id]; - if (cachedResult !== undefined) { - return cachedResult; + function getLeftmostIdentifierOrThis(node) { + switch (node.kind) { + case 69 /* Identifier */: + case 97 /* ThisKeyword */: + return node; + case 172 /* PropertyAccessExpression */: + return getLeftmostIdentifierOrThis(node.expression); + } + return undefined; + } + function isMatchingReference(source, target) { + switch (source.kind) { + case 69 /* Identifier */: + return target.kind === 69 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || + (target.kind === 218 /* VariableDeclaration */ || target.kind === 169 /* BindingElement */) && + getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target); + case 97 /* ThisKeyword */: + return target.kind === 97 /* ThisKeyword */; + case 172 /* PropertyAccessExpression */: + return target.kind === 172 /* PropertyAccessExpression */ && + source.name.text === target.name.text && + isMatchingReference(source.expression, target.expression); + } + return false; + } + function containsMatchingReference(source, target) { + while (source.kind === 172 /* PropertyAccessExpression */) { + source = source.expression; + if (isMatchingReference(source, target)) { + return true; } } - else { - links.assignmentChecks = {}; + return false; + } + // Return true if target is a property access xxx.yyy, source is a property access xxx.zzz, the declared + // type of xxx is a union type, and yyy is a property that is possibly a discriminant. We consider a property + // a possible discriminant if its type differs in the constituents of containing union type, and if every + // choice is a unit type or a union of unit types. + function containsMatchingReferenceDiscriminant(source, target) { + return target.kind === 172 /* PropertyAccessExpression */ && + containsMatchingReference(source, target.expression) && + isDiscriminantProperty(getDeclaredTypeOfReference(target.expression), target.name.text); + } + function getDeclaredTypeOfReference(expr) { + if (expr.kind === 69 /* Identifier */) { + return getTypeOfSymbol(getResolvedSymbol(expr)); } - return links.assignmentChecks[symbol.id] = isAssignedIn(node); - function isAssignedInBinaryExpression(node) { - if (node.operatorToken.kind >= 56 /* FirstAssignment */ && node.operatorToken.kind <= 68 /* LastAssignment */) { - var n = skipParenthesizedNodes(node.left); - if (n.kind === 69 /* Identifier */ && getResolvedSymbol(n) === symbol) { + if (expr.kind === 172 /* PropertyAccessExpression */) { + var type = getDeclaredTypeOfReference(expr.expression); + return type && getTypeOfPropertyOfType(type, expr.name.text); + } + return undefined; + } + function isDiscriminantProperty(type, name) { + if (type && type.flags & 524288 /* Union */) { + var prop = getPropertyOfType(type, name); + if (!prop) { + // The type may be a union that includes nullable or primitive types. If filtering + // those out produces a different type, get the property from that type instead. + // Effectively, we're checking if this *could* be a discriminant property once nullable + // and primitive types are removed by other type guards. + var filteredType = getTypeWithFacts(type, 4194304 /* Discriminatable */); + if (filteredType !== type && filteredType.flags & 524288 /* Union */) { + prop = getPropertyOfType(filteredType, name); + } + } + if (prop && prop.flags & 268435456 /* SyntheticProperty */) { + if (prop.isDiscriminantProperty === undefined) { + prop.isDiscriminantProperty = !prop.hasCommonType && + isUnitUnionType(getTypeOfSymbol(prop)); + } + return prop.isDiscriminantProperty; + } + } + return false; + } + function isOrContainsMatchingReference(source, target) { + return isMatchingReference(source, target) || containsMatchingReference(source, target); + } + function hasMatchingArgument(callExpression, reference) { + if (callExpression.arguments) { + for (var _i = 0, _a = callExpression.arguments; _i < _a.length; _i++) { + var argument = _a[_i]; + if (isOrContainsMatchingReference(reference, argument)) { return true; } } - return ts.forEachChild(node, isAssignedIn); } - function isAssignedInVariableDeclaration(node) { - if (!ts.isBindingPattern(node.name) && getSymbolOfNode(node) === symbol && hasInitializer(node)) { + if (callExpression.expression.kind === 172 /* PropertyAccessExpression */ && + isOrContainsMatchingReference(reference, callExpression.expression.expression)) { + return true; + } + return false; + } + function getFlowNodeId(flow) { + if (!flow.id) { + flow.id = nextFlowId; + nextFlowId++; + } + return flow.id; + } + function typeMaybeAssignableTo(source, target) { + if (!(source.flags & 524288 /* Union */)) { + return isTypeAssignableTo(source, target); + } + for (var _i = 0, _a = source.types; _i < _a.length; _i++) { + var t = _a[_i]; + if (isTypeAssignableTo(t, target)) { return true; } - return ts.forEachChild(node, isAssignedIn); - } - function isAssignedIn(node) { - switch (node.kind) { - case 184 /* BinaryExpression */: - return isAssignedInBinaryExpression(node); - case 214 /* VariableDeclaration */: - case 166 /* BindingElement */: - return isAssignedInVariableDeclaration(node); - case 164 /* ObjectBindingPattern */: - case 165 /* ArrayBindingPattern */: - case 167 /* ArrayLiteralExpression */: - case 168 /* ObjectLiteralExpression */: - case 169 /* PropertyAccessExpression */: - case 170 /* ElementAccessExpression */: - case 171 /* CallExpression */: - case 172 /* NewExpression */: - case 174 /* TypeAssertionExpression */: - case 192 /* AsExpression */: - case 175 /* ParenthesizedExpression */: - case 182 /* PrefixUnaryExpression */: - case 178 /* DeleteExpression */: - case 181 /* AwaitExpression */: - case 179 /* TypeOfExpression */: - case 180 /* VoidExpression */: - case 183 /* PostfixUnaryExpression */: - case 187 /* YieldExpression */: - case 185 /* ConditionalExpression */: - case 188 /* SpreadElementExpression */: - case 195 /* Block */: - case 196 /* VariableStatement */: - case 198 /* ExpressionStatement */: - case 199 /* IfStatement */: - case 200 /* DoStatement */: - case 201 /* WhileStatement */: - case 202 /* ForStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: - case 207 /* ReturnStatement */: - case 208 /* WithStatement */: - case 209 /* SwitchStatement */: - case 244 /* CaseClause */: - case 245 /* DefaultClause */: - case 210 /* LabeledStatement */: - case 211 /* ThrowStatement */: - case 212 /* TryStatement */: - case 247 /* CatchClause */: - case 236 /* JsxElement */: - case 237 /* JsxSelfClosingElement */: - case 241 /* JsxAttribute */: - case 242 /* JsxSpreadAttribute */: - case 238 /* JsxOpeningElement */: - case 243 /* JsxExpression */: - return ts.forEachChild(node, isAssignedIn); - } - return false; } + return false; } - // Get the narrowed type of a given symbol at a given location - function getNarrowedTypeOfSymbol(symbol, node) { - var type = getTypeOfSymbol(symbol); - // Only narrow when symbol is variable of type any or an object, union, or type parameter type - if (node && symbol.flags & 3 /* Variable */) { - if (isTypeAny(type) || type.flags & (80896 /* ObjectType */ | 16384 /* Union */ | 512 /* TypeParameter */)) { - var declaration = ts.getDeclarationOfKind(symbol, 214 /* VariableDeclaration */); - var top_1 = declaration && getDeclarationContainer(declaration); - var originalType = type; - var nodeStack = []; - loop: while (node.parent) { - var child = node; - node = node.parent; - switch (node.kind) { - case 199 /* IfStatement */: - case 185 /* ConditionalExpression */: - case 184 /* BinaryExpression */: - nodeStack.push({ node: node, child: child }); - break; - case 251 /* SourceFile */: - case 221 /* ModuleDeclaration */: - // Stop at the first containing file or module declaration - break loop; - } - if (node === top_1) { - break; - } - } - var nodes = void 0; - while (nodes = nodeStack.pop()) { - var node_1 = nodes.node, child = nodes.child; - switch (node_1.kind) { - case 199 /* IfStatement */: - // In a branch of an if statement, narrow based on controlling expression - if (child !== node_1.expression) { - type = narrowType(type, node_1.expression, /*assumeTrue*/ child === node_1.thenStatement); - } - break; - case 185 /* ConditionalExpression */: - // In a branch of a conditional expression, narrow based on controlling condition - if (child !== node_1.condition) { - type = narrowType(type, node_1.condition, /*assumeTrue*/ child === node_1.whenTrue); - } - break; - case 184 /* BinaryExpression */: - // In the right operand of an && or ||, narrow based on left operand - if (child === node_1.right) { - if (node_1.operatorToken.kind === 51 /* AmpersandAmpersandToken */) { - type = narrowType(type, node_1.left, /*assumeTrue*/ true); - } - else if (node_1.operatorToken.kind === 52 /* BarBarToken */) { - type = narrowType(type, node_1.left, /*assumeTrue*/ false); - } - } - break; - default: - ts.Debug.fail("Unreachable!"); - } - // Use original type if construct contains assignments to variable - if (type !== originalType && isVariableAssignedWithin(symbol, node_1)) { - type = originalType; - } - } - // Preserve old top-level behavior - if the branch is really an empty set, revert to prior type - if (type === emptyUnionType) { - type = originalType; - } + // Remove those constituent types of declaredType to which no constituent type of assignedType is assignable. + // For example, when a variable of type number | string | boolean is assigned a value of type number | boolean, + // we remove type string. + function getAssignmentReducedType(declaredType, assignedType) { + if (declaredType !== assignedType) { + var reducedType = filterType(declaredType, function (t) { return typeMaybeAssignableTo(assignedType, t); }); + if (reducedType !== neverType) { + return reducedType; } } + return declaredType; + } + function getTypeFactsOfTypes(types) { + var result = 0 /* None */; + for (var _i = 0, types_10 = types; _i < types_10.length; _i++) { + var t = types_10[_i]; + result |= getTypeFacts(t); + } + return result; + } + function isFunctionObjectType(type) { + // We do a quick check for a "bind" property before performing the more expensive subtype + // check. This gives us a quicker out in the common case where an object type is not a function. + var resolved = resolveStructuredTypeMembers(type); + return !!(resolved.callSignatures.length || resolved.constructSignatures.length || + resolved.members["bind"] && isTypeSubtypeOf(type, globalFunctionType)); + } + function getTypeFacts(type) { + var flags = type.flags; + if (flags & 2 /* String */) { + return strictNullChecks ? 4079361 /* StringStrictFacts */ : 4194049 /* StringFacts */; + } + if (flags & 32 /* StringLiteral */) { + return strictNullChecks ? + type === emptyStringType ? 3030785 /* EmptyStringStrictFacts */ : 1982209 /* NonEmptyStringStrictFacts */ : + type === emptyStringType ? 3145473 /* EmptyStringFacts */ : 4194049 /* NonEmptyStringFacts */; + } + if (flags & (4 /* Number */ | 16 /* Enum */)) { + return strictNullChecks ? 4079234 /* NumberStrictFacts */ : 4193922 /* NumberFacts */; + } + if (flags & (64 /* NumberLiteral */ | 256 /* EnumLiteral */)) { + var isZero = type === zeroType || type.flags & 256 /* EnumLiteral */ && type.text === "0"; + return strictNullChecks ? + isZero ? 3030658 /* ZeroStrictFacts */ : 1982082 /* NonZeroStrictFacts */ : + isZero ? 3145346 /* ZeroFacts */ : 4193922 /* NonZeroFacts */; + } + if (flags & 8 /* Boolean */) { + return strictNullChecks ? 4078980 /* BooleanStrictFacts */ : 4193668 /* BooleanFacts */; + } + if (flags & 136 /* BooleanLike */) { + return strictNullChecks ? + type === falseType ? 3030404 /* FalseStrictFacts */ : 1981828 /* TrueStrictFacts */ : + type === falseType ? 3145092 /* FalseFacts */ : 4193668 /* TrueFacts */; + } + if (flags & 2588672 /* ObjectType */) { + return isFunctionObjectType(type) ? + strictNullChecks ? 6164448 /* FunctionStrictFacts */ : 8376288 /* FunctionFacts */ : + strictNullChecks ? 6166480 /* ObjectStrictFacts */ : 8378320 /* ObjectFacts */; + } + if (flags & (1024 /* Void */ | 2048 /* Undefined */)) { + return 2457472 /* UndefinedFacts */; + } + if (flags & 4096 /* Null */) { + return 2340752 /* NullFacts */; + } + if (flags & 512 /* ESSymbol */) { + return strictNullChecks ? 1981320 /* SymbolStrictFacts */ : 4193160 /* SymbolFacts */; + } + if (flags & 16384 /* TypeParameter */) { + var constraint = getConstraintOfTypeParameter(type); + return getTypeFacts(constraint || emptyObjectType); + } + if (flags & 1572864 /* UnionOrIntersection */) { + return getTypeFactsOfTypes(type.types); + } + return 8388607 /* All */; + } + function getTypeWithFacts(type, include) { + return filterType(type, function (t) { return (getTypeFacts(t) & include) !== 0; }); + } + function getTypeWithDefault(type, defaultExpression) { + if (defaultExpression) { + var defaultType = checkExpression(defaultExpression); + return getUnionType([getTypeWithFacts(type, 131072 /* NEUndefined */), defaultType]); + } return type; - function narrowTypeByEquality(type, expr, assumeTrue) { - // Check that we have 'typeof ' on the left and string literal on the right - if (expr.left.kind !== 179 /* TypeOfExpression */ || expr.right.kind !== 9 /* StringLiteral */) { - return type; - } - var left = expr.left; - var right = expr.right; - if (left.expression.kind !== 69 /* Identifier */ || getResolvedSymbol(left.expression) !== symbol) { - return type; - } - if (expr.operatorToken.kind === 33 /* ExclamationEqualsEqualsToken */) { - assumeTrue = !assumeTrue; - } - var typeInfo = primitiveTypeInfo[right.text]; - // Don't narrow `undefined` - if (typeInfo && typeInfo.type === undefinedType) { - return type; - } - var flags; - if (typeInfo) { - flags = typeInfo.flags; - } - else { - assumeTrue = !assumeTrue; - flags = 132 /* NumberLike */ | 258 /* StringLike */ | 16777216 /* ESSymbol */ | 8 /* Boolean */; - } - // At this point we can bail if it's not a union - if (!(type.flags & 16384 /* Union */)) { - // If we're on the true branch and the type is a subtype, we should return the primitive type - if (assumeTrue && typeInfo && isTypeSubtypeOf(typeInfo.type, type)) { - return typeInfo.type; + } + function getTypeOfDestructuredProperty(type, name) { + var text = getTextOfPropertyName(name); + return getTypeOfPropertyOfType(type, text) || + isNumericLiteralName(text) && getIndexTypeOfType(type, 1 /* Number */) || + getIndexTypeOfType(type, 0 /* String */) || + unknownType; + } + function getTypeOfDestructuredArrayElement(type, index) { + return isTupleLikeType(type) && getTypeOfPropertyOfType(type, "" + index) || + checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false) || + unknownType; + } + function getTypeOfDestructuredSpreadElement(type) { + return createArrayType(checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false) || unknownType); + } + function getAssignedTypeOfBinaryExpression(node) { + return node.parent.kind === 170 /* ArrayLiteralExpression */ || node.parent.kind === 253 /* PropertyAssignment */ ? + getTypeWithDefault(getAssignedType(node), node.right) : + checkExpression(node.right); + } + function getAssignedTypeOfArrayLiteralElement(node, element) { + return getTypeOfDestructuredArrayElement(getAssignedType(node), ts.indexOf(node.elements, element)); + } + function getAssignedTypeOfSpreadElement(node) { + return getTypeOfDestructuredSpreadElement(getAssignedType(node.parent)); + } + function getAssignedTypeOfPropertyAssignment(node) { + return getTypeOfDestructuredProperty(getAssignedType(node.parent), node.name); + } + function getAssignedTypeOfShorthandPropertyAssignment(node) { + return getTypeWithDefault(getAssignedTypeOfPropertyAssignment(node), node.objectAssignmentInitializer); + } + function getAssignedType(node) { + var parent = node.parent; + switch (parent.kind) { + case 207 /* ForInStatement */: + return stringType; + case 208 /* ForOfStatement */: + return checkRightHandSideOfForOf(parent.expression) || unknownType; + case 187 /* BinaryExpression */: + return getAssignedTypeOfBinaryExpression(parent); + case 181 /* DeleteExpression */: + return undefinedType; + case 170 /* ArrayLiteralExpression */: + return getAssignedTypeOfArrayLiteralElement(parent, node); + case 191 /* SpreadElementExpression */: + return getAssignedTypeOfSpreadElement(parent); + case 253 /* PropertyAssignment */: + return getAssignedTypeOfPropertyAssignment(parent); + case 254 /* ShorthandPropertyAssignment */: + return getAssignedTypeOfShorthandPropertyAssignment(parent); + } + return unknownType; + } + function getInitialTypeOfBindingElement(node) { + var pattern = node.parent; + var parentType = getInitialType(pattern.parent); + var type = pattern.kind === 167 /* ObjectBindingPattern */ ? + getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : + !node.dotDotDotToken ? + getTypeOfDestructuredArrayElement(parentType, ts.indexOf(pattern.elements, node)) : + getTypeOfDestructuredSpreadElement(parentType); + return getTypeWithDefault(type, node.initializer); + } + function getTypeOfInitializer(node) { + // Return the cached type if one is available. If the type of the variable was inferred + // from its initializer, we'll already have cached the type. Otherwise we compute it now + // without caching such that transient types are reflected. + var links = getNodeLinks(node); + return links.resolvedType || checkExpression(node); + } + function getInitialTypeOfVariableDeclaration(node) { + if (node.initializer) { + return getTypeOfInitializer(node.initializer); + } + if (node.parent.parent.kind === 207 /* ForInStatement */) { + return stringType; + } + if (node.parent.parent.kind === 208 /* ForOfStatement */) { + return checkRightHandSideOfForOf(node.parent.parent.expression) || unknownType; + } + return unknownType; + } + function getInitialType(node) { + return node.kind === 218 /* VariableDeclaration */ ? + getInitialTypeOfVariableDeclaration(node) : + getInitialTypeOfBindingElement(node); + } + function getInitialOrAssignedType(node) { + return node.kind === 218 /* VariableDeclaration */ || node.kind === 169 /* BindingElement */ ? + getInitialType(node) : + getAssignedType(node); + } + function getReferenceCandidate(node) { + switch (node.kind) { + case 178 /* ParenthesizedExpression */: + return getReferenceCandidate(node.expression); + case 187 /* BinaryExpression */: + switch (node.operatorToken.kind) { + case 56 /* EqualsToken */: + return getReferenceCandidate(node.left); + case 24 /* CommaToken */: + return getReferenceCandidate(node.right); + } + } + return node; + } + function getTypeOfSwitchClause(clause) { + if (clause.kind === 249 /* CaseClause */) { + var caseType = checkExpression(clause.expression); + return isUnitType(caseType) ? caseType : undefined; + } + return neverType; + } + function getSwitchClauseTypes(switchStatement) { + var links = getNodeLinks(switchStatement); + if (!links.switchTypes) { + // If all case clauses specify expressions that have unit types, we return an array + // of those unit types. Otherwise we return an empty array. + var types = ts.map(switchStatement.caseBlock.clauses, getTypeOfSwitchClause); + links.switchTypes = !ts.contains(types, undefined) ? types : emptyArray; + } + return links.switchTypes; + } + function eachTypeContainedIn(source, types) { + return source.flags & 524288 /* Union */ ? !ts.forEach(source.types, function (t) { return !ts.contains(types, t); }) : ts.contains(types, source); + } + function isTypeSubsetOf(source, target) { + return source === target || target.flags & 524288 /* Union */ && isTypeSubsetOfUnion(source, target); + } + function isTypeSubsetOfUnion(source, target) { + if (source.flags & 524288 /* Union */) { + for (var _i = 0, _a = source.types; _i < _a.length; _i++) { + var t = _a[_i]; + if (!containsType(target.types, t)) { + return false; } - // If the active non-union type would be removed from a union by this type guard, return an empty union - return filterUnion(type) ? type : emptyUnionType; } - return getUnionType(ts.filter(type.types, filterUnion), /*noSubtypeReduction*/ true); - function filterUnion(type) { - return assumeTrue === !!(type.flags & flags); + return true; + } + if (source.flags & 256 /* EnumLiteral */ && target.flags & 16 /* Enum */ && source.baseType === target) { + return true; + } + return containsType(target.types, source); + } + function filterType(type, f) { + if (type.flags & 524288 /* Union */) { + var types = type.types; + var filtered = ts.filter(types, f); + return filtered === types ? type : getUnionTypeFromSortedList(filtered); + } + return f(type) ? type : neverType; + } + function isIncomplete(flowType) { + return flowType.flags === 0; + } + function getTypeFromFlowType(flowType) { + return flowType.flags === 0 ? flowType.type : flowType; + } + function createFlowType(type, incomplete) { + return incomplete ? { flags: 0, type: type } : type; + } + function getFlowTypeOfReference(reference, declaredType, assumeInitialized, flowContainer) { + var key; + if (!reference.flowNode || assumeInitialized && !(declaredType.flags & 4178943 /* Narrowable */)) { + return declaredType; + } + var initialType = assumeInitialized ? declaredType : includeFalsyTypes(declaredType, 2048 /* Undefined */); + var visitedFlowStart = visitedFlowCount; + var result = getTypeFromFlowType(getTypeAtFlowNode(reference.flowNode)); + visitedFlowCount = visitedFlowStart; + if (reference.parent.kind === 196 /* NonNullExpression */ && getTypeWithFacts(result, 524288 /* NEUndefinedOrNull */) === neverType) { + return declaredType; + } + return result; + function getTypeAtFlowNode(flow) { + while (true) { + if (flow.flags & 512 /* Shared */) { + // We cache results of flow type resolution for shared nodes that were previously visited in + // the same getFlowTypeOfReference invocation. A node is considered shared when it is the + // antecedent of more than one node. + for (var i = visitedFlowStart; i < visitedFlowCount; i++) { + if (visitedFlowNodes[i] === flow) { + return visitedFlowTypes[i]; + } + } + } + var type = void 0; + if (flow.flags & 16 /* Assignment */) { + type = getTypeAtFlowAssignment(flow); + if (!type) { + flow = flow.antecedent; + continue; + } + } + else if (flow.flags & 96 /* Condition */) { + type = getTypeAtFlowCondition(flow); + } + else if (flow.flags & 128 /* SwitchClause */) { + type = getTypeAtSwitchClause(flow); + } + else if (flow.flags & 12 /* Label */) { + if (flow.antecedents.length === 1) { + flow = flow.antecedents[0]; + continue; + } + type = flow.flags & 4 /* BranchLabel */ ? + getTypeAtFlowBranchLabel(flow) : + getTypeAtFlowLoopLabel(flow); + } + else if (flow.flags & 2 /* Start */) { + // Check if we should continue with the control flow of the containing function. + var container = flow.container; + if (container && container !== flowContainer && reference.kind !== 172 /* PropertyAccessExpression */) { + flow = container.flowNode; + continue; + } + // At the top of the flow we have the initial type. + type = initialType; + } + else { + // Unreachable code errors are reported in the binding phase. Here we + // simply return the declared type to reduce follow-on errors. + type = declaredType; + } + if (flow.flags & 512 /* Shared */) { + // Record visited node and the associated type in the cache. + visitedFlowNodes[visitedFlowCount] = flow; + visitedFlowTypes[visitedFlowCount] = type; + visitedFlowCount++; + } + return type; } } - function narrowTypeByAnd(type, expr, assumeTrue) { - if (assumeTrue) { - // The assumed result is true, therefore we narrow assuming each operand to be true. - return narrowType(narrowType(type, expr.left, /*assumeTrue*/ true), expr.right, /*assumeTrue*/ true); + function getTypeAtFlowAssignment(flow) { + var node = flow.node; + // Assignments only narrow the computed type if the declared type is a union type. Thus, we + // only need to evaluate the assigned type if the declared type is a union type. + if (isMatchingReference(reference, node)) { + return declaredType.flags & 524288 /* Union */ ? + getAssignmentReducedType(declaredType, getInitialOrAssignedType(node)) : + declaredType; } - else { - // The assumed result is false. This means either the first operand was false, or the first operand was true - // and the second operand was false. We narrow with those assumptions and union the two resulting types. - return getUnionType([ - narrowType(type, expr.left, /*assumeTrue*/ false), - narrowType(type, expr.right, /*assumeTrue*/ false) - ]); + // We didn't have a direct match. However, if the reference is a dotted name, this + // may be an assignment to a left hand part of the reference. For example, for a + // reference 'x.y.z', we may be at an assignment to 'x.y' or 'x'. In that case, + // return the declared type. + if (containsMatchingReference(reference, node)) { + return declaredType; } + // Assignment doesn't affect reference + return undefined; } - function narrowTypeByOr(type, expr, assumeTrue) { + function getTypeAtFlowCondition(flow) { + var flowType = getTypeAtFlowNode(flow.antecedent); + var type = getTypeFromFlowType(flowType); + if (type !== neverType) { + // If we have an antecedent type (meaning we're reachable in some way), we first + // attempt to narrow the antecedent type. If that produces the never type, and if + // the antecedent type is incomplete (i.e. a transient type in a loop), then we + // take the type guard as an indication that control *could* reach here once we + // have the complete type. We proceed by reverting to the declared type and then + // narrow that. + var assumeTrue = (flow.flags & 32 /* TrueCondition */) !== 0; + type = narrowType(type, flow.expression, assumeTrue); + if (type === neverType && isIncomplete(flowType)) { + type = narrowType(declaredType, flow.expression, assumeTrue); + } + } + return createFlowType(type, isIncomplete(flowType)); + } + function getTypeAtSwitchClause(flow) { + var flowType = getTypeAtFlowNode(flow.antecedent); + var type = getTypeFromFlowType(flowType); + var expr = flow.switchStatement.expression; + if (isMatchingReference(reference, expr)) { + type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); + } + else if (isMatchingReferenceDiscriminant(expr)) { + type = narrowTypeByDiscriminant(type, expr, function (t) { return narrowTypeBySwitchOnDiscriminant(t, flow.switchStatement, flow.clauseStart, flow.clauseEnd); }); + } + return createFlowType(type, isIncomplete(flowType)); + } + function getTypeAtFlowBranchLabel(flow) { + var antecedentTypes = []; + var subtypeReduction = false; + var seenIncomplete = false; + for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) { + var antecedent = _a[_i]; + var flowType = getTypeAtFlowNode(antecedent); + var type = getTypeFromFlowType(flowType); + // If the type at a particular antecedent path is the declared type and the + // reference is known to always be assigned (i.e. when declared and initial types + // are the same), there is no reason to process more antecedents since the only + // possible outcome is subtypes that will be removed in the final union type anyway. + if (type === declaredType && declaredType === initialType) { + return type; + } + if (!ts.contains(antecedentTypes, type)) { + antecedentTypes.push(type); + } + // If an antecedent type is not a subset of the declared type, we need to perform + // subtype reduction. This happens when a "foreign" type is injected into the control + // flow using the instanceof operator or a user defined type predicate. + if (!isTypeSubsetOf(type, declaredType)) { + subtypeReduction = true; + } + if (isIncomplete(flowType)) { + seenIncomplete = true; + } + } + return createFlowType(getUnionType(antecedentTypes, subtypeReduction), seenIncomplete); + } + function getTypeAtFlowLoopLabel(flow) { + // If we have previously computed the control flow type for the reference at + // this flow loop junction, return the cached type. + var id = getFlowNodeId(flow); + var cache = flowLoopCaches[id] || (flowLoopCaches[id] = ts.createMap()); + if (!key) { + key = getFlowCacheKey(reference); + } + if (cache[key]) { + return cache[key]; + } + // If this flow loop junction and reference are already being processed, return + // the union of the types computed for each branch so far, marked as incomplete. + // We should never see an empty array here because the first antecedent of a loop + // junction is always the non-looping control flow path that leads to the top. + for (var i = flowLoopStart; i < flowLoopCount; i++) { + if (flowLoopNodes[i] === flow && flowLoopKeys[i] === key) { + return createFlowType(getUnionType(flowLoopTypes[i]), /*incomplete*/ true); + } + } + // Add the flow loop junction and reference to the in-process stack and analyze + // each antecedent code path. + var antecedentTypes = []; + var subtypeReduction = false; + var firstAntecedentType; + flowLoopNodes[flowLoopCount] = flow; + flowLoopKeys[flowLoopCount] = key; + flowLoopTypes[flowLoopCount] = antecedentTypes; + for (var _i = 0, _a = flow.antecedents; _i < _a.length; _i++) { + var antecedent = _a[_i]; + flowLoopCount++; + var flowType = getTypeAtFlowNode(antecedent); + flowLoopCount--; + if (!firstAntecedentType) { + firstAntecedentType = flowType; + } + var type = getTypeFromFlowType(flowType); + // If we see a value appear in the cache it is a sign that control flow analysis + // was restarted and completed by checkExpressionCached. We can simply pick up + // the resulting type and bail out. + if (cache[key]) { + return cache[key]; + } + if (!ts.contains(antecedentTypes, type)) { + antecedentTypes.push(type); + } + // If an antecedent type is not a subset of the declared type, we need to perform + // subtype reduction. This happens when a "foreign" type is injected into the control + // flow using the instanceof operator or a user defined type predicate. + if (!isTypeSubsetOf(type, declaredType)) { + subtypeReduction = true; + } + // If the type at a particular antecedent path is the declared type there is no + // reason to process more antecedents since the only possible outcome is subtypes + // that will be removed in the final union type anyway. + if (type === declaredType) { + break; + } + } + // The result is incomplete if the first antecedent (the non-looping control flow path) + // is incomplete. + var result = getUnionType(antecedentTypes, subtypeReduction); + if (isIncomplete(firstAntecedentType)) { + return createFlowType(result, /*incomplete*/ true); + } + return cache[key] = result; + } + function isMatchingReferenceDiscriminant(expr) { + return expr.kind === 172 /* PropertyAccessExpression */ && + declaredType.flags & 524288 /* Union */ && + isMatchingReference(reference, expr.expression) && + isDiscriminantProperty(declaredType, expr.name.text); + } + function narrowTypeByDiscriminant(type, propAccess, narrowType) { + var propName = propAccess.name.text; + var propType = getTypeOfPropertyOfType(type, propName); + var narrowedPropType = propType && narrowType(propType); + return propType === narrowedPropType ? type : filterType(type, function (t) { return isTypeComparableTo(getTypeOfPropertyOfType(t, propName), narrowedPropType); }); + } + function narrowTypeByTruthiness(type, expr, assumeTrue) { + if (isMatchingReference(reference, expr)) { + return getTypeWithFacts(type, assumeTrue ? 1048576 /* Truthy */ : 2097152 /* Falsy */); + } + if (isMatchingReferenceDiscriminant(expr)) { + return narrowTypeByDiscriminant(type, expr, function (t) { return getTypeWithFacts(t, assumeTrue ? 1048576 /* Truthy */ : 2097152 /* Falsy */); }); + } + if (containsMatchingReferenceDiscriminant(reference, expr)) { + return declaredType; + } + return type; + } + function narrowTypeByBinaryExpression(type, expr, assumeTrue) { + switch (expr.operatorToken.kind) { + case 56 /* EqualsToken */: + return narrowTypeByTruthiness(type, expr.left, assumeTrue); + case 30 /* EqualsEqualsToken */: + case 31 /* ExclamationEqualsToken */: + case 32 /* EqualsEqualsEqualsToken */: + case 33 /* ExclamationEqualsEqualsToken */: + var operator_1 = expr.operatorToken.kind; + var left_1 = getReferenceCandidate(expr.left); + var right_1 = getReferenceCandidate(expr.right); + if (left_1.kind === 182 /* TypeOfExpression */ && right_1.kind === 9 /* StringLiteral */) { + return narrowTypeByTypeof(type, left_1, operator_1, right_1, assumeTrue); + } + if (right_1.kind === 182 /* TypeOfExpression */ && left_1.kind === 9 /* StringLiteral */) { + return narrowTypeByTypeof(type, right_1, operator_1, left_1, assumeTrue); + } + if (isMatchingReference(reference, left_1)) { + return narrowTypeByEquality(type, operator_1, right_1, assumeTrue); + } + if (isMatchingReference(reference, right_1)) { + return narrowTypeByEquality(type, operator_1, left_1, assumeTrue); + } + if (isMatchingReferenceDiscriminant(left_1)) { + return narrowTypeByDiscriminant(type, left_1, function (t) { return narrowTypeByEquality(t, operator_1, right_1, assumeTrue); }); + } + if (isMatchingReferenceDiscriminant(right_1)) { + return narrowTypeByDiscriminant(type, right_1, function (t) { return narrowTypeByEquality(t, operator_1, left_1, assumeTrue); }); + } + if (containsMatchingReferenceDiscriminant(reference, left_1) || containsMatchingReferenceDiscriminant(reference, right_1)) { + return declaredType; + } + break; + case 91 /* InstanceOfKeyword */: + return narrowTypeByInstanceof(type, expr, assumeTrue); + case 24 /* CommaToken */: + return narrowType(type, expr.right, assumeTrue); + } + return type; + } + function narrowTypeByEquality(type, operator, value, assumeTrue) { + if (type.flags & 1 /* Any */) { + return type; + } + if (operator === 31 /* ExclamationEqualsToken */ || operator === 33 /* ExclamationEqualsEqualsToken */) { + assumeTrue = !assumeTrue; + } + var valueType = checkExpression(value); + if (valueType.flags & 6144 /* Nullable */) { + if (!strictNullChecks) { + return type; + } + var doubleEquals = operator === 30 /* EqualsEqualsToken */ || operator === 31 /* ExclamationEqualsToken */; + var facts = doubleEquals ? + assumeTrue ? 65536 /* EQUndefinedOrNull */ : 524288 /* NEUndefinedOrNull */ : + value.kind === 93 /* NullKeyword */ ? + assumeTrue ? 32768 /* EQNull */ : 262144 /* NENull */ : + assumeTrue ? 16384 /* EQUndefined */ : 131072 /* NEUndefined */; + return getTypeWithFacts(type, facts); + } + if (type.flags & 2589191 /* NotUnionOrUnit */) { + return type; + } if (assumeTrue) { - // The assumed result is true. This means either the first operand was true, or the first operand was false - // and the second operand was true. We narrow with those assumptions and union the two resulting types. - return getUnionType([ - narrowType(type, expr.left, /*assumeTrue*/ true), - narrowType(type, expr.right, /*assumeTrue*/ true) - ]); + var narrowedType = filterType(type, function (t) { return areTypesComparable(t, valueType); }); + return narrowedType !== neverType ? narrowedType : type; } - else { - // The assumed result is false, therefore we narrow assuming each operand to be false. - return narrowType(narrowType(type, expr.left, /*assumeTrue*/ false), expr.right, /*assumeTrue*/ false); + return isUnitType(valueType) ? filterType(type, function (t) { return t !== valueType; }) : type; + } + function narrowTypeByTypeof(type, typeOfExpr, operator, literal, assumeTrue) { + // We have '==', '!=', '====', or !==' operator with 'typeof xxx' and string literal operands + var target = getReferenceCandidate(typeOfExpr.expression); + if (!isMatchingReference(reference, target)) { + // For a reference of the form 'x.y', a 'typeof x === ...' type guard resets the + // narrowed type of 'y' to its declared type. + if (containsMatchingReference(reference, target)) { + return declaredType; + } + return type; } + if (operator === 31 /* ExclamationEqualsToken */ || operator === 33 /* ExclamationEqualsEqualsToken */) { + assumeTrue = !assumeTrue; + } + if (assumeTrue && !(type.flags & 524288 /* Union */)) { + // We narrow a non-union type to an exact primitive type if the non-union type + // is a supertype of that primitive type. For example, type 'any' can be narrowed + // to one of the primitive types. + var targetType = typeofTypesByName[literal.text]; + if (targetType && isTypeSubtypeOf(targetType, type)) { + return targetType; + } + } + var facts = assumeTrue ? + typeofEQFacts[literal.text] || 64 /* TypeofEQHostObject */ : + typeofNEFacts[literal.text] || 8192 /* TypeofNEHostObject */; + return getTypeWithFacts(type, facts); + } + function narrowTypeBySwitchOnDiscriminant(type, switchStatement, clauseStart, clauseEnd) { + // We only narrow if all case expressions specify values with unit types + var switchTypes = getSwitchClauseTypes(switchStatement); + if (!switchTypes.length) { + return type; + } + var clauseTypes = switchTypes.slice(clauseStart, clauseEnd); + var hasDefaultClause = clauseStart === clauseEnd || ts.contains(clauseTypes, neverType); + var discriminantType = getUnionType(clauseTypes); + var caseType = discriminantType === neverType ? neverType : filterType(type, function (t) { return isTypeComparableTo(discriminantType, t); }); + if (!hasDefaultClause) { + return caseType; + } + var defaultType = filterType(type, function (t) { return !(isUnitType(t) && ts.contains(switchTypes, t)); }); + return caseType === neverType ? defaultType : getUnionType([caseType, defaultType]); } function narrowTypeByInstanceof(type, expr, assumeTrue) { - // Check that type is not any, assumed result is true, and we have variable symbol on the left - if (isTypeAny(type) || expr.left.kind !== 69 /* Identifier */ || getResolvedSymbol(expr.left) !== symbol) { + var left = getReferenceCandidate(expr.left); + if (!isMatchingReference(reference, left)) { + // For a reference of the form 'x.y', an 'x instanceof T' type guard resets the + // narrowed type of 'y' to its declared type. + if (containsMatchingReference(reference, left)) { + return declaredType; + } return type; } // Check that right operand is a function type with a prototype property @@ -21148,13 +24442,17 @@ var ts; targetType = prototypePropertyType; } } + // Don't narrow from 'any' if the target type is exactly 'Object' or 'Function' + if (isTypeAny(type) && (targetType === globalObjectType || targetType === globalFunctionType)) { + return type; + } if (!targetType) { // Target type is type of construct signature var constructSignatures = void 0; - if (rightType.flags & 2048 /* Interface */) { + if (rightType.flags & 65536 /* Interface */) { constructSignatures = resolveDeclaredMembers(rightType).declaredConstructSignatures; } - else if (rightType.flags & 65536 /* Anonymous */) { + else if (rightType.flags & 2097152 /* Anonymous */) { constructSignatures = getSignaturesOfType(rightType, 1 /* Construct */); } if (constructSignatures && constructSignatures.length) { @@ -21166,29 +24464,31 @@ var ts; } return type; } - function getNarrowedType(originalType, narrowedTypeCandidate, assumeTrue) { + function getNarrowedType(type, candidate, assumeTrue) { if (!assumeTrue) { - if (originalType.flags & 16384 /* Union */) { - return getUnionType(ts.filter(originalType.types, function (t) { return !isTypeSubtypeOf(t, narrowedTypeCandidate); })); - } - return originalType; + return filterType(type, function (t) { return !isTypeInstanceOf(t, candidate); }); } - // If the current type is a union type, remove all constituents that aren't assignable to target. If that produces - // 0 candidates, fall back to the assignability check - if (originalType.flags & 16384 /* Union */) { - var assignableConstituents = ts.filter(originalType.types, function (t) { return isTypeAssignableTo(t, narrowedTypeCandidate); }); - if (assignableConstituents.length) { - return getUnionType(assignableConstituents); + // If the current type is a union type, remove all constituents that couldn't be instances of + // the candidate type. If one or more constituents remain, return a union of those. + if (type.flags & 524288 /* Union */) { + var assignableType = filterType(type, function (t) { return isTypeInstanceOf(t, candidate); }); + if (assignableType !== neverType) { + return assignableType; } } - if (isTypeAssignableTo(narrowedTypeCandidate, originalType)) { - // Narrow to the target type if it's assignable to the current type - return narrowedTypeCandidate; - } - return originalType; + // If the candidate type is a subtype of the target type, narrow to the candidate type. + // Otherwise, if the target type is assignable to the candidate type, keep the target type. + // Otherwise, if the candidate type is assignable to the target type, narrow to the candidate + // type. Otherwise, the types are completely unrelated, so narrow to an intersection of the + // two types. + var targetType = type.flags & 16384 /* TypeParameter */ ? getApparentType(type) : type; + return isTypeSubtypeOf(candidate, type) ? candidate : + isTypeAssignableTo(type, candidate) ? type : + isTypeAssignableTo(candidate, targetType) ? candidate : + getIntersectionType([type, candidate]); } function narrowTypeByTypePredicate(type, callExpression, assumeTrue) { - if (type.flags & 1 /* Any */) { + if (!hasMatchingArgument(callExpression, reference)) { return type; } var signature = getResolvedSignature(callExpression); @@ -21196,60 +24496,51 @@ var ts; if (!predicate) { return type; } + // Don't narrow from 'any' if the predicate type is exactly 'Object' or 'Function' + if (isTypeAny(type) && (predicate.type === globalObjectType || predicate.type === globalFunctionType)) { + return type; + } if (ts.isIdentifierTypePredicate(predicate)) { - if (callExpression.arguments[predicate.parameterIndex] && - getSymbolAtTypePredicatePosition(callExpression.arguments[predicate.parameterIndex]) === symbol) { - return getNarrowedType(type, predicate.type, assumeTrue); + var predicateArgument = callExpression.arguments[predicate.parameterIndex]; + if (predicateArgument) { + if (isMatchingReference(reference, predicateArgument)) { + return getNarrowedType(type, predicate.type, assumeTrue); + } + if (containsMatchingReference(reference, predicateArgument)) { + return declaredType; + } } } else { var invokedExpression = skipParenthesizedNodes(callExpression.expression); - return narrowTypeByThisTypePredicate(type, predicate, invokedExpression, assumeTrue); - } - return type; - } - function narrowTypeByThisTypePredicate(type, predicate, invokedExpression, assumeTrue) { - if (invokedExpression.kind === 170 /* ElementAccessExpression */ || invokedExpression.kind === 169 /* PropertyAccessExpression */) { - var accessExpression = invokedExpression; - var possibleIdentifier = skipParenthesizedNodes(accessExpression.expression); - if (possibleIdentifier.kind === 69 /* Identifier */ && getSymbolAtTypePredicatePosition(possibleIdentifier) === symbol) { - return getNarrowedType(type, predicate.type, assumeTrue); + if (invokedExpression.kind === 173 /* ElementAccessExpression */ || invokedExpression.kind === 172 /* PropertyAccessExpression */) { + var accessExpression = invokedExpression; + var possibleReference = skipParenthesizedNodes(accessExpression.expression); + if (isMatchingReference(reference, possibleReference)) { + return getNarrowedType(type, predicate.type, assumeTrue); + } + if (containsMatchingReference(reference, possibleReference)) { + return declaredType; + } } } return type; } - function getSymbolAtTypePredicatePosition(expr) { - expr = skipParenthesizedNodes(expr); - switch (expr.kind) { - case 69 /* Identifier */: - case 169 /* PropertyAccessExpression */: - return getSymbolOfEntityNameOrPropertyAccessExpression(expr); - } - } // Narrow the given type based on the given expression having the assumed boolean value. The returned type // will be a subtype or the same type as the argument. function narrowType(type, expr, assumeTrue) { switch (expr.kind) { - case 171 /* CallExpression */: + case 69 /* Identifier */: + case 97 /* ThisKeyword */: + case 172 /* PropertyAccessExpression */: + return narrowTypeByTruthiness(type, expr, assumeTrue); + case 174 /* CallExpression */: return narrowTypeByTypePredicate(type, expr, assumeTrue); - case 175 /* ParenthesizedExpression */: + case 178 /* ParenthesizedExpression */: return narrowType(type, expr.expression, assumeTrue); - case 184 /* BinaryExpression */: - var operator = expr.operatorToken.kind; - if (operator === 32 /* EqualsEqualsEqualsToken */ || operator === 33 /* ExclamationEqualsEqualsToken */) { - return narrowTypeByEquality(type, expr, assumeTrue); - } - else if (operator === 51 /* AmpersandAmpersandToken */) { - return narrowTypeByAnd(type, expr, assumeTrue); - } - else if (operator === 52 /* BarBarToken */) { - return narrowTypeByOr(type, expr, assumeTrue); - } - else if (operator === 91 /* InstanceOfKeyword */) { - return narrowTypeByInstanceof(type, expr, assumeTrue); - } - break; - case 182 /* PrefixUnaryExpression */: + case 187 /* BinaryExpression */: + return narrowTypeByBinaryExpression(type, expr, assumeTrue); + case 185 /* PrefixUnaryExpression */: if (expr.operator === 49 /* ExclamationToken */) { return narrowType(type, expr.operand, !assumeTrue); } @@ -21258,12 +24549,82 @@ var ts; return type; } } + function getTypeOfSymbolAtLocation(symbol, location) { + // If we have an identifier or a property access at the given location, if the location is + // an dotted name expression, and if the location is not an assignment target, obtain the type + // of the expression (which will reflect control flow analysis). If the expression indeed + // resolved to the given symbol, return the narrowed type. + if (location.kind === 69 /* Identifier */) { + if (ts.isRightSideOfQualifiedNameOrPropertyAccess(location)) { + location = location.parent; + } + if (ts.isExpression(location) && !ts.isAssignmentTarget(location)) { + var type = checkExpression(location); + if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) { + return type; + } + } + } + // The location isn't a reference to the given symbol, meaning we're being asked + // a hypothetical question of what type the symbol would have if there was a reference + // to it at the given location. Since we have no control flow information for the + // hypotherical reference (control flow information is created and attached by the + // binder), we simply return the declared type of the symbol. + return getTypeOfSymbol(symbol); + } function skipParenthesizedNodes(expression) { - while (expression.kind === 175 /* ParenthesizedExpression */) { + while (expression.kind === 178 /* ParenthesizedExpression */) { expression = expression.expression; } return expression; } + function getControlFlowContainer(node) { + while (true) { + node = node.parent; + if (ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) || + node.kind === 226 /* ModuleBlock */ || + node.kind === 256 /* SourceFile */ || + node.kind === 145 /* PropertyDeclaration */) { + return node; + } + } + } + // Check if a parameter is assigned anywhere within its declaring function. + function isParameterAssigned(symbol) { + var func = ts.getRootDeclaration(symbol.valueDeclaration).parent; + var links = getNodeLinks(func); + if (!(links.flags & 4194304 /* AssignmentsMarked */)) { + links.flags |= 4194304 /* AssignmentsMarked */; + if (!hasParentWithAssignmentsMarked(func)) { + markParameterAssignments(func); + } + } + return symbol.isAssigned || false; + } + function hasParentWithAssignmentsMarked(node) { + while (true) { + node = node.parent; + if (!node) { + return false; + } + if (ts.isFunctionLike(node) && getNodeLinks(node).flags & 4194304 /* AssignmentsMarked */) { + return true; + } + } + } + function markParameterAssignments(node) { + if (node.kind === 69 /* Identifier */) { + if (ts.isAssignmentTarget(node)) { + var symbol = getResolvedSymbol(node); + if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 142 /* Parameter */) { + symbol.isAssigned = true; + } + } + } + else { + ts.forEachChild(node, markParameterAssignments); + } + } function checkIdentifier(node) { var symbol = getResolvedSymbol(node); // As noted in ECMAScript 6 language spec, arrow functions never have an arguments objects. @@ -21274,12 +24635,12 @@ var ts; // can explicitly bound arguments objects if (symbol === argumentsSymbol) { var container = ts.getContainingFunction(node); - if (container.kind === 177 /* ArrowFunction */) { + if (container.kind === 180 /* ArrowFunction */) { if (languageVersion < 2 /* ES6 */) { error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); } } - if (node.parserContextFlags & 8 /* Await */) { + if (node.flags & 33554432 /* AwaitContext */) { getNodeLinks(container).flags |= 8192 /* CaptureArguments */; } } @@ -21292,7 +24653,7 @@ var ts; // behavior of class names in ES6. if (languageVersion === 2 /* ES6 */ && localOrExportSymbol.flags & 32 /* Class */ - && localOrExportSymbol.valueDeclaration.kind === 217 /* ClassDeclaration */ + && localOrExportSymbol.valueDeclaration.kind === 221 /* ClassDeclaration */ && ts.nodeIsDecorated(localOrExportSymbol.valueDeclaration)) { var container = ts.getContainingClass(node); while (container !== undefined) { @@ -21307,7 +24668,43 @@ var ts; checkCollisionWithCapturedSuperVariable(node, node); checkCollisionWithCapturedThisVariable(node, node); checkNestedBlockScopedBinding(node, symbol); - return getNarrowedTypeOfSymbol(localOrExportSymbol, node); + var type = getTypeOfSymbol(localOrExportSymbol); + var declaration = localOrExportSymbol.valueDeclaration; + // We only narrow variables and parameters occurring in a non-assignment position. For all other + // entities we simply return the declared type. + if (!(localOrExportSymbol.flags & 3 /* Variable */) || ts.isAssignmentTarget(node) || !declaration) { + return type; + } + // The declaration container is the innermost function that encloses the declaration of the variable + // or parameter. The flow container is the innermost function starting with which we analyze the control + // flow graph to determine the control flow based type. + var isParameter = ts.getRootDeclaration(declaration).kind === 142 /* Parameter */; + var declarationContainer = getControlFlowContainer(declaration); + var flowContainer = getControlFlowContainer(node); + var isOuterVariable = flowContainer !== declarationContainer; + // When the control flow originates in a function expression or arrow function and we are referencing + // a const variable or parameter from an outer function, we extend the origin of the control flow + // analysis to include the immediately enclosing function. + while (flowContainer !== declarationContainer && + (flowContainer.kind === 179 /* FunctionExpression */ || flowContainer.kind === 180 /* ArrowFunction */) && + (isReadonlySymbol(localOrExportSymbol) || isParameter && !isParameterAssigned(localOrExportSymbol))) { + flowContainer = getControlFlowContainer(flowContainer); + } + // We only look for uninitialized variables in strict null checking mode, and only when we can analyze + // the entire control flow graph from the variable's declaration (i.e. when the flow container and + // declaration container are the same). + var assumeInitialized = !strictNullChecks || (type.flags & 1 /* Any */) !== 0 || isParameter || + isOuterVariable || ts.isInAmbientContext(declaration); + var flowType = getFlowTypeOfReference(node, type, assumeInitialized, flowContainer); + // A variable is considered uninitialized when it is possible to analyze the entire control flow graph + // from declaration to use, and when the variable's declared type doesn't include undefined but the + // control flow based type does include undefined. + if (!assumeInitialized && !(getFalsyFlags(type) & 2048 /* Undefined */) && getFalsyFlags(flowType) & 2048 /* Undefined */) { + error(node, ts.Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); + // Return the declared type to reduce follow-on errors + return type; + } + return flowType; } function isInsideFunction(node, threshold) { var current = node; @@ -21322,7 +24719,7 @@ var ts; function checkNestedBlockScopedBinding(node, symbol) { if (languageVersion >= 2 /* ES6 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || - symbol.valueDeclaration.parent.kind === 247 /* CatchClause */) { + symbol.valueDeclaration.parent.kind === 252 /* CatchClause */) { return; } // 1. walk from the use site up to the declaration and check @@ -21347,8 +24744,8 @@ var ts; } // mark variables that are declared in loop initializer and reassigned inside the body of ForStatement. // if body of ForStatement will be converted to function then we'll need a extra machinery to propagate reassigned values back. - if (container.kind === 202 /* ForStatement */ && - ts.getAncestor(symbol.valueDeclaration, 215 /* VariableDeclarationList */).parent === container && + if (container.kind === 206 /* ForStatement */ && + ts.getAncestor(symbol.valueDeclaration, 219 /* VariableDeclarationList */).parent === container && isAssignedInBodyOfForStatement(node, container)) { getNodeLinks(symbol.valueDeclaration).flags |= 2097152 /* NeedsLoopOutParameter */; } @@ -21362,15 +24759,15 @@ var ts; function isAssignedInBodyOfForStatement(node, container) { var current = node; // skip parenthesized nodes - while (current.parent.kind === 175 /* ParenthesizedExpression */) { + while (current.parent.kind === 178 /* ParenthesizedExpression */) { current = current.parent; } // check if node is used as LHS in some assignment expression var isAssigned = false; - if (current.parent.kind === 184 /* BinaryExpression */) { - isAssigned = current.parent.left === current && ts.isAssignmentOperator(current.parent.operatorToken.kind); + if (ts.isAssignmentTarget(current)) { + isAssigned = true; } - if ((current.parent.kind === 182 /* PrefixUnaryExpression */ || current.parent.kind === 183 /* PostfixUnaryExpression */)) { + else if ((current.parent.kind === 185 /* PrefixUnaryExpression */ || current.parent.kind === 186 /* PostfixUnaryExpression */)) { var expr = current.parent; isAssigned = expr.operator === 41 /* PlusPlusToken */ || expr.operator === 42 /* MinusMinusToken */; } @@ -21391,7 +24788,7 @@ var ts; } function captureLexicalThis(node, container) { getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 142 /* PropertyDeclaration */ || container.kind === 145 /* Constructor */) { + if (container.kind === 145 /* PropertyDeclaration */ || container.kind === 148 /* Constructor */) { var classNode = container.parent; getNodeLinks(classNode).flags |= 4 /* CaptureThis */; } @@ -21432,14 +24829,14 @@ var ts; var classSymbol = getSymbolOfNode(classDecl); var classInstanceType = getDeclaredTypeOfSymbol(classSymbol); var baseConstructorType = getBaseConstructorTypeOfClass(classInstanceType); - return baseConstructorType === nullType; + return baseConstructorType === nullWideningType; } function checkThisExpression(node) { // Stop at the first arrow function so that we can // tell whether 'this' needs to be captured. var container = ts.getThisContainer(node, /* includeArrowFunctions */ true); var needToCaptureLexicalThis = false; - if (container.kind === 145 /* Constructor */) { + if (container.kind === 148 /* Constructor */) { var containingClassDecl = container.parent; var baseTypeNode = ts.getClassExtendsHeritageClauseElement(containingClassDecl); // If a containing class does not have extends clause or the class extends null @@ -21460,89 +24857,102 @@ var ts; } } // Now skip arrow functions to get the "real" owner of 'this'. - if (container.kind === 177 /* ArrowFunction */) { + if (container.kind === 180 /* ArrowFunction */) { container = ts.getThisContainer(container, /* includeArrowFunctions */ false); // When targeting es6, arrow function lexically bind "this" so we do not need to do the work of binding "this" in emitted code needToCaptureLexicalThis = (languageVersion < 2 /* ES6 */); } switch (container.kind) { - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks break; - case 220 /* EnumDeclaration */: + case 224 /* EnumDeclaration */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location); // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks break; - case 145 /* Constructor */: + case 148 /* Constructor */: if (isInConstructorArgumentInitializer(node, container)) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments); } break; - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - if (container.flags & 64 /* Static */) { + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + if (container.flags & 32 /* Static */) { error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); } break; - case 137 /* ComputedPropertyName */: + case 140 /* ComputedPropertyName */: error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); break; } if (needToCaptureLexicalThis) { captureLexicalThis(node, container); } + if (ts.isFunctionLike(container) && + (!isInParameterInitializerBeforeContainingFunction(node) || getFunctionLikeThisParameter(container))) { + // Note: a parameter initializer should refer to class-this unless function-this is explicitly annotated. + // If this is a function in a JS file, it might be a class method. Check if it's the RHS + // of a x.prototype.y = function [name]() { .... } + if (container.kind === 179 /* FunctionExpression */ && + ts.isInJavaScriptFile(container.parent) && + ts.getSpecialPropertyAssignmentKind(container.parent) === 3 /* PrototypeProperty */) { + // Get the 'x' of 'x.prototype.y = f' (here, 'f' is 'container') + var className = container.parent // x.prototype.y = f + .left // x.prototype.y + .expression // x.prototype + .expression; // x + var classSymbol = checkExpression(className).symbol; + if (classSymbol && classSymbol.members && (classSymbol.flags & 16 /* Function */)) { + return getInferredClassType(classSymbol); + } + } + var thisType = getThisTypeOfDeclaration(container); + if (thisType) { + return thisType; + } + } if (ts.isClassLike(container.parent)) { var symbol = getSymbolOfNode(container.parent); - return container.flags & 64 /* Static */ ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType; + var type = container.flags & 32 /* Static */ ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType; + return getFlowTypeOfReference(node, type, /*assumeInitialized*/ true, /*flowContainer*/ undefined); } if (ts.isInJavaScriptFile(node)) { var type = getTypeForThisExpressionFromJSDoc(container); if (type && type !== unknownType) { return type; } - // If this is a function in a JS file, it might be a class method. Check if it's the RHS - // of a x.prototype.y = function [name]() { .... } - if (container.kind === 176 /* FunctionExpression */) { - if (ts.getSpecialPropertyAssignmentKind(container.parent) === 3 /* PrototypeProperty */) { - // Get the 'x' of 'x.prototype.y = f' (here, 'f' is 'container') - var className = container.parent // x.protoype.y = f - .left // x.prototype.y - .expression // x.prototype - .expression; // x - var classSymbol = checkExpression(className).symbol; - if (classSymbol && classSymbol.members && (classSymbol.flags & 16 /* Function */)) { - return getInferredClassType(classSymbol); - } - } - } + } + if (compilerOptions.noImplicitThis) { + // With noImplicitThis, functions may not reference 'this' if it has type 'any' + error(node, ts.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation); } return anyType; } function getTypeForThisExpressionFromJSDoc(node) { var typeTag = ts.getJSDocTypeTag(node); - if (typeTag && typeTag.typeExpression && typeTag.typeExpression.type && typeTag.typeExpression.type.kind === 264 /* JSDocFunctionType */) { + if (typeTag && typeTag.typeExpression && typeTag.typeExpression.type && typeTag.typeExpression.type.kind === 269 /* JSDocFunctionType */) { var jsDocFunctionType = typeTag.typeExpression.type; - if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 267 /* JSDocThisType */) { + if (jsDocFunctionType.parameters.length > 0 && jsDocFunctionType.parameters[0].type.kind === 272 /* JSDocThisType */) { return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type); } } } function isInConstructorArgumentInitializer(node, constructorDecl) { for (var n = node; n && n !== constructorDecl; n = n.parent) { - if (n.kind === 139 /* Parameter */) { + if (n.kind === 142 /* Parameter */) { return true; } } return false; } function checkSuperExpression(node) { - var isCallExpression = node.parent.kind === 171 /* CallExpression */ && node.parent.expression === node; + var isCallExpression = node.parent.kind === 174 /* CallExpression */ && node.parent.expression === node; var container = ts.getSuperContainer(node, /*stopOnFunctions*/ true); var needToCaptureLexicalThis = false; if (!isCallExpression) { // adjust the container reference in case if super is used inside arrow functions with arbitrary deep nesting - while (container && container.kind === 177 /* ArrowFunction */) { + while (container && container.kind === 180 /* ArrowFunction */) { container = ts.getSuperContainer(container, /*stopOnFunctions*/ true); needToCaptureLexicalThis = languageVersion < 2 /* ES6 */; } @@ -21556,16 +24966,16 @@ var ts; // [super.foo()]() {} // } var current = node; - while (current && current !== container && current.kind !== 137 /* ComputedPropertyName */) { + while (current && current !== container && current.kind !== 140 /* ComputedPropertyName */) { current = current.parent; } - if (current && current.kind === 137 /* ComputedPropertyName */) { + if (current && current.kind === 140 /* ComputedPropertyName */) { error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); } else if (isCallExpression) { error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); } - else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 168 /* ObjectLiteralExpression */)) { + else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 171 /* ObjectLiteralExpression */)) { error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); } else { @@ -21573,7 +24983,7 @@ var ts; } return unknownType; } - if ((container.flags & 64 /* Static */) || isCallExpression) { + if ((container.flags & 32 /* Static */) || isCallExpression) { nodeCheckFlag = 512 /* SuperStatic */; } else { @@ -21636,8 +25046,8 @@ var ts; // This helper creates an object with a "value" property that wraps the `super` property or indexed access for both get and set. // This is required for destructuring assignments, as a call expression cannot be used as the target of a destructuring assignment // while a property access can. - if (container.kind === 144 /* MethodDeclaration */ && container.flags & 256 /* Async */) { - if (ts.isSuperPropertyOrElementAccess(node.parent) && isAssignmentTarget(node.parent)) { + if (container.kind === 147 /* MethodDeclaration */ && container.flags & 256 /* Async */) { + if (ts.isSuperPropertyOrElementAccess(node.parent) && ts.isAssignmentTarget(node.parent)) { getNodeLinks(container).flags |= 4096 /* AsyncMethodWithSuperBinding */; } else { @@ -21650,7 +25060,7 @@ var ts; // in this case they should also use correct lexical this captureLexicalThis(node.parent, container); } - if (container.parent.kind === 168 /* ObjectLiteralExpression */) { + if (container.parent.kind === 171 /* ObjectLiteralExpression */) { if (languageVersion < 2 /* ES6 */) { error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); return unknownType; @@ -21670,14 +25080,14 @@ var ts; } return unknownType; } - if (container.kind === 145 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { + if (container.kind === 148 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { // issue custom error message for super property access in constructor arguments (to be aligned with old compiler) error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments); return unknownType; } return nodeCheckFlag === 512 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) - : baseClassType; + : getTypeWithThisArgument(baseClassType, classType.thisType); function isLegalUsageOfSuperExpression(container) { if (!container) { return false; @@ -21685,7 +25095,7 @@ var ts; if (isCallExpression) { // TS 1.0 SPEC (April 2014): 4.8.1 // Super calls are only permitted in constructors of derived classes - return container.kind === 145 /* Constructor */; + return container.kind === 148 /* Constructor */; } else { // TS 1.0 SPEC (April 2014) @@ -21693,76 +25103,124 @@ var ts; // - In a constructor, instance member function, instance member accessor, or instance member variable initializer where this references a derived class instance // - In a static member function or static member accessor // topmost container must be something that is directly nested in the class declaration\object literal expression - if (ts.isClassLike(container.parent) || container.parent.kind === 168 /* ObjectLiteralExpression */) { - if (container.flags & 64 /* Static */) { - return container.kind === 144 /* MethodDeclaration */ || - container.kind === 143 /* MethodSignature */ || - container.kind === 146 /* GetAccessor */ || - container.kind === 147 /* SetAccessor */; + if (ts.isClassLike(container.parent) || container.parent.kind === 171 /* ObjectLiteralExpression */) { + if (container.flags & 32 /* Static */) { + return container.kind === 147 /* MethodDeclaration */ || + container.kind === 146 /* MethodSignature */ || + container.kind === 149 /* GetAccessor */ || + container.kind === 150 /* SetAccessor */; } else { - return container.kind === 144 /* MethodDeclaration */ || - container.kind === 143 /* MethodSignature */ || - container.kind === 146 /* GetAccessor */ || - container.kind === 147 /* SetAccessor */ || - container.kind === 142 /* PropertyDeclaration */ || - container.kind === 141 /* PropertySignature */ || - container.kind === 145 /* Constructor */; + return container.kind === 147 /* MethodDeclaration */ || + container.kind === 146 /* MethodSignature */ || + container.kind === 149 /* GetAccessor */ || + container.kind === 150 /* SetAccessor */ || + container.kind === 145 /* PropertyDeclaration */ || + container.kind === 144 /* PropertySignature */ || + container.kind === 148 /* Constructor */; } } } return false; } } + function getContextualThisParameter(func) { + if (isContextSensitiveFunctionOrObjectLiteralMethod(func) && func.kind !== 180 /* ArrowFunction */) { + var contextualSignature = getContextualSignature(func); + if (contextualSignature) { + return contextualSignature.thisParameter; + } + } + return undefined; + } // Return contextual type of parameter or undefined if no contextual type is available function getContextuallyTypedParameterType(parameter) { var func = parameter.parent; - if (isFunctionExpressionOrArrowFunction(func) || ts.isObjectLiteralMethod(func)) { - if (isContextSensitive(func)) { - var contextualSignature = getContextualSignature(func); - if (contextualSignature) { - var funcHasRestParameters = ts.hasRestParameter(func); - var len = func.parameters.length - (funcHasRestParameters ? 1 : 0); - var indexOfParameter = ts.indexOf(func.parameters, parameter); - if (indexOfParameter < len) { - return getTypeAtPosition(contextualSignature, indexOfParameter); - } - // If last parameter is contextually rest parameter get its type - if (funcHasRestParameters && - indexOfParameter === (func.parameters.length - 1) && - isRestParameterIndex(contextualSignature, func.parameters.length - 1)) { - return getTypeOfSymbol(ts.lastOrUndefined(contextualSignature.parameters)); + if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { + var iife = ts.getImmediatelyInvokedFunctionExpression(func); + if (iife) { + var indexOfParameter = ts.indexOf(func.parameters, parameter); + if (iife.arguments && indexOfParameter < iife.arguments.length) { + if (parameter.dotDotDotToken) { + var restTypes = []; + for (var i = indexOfParameter; i < iife.arguments.length; i++) { + restTypes.push(getTypeOfExpression(iife.arguments[i])); + } + return createArrayType(getUnionType(restTypes)); } + var links = getNodeLinks(iife); + var cached = links.resolvedSignature; + links.resolvedSignature = anySignature; + var type = checkExpression(iife.arguments[indexOfParameter]); + links.resolvedSignature = cached; + return type; + } + } + var contextualSignature = getContextualSignature(func); + if (contextualSignature) { + var funcHasRestParameters = ts.hasRestParameter(func); + var len = func.parameters.length - (funcHasRestParameters ? 1 : 0); + var indexOfParameter = ts.indexOf(func.parameters, parameter); + if (indexOfParameter < len) { + return getTypeAtPosition(contextualSignature, indexOfParameter); + } + // If last parameter is contextually rest parameter get its type + if (funcHasRestParameters && + indexOfParameter === (func.parameters.length - 1) && + isRestParameterIndex(contextualSignature, func.parameters.length - 1)) { + return getTypeOfSymbol(ts.lastOrUndefined(contextualSignature.parameters)); } } } return undefined; } - // In a variable, parameter or property declaration with a type annotation, the contextual type of an initializer - // expression is the type of the variable, parameter or property. Otherwise, in a parameter declaration of a - // contextually typed function expression, the contextual type of an initializer expression is the contextual type - // of the parameter. Otherwise, in a variable or parameter declaration with a binding pattern name, the contextual - // type of an initializer expression is the type implied by the binding pattern. + // In a variable, parameter or property declaration with a type annotation, + // the contextual type of an initializer expression is the type of the variable, parameter or property. + // Otherwise, in a parameter declaration of a contextually typed function expression, + // the contextual type of an initializer expression is the contextual type of the parameter. + // Otherwise, in a variable or parameter declaration with a binding pattern name, + // the contextual type of an initializer expression is the type implied by the binding pattern. + // Otherwise, in a binding pattern inside a variable or parameter declaration, + // the contextual type of an initializer expression is the type annotation of the containing declaration, if present. function getContextualTypeForInitializerExpression(node) { var declaration = node.parent; if (node === declaration.initializer) { if (declaration.type) { return getTypeFromTypeNode(declaration.type); } - if (declaration.kind === 139 /* Parameter */) { + if (declaration.kind === 142 /* Parameter */) { var type = getContextuallyTypedParameterType(declaration); if (type) { return type; } } if (ts.isBindingPattern(declaration.name)) { - return getTypeFromBindingPattern(declaration.name, /*includePatternInType*/ true); + return getTypeFromBindingPattern(declaration.name, /*includePatternInType*/ true, /*reportErrors*/ false); + } + if (ts.isBindingPattern(declaration.parent)) { + var parentDeclaration = declaration.parent.parent; + var name_12 = declaration.propertyName || declaration.name; + if (ts.isVariableLike(parentDeclaration) && + parentDeclaration.type && + !ts.isBindingPattern(name_12)) { + var text = getTextOfPropertyName(name_12); + if (text) { + return getTypeOfPropertyOfType(getTypeFromTypeNode(parentDeclaration.type), text); + } + } } } return undefined; } function getContextualTypeForReturnExpression(node) { var func = ts.getContainingFunction(node); + if (ts.isAsyncFunctionLike(func)) { + var contextualReturnType = getContextualReturnType(func); + if (contextualReturnType) { + return getPromisedType(contextualReturnType); + } + return undefined; + } if (func && !func.asteriskToken) { return getContextualReturnType(func); } @@ -21782,7 +25240,7 @@ var ts; } function isInParameterInitializerBeforeContainingFunction(node) { while (node.parent && !ts.isFunctionLike(node.parent)) { - if (node.parent.kind === 139 /* Parameter */ && node.parent.initializer === node) { + if (node.parent.kind === 142 /* Parameter */ && node.parent.initializer === node) { return true; } node = node.parent; @@ -21793,8 +25251,8 @@ var ts; // If the containing function has a return type annotation, is a constructor, or is a get accessor whose // corresponding set accessor has a type annotation, return statements in the function are contextually typed if (functionDecl.type || - functionDecl.kind === 145 /* Constructor */ || - functionDecl.kind === 146 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 147 /* SetAccessor */))) { + functionDecl.kind === 148 /* Constructor */ || + functionDecl.kind === 149 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 150 /* SetAccessor */))) { return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl)); } // Otherwise, if the containing function is contextually typed by a function type with exactly one call signature @@ -21810,13 +25268,13 @@ var ts; var args = getEffectiveCallArguments(callTarget); var argIndex = ts.indexOf(args, arg); if (argIndex >= 0) { - var signature = getResolvedSignature(callTarget); + var signature = getResolvedOrAnySignature(callTarget); return getTypeAtPosition(signature, argIndex); } return undefined; } function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 173 /* TaggedTemplateExpression */) { + if (template.parent.kind === 176 /* TaggedTemplateExpression */) { return getContextualTypeForArgument(template.parent, substitutionExpression); } return undefined; @@ -21825,6 +25283,10 @@ var ts; var binaryExpression = node.parent; var operator = binaryExpression.operatorToken.kind; if (operator >= 56 /* FirstAssignment */ && operator <= 68 /* LastAssignment */) { + // Don't do this for special property assignments to avoid circularity + if (ts.getSpecialPropertyAssignmentKind(binaryExpression) !== 0 /* None */) { + return undefined; + } // In an assignment expression, the right operand is contextually typed by the type of the left operand. if (node === binaryExpression.right) { return checkExpression(binaryExpression.left); @@ -21850,14 +25312,14 @@ var ts; // is a union type, the mapping function is applied to each constituent type and a union of the resulting // types is returned. function applyToContextualType(type, mapper) { - if (!(type.flags & 16384 /* Union */)) { + if (!(type.flags & 524288 /* Union */)) { return mapper(type); } var types = type.types; var mappedType; var mappedTypes; - for (var _i = 0, types_8 = types; _i < types_8.length; _i++) { - var current = types_8[_i]; + for (var _i = 0, types_11 = types; _i < types_11.length; _i++) { + var current = types_11[_i]; var t = mapper(current); if (t) { if (!mappedType) { @@ -21875,23 +25337,16 @@ var ts; } function getTypeOfPropertyOfContextualType(type, name) { return applyToContextualType(type, function (t) { - var prop = t.flags & 130048 /* StructuredType */ ? getPropertyOfType(t, name) : undefined; + var prop = t.flags & 4161536 /* StructuredType */ ? getPropertyOfType(t, name) : undefined; return prop ? getTypeOfSymbol(prop) : undefined; }); } function getIndexTypeOfContextualType(type, kind) { return applyToContextualType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); }); } - function contextualTypeIsStringLiteralType(type) { - return !!(type.flags & 16384 /* Union */ ? ts.forEach(type.types, isStringLiteralType) : isStringLiteralType(type)); - } // Return true if the given contextual type is a tuple-like type function contextualTypeIsTupleLikeType(type) { - return !!(type.flags & 16384 /* Union */ ? ts.forEach(type.types, isTupleLikeType) : isTupleLikeType(type)); - } - // Return true if the given contextual type provides an index signature of the given kind - function contextualTypeHasIndexSignature(type, kind) { - return !!(type.flags & 16384 /* Union */ ? ts.forEach(type.types, function (t) { return getIndexTypeOfStructuredType(t, kind); }) : getIndexTypeOfStructuredType(type, kind)); + return !!(type.flags & 524288 /* Union */ ? ts.forEach(type.types, isTupleLikeType) : isTupleLikeType(type)); } // In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of // the matching property in T, if one exists. Otherwise, it is the type of the numeric index signature in T, if one @@ -21947,13 +25402,13 @@ var ts; var kind = attribute.kind; var jsxElement = attribute.parent; var attrsType = getJsxElementAttributesType(jsxElement); - if (attribute.kind === 241 /* JsxAttribute */) { + if (attribute.kind === 246 /* JsxAttribute */) { if (!attrsType || isTypeAny(attrsType)) { return undefined; } return getTypeOfPropertyOfType(attrsType, attribute.name.text); } - else if (attribute.kind === 242 /* JsxSpreadAttribute */) { + else if (attribute.kind === 247 /* JsxSpreadAttribute */) { return attrsType; } ts.Debug.fail("Expected JsxAttribute or JsxSpreadAttribute, got ts.SyntaxKind[" + kind + "]"); @@ -21973,7 +25428,7 @@ var ts; * Otherwise this may not be very useful. * * In cases where you *are* working on this function, you should understand - * when it is appropriate to use 'getContextualType' and 'getApparentTypeOfContetxualType'. + * when it is appropriate to use 'getContextualType' and 'getApparentTypeOfContextualType'. * * - Use 'getContextualType' when you are simply going to propagate the result to the expression. * - Use 'getApparentTypeOfContextualType' when you're going to need the members of the type. @@ -21991,44 +25446,68 @@ var ts; } var parent = node.parent; switch (parent.kind) { - case 214 /* VariableDeclaration */: - case 139 /* Parameter */: - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - case 166 /* BindingElement */: + case 218 /* VariableDeclaration */: + case 142 /* Parameter */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + case 169 /* BindingElement */: return getContextualTypeForInitializerExpression(node); - case 177 /* ArrowFunction */: - case 207 /* ReturnStatement */: + case 180 /* ArrowFunction */: + case 211 /* ReturnStatement */: return getContextualTypeForReturnExpression(node); - case 187 /* YieldExpression */: + case 190 /* YieldExpression */: return getContextualTypeForYieldOperand(parent); - case 171 /* CallExpression */: - case 172 /* NewExpression */: + case 174 /* CallExpression */: + case 175 /* NewExpression */: return getContextualTypeForArgument(parent, node); - case 174 /* TypeAssertionExpression */: - case 192 /* AsExpression */: + case 177 /* TypeAssertionExpression */: + case 195 /* AsExpression */: return getTypeFromTypeNode(parent.type); - case 184 /* BinaryExpression */: + case 187 /* BinaryExpression */: return getContextualTypeForBinaryOperand(node); - case 248 /* PropertyAssignment */: + case 253 /* PropertyAssignment */: return getContextualTypeForObjectLiteralElement(parent); - case 167 /* ArrayLiteralExpression */: + case 170 /* ArrayLiteralExpression */: return getContextualTypeForElementExpression(node); - case 185 /* ConditionalExpression */: + case 188 /* ConditionalExpression */: return getContextualTypeForConditionalOperand(node); - case 193 /* TemplateSpan */: - ts.Debug.assert(parent.parent.kind === 186 /* TemplateExpression */); + case 197 /* TemplateSpan */: + ts.Debug.assert(parent.parent.kind === 189 /* TemplateExpression */); return getContextualTypeForSubstitutionExpression(parent.parent, node); - case 175 /* ParenthesizedExpression */: + case 178 /* ParenthesizedExpression */: return getContextualType(parent); - case 243 /* JsxExpression */: + case 248 /* JsxExpression */: return getContextualType(parent); - case 241 /* JsxAttribute */: - case 242 /* JsxSpreadAttribute */: + case 246 /* JsxAttribute */: + case 247 /* JsxSpreadAttribute */: return getContextualTypeForJsxAttribute(parent); } return undefined; } + function isLiteralTypeLocation(node) { + var parent = node.parent; + switch (parent.kind) { + case 187 /* BinaryExpression */: + switch (parent.operatorToken.kind) { + case 32 /* EqualsEqualsEqualsToken */: + case 33 /* ExclamationEqualsEqualsToken */: + case 30 /* EqualsEqualsToken */: + case 31 /* ExclamationEqualsToken */: + return true; + } + break; + case 188 /* ConditionalExpression */: + return (node === parent.whenTrue || + node === parent.whenFalse) && + isLiteralTypeLocation(parent); + case 178 /* ParenthesizedExpression */: + return isLiteralTypeLocation(parent); + case 249 /* CaseClause */: + case 166 /* LiteralType */: + return true; + } + return false; + } // If the given type is an object or union type, if that type has a single signature, and if // that signature is non-generic, return the signature. Otherwise return undefined. function getNonGenericSignature(type) { @@ -22041,7 +25520,7 @@ var ts; } } function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 176 /* FunctionExpression */ || node.kind === 177 /* ArrowFunction */; + return node.kind === 179 /* FunctionExpression */ || node.kind === 180 /* ArrowFunction */; } function getContextualSignatureForFunctionLikeDeclaration(node) { // Only function expressions, arrow functions, and object literal methods are contextually typed. @@ -22049,33 +25528,36 @@ var ts; ? getContextualSignature(node) : undefined; } + function getContextualTypeForFunctionLikeDeclaration(node) { + return ts.isObjectLiteralMethod(node) ? + getContextualTypeForObjectLiteralMethod(node) : + getApparentTypeOfContextualType(node); + } // Return the contextual signature for a given expression node. A contextual type provides a // contextual signature if it has a single call signature and if that call signature is non-generic. // If the contextual type is a union type, get the signature from each type possible and if they are // all identical ignoring their return type, the result is same signature but with return type as // union type of return types from these signatures function getContextualSignature(node) { - ts.Debug.assert(node.kind !== 144 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); - var type = ts.isObjectLiteralMethod(node) - ? getContextualTypeForObjectLiteralMethod(node) - : getApparentTypeOfContextualType(node); + ts.Debug.assert(node.kind !== 147 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + var type = getContextualTypeForFunctionLikeDeclaration(node); if (!type) { return undefined; } - if (!(type.flags & 16384 /* Union */)) { + if (!(type.flags & 524288 /* Union */)) { return getNonGenericSignature(type); } var signatureList; var types = type.types; - for (var _i = 0, types_9 = types; _i < types_9.length; _i++) { - var current = types_9[_i]; + for (var _i = 0, types_12 = types; _i < types_12.length; _i++) { + var current = types_12[_i]; var signature = getNonGenericSignature(current); if (signature) { if (!signatureList) { // This signature will contribute to contextual union signature signatureList = [signature]; } - else if (!compareSignaturesIdentical(signatureList[0], signature, /*partialMatch*/ false, /*ignoreReturnTypes*/ true, compareTypesIdentical)) { + else if (!compareSignaturesIdentical(signatureList[0], signature, /*partialMatch*/ false, /*ignoreThisTypes*/ true, /*ignoreReturnTypes*/ true, compareTypesIdentical)) { // Signatures aren't identical, do not use return undefined; } @@ -22113,22 +25595,6 @@ var ts; function isInferentialContext(mapper) { return mapper && mapper.context; } - // A node is an assignment target if it is on the left hand side of an '=' token, if it is parented by a property - // assignment in an object literal that is an assignment target, or if it is parented by an array literal that is - // an assignment target. Examples include 'a = xxx', '{ p: a } = xxx', '[{ p: a}] = xxx'. - function isAssignmentTarget(node) { - var parent = node.parent; - if (parent.kind === 184 /* BinaryExpression */ && parent.operatorToken.kind === 56 /* EqualsToken */ && parent.left === node) { - return true; - } - if (parent.kind === 248 /* PropertyAssignment */) { - return isAssignmentTarget(parent.parent); - } - if (parent.kind === 167 /* ArrayLiteralExpression */) { - return isAssignmentTarget(parent); - } - return false; - } function checkSpreadElementExpression(node, contextualMapper) { // It is usually not safe to call checkExpressionCached if we can be contextually typing. // You can tell that we are contextually typing because of the contextualMapper parameter. @@ -22140,17 +25606,17 @@ var ts; return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, /*allowStringInput*/ false); } function hasDefaultValue(node) { - return (node.kind === 166 /* BindingElement */ && !!node.initializer) || - (node.kind === 184 /* BinaryExpression */ && node.operatorToken.kind === 56 /* EqualsToken */); + return (node.kind === 169 /* BindingElement */ && !!node.initializer) || + (node.kind === 187 /* BinaryExpression */ && node.operatorToken.kind === 56 /* EqualsToken */); } function checkArrayLiteral(node, contextualMapper) { var elements = node.elements; var hasSpreadElement = false; var elementTypes = []; - var inDestructuringPattern = isAssignmentTarget(node); + var inDestructuringPattern = ts.isAssignmentTarget(node); for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) { var e = elements_1[_i]; - if (inDestructuringPattern && e.kind === 188 /* SpreadElementExpression */) { + if (inDestructuringPattern && e.kind === 191 /* SpreadElementExpression */) { // Given the following situation: // var c: {}; // [...c] = ["", 0]; @@ -22174,13 +25640,13 @@ var ts; var type = checkExpression(e, contextualMapper); elementTypes.push(type); } - hasSpreadElement = hasSpreadElement || e.kind === 188 /* SpreadElementExpression */; + hasSpreadElement = hasSpreadElement || e.kind === 191 /* SpreadElementExpression */; } if (!hasSpreadElement) { // If array literal is actually a destructuring pattern, mark it as an implied type. We do this such // that we get the same behavior for "var [x, y] = []" and "[x, y] = []". if (inDestructuringPattern && elementTypes.length) { - var type = createNewTupleType(elementTypes); + var type = cloneTypeReference(createTupleType(elementTypes)); type.pattern = node; return type; } @@ -22189,15 +25655,15 @@ var ts; var pattern = contextualType.pattern; // If array literal is contextually typed by a binding pattern or an assignment pattern, pad the resulting // tuple type with the corresponding binding or assignment element types to make the lengths equal. - if (pattern && (pattern.kind === 165 /* ArrayBindingPattern */ || pattern.kind === 167 /* ArrayLiteralExpression */)) { + if (pattern && (pattern.kind === 168 /* ArrayBindingPattern */ || pattern.kind === 170 /* ArrayLiteralExpression */)) { var patternElements = pattern.elements; for (var i = elementTypes.length; i < patternElements.length; i++) { var patternElement = patternElements[i]; if (hasDefaultValue(patternElement)) { - elementTypes.push(contextualType.elementTypes[i]); + elementTypes.push(contextualType.typeArguments[i]); } else { - if (patternElement.kind !== 190 /* OmittedExpression */) { + if (patternElement.kind !== 193 /* OmittedExpression */) { error(patternElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } elementTypes.push(unknownType); @@ -22209,18 +25675,20 @@ var ts; } } } - return createArrayType(elementTypes.length ? getUnionType(elementTypes) : undefinedType); + return createArrayType(elementTypes.length ? + getUnionType(elementTypes, /*subtypeReduction*/ true) : + strictNullChecks ? neverType : undefinedWideningType); } function isNumericName(name) { - return name.kind === 137 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text); + return name.kind === 140 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text); } function isNumericComputedName(name) { // It seems odd to consider an expression of type Any to result in a numeric name, // but this behavior is consistent with checkIndexedAccess - return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 132 /* NumberLike */); + return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 340 /* NumberLike */); } function isTypeAnyOrAllConstituentTypesHaveKind(type, kind) { - return isTypeAny(type) || allConstituentTypesHaveKind(type, kind); + return isTypeAny(type) || isTypeOfKind(type, kind); } function isNumericLiteralName(name) { // The intent of numeric names is that @@ -22252,7 +25720,7 @@ var ts; links.resolvedType = checkExpression(node.expression); // This will allow types number, string, symbol or any. It will also allow enums, the unknown // type, and any union of these types (like string | number). - if (!isTypeAnyOrAllConstituentTypesHaveKind(links.resolvedType, 132 /* NumberLike */ | 258 /* StringLike */ | 16777216 /* ESSymbol */)) { + if (!isTypeAnyOrAllConstituentTypesHaveKind(links.resolvedType, 340 /* NumberLike */ | 34 /* StringLike */ | 512 /* ESSymbol */)) { error(node, ts.Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any); } else { @@ -22261,32 +25729,44 @@ var ts; } return links.resolvedType; } + function getObjectLiteralIndexInfo(node, properties, kind) { + var propTypes = []; + for (var i = 0; i < properties.length; i++) { + if (kind === 0 /* String */ || isNumericName(node.properties[i].name)) { + propTypes.push(getTypeOfSymbol(properties[i])); + } + } + var unionType = propTypes.length ? getUnionType(propTypes, /*subtypeReduction*/ true) : undefinedType; + return createIndexInfo(unionType, /*isReadonly*/ false); + } function checkObjectLiteral(node, contextualMapper) { - var inDestructuringPattern = isAssignmentTarget(node); + var inDestructuringPattern = ts.isAssignmentTarget(node); // Grammar checking checkGrammarObjectLiteralExpression(node, inDestructuringPattern); - var propertiesTable = {}; + var propertiesTable = ts.createMap(); var propertiesArray = []; var contextualType = getApparentTypeOfContextualType(node); var contextualTypeHasPattern = contextualType && contextualType.pattern && - (contextualType.pattern.kind === 164 /* ObjectBindingPattern */ || contextualType.pattern.kind === 168 /* ObjectLiteralExpression */); + (contextualType.pattern.kind === 167 /* ObjectBindingPattern */ || contextualType.pattern.kind === 171 /* ObjectLiteralExpression */); var typeFlags = 0; var patternWithComputedProperties = false; + var hasComputedStringProperty = false; + var hasComputedNumberProperty = false; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var memberDecl = _a[_i]; var member = memberDecl.symbol; - if (memberDecl.kind === 248 /* PropertyAssignment */ || - memberDecl.kind === 249 /* ShorthandPropertyAssignment */ || + if (memberDecl.kind === 253 /* PropertyAssignment */ || + memberDecl.kind === 254 /* ShorthandPropertyAssignment */ || ts.isObjectLiteralMethod(memberDecl)) { var type = void 0; - if (memberDecl.kind === 248 /* PropertyAssignment */) { + if (memberDecl.kind === 253 /* PropertyAssignment */) { type = checkPropertyAssignment(memberDecl, contextualMapper); } - else if (memberDecl.kind === 144 /* MethodDeclaration */) { + else if (memberDecl.kind === 147 /* MethodDeclaration */) { type = checkObjectLiteralMethod(memberDecl, contextualMapper); } else { - ts.Debug.assert(memberDecl.kind === 249 /* ShorthandPropertyAssignment */); + ts.Debug.assert(memberDecl.kind === 254 /* ShorthandPropertyAssignment */); type = checkExpression(memberDecl.name, contextualMapper); } typeFlags |= type.flags; @@ -22294,8 +25774,8 @@ var ts; if (inDestructuringPattern) { // If object literal is an assignment pattern and if the assignment pattern specifies a default value // for the property, make the property optional. - var isOptional = (memberDecl.kind === 248 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) || - (memberDecl.kind === 249 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer); + var isOptional = (memberDecl.kind === 253 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer)) || + (memberDecl.kind === 254 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer); if (isOptional) { prop.flags |= 536870912 /* Optional */; } @@ -22303,7 +25783,7 @@ var ts; patternWithComputedProperties = true; } } - else if (contextualTypeHasPattern && !(contextualType.flags & 67108864 /* ObjectLiteralPatternWithComputedProperties */)) { + else if (contextualTypeHasPattern && !(contextualType.flags & 536870912 /* ObjectLiteralPatternWithComputedProperties */)) { // If object literal is contextually typed by the implied type of a binding pattern, and if the // binding pattern specifies a default value for the property, make the property optional. var impliedProp = getPropertyOfType(contextualType, member.name); @@ -22329,10 +25809,18 @@ var ts; // an ordinary function declaration(section 6.1) with no parameters. // A set accessor declaration is processed in the same manner // as an ordinary function declaration with a single parameter and a Void return type. - ts.Debug.assert(memberDecl.kind === 146 /* GetAccessor */ || memberDecl.kind === 147 /* SetAccessor */); + ts.Debug.assert(memberDecl.kind === 149 /* GetAccessor */ || memberDecl.kind === 150 /* SetAccessor */); checkAccessorDeclaration(memberDecl); } - if (!ts.hasDynamicName(memberDecl)) { + if (ts.hasDynamicName(memberDecl)) { + if (isNumericName(memberDecl.name)) { + hasComputedNumberProperty = true; + } + else { + hasComputedStringProperty = true; + } + } + else { propertiesTable[member.name] = member; } propertiesArray.push(member); @@ -22342,7 +25830,7 @@ var ts; if (contextualTypeHasPattern) { for (var _b = 0, _c = getPropertiesOfType(contextualType); _b < _c.length; _b++) { var prop = _c[_b]; - if (!ts.hasProperty(propertiesTable, prop.name)) { + if (!propertiesTable[prop.name]) { if (!(prop.flags & 536870912 /* Optional */)) { error(prop.valueDeclaration || prop.bindingElement, ts.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } @@ -22351,37 +25839,15 @@ var ts; } } } - var stringIndexType = getIndexType(0 /* String */); - var numberIndexType = getIndexType(1 /* Number */); - var result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexType, numberIndexType); - var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 1048576 /* FreshObjectLiteral */; - result.flags |= 524288 /* ObjectLiteral */ | 4194304 /* ContainsObjectLiteral */ | freshObjectLiteralFlag | (typeFlags & 14680064 /* PropagatingFlags */) | (patternWithComputedProperties ? 67108864 /* ObjectLiteralPatternWithComputedProperties */ : 0); + var stringIndexInfo = hasComputedStringProperty ? getObjectLiteralIndexInfo(node, propertiesArray, 0 /* String */) : undefined; + var numberIndexInfo = hasComputedNumberProperty ? getObjectLiteralIndexInfo(node, propertiesArray, 1 /* Number */) : undefined; + var result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo); + var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 16777216 /* FreshObjectLiteral */; + result.flags |= 8388608 /* ObjectLiteral */ | 67108864 /* ContainsObjectLiteral */ | freshObjectLiteralFlag | (typeFlags & 234881024 /* PropagatingFlags */) | (patternWithComputedProperties ? 536870912 /* ObjectLiteralPatternWithComputedProperties */ : 0); if (inDestructuringPattern) { result.pattern = node; } return result; - function getIndexType(kind) { - if (contextualType && contextualTypeHasIndexSignature(contextualType, kind)) { - var propTypes = []; - for (var i = 0; i < propertiesArray.length; i++) { - var propertyDecl = node.properties[i]; - if (kind === 0 /* String */ || isNumericName(propertyDecl.name)) { - // Do not call getSymbolOfNode(propertyDecl), as that will get the - // original symbol for the node. We actually want to get the symbol - // created by checkObjectLiteral, since that will be appropriately - // contextually typed and resolved. - var type = getTypeOfSymbol(propertiesArray[i]); - if (!ts.contains(propTypes, type)) { - propTypes.push(type); - } - } - } - var result_1 = propTypes.length ? getUnionType(propTypes) : undefinedType; - typeFlags |= result_1.flags; - return result_1; - } - return undefined; - } } function checkJsxSelfClosingElement(node) { checkJsxOpeningLikeElement(node); @@ -22391,18 +25857,23 @@ var ts; // Check attributes checkJsxOpeningLikeElement(node.openingElement); // Perform resolution on the closing tag so that rename/go to definition/etc work - getJsxElementTagSymbol(node.closingElement); + if (isJsxIntrinsicIdentifier(node.closingElement.tagName)) { + getIntrinsicTagSymbol(node.closingElement); + } + else { + checkExpression(node.closingElement.tagName); + } // Check children for (var _i = 0, _a = node.children; _i < _a.length; _i++) { var child = _a[_i]; switch (child.kind) { - case 243 /* JsxExpression */: + case 248 /* JsxExpression */: checkJsxExpression(child); break; - case 236 /* JsxElement */: + case 241 /* JsxElement */: checkJsxElement(child); break; - case 237 /* JsxSelfClosingElement */: + case 242 /* JsxSelfClosingElement */: checkJsxSelfClosingElement(child); break; } @@ -22420,7 +25891,8 @@ var ts; * Returns true iff React would emit this tag name as a string rather than an identifier or qualified name */ function isJsxIntrinsicIdentifier(tagName) { - if (tagName.kind === 136 /* QualifiedName */) { + // TODO (yuisu): comment + if (tagName.kind === 172 /* PropertyAccessExpression */ || tagName.kind === 97 /* ThisKeyword */) { return false; } else { @@ -22438,10 +25910,9 @@ var ts; var correspondingPropSymbol = getPropertyOfType(elementAttributesType, node.name.text); correspondingPropType = correspondingPropSymbol && getTypeOfSymbol(correspondingPropSymbol); if (isUnhyphenatedJsxName(node.name.text)) { - // Maybe there's a string indexer? - var indexerType = getIndexTypeOfType(elementAttributesType, 0 /* String */); - if (indexerType) { - correspondingPropType = indexerType; + var attributeType = getTypeOfPropertyOfType(elementAttributesType, getTextOfPropertyName(node.name)) || getIndexTypeOfType(elementAttributesType, 0 /* String */); + if (attributeType) { + correspondingPropType = attributeType; } else { // If there's no corresponding property with this name, error @@ -22490,91 +25961,54 @@ var ts; } return jsxTypes[name]; } - /// Given a JSX opening element or self-closing element, return the symbol of the property that the tag name points to if - /// this is an intrinsic tag. This might be a named - /// property of the IntrinsicElements interface, or its string indexer. - /// If this is a class-based tag (otherwise returns undefined), returns the symbol of the class - /// type or factory function. - /// Otherwise, returns unknownSymbol. - function getJsxElementTagSymbol(node) { + /** + * Looks up an intrinsic tag name and returns a symbol that either points to an intrinsic + * property (in which case nodeLinks.jsxFlags will be IntrinsicNamedElement) or an intrinsic + * string index signature (in which case nodeLinks.jsxFlags will be IntrinsicIndexedElement). + * May also return unknownSymbol if both of these lookups fail. + */ + function getIntrinsicTagSymbol(node) { var links = getNodeLinks(node); if (!links.resolvedSymbol) { - if (isJsxIntrinsicIdentifier(node.tagName)) { - links.resolvedSymbol = lookupIntrinsicTag(node); - } - else { - links.resolvedSymbol = lookupClassTag(node); - } - } - return links.resolvedSymbol; - function lookupIntrinsicTag(node) { var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements); if (intrinsicElementsType !== unknownType) { // Property case var intrinsicProp = getPropertyOfType(intrinsicElementsType, node.tagName.text); if (intrinsicProp) { links.jsxFlags |= 1 /* IntrinsicNamedElement */; - return intrinsicProp; + return links.resolvedSymbol = intrinsicProp; } // Intrinsic string indexer case var indexSignatureType = getIndexTypeOfType(intrinsicElementsType, 0 /* String */); if (indexSignatureType) { links.jsxFlags |= 2 /* IntrinsicIndexedElement */; - return intrinsicElementsType.symbol; + return links.resolvedSymbol = intrinsicElementsType.symbol; } // Wasn't found error(node, ts.Diagnostics.Property_0_does_not_exist_on_type_1, node.tagName.text, "JSX." + JsxNames.IntrinsicElements); - return unknownSymbol; + return links.resolvedSymbol = unknownSymbol; } else { if (compilerOptions.noImplicitAny) { error(node, ts.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, JsxNames.IntrinsicElements); } - return unknownSymbol; - } - } - function lookupClassTag(node) { - var valueSymbol = resolveJsxTagName(node); - // Look up the value in the current scope - if (valueSymbol && valueSymbol !== unknownSymbol) { - links.jsxFlags |= 4 /* ValueElement */; - if (valueSymbol.flags & 8388608 /* Alias */) { - markAliasSymbolAsReferenced(valueSymbol); - } - } - return valueSymbol || unknownSymbol; - } - function resolveJsxTagName(node) { - if (node.tagName.kind === 69 /* Identifier */) { - var tag = node.tagName; - var sym = getResolvedSymbol(tag); - return sym.exportSymbol || sym; - } - else { - return checkQualifiedName(node.tagName).symbol; + return links.resolvedSymbol = unknownSymbol; } } + return links.resolvedSymbol; } /** * Given a JSX element that is a class element, finds the Element Instance Type. If the * element is not a class element, or the class element type cannot be determined, returns 'undefined'. * For example, in the element , the element instance type is `MyClass` (not `typeof MyClass`). */ - function getJsxElementInstanceType(node) { - // There is no such thing as an instance type for a non-class element. This - // line shouldn't be hit. - ts.Debug.assert(!!(getNodeLinks(node).jsxFlags & 4 /* ValueElement */), "Should not call getJsxElementInstanceType on non-class Element"); - var classSymbol = getJsxElementTagSymbol(node); - if (classSymbol === unknownSymbol) { - // Couldn't find the class instance type. Error has already been issued - return anyType; - } - var valueType = getTypeOfSymbol(classSymbol); + function getJsxElementInstanceType(node, valueType) { + ts.Debug.assert(!(valueType.flags & 524288 /* Union */)); if (isTypeAny(valueType)) { // Short-circuit if the class tag is using an element type 'any' return anyType; } - // Resolve the signatures, preferring constructors + // Resolve the signatures, preferring constructor var signatures = getSignaturesOfType(valueType, 1 /* Construct */); if (signatures.length === 0) { // No construct signatures, try call signatures @@ -22585,21 +26019,21 @@ var ts; return unknownType; } } - return getUnionType(signatures.map(getReturnTypeOfSignature)); + return getUnionType(signatures.map(getReturnTypeOfSignature), /*subtypeReduction*/ true); } /// e.g. "props" for React.d.ts, - /// or 'undefined' if ElementAttributesPropery doesn't exist (which means all + /// or 'undefined' if ElementAttributesProperty doesn't exist (which means all /// non-intrinsic elements' attributes type is 'any'), /// or '' if it has 0 properties (which means every - /// non-instrinsic elements' attributes type is the element instance type) + /// non-intrinsic elements' attributes type is the element instance type) function getJsxElementPropertiesName() { // JSX - var jsxNamespace = getGlobalSymbol(JsxNames.JSX, 1536 /* Namespace */, /*diagnosticMessage*/ undefined); + var jsxNamespace = getGlobalSymbol(JsxNames.JSX, 1920 /* Namespace */, /*diagnosticMessage*/ undefined); // JSX.ElementAttributesProperty [symbol] - var attribsPropTypeSym = jsxNamespace && getSymbol(jsxNamespace.exports, JsxNames.ElementAttributesPropertyNameContainer, 793056 /* Type */); + var attribsPropTypeSym = jsxNamespace && getSymbol(jsxNamespace.exports, JsxNames.ElementAttributesPropertyNameContainer, 793064 /* Type */); // JSX.ElementAttributesProperty [type] var attribPropType = attribsPropTypeSym && getDeclaredTypeOfSymbol(attribsPropTypeSym); - // The properites of JSX.ElementAttributesProperty + // The properties of JSX.ElementAttributesProperty var attribProperties = attribPropType && getPropertiesOfType(attribPropType); if (attribProperties) { // Element Attributes has zero properties, so the element attributes type will be the class instance type @@ -22619,6 +26053,116 @@ var ts; return undefined; } } + /** + * Given React element instance type and the class type, resolve the Jsx type + * Pass elemType to handle individual type in the union typed element type. + */ + function getResolvedJsxType(node, elemType, elemClassType) { + if (!elemType) { + elemType = checkExpression(node.tagName); + } + if (elemType.flags & 524288 /* Union */) { + var types = elemType.types; + return getUnionType(types.map(function (type) { + return getResolvedJsxType(node, type, elemClassType); + }), /*subtypeReduction*/ true); + } + // If the elemType is a string type, we have to return anyType to prevent an error downstream as we will try to find construct or call signature of the type + if (elemType.flags & 2 /* String */) { + return anyType; + } + else if (elemType.flags & 32 /* StringLiteral */) { + // If the elemType is a stringLiteral type, we can then provide a check to make sure that the string literal type is one of the Jsx intrinsic element type + var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements); + if (intrinsicElementsType !== unknownType) { + var stringLiteralTypeName = elemType.text; + var intrinsicProp = getPropertyOfType(intrinsicElementsType, stringLiteralTypeName); + if (intrinsicProp) { + return getTypeOfSymbol(intrinsicProp); + } + var indexSignatureType = getIndexTypeOfType(intrinsicElementsType, 0 /* String */); + if (indexSignatureType) { + return indexSignatureType; + } + error(node, ts.Diagnostics.Property_0_does_not_exist_on_type_1, stringLiteralTypeName, "JSX." + JsxNames.IntrinsicElements); + } + // If we need to report an error, we already done so here. So just return any to prevent any more error downstream + return anyType; + } + // Get the element instance type (the result of newing or invoking this tag) + var elemInstanceType = getJsxElementInstanceType(node, elemType); + if (!elemClassType || !isTypeAssignableTo(elemInstanceType, elemClassType)) { + // Is this is a stateless function component? See if its single signature's return type is + // assignable to the JSX Element Type + if (jsxElementType) { + var callSignatures = elemType && getSignaturesOfType(elemType, 0 /* Call */); + var callSignature = callSignatures && callSignatures.length > 0 && callSignatures[0]; + var callReturnType = callSignature && getReturnTypeOfSignature(callSignature); + var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0])); + if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType)) { + // Intersect in JSX.IntrinsicAttributes if it exists + var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes); + if (intrinsicAttributes !== unknownType) { + paramType = intersectTypes(intrinsicAttributes, paramType); + } + return paramType; + } + } + } + // Issue an error if this return type isn't assignable to JSX.ElementClass + if (elemClassType) { + checkTypeRelatedTo(elemInstanceType, elemClassType, assignableRelation, node, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements); + } + if (isTypeAny(elemInstanceType)) { + return elemInstanceType; + } + var propsName = getJsxElementPropertiesName(); + if (propsName === undefined) { + // There is no type ElementAttributesProperty, return 'any' + return anyType; + } + else if (propsName === "") { + // If there is no e.g. 'props' member in ElementAttributesProperty, use the element class type instead + return elemInstanceType; + } + else { + var attributesType = getTypeOfPropertyOfType(elemInstanceType, propsName); + if (!attributesType) { + // There is no property named 'props' on this instance type + return emptyObjectType; + } + else if (isTypeAny(attributesType) || (attributesType === unknownType)) { + // Props is of type 'any' or unknown + return attributesType; + } + else if (attributesType.flags & 524288 /* Union */) { + // Props cannot be a union type + error(node.tagName, ts.Diagnostics.JSX_element_attributes_type_0_may_not_be_a_union_type, typeToString(attributesType)); + return anyType; + } + else { + // Normal case -- add in IntrinsicClassElements and IntrinsicElements + var apparentAttributesType = attributesType; + var intrinsicClassAttribs = getJsxType(JsxNames.IntrinsicClassAttributes); + if (intrinsicClassAttribs !== unknownType) { + var typeParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(intrinsicClassAttribs.symbol); + if (typeParams) { + if (typeParams.length === 1) { + apparentAttributesType = intersectTypes(createTypeReference(intrinsicClassAttribs, [elemInstanceType]), apparentAttributesType); + } + } + else { + apparentAttributesType = intersectTypes(attributesType, intrinsicClassAttribs); + } + } + var intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes); + if (intrinsicAttribs !== unknownType) { + apparentAttributesType = intersectTypes(intrinsicAttribs, apparentAttributesType); + } + return apparentAttributesType; + } + } + } /** * Given an opening/self-closing element, get the 'element attributes type', i.e. the type that tells * us which attributes are valid on a given element. @@ -22626,91 +26170,21 @@ var ts; function getJsxElementAttributesType(node) { var links = getNodeLinks(node); if (!links.resolvedJsxType) { - var sym = getJsxElementTagSymbol(node); - if (links.jsxFlags & 4 /* ValueElement */) { - // Get the element instance type (the result of newing or invoking this tag) - var elemInstanceType = getJsxElementInstanceType(node); - var elemClassType = getJsxGlobalElementClassType(); - if (!elemClassType || !isTypeAssignableTo(elemInstanceType, elemClassType)) { - // Is this is a stateless function component? See if its single signature's return type is - // assignable to the JSX Element Type - var elemType = getTypeOfSymbol(sym); - var callSignatures = elemType && getSignaturesOfType(elemType, 0 /* Call */); - var callSignature = callSignatures && callSignatures.length > 0 && callSignatures[0]; - var callReturnType = callSignature && getReturnTypeOfSignature(callSignature); - var paramType = callReturnType && (callSignature.parameters.length === 0 ? emptyObjectType : getTypeOfSymbol(callSignature.parameters[0])); - if (callReturnType && isTypeAssignableTo(callReturnType, jsxElementType)) { - // Intersect in JSX.IntrinsicAttributes if it exists - var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes); - if (intrinsicAttributes !== unknownType) { - paramType = intersectTypes(intrinsicAttributes, paramType); - } - return links.resolvedJsxType = paramType; - } + if (isJsxIntrinsicIdentifier(node.tagName)) { + var symbol = getIntrinsicTagSymbol(node); + if (links.jsxFlags & 1 /* IntrinsicNamedElement */) { + return links.resolvedJsxType = getTypeOfSymbol(symbol); } - // Issue an error if this return type isn't assignable to JSX.ElementClass - if (elemClassType) { - checkTypeRelatedTo(elemInstanceType, elemClassType, assignableRelation, node, ts.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements); - } - if (isTypeAny(elemInstanceType)) { - return links.resolvedJsxType = elemInstanceType; - } - var propsName = getJsxElementPropertiesName(); - if (propsName === undefined) { - // There is no type ElementAttributesProperty, return 'any' - return links.resolvedJsxType = anyType; - } - else if (propsName === "") { - // If there is no e.g. 'props' member in ElementAttributesProperty, use the element class type instead - return links.resolvedJsxType = elemInstanceType; + else if (links.jsxFlags & 2 /* IntrinsicIndexedElement */) { + return links.resolvedJsxType = getIndexInfoOfSymbol(symbol, 0 /* String */).type; } else { - var attributesType = getTypeOfPropertyOfType(elemInstanceType, propsName); - if (!attributesType) { - // There is no property named 'props' on this instance type - return links.resolvedJsxType = emptyObjectType; - } - else if (isTypeAny(attributesType) || (attributesType === unknownType)) { - // Props is of type 'any' or unknown - return links.resolvedJsxType = attributesType; - } - else if (attributesType.flags & 16384 /* Union */) { - // Props cannot be a union type - error(node.tagName, ts.Diagnostics.JSX_element_attributes_type_0_may_not_be_a_union_type, typeToString(attributesType)); - return links.resolvedJsxType = anyType; - } - else { - // Normal case -- add in IntrinsicClassElements and IntrinsicElements - var apparentAttributesType = attributesType; - var intrinsicClassAttribs = getJsxType(JsxNames.IntrinsicClassAttributes); - if (intrinsicClassAttribs !== unknownType) { - var typeParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(intrinsicClassAttribs.symbol); - if (typeParams) { - if (typeParams.length === 1) { - apparentAttributesType = intersectTypes(createTypeReference(intrinsicClassAttribs, [elemInstanceType]), apparentAttributesType); - } - } - else { - apparentAttributesType = intersectTypes(attributesType, intrinsicClassAttribs); - } - } - var intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes); - if (intrinsicAttribs !== unknownType) { - apparentAttributesType = intersectTypes(intrinsicAttribs, apparentAttributesType); - } - return links.resolvedJsxType = apparentAttributesType; - } + return links.resolvedJsxType = unknownType; } } - else if (links.jsxFlags & 1 /* IntrinsicNamedElement */) { - return links.resolvedJsxType = getTypeOfSymbol(sym); - } - else if (links.jsxFlags & 2 /* IntrinsicIndexedElement */) { - return links.resolvedJsxType = getIndexTypeOfSymbol(sym, 0 /* String */); - } else { - // Resolution failed, so we don't know - return links.resolvedJsxType = anyType; + var elemClassType = getJsxGlobalElementClassType(); + return links.resolvedJsxType = getResolvedJsxType(node, undefined, elemClassType); } } return links.resolvedJsxType; @@ -22759,17 +26233,17 @@ var ts; getSymbolLinks(reactSym).referenced = true; } var targetAttributesType = getJsxElementAttributesType(node); - var nameTable = {}; + var nameTable = ts.createMap(); // Process this array in right-to-left order so we know which // attributes (mostly from spreads) are being overwritten and // thus should have their types ignored var sawSpreadedAny = false; for (var i = node.attributes.length - 1; i >= 0; i--) { - if (node.attributes[i].kind === 241 /* JsxAttribute */) { + if (node.attributes[i].kind === 246 /* JsxAttribute */) { checkJsxAttribute((node.attributes[i]), targetAttributesType, nameTable); } else { - ts.Debug.assert(node.attributes[i].kind === 242 /* JsxSpreadAttribute */); + ts.Debug.assert(node.attributes[i].kind === 247 /* JsxSpreadAttribute */); var spreadType = checkJsxSpreadAttribute((node.attributes[i]), targetAttributesType, nameTable); if (isTypeAny(spreadType)) { sawSpreadedAny = true; @@ -22782,7 +26256,7 @@ var ts; var targetProperties = getPropertiesOfType(targetAttributesType); for (var i = 0; i < targetProperties.length; i++) { if (!(targetProperties[i].flags & 536870912 /* Optional */) && - nameTable[targetProperties[i].name] === undefined) { + !nameTable[targetProperties[i].name]) { error(node, ts.Diagnostics.Property_0_is_missing_in_type_1, targetProperties[i].name, typeToString(targetAttributesType)); } } @@ -22799,10 +26273,10 @@ var ts; // If a symbol is a synthesized symbol with no value declaration, we assume it is a property. Example of this are the synthesized // '.prototype' property as well as synthesized tuple index properties. function getDeclarationKindFromSymbol(s) { - return s.valueDeclaration ? s.valueDeclaration.kind : 142 /* PropertyDeclaration */; + return s.valueDeclaration ? s.valueDeclaration.kind : 145 /* PropertyDeclaration */; } function getDeclarationFlagsFromSymbol(s) { - return s.valueDeclaration ? ts.getCombinedNodeFlags(s.valueDeclaration) : s.flags & 134217728 /* Prototype */ ? 8 /* Public */ | 64 /* Static */ : 0; + return s.valueDeclaration ? ts.getCombinedNodeFlags(s.valueDeclaration) : s.flags & 134217728 /* Prototype */ ? 4 /* Public */ | 32 /* Static */ : 0; } /** * Check whether the requested property access is valid. @@ -22815,10 +26289,10 @@ var ts; function checkClassPropertyAccess(node, left, type, prop) { var flags = getDeclarationFlagsFromSymbol(prop); var declaringClass = getDeclaredTypeOfSymbol(getParentOfSymbol(prop)); + var errorNode = node.kind === 172 /* PropertyAccessExpression */ || node.kind === 218 /* VariableDeclaration */ ? + node.name : + node.right; if (left.kind === 95 /* SuperKeyword */) { - var errorNode = node.kind === 169 /* PropertyAccessExpression */ ? - node.name : - node.right; // TS 1.0 spec (April 2014): 4.8.2 // - In a constructor, instance member function, instance member accessor, or // instance member variable initializer where this references a derived class instance, @@ -22826,7 +26300,7 @@ var ts; // - In a static member function or static member accessor // where this references the constructor function object of a derived class, // a super property access is permitted and must specify a public static member function of the base class. - if (languageVersion < 2 /* ES6 */ && getDeclarationKindFromSymbol(prop) !== 144 /* MethodDeclaration */) { + if (languageVersion < 2 /* ES6 */ && getDeclarationKindFromSymbol(prop) !== 147 /* MethodDeclaration */) { // `prop` refers to a *property* declared in the super class // rather than a *method*, so it does not satisfy the above criteria. error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); @@ -22842,17 +26316,15 @@ var ts; } } // Public properties are otherwise accessible. - if (!(flags & (16 /* Private */ | 32 /* Protected */))) { + if (!(flags & (8 /* Private */ | 16 /* Protected */))) { return true; } // Property is known to be private or protected at this point - // Get the declaring and enclosing class instance types - var enclosingClassDeclaration = ts.getContainingClass(node); - var enclosingClass = enclosingClassDeclaration ? getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClassDeclaration)) : undefined; - // Private property is accessible if declaring and enclosing class are the same - if (flags & 16 /* Private */) { - if (declaringClass !== enclosingClass) { - error(node, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(declaringClass)); + // Private property is accessible if the property is within the declaring class + if (flags & 8 /* Private */) { + var declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); + if (!isNodeWithinClass(node, declaringClassDeclaration)) { + error(errorNode, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(declaringClass)); return false; } return true; @@ -22862,27 +26334,46 @@ var ts; if (left.kind === 95 /* SuperKeyword */) { return true; } - // A protected property is accessible in the declaring class and classes derived from it - if (!enclosingClass || !hasBaseType(enclosingClass, declaringClass)) { - error(node, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(declaringClass)); + // Get the enclosing class that has the declaring class as its base type + var enclosingClass = forEachEnclosingClass(node, function (enclosingDeclaration) { + var enclosingClass = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingDeclaration)); + return hasBaseType(enclosingClass, declaringClass) ? enclosingClass : undefined; + }); + // A protected property is accessible if the property is within the declaring class or classes derived from it + if (!enclosingClass) { + error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(declaringClass)); return false; } // No further restrictions for static properties - if (flags & 64 /* Static */) { + if (flags & 32 /* Static */) { return true; } // An instance property must be accessed through an instance of the enclosing class - if (type.flags & 33554432 /* ThisType */) { + if (type.flags & 268435456 /* ThisType */) { // get the original type -- represented as the type constraint of the 'this' type type = getConstraintOfTypeParameter(type); } // TODO: why is the first part of this check here? - if (!(getTargetType(type).flags & (1024 /* Class */ | 2048 /* Interface */) && hasBaseType(type, enclosingClass))) { - error(node, ts.Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1, symbolToString(prop), typeToString(enclosingClass)); + if (!(getTargetType(type).flags & (32768 /* Class */ | 65536 /* Interface */) && hasBaseType(type, enclosingClass))) { + error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1, symbolToString(prop), typeToString(enclosingClass)); return false; } return true; } + function checkNonNullExpression(node) { + var type = checkExpression(node); + if (strictNullChecks) { + var kind = getFalsyFlags(type) & 6144 /* Nullable */; + if (kind) { + error(node, kind & 2048 /* Undefined */ ? kind & 4096 /* Null */ ? + ts.Diagnostics.Object_is_possibly_null_or_undefined : + ts.Diagnostics.Object_is_possibly_undefined : + ts.Diagnostics.Object_is_possibly_null); + } + return getNonNullableType(type); + } + return type; + } function checkPropertyAccessExpression(node) { return checkPropertyAccessExpressionOrQualifiedName(node, node.expression, node.name); } @@ -22890,30 +26381,52 @@ var ts; return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right); } function checkPropertyAccessExpressionOrQualifiedName(node, left, right) { - var type = checkExpression(left); + var type = checkNonNullExpression(left); if (isTypeAny(type)) { return type; } var apparentType = getApparentType(getWidenedType(type)); - if (apparentType === unknownType) { - // handle cases when type is Type parameter with invalid constraint - return unknownType; + if (apparentType === unknownType || (type.flags & 16384 /* TypeParameter */ && isTypeAny(apparentType))) { + // handle cases when type is Type parameter with invalid or any constraint + return apparentType; } var prop = getPropertyOfType(apparentType, right.text); if (!prop) { - if (right.text) { - error(right, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(right), typeToString(type.flags & 33554432 /* ThisType */ ? apparentType : type)); + if (right.text && !checkAndReportErrorForExtendingInterface(node)) { + error(right, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(right), typeToString(type.flags & 268435456 /* ThisType */ ? apparentType : type)); } return unknownType; } + if (noUnusedIdentifiers && + (prop.flags & 106500 /* ClassMember */) && + prop.valueDeclaration && (prop.valueDeclaration.flags & 8 /* Private */)) { + if (prop.flags & 16777216 /* Instantiated */) { + getSymbolLinks(prop).target.isReferenced = true; + } + else { + prop.isReferenced = true; + } + } getNodeLinks(node).resolvedSymbol = prop; if (prop.parent && prop.parent.flags & 32 /* Class */) { checkClassPropertyAccess(node, left, apparentType, prop); } - return getTypeOfSymbol(prop); + var propType = getTypeOfSymbol(prop); + if (prop.flags & 8 /* EnumMember */ && isLiteralContextForType(node, propType)) { + propType = getDeclaredTypeOfSymbol(prop); + } + // Only compute control flow type if this is a property access expression that isn't an + // assignment target, and the referenced property was declared as a variable, property, + // accessor, or optional method. + if (node.kind !== 172 /* PropertyAccessExpression */ || ts.isAssignmentTarget(node) || + !(prop.flags & (3 /* Variable */ | 4 /* Property */ | 98304 /* Accessor */)) && + !(prop.flags & 8192 /* Method */ && propType.flags & 524288 /* Union */)) { + return propType; + } + return getFlowTypeOfReference(node, propType, /*assumeInitialized*/ true, /*flowContainer*/ undefined); } function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 169 /* PropertyAccessExpression */ + var left = node.kind === 172 /* PropertyAccessExpression */ ? node.expression : node.left; var type = checkExpression(left); @@ -22930,7 +26443,7 @@ var ts; */ function getForInVariableSymbol(node) { var initializer = node.initializer; - if (initializer.kind === 215 /* VariableDeclarationList */) { + if (initializer.kind === 219 /* VariableDeclarationList */) { var variable = initializer.declarations[0]; if (variable && !ts.isBindingPattern(variable.name)) { return getSymbolOfNode(variable); @@ -22959,7 +26472,7 @@ var ts; var child = expr; var node = expr.parent; while (node) { - if (node.kind === 203 /* ForInStatement */ && + if (node.kind === 207 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(checkExpression(node.expression))) { @@ -22976,7 +26489,7 @@ var ts; // Grammar checking if (!node.argumentExpression) { var sourceFile = ts.getSourceFileOfNode(node); - if (node.parent.kind === 172 /* NewExpression */ && node.parent.expression === node) { + if (node.parent.kind === 175 /* NewExpression */ && node.parent.expression === node) { var start = ts.skipTrivia(sourceFile.text, node.expression.end); var end = node.end; grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); @@ -22988,7 +26501,7 @@ var ts; } } // Obtain base constraint such that we can bail out if the constraint is an unknown type - var objectType = getApparentType(checkExpression(node.expression)); + var objectType = getApparentType(checkNonNullExpression(node.expression)); var indexType = node.argumentExpression ? checkExpression(node.argumentExpression) : unknownType; if (objectType === unknownType) { return unknownType; @@ -23009,32 +26522,35 @@ var ts; // - Otherwise, if IndexExpr is of type Any, the String or Number primitive type, or an enum type, the property access is of type Any. // See if we can index as a property. if (node.argumentExpression) { - var name_11 = getPropertyNameForIndexedAccess(node.argumentExpression, indexType); - if (name_11 !== undefined) { - var prop = getPropertyOfType(objectType, name_11); + var name_13 = getPropertyNameForIndexedAccess(node.argumentExpression, indexType); + if (name_13 !== undefined) { + var prop = getPropertyOfType(objectType, name_13); if (prop) { getNodeLinks(node).resolvedSymbol = prop; return getTypeOfSymbol(prop); } else if (isConstEnum) { - error(node.argumentExpression, ts.Diagnostics.Property_0_does_not_exist_on_const_enum_1, name_11, symbolToString(objectType.symbol)); + error(node.argumentExpression, ts.Diagnostics.Property_0_does_not_exist_on_const_enum_1, name_13, symbolToString(objectType.symbol)); return unknownType; } } } // Check for compatible indexer types. - if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 258 /* StringLike */ | 132 /* NumberLike */ | 16777216 /* ESSymbol */)) { + var allowedNullableFlags = strictNullChecks ? 0 : 6144 /* Nullable */; + if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 34 /* StringLike */ | 340 /* NumberLike */ | 512 /* ESSymbol */ | allowedNullableFlags)) { // Try to use a number indexer. - if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 132 /* NumberLike */) || isForInVariableForNumericPropertyNames(node.argumentExpression)) { - var numberIndexType = getIndexTypeOfType(objectType, 1 /* Number */); - if (numberIndexType) { - return numberIndexType; + if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 340 /* NumberLike */ | allowedNullableFlags) || isForInVariableForNumericPropertyNames(node.argumentExpression)) { + var numberIndexInfo = getIndexInfoOfType(objectType, 1 /* Number */); + if (numberIndexInfo) { + getNodeLinks(node).resolvedIndexInfo = numberIndexInfo; + return numberIndexInfo.type; } } // Try to use string indexing. - var stringIndexType = getIndexTypeOfType(objectType, 0 /* String */); - if (stringIndexType) { - return stringIndexType; + var stringIndexInfo = getIndexInfoOfType(objectType, 0 /* String */); + if (stringIndexInfo) { + getNodeLinks(node).resolvedIndexInfo = stringIndexInfo; + return stringIndexInfo.type; } // Fall back to any. if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && !isTypeAny(objectType)) { @@ -23059,7 +26575,7 @@ var ts; if (indexArgumentExpression.kind === 9 /* StringLiteral */ || indexArgumentExpression.kind === 8 /* NumericLiteral */) { return indexArgumentExpression.text; } - if (indexArgumentExpression.kind === 170 /* ElementAccessExpression */ || indexArgumentExpression.kind === 169 /* PropertyAccessExpression */) { + if (indexArgumentExpression.kind === 173 /* ElementAccessExpression */ || indexArgumentExpression.kind === 172 /* PropertyAccessExpression */) { var value = getConstantValue(indexArgumentExpression); if (value !== undefined) { return value.toString(); @@ -23087,7 +26603,7 @@ var ts; return false; } // Make sure the property type is the primitive symbol type - if ((expressionType.flags & 16777216 /* ESSymbol */) === 0) { + if ((expressionType.flags & 512 /* ESSymbol */) === 0) { if (reportError) { error(expression, ts.Diagnostics.A_computed_property_name_of_the_form_0_must_be_of_type_symbol, ts.getTextOfNode(expression)); } @@ -23114,10 +26630,10 @@ var ts; return true; } function resolveUntypedCall(node) { - if (node.kind === 173 /* TaggedTemplateExpression */) { + if (node.kind === 176 /* TaggedTemplateExpression */) { checkExpression(node.template); } - else if (node.kind !== 140 /* Decorator */) { + else if (node.kind !== 143 /* Decorator */) { ts.forEach(node.arguments, function (argument) { checkExpression(argument); }); @@ -23147,13 +26663,13 @@ var ts; for (var _i = 0, signatures_2 = signatures; _i < signatures_2.length; _i++) { var signature = signatures_2[_i]; var symbol = signature.declaration && getSymbolOfNode(signature.declaration); - var parent_6 = signature.declaration && signature.declaration.parent; + var parent_9 = signature.declaration && signature.declaration.parent; if (!lastSymbol || symbol === lastSymbol) { - if (lastParent && parent_6 === lastParent) { + if (lastParent && parent_9 === lastParent) { index++; } else { - lastParent = parent_6; + lastParent = parent_9; index = cutoffIndex; } } @@ -23161,12 +26677,12 @@ var ts; // current declaration belongs to a different symbol // set cutoffIndex so re-orderings in the future won't change result set from 0 to cutoffIndex index = cutoffIndex = result.length; - lastParent = parent_6; + lastParent = parent_9; } lastSymbol = symbol; // specialized signatures always need to be placed before non-specialized signatures regardless // of the cutoff position; see GH#1133 - if (signature.hasStringLiterals) { + if (signature.hasLiteralTypes) { specializedIndex++; spliceIndex = specializedIndex; // The cutoff index always needs to be greater than or equal to the specialized signature index @@ -23183,25 +26699,26 @@ var ts; function getSpreadArgumentIndex(args) { for (var i = 0; i < args.length; i++) { var arg = args[i]; - if (arg && arg.kind === 188 /* SpreadElementExpression */) { + if (arg && arg.kind === 191 /* SpreadElementExpression */) { return i; } } return -1; } - function hasCorrectArity(node, args, signature) { - var adjustedArgCount; // Apparent number of arguments we will have in this call + function hasCorrectArity(node, args, signature, signatureHelpTrailingComma) { + if (signatureHelpTrailingComma === void 0) { signatureHelpTrailingComma = false; } + var argCount; // Apparent number of arguments we will have in this call var typeArguments; // Type arguments (undefined if none) var callIsIncomplete; // In incomplete call we want to be lenient when we have too few arguments var isDecorator; var spreadArgIndex = -1; - if (node.kind === 173 /* TaggedTemplateExpression */) { + if (node.kind === 176 /* TaggedTemplateExpression */) { var tagExpression = node; // Even if the call is incomplete, we'll have a missing expression as our last argument, // so we can say the count is just the arg list length - adjustedArgCount = args.length; + argCount = args.length; typeArguments = undefined; - if (tagExpression.template.kind === 186 /* TemplateExpression */) { + if (tagExpression.template.kind === 189 /* TemplateExpression */) { // If a tagged template expression lacks a tail literal, the call is incomplete. // Specifically, a template only can end in a TemplateTail or a Missing literal. var templateExpression = tagExpression.template; @@ -23218,20 +26735,19 @@ var ts; callIsIncomplete = !!templateLiteral.isUnterminated; } } - else if (node.kind === 140 /* Decorator */) { + else if (node.kind === 143 /* Decorator */) { isDecorator = true; typeArguments = undefined; - adjustedArgCount = getEffectiveArgumentCount(node, /*args*/ undefined, signature); + argCount = getEffectiveArgumentCount(node, /*args*/ undefined, signature); } else { var callExpression = node; if (!callExpression.arguments) { // This only happens when we have something of the form: 'new C' - ts.Debug.assert(callExpression.kind === 172 /* NewExpression */); + ts.Debug.assert(callExpression.kind === 175 /* NewExpression */); return signature.minArgumentCount === 0; } - // For IDE scenarios we may have an incomplete call, so a trailing comma is tantamount to adding another argument. - adjustedArgCount = callExpression.arguments.hasTrailingComma ? args.length + 1 : args.length; + argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; // If we are missing the close paren, the call is incomplete. callIsIncomplete = callExpression.arguments.end === callExpression.end; typeArguments = callExpression.typeArguments; @@ -23250,19 +26766,19 @@ var ts; return isRestParameterIndex(signature, spreadArgIndex); } // Too many arguments implies incorrect arity. - if (!signature.hasRestParameter && adjustedArgCount > signature.parameters.length) { + if (!signature.hasRestParameter && argCount > signature.parameters.length) { return false; } // If the call is incomplete, we should skip the lower bound check. - var hasEnoughArguments = adjustedArgCount >= signature.minArgumentCount; + var hasEnoughArguments = argCount >= signature.minArgumentCount; return callIsIncomplete || hasEnoughArguments; } // If type has a single call signature and no other members, return that signature. Otherwise, return undefined. function getSingleCallSignature(type) { - if (type.flags & 80896 /* ObjectType */) { + if (type.flags & 2588672 /* ObjectType */) { var resolved = resolveStructuredTypeMembers(type); if (resolved.callSignatures.length === 1 && resolved.constructSignatures.length === 0 && - resolved.properties.length === 0 && !resolved.stringIndexType && !resolved.numberIndexType) { + resolved.properties.length === 0 && !resolved.stringIndexInfo && !resolved.numberIndexInfo) { return resolved.callSignatures[0]; } } @@ -23300,13 +26816,19 @@ var ts; if (context.failedTypeParameterIndex !== undefined && !context.inferences[context.failedTypeParameterIndex].isFixed) { context.failedTypeParameterIndex = undefined; } + var thisType = getThisTypeOfSignature(signature); + if (thisType) { + var thisArgumentNode = getThisArgumentOfCall(node); + var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType; + inferTypes(context, thisArgumentType, thisType); + } // We perform two passes over the arguments. In the first pass we infer from all arguments, but use // wildcards for all context sensitive function expressions. var argCount = getEffectiveArgumentCount(node, args, signature); for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); // If the effective argument is 'undefined', then it is an argument that is present but is synthetic. - if (arg === undefined || arg.kind !== 190 /* OmittedExpression */) { + if (arg === undefined || arg.kind !== 193 /* OmittedExpression */) { var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i, arg); // If the effective argument type is 'undefined', there is no synthetic type @@ -23327,7 +26849,7 @@ var ts; // Tagged template expressions will always have `undefined` for `excludeArgument[0]`. if (excludeArgument) { for (var i = 0; i < argCount; i++) { - // No need to check for omitted args and template expressions, their exlusion value is always undefined + // No need to check for omitted args and template expressions, their exclusion value is always undefined if (excludeArgument[i] === false) { var arg = args[i]; var paramType = getTypeAtPosition(signature, i); @@ -23362,24 +26884,35 @@ var ts; return typeArgumentsAreAssignable; } function checkApplicableSignature(node, args, signature, relation, excludeArgument, reportErrors) { + var thisType = getThisTypeOfSignature(signature); + if (thisType && thisType !== voidType && node.kind !== 175 /* NewExpression */) { + // If the called expression is not of the form `x.f` or `x["f"]`, then sourceType = voidType + // If the signature's 'this' type is voidType, then the check is skipped -- anything is compatible. + // If the expression is a new expression, then the check is skipped. + var thisArgumentNode = getThisArgumentOfCall(node); + var thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType; + var errorNode = reportErrors ? (thisArgumentNode || node) : undefined; + var headMessage_1 = ts.Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1; + if (!checkTypeRelatedTo(thisArgumentType, getThisTypeOfSignature(signature), relation, errorNode, headMessage_1)) { + return false; + } + } + var headMessage = ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1; var argCount = getEffectiveArgumentCount(node, args, signature); for (var i = 0; i < argCount; i++) { var arg = getEffectiveArgument(node, args, i); // If the effective argument is 'undefined', then it is an argument that is present but is synthetic. - if (arg === undefined || arg.kind !== 190 /* OmittedExpression */) { + if (arg === undefined || arg.kind !== 193 /* OmittedExpression */) { // Check spread elements against rest type (from arity check we know spread argument corresponds to a rest parameter) var paramType = getTypeAtPosition(signature, i); var argType = getEffectiveArgumentType(node, i, arg); // If the effective argument type is 'undefined', there is no synthetic type // for the argument. In that case, we should check the argument. if (argType === undefined) { - argType = arg.kind === 9 /* StringLiteral */ && !reportErrors - ? getStringLiteralTypeForText(arg.text) - : checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); + argType = checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); } // Use argument expression as error location when reporting errors var errorNode = reportErrors ? getEffectiveArgumentErrorNode(node, i, arg) : undefined; - var headMessage = ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1; if (!checkTypeRelatedTo(argType, paramType, relation, errorNode, headMessage)) { return false; } @@ -23387,6 +26920,20 @@ var ts; } return true; } + /** + * Returns the this argument in calls like x.f(...) and x[f](...). Undefined otherwise. + */ + function getThisArgumentOfCall(node) { + if (node.kind === 174 /* CallExpression */) { + var callee = node.expression; + if (callee.kind === 172 /* PropertyAccessExpression */) { + return callee.expression; + } + else if (callee.kind === 173 /* ElementAccessExpression */) { + return callee.expression; + } + } + } /** * Returns the effective arguments for an expression that works like a function invocation. * @@ -23398,16 +26945,16 @@ var ts; */ function getEffectiveCallArguments(node) { var args; - if (node.kind === 173 /* TaggedTemplateExpression */) { + if (node.kind === 176 /* TaggedTemplateExpression */) { var template = node.template; args = [undefined]; - if (template.kind === 186 /* TemplateExpression */) { + if (template.kind === 189 /* TemplateExpression */) { ts.forEach(template.templateSpans, function (span) { args.push(span.expression); }); } } - else if (node.kind === 140 /* Decorator */) { + else if (node.kind === 143 /* Decorator */) { // For a decorator, we return undefined as we will determine // the number and types of arguments for a decorator using // `getEffectiveArgumentCount` and `getEffectiveArgumentType` below. @@ -23432,19 +26979,19 @@ var ts; * Otherwise, the argument count is the length of the 'args' array. */ function getEffectiveArgumentCount(node, args, signature) { - if (node.kind === 140 /* Decorator */) { + if (node.kind === 143 /* Decorator */) { switch (node.parent.kind) { - case 217 /* ClassDeclaration */: - case 189 /* ClassExpression */: + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: // A class decorator will have one argument (see `ClassDecorator` in core.d.ts) return 1; - case 142 /* PropertyDeclaration */: + case 145 /* PropertyDeclaration */: // A property declaration decorator will have two arguments (see // `PropertyDecorator` in core.d.ts) return 2; - case 144 /* MethodDeclaration */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: + case 147 /* MethodDeclaration */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: // A method or accessor declaration decorator will have two or three arguments (see // `PropertyDecorator` and `MethodDecorator` in core.d.ts) // If we are emitting decorators for ES3, we will only pass two arguments. @@ -23454,7 +27001,7 @@ var ts; // If the method decorator signature only accepts a target and a key, we will only // type check those arguments. return signature.parameters.length >= 3 ? 3 : 2; - case 139 /* Parameter */: + case 142 /* Parameter */: // A parameter declaration decorator will have three arguments (see // `ParameterDecorator` in core.d.ts) return 3; @@ -23478,25 +27025,25 @@ var ts; */ function getEffectiveDecoratorFirstArgumentType(node) { // The first argument to a decorator is its `target`. - if (node.kind === 217 /* ClassDeclaration */) { + if (node.kind === 221 /* ClassDeclaration */) { // For a class decorator, the `target` is the type of the class (e.g. the // "static" or "constructor" side of the class) var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } - if (node.kind === 139 /* Parameter */) { + if (node.kind === 142 /* Parameter */) { // For a parameter decorator, the `target` is the parent type of the // parameter's containing method. node = node.parent; - if (node.kind === 145 /* Constructor */) { + if (node.kind === 148 /* Constructor */) { var classSymbol = getSymbolOfNode(node); return getTypeOfSymbol(classSymbol); } } - if (node.kind === 142 /* PropertyDeclaration */ || - node.kind === 144 /* MethodDeclaration */ || - node.kind === 146 /* GetAccessor */ || - node.kind === 147 /* SetAccessor */) { + if (node.kind === 145 /* PropertyDeclaration */ || + node.kind === 147 /* MethodDeclaration */ || + node.kind === 149 /* GetAccessor */ || + node.kind === 150 /* SetAccessor */) { // For a property or method decorator, the `target` is the // "static"-side type of the parent of the member if the member is // declared "static"; otherwise, it is the "instance"-side type of the @@ -23523,21 +27070,21 @@ var ts; */ function getEffectiveDecoratorSecondArgumentType(node) { // The second argument to a decorator is its `propertyKey` - if (node.kind === 217 /* ClassDeclaration */) { + if (node.kind === 221 /* ClassDeclaration */) { ts.Debug.fail("Class decorators should not have a second synthetic argument."); return unknownType; } - if (node.kind === 139 /* Parameter */) { + if (node.kind === 142 /* Parameter */) { node = node.parent; - if (node.kind === 145 /* Constructor */) { + if (node.kind === 148 /* Constructor */) { // For a constructor parameter decorator, the `propertyKey` will be `undefined`. return anyType; } } - if (node.kind === 142 /* PropertyDeclaration */ || - node.kind === 144 /* MethodDeclaration */ || - node.kind === 146 /* GetAccessor */ || - node.kind === 147 /* SetAccessor */) { + if (node.kind === 145 /* PropertyDeclaration */ || + node.kind === 147 /* MethodDeclaration */ || + node.kind === 149 /* GetAccessor */ || + node.kind === 150 /* SetAccessor */) { // The `propertyKey` for a property or method decorator will be a // string literal type if the member name is an identifier, number, or string; // otherwise, if the member name is a computed property name it will @@ -23547,10 +27094,10 @@ var ts; case 69 /* Identifier */: case 8 /* NumericLiteral */: case 9 /* StringLiteral */: - return getStringLiteralTypeForText(element.name.text); - case 137 /* ComputedPropertyName */: + return getLiteralTypeForText(32 /* StringLiteral */, element.name.text); + case 140 /* ComputedPropertyName */: var nameType = checkComputedPropertyName(element.name); - if (allConstituentTypesHaveKind(nameType, 16777216 /* ESSymbol */)) { + if (isTypeOfKind(nameType, 512 /* ESSymbol */)) { return nameType; } else { @@ -23573,22 +27120,22 @@ var ts; */ function getEffectiveDecoratorThirdArgumentType(node) { // The third argument to a decorator is either its `descriptor` for a method decorator - // or its `parameterIndex` for a paramter decorator - if (node.kind === 217 /* ClassDeclaration */) { + // or its `parameterIndex` for a parameter decorator + if (node.kind === 221 /* ClassDeclaration */) { ts.Debug.fail("Class decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 139 /* Parameter */) { + if (node.kind === 142 /* Parameter */) { // The `parameterIndex` for a parameter decorator is always a number return numberType; } - if (node.kind === 142 /* PropertyDeclaration */) { + if (node.kind === 145 /* PropertyDeclaration */) { ts.Debug.fail("Property decorators should not have a third synthetic argument."); return unknownType; } - if (node.kind === 144 /* MethodDeclaration */ || - node.kind === 146 /* GetAccessor */ || - node.kind === 147 /* SetAccessor */) { + if (node.kind === 147 /* MethodDeclaration */ || + node.kind === 149 /* GetAccessor */ || + node.kind === 150 /* SetAccessor */) { // The `descriptor` for a method decorator will be a `TypedPropertyDescriptor` // for the type of the member. var propertyType = getTypeOfNode(node); @@ -23620,11 +27167,11 @@ var ts; // Decorators provide special arguments, a tagged template expression provides // a special first argument, and string literals get string literal types // unless we're reporting errors - if (node.kind === 140 /* Decorator */) { + if (node.kind === 143 /* Decorator */) { return getEffectiveDecoratorArgumentType(node, argIndex); } - else if (argIndex === 0 && node.kind === 173 /* TaggedTemplateExpression */) { - return globalTemplateStringsArrayType; + else if (argIndex === 0 && node.kind === 176 /* TaggedTemplateExpression */) { + return getGlobalTemplateStringsArrayType(); } // This is not a synthetic argument, so we return 'undefined' // to signal that the caller needs to check the argument. @@ -23635,8 +27182,8 @@ var ts; */ function getEffectiveArgument(node, args, argIndex) { // For a decorator or the first argument of a tagged template expression we return undefined. - if (node.kind === 140 /* Decorator */ || - (argIndex === 0 && node.kind === 173 /* TaggedTemplateExpression */)) { + if (node.kind === 143 /* Decorator */ || + (argIndex === 0 && node.kind === 176 /* TaggedTemplateExpression */)) { return undefined; } return args[argIndex]; @@ -23645,11 +27192,11 @@ var ts; * Gets the error node to use when reporting errors for an effective argument. */ function getEffectiveArgumentErrorNode(node, argIndex, arg) { - if (node.kind === 140 /* Decorator */) { + if (node.kind === 143 /* Decorator */) { // For a decorator, we use the expression of the decorator for error reporting. return node.expression; } - else if (argIndex === 0 && node.kind === 173 /* TaggedTemplateExpression */) { + else if (argIndex === 0 && node.kind === 176 /* TaggedTemplateExpression */) { // For a the first argument of a tagged template expression, we use the template of the tag for error reporting. return node.template; } @@ -23658,8 +27205,8 @@ var ts; } } function resolveCall(node, signatures, candidatesOutArray, headMessage) { - var isTaggedTemplate = node.kind === 173 /* TaggedTemplateExpression */; - var isDecorator = node.kind === 140 /* Decorator */; + var isTaggedTemplate = node.kind === 176 /* TaggedTemplateExpression */; + var isDecorator = node.kind === 143 /* Decorator */; var typeArguments; if (!isTaggedTemplate && !isDecorator) { typeArguments = node.typeArguments; @@ -23728,6 +27275,9 @@ var ts; var candidateForTypeArgumentError; var resultOfFailedInference; var result; + // If we are in signature help, a trailing comma indicates that we intend to provide another argument, + // so we will only accept overloads with arity at least 1 higher than the current number of provided arguments. + var signatureHelpTrailingComma = candidatesOutArray && node.kind === 174 /* CallExpression */ && node.arguments.hasTrailingComma; // Section 4.12.1: // if the candidate list contains one or more signatures for which the type of each argument // expression is a subtype of each corresponding parameter type, the return type of the first @@ -23739,14 +27289,14 @@ var ts; // is just important for choosing the best signature. So in the case where there is only one // signature, the subtype pass is useless. So skipping it is an optimization. if (candidates.length > 1) { - result = chooseOverload(candidates, subtypeRelation); + result = chooseOverload(candidates, subtypeRelation, signatureHelpTrailingComma); } if (!result) { // Reinitialize these pointers for round two candidateForArgumentError = undefined; candidateForTypeArgumentError = undefined; resultOfFailedInference = undefined; - result = chooseOverload(candidates, assignableRelation); + result = chooseOverload(candidates, assignableRelation, signatureHelpTrailingComma); } if (result) { return result; @@ -23808,10 +27358,11 @@ var ts; } diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(node, errorInfo)); } - function chooseOverload(candidates, relation) { + function chooseOverload(candidates, relation, signatureHelpTrailingComma) { + if (signatureHelpTrailingComma === void 0) { signatureHelpTrailingComma = false; } for (var _i = 0, candidates_2 = candidates; _i < candidates_2.length; _i++) { var originalCandidate = candidates_2[_i]; - if (!hasCorrectArity(node, args, originalCandidate)) { + if (!hasCorrectArity(node, args, originalCandidate, signatureHelpTrailingComma)) { continue; } var candidate = void 0; @@ -23878,12 +27429,14 @@ var ts; // In super call, the candidate signatures are the matching arity signatures of the base constructor function instantiated // with the type arguments specified in the extends clause. var baseTypeNode = ts.getClassExtendsHeritageClauseElement(ts.getContainingClass(node)); - var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments); - return resolveCall(node, baseConstructors, candidatesOutArray); + if (baseTypeNode) { + var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments); + return resolveCall(node, baseConstructors, candidatesOutArray); + } } return resolveUntypedCall(node); } - var funcType = checkExpression(node.expression); + var funcType = checkNonNullExpression(node.expression); var apparentType = getApparentType(funcType); if (apparentType === unknownType) { // Another error has already been reported @@ -23902,8 +27455,10 @@ var ts; // types are provided for the argument expressions, and the result is always of type Any. // We exclude union types because we may have a union of function types that happen to have // no common signatures. - if (isTypeAny(funcType) || (!callSignatures.length && !constructSignatures.length && !(funcType.flags & 16384 /* Union */) && isTypeAssignableTo(funcType, globalFunctionType))) { - // The unknownType indicates that an error already occured (and was reported). No + if (isTypeAny(funcType) || + (isTypeAny(apparentType) && funcType.flags & 16384 /* TypeParameter */) || + (!callSignatures.length && !constructSignatures.length && !(funcType.flags & 524288 /* Union */) && isTypeAssignableTo(funcType, globalFunctionType))) { + // The unknownType indicates that an error already occurred (and was reported). No // need to report another error in this case. if (funcType !== unknownType && node.typeArguments) { error(node, ts.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); @@ -23931,7 +27486,7 @@ var ts; error(node.arguments[spreadIndex], ts.Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher); } } - var expressionType = checkExpression(node.expression); + var expressionType = checkNonNullExpression(node.expression); // If expressionType's apparent type(section 3.8.1) is an object type with one or // more construct signatures, the expression is processed in the same manner as a // function call, but using the construct signatures as the initial set of candidate @@ -23966,23 +27521,65 @@ var ts; // that the user will not add any. var constructSignatures = getSignaturesOfType(expressionType, 1 /* Construct */); if (constructSignatures.length) { + if (!isConstructorAccessible(node, constructSignatures[0])) { + return resolveErrorCall(node); + } return resolveCall(node, constructSignatures, candidatesOutArray); } // If expressionType's apparent type is an object type with no construct signatures but // one or more call signatures, the expression is processed as a function call. A compile-time // error occurs if the result of the function call is not Void. The type of the result of the - // operation is Any. + // operation is Any. It is an error to have a Void this type. var callSignatures = getSignaturesOfType(expressionType, 0 /* Call */); if (callSignatures.length) { var signature = resolveCall(node, callSignatures, candidatesOutArray); if (getReturnTypeOfSignature(signature) !== voidType) { error(node, ts.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); } + if (getThisTypeOfSignature(signature) === voidType) { + error(node, ts.Diagnostics.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void); + } return signature; } error(node, ts.Diagnostics.Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature); return resolveErrorCall(node); } + function isConstructorAccessible(node, signature) { + if (!signature || !signature.declaration) { + return true; + } + var declaration = signature.declaration; + var flags = declaration.flags; + // Public constructor is accessible. + if (!(flags & (8 /* Private */ | 16 /* Protected */))) { + return true; + } + var declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol); + var declaringClass = getDeclaredTypeOfSymbol(declaration.parent.symbol); + // A private or protected constructor can only be instantiated within its own class (or a subclass, for protected) + if (!isNodeWithinClass(node, declaringClassDeclaration)) { + var containingClass = ts.getContainingClass(node); + if (containingClass) { + var containingType = getTypeOfNode(containingClass); + var baseTypes = getBaseTypes(containingType); + if (baseTypes.length) { + var baseType = baseTypes[0]; + if (flags & 16 /* Protected */ && + baseType.symbol === declaration.parent.symbol) { + return true; + } + } + } + if (flags & 8 /* Private */) { + error(node, ts.Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); + } + if (flags & 16 /* Protected */) { + error(node, ts.Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); + } + return false; + } + return true; + } function resolveTaggedTemplateExpression(node, candidatesOutArray) { var tagType = checkExpression(node.tag); var apparentType = getApparentType(tagType); @@ -23991,7 +27588,7 @@ var ts; return resolveErrorCall(node); } var callSignatures = getSignaturesOfType(apparentType, 0 /* Call */); - if (isTypeAny(tagType) || (!callSignatures.length && !(tagType.flags & 16384 /* Union */) && isTypeAssignableTo(tagType, globalFunctionType))) { + if (isTypeAny(tagType) || (!callSignatures.length && !(tagType.flags & 524288 /* Union */) && isTypeAssignableTo(tagType, globalFunctionType))) { return resolveUntypedCall(node); } if (!callSignatures.length) { @@ -24005,16 +27602,16 @@ var ts; */ function getDiagnosticHeadMessageForDecoratorResolution(node) { switch (node.parent.kind) { - case 217 /* ClassDeclaration */: - case 189 /* ClassExpression */: + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 139 /* Parameter */: + case 142 /* Parameter */: return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 142 /* PropertyDeclaration */: + case 145 /* PropertyDeclaration */: return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 144 /* MethodDeclaration */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: + case 147 /* MethodDeclaration */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; } } @@ -24028,7 +27625,7 @@ var ts; return resolveErrorCall(node); } var callSignatures = getSignaturesOfType(apparentType, 0 /* Call */); - if (funcType === anyType || (!callSignatures.length && !(funcType.flags & 16384 /* Union */) && isTypeAssignableTo(funcType, globalFunctionType))) { + if (funcType === anyType || (!callSignatures.length && !(funcType.flags & 524288 /* Union */) && isTypeAssignableTo(funcType, globalFunctionType))) { return resolveUntypedCall(node); } var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); @@ -24041,6 +27638,19 @@ var ts; } return resolveCall(node, callSignatures, candidatesOutArray, headMessage); } + function resolveSignature(node, candidatesOutArray) { + switch (node.kind) { + case 174 /* CallExpression */: + return resolveCallExpression(node, candidatesOutArray); + case 175 /* NewExpression */: + return resolveNewExpression(node, candidatesOutArray); + case 176 /* TaggedTemplateExpression */: + return resolveTaggedTemplateExpression(node, candidatesOutArray); + case 143 /* Decorator */: + return resolveDecorator(node, candidatesOutArray); + } + ts.Debug.fail("Branch in 'resolveSignature' should be unreachable."); + } // candidatesOutArray is passed by signature help in the language service, and collectCandidates // must fill it up with the appropriate candidate signatures function getResolvedSignature(node, candidatesOutArray) { @@ -24049,30 +27659,27 @@ var ts; // However, it is possible that either candidatesOutArray was not passed in the first time, // or that a different candidatesOutArray was passed in. Therefore, we need to redo the work // to correctly fill the candidatesOutArray. - if (!links.resolvedSignature || candidatesOutArray) { - links.resolvedSignature = anySignature; - if (node.kind === 171 /* CallExpression */) { - links.resolvedSignature = resolveCallExpression(node, candidatesOutArray); - } - else if (node.kind === 172 /* NewExpression */) { - links.resolvedSignature = resolveNewExpression(node, candidatesOutArray); - } - else if (node.kind === 173 /* TaggedTemplateExpression */) { - links.resolvedSignature = resolveTaggedTemplateExpression(node, candidatesOutArray); - } - else if (node.kind === 140 /* Decorator */) { - links.resolvedSignature = resolveDecorator(node, candidatesOutArray); - } - else { - ts.Debug.fail("Branch in 'getResolvedSignature' should be unreachable."); - } + var cached = links.resolvedSignature; + if (cached && cached !== resolvingSignature && !candidatesOutArray) { + return cached; } - return links.resolvedSignature; + links.resolvedSignature = resolvingSignature; + var result = resolveSignature(node, candidatesOutArray); + // If signature resolution originated in control flow type analysis (for example to compute the + // assigned type in a flow assignment) we don't cache the result as it may be based on temporary + // types from the control flow analysis. + links.resolvedSignature = flowLoopStart === flowLoopCount ? result : cached; + return result; + } + function getResolvedOrAnySignature(node) { + // If we're already in the process of resolving the given signature, don't resolve again as + // that could cause infinite recursion. Instead, return anySignature. + return getNodeLinks(node).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(node); } function getInferredClassType(symbol) { var links = getSymbolLinks(symbol); if (!links.inferredClassType) { - links.inferredClassType = createAnonymousType(undefined, symbol.members, emptyArray, emptyArray, /*stringIndexType*/ undefined, /*numberIndexType*/ undefined); + links.inferredClassType = createAnonymousType(symbol, symbol.members, emptyArray, emptyArray, /*stringIndexType*/ undefined, /*numberIndexType*/ undefined); } return links.inferredClassType; } @@ -24088,18 +27695,22 @@ var ts; if (node.expression.kind === 95 /* SuperKeyword */) { return voidType; } - if (node.kind === 172 /* NewExpression */) { + if (node.kind === 175 /* NewExpression */) { var declaration = signature.declaration; if (declaration && - declaration.kind !== 145 /* Constructor */ && - declaration.kind !== 149 /* ConstructSignature */ && - declaration.kind !== 154 /* ConstructorType */ && + declaration.kind !== 148 /* Constructor */ && + declaration.kind !== 152 /* ConstructSignature */ && + declaration.kind !== 157 /* ConstructorType */ && !ts.isJSDocConstructSignature(declaration)) { // When resolved signature is a call signature (and not a construct signature) the result type is any, unless // the declaring function had members created through 'x.prototype.y = expr' or 'this.y = expr' psuedodeclarations // in a JS file - var funcSymbol = checkExpression(node.expression).symbol; - if (funcSymbol && funcSymbol.members && (funcSymbol.flags & 16 /* Function */)) { + // Note:JS inferred classes might come from a variable declaration instead of a function declaration. + // In this case, using getResolvedSymbol directly is required to avoid losing the members from the declaration. + var funcSymbol = node.expression.kind === 69 /* Identifier */ ? + getResolvedSymbol(node.expression) : + checkExpression(node.expression).symbol; + if (funcSymbol && funcSymbol.members && (funcSymbol.flags & 16 /* Function */ || ts.isDeclarationOfFunctionExpression(funcSymbol))) { return getInferredClassType(funcSymbol); } else if (compilerOptions.noImplicitAny) { @@ -24119,25 +27730,42 @@ var ts; } function checkAssertion(node) { var exprType = getRegularTypeOfObjectLiteral(checkExpression(node.expression)); + checkSourceElement(node.type); var targetType = getTypeFromTypeNode(node.type); if (produceDiagnostics && targetType !== unknownType) { var widenedType = getWidenedType(exprType); - // Permit 'number[] | "foo"' to be asserted to 'string'. - var bothAreStringLike = someConstituentTypeHasKind(targetType, 258 /* StringLike */) && - someConstituentTypeHasKind(widenedType, 258 /* StringLike */); - if (!bothAreStringLike && !(isTypeAssignableTo(targetType, widenedType))) { - checkTypeAssignableTo(exprType, targetType, node, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); + if (!isTypeComparableTo(targetType, widenedType)) { + checkTypeComparableTo(exprType, targetType, node, ts.Diagnostics.Type_0_cannot_be_converted_to_type_1); } } return targetType; } + function checkNonNullAssertion(node) { + return getNonNullableType(checkExpression(node.expression)); + } + function getTypeOfParameter(symbol) { + var type = getTypeOfSymbol(symbol); + if (strictNullChecks) { + var declaration = symbol.valueDeclaration; + if (declaration && declaration.initializer) { + return includeFalsyTypes(type, 2048 /* Undefined */); + } + } + return type; + } function getTypeAtPosition(signature, pos) { return signature.hasRestParameter ? - pos < signature.parameters.length - 1 ? getTypeOfSymbol(signature.parameters[pos]) : getRestTypeOfSignature(signature) : - pos < signature.parameters.length ? getTypeOfSymbol(signature.parameters[pos]) : anyType; + pos < signature.parameters.length - 1 ? getTypeOfParameter(signature.parameters[pos]) : getRestTypeOfSignature(signature) : + pos < signature.parameters.length ? getTypeOfParameter(signature.parameters[pos]) : anyType; } function assignContextualParameterTypes(signature, context, mapper) { var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); + if (context.thisParameter) { + if (!signature.thisParameter) { + signature.thisParameter = createTransientSymbol(context.thisParameter, undefined); + } + assignTypeToParameterAndFixTypeParameters(signature.thisParameter, getTypeOfSymbol(context.thisParameter), mapper); + } for (var i = 0; i < len; i++) { var parameter = signature.parameters[i]; var contextualParameterType = getTypeAtPosition(context, i); @@ -24155,7 +27783,7 @@ var ts; if (ts.isBindingPattern(node.name)) { for (var _i = 0, _a = node.name.elements; _i < _a.length; _i++) { var element = _a[_i]; - if (element.kind !== 190 /* OmittedExpression */) { + if (element.kind !== 193 /* OmittedExpression */) { if (element.name.kind === 69 /* Identifier */) { getSymbolLinks(getSymbolOfNode(element)).type = getTypeForBindingElement(element); } @@ -24168,6 +27796,12 @@ var ts; var links = getSymbolLinks(parameter); if (!links.type) { links.type = instantiateType(contextualType, mapper); + // if inference didn't come up with anything but {}, fall back to the binding pattern if present. + if (links.type === emptyObjectType && + (parameter.valueDeclaration.name.kind === 167 /* ObjectBindingPattern */ || + parameter.valueDeclaration.name.kind === 168 /* ArrayBindingPattern */)) { + links.type = getTypeFromBindingPattern(parameter.valueDeclaration.name); + } assignBindingElementTypes(parameter.valueDeclaration); } else if (isInferentialContext(mapper)) { @@ -24220,6 +27854,14 @@ var ts; } return emptyObjectType; } + function createPromiseReturnType(func, promisedType) { + var promiseType = createPromiseType(promisedType); + if (promiseType === emptyObjectType) { + error(func, ts.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); + return unknownType; + } + return promiseType; + } function getReturnTypeFromBody(func, contextualMapper) { var contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func); if (!func.body) { @@ -24227,7 +27869,7 @@ var ts; } var isAsync = ts.isAsyncFunctionLike(func); var type; - if (func.body.kind !== 195 /* Block */) { + if (func.body.kind !== 199 /* Block */) { type = checkExpressionCached(func.body, contextualMapper); if (isAsync) { // From within an async function you can return either a non-promise value or a promise. Any @@ -24241,7 +27883,7 @@ var ts; var types = void 0; var funcIsGenerator = !!func.asteriskToken; if (funcIsGenerator) { - types = checkAndAggregateYieldOperandTypes(func.body, contextualMapper); + types = checkAndAggregateYieldOperandTypes(func, contextualMapper); if (types.length === 0) { var iterableIteratorAny = createIterableIteratorType(anyType); if (compilerOptions.noImplicitAny) { @@ -24251,25 +27893,19 @@ var ts; } } else { - types = checkAndAggregateReturnExpressionTypes(func.body, contextualMapper, isAsync); + types = checkAndAggregateReturnExpressionTypes(func, contextualMapper); + if (!types) { + // For an async function, the return type will not be never, but rather a Promise for never. + return isAsync ? createPromiseReturnType(func, neverType) : neverType; + } if (types.length === 0) { - if (isAsync) { - // For an async function, the return type will not be void, but rather a Promise for void. - var promiseType = createPromiseType(voidType); - if (promiseType === emptyObjectType) { - error(func, ts.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); - return unknownType; - } - return promiseType; - } - else { - return voidType; - } + // For an async function, the return type will not be void, but rather a Promise for void. + return isAsync ? createPromiseReturnType(func, voidType) : voidType; } } // When yield/return statements are contextually typed we allow the return type to be a union type. // Otherwise we require the yield/return expressions to have a best common supertype. - type = contextualSignature ? getUnionType(types) : getCommonSupertype(types); + type = contextualSignature ? getUnionType(types, /*subtypeReduction*/ true) : getCommonSupertype(types); if (!type) { if (funcIsGenerator) { error(func, ts.Diagnostics.No_best_common_type_exists_among_yield_expressions); @@ -24278,7 +27914,7 @@ var ts; else { error(func, ts.Diagnostics.No_best_common_type_exists_among_return_expressions); // Defer to unioning the return types so we get a) downstream errors earlier and b) better Salsa experience - return getUnionType(types); + return isAsync ? createPromiseReturnType(func, getUnionType(types, /*subtypeReduction*/ true)) : getUnionType(types, /*subtypeReduction*/ true); } } if (funcIsGenerator) { @@ -24289,24 +27925,14 @@ var ts; reportErrorsFromWidening(func, type); } var widenedType = getWidenedType(type); - if (isAsync) { - // From within an async function you can return either a non-promise value or a promise. Any - // Promise/A+ compatible implementation will always assimilate any foreign promise, so the - // return type of the body is awaited type of the body, wrapped in a native Promise type. - var promiseType = createPromiseType(widenedType); - if (promiseType === emptyObjectType) { - error(func, ts.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); - return unknownType; - } - return promiseType; - } - else { - return widenedType; - } + // From within an async function you can return either a non-promise value or a promise. Any + // Promise/A+ compatible implementation will always assimilate any foreign promise, so the + // return type of the body is awaited type of the body, wrapped in a native Promise type. + return isAsync ? createPromiseReturnType(func, widenedType) : widenedType; } - function checkAndAggregateYieldOperandTypes(body, contextualMapper) { + function checkAndAggregateYieldOperandTypes(func, contextualMapper) { var aggregatedTypes = []; - ts.forEachYieldExpression(body, function (yieldExpression) { + ts.forEachYieldExpression(func.body, function (yieldExpression) { var expr = yieldExpression.expression; if (expr) { var type = checkExpressionCached(expr, contextualMapper); @@ -24321,9 +27947,36 @@ var ts; }); return aggregatedTypes; } - function checkAndAggregateReturnExpressionTypes(body, contextualMapper, isAsync) { + function isExhaustiveSwitchStatement(node) { + if (!node.possiblyExhaustive) { + return false; + } + var type = checkExpression(node.expression); + if (!isUnitUnionType(type)) { + return false; + } + var switchTypes = getSwitchClauseTypes(node); + if (!switchTypes.length) { + return false; + } + return eachTypeContainedIn(type, switchTypes); + } + function functionHasImplicitReturn(func) { + if (!(func.flags & 32768 /* HasImplicitReturn */)) { + return false; + } + var lastStatement = ts.lastOrUndefined(func.body.statements); + if (lastStatement && lastStatement.kind === 213 /* SwitchStatement */ && isExhaustiveSwitchStatement(lastStatement)) { + return false; + } + return true; + } + function checkAndAggregateReturnExpressionTypes(func, contextualMapper) { + var isAsync = ts.isAsyncFunctionLike(func); var aggregatedTypes = []; - ts.forEachReturnStatement(body, function (returnStatement) { + var hasReturnWithNoExpression = functionHasImplicitReturn(func); + var hasReturnOfTypeNever = false; + ts.forEachReturnStatement(func.body, function (returnStatement) { var expr = returnStatement.expression; if (expr) { var type = checkExpressionCached(expr, contextualMapper); @@ -24332,13 +27985,28 @@ var ts; // Promise/A+ compatible implementation will always assimilate any foreign promise, so the // return type of the body should be unwrapped to its awaited type, which should be wrapped in // the native Promise type by the caller. - type = checkAwaitedType(type, body.parent, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); + type = checkAwaitedType(type, func, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); } - if (!ts.contains(aggregatedTypes, type)) { + if (type === neverType) { + hasReturnOfTypeNever = true; + } + else if (!ts.contains(aggregatedTypes, type)) { aggregatedTypes.push(type); } } + else { + hasReturnWithNoExpression = true; + } }); + if (aggregatedTypes.length === 0 && !hasReturnWithNoExpression && (hasReturnOfTypeNever || + func.kind === 179 /* FunctionExpression */ || func.kind === 180 /* ArrowFunction */)) { + return undefined; + } + if (strictNullChecks && aggregatedTypes.length && hasReturnWithNoExpression) { + if (!ts.contains(aggregatedTypes, undefinedType)) { + aggregatedTypes.push(undefinedType); + } + } return aggregatedTypes; } /** @@ -24355,30 +28023,37 @@ var ts; return; } // Functions with with an explicitly specified 'void' or 'any' return type don't need any return expressions. - if (returnType === voidType || isTypeAny(returnType) || (returnType && (returnType.flags & 16384 /* Union */) && someConstituentTypeHasKind(returnType, 1 /* Any */ | 16 /* Void */))) { + if (returnType && maybeTypeOfKind(returnType, 1 /* Any */ | 1024 /* Void */)) { return; } // If all we have is a function signature, or an arrow function with an expression body, then there is nothing to check. // also if HasImplicitReturn flag is not set this means that all codepaths in function body end with return or throw - if (ts.nodeIsMissing(func.body) || func.body.kind !== 195 /* Block */ || !(func.flags & 524288 /* HasImplicitReturn */)) { + if (ts.nodeIsMissing(func.body) || func.body.kind !== 199 /* Block */ || !functionHasImplicitReturn(func)) { return; } - var hasExplicitReturn = func.flags & 1048576 /* HasExplicitReturn */; - if (returnType && !hasExplicitReturn) { + var hasExplicitReturn = func.flags & 65536 /* HasExplicitReturn */; + if (returnType === neverType) { + error(func.type, ts.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point); + } + else if (returnType && !hasExplicitReturn) { // minimal check: function has syntactic return type annotation and no explicit return statements in the body // this function does not conform to the specification. // NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present error(func.type, ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value); } + else if (returnType && strictNullChecks && !isTypeAssignableTo(undefinedType, returnType)) { + error(func.type, ts.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined); + } else if (compilerOptions.noImplicitReturns) { if (!returnType) { // If return type annotation is omitted check if function has any explicit return statements. // If it does not have any - its inferred return type is void - don't do any checks. // Otherwise get inferred return type from function body and report error only if it is not void / anytype - var inferredReturnType = hasExplicitReturn - ? getReturnTypeOfSignature(getSignatureFromDeclaration(func)) - : voidType; - if (inferredReturnType === voidType || isTypeAny(inferredReturnType)) { + if (!hasExplicitReturn) { + return; + } + var inferredReturnType = getReturnTypeOfSignature(getSignatureFromDeclaration(func)); + if (isUnwrappedReturnTypeVoidOrAny(func, inferredReturnType)) { return; } } @@ -24386,10 +28061,10 @@ var ts; } } function checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper) { - ts.Debug.assert(node.kind !== 144 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 147 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); // Grammar checking var hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 176 /* FunctionExpression */) { + if (!hasGrammarError && node.kind === 179 /* FunctionExpression */) { checkGrammarForGenerator(node); } // The identityMapper object is used to indicate that function expressions are wildcards @@ -24430,14 +28105,14 @@ var ts; } } } - if (produceDiagnostics && node.kind !== 144 /* MethodDeclaration */ && node.kind !== 143 /* MethodSignature */) { + if (produceDiagnostics && node.kind !== 147 /* MethodDeclaration */ && node.kind !== 146 /* MethodSignature */) { checkCollisionWithCapturedSuperVariable(node, node.name); checkCollisionWithCapturedThisVariable(node, node.name); } return type; } function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - ts.Debug.assert(node.kind !== 144 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); + ts.Debug.assert(node.kind !== 147 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); var isAsync = ts.isAsyncFunctionLike(node); var returnOrPromisedType = node.type && (isAsync ? checkAsyncFunctionReturnType(node) : getTypeFromTypeNode(node.type)); if (!node.asteriskToken) { @@ -24453,7 +28128,7 @@ var ts; // checkFunctionExpressionBodies). So it must be done now. getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } - if (node.body.kind === 195 /* Block */) { + if (node.body.kind === 199 /* Block */) { checkSourceElement(node.body); } else { @@ -24473,84 +28148,92 @@ var ts; } } } + registerForUnusedIdentifiersCheck(node); } } function checkArithmeticOperandType(operand, type, diagnostic) { - if (!isTypeAnyOrAllConstituentTypesHaveKind(type, 132 /* NumberLike */)) { + if (!isTypeAnyOrAllConstituentTypesHaveKind(type, 340 /* NumberLike */)) { error(operand, diagnostic); return false; } return true; } - function checkReferenceExpression(n, invalidReferenceMessage, constantVariableMessage) { - function findSymbol(n) { - var symbol = getNodeLinks(n).resolvedSymbol; - // Because we got the symbol from the resolvedSymbol property, it might be of kind - // SymbolFlags.ExportValue. In this case it is necessary to get the actual export - // symbol, which will have the correct flags set on it. - return symbol && getExportSymbolOfValueSymbolIfExported(symbol); - } - function isReferenceOrErrorExpression(n) { - // TypeScript 1.0 spec (April 2014): - // Expressions are classified as values or references. - // References are the subset of expressions that are permitted as the target of an assignment. - // Specifically, references are combinations of identifiers(section 4.3), parentheses(section 4.7), - // and property accesses(section 4.10). - // All other expression constructs described in this chapter are classified as values. - switch (n.kind) { - case 69 /* Identifier */: { - var symbol = findSymbol(n); - // TypeScript 1.0 spec (April 2014): 4.3 - // An identifier expression that references a variable or parameter is classified as a reference. - // An identifier expression that references any other kind of entity is classified as a value(and therefore cannot be the target of an assignment). - return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & 3 /* Variable */) !== 0; - } - case 169 /* PropertyAccessExpression */: { - var symbol = findSymbol(n); - // TypeScript 1.0 spec (April 2014): 4.10 - // A property access expression is always classified as a reference. - // NOTE (not in spec): assignment to enum members should not be allowed - return !symbol || symbol === unknownSymbol || (symbol.flags & ~8 /* EnumMember */) !== 0; - } - case 170 /* ElementAccessExpression */: - // old compiler doesn't check indexed access + function isReadonlySymbol(symbol) { + // The following symbols are considered read-only: + // Properties with a 'readonly' modifier + // Variables declared with 'const' + // Get accessors without matching set accessors + // Enum members + // Unions and intersections of the above (unions and intersections eagerly set isReadonly on creation) + return symbol.isReadonly || + symbol.flags & 4 /* Property */ && (getDeclarationFlagsFromSymbol(symbol) & 64 /* Readonly */) !== 0 || + symbol.flags & 3 /* Variable */ && (getDeclarationFlagsFromSymbol(symbol) & 2048 /* Const */) !== 0 || + symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || + (symbol.flags & 8 /* EnumMember */) !== 0; + } + function isReferenceToReadonlyEntity(expr, symbol) { + if (isReadonlySymbol(symbol)) { + // Allow assignments to readonly properties within constructors of the same class declaration. + if (symbol.flags & 4 /* Property */ && + (expr.kind === 172 /* PropertyAccessExpression */ || expr.kind === 173 /* ElementAccessExpression */) && + expr.expression.kind === 97 /* ThisKeyword */) { + // Look for if this is the constructor for the class that `symbol` is a property of. + var func = ts.getContainingFunction(expr); + if (!(func && func.kind === 148 /* Constructor */)) return true; - case 175 /* ParenthesizedExpression */: - return isReferenceOrErrorExpression(n.expression); - default: - return false; + // If func.parent is a class and symbol is a (readonly) property of that class, or + // if func is a constructor and symbol is a (readonly) parameter property declared in it, + // then symbol is writeable here. + return !(func.parent === symbol.valueDeclaration.parent || func === symbol.valueDeclaration.parent); + } + return true; + } + return false; + } + function isReferenceThroughNamespaceImport(expr) { + if (expr.kind === 172 /* PropertyAccessExpression */ || expr.kind === 173 /* ElementAccessExpression */) { + var node = skipParenthesizedNodes(expr.expression); + if (node.kind === 69 /* Identifier */) { + var symbol = getNodeLinks(node).resolvedSymbol; + if (symbol.flags & 8388608 /* Alias */) { + var declaration = getDeclarationOfAliasSymbol(symbol); + return declaration && declaration.kind === 232 /* NamespaceImport */; + } } } - function isConstVariableReference(n) { - switch (n.kind) { - case 69 /* Identifier */: - case 169 /* PropertyAccessExpression */: { - var symbol = findSymbol(n); - return symbol && (symbol.flags & 3 /* Variable */) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 16384 /* Const */) !== 0; - } - case 170 /* ElementAccessExpression */: { - var index = n.argumentExpression; - var symbol = findSymbol(n.expression); - if (symbol && index && index.kind === 9 /* StringLiteral */) { - var name_12 = index.text; - var prop = getPropertyOfType(getTypeOfSymbol(symbol), name_12); - return prop && (prop.flags & 3 /* Variable */) !== 0 && (getDeclarationFlagsFromSymbol(prop) & 16384 /* Const */) !== 0; - } + return false; + } + function checkReferenceExpression(expr, invalidReferenceMessage, constantVariableMessage) { + // References are combinations of identifiers, parentheses, and property accesses. + var node = skipParenthesizedNodes(expr); + if (node.kind !== 69 /* Identifier */ && node.kind !== 172 /* PropertyAccessExpression */ && node.kind !== 173 /* ElementAccessExpression */) { + error(expr, invalidReferenceMessage); + return false; + } + // Because we get the symbol from the resolvedSymbol property, it might be of kind + // SymbolFlags.ExportValue. In this case it is necessary to get the actual export + // symbol, which will have the correct flags set on it. + var links = getNodeLinks(node); + var symbol = getExportSymbolOfValueSymbolIfExported(links.resolvedSymbol); + if (symbol) { + if (symbol !== unknownSymbol && symbol !== argumentsSymbol) { + // Only variables (and not functions, classes, namespaces, enum objects, or enum members) + // are considered references when referenced using a simple identifier. + if (node.kind === 69 /* Identifier */ && !(symbol.flags & 3 /* Variable */)) { + error(expr, invalidReferenceMessage); return false; } - case 175 /* ParenthesizedExpression */: - return isConstVariableReference(n.expression); - default: + if (isReferenceToReadonlyEntity(node, symbol) || isReferenceThroughNamespaceImport(node)) { + error(expr, constantVariableMessage); return false; + } } } - if (!isReferenceOrErrorExpression(n)) { - error(n, invalidReferenceMessage); - return false; - } - if (isConstVariableReference(n)) { - error(n, constantVariableMessage); - return false; + else if (node.kind === 173 /* ElementAccessExpression */) { + if (links.resolvedIndexInfo && links.resolvedIndexInfo.isReadonly) { + error(expr, constantVariableMessage); + return false; + } } return true; } @@ -24564,12 +28247,12 @@ var ts; } function checkVoidExpression(node) { checkExpression(node.expression); - return undefinedType; + return undefinedWideningType; } function checkAwaitExpression(node) { // Grammar checking if (produceDiagnostics) { - if (!(node.parserContextFlags & 8 /* Await */)) { + if (!(node.flags & 33554432 /* AwaitContext */)) { grammarErrorOnFirstToken(node, ts.Diagnostics.await_expression_is_only_allowed_within_an_async_function); } if (isInParameterInitializerBeforeContainingFunction(node)) { @@ -24581,22 +28264,28 @@ var ts; } function checkPrefixUnaryExpression(node) { var operandType = checkExpression(node.operand); + if (node.operator === 36 /* MinusToken */ && node.operand.kind === 8 /* NumericLiteral */ && isLiteralContextForType(node, numberType)) { + return getLiteralTypeForText(64 /* NumberLiteral */, "" + -node.operand.text); + } switch (node.operator) { case 35 /* PlusToken */: case 36 /* MinusToken */: case 50 /* TildeToken */: - if (someConstituentTypeHasKind(operandType, 16777216 /* ESSymbol */)) { + if (maybeTypeOfKind(operandType, 512 /* ESSymbol */)) { error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator)); } return numberType; case 49 /* ExclamationToken */: - return booleanType; + var facts = getTypeFacts(operandType) & (1048576 /* Truthy */ | 2097152 /* Falsy */); + return facts === 1048576 /* Truthy */ ? falseType : + facts === 2097152 /* Falsy */ ? trueType : + booleanType; case 41 /* PlusPlusToken */: case 42 /* MinusMinusToken */: - var ok = checkArithmeticOperandType(node.operand, operandType, ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); + var ok = checkArithmeticOperandType(node.operand, getNonNullableType(operandType), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); if (ok) { // run check only if former checks succeeded to avoid reporting cascading errors - checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant); + checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant_or_a_read_only_property); } return numberType; } @@ -24604,50 +28293,60 @@ var ts; } function checkPostfixUnaryExpression(node) { var operandType = checkExpression(node.operand); - var ok = checkArithmeticOperandType(node.operand, operandType, ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); + var ok = checkArithmeticOperandType(node.operand, getNonNullableType(operandType), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); if (ok) { // run check only if former checks succeeded to avoid reporting cascading errors - checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant); + checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant_or_a_read_only_property); } return numberType; } - // Just like isTypeOfKind below, except that it returns true if *any* constituent - // has this kind. - function someConstituentTypeHasKind(type, kind) { + // Return true if type might be of the given kind. A union or intersection type might be of a given + // kind if at least one constituent type is of the given kind. + function maybeTypeOfKind(type, kind) { if (type.flags & kind) { return true; } - if (type.flags & 49152 /* UnionOrIntersection */) { + if (type.flags & 1572864 /* UnionOrIntersection */) { var types = type.types; - for (var _i = 0, types_10 = types; _i < types_10.length; _i++) { - var current = types_10[_i]; - if (current.flags & kind) { + for (var _i = 0, types_13 = types; _i < types_13.length; _i++) { + var t = types_13[_i]; + if (maybeTypeOfKind(t, kind)) { return true; } } - return false; } return false; } - // Return true if type has the given flags, or is a union or intersection type composed of types that all have those flags. - function allConstituentTypesHaveKind(type, kind) { + // Return true if type is of the given kind. A union type is of a given kind if all constituent types + // are of the given kind. An intersection type is of a given kind if at least one constituent type is + // of the given kind. + function isTypeOfKind(type, kind) { if (type.flags & kind) { return true; } - if (type.flags & 49152 /* UnionOrIntersection */) { + if (type.flags & 524288 /* Union */) { var types = type.types; - for (var _i = 0, types_11 = types; _i < types_11.length; _i++) { - var current = types_11[_i]; - if (!(current.flags & kind)) { + for (var _i = 0, types_14 = types; _i < types_14.length; _i++) { + var t = types_14[_i]; + if (!isTypeOfKind(t, kind)) { return false; } } return true; } + if (type.flags & 1048576 /* Intersection */) { + var types = type.types; + for (var _a = 0, types_15 = types; _a < types_15.length; _a++) { + var t = types_15[_a]; + if (isTypeOfKind(t, kind)) { + return true; + } + } + } return false; } function isConstEnumObjectType(type) { - return type.flags & (80896 /* ObjectType */ | 65536 /* Anonymous */) && type.symbol && isConstEnumSymbol(type.symbol); + return type.flags & (2588672 /* ObjectType */ | 2097152 /* Anonymous */) && type.symbol && isConstEnumSymbol(type.symbol); } function isConstEnumSymbol(symbol) { return (symbol.flags & 128 /* ConstEnum */) !== 0; @@ -24658,7 +28357,7 @@ var ts; // and the right operand to be of type Any or a subtype of the 'Function' interface type. // The result is always of the Boolean primitive type. // NOTE: do not raise error if leftType is unknown as related error was already reported - if (allConstituentTypesHaveKind(leftType, 16777726 /* Primitive */)) { + if (isTypeOfKind(leftType, 8190 /* Primitive */)) { error(left, ts.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } // NOTE: do not raise error if right is unknown as related error was already reported @@ -24672,10 +28371,10 @@ var ts; // The in operator requires the left operand to be of type Any, the String primitive type, or the Number primitive type, // and the right operand to be of type Any, an object type, or a type parameter type. // The result is always of the Boolean primitive type. - if (!isTypeAnyOrAllConstituentTypesHaveKind(leftType, 258 /* StringLike */ | 132 /* NumberLike */ | 16777216 /* ESSymbol */)) { + if (!isTypeAnyOrAllConstituentTypesHaveKind(leftType, 34 /* StringLike */ | 340 /* NumberLike */ | 512 /* ESSymbol */)) { error(left, ts.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol); } - if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 80896 /* ObjectType */ | 512 /* TypeParameter */)) { + if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 2588672 /* ObjectType */ | 16384 /* TypeParameter */)) { error(right, ts.Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } return booleanType; @@ -24684,38 +28383,41 @@ var ts; var properties = node.properties; for (var _i = 0, properties_3 = properties; _i < properties_3.length; _i++) { var p = properties_3[_i]; - if (p.kind === 248 /* PropertyAssignment */ || p.kind === 249 /* ShorthandPropertyAssignment */) { - var name_13 = p.name; - if (name_13.kind === 137 /* ComputedPropertyName */) { - checkComputedPropertyName(name_13); - } - if (isComputedNonLiteralName(name_13)) { - continue; - } - var text = getTextOfPropertyName(name_13); - var type = isTypeAny(sourceType) - ? sourceType - : getTypeOfPropertyOfType(sourceType, text) || - isNumericLiteralName(text) && getIndexTypeOfType(sourceType, 1 /* Number */) || - getIndexTypeOfType(sourceType, 0 /* String */); - if (type) { - if (p.kind === 249 /* ShorthandPropertyAssignment */) { - checkDestructuringAssignment(p, type); - } - else { - // non-shorthand property assignments should always have initializers - checkDestructuringAssignment(p.initializer, type); - } + checkObjectLiteralDestructuringPropertyAssignment(sourceType, p, contextualMapper); + } + return sourceType; + } + function checkObjectLiteralDestructuringPropertyAssignment(objectLiteralType, property, contextualMapper) { + if (property.kind === 253 /* PropertyAssignment */ || property.kind === 254 /* ShorthandPropertyAssignment */) { + var name_14 = property.name; + if (name_14.kind === 140 /* ComputedPropertyName */) { + checkComputedPropertyName(name_14); + } + if (isComputedNonLiteralName(name_14)) { + return undefined; + } + var text = getTextOfPropertyName(name_14); + var type = isTypeAny(objectLiteralType) + ? objectLiteralType + : getTypeOfPropertyOfType(objectLiteralType, text) || + isNumericLiteralName(text) && getIndexTypeOfType(objectLiteralType, 1 /* Number */) || + getIndexTypeOfType(objectLiteralType, 0 /* String */); + if (type) { + if (property.kind === 254 /* ShorthandPropertyAssignment */) { + return checkDestructuringAssignment(property, type); } else { - error(name_13, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(sourceType), ts.declarationNameToString(name_13)); + // non-shorthand property assignments should always have initializers + return checkDestructuringAssignment(property.initializer, type); } } else { - error(p, ts.Diagnostics.Property_assignment_expected); + error(name_14, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(objectLiteralType), ts.declarationNameToString(name_14)); } } - return sourceType; + else { + error(property, ts.Diagnostics.Property_assignment_expected); + } } function checkArrayLiteralAssignment(node, sourceType, contextualMapper) { // This elementType will be used if the specific property corresponding to this index is not @@ -24724,50 +28426,64 @@ var ts; var elementType = checkIteratedTypeOrElementType(sourceType, node, /*allowStringInput*/ false) || unknownType; var elements = node.elements; for (var i = 0; i < elements.length; i++) { - var e = elements[i]; - if (e.kind !== 190 /* OmittedExpression */) { - if (e.kind !== 188 /* SpreadElementExpression */) { - var propName = "" + i; - var type = isTypeAny(sourceType) - ? sourceType - : isTupleLikeType(sourceType) - ? getTypeOfPropertyOfType(sourceType, propName) - : elementType; - if (type) { - checkDestructuringAssignment(e, type, contextualMapper); - } - else { - if (isTupleType(sourceType)) { - error(e, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(sourceType), sourceType.elementTypes.length, elements.length); - } - else { - error(e, ts.Diagnostics.Type_0_has_no_property_1, typeToString(sourceType), propName); - } - } + checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, elementType, contextualMapper); + } + return sourceType; + } + function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, contextualMapper) { + var elements = node.elements; + var element = elements[elementIndex]; + if (element.kind !== 193 /* OmittedExpression */) { + if (element.kind !== 191 /* SpreadElementExpression */) { + var propName = "" + elementIndex; + var type = isTypeAny(sourceType) + ? sourceType + : isTupleLikeType(sourceType) + ? getTypeOfPropertyOfType(sourceType, propName) + : elementType; + if (type) { + return checkDestructuringAssignment(element, type, contextualMapper); } else { - if (i < elements.length - 1) { - error(e, ts.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern); + // We still need to check element expression here because we may need to set appropriate flag on the expression + // such as NodeCheckFlags.LexicalThis on "this"expression. + checkExpression(element); + if (isTupleType(sourceType)) { + error(element, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(sourceType), getTypeReferenceArity(sourceType), elements.length); } else { - var restExpression = e.expression; - if (restExpression.kind === 184 /* BinaryExpression */ && restExpression.operatorToken.kind === 56 /* EqualsToken */) { - error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer); - } - else { - checkDestructuringAssignment(restExpression, createArrayType(elementType), contextualMapper); - } + error(element, ts.Diagnostics.Type_0_has_no_property_1, typeToString(sourceType), propName); + } + } + } + else { + if (elementIndex < elements.length - 1) { + error(element, ts.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern); + } + else { + var restExpression = element.expression; + if (restExpression.kind === 187 /* BinaryExpression */ && restExpression.operatorToken.kind === 56 /* EqualsToken */) { + error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer); + } + else { + return checkDestructuringAssignment(restExpression, createArrayType(elementType), contextualMapper); } } } } - return sourceType; + return undefined; } function checkDestructuringAssignment(exprOrAssignment, sourceType, contextualMapper) { var target; - if (exprOrAssignment.kind === 249 /* ShorthandPropertyAssignment */) { + if (exprOrAssignment.kind === 254 /* ShorthandPropertyAssignment */) { var prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { + // In strict null checking mode, if a default value of a non-undefined type is specified, remove + // undefined from the final type. + if (strictNullChecks && + !(getFalsyFlags(checkExpression(prop.objectAssignmentInitializer)) & 2048 /* Undefined */)) { + sourceType = getTypeWithFacts(sourceType, 131072 /* NEUndefined */); + } checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, contextualMapper); } target = exprOrAssignment.name; @@ -24775,31 +28491,41 @@ var ts; else { target = exprOrAssignment; } - if (target.kind === 184 /* BinaryExpression */ && target.operatorToken.kind === 56 /* EqualsToken */) { + if (target.kind === 187 /* BinaryExpression */ && target.operatorToken.kind === 56 /* EqualsToken */) { checkBinaryExpression(target, contextualMapper); target = target.left; } - if (target.kind === 168 /* ObjectLiteralExpression */) { + if (target.kind === 171 /* ObjectLiteralExpression */) { return checkObjectLiteralAssignment(target, sourceType, contextualMapper); } - if (target.kind === 167 /* ArrayLiteralExpression */) { + if (target.kind === 170 /* ArrayLiteralExpression */) { return checkArrayLiteralAssignment(target, sourceType, contextualMapper); } return checkReferenceAssignment(target, sourceType, contextualMapper); } function checkReferenceAssignment(target, sourceType, contextualMapper) { var targetType = checkExpression(target, contextualMapper); - if (checkReferenceExpression(target, ts.Diagnostics.Invalid_left_hand_side_of_assignment_expression, ts.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant)) { + if (checkReferenceExpression(target, ts.Diagnostics.Invalid_left_hand_side_of_assignment_expression, ts.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant_or_a_read_only_property)) { checkTypeAssignableTo(sourceType, targetType, target, /*headMessage*/ undefined); } return sourceType; } + function isTypeEqualityComparableTo(source, target) { + return (target.flags & 6144 /* Nullable */) !== 0 || isTypeComparableTo(source, target); + } + function getBestChoiceType(type1, type2) { + var firstAssignableToSecond = isTypeAssignableTo(type1, type2); + var secondAssignableToFirst = isTypeAssignableTo(type2, type1); + return secondAssignableToFirst && !firstAssignableToSecond ? type1 : + firstAssignableToSecond && !secondAssignableToFirst ? type2 : + getUnionType([type1, type2], /*subtypeReduction*/ true); + } function checkBinaryExpression(node, contextualMapper) { return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, contextualMapper, node); } function checkBinaryLikeExpression(left, operatorToken, right, contextualMapper, errorNode) { var operator = operatorToken.kind; - if (operator === 56 /* EqualsToken */ && (left.kind === 168 /* ObjectLiteralExpression */ || left.kind === 167 /* ArrayLiteralExpression */)) { + if (operator === 56 /* EqualsToken */ && (left.kind === 171 /* ObjectLiteralExpression */ || left.kind === 170 /* ArrayLiteralExpression */)) { return checkDestructuringAssignment(left, checkExpression(right, contextualMapper), contextualMapper); } var leftType = checkExpression(left, contextualMapper); @@ -24833,15 +28559,17 @@ var ts; // as having the primitive type Number. If one operand is the null or undefined value, // it is treated as having the type of the other operand. // The result is always of the Number primitive type. - if (leftType.flags & (32 /* Undefined */ | 64 /* Null */)) + if (leftType.flags & 6144 /* Nullable */) leftType = rightType; - if (rightType.flags & (32 /* Undefined */ | 64 /* Null */)) + if (rightType.flags & 6144 /* Nullable */) rightType = leftType; + leftType = getNonNullableType(leftType); + rightType = getNonNullableType(rightType); var suggestedOperator = void 0; // if a user tries to apply a bitwise operator to 2 boolean operands // try and return them a helpful suggestion - if ((leftType.flags & 8 /* Boolean */) && - (rightType.flags & 8 /* Boolean */) && + if ((leftType.flags & 136 /* BooleanLike */) && + (rightType.flags & 136 /* BooleanLike */) && (suggestedOperator = getSuggestedBooleanOperator(operatorToken.kind)) !== undefined) { error(errorNode || operatorToken, ts.Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, ts.tokenToString(operatorToken.kind), ts.tokenToString(suggestedOperator)); } @@ -24860,18 +28588,20 @@ var ts; // The binary + operator requires both operands to be of the Number primitive type or an enum type, // or at least one of the operands to be of type Any or the String primitive type. // If one operand is the null or undefined value, it is treated as having the type of the other operand. - if (leftType.flags & (32 /* Undefined */ | 64 /* Null */)) + if (leftType.flags & 6144 /* Nullable */) leftType = rightType; - if (rightType.flags & (32 /* Undefined */ | 64 /* Null */)) + if (rightType.flags & 6144 /* Nullable */) rightType = leftType; + leftType = getNonNullableType(leftType); + rightType = getNonNullableType(rightType); var resultType = void 0; - if (allConstituentTypesHaveKind(leftType, 132 /* NumberLike */) && allConstituentTypesHaveKind(rightType, 132 /* NumberLike */)) { + if (isTypeOfKind(leftType, 340 /* NumberLike */) && isTypeOfKind(rightType, 340 /* NumberLike */)) { // Operands of an enum type are treated as having the primitive type Number. // If both operands are of the Number primitive type, the result is of the Number primitive type. resultType = numberType; } else { - if (allConstituentTypesHaveKind(leftType, 258 /* StringLike */) || allConstituentTypesHaveKind(rightType, 258 /* StringLike */)) { + if (isTypeOfKind(leftType, 34 /* StringLike */) || isTypeOfKind(rightType, 34 /* StringLike */)) { // If one or both operands are of the String primitive type, the result is of the String primitive type. resultType = stringType; } @@ -24897,19 +28627,23 @@ var ts; case 27 /* GreaterThanToken */: case 28 /* LessThanEqualsToken */: case 29 /* GreaterThanEqualsToken */: - if (!checkForDisallowedESSymbolOperand(operator)) { - return booleanType; + if (checkForDisallowedESSymbolOperand(operator)) { + if (!isTypeComparableTo(leftType, rightType) && !isTypeComparableTo(rightType, leftType)) { + reportOperatorError(); + } } - // Fall through + return booleanType; case 30 /* EqualsEqualsToken */: case 31 /* ExclamationEqualsToken */: case 32 /* EqualsEqualsEqualsToken */: case 33 /* ExclamationEqualsEqualsToken */: - // Permit 'number[] | "foo"' to be asserted to 'string'. - if (someConstituentTypeHasKind(leftType, 258 /* StringLike */) && someConstituentTypeHasKind(rightType, 258 /* StringLike */)) { - return booleanType; + var leftIsUnit = isUnitUnionType(leftType); + var rightIsUnit = isUnitUnionType(rightType); + if (!leftIsUnit || !rightIsUnit) { + leftType = leftIsUnit ? getBaseTypeOfUnitType(leftType) : leftType; + rightType = rightIsUnit ? getBaseTypeOfUnitType(rightType) : rightType; } - if (!isTypeAssignableTo(leftType, rightType) && !isTypeAssignableTo(rightType, leftType)) { + if (!isTypeEqualityComparableTo(leftType, rightType) && !isTypeEqualityComparableTo(rightType, leftType)) { reportOperatorError(); } return booleanType; @@ -24918,9 +28652,13 @@ var ts; case 90 /* InKeyword */: return checkInExpression(left, right, leftType, rightType); case 51 /* AmpersandAmpersandToken */: - return rightType; + return getTypeFacts(leftType) & 1048576 /* Truthy */ ? + includeFalsyTypes(rightType, getFalsyFlags(strictNullChecks ? leftType : getBaseTypeOfUnitType(rightType))) : + leftType; case 52 /* BarBarToken */: - return getUnionType([leftType, rightType]); + return getTypeFacts(leftType) & 2097152 /* Falsy */ ? + getBestChoiceType(removeDefinitelyFalsyTypes(leftType), rightType) : + leftType; case 56 /* EqualsToken */: checkAssignmentOperator(rightType); return getRegularTypeOfObjectLiteral(rightType); @@ -24929,8 +28667,8 @@ var ts; } // Return true if there was no error, false if there was an error. function checkForDisallowedESSymbolOperand(operator) { - var offendingSymbolOperand = someConstituentTypeHasKind(leftType, 16777216 /* ESSymbol */) ? left : - someConstituentTypeHasKind(rightType, 16777216 /* ESSymbol */) ? right : + var offendingSymbolOperand = maybeTypeOfKind(leftType, 512 /* ESSymbol */) ? left : + maybeTypeOfKind(rightType, 512 /* ESSymbol */) ? right : undefined; if (offendingSymbolOperand) { error(offendingSymbolOperand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(operator)); @@ -24961,7 +28699,7 @@ var ts; // requires VarExpr to be classified as a reference // A compound assignment furthermore requires VarExpr to be classified as a reference (section 4.1) // and the type of the non - compound operation to be assignable to the type of VarExpr. - var ok = checkReferenceExpression(left, ts.Diagnostics.Invalid_left_hand_side_of_assignment_expression, ts.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant); + var ok = checkReferenceExpression(left, ts.Diagnostics.Invalid_left_hand_side_of_assignment_expression, ts.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant_or_a_read_only_property); // Use default messages if (ok) { // to avoid cascading errors check assignability only if 'isReference' check succeeded and no errors were reported @@ -24991,7 +28729,7 @@ var ts; function checkYieldExpression(node) { // Grammar checking if (produceDiagnostics) { - if (!(node.parserContextFlags & 2 /* Yield */) || isYieldExpressionInClass(node)) { + if (!(node.flags & 8388608 /* YieldContext */) || isYieldExpressionInClass(node)) { grammarErrorOnFirstToken(node, ts.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); } if (isInParameterInitializerBeforeContainingFunction(node)) { @@ -25030,14 +28768,66 @@ var ts; checkExpression(node.condition); var type1 = checkExpression(node.whenTrue, contextualMapper); var type2 = checkExpression(node.whenFalse, contextualMapper); - return getUnionType([type1, type2]); + return getBestChoiceType(type1, type2); } - function checkStringLiteralExpression(node) { - var contextualType = getContextualType(node); - if (contextualType && contextualTypeIsStringLiteralType(contextualType)) { - return getStringLiteralTypeForText(node.text); + function typeContainsLiteralFromEnum(type, enumType) { + if (type.flags & 524288 /* Union */) { + for (var _i = 0, _a = type.types; _i < _a.length; _i++) { + var t = _a[_i]; + if (t.flags & 256 /* EnumLiteral */ && t.baseType === enumType) { + return true; + } + } + } + if (type.flags & 256 /* EnumLiteral */) { + return type.baseType === enumType; + } + return false; + } + function isLiteralContextForType(node, type) { + if (isLiteralTypeLocation(node)) { + return true; + } + var contextualType = getContextualType(node); + if (contextualType) { + if (contextualType.flags & 16384 /* TypeParameter */) { + var apparentType = getApparentTypeOfTypeParameter(contextualType); + // If the type parameter is constrained to the base primitive type we're checking for, + // consider this a literal context. For example, given a type parameter 'T extends string', + // this causes us to infer string literal types for T. + if (type === apparentType) { + return true; + } + contextualType = apparentType; + } + if (type.flags & 2 /* String */) { + return maybeTypeOfKind(contextualType, 32 /* StringLiteral */); + } + if (type.flags & 4 /* Number */) { + return maybeTypeOfKind(contextualType, (64 /* NumberLiteral */ | 256 /* EnumLiteral */)); + } + if (type.flags & 8 /* Boolean */) { + return maybeTypeOfKind(contextualType, 128 /* BooleanLiteral */); + } + if (type.flags & 16 /* Enum */) { + return typeContainsLiteralFromEnum(contextualType, type); + } + } + return false; + } + function checkLiteralExpression(node) { + if (node.kind === 8 /* NumericLiteral */) { + checkGrammarNumericLiteral(node); + } + switch (node.kind) { + case 9 /* StringLiteral */: + return isLiteralContextForType(node, stringType) ? getLiteralTypeForText(32 /* StringLiteral */, node.text) : stringType; + case 8 /* NumericLiteral */: + return isLiteralContextForType(node, numberType) ? getLiteralTypeForText(64 /* NumberLiteral */, node.text) : numberType; + case 99 /* TrueKeyword */: + case 84 /* FalseKeyword */: + return isLiteralContextForType(node, booleanType) ? node.kind === 99 /* TrueKeyword */ ? trueType : falseType : booleanType; } - return stringType; } function checkTemplateExpression(node) { // We just want to check each expressions, but we are unconcerned with @@ -25060,7 +28850,13 @@ var ts; function checkExpressionCached(node, contextualMapper) { var links = getNodeLinks(node); if (!links.resolvedType) { + // When computing a type that we're going to cache, we need to ignore any ongoing control flow + // analysis because variables may have transient types in indeterminable states. Moving flowLoopStart + // to the top of the stack ensures all transient types are computed from a known point. + var saveFlowLoopStart = flowLoopStart; + flowLoopStart = flowLoopCount; links.resolvedType = checkExpression(node, contextualMapper); + flowLoopStart = saveFlowLoopStart; } return links.resolvedType; } @@ -25068,7 +28864,7 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 137 /* ComputedPropertyName */) { + if (node.name.kind === 140 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } return checkExpression(node.initializer, contextualMapper); @@ -25079,7 +28875,7 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 137 /* ComputedPropertyName */) { + if (node.name.kind === 140 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); @@ -25102,14 +28898,14 @@ var ts; } // Checks an expression and returns its type. The contextualMapper parameter serves two purposes: When // contextualMapper is not undefined and not equal to the identityMapper function object it indicates that the - // expression is being inferentially typed (section 4.12.2 in spec) and provides the type mapper to use in + // expression is being inferentially typed (section 4.15.2 in spec) and provides the type mapper to use in // conjunction with the generic contextual type. When contextualMapper is equal to the identityMapper function // object, it serves as an indicator that all contained function and arrow expressions should be considered to // have the wildcard function type; this form of type check is used during overload resolution to exclude // contextually typed function and arrow expressions in the initial phase. function checkExpression(node, contextualMapper) { var type; - if (node.kind === 136 /* QualifiedName */) { + if (node.kind === 139 /* QualifiedName */) { type = checkQualifiedName(node); } else { @@ -25121,20 +28917,15 @@ var ts; // - 'left' in property access // - 'object' in indexed access // - target in rhs of import statement - var ok = (node.parent.kind === 169 /* PropertyAccessExpression */ && node.parent.expression === node) || - (node.parent.kind === 170 /* ElementAccessExpression */ && node.parent.expression === node) || - ((node.kind === 69 /* Identifier */ || node.kind === 136 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); + var ok = (node.parent.kind === 172 /* PropertyAccessExpression */ && node.parent.expression === node) || + (node.parent.kind === 173 /* ElementAccessExpression */ && node.parent.expression === node) || + ((node.kind === 69 /* Identifier */ || node.kind === 139 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); if (!ok) { error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); } } return type; } - function checkNumericLiteral(node) { - // Grammar checking - checkGrammarNumericLiteral(node); - return numberType; - } function checkExpressionWorker(node, contextualMapper) { switch (node.kind) { case 69 /* Identifier */: @@ -25144,72 +28935,72 @@ var ts; case 95 /* SuperKeyword */: return checkSuperExpression(node); case 93 /* NullKeyword */: - return nullType; + return nullWideningType; + case 9 /* StringLiteral */: + case 8 /* NumericLiteral */: case 99 /* TrueKeyword */: case 84 /* FalseKeyword */: - return booleanType; - case 8 /* NumericLiteral */: - return checkNumericLiteral(node); - case 186 /* TemplateExpression */: + return checkLiteralExpression(node); + case 189 /* TemplateExpression */: return checkTemplateExpression(node); - case 9 /* StringLiteral */: - return checkStringLiteralExpression(node); case 11 /* NoSubstitutionTemplateLiteral */: return stringType; case 10 /* RegularExpressionLiteral */: return globalRegExpType; - case 167 /* ArrayLiteralExpression */: + case 170 /* ArrayLiteralExpression */: return checkArrayLiteral(node, contextualMapper); - case 168 /* ObjectLiteralExpression */: + case 171 /* ObjectLiteralExpression */: return checkObjectLiteral(node, contextualMapper); - case 169 /* PropertyAccessExpression */: + case 172 /* PropertyAccessExpression */: return checkPropertyAccessExpression(node); - case 170 /* ElementAccessExpression */: + case 173 /* ElementAccessExpression */: return checkIndexedAccess(node); - case 171 /* CallExpression */: - case 172 /* NewExpression */: + case 174 /* CallExpression */: + case 175 /* NewExpression */: return checkCallExpression(node); - case 173 /* TaggedTemplateExpression */: + case 176 /* TaggedTemplateExpression */: return checkTaggedTemplateExpression(node); - case 175 /* ParenthesizedExpression */: + case 178 /* ParenthesizedExpression */: return checkExpression(node.expression, contextualMapper); - case 189 /* ClassExpression */: + case 192 /* ClassExpression */: return checkClassExpression(node); - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: return checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); - case 179 /* TypeOfExpression */: + case 182 /* TypeOfExpression */: return checkTypeOfExpression(node); - case 174 /* TypeAssertionExpression */: - case 192 /* AsExpression */: + case 177 /* TypeAssertionExpression */: + case 195 /* AsExpression */: return checkAssertion(node); - case 178 /* DeleteExpression */: + case 196 /* NonNullExpression */: + return checkNonNullAssertion(node); + case 181 /* DeleteExpression */: return checkDeleteExpression(node); - case 180 /* VoidExpression */: + case 183 /* VoidExpression */: return checkVoidExpression(node); - case 181 /* AwaitExpression */: + case 184 /* AwaitExpression */: return checkAwaitExpression(node); - case 182 /* PrefixUnaryExpression */: + case 185 /* PrefixUnaryExpression */: return checkPrefixUnaryExpression(node); - case 183 /* PostfixUnaryExpression */: + case 186 /* PostfixUnaryExpression */: return checkPostfixUnaryExpression(node); - case 184 /* BinaryExpression */: + case 187 /* BinaryExpression */: return checkBinaryExpression(node, contextualMapper); - case 185 /* ConditionalExpression */: + case 188 /* ConditionalExpression */: return checkConditionalExpression(node, contextualMapper); - case 188 /* SpreadElementExpression */: + case 191 /* SpreadElementExpression */: return checkSpreadElementExpression(node, contextualMapper); - case 190 /* OmittedExpression */: - return undefinedType; - case 187 /* YieldExpression */: + case 193 /* OmittedExpression */: + return undefinedWideningType; + case 190 /* YieldExpression */: return checkYieldExpression(node); - case 243 /* JsxExpression */: + case 248 /* JsxExpression */: return checkJsxExpression(node); - case 236 /* JsxElement */: + case 241 /* JsxElement */: return checkJsxElement(node); - case 237 /* JsxSelfClosingElement */: + case 242 /* JsxSelfClosingElement */: return checkJsxSelfClosingElement(node); - case 238 /* JsxOpeningElement */: + case 243 /* JsxOpeningElement */: ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); } return unknownType; @@ -25235,15 +29026,23 @@ var ts; checkGrammarDecorators(node) || checkGrammarModifiers(node); checkVariableLikeDeclaration(node); var func = ts.getContainingFunction(node); - if (node.flags & 56 /* AccessibilityModifier */) { + if (node.flags & 92 /* ParameterPropertyModifier */) { func = ts.getContainingFunction(node); - if (!(func.kind === 145 /* Constructor */ && ts.nodeIsPresent(func.body))) { + if (!(func.kind === 148 /* Constructor */ && ts.nodeIsPresent(func.body))) { error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } } if (node.questionToken && ts.isBindingPattern(node.name) && func.body) { error(node, ts.Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature); } + if (node.name.text === "this") { + if (ts.indexOf(func.parameters, node) !== 0) { + error(node, ts.Diagnostics.A_this_parameter_must_be_the_first_parameter); + } + if (func.kind === 148 /* Constructor */ || func.kind === 152 /* ConstructSignature */ || func.kind === 157 /* ConstructorType */) { + error(node, ts.Diagnostics.A_constructor_cannot_have_a_this_parameter); + } + } // Only check rest parameter type if it's not a binding pattern. Since binding patterns are // not allowed in a rest parameter, we already have an error from checkGrammarParameterList. if (node.dotDotDotToken && !ts.isBindingPattern(node.name) && !isArrayType(getTypeOfSymbol(node.symbol))) { @@ -25254,9 +29053,9 @@ var ts; if (!node.asteriskToken || !node.body) { return false; } - return node.kind === 144 /* MethodDeclaration */ || - node.kind === 216 /* FunctionDeclaration */ || - node.kind === 176 /* FunctionExpression */; + return node.kind === 147 /* MethodDeclaration */ || + node.kind === 220 /* FunctionDeclaration */ || + node.kind === 179 /* FunctionExpression */; } function getTypePredicateParameterIndex(parameterList, parameter) { if (parameterList) { @@ -25291,15 +29090,17 @@ var ts; error(parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); } else { - checkTypeAssignableTo(typePredicate.type, getTypeOfNode(parent.parameters[typePredicate.parameterIndex]), node.type); + var leadingError = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type); + checkTypeAssignableTo(typePredicate.type, getTypeOfNode(parent.parameters[typePredicate.parameterIndex]), node.type, + /*headMessage*/ undefined, leadingError); } } else if (parameterName) { var hasReportedError = false; for (var _i = 0, _a = parent.parameters; _i < _a.length; _i++) { - var name_14 = _a[_i].name; - if (ts.isBindingPattern(name_14) && - checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_14, parameterName, typePredicate.parameterName)) { + var name_15 = _a[_i].name; + if (ts.isBindingPattern(name_15) && + checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_15, parameterName, typePredicate.parameterName)) { hasReportedError = true; break; } @@ -25312,30 +29113,30 @@ var ts; } function getTypePredicateParent(node) { switch (node.parent.kind) { - case 177 /* ArrowFunction */: - case 148 /* CallSignature */: - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 153 /* FunctionType */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - var parent_7 = node.parent; - if (node === parent_7.type) { - return parent_7; + case 180 /* ArrowFunction */: + case 151 /* CallSignature */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 156 /* FunctionType */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + var parent_10 = node.parent; + if (node === parent_10.type) { + return parent_10; } } } function checkIfTypePredicateVariableIsDeclaredInBindingPattern(pattern, predicateVariableNode, predicateVariableName) { for (var _i = 0, _a = pattern.elements; _i < _a.length; _i++) { - var name_15 = _a[_i].name; - if (name_15.kind === 69 /* Identifier */ && - name_15.text === predicateVariableName) { + var name_16 = _a[_i].name; + if (name_16.kind === 69 /* Identifier */ && + name_16.text === predicateVariableName) { error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName); return true; } - else if (name_15.kind === 165 /* ArrayBindingPattern */ || - name_15.kind === 164 /* ObjectBindingPattern */) { - if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_15, predicateVariableNode, predicateVariableName)) { + else if (name_16.kind === 168 /* ArrayBindingPattern */ || + name_16.kind === 167 /* ObjectBindingPattern */) { + if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name_16, predicateVariableNode, predicateVariableName)) { return true; } } @@ -25343,12 +29144,12 @@ var ts; } function checkSignatureDeclaration(node) { // Grammar checking - if (node.kind === 150 /* IndexSignature */) { + if (node.kind === 153 /* IndexSignature */) { checkGrammarIndexSignature(node); } - else if (node.kind === 153 /* FunctionType */ || node.kind === 216 /* FunctionDeclaration */ || node.kind === 154 /* ConstructorType */ || - node.kind === 148 /* CallSignature */ || node.kind === 145 /* Constructor */ || - node.kind === 149 /* ConstructSignature */) { + else if (node.kind === 156 /* FunctionType */ || node.kind === 220 /* FunctionDeclaration */ || node.kind === 157 /* ConstructorType */ || + node.kind === 151 /* CallSignature */ || node.kind === 148 /* Constructor */ || + node.kind === 152 /* ConstructSignature */) { checkGrammarFunctionLikeDeclaration(node); } checkTypeParameters(node.typeParameters); @@ -25360,10 +29161,10 @@ var ts; checkCollisionWithArgumentsInGeneratedCode(node); if (compilerOptions.noImplicitAny && !node.type) { switch (node.kind) { - case 149 /* ConstructSignature */: + case 152 /* ConstructSignature */: error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; - case 148 /* CallSignature */: + case 151 /* CallSignature */: error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); break; } @@ -25390,11 +29191,91 @@ var ts; checkAsyncFunctionReturnType(node); } } + if (noUnusedIdentifiers && !node.body) { + checkUnusedTypeParameters(node); + } + } + } + function checkClassForDuplicateDeclarations(node) { + var Accessor; + (function (Accessor) { + Accessor[Accessor["Getter"] = 1] = "Getter"; + Accessor[Accessor["Setter"] = 2] = "Setter"; + Accessor[Accessor["Property"] = 3] = "Property"; + })(Accessor || (Accessor = {})); + var instanceNames = ts.createMap(); + var staticNames = ts.createMap(); + for (var _i = 0, _a = node.members; _i < _a.length; _i++) { + var member = _a[_i]; + if (member.kind === 148 /* Constructor */) { + for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) { + var param = _c[_b]; + if (ts.isParameterPropertyDeclaration(param)) { + addName(instanceNames, param.name, param.name.text, 3 /* Property */); + } + } + } + else { + var isStatic = ts.forEach(member.modifiers, function (m) { return m.kind === 113 /* StaticKeyword */; }); + var names = isStatic ? staticNames : instanceNames; + var memberName = member.name && ts.getPropertyNameForPropertyNameNode(member.name); + if (memberName) { + switch (member.kind) { + case 149 /* GetAccessor */: + addName(names, member.name, memberName, 1 /* Getter */); + break; + case 150 /* SetAccessor */: + addName(names, member.name, memberName, 2 /* Setter */); + break; + case 145 /* PropertyDeclaration */: + addName(names, member.name, memberName, 3 /* Property */); + break; + } + } + } + } + function addName(names, location, name, meaning) { + var prev = names[name]; + if (prev) { + if (prev & meaning) { + error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location)); + } + else { + names[name] = prev | meaning; + } + } + else { + names[name] = meaning; + } + } + } + function checkObjectTypeForDuplicateDeclarations(node) { + var names = ts.createMap(); + for (var _i = 0, _a = node.members; _i < _a.length; _i++) { + var member = _a[_i]; + if (member.kind == 144 /* PropertySignature */) { + var memberName = void 0; + switch (member.name.kind) { + case 9 /* StringLiteral */: + case 8 /* NumericLiteral */: + case 69 /* Identifier */: + memberName = member.name.text; + break; + default: + continue; + } + if (names[memberName]) { + error(member.symbol.valueDeclaration.name, ts.Diagnostics.Duplicate_identifier_0, memberName); + error(member.name, ts.Diagnostics.Duplicate_identifier_0, memberName); + } + else { + names[memberName] = true; + } + } } - checkSpecializedSignatureDeclaration(node); } function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 218 /* InterfaceDeclaration */) { + if (node.kind === 222 /* InterfaceDeclaration */) { var nodeSymbol = getSymbolOfNode(node); // in case of merging interface declaration it is possible that we'll enter this check procedure several times for every declaration // to prevent this run check only for the first declaration of a given kind @@ -25414,7 +29295,7 @@ var ts; var declaration = decl; if (declaration.parameters.length === 1 && declaration.parameters[0].type) { switch (declaration.parameters[0].type.kind) { - case 130 /* StringKeyword */: + case 132 /* StringKeyword */: if (!seenStringIndexer) { seenStringIndexer = true; } @@ -25422,7 +29303,7 @@ var ts; error(declaration, ts.Diagnostics.Duplicate_string_index_signature); } break; - case 128 /* NumberKeyword */: + case 130 /* NumberKeyword */: if (!seenNumericIndexer) { seenNumericIndexer = true; } @@ -25454,9 +29335,10 @@ var ts; function checkConstructorDeclaration(node) { // Grammar check on signature of constructor and modifier of the constructor is done in checkSignatureDeclaration function. checkSignatureDeclaration(node); - // Grammar check for checking only related to constructoDeclaration + // Grammar check for checking only related to constructorDeclaration checkGrammarConstructorTypeParameters(node) || checkGrammarConstructorTypeAnnotation(node); checkSourceElement(node.body); + registerForUnusedIdentifiersCheck(node); var symbol = getSymbolOfNode(node); var firstDeclaration = ts.getDeclarationOfKind(symbol, node.kind); // Only type check the symbol once @@ -25470,17 +29352,32 @@ var ts; if (!produceDiagnostics) { return; } + function containsSuperCallAsComputedPropertyName(n) { + return n.name && containsSuperCall(n.name); + } + function containsSuperCall(n) { + if (ts.isSuperCallExpression(n)) { + return true; + } + else if (ts.isFunctionLike(n)) { + return false; + } + else if (ts.isClassLike(n)) { + return ts.forEach(n.members, containsSuperCallAsComputedPropertyName); + } + return ts.forEachChild(n, containsSuperCall); + } function markThisReferencesAsErrors(n) { if (n.kind === 97 /* ThisKeyword */) { error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location); } - else if (n.kind !== 176 /* FunctionExpression */ && n.kind !== 216 /* FunctionDeclaration */) { + else if (n.kind !== 179 /* FunctionExpression */ && n.kind !== 220 /* FunctionDeclaration */) { ts.forEachChild(n, markThisReferencesAsErrors); } } function isInstancePropertyWithInitializer(n) { - return n.kind === 142 /* PropertyDeclaration */ && - !(n.flags & 64 /* Static */) && + return n.kind === 145 /* PropertyDeclaration */ && + !(n.flags & 32 /* Static */) && !!n.initializer; } // TS 1.0 spec (April 2014): 8.3.2 @@ -25500,7 +29397,7 @@ var ts; // - The constructor declares parameter properties // or the containing class declares instance member variables with initializers. var superCallShouldBeFirst = ts.forEach(node.parent.members, isInstancePropertyWithInitializer) || - ts.forEach(node.parameters, function (p) { return p.flags & (8 /* Public */ | 16 /* Private */ | 32 /* Protected */); }); + ts.forEach(node.parameters, function (p) { return p.flags & 92 /* ParameterPropertyModifier */; }); // Skip past any prologue directives to find the first statement // to ensure that it was a super call. if (superCallShouldBeFirst) { @@ -25508,7 +29405,7 @@ var ts; var superCallStatement = void 0; for (var _i = 0, statements_2 = statements; _i < statements_2.length; _i++) { var statement = statements_2[_i]; - if (statement.kind === 198 /* ExpressionStatement */ && ts.isSuperCallExpression(statement.expression)) { + if (statement.kind === 202 /* ExpressionStatement */ && ts.isSuperCallExpression(statement.expression)) { superCallStatement = statement; break; } @@ -25532,14 +29429,9 @@ var ts; checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name); checkDecorators(node); checkSignatureDeclaration(node); - if (node.kind === 146 /* GetAccessor */) { - if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 524288 /* HasImplicitReturn */)) { - if (node.flags & 1048576 /* HasExplicitReturn */) { - if (compilerOptions.noImplicitReturns) { - error(node.name, ts.Diagnostics.Not_all_code_paths_return_a_value); - } - } - else { + if (node.kind === 149 /* GetAccessor */) { + if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && (node.flags & 32768 /* HasImplicitReturn */)) { + if (!(node.flags & 65536 /* HasExplicitReturn */)) { error(node.name, ts.Diagnostics.A_get_accessor_must_return_a_value); } } @@ -25547,40 +29439,50 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 137 /* ComputedPropertyName */) { + if (node.name.kind === 140 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); } if (!ts.hasDynamicName(node)) { // TypeScript 1.0 spec (April 2014): 8.4.3 // Accessors for the same member name must specify the same accessibility. - var otherKind = node.kind === 146 /* GetAccessor */ ? 147 /* SetAccessor */ : 146 /* GetAccessor */; + var otherKind = node.kind === 149 /* GetAccessor */ ? 150 /* SetAccessor */ : 149 /* GetAccessor */; var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind); if (otherAccessor) { - if (((node.flags & 56 /* AccessibilityModifier */) !== (otherAccessor.flags & 56 /* AccessibilityModifier */))) { + if (((node.flags & 28 /* AccessibilityModifier */) !== (otherAccessor.flags & 28 /* AccessibilityModifier */))) { error(node.name, ts.Diagnostics.Getter_and_setter_accessors_do_not_agree_in_visibility); } - var currentAccessorType = getAnnotatedAccessorType(node); - var otherAccessorType = getAnnotatedAccessorType(otherAccessor); + if (((node.flags & 128 /* Abstract */) !== (otherAccessor.flags & 128 /* Abstract */))) { + error(node.name, ts.Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); + } // TypeScript 1.0 spec (April 2014): 4.5 // If both accessors include type annotations, the specified types must be identical. - if (currentAccessorType && otherAccessorType) { - if (!isTypeIdenticalTo(currentAccessorType, otherAccessorType)) { - error(node, ts.Diagnostics.get_and_set_accessor_must_have_the_same_type); - } - } + checkAccessorDeclarationTypesIdentical(node, otherAccessor, getAnnotatedAccessorType, ts.Diagnostics.get_and_set_accessor_must_have_the_same_type); + checkAccessorDeclarationTypesIdentical(node, otherAccessor, getThisTypeOfDeclaration, ts.Diagnostics.get_and_set_accessor_must_have_the_same_this_type); } } - getTypeOfAccessors(getSymbolOfNode(node)); + var returnType = getTypeOfAccessors(getSymbolOfNode(node)); + if (node.kind === 149 /* GetAccessor */) { + checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); + } } - if (node.parent.kind !== 168 /* ObjectLiteralExpression */) { + if (node.parent.kind !== 171 /* ObjectLiteralExpression */) { checkSourceElement(node.body); + registerForUnusedIdentifiersCheck(node); } else { checkNodeDeferred(node); } } + function checkAccessorDeclarationTypesIdentical(first, second, getAnnotatedType, message) { + var firstType = getAnnotatedType(first); + var secondType = getAnnotatedType(second); + if (firstType && secondType && !isTypeIdenticalTo(firstType, secondType)) { + error(first, message); + } + } function checkAccessorDeferred(node) { checkSourceElement(node.body); + registerForUnusedIdentifiersCheck(node); } function checkMissingDeclaration(node) { checkDecorators(node); @@ -25605,13 +29507,18 @@ var ts; function checkTypeReferenceNode(node) { checkGrammarTypeArguments(node, node.typeArguments); var type = getTypeFromTypeReference(node); - if (type !== unknownType && node.typeArguments) { - // Do type argument local checks only if referenced type is successfully resolved - ts.forEach(node.typeArguments, checkSourceElement); - if (produceDiagnostics) { - var symbol = getNodeLinks(node).resolvedSymbol; - var typeParameters = symbol.flags & 524288 /* TypeAlias */ ? getSymbolLinks(symbol).typeParameters : type.target.localTypeParameters; - checkTypeArgumentConstraints(typeParameters, node.typeArguments); + if (type !== unknownType) { + if (node.typeArguments) { + // Do type argument local checks only if referenced type is successfully resolved + ts.forEach(node.typeArguments, checkSourceElement); + if (produceDiagnostics) { + var symbol = getNodeLinks(node).resolvedSymbol; + var typeParameters = symbol.flags & 524288 /* TypeAlias */ ? getSymbolLinks(symbol).typeParameters : type.target.localTypeParameters; + checkTypeArgumentConstraints(typeParameters, node.typeArguments); + } + } + if (type.flags & 16 /* Enum */ && !type.memberTypes && getNodeLinks(node).resolvedSymbol.flags & 8 /* EnumMember */) { + error(node, ts.Diagnostics.Enum_type_0_has_members_with_initializers_that_are_not_literals, typeToString(type)); } } } @@ -25624,6 +29531,7 @@ var ts; var type = getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); checkIndexConstraints(type); checkTypeForDuplicateIndexSignatures(node); + checkObjectTypeForDuplicateDeclarations(node); } } function checkArrayType(node) { @@ -25641,59 +29549,21 @@ var ts; ts.forEach(node.types, checkSourceElement); } function isPrivateWithinAmbient(node) { - return (node.flags & 16 /* Private */) && ts.isInAmbientContext(node); - } - function checkSpecializedSignatureDeclaration(signatureDeclarationNode) { - if (!produceDiagnostics) { - return; - } - var signature = getSignatureFromDeclaration(signatureDeclarationNode); - if (!signature.hasStringLiterals) { - return; - } - // TypeScript 1.0 spec (April 2014): 3.7.2.2 - // Specialized signatures are not permitted in conjunction with a function body - if (ts.nodeIsPresent(signatureDeclarationNode.body)) { - error(signatureDeclarationNode, ts.Diagnostics.A_signature_with_an_implementation_cannot_use_a_string_literal_type); - return; - } - // TypeScript 1.0 spec (April 2014): 3.7.2.4 - // Every specialized call or construct signature in an object type must be assignable - // to at least one non-specialized call or construct signature in the same object type - var signaturesToCheck; - // Unnamed (call\construct) signatures in interfaces are inherited and not shadowed so examining just node symbol won't give complete answer. - // Use declaring type to obtain full list of signatures. - if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 218 /* InterfaceDeclaration */) { - ts.Debug.assert(signatureDeclarationNode.kind === 148 /* CallSignature */ || signatureDeclarationNode.kind === 149 /* ConstructSignature */); - var signatureKind = signatureDeclarationNode.kind === 148 /* CallSignature */ ? 0 /* Call */ : 1 /* Construct */; - var containingSymbol = getSymbolOfNode(signatureDeclarationNode.parent); - var containingType = getDeclaredTypeOfSymbol(containingSymbol); - signaturesToCheck = getSignaturesOfType(containingType, signatureKind); - } - else { - signaturesToCheck = getSignaturesOfSymbol(getSymbolOfNode(signatureDeclarationNode)); - } - for (var _i = 0, signaturesToCheck_1 = signaturesToCheck; _i < signaturesToCheck_1.length; _i++) { - var otherSignature = signaturesToCheck_1[_i]; - if (!otherSignature.hasStringLiterals && isSignatureAssignableTo(signature, otherSignature, /*ignoreReturnTypes*/ false)) { - return; - } - } - error(signatureDeclarationNode, ts.Diagnostics.Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature); + return (node.flags & 8 /* Private */) && ts.isInAmbientContext(node); } function getEffectiveDeclarationFlags(n, flagsToCheck) { var flags = ts.getCombinedNodeFlags(n); // children of classes (even ambient classes) should not be marked as ambient or export // because those flags have no useful semantics there. - if (n.parent.kind !== 218 /* InterfaceDeclaration */ && - n.parent.kind !== 217 /* ClassDeclaration */ && - n.parent.kind !== 189 /* ClassExpression */ && + if (n.parent.kind !== 222 /* InterfaceDeclaration */ && + n.parent.kind !== 221 /* ClassDeclaration */ && + n.parent.kind !== 192 /* ClassExpression */ && ts.isInAmbientContext(n)) { - if (!(flags & 4 /* Ambient */)) { + if (!(flags & 2 /* Ambient */)) { // It is nested in an ambient context, which means it is automatically exported - flags |= 2 /* Export */; + flags |= 1 /* Export */; } - flags |= 4 /* Ambient */; + flags |= 2 /* Ambient */; } return flags & flagsToCheck; } @@ -25718,17 +29588,17 @@ var ts; var canonicalFlags_1 = getEffectiveDeclarationFlags(getCanonicalOverload(overloads, implementation), flagsToCheck); ts.forEach(overloads, function (o) { var deviation = getEffectiveDeclarationFlags(o, flagsToCheck) ^ canonicalFlags_1; - if (deviation & 2 /* Export */) { - error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_exported_or_not_exported); + if (deviation & 1 /* Export */) { + error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported); } - else if (deviation & 4 /* Ambient */) { + else if (deviation & 2 /* Ambient */) { error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient); } - else if (deviation & (16 /* Private */ | 32 /* Protected */)) { - error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); + else if (deviation & (8 /* Private */ | 16 /* Protected */)) { + error(o.name || o, ts.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); } else if (deviation & 128 /* Abstract */) { - error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_abstract_or_not_abstract); + error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract); } }); } @@ -25744,7 +29614,7 @@ var ts; }); } } - var flagsToCheck = 2 /* Export */ | 4 /* Ambient */ | 16 /* Private */ | 32 /* Protected */ | 128 /* Abstract */; + var flagsToCheck = 1 /* Export */ | 2 /* Ambient */ | 8 /* Private */ | 16 /* Protected */ | 128 /* Abstract */; var someNodeFlags = 0; var allNodeFlags = flagsToCheck; var someHaveQuestionToken = false; @@ -25768,21 +29638,21 @@ var ts; seen = c === node; } }); - // We may be here because of some extra junk between overloads that could not be parsed into a valid node. + // We may be here because of some extra nodes between overloads that could not be parsed into a valid node. // In this case the subsequent node is not really consecutive (.pos !== node.end), and we must ignore it here. if (subsequentNode && subsequentNode.pos === node.end) { if (subsequentNode.kind === node.kind) { var errorNode_1 = subsequentNode.name || subsequentNode; // TODO(jfreeman): These are methods, so handle computed name case if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { - var reportError = (node.kind === 144 /* MethodDeclaration */ || node.kind === 143 /* MethodSignature */) && - (node.flags & 64 /* Static */) !== (subsequentNode.flags & 64 /* Static */); + var reportError = (node.kind === 147 /* MethodDeclaration */ || node.kind === 146 /* MethodSignature */) && + (node.flags & 32 /* Static */) !== (subsequentNode.flags & 32 /* Static */); // we can get here in two cases // 1. mixed static and instance class members // 2. something with the same name was defined before the set of overloads that prevents them from merging // here we'll report error only for the first case since for second we should already report error in binder if (reportError) { - var diagnostic = node.flags & 64 /* Static */ ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static; + var diagnostic = node.flags & 32 /* Static */ ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static; error(errorNode_1, diagnostic); } return; @@ -25808,16 +29678,13 @@ var ts; } } } - // when checking exported function declarations across modules check only duplicate implementations - // names and consistency of modifiers are verified when we check local symbol - var isExportSymbolInsideModule = symbol.parent && symbol.parent.flags & 1536 /* Module */; var duplicateFunctionDeclaration = false; var multipleConstructorImplementation = false; for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) { var current = declarations_4[_i]; var node = current; var inAmbientContext = ts.isInAmbientContext(node); - var inAmbientContextOrInterface = node.parent.kind === 218 /* InterfaceDeclaration */ || node.parent.kind === 156 /* TypeLiteral */ || inAmbientContext; + var inAmbientContextOrInterface = node.parent.kind === 222 /* InterfaceDeclaration */ || node.parent.kind === 159 /* TypeLiteral */ || inAmbientContext; if (inAmbientContextOrInterface) { // check if declarations are consecutive only if they are non-ambient // 1. ambient declarations can be interleaved @@ -25828,7 +29695,7 @@ var ts; // 2. mixing ambient and non-ambient declarations is a separate error that will be reported - do not want to report an extra one previousDeclaration = undefined; } - if (node.kind === 216 /* FunctionDeclaration */ || node.kind === 144 /* MethodDeclaration */ || node.kind === 143 /* MethodSignature */ || node.kind === 145 /* Constructor */) { + if (node.kind === 220 /* FunctionDeclaration */ || node.kind === 147 /* MethodDeclaration */ || node.kind === 146 /* MethodSignature */ || node.kind === 148 /* Constructor */) { var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; allNodeFlags &= currentNodeFlags; @@ -25842,7 +29709,7 @@ var ts; duplicateFunctionDeclaration = true; } } - else if (!isExportSymbolInsideModule && previousDeclaration && previousDeclaration.parent === node.parent && previousDeclaration.end !== node.pos) { + else if (previousDeclaration && previousDeclaration.parent === node.parent && previousDeclaration.end !== node.pos) { reportImplementationExpectedError(previousDeclaration); } if (ts.nodeIsPresent(node.body)) { @@ -25870,8 +29737,8 @@ var ts; }); } // Abstract methods can't have an implementation -- in particular, they don't need one. - if (!isExportSymbolInsideModule && lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body && - !(lastSeenNonAmbientDeclaration.flags & 128 /* Abstract */)) { + if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body && + !(lastSeenNonAmbientDeclaration.flags & 128 /* Abstract */) && !lastSeenNonAmbientDeclaration.questionToken) { reportImplementationExpectedError(lastSeenNonAmbientDeclaration); } if (hasOverloads) { @@ -25880,29 +29747,11 @@ var ts; if (bodyDeclaration) { var signatures = getSignaturesOfSymbol(symbol); var bodySignature = getSignatureFromDeclaration(bodyDeclaration); - // If the implementation signature has string literals, we will have reported an error in - // checkSpecializedSignatureDeclaration - if (!bodySignature.hasStringLiterals) { - // TypeScript 1.0 spec (April 2014): 6.1 - // If a function declaration includes overloads, the overloads determine the call - // signatures of the type given to the function object - // and the function implementation signature must be assignable to that type - // - // TypeScript 1.0 spec (April 2014): 3.8.4 - // Note that specialized call and construct signatures (section 3.7.2.4) are not significant when determining assignment compatibility - // Consider checking against specialized signatures too. Not doing so creates a type hole: - // - // function g(x: "hi", y: boolean); - // function g(x: string, y: {}); - // function g(x: string, y: string) { } - // - // The implementation is completely unrelated to the specialized signature, yet we do not check this. - for (var _a = 0, signatures_3 = signatures; _a < signatures_3.length; _a++) { - var signature = signatures_3[_a]; - if (!signature.hasStringLiterals && !isImplementationCompatibleWithOverload(bodySignature, signature)) { - error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); - break; - } + for (var _a = 0, signatures_3 = signatures; _a < signatures_3.length; _a++) { + var signature = signatures_3[_a]; + if (!isImplementationCompatibleWithOverload(bodySignature, signature)) { + error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); + break; } } } @@ -25935,8 +29784,8 @@ var ts; for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { var d = _a[_i]; var declarationSpaces = getDeclarationSpaces(d); - var effectiveDeclarationFlags = getEffectiveDeclarationFlags(d, 2 /* Export */ | 512 /* Default */); - if (effectiveDeclarationFlags & 2 /* Export */) { + var effectiveDeclarationFlags = getEffectiveDeclarationFlags(d, 1 /* Export */ | 512 /* Default */); + if (effectiveDeclarationFlags & 1 /* Export */) { if (effectiveDeclarationFlags & 512 /* Default */) { defaultExportedDeclarationSpaces |= declarationSpaces; } @@ -25948,7 +29797,7 @@ var ts; nonExportedDeclarationSpaces |= declarationSpaces; } } - // Spaces for anyting not declared a 'default export'. + // Spaces for anything not declared a 'default export'. var nonDefaultExportedDeclarationSpaces = exportedDeclarationSpaces | nonExportedDeclarationSpaces; var commonDeclarationSpacesForExportsAndLocals = exportedDeclarationSpaces & nonExportedDeclarationSpaces; var commonDeclarationSpacesForDefaultAndNonDefault = defaultExportedDeclarationSpaces & nonDefaultExportedDeclarationSpaces; @@ -25957,7 +29806,7 @@ var ts; for (var _b = 0, _c = symbol.declarations; _b < _c.length; _b++) { var d = _c[_b]; var declarationSpaces = getDeclarationSpaces(d); - // Only error on the declarations that conributed to the intersecting spaces. + // Only error on the declarations that contributed to the intersecting spaces. if (declarationSpaces & commonDeclarationSpacesForDefaultAndNonDefault) { error(d.name, ts.Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, ts.declarationNameToString(d.name)); } @@ -25968,16 +29817,16 @@ var ts; } function getDeclarationSpaces(d) { switch (d.kind) { - case 218 /* InterfaceDeclaration */: + case 222 /* InterfaceDeclaration */: return 2097152 /* ExportType */; - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4194304 /* ExportNamespace */ | 1048576 /* ExportValue */ : 4194304 /* ExportNamespace */; - case 217 /* ClassDeclaration */: - case 220 /* EnumDeclaration */: + case 221 /* ClassDeclaration */: + case 224 /* EnumDeclaration */: return 2097152 /* ExportType */ | 1048576 /* ExportValue */; - case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportEqualsDeclaration */: var result_2 = 0; var target = resolveAlias(getSymbolOfNode(d)); ts.forEach(target.declarations, function (d) { result_2 |= getDeclarationSpaces(d); }); @@ -25989,7 +29838,7 @@ var ts; } function checkNonThenableType(type, location, message) { type = getWidenedType(type); - if (!isTypeAny(type) && isTypeAssignableTo(type, getGlobalThenableType())) { + if (!isTypeAny(type) && !isTypeNever(type) && isTypeAssignableTo(type, getGlobalThenableType())) { if (location) { if (!message) { message = ts.Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member; @@ -26015,37 +29864,39 @@ var ts; // ): any; // } // - if (promise.flags & 1 /* Any */) { + if (isTypeAny(promise)) { return undefined; } - if ((promise.flags & 4096 /* Reference */) && promise.target === tryGetGlobalPromiseType()) { - return promise.typeArguments[0]; + if (promise.flags & 131072 /* Reference */) { + if (promise.target === tryGetGlobalPromiseType() + || promise.target === getGlobalPromiseLikeType()) { + return promise.typeArguments[0]; + } } var globalPromiseLikeType = getInstantiatedGlobalPromiseLikeType(); if (globalPromiseLikeType === emptyObjectType || !isTypeAssignableTo(promise, globalPromiseLikeType)) { return undefined; } var thenFunction = getTypeOfPropertyOfType(promise, "then"); - if (thenFunction && (thenFunction.flags & 1 /* Any */)) { + if (!thenFunction || isTypeAny(thenFunction)) { return undefined; } - var thenSignatures = thenFunction ? getSignaturesOfType(thenFunction, 0 /* Call */) : emptyArray; + var thenSignatures = getSignaturesOfType(thenFunction, 0 /* Call */); if (thenSignatures.length === 0) { return undefined; } - var onfulfilledParameterType = getUnionType(ts.map(thenSignatures, getTypeOfFirstParameterOfSignature)); - if (onfulfilledParameterType.flags & 1 /* Any */) { + var onfulfilledParameterType = getTypeWithFacts(getUnionType(ts.map(thenSignatures, getTypeOfFirstParameterOfSignature)), 131072 /* NEUndefined */); + if (isTypeAny(onfulfilledParameterType)) { return undefined; } var onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, 0 /* Call */); if (onfulfilledParameterSignatures.length === 0) { return undefined; } - var valueParameterType = getUnionType(ts.map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature)); - return valueParameterType; + return getUnionType(ts.map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature), /*subtypeReduction*/ true); } function getTypeOfFirstParameterOfSignature(signature) { - return getTypeAtPosition(signature, 0); + return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : neverType; } /** * Gets the "awaited type" of a type. @@ -26060,13 +29911,13 @@ var ts; function checkAwaitedType(type, location, message) { return checkAwaitedTypeWorker(type); function checkAwaitedTypeWorker(type) { - if (type.flags & 16384 /* Union */) { + if (type.flags & 524288 /* Union */) { var types = []; for (var _i = 0, _a = type.types; _i < _a.length; _i++) { var constituentType = _a[_i]; types.push(checkAwaitedTypeWorker(constituentType)); } - return getUnionType(types); + return getUnionType(types, /*subtypeReduction*/ true); } else { var promisedType = getPromisedType(type); @@ -26089,7 +29940,7 @@ var ts; return checkNonThenableType(type, location, message); } else { - if (type.id === promisedType.id || awaitedTypeStack.indexOf(promisedType.id) >= 0) { + if (type.id === promisedType.id || ts.indexOf(awaitedTypeStack, promisedType.id) >= 0) { // We have a bad actor in the form of a promise whose promised type is // the same promise type, or a mutually recursive promise. Return the // unknown type as we cannot guess the shape. If this were the actual @@ -26179,7 +30030,7 @@ var ts; * callable `then` signature. */ function checkAsyncFunctionReturnType(node) { - if (compilerOptions.noCustomAsyncPromise && languageVersion >= 2 /* ES6 */) { + if (languageVersion >= 2 /* ES6 */) { var returnType = getTypeFromTypeNode(node.type); return checkCorrectPromiseType(returnType, node.type); } @@ -26258,22 +30109,22 @@ var ts; var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); var errorInfo; switch (node.parent.kind) { - case 217 /* ClassDeclaration */: + case 221 /* ClassDeclaration */: var classSymbol = getSymbolOfNode(node.parent); var classConstructorType = getTypeOfSymbol(classSymbol); expectedReturnType = getUnionType([classConstructorType, voidType]); break; - case 139 /* Parameter */: + case 142 /* Parameter */: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any); break; - case 142 /* PropertyDeclaration */: + case 145 /* PropertyDeclaration */: expectedReturnType = voidType; errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any); break; - case 144 /* MethodDeclaration */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: + case 147 /* MethodDeclaration */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: var methodType = getTypeOfNode(node.parent); var descriptorType = createTypedPropertyDescriptorType(methodType); expectedReturnType = getUnionType([descriptorType, voidType]); @@ -26286,9 +30137,9 @@ var ts; // When we are emitting type metadata for decorators, we need to try to check the type // as if it were an expression so that we can emit the type in a value position when we // serialize the type metadata. - if (node && node.kind === 152 /* TypeReference */) { + if (node && node.kind === 155 /* TypeReference */) { var root = getFirstIdentifier(node.typeName); - var meaning = root.parent.kind === 152 /* TypeReference */ ? 793056 /* Type */ : 1536 /* Namespace */; + var meaning = root.parent.kind === 155 /* TypeReference */ ? 793064 /* Type */ : 1920 /* Namespace */; // Resolve type so we know which symbol is referenced var rootSymbol = resolveName(root, root.text, meaning | 8388608 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); // Resolved symbol is alias @@ -26335,20 +30186,20 @@ var ts; if (compilerOptions.emitDecoratorMetadata) { // we only need to perform these checks if we are emitting serialized type metadata for the target of a decorator. switch (node.kind) { - case 217 /* ClassDeclaration */: + case 221 /* ClassDeclaration */: var constructor = ts.getFirstConstructorWithBody(node); if (constructor) { checkParameterTypeAnnotationsAsExpressions(constructor); } break; - case 144 /* MethodDeclaration */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: + case 147 /* MethodDeclaration */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: checkParameterTypeAnnotationsAsExpressions(node); checkReturnTypeAnnotationAsExpression(node); break; - case 142 /* PropertyDeclaration */: - case 139 /* Parameter */: + case 145 /* PropertyDeclaration */: + case 142 /* Parameter */: checkTypeAnnotationAsExpression(node); break; } @@ -26371,7 +30222,7 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name && node.name.kind === 137 /* ComputedPropertyName */) { + if (node.name && node.name.kind === 140 /* ComputedPropertyName */) { // This check will account for methods in class/interface declarations, // as well as accessors in classes/object literals checkComputedPropertyName(node.name); @@ -26419,17 +30270,161 @@ var ts; getReturnTypeOfSignature(getSignatureFromDeclaration(node)); } } + registerForUnusedIdentifiersCheck(node); + } + function registerForUnusedIdentifiersCheck(node) { + if (deferredUnusedIdentifierNodes) { + deferredUnusedIdentifierNodes.push(node); + } + } + function checkUnusedIdentifiers() { + if (deferredUnusedIdentifierNodes) { + for (var _i = 0, deferredUnusedIdentifierNodes_1 = deferredUnusedIdentifierNodes; _i < deferredUnusedIdentifierNodes_1.length; _i++) { + var node = deferredUnusedIdentifierNodes_1[_i]; + switch (node.kind) { + case 256 /* SourceFile */: + case 225 /* ModuleDeclaration */: + checkUnusedModuleMembers(node); + break; + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: + checkUnusedClassMembers(node); + checkUnusedTypeParameters(node); + break; + case 222 /* InterfaceDeclaration */: + checkUnusedTypeParameters(node); + break; + case 199 /* Block */: + case 227 /* CaseBlock */: + case 206 /* ForStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: + checkUnusedLocalsAndParameters(node); + break; + case 148 /* Constructor */: + case 179 /* FunctionExpression */: + case 220 /* FunctionDeclaration */: + case 180 /* ArrowFunction */: + case 147 /* MethodDeclaration */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + if (node.body) { + checkUnusedLocalsAndParameters(node); + } + checkUnusedTypeParameters(node); + break; + case 146 /* MethodSignature */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: + case 153 /* IndexSignature */: + case 156 /* FunctionType */: + case 157 /* ConstructorType */: + checkUnusedTypeParameters(node); + break; + } + ; + } + } + } + function checkUnusedLocalsAndParameters(node) { + if (node.parent.kind !== 222 /* InterfaceDeclaration */ && noUnusedIdentifiers && !ts.isInAmbientContext(node)) { + var _loop_1 = function(key) { + var local = node.locals[key]; + if (!local.isReferenced) { + if (local.valueDeclaration && local.valueDeclaration.kind === 142 /* Parameter */) { + var parameter = local.valueDeclaration; + if (compilerOptions.noUnusedParameters && + !ts.isParameterPropertyDeclaration(parameter) && + !parameterIsThisKeyword(parameter) && + !parameterNameStartsWithUnderscore(parameter)) { + error(local.valueDeclaration.name, ts.Diagnostics._0_is_declared_but_never_used, local.name); + } + } + else if (compilerOptions.noUnusedLocals) { + ts.forEach(local.declarations, function (d) { return error(d.name || d, ts.Diagnostics._0_is_declared_but_never_used, local.name); }); + } + } + }; + for (var key in node.locals) { + _loop_1(key); + } + } + } + function parameterIsThisKeyword(parameter) { + return parameter.name && parameter.name.originalKeywordKind === 97 /* ThisKeyword */; + } + function parameterNameStartsWithUnderscore(parameter) { + return parameter.name && parameter.name.kind === 69 /* Identifier */ && parameter.name.text.charCodeAt(0) === 95 /* _ */; + } + function checkUnusedClassMembers(node) { + if (compilerOptions.noUnusedLocals && !ts.isInAmbientContext(node)) { + if (node.members) { + for (var _i = 0, _a = node.members; _i < _a.length; _i++) { + var member = _a[_i]; + if (member.kind === 147 /* MethodDeclaration */ || member.kind === 145 /* PropertyDeclaration */) { + if (!member.symbol.isReferenced && member.flags & 8 /* Private */) { + error(member.name, ts.Diagnostics._0_is_declared_but_never_used, member.symbol.name); + } + } + else if (member.kind === 148 /* Constructor */) { + for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) { + var parameter = _c[_b]; + if (!parameter.symbol.isReferenced && parameter.flags & 8 /* Private */) { + error(parameter.name, ts.Diagnostics.Property_0_is_declared_but_never_used, parameter.symbol.name); + } + } + } + } + } + } + } + function checkUnusedTypeParameters(node) { + if (compilerOptions.noUnusedLocals && !ts.isInAmbientContext(node)) { + if (node.typeParameters) { + // Only report errors on the last declaration for the type parameter container; + // this ensures that all uses have been accounted for. + var symbol = getSymbolOfNode(node); + var lastDeclaration = symbol && symbol.declarations && ts.lastOrUndefined(symbol.declarations); + if (lastDeclaration !== node) { + return; + } + for (var _i = 0, _a = node.typeParameters; _i < _a.length; _i++) { + var typeParameter = _a[_i]; + if (!getMergedSymbol(typeParameter.symbol).isReferenced) { + error(typeParameter.name, ts.Diagnostics._0_is_declared_but_never_used, typeParameter.symbol.name); + } + } + } + } + } + function checkUnusedModuleMembers(node) { + if (compilerOptions.noUnusedLocals && !ts.isInAmbientContext(node)) { + for (var key in node.locals) { + var local = node.locals[key]; + if (!local.isReferenced && !local.exportSymbol) { + for (var _i = 0, _a = local.declarations; _i < _a.length; _i++) { + var declaration = _a[_i]; + if (!ts.isAmbientModule(declaration)) { + error(declaration.name, ts.Diagnostics._0_is_declared_but_never_used, local.name); + } + } + } + } + } } function checkBlock(node) { // Grammar checking for SyntaxKind.Block - if (node.kind === 195 /* Block */) { + if (node.kind === 199 /* Block */) { checkGrammarStatementInAmbientContext(node); } ts.forEach(node.statements, checkSourceElement); + if (node.locals) { + registerForUnusedIdentifiersCheck(node); + } } function checkCollisionWithArgumentsInGeneratedCode(node) { // no rest parameters \ declaration context \ overload - no codegen impact - if (!ts.hasRestParameter(node) || ts.isInAmbientContext(node) || ts.nodeIsMissing(node.body)) { + if (!ts.hasDeclaredRestParameter(node) || ts.isInAmbientContext(node) || ts.nodeIsMissing(node.body)) { return; } ts.forEach(node.parameters, function (p) { @@ -26442,12 +30437,12 @@ var ts; if (!(identifier && identifier.text === name)) { return false; } - if (node.kind === 142 /* PropertyDeclaration */ || - node.kind === 141 /* PropertySignature */ || - node.kind === 144 /* MethodDeclaration */ || - node.kind === 143 /* MethodSignature */ || - node.kind === 146 /* GetAccessor */ || - node.kind === 147 /* SetAccessor */) { + if (node.kind === 145 /* PropertyDeclaration */ || + node.kind === 144 /* PropertySignature */ || + node.kind === 147 /* MethodDeclaration */ || + node.kind === 146 /* MethodSignature */ || + node.kind === 149 /* GetAccessor */ || + node.kind === 150 /* SetAccessor */) { // it is ok to have member named '_super' or '_this' - member access is always qualified return false; } @@ -26456,7 +30451,7 @@ var ts; return false; } var root = ts.getRootDeclaration(node); - if (root.kind === 139 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) { + if (root.kind === 142 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) { // just an overload - no codegen impact return false; } @@ -26509,30 +30504,27 @@ var ts; return; } // Uninstantiated modules shouldnt do this check - if (node.kind === 221 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { + if (node.kind === 225 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return; } // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent var parent = getDeclarationContainer(node); - if (parent.kind === 251 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) { + if (parent.kind === 256 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent)) { // If the declaration happens to be in external module, report error that require and exports are reserved keywords error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); } } function checkCollisionWithGlobalPromiseInGeneratedCode(node, name) { - if (!compilerOptions.noCustomAsyncPromise) { - return; - } if (!needCollisionCheckForIdentifier(node, name, "Promise")) { return; } // Uninstantiated modules shouldnt do this check - if (node.kind === 221 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { + if (node.kind === 225 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return; } // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent var parent = getDeclarationContainer(node); - if (parent.kind === 251 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent) && parent.flags & 33554432 /* HasAsyncFunctions */) { + if (parent.kind === 256 /* SourceFile */ && ts.isExternalOrCommonJsModule(parent) && parent.flags & 2097152 /* HasAsyncFunctions */) { // If the declaration happens to be in external module, report error that Promise is a reserved identifier. error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, ts.declarationNameToString(name), ts.declarationNameToString(name)); } @@ -26561,13 +30553,13 @@ var ts; // const x = 0; // symbol for this declaration will be 'symbol' // } // skip block-scoped variables and parameters - if ((ts.getCombinedNodeFlags(node) & 24576 /* BlockScoped */) !== 0 || ts.isParameterDeclaration(node)) { + if ((ts.getCombinedNodeFlags(node) & 3072 /* BlockScoped */) !== 0 || ts.isParameterDeclaration(node)) { return; } // skip variable declarations that don't have initializers // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern // so we'll always treat binding elements as initialized - if (node.kind === 214 /* VariableDeclaration */ && !node.initializer) { + if (node.kind === 218 /* VariableDeclaration */ && !node.initializer) { return; } var symbol = getSymbolOfNode(node); @@ -26576,25 +30568,25 @@ var ts; if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { - if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 24576 /* BlockScoped */) { - var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 215 /* VariableDeclarationList */); - var container = varDeclList.parent.kind === 196 /* VariableStatement */ && varDeclList.parent.parent + if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 3072 /* BlockScoped */) { + var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 219 /* VariableDeclarationList */); + var container = varDeclList.parent.kind === 200 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : undefined; // names of block-scoped and function scoped variables can collide only // if block scoped variable is defined in the function\module\source file scope (because of variable hoisting) var namesShareScope = container && - (container.kind === 195 /* Block */ && ts.isFunctionLike(container.parent) || - container.kind === 222 /* ModuleBlock */ || - container.kind === 221 /* ModuleDeclaration */ || - container.kind === 251 /* SourceFile */); + (container.kind === 199 /* Block */ && ts.isFunctionLike(container.parent) || + container.kind === 226 /* ModuleBlock */ || + container.kind === 225 /* ModuleDeclaration */ || + container.kind === 256 /* SourceFile */); // here we know that function scoped variable is shadowed by block scoped one // if they are defined in the same scope - binder has already reported redeclaration error // otherwise if variable has an initializer - show error that initialization will fail // since LHS will be block scoped name instead of function scoped if (!namesShareScope) { - var name_16 = symbolToString(localDeclarationSymbol); - error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_16, name_16); + var name_17 = symbolToString(localDeclarationSymbol); + error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_17, name_17); } } } @@ -26602,32 +30594,63 @@ var ts; } // Check that a parameter initializer contains no references to parameters declared to the right of itself function checkParameterInitializer(node) { - if (ts.getRootDeclaration(node).kind !== 139 /* Parameter */) { + if (ts.getRootDeclaration(node).kind !== 142 /* Parameter */) { return; } var func = ts.getContainingFunction(node); visit(node.initializer); function visit(n) { - if (n.kind === 69 /* Identifier */) { - var referencedSymbol = getNodeLinks(n).resolvedSymbol; + if (ts.isTypeNode(n) || ts.isDeclarationName(n)) { + // do not dive in types + // skip declaration names (i.e. in object literal expressions) + return; + } + if (n.kind === 172 /* PropertyAccessExpression */) { + // skip property names in property access expression + return visit(n.expression); + } + else if (n.kind === 69 /* Identifier */) { // check FunctionLikeDeclaration.locals (stores parameters\function local variable) - // if it contains entry with a specified name and if this entry matches the resolved symbol - if (referencedSymbol && referencedSymbol !== unknownSymbol && getSymbol(func.locals, referencedSymbol.name, 107455 /* Value */) === referencedSymbol) { - if (referencedSymbol.valueDeclaration.kind === 139 /* Parameter */) { - if (referencedSymbol.valueDeclaration === node) { - error(n, ts.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer, ts.declarationNameToString(node.name)); + // if it contains entry with a specified name + var symbol = resolveName(n, n.text, 107455 /* Value */ | 8388608 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); + if (!symbol || symbol === unknownSymbol || !symbol.valueDeclaration) { + return; + } + if (symbol.valueDeclaration === node) { + error(n, ts.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer, ts.declarationNameToString(node.name)); + return; + } + // locals map for function contain both parameters and function locals + // so we need to do a bit of extra work to check if reference is legal + var enclosingContainer = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration); + if (enclosingContainer === func) { + if (symbol.valueDeclaration.kind === 142 /* Parameter */) { + // it is ok to reference parameter in initializer if either + // - parameter is located strictly on the left of current parameter declaration + if (symbol.valueDeclaration.pos < node.pos) { return; } - if (referencedSymbol.valueDeclaration.pos < node.pos) { - // legal case - parameter initializer references some parameter strictly on left of current parameter declaration - return; + // - parameter is wrapped in function-like entity + var current = n; + while (current !== node.initializer) { + if (ts.isFunctionLike(current.parent)) { + return; + } + // computed property names/initializers in instance property declaration of class like entities + // are executed in constructor and thus deferred + if (current.parent.kind === 145 /* PropertyDeclaration */ && + !(current.parent.flags & 32 /* Static */) && + ts.isClassLike(current.parent.parent)) { + return; + } + current = current.parent; } } error(n, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(node.name), ts.declarationNameToString(n)); } } else { - ts.forEachChild(n, visit); + return ts.forEachChild(n, visit); } } } @@ -26639,31 +30662,39 @@ var ts; // Do not use hasDynamicName here, because that returns false for well known symbols. // We want to perform checkComputedPropertyName for all computed properties, including // well known symbols. - if (node.name.kind === 137 /* ComputedPropertyName */) { + if (node.name.kind === 140 /* ComputedPropertyName */) { checkComputedPropertyName(node.name); if (node.initializer) { checkExpressionCached(node.initializer); } } - if (node.kind === 166 /* BindingElement */) { + if (node.kind === 169 /* BindingElement */) { // check computed properties inside property names of binding elements - if (node.propertyName && node.propertyName.kind === 137 /* ComputedPropertyName */) { + if (node.propertyName && node.propertyName.kind === 140 /* ComputedPropertyName */) { checkComputedPropertyName(node.propertyName); } + // check private/protected variable access + var parent_11 = node.parent.parent; + var parentType = getTypeForBindingElementParent(parent_11); + var name_18 = node.propertyName || node.name; + var property = getPropertyOfType(parentType, getTextOfPropertyName(name_18)); + if (parent_11.initializer && property && getParentOfSymbol(property)) { + checkClassPropertyAccess(parent_11, parent_11.initializer, parentType, property); + } } // For a binding pattern, check contained binding elements if (ts.isBindingPattern(node.name)) { ts.forEach(node.name.elements, checkSourceElement); } // For a parameter declaration with an initializer, error and exit if the containing function doesn't have a body - if (node.initializer && ts.getRootDeclaration(node).kind === 139 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { + if (node.initializer && ts.getRootDeclaration(node).kind === 142 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } // For a binding pattern, validate the initializer and exit if (ts.isBindingPattern(node.name)) { // Don't validate for-in initializer as it is already an error - if (node.initializer && node.parent.parent.kind !== 203 /* ForInStatement */) { + if (node.initializer && node.parent.parent.kind !== 207 /* ForInStatement */) { checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, /*headMessage*/ undefined); checkParameterInitializer(node); } @@ -26674,7 +30705,7 @@ var ts; if (node === symbol.valueDeclaration) { // Node is the primary declaration of the symbol, just validate the initializer // Don't validate for-in initializer as it is already an error - if (node.initializer && node.parent.parent.kind !== 203 /* ForInStatement */) { + if (node.initializer && node.parent.parent.kind !== 207 /* ForInStatement */) { checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, /*headMessage*/ undefined); checkParameterInitializer(node); } @@ -26689,11 +30720,15 @@ var ts; if (node.initializer) { checkTypeAssignableTo(checkExpressionCached(node.initializer), declarationType, node, /*headMessage*/ undefined); } + if (!areDeclarationFlagsIdentical(node, symbol.valueDeclaration)) { + error(symbol.valueDeclaration.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name)); + error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name)); + } } - if (node.kind !== 142 /* PropertyDeclaration */ && node.kind !== 141 /* PropertySignature */) { + if (node.kind !== 145 /* PropertyDeclaration */ && node.kind !== 144 /* PropertySignature */) { // We know we don't have a binding pattern or computed name here checkExportsOnMergedDeclarations(node); - if (node.kind === 214 /* VariableDeclaration */ || node.kind === 166 /* BindingElement */) { + if (node.kind === 218 /* VariableDeclaration */ || node.kind === 169 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } checkCollisionWithCapturedSuperVariable(node, node.name); @@ -26702,6 +30737,23 @@ var ts; checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name); } } + function areDeclarationFlagsIdentical(left, right) { + if ((left.kind === 142 /* Parameter */ && right.kind === 218 /* VariableDeclaration */) || + (left.kind === 218 /* VariableDeclaration */ && right.kind === 142 /* Parameter */)) { + // Differences in optionality between parameters and variables are allowed. + return true; + } + if (ts.hasQuestionToken(left) !== ts.hasQuestionToken(right)) { + return false; + } + var interestingFlags = 8 /* Private */ | + 16 /* Protected */ | + 256 /* Async */ | + 128 /* Abstract */ | + 64 /* Readonly */ | + 32 /* Static */; + return (left.flags & interestingFlags) === (right.flags & interestingFlags); + } function checkVariableDeclaration(node) { checkGrammarVariableDeclaration(node); return checkVariableLikeDeclaration(node); @@ -26717,7 +30769,7 @@ var ts; } function checkGrammarDisallowedModifiersOnObjectLiteralExpressionMethod(node) { // We only disallow modifier on a method declaration if it is a property of object-literal-expression - if (node.modifiers && node.parent.kind === 168 /* ObjectLiteralExpression */) { + if (node.modifiers && node.parent.kind === 171 /* ObjectLiteralExpression */) { if (ts.isAsyncFunctionLike(node)) { if (node.modifiers.length > 1) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); @@ -26738,7 +30790,7 @@ var ts; checkGrammarStatementInAmbientContext(node); checkExpression(node.expression); checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 197 /* EmptyStatement */) { + if (node.thenStatement.kind === 201 /* EmptyStatement */) { error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); } checkSourceElement(node.elseStatement); @@ -26758,12 +30810,12 @@ var ts; function checkForStatement(node) { // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 215 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 219 /* VariableDeclarationList */) { checkGrammarVariableDeclarationList(node.initializer); } } if (node.initializer) { - if (node.initializer.kind === 215 /* VariableDeclarationList */) { + if (node.initializer.kind === 219 /* VariableDeclarationList */) { ts.forEach(node.initializer.declarations, checkVariableDeclaration); } else { @@ -26775,6 +30827,9 @@ var ts; if (node.incrementor) checkExpression(node.incrementor); checkSourceElement(node.statement); + if (node.locals) { + registerForUnusedIdentifiersCheck(node); + } } function checkForOfStatement(node) { checkGrammarForInOrForOfStatement(node); @@ -26783,14 +30838,14 @@ var ts; // via checkRightHandSideOfForOf. // If the LHS is an expression, check the LHS, as a destructuring assignment or as a reference. // Then check that the RHS is assignable to it. - if (node.initializer.kind === 215 /* VariableDeclarationList */) { + if (node.initializer.kind === 219 /* VariableDeclarationList */) { checkForInOrForOfVariableDeclaration(node); } else { var varExpr = node.initializer; var iteratedType = checkRightHandSideOfForOf(node.expression); // There may be a destructuring assignment on the left side - if (varExpr.kind === 167 /* ArrayLiteralExpression */ || varExpr.kind === 168 /* ObjectLiteralExpression */) { + if (varExpr.kind === 170 /* ArrayLiteralExpression */ || varExpr.kind === 171 /* ObjectLiteralExpression */) { // iteratedType may be undefined. In this case, we still want to check the structure of // varExpr, in particular making sure it's a valid LeftHandSideExpression. But we'd like // to short circuit the type relation checking as much as possible, so we pass the unknownType. @@ -26799,7 +30854,7 @@ var ts; else { var leftType = checkExpression(varExpr); checkReferenceExpression(varExpr, /*invalidReferenceMessage*/ ts.Diagnostics.Invalid_left_hand_side_in_for_of_statement, - /*constantVariableMessage*/ ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant); + /*constantVariableMessage*/ ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_be_a_constant_or_a_read_only_property); // iteratedType will be undefined if the rightType was missing properties/signatures // required to get its iteratedType (like [Symbol.iterator] or next). This may be // because we accessed properties from anyType, or it may have led to an error inside @@ -26810,6 +30865,9 @@ var ts; } } checkSourceElement(node.statement); + if (node.locals) { + registerForUnusedIdentifiersCheck(node); + } } function checkForInStatement(node) { // Grammar checking @@ -26819,7 +30877,7 @@ var ts; // for (let VarDecl in Expr) Statement // VarDecl must be a variable declaration without a type annotation that declares a variable of type Any, // and Expr must be an expression of type Any, an object type, or a type parameter type. - if (node.initializer.kind === 215 /* VariableDeclarationList */) { + if (node.initializer.kind === 219 /* VariableDeclarationList */) { var variable = node.initializer.declarations[0]; if (variable && ts.isBindingPattern(variable.name)) { error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); @@ -26833,24 +30891,27 @@ var ts; // and Expr must be an expression of type Any, an object type, or a type parameter type. var varExpr = node.initializer; var leftType = checkExpression(varExpr); - if (varExpr.kind === 167 /* ArrayLiteralExpression */ || varExpr.kind === 168 /* ObjectLiteralExpression */) { + if (varExpr.kind === 170 /* ArrayLiteralExpression */ || varExpr.kind === 171 /* ObjectLiteralExpression */) { error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); } - else if (!isTypeAnyOrAllConstituentTypesHaveKind(leftType, 258 /* StringLike */)) { + else if (!isTypeAnyOrAllConstituentTypesHaveKind(leftType, 34 /* StringLike */)) { error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); } else { // run check only former check succeeded to avoid cascading errors - checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_in_statement, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant); + checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_in_statement, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_constant_or_a_read_only_property); } } - var rightType = checkExpression(node.expression); + var rightType = checkNonNullExpression(node.expression); // unknownType is returned i.e. if node.expression is identifier whose name cannot be resolved // in this case error about missing name is already reported - do not report extra one - if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 80896 /* ObjectType */ | 512 /* TypeParameter */)) { + if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 2588672 /* ObjectType */ | 16384 /* TypeParameter */)) { error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter); } checkSourceElement(node.statement); + if (node.locals) { + registerForUnusedIdentifiersCheck(node); + } } function checkForInOrForOfVariableDeclaration(iterationStatement) { var variableDeclarationList = iterationStatement.initializer; @@ -26861,7 +30922,7 @@ var ts; } } function checkRightHandSideOfForOf(rhsExpression) { - var expressionType = getTypeOfExpression(rhsExpression); + var expressionType = checkNonNullExpression(rhsExpression); return checkIteratedTypeOrElementType(expressionType, rhsExpression, /*allowStringInput*/ true); } function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput) { @@ -26880,7 +30941,9 @@ var ts; return indexType; } } - error(errorNode, ts.Diagnostics.Type_0_is_not_an_array_type, typeToString(inputType)); + if (errorNode) { + error(errorNode, ts.Diagnostics.Type_0_is_not_an_array_type, typeToString(inputType)); + } return unknownType; } /** @@ -26924,7 +30987,7 @@ var ts; if (!typeAsIterable.iterableElementType) { // As an optimization, if the type is instantiated directly using the globalIterableType (Iterable), // then just grab its type argument. - if ((type.flags & 4096 /* Reference */) && type.target === globalIterableType) { + if ((type.flags & 131072 /* Reference */) && type.target === getGlobalIterableType()) { typeAsIterable.iterableElementType = type.typeArguments[0]; } else { @@ -26939,7 +31002,7 @@ var ts; } return undefined; } - typeAsIterable.iterableElementType = getElementTypeOfIterator(getUnionType(ts.map(iteratorFunctionSignatures, getReturnTypeOfSignature)), errorNode); + typeAsIterable.iterableElementType = getElementTypeOfIterator(getUnionType(ts.map(iteratorFunctionSignatures, getReturnTypeOfSignature), /*subtypeReduction*/ true), errorNode); } } return typeAsIterable.iterableElementType; @@ -26965,7 +31028,7 @@ var ts; if (!typeAsIterator.iteratorElementType) { // As an optimization, if the type is instantiated directly using the globalIteratorType (Iterator), // then just grab its type argument. - if ((type.flags & 4096 /* Reference */) && type.target === globalIteratorType) { + if ((type.flags & 131072 /* Reference */) && type.target === getGlobalIteratorType()) { typeAsIterator.iteratorElementType = type.typeArguments[0]; } else { @@ -26980,7 +31043,7 @@ var ts; } return undefined; } - var iteratorNextResult = getUnionType(ts.map(iteratorNextFunctionSignatures, getReturnTypeOfSignature)); + var iteratorNextResult = getUnionType(ts.map(iteratorNextFunctionSignatures, getReturnTypeOfSignature), /*subtypeReduction*/ true); if (isTypeAny(iteratorNextResult)) { return undefined; } @@ -27002,7 +31065,7 @@ var ts; } // As an optimization, if the type is instantiated directly using the globalIterableIteratorType (IterableIterator), // then just grab its type argument. - if ((type.flags & 4096 /* Reference */) && type.target === globalIterableIteratorType) { + if ((type.flags & 131072 /* Reference */) && type.target === getGlobalIterableIteratorType()) { return type.typeArguments[0]; } return getElementTypeOfIterable(type, /*errorNode*/ undefined) || @@ -27012,7 +31075,7 @@ var ts; * This function does the following steps: * 1. Break up arrayOrStringType (possibly a union) into its string constituents and array constituents. * 2. Take the element types of the array constituents. - * 3. Return the union of the element types, and string if there was a string constitutent. + * 3. Return the union of the element types, and string if there was a string constituent. * * For example: * string -> string @@ -27030,11 +31093,11 @@ var ts; // After we remove all types that are StringLike, we will know if there was a string constituent // based on whether the remaining type is the same as the initial type. var arrayType = arrayOrStringType; - if (arrayOrStringType.flags & 16384 /* Union */) { - arrayType = getUnionType(ts.filter(arrayOrStringType.types, function (t) { return !(t.flags & 258 /* StringLike */); })); + if (arrayOrStringType.flags & 524288 /* Union */) { + arrayType = getUnionType(ts.filter(arrayOrStringType.types, function (t) { return !(t.flags & 34 /* StringLike */); }), /*subtypeReduction*/ true); } - else if (arrayOrStringType.flags & 258 /* StringLike */) { - arrayType = emptyUnionType; + else if (arrayOrStringType.flags & 34 /* StringLike */) { + arrayType = neverType; } var hasStringConstituent = arrayOrStringType !== arrayType; var reportedError = false; @@ -27045,7 +31108,7 @@ var ts; } // Now that we've removed all the StringLike types, if no constituents remain, then the entire // arrayOrStringType was a string. - if (arrayType === emptyObjectType) { + if (arrayType === neverType) { return stringType; } } @@ -27065,10 +31128,10 @@ var ts; var arrayElementType = getIndexTypeOfType(arrayType, 1 /* Number */) || unknownType; if (hasStringConstituent) { // This is just an optimization for the case where arrayOrStringType is string | string[] - if (arrayElementType.flags & 258 /* StringLike */) { + if (arrayElementType.flags & 34 /* StringLike */) { return stringType; } - return getUnionType([arrayElementType, stringType]); + return getUnionType([arrayElementType, stringType], /*subtypeReduction*/ true); } return arrayElementType; } @@ -27077,8 +31140,12 @@ var ts; checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node); // TODO: Check that target label is valid } - function isGetAccessorWithAnnotatatedSetAccessor(node) { - return !!(node.kind === 146 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 147 /* SetAccessor */))); + function isGetAccessorWithAnnotatedSetAccessor(node) { + return !!(node.kind === 149 /* GetAccessor */ && ts.getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 150 /* SetAccessor */))); + } + function isUnwrappedReturnTypeVoidOrAny(func, returnType) { + var unwrappedReturnType = ts.isAsyncFunctionLike(func) ? getPromisedType(returnType) : returnType; + return unwrappedReturnType && maybeTypeOfKind(unwrappedReturnType, 1024 /* Void */ | 1 /* Any */); } function checkReturnStatement(node) { // Grammar checking @@ -27088,12 +31155,12 @@ var ts; grammarErrorOnFirstToken(node, ts.Diagnostics.A_return_statement_can_only_be_used_within_a_function_body); } } - if (node.expression) { - var func = ts.getContainingFunction(node); - if (func) { - var signature = getSignatureFromDeclaration(func); - var returnType = getReturnTypeOfSignature(signature); - var exprType = checkExpressionCached(node.expression); + var func = ts.getContainingFunction(node); + if (func) { + var signature = getSignatureFromDeclaration(func); + var returnType = getReturnTypeOfSignature(signature); + if (strictNullChecks || node.expression || returnType === neverType) { + var exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; if (func.asteriskToken) { // A generator does not need its return expressions checked against its return type. // Instead, the yield expressions are checked against the element type. @@ -27101,36 +31168,42 @@ var ts; // for generators. return; } - if (func.kind === 147 /* SetAccessor */) { - error(node.expression, ts.Diagnostics.Setters_cannot_return_a_value); + if (func.kind === 150 /* SetAccessor */) { + if (node.expression) { + error(node.expression, ts.Diagnostics.Setters_cannot_return_a_value); + } } - else if (func.kind === 145 /* Constructor */) { - if (!checkTypeAssignableTo(exprType, returnType, node.expression)) { + else if (func.kind === 148 /* Constructor */) { + if (node.expression && !checkTypeAssignableTo(exprType, returnType, node.expression)) { error(node.expression, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); } } - else if (func.type || isGetAccessorWithAnnotatatedSetAccessor(func)) { + else if (func.type || isGetAccessorWithAnnotatedSetAccessor(func)) { if (ts.isAsyncFunctionLike(func)) { var promisedType = getPromisedType(returnType); - var awaitedType = checkAwaitedType(exprType, node.expression, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); + var awaitedType = checkAwaitedType(exprType, node.expression || node, ts.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); if (promisedType) { // If the function has a return type, but promisedType is // undefined, an error will be reported in checkAsyncFunctionReturnType // so we don't need to report one here. - checkTypeAssignableTo(awaitedType, promisedType, node.expression); + checkTypeAssignableTo(awaitedType, promisedType, node.expression || node); } } else { - checkTypeAssignableTo(exprType, returnType, node.expression); + checkTypeAssignableTo(exprType, returnType, node.expression || node); } } } + else if (func.kind !== 148 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) { + // The function has a return type, but the return statement doesn't have an expression. + error(node, ts.Diagnostics.Not_all_code_paths_return_a_value); + } } } function checkWithStatement(node) { // Grammar checking for withStatement if (!checkGrammarStatementInAmbientContext(node)) { - if (node.parserContextFlags & 8 /* Await */) { + if (node.flags & 33554432 /* AwaitContext */) { grammarErrorOnFirstToken(node, ts.Diagnostics.with_statements_are_not_allowed_in_an_async_function_block); } } @@ -27143,10 +31216,9 @@ var ts; var firstDefaultClause; var hasDuplicateDefaultClause = false; var expressionType = checkExpression(node.expression); - var expressionTypeIsStringLike = someConstituentTypeHasKind(expressionType, 258 /* StringLike */); ts.forEach(node.caseBlock.clauses, function (clause) { // Grammar check for duplicate default clauses, skip if we already report duplicate default clause - if (clause.kind === 245 /* DefaultClause */ && !hasDuplicateDefaultClause) { + if (clause.kind === 250 /* DefaultClause */ && !hasDuplicateDefaultClause) { if (firstDefaultClause === undefined) { firstDefaultClause = clause; } @@ -27158,22 +31230,22 @@ var ts; hasDuplicateDefaultClause = true; } } - if (produceDiagnostics && clause.kind === 244 /* CaseClause */) { + if (produceDiagnostics && clause.kind === 249 /* CaseClause */) { var caseClause = clause; - // TypeScript 1.0 spec (April 2014):5.9 - // In a 'switch' statement, each 'case' expression must be of a type that is assignable to or from the type of the 'switch' expression. + // TypeScript 1.0 spec (April 2014): 5.9 + // In a 'switch' statement, each 'case' expression must be of a type that is comparable + // to or from the type of the 'switch' expression. var caseType = checkExpression(caseClause.expression); - var expressionTypeIsAssignableToCaseType = - // Permit 'number[] | "foo"' to be asserted to 'string'. - (expressionTypeIsStringLike && someConstituentTypeHasKind(caseType, 258 /* StringLike */)) || - isTypeAssignableTo(expressionType, caseType); - if (!expressionTypeIsAssignableToCaseType) { - // 'expressionType is not assignable to caseType', try the reversed check and report errors if it fails - checkTypeAssignableTo(caseType, expressionType, caseClause.expression, /*headMessage*/ undefined); + if (!isTypeEqualityComparableTo(expressionType, caseType)) { + // expressionType is not comparable to caseType, try the reversed check and report errors if it fails + checkTypeComparableTo(caseType, expressionType, caseClause.expression, /*headMessage*/ undefined); } } ts.forEach(clause.statements, checkSourceElement); }); + if (node.caseBlock.locals) { + registerForUnusedIdentifiersCheck(node.caseBlock); + } } function checkLabeledStatement(node) { // Grammar checking @@ -27183,7 +31255,7 @@ var ts; if (ts.isFunctionLike(current)) { break; } - if (current.kind === 210 /* LabeledStatement */ && current.label.text === node.label.text) { + if (current.kind === 214 /* LabeledStatement */ && current.label.text === node.label.text) { var sourceFile = ts.getSourceFileOfNode(node); grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label)); break; @@ -27225,7 +31297,7 @@ var ts; else { var identifierName = catchClause.variableDeclaration.name.text; var locals = catchClause.block.locals; - if (locals && ts.hasProperty(locals, identifierName)) { + if (locals) { var localSymbol = locals[identifierName]; if (localSymbol && (localSymbol.flags & 2 /* BlockScopedVariable */) !== 0) { grammarErrorOnNode(localSymbol.valueDeclaration, ts.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, identifierName); @@ -27250,14 +31322,14 @@ var ts; checkIndexConstraintForProperty(prop, propType, type, declaredStringIndexer, stringIndexType, 0 /* String */); checkIndexConstraintForProperty(prop, propType, type, declaredNumberIndexer, numberIndexType, 1 /* Number */); }); - if (type.flags & 1024 /* Class */ && ts.isClassLike(type.symbol.valueDeclaration)) { + if (type.flags & 32768 /* Class */ && ts.isClassLike(type.symbol.valueDeclaration)) { var classDeclaration = type.symbol.valueDeclaration; for (var _i = 0, _a = classDeclaration.members; _i < _a.length; _i++) { var member = _a[_i]; // Only process instance properties with computed names here. // Static properties cannot be in conflict with indexers, // and properties with literal names were already checked. - if (!(member.flags & 64 /* Static */) && ts.hasDynamicName(member)) { + if (!(member.flags & 32 /* Static */) && ts.hasDynamicName(member)) { var propType = getTypeOfSymbol(member.symbol); checkIndexConstraintForProperty(member.symbol, propType, type, declaredStringIndexer, stringIndexType, 0 /* String */); checkIndexConstraintForProperty(member.symbol, propType, type, declaredNumberIndexer, numberIndexType, 1 /* Number */); @@ -27269,7 +31341,7 @@ var ts; if (stringIndexType && numberIndexType) { errorNode = declaredNumberIndexer || declaredStringIndexer; // condition 'errorNode === undefined' may appear if types does not declare nor string neither number indexer - if (!errorNode && (type.flags & 2048 /* Interface */)) { + if (!errorNode && (type.flags & 65536 /* Interface */)) { var someBaseTypeHasBothIndexers = ts.forEach(getBaseTypes(type), function (base) { return getIndexTypeOfType(base, 0 /* String */) && getIndexTypeOfType(base, 1 /* Number */); }); errorNode = someBaseTypeHasBothIndexers ? undefined : type.symbol.declarations[0]; } @@ -27288,13 +31360,13 @@ var ts; // perform property check if property or indexer is declared in 'type' // this allows to rule out cases when both property and indexer are inherited from the base class var errorNode; - if (prop.valueDeclaration.name.kind === 137 /* ComputedPropertyName */ || prop.parent === containingType.symbol) { + if (prop.valueDeclaration.name.kind === 140 /* ComputedPropertyName */ || prop.parent === containingType.symbol) { errorNode = prop.valueDeclaration; } else if (indexDeclaration) { errorNode = indexDeclaration; } - else if (containingType.flags & 2048 /* Interface */) { + else if (containingType.flags & 65536 /* Interface */) { // for interfaces property and indexer might be inherited from different bases // check if any base class already has both property and indexer. // check should be performed only if 'type' is the first type that brings property\indexer together @@ -27322,7 +31394,7 @@ var ts; error(name, message, name.text); } } - // Check each type parameter and check that list has no duplicate type parameter declarations + /** Check each type parameter and check that type parameters have no duplicate type parameter declarations */ function checkTypeParameters(typeParameterDeclarations) { if (typeParameterDeclarations) { for (var i = 0, n = typeParameterDeclarations.length; i < n; i++) { @@ -27338,6 +31410,24 @@ var ts; } } } + /** Check that type parameter lists are identical across multiple declarations */ + function checkTypeParameterListsIdentical(node, symbol) { + if (symbol.declarations.length === 1) { + return; + } + var firstDecl; + for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { + var declaration = _a[_i]; + if (declaration.kind === 221 /* ClassDeclaration */ || declaration.kind === 222 /* InterfaceDeclaration */) { + if (!firstDecl) { + firstDecl = declaration; + } + else if (!areTypeParametersIdentical(firstDecl.typeParameters, node.typeParameters)) { + error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, node.name.text); + } + } + } + } function checkClassExpression(node) { checkClassLikeDeclaration(node); checkNodeDeferred(node); @@ -27345,6 +31435,7 @@ var ts; } function checkClassExpressionDeferred(node) { ts.forEach(node.members, checkSourceElement); + registerForUnusedIdentifiersCheck(node); } function checkClassDeclaration(node) { if (!node.name && !(node.flags & 512 /* Default */)) { @@ -27352,6 +31443,7 @@ var ts; } checkClassLikeDeclaration(node); ts.forEach(node.members, checkSourceElement); + registerForUnusedIdentifiersCheck(node); } function checkClassLikeDeclaration(node) { checkGrammarClassDeclarationHeritageClauses(node); @@ -27368,12 +31460,15 @@ var ts; var type = getDeclaredTypeOfSymbol(symbol); var typeWithThis = getTypeWithThisArgument(type); var staticType = getTypeOfSymbol(symbol); + checkTypeParameterListsIdentical(node, symbol); + checkClassForDuplicateDeclarations(node); var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node); if (baseTypeNode) { var baseTypes = getBaseTypes(type); if (baseTypes.length && produceDiagnostics) { var baseType_1 = baseTypes[0]; var staticBaseType = getBaseConstructorTypeOfClass(type); + checkBaseTypeAccessibility(staticBaseType, baseTypeNode); checkSourceElement(baseTypeNode.expression); if (baseTypeNode.typeArguments) { ts.forEach(baseTypeNode.typeArguments, checkSourceElement); @@ -27386,6 +31481,11 @@ var ts; } checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(baseType_1, type.thisType), node.name || node, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1); checkTypeAssignableTo(staticType, getTypeWithoutSignatures(staticBaseType), node.name || node, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); + if (baseType_1.symbol.valueDeclaration && !ts.isInAmbientContext(baseType_1.symbol.valueDeclaration)) { + if (!isBlockScopedNameDeclaredBeforeUse(baseType_1.symbol.valueDeclaration, node)) { + error(baseTypeNode, ts.Diagnostics.A_class_must_be_declared_after_its_base_class); + } + } if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32 /* Class */)) { // When the static base type is a "class-like" constructor function (but not actually a class), we verify // that all instantiated base constructor signatures return the same type. We can simply compare the type @@ -27403,15 +31503,15 @@ var ts; if (implementedTypeNodes) { for (var _b = 0, implementedTypeNodes_1 = implementedTypeNodes; _b < implementedTypeNodes_1.length; _b++) { var typeRefNode = implementedTypeNodes_1[_b]; - if (!ts.isSupportedExpressionWithTypeArguments(typeRefNode)) { + if (!ts.isEntityNameExpression(typeRefNode.expression)) { error(typeRefNode.expression, ts.Diagnostics.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments); } checkTypeReferenceNode(typeRefNode); if (produceDiagnostics) { var t = getTypeFromTypeNode(typeRefNode); if (t !== unknownType) { - var declaredType = (t.flags & 4096 /* Reference */) ? t.target : t; - if (declaredType.flags & (1024 /* Class */ | 2048 /* Interface */)) { + var declaredType = (t.flags & 131072 /* Reference */) ? t.target : t; + if (declaredType.flags & (32768 /* Class */ | 65536 /* Interface */)) { checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(t, type.thisType), node.name || node, ts.Diagnostics.Class_0_incorrectly_implements_interface_1); } else { @@ -27426,6 +31526,18 @@ var ts; checkTypeForDuplicateIndexSignatures(node); } } + function checkBaseTypeAccessibility(type, node) { + var signatures = getSignaturesOfType(type, 1 /* Construct */); + if (signatures.length) { + var declaration = signatures[0].declaration; + if (declaration && declaration.flags & 8 /* Private */) { + var typeClassDeclaration = getClassLikeDeclarationOfSymbol(type.symbol); + if (!isNodeWithinClass(node, typeClassDeclaration)) { + error(node, ts.Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, node.expression.text); + } + } + } + } function getTargetSymbol(s) { // if symbol is instantiated its flags are not copied from the 'target' // so we'll need to get back original 'target' symbol to work with correct set of flags @@ -27460,7 +31572,7 @@ var ts; var baseDeclarationFlags = getDeclarationFlagsFromSymbol(base); ts.Debug.assert(!!derived, "derived should point to something, even if it is the base class' declaration."); if (derived) { - // In order to resolve whether the inherited method was overriden in the base class or not, + // In order to resolve whether the inherited method was overridden in the base class or not, // we compare the Symbols obtained. Since getTargetSymbol returns the symbol on the *uninstantiated* // type declaration, derived and base resolve to the same symbol even in the case of generic classes. if (derived === base) { @@ -27470,7 +31582,7 @@ var ts; // If there is no declaration for the derived class (as in the case of class expressions), // then the class cannot be declared abstract. if (baseDeclarationFlags & 128 /* Abstract */ && (!derivedClassDecl || !(derivedClassDecl.flags & 128 /* Abstract */))) { - if (derivedClassDecl.kind === 189 /* ClassExpression */) { + if (derivedClassDecl.kind === 192 /* ClassExpression */) { error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType)); } else { @@ -27481,11 +31593,11 @@ var ts; else { // derived overrides base. var derivedDeclarationFlags = getDeclarationFlagsFromSymbol(derived); - if ((baseDeclarationFlags & 16 /* Private */) || (derivedDeclarationFlags & 16 /* Private */)) { + if ((baseDeclarationFlags & 8 /* Private */) || (derivedDeclarationFlags & 8 /* Private */)) { // either base or derived property is private - not override, skip it continue; } - if ((baseDeclarationFlags & 64 /* Static */) !== (derivedDeclarationFlags & 64 /* Static */)) { + if ((baseDeclarationFlags & 32 /* Static */) !== (derivedDeclarationFlags & 32 /* Static */)) { // value of 'static' is not the same for properties - not override, skip it continue; } @@ -27518,7 +31630,7 @@ var ts; } } function isAccessor(kind) { - return kind === 146 /* GetAccessor */ || kind === 147 /* SetAccessor */; + return kind === 149 /* GetAccessor */ || kind === 150 /* SetAccessor */; } function areTypeParametersIdentical(list1, list2) { if (!list1 && !list2) { @@ -27553,7 +31665,7 @@ var ts; if (baseTypes.length < 2) { return true; } - var seen = {}; + var seen = ts.createMap(); ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) { seen[p.name] = { prop: p, containingType: type }; }); var ok = true; for (var _i = 0, baseTypes_2 = baseTypes; _i < baseTypes_2.length; _i++) { @@ -27561,11 +31673,11 @@ var ts; var properties = getPropertiesOfObjectType(getTypeWithThisArgument(base, type.thisType)); for (var _a = 0, properties_4 = properties; _a < properties_4.length; _a++) { var prop = properties_4[_a]; - if (!ts.hasProperty(seen, prop.name)) { + var existing = seen[prop.name]; + if (!existing) { seen[prop.name] = { prop: prop, containingType: base }; } else { - var existing = seen[prop.name]; var isInheritedProperty = existing.containingType !== type; if (isInheritedProperty && !isPropertyIdenticalTo(existing.prop, prop)) { ok = false; @@ -27588,13 +31700,9 @@ var ts; checkTypeNameIsReserved(node.name, ts.Diagnostics.Interface_name_cannot_be_0); checkExportsOnMergedDeclarations(node); var symbol = getSymbolOfNode(node); - var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 218 /* InterfaceDeclaration */); - if (symbol.declarations.length > 1) { - if (node !== firstInterfaceDecl && !areTypeParametersIdentical(firstInterfaceDecl.typeParameters, node.typeParameters)) { - error(node.name, ts.Diagnostics.All_declarations_of_an_interface_must_have_identical_type_parameters); - } - } + checkTypeParameterListsIdentical(node, symbol); // Only check this symbol once + var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 222 /* InterfaceDeclaration */); if (node === firstInterfaceDecl) { var type = getDeclaredTypeOfSymbol(symbol); var typeWithThis = getTypeWithThisArgument(type); @@ -27607,9 +31715,10 @@ var ts; checkIndexConstraints(type); } } + checkObjectTypeForDuplicateDeclarations(node); } ts.forEach(ts.getInterfaceBaseTypeNodes(node), function (heritageElement) { - if (!ts.isSupportedExpressionWithTypeArguments(heritageElement)) { + if (!ts.isEntityNameExpression(heritageElement.expression)) { error(heritageElement.expression, ts.Diagnostics.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments); } checkTypeReferenceNode(heritageElement); @@ -27617,6 +31726,7 @@ var ts; ts.forEach(node.members, checkSourceElement); if (produceDiagnostics) { checkTypeForDuplicateIndexSignatures(node); + registerForUnusedIdentifiersCheck(node); } } function checkTypeAliasDeclaration(node) { @@ -27698,7 +31808,7 @@ var ts; return value; function evalConstant(e) { switch (e.kind) { - case 182 /* PrefixUnaryExpression */: + case 185 /* PrefixUnaryExpression */: var value_1 = evalConstant(e.operand); if (value_1 === undefined) { return undefined; @@ -27709,7 +31819,7 @@ var ts; case 50 /* TildeToken */: return ~value_1; } return undefined; - case 184 /* BinaryExpression */: + case 187 /* BinaryExpression */: var left = evalConstant(e.left); if (left === undefined) { return undefined; @@ -27734,11 +31844,11 @@ var ts; return undefined; case 8 /* NumericLiteral */: return +e.text; - case 175 /* ParenthesizedExpression */: + case 178 /* ParenthesizedExpression */: return evalConstant(e.expression); case 69 /* Identifier */: - case 170 /* ElementAccessExpression */: - case 169 /* PropertyAccessExpression */: + case 173 /* ElementAccessExpression */: + case 172 /* PropertyAccessExpression */: var member = initializer.parent; var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); var enumType_1; @@ -27751,7 +31861,7 @@ var ts; } else { var expression = void 0; - if (e.kind === 170 /* ElementAccessExpression */) { + if (e.kind === 173 /* ElementAccessExpression */) { if (e.argumentExpression === undefined || e.argumentExpression.kind !== 9 /* StringLiteral */) { return undefined; @@ -27769,7 +31879,7 @@ var ts; if (current.kind === 69 /* Identifier */) { break; } - else if (current.kind === 169 /* PropertyAccessExpression */) { + else if (current.kind === 172 /* PropertyAccessExpression */) { current = current.expression; } else { @@ -27841,7 +31951,7 @@ var ts; var seenEnumMissingInitialInitializer_1 = false; ts.forEach(enumSymbol.declarations, function (declaration) { // return true if we hit a violation of the rule, false otherwise - if (declaration.kind !== 220 /* EnumDeclaration */) { + if (declaration.kind !== 224 /* EnumDeclaration */) { return false; } var enumDeclaration = declaration; @@ -27864,8 +31974,8 @@ var ts; var declarations = symbol.declarations; for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) { var declaration = declarations_5[_i]; - if ((declaration.kind === 217 /* ClassDeclaration */ || - (declaration.kind === 216 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) && + if ((declaration.kind === 221 /* ClassDeclaration */ || + (declaration.kind === 220 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) && !ts.isInAmbientContext(declaration)) { return declaration; } @@ -27927,7 +32037,7 @@ var ts; } // if the module merges with a class declaration in the same lexical scope, // we need to track this to ensure the correct emit. - var mergedClass = ts.getDeclarationOfKind(symbol, 217 /* ClassDeclaration */); + var mergedClass = ts.getDeclarationOfKind(symbol, 221 /* ClassDeclaration */); if (mergedClass && inSameLexicalScope(node, mergedClass)) { getNodeLinks(node).flags |= 32768 /* LexicalModuleMergesWithClass */; @@ -27941,7 +32051,7 @@ var ts; // - augmentation for a global scope is always applied // - augmentation for some external module is applied if symbol for augmentation is merged (it was combined with target module). var checkBody = isGlobalAugmentation || (getSymbolOfNode(node).flags & 33554432 /* Merged */); - if (checkBody) { + if (checkBody && node.body) { // body of ambient external module is always a module block for (var _i = 0, _a = node.body.statements; _i < _a.length; _i++) { var statement = _a[_i]; @@ -27969,35 +32079,35 @@ var ts; } } } - checkSourceElement(node.body); + if (node.body) { + checkSourceElement(node.body); + if (!ts.isGlobalScopeAugmentation(node)) { + registerForUnusedIdentifiersCheck(node); + } + } } function checkModuleAugmentationElement(node, isGlobalAugmentation) { switch (node.kind) { - case 196 /* VariableStatement */: + case 200 /* VariableStatement */: // error each individual name in variable statement instead of marking the entire variable statement for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) { var decl = _a[_i]; checkModuleAugmentationElement(decl, isGlobalAugmentation); } break; - case 230 /* ExportAssignment */: - case 231 /* ExportDeclaration */: + case 235 /* ExportAssignment */: + case 236 /* ExportDeclaration */: grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; - case 224 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind !== 9 /* StringLiteral */) { - error(node.name, ts.Diagnostics.Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope); - break; - } - // fallthrough - case 225 /* ImportDeclaration */: + case 229 /* ImportEqualsDeclaration */: + case 230 /* ImportDeclaration */: grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; - case 166 /* BindingElement */: - case 214 /* VariableDeclaration */: - var name_17 = node.name; - if (ts.isBindingPattern(name_17)) { - for (var _b = 0, _c = name_17.elements; _b < _c.length; _b++) { + case 169 /* BindingElement */: + case 218 /* VariableDeclaration */: + var name_19 = node.name; + if (ts.isBindingPattern(name_19)) { + for (var _b = 0, _c = name_19.elements; _b < _c.length; _b++) { var el = _c[_b]; // mark individual names in binding pattern checkModuleAugmentationElement(el, isGlobalAugmentation); @@ -28005,12 +32115,15 @@ var ts; break; } // fallthrough - case 217 /* ClassDeclaration */: - case 220 /* EnumDeclaration */: - case 216 /* FunctionDeclaration */: - case 218 /* InterfaceDeclaration */: - case 221 /* ModuleDeclaration */: - case 219 /* TypeAliasDeclaration */: + case 221 /* ClassDeclaration */: + case 224 /* EnumDeclaration */: + case 220 /* FunctionDeclaration */: + case 222 /* InterfaceDeclaration */: + case 225 /* ModuleDeclaration */: + case 223 /* TypeAliasDeclaration */: + if (isGlobalAugmentation) { + return; + } var symbol = getSymbolOfNode(node); if (symbol) { // module augmentations cannot introduce new names on the top level scope of the module @@ -28019,36 +32132,28 @@ var ts; // 2. main check - report error if value declaration of the parent symbol is module augmentation) var reportError = !(symbol.flags & 33554432 /* Merged */); if (!reportError) { - if (isGlobalAugmentation) { - // global symbol should not have parent since it is not explicitly exported - reportError = symbol.parent !== undefined; - } - else { - // symbol should not originate in augmentation - reportError = ts.isExternalModuleAugmentation(symbol.parent.valueDeclaration); - } - } - if (reportError) { - error(node, ts.Diagnostics.Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope); + // symbol should not originate in augmentation + reportError = ts.isExternalModuleAugmentation(symbol.parent.declarations[0]); } } break; } } function getFirstIdentifier(node) { - while (true) { - if (node.kind === 136 /* QualifiedName */) { - node = node.left; - } - else if (node.kind === 169 /* PropertyAccessExpression */) { - node = node.expression; - } - else { - break; - } + switch (node.kind) { + case 69 /* Identifier */: + return node; + case 139 /* QualifiedName */: + do { + node = node.left; + } while (node.kind !== 69 /* Identifier */); + return node; + case 172 /* PropertyAccessExpression */: + do { + node = node.expression; + } while (node.kind !== 69 /* Identifier */); + return node; } - ts.Debug.assert(node.kind === 69 /* Identifier */); - return node; } function checkExternalImportOrExportDeclaration(node) { var moduleName = ts.getExternalModuleName(node); @@ -28056,9 +32161,9 @@ var ts; error(moduleName, ts.Diagnostics.String_literal_expected); return false; } - var inAmbientExternalModule = node.parent.kind === 222 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); - if (node.parent.kind !== 251 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 231 /* ExportDeclaration */ ? + var inAmbientExternalModule = node.parent.kind === 226 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); + if (node.parent.kind !== 256 /* SourceFile */ && !inAmbientExternalModule) { + error(moduleName, node.kind === 236 /* ExportDeclaration */ ? ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); return false; @@ -28081,11 +32186,17 @@ var ts; var symbol = getSymbolOfNode(node); var target = resolveAlias(symbol); if (target !== unknownSymbol) { - var excludedMeanings = (symbol.flags & 107455 /* Value */ ? 107455 /* Value */ : 0) | - (symbol.flags & 793056 /* Type */ ? 793056 /* Type */ : 0) | - (symbol.flags & 1536 /* Namespace */ ? 1536 /* Namespace */ : 0); + // For external modules symbol represent local symbol for an alias. + // This local symbol will merge any other local declarations (excluding other aliases) + // and symbol.flags will contains combined representation for all merged declaration. + // Based on symbol.flags we can compute a set of excluded meanings (meaning that resolved alias should not have, + // otherwise it will conflict with some local declaration). Note that in addition to normal flags we include matching SymbolFlags.Export* + // in order to prevent collisions with declarations that were exported from the current module (they still contribute to local names). + var excludedMeanings = (symbol.flags & (107455 /* Value */ | 1048576 /* ExportValue */) ? 107455 /* Value */ : 0) | + (symbol.flags & 793064 /* Type */ ? 793064 /* Type */ : 0) | + (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0); if (target.flags & excludedMeanings) { - var message = node.kind === 233 /* ExportSpecifier */ ? + var message = node.kind === 238 /* ExportSpecifier */ ? ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; error(node, message, symbolToString(symbol)); @@ -28103,7 +32214,7 @@ var ts; // If we hit an import declaration in an illegal context, just bail out to avoid cascading errors. return; } - if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && (node.flags & 1022 /* Modifier */)) { + if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && (node.flags & 1023 /* Modifier */)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_import_declaration_cannot_have_modifiers); } if (checkExternalImportOrExportDeclaration(node)) { @@ -28113,7 +32224,7 @@ var ts; checkImportBinding(importClause); } if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 227 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 232 /* NamespaceImport */) { checkImportBinding(importClause.namedBindings); } else { @@ -28131,7 +32242,7 @@ var ts; checkGrammarDecorators(node) || checkGrammarModifiers(node); if (ts.isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { checkImportBinding(node); - if (node.flags & 2 /* Export */) { + if (node.flags & 1 /* Export */) { markExportAsReferenced(node); } if (ts.isInternalModuleImportEqualsDeclaration(node)) { @@ -28140,19 +32251,19 @@ var ts; if (target.flags & 107455 /* Value */) { // Target is a value symbol, check that it is not hidden by a local declaration with the same name var moduleName = getFirstIdentifier(node.moduleReference); - if (!(resolveEntityName(moduleName, 107455 /* Value */ | 1536 /* Namespace */).flags & 1536 /* Namespace */)) { + if (!(resolveEntityName(moduleName, 107455 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) { error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); } } - if (target.flags & 793056 /* Type */) { + if (target.flags & 793064 /* Type */) { checkTypeNameIsReserved(node.name, ts.Diagnostics.Import_name_cannot_be_0); } } } else { - if (modulekind === 5 /* ES6 */ && !ts.isInAmbientContext(node)) { + if (modulekind === ts.ModuleKind.ES6 && !ts.isInAmbientContext(node)) { // Import equals declaration is deprecated in es6 or above - grammarErrorOnNode(node, ts.Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead); + grammarErrorOnNode(node, ts.Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead); } } } @@ -28162,7 +32273,7 @@ var ts; // If we hit an export in an illegal context, just bail out to avoid cascading errors. return; } - if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && (node.flags & 1022 /* Modifier */)) { + if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && (node.flags & 1023 /* Modifier */)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_declaration_cannot_have_modifiers); } if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { @@ -28170,8 +32281,8 @@ var ts; // export { x, y } // export { x, y } from "foo" ts.forEach(node.exportClause.elements, checkExportSpecifier); - var inAmbientExternalModule = node.parent.kind === 222 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); - if (node.parent.kind !== 251 /* SourceFile */ && !inAmbientExternalModule) { + var inAmbientExternalModule = node.parent.kind === 226 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent); + if (node.parent.kind !== 256 /* SourceFile */ && !inAmbientExternalModule) { error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); } } @@ -28185,7 +32296,7 @@ var ts; } } function checkGrammarModuleElementContext(node, errorMessage) { - if (node.parent.kind !== 251 /* SourceFile */ && node.parent.kind !== 222 /* ModuleBlock */ && node.parent.kind !== 221 /* ModuleDeclaration */) { + if (node.parent.kind !== 256 /* SourceFile */ && node.parent.kind !== 226 /* ModuleBlock */ && node.parent.kind !== 225 /* ModuleDeclaration */) { return grammarErrorOnFirstToken(node, errorMessage); } } @@ -28194,10 +32305,10 @@ var ts; if (!node.parent.parent.moduleSpecifier) { var exportedName = node.propertyName || node.name; // find immediate value referenced by exported name (SymbolFlags.Alias is set so we don't chase down aliases) - var symbol = resolveName(exportedName, exportedName.text, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */, + var symbol = resolveName(exportedName, exportedName.text, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); if (symbol && (symbol === undefinedSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { - error(exportedName, ts.Diagnostics.Cannot_re_export_name_that_is_not_defined_in_the_module); + error(exportedName, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, exportedName.text); } else { markExportAsReferenced(node); @@ -28209,13 +32320,13 @@ var ts; // If we hit an export assignment in an illegal context, just bail out to avoid cascading errors. return; } - var container = node.parent.kind === 251 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 221 /* ModuleDeclaration */ && !ts.isAmbientModule(container)) { + var container = node.parent.kind === 256 /* SourceFile */ ? node.parent : node.parent.parent; + if (container.kind === 225 /* ModuleDeclaration */ && !ts.isAmbientModule(container)) { error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); return; } // Grammar checking - if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && (node.flags & 1022 /* Modifier */)) { + if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && (node.flags & 1023 /* Modifier */)) { grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_assignment_cannot_have_modifiers); } if (node.expression.kind === 69 /* Identifier */) { @@ -28226,11 +32337,11 @@ var ts; } checkExternalModuleExports(container); if (node.isExportEquals && !ts.isInAmbientContext(node)) { - if (modulekind === 5 /* ES6 */) { + if (modulekind === ts.ModuleKind.ES6) { // export assignment is not supported in es6 modules - grammarErrorOnNode(node, ts.Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_modules_Consider_using_export_default_or_another_module_format_instead); + grammarErrorOnNode(node, ts.Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_2015_modules_Consider_using_export_default_or_another_module_format_instead); } - else if (modulekind === 4 /* System */) { + else if (modulekind === ts.ModuleKind.System) { // system modules does not support export assignment grammarErrorOnNode(node, ts.Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system); } @@ -28262,12 +32373,21 @@ var ts; continue; } var _a = exports[id], declarations = _a.declarations, flags = _a.flags; - // ECMA262: 15.2.1.1 It is a Syntax Error if the ExportedNames of ModuleItemList contains any duplicate entries. (TS Exceptions: namespaces, function overloads, enums, and interfaces) - if (!(flags & (1536 /* Namespace */ | 64 /* Interface */ | 384 /* Enum */)) && (flags & 524288 /* TypeAlias */ ? declarations.length - 1 : declarations.length) > 1) { - var exportedDeclarations = ts.filter(declarations, isNotOverload); - if (exportedDeclarations.length > 1) { - for (var _i = 0, exportedDeclarations_1 = exportedDeclarations; _i < exportedDeclarations_1.length; _i++) { - var declaration = exportedDeclarations_1[_i]; + // ECMA262: 15.2.1.1 It is a Syntax Error if the ExportedNames of ModuleItemList contains any duplicate entries. + // (TS Exceptions: namespaces, function overloads, enums, and interfaces) + if (flags & (1920 /* Namespace */ | 64 /* Interface */ | 384 /* Enum */)) { + continue; + } + var exportedDeclarationsCount = ts.countWhere(declarations, isNotOverload); + if (flags & 524288 /* TypeAlias */ && exportedDeclarationsCount <= 2) { + // it is legal to merge type alias with other values + // so count should be either 1 (just type alias) or 2 (type alias + merged value) + continue; + } + if (exportedDeclarationsCount > 1) { + for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) { + var declaration = declarations_6[_i]; + if (isNotOverload(declaration)) { diagnostics.add(ts.createDiagnosticForNode(declaration, ts.Diagnostics.Cannot_redeclare_exported_variable_0, id)); } } @@ -28276,7 +32396,7 @@ var ts; links.exportsChecked = true; } function isNotOverload(declaration) { - return declaration.kind !== 216 /* FunctionDeclaration */ || !!declaration.body; + return declaration.kind !== 220 /* FunctionDeclaration */ || !!declaration.body; } } function checkSourceElement(node) { @@ -28285,121 +32405,121 @@ var ts; } var kind = node.kind; if (cancellationToken) { - // Only bother checking on a few construct kinds. We don't want to be excessivly + // Only bother checking on a few construct kinds. We don't want to be excessively // hitting the cancellation token on every node we check. switch (kind) { - case 221 /* ModuleDeclaration */: - case 217 /* ClassDeclaration */: - case 218 /* InterfaceDeclaration */: - case 216 /* FunctionDeclaration */: + case 225 /* ModuleDeclaration */: + case 221 /* ClassDeclaration */: + case 222 /* InterfaceDeclaration */: + case 220 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } switch (kind) { - case 138 /* TypeParameter */: + case 141 /* TypeParameter */: return checkTypeParameter(node); - case 139 /* Parameter */: + case 142 /* Parameter */: return checkParameter(node); - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: return checkPropertyDeclaration(node); - case 153 /* FunctionType */: - case 154 /* ConstructorType */: - case 148 /* CallSignature */: - case 149 /* ConstructSignature */: + case 156 /* FunctionType */: + case 157 /* ConstructorType */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: return checkSignatureDeclaration(node); - case 150 /* IndexSignature */: + case 153 /* IndexSignature */: return checkSignatureDeclaration(node); - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: return checkMethodDeclaration(node); - case 145 /* Constructor */: + case 148 /* Constructor */: return checkConstructorDeclaration(node); - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: return checkAccessorDeclaration(node); - case 152 /* TypeReference */: + case 155 /* TypeReference */: return checkTypeReferenceNode(node); - case 151 /* TypePredicate */: + case 154 /* TypePredicate */: return checkTypePredicate(node); - case 155 /* TypeQuery */: + case 158 /* TypeQuery */: return checkTypeQuery(node); - case 156 /* TypeLiteral */: + case 159 /* TypeLiteral */: return checkTypeLiteral(node); - case 157 /* ArrayType */: + case 160 /* ArrayType */: return checkArrayType(node); - case 158 /* TupleType */: + case 161 /* TupleType */: return checkTupleType(node); - case 159 /* UnionType */: - case 160 /* IntersectionType */: + case 162 /* UnionType */: + case 163 /* IntersectionType */: return checkUnionOrIntersectionType(node); - case 161 /* ParenthesizedType */: + case 164 /* ParenthesizedType */: return checkSourceElement(node.type); - case 216 /* FunctionDeclaration */: + case 220 /* FunctionDeclaration */: return checkFunctionDeclaration(node); - case 195 /* Block */: - case 222 /* ModuleBlock */: + case 199 /* Block */: + case 226 /* ModuleBlock */: return checkBlock(node); - case 196 /* VariableStatement */: + case 200 /* VariableStatement */: return checkVariableStatement(node); - case 198 /* ExpressionStatement */: + case 202 /* ExpressionStatement */: return checkExpressionStatement(node); - case 199 /* IfStatement */: + case 203 /* IfStatement */: return checkIfStatement(node); - case 200 /* DoStatement */: + case 204 /* DoStatement */: return checkDoStatement(node); - case 201 /* WhileStatement */: + case 205 /* WhileStatement */: return checkWhileStatement(node); - case 202 /* ForStatement */: + case 206 /* ForStatement */: return checkForStatement(node); - case 203 /* ForInStatement */: + case 207 /* ForInStatement */: return checkForInStatement(node); - case 204 /* ForOfStatement */: + case 208 /* ForOfStatement */: return checkForOfStatement(node); - case 205 /* ContinueStatement */: - case 206 /* BreakStatement */: + case 209 /* ContinueStatement */: + case 210 /* BreakStatement */: return checkBreakOrContinueStatement(node); - case 207 /* ReturnStatement */: + case 211 /* ReturnStatement */: return checkReturnStatement(node); - case 208 /* WithStatement */: + case 212 /* WithStatement */: return checkWithStatement(node); - case 209 /* SwitchStatement */: + case 213 /* SwitchStatement */: return checkSwitchStatement(node); - case 210 /* LabeledStatement */: + case 214 /* LabeledStatement */: return checkLabeledStatement(node); - case 211 /* ThrowStatement */: + case 215 /* ThrowStatement */: return checkThrowStatement(node); - case 212 /* TryStatement */: + case 216 /* TryStatement */: return checkTryStatement(node); - case 214 /* VariableDeclaration */: + case 218 /* VariableDeclaration */: return checkVariableDeclaration(node); - case 166 /* BindingElement */: + case 169 /* BindingElement */: return checkBindingElement(node); - case 217 /* ClassDeclaration */: + case 221 /* ClassDeclaration */: return checkClassDeclaration(node); - case 218 /* InterfaceDeclaration */: + case 222 /* InterfaceDeclaration */: return checkInterfaceDeclaration(node); - case 219 /* TypeAliasDeclaration */: + case 223 /* TypeAliasDeclaration */: return checkTypeAliasDeclaration(node); - case 220 /* EnumDeclaration */: + case 224 /* EnumDeclaration */: return checkEnumDeclaration(node); - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: return checkModuleDeclaration(node); - case 225 /* ImportDeclaration */: + case 230 /* ImportDeclaration */: return checkImportDeclaration(node); - case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportEqualsDeclaration */: return checkImportEqualsDeclaration(node); - case 231 /* ExportDeclaration */: + case 236 /* ExportDeclaration */: return checkExportDeclaration(node); - case 230 /* ExportAssignment */: + case 235 /* ExportAssignment */: return checkExportAssignment(node); - case 197 /* EmptyStatement */: + case 201 /* EmptyStatement */: checkGrammarStatementInAmbientContext(node); return; - case 213 /* DebuggerStatement */: + case 217 /* DebuggerStatement */: checkGrammarStatementInAmbientContext(node); return; - case 234 /* MissingDeclaration */: + case 239 /* MissingDeclaration */: return checkMissingDeclaration(node); } } @@ -28421,47 +32541,53 @@ var ts; for (var _i = 0, deferredNodes_1 = deferredNodes; _i < deferredNodes_1.length; _i++) { var node = deferredNodes_1[_i]; switch (node.kind) { - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: checkFunctionExpressionOrObjectLiteralMethodDeferred(node); break; - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: checkAccessorDeferred(node); break; - case 189 /* ClassExpression */: + case 192 /* ClassExpression */: checkClassExpressionDeferred(node); break; } } } function checkSourceFile(node) { - var start = new Date().getTime(); + ts.performance.mark("beforeCheck"); checkSourceFileWorker(node); - ts.checkTime += new Date().getTime() - start; + ts.performance.mark("afterCheck"); + ts.performance.measure("Check", "beforeCheck", "afterCheck"); } // Fully type check a source file and collect the relevant diagnostics. function checkSourceFileWorker(node) { var links = getNodeLinks(node); if (!(links.flags & 1 /* TypeChecked */)) { - // Check whether the file has declared it is the default lib, - // and whether the user has specifically chosen to avoid checking it. - if (compilerOptions.skipDefaultLibCheck) { - // If the user specified '--noLib' and a file has a '/// ', - // then we should treat that file as a default lib. - if (node.hasNoDefaultLib) { - return; - } + // If skipLibCheck is enabled, skip type checking if file is a declaration file. + // If skipDefaultLibCheck is enabled, skip type checking if file contains a + // '/// ' directive. + if (compilerOptions.skipLibCheck && node.isDeclarationFile || compilerOptions.skipDefaultLibCheck && node.hasNoDefaultLib) { + return; } // Grammar checking checkGrammarSourceFile(node); potentialThisCollisions.length = 0; deferredNodes = []; + deferredUnusedIdentifierNodes = produceDiagnostics && noUnusedIdentifiers ? [] : undefined; ts.forEach(node.statements, checkSourceElement); checkDeferredNodes(); + if (ts.isExternalModule(node)) { + registerForUnusedIdentifiersCheck(node); + } + if (!node.isDeclarationFile) { + checkUnusedIdentifiers(); + } deferredNodes = undefined; + deferredUnusedIdentifierNodes = undefined; if (ts.isExternalOrCommonJsModule(node)) { checkExternalModuleExports(node); } @@ -28506,7 +32632,7 @@ var ts; function isInsideWithStatementBody(node) { if (node) { while (node.parent) { - if (node.parent.kind === 208 /* WithStatement */ && node.parent.statement === node) { + if (node.parent.kind === 212 /* WithStatement */ && node.parent.statement === node) { return true; } node = node.parent; @@ -28515,7 +32641,7 @@ var ts; return false; } function getSymbolsInScope(location, meaning) { - var symbols = {}; + var symbols = ts.createMap(); var memberFlags = 0; if (isInsideWithStatementBody(location)) { // We cannot answer semantic questions within a with block, do not proceed any further @@ -28529,34 +32655,34 @@ var ts; copySymbols(location.locals, meaning); } switch (location.kind) { - case 251 /* SourceFile */: + case 256 /* SourceFile */: if (!ts.isExternalOrCommonJsModule(location)) { break; } - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 8914931 /* ModuleMember */); break; - case 220 /* EnumDeclaration */: + case 224 /* EnumDeclaration */: copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */); break; - case 189 /* ClassExpression */: + case 192 /* ClassExpression */: var className = location.name; if (className) { copySymbol(location.symbol, meaning); } // fall through; this fall-through is necessary because we would like to handle // type parameter inside class expression similar to how we handle it in classDeclaration and interface Declaration - case 217 /* ClassDeclaration */: - case 218 /* InterfaceDeclaration */: + case 221 /* ClassDeclaration */: + case 222 /* InterfaceDeclaration */: // If we didn't come from static member of class or interface, // add the type parameters into the symbol table // (type parameters of classDeclaration/classExpression and interface are in member property of the symbol. // Note: that the memberFlags come from previous iteration. - if (!(memberFlags & 64 /* Static */)) { - copySymbols(getSymbolOfNode(location).members, meaning & 793056 /* Type */); + if (!(memberFlags & 32 /* Static */)) { + copySymbols(getSymbolOfNode(location).members, meaning & 793064 /* Type */); } break; - case 176 /* FunctionExpression */: + case 179 /* FunctionExpression */: var funcName = location.name; if (funcName) { copySymbol(location.symbol, meaning); @@ -28584,7 +32710,7 @@ var ts; // We will copy all symbol regardless of its reserved name because // symbolsToArray will check whether the key is a reserved name and // it will not copy symbol with reserved name to the array - if (!ts.hasProperty(symbols, id)) { + if (!symbols[id]) { symbols[id] = symbol; } } @@ -28605,37 +32731,51 @@ var ts; } function isTypeDeclaration(node) { switch (node.kind) { - case 138 /* TypeParameter */: - case 217 /* ClassDeclaration */: - case 218 /* InterfaceDeclaration */: - case 219 /* TypeAliasDeclaration */: - case 220 /* EnumDeclaration */: + case 141 /* TypeParameter */: + case 221 /* ClassDeclaration */: + case 222 /* InterfaceDeclaration */: + case 223 /* TypeAliasDeclaration */: + case 224 /* EnumDeclaration */: return true; } } // True if the given identifier is part of a type reference function isTypeReferenceIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 136 /* QualifiedName */) { + while (node.parent && node.parent.kind === 139 /* QualifiedName */) { node = node.parent; } - return node.parent && node.parent.kind === 152 /* TypeReference */; + return node.parent && (node.parent.kind === 155 /* TypeReference */ || node.parent.kind === 267 /* JSDocTypeReference */); } function isHeritageClauseElementIdentifier(entityName) { var node = entityName; - while (node.parent && node.parent.kind === 169 /* PropertyAccessExpression */) { + while (node.parent && node.parent.kind === 172 /* PropertyAccessExpression */) { node = node.parent; } - return node.parent && node.parent.kind === 191 /* ExpressionWithTypeArguments */; + return node.parent && node.parent.kind === 194 /* ExpressionWithTypeArguments */; + } + function forEachEnclosingClass(node, callback) { + var result; + while (true) { + node = ts.getContainingClass(node); + if (!node) + break; + if (result = callback(node)) + break; + } + return result; + } + function isNodeWithinClass(node, classDeclaration) { + return !!forEachEnclosingClass(node, function (n) { return n === classDeclaration; }); } function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 136 /* QualifiedName */) { + while (nodeOnRightSide.parent.kind === 139 /* QualifiedName */) { nodeOnRightSide = nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 224 /* ImportEqualsDeclaration */) { + if (nodeOnRightSide.parent.kind === 229 /* ImportEqualsDeclaration */) { return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; } - if (nodeOnRightSide.parent.kind === 230 /* ExportAssignment */) { + if (nodeOnRightSide.parent.kind === 235 /* ExportAssignment */) { return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; } return undefined; @@ -28647,7 +32787,7 @@ var ts; if (ts.isDeclarationName(entityName)) { return getSymbolOfNode(entityName.parent); } - if (ts.isInJavaScriptFile(entityName) && entityName.parent.kind === 169 /* PropertyAccessExpression */) { + if (ts.isInJavaScriptFile(entityName) && entityName.parent.kind === 172 /* PropertyAccessExpression */) { var specialPropertyAssignmentKind = ts.getSpecialPropertyAssignmentKind(entityName.parent.parent); switch (specialPropertyAssignmentKind) { case 1 /* ExportsProperty */: @@ -28659,15 +32799,15 @@ var ts; default: } } - if (entityName.parent.kind === 230 /* ExportAssignment */) { + if (entityName.parent.kind === 235 /* ExportAssignment */ && ts.isEntityNameExpression(entityName)) { return resolveEntityName(entityName, - /*all meanings*/ 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */); + /*all meanings*/ 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */); } - if (entityName.kind !== 169 /* PropertyAccessExpression */) { - if (isInRightSideOfImportOrExportAssignment(entityName)) { - // Since we already checked for ExportAssignment, this really could only be an Import - return getSymbolOfPartOfRightHandSideOfImportEquals(entityName); - } + if (entityName.kind !== 172 /* PropertyAccessExpression */ && isInRightSideOfImportOrExportAssignment(entityName)) { + // Since we already checked for ExportAssignment, this really could only be an Import + var importEqualsDeclaration = ts.getAncestor(entityName, 229 /* ImportEqualsDeclaration */); + ts.Debug.assert(importEqualsDeclaration !== undefined); + return getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importEqualsDeclaration, /*dontResolveAlias*/ true); } if (ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { entityName = entityName.parent; @@ -28675,43 +32815,38 @@ var ts; if (isHeritageClauseElementIdentifier(entityName)) { var meaning = 0 /* None */; // In an interface or class, we're definitely interested in a type. - if (entityName.parent.kind === 191 /* ExpressionWithTypeArguments */) { - meaning = 793056 /* Type */; + if (entityName.parent.kind === 194 /* ExpressionWithTypeArguments */) { + meaning = 793064 /* Type */; // In a class 'extends' clause we are also looking for a value. if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent)) { meaning |= 107455 /* Value */; } } else { - meaning = 1536 /* Namespace */; + meaning = 1920 /* Namespace */; } meaning |= 8388608 /* Alias */; return resolveEntityName(entityName, meaning); } - else if ((entityName.parent.kind === 238 /* JsxOpeningElement */) || - (entityName.parent.kind === 237 /* JsxSelfClosingElement */) || - (entityName.parent.kind === 240 /* JsxClosingElement */)) { - return getJsxElementTagSymbol(entityName.parent); - } else if (ts.isExpression(entityName)) { if (ts.nodeIsMissing(entityName)) { // Missing entity name. return undefined; } if (entityName.kind === 69 /* Identifier */) { - // Include aliases in the meaning, this ensures that we do not follow aliases to where they point and instead - // return the alias symbol. - var meaning = 107455 /* Value */ | 8388608 /* Alias */; - return resolveEntityName(entityName, meaning); + if (ts.isJSXTagName(entityName) && isJsxIntrinsicIdentifier(entityName)) { + return getIntrinsicTagSymbol(entityName.parent); + } + return resolveEntityName(entityName, 107455 /* Value */, /*ignoreErrors*/ false, /*dontResolveAlias*/ true); } - else if (entityName.kind === 169 /* PropertyAccessExpression */) { + else if (entityName.kind === 172 /* PropertyAccessExpression */) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkPropertyAccessExpression(entityName); } return getNodeLinks(entityName).resolvedSymbol; } - else if (entityName.kind === 136 /* QualifiedName */) { + else if (entityName.kind === 139 /* QualifiedName */) { var symbol = getNodeLinks(entityName).resolvedSymbol; if (!symbol) { checkQualifiedName(entityName); @@ -28720,22 +32855,22 @@ var ts; } } else if (isTypeReferenceIdentifier(entityName)) { - var meaning = entityName.parent.kind === 152 /* TypeReference */ ? 793056 /* Type */ : 1536 /* Namespace */; - // Include aliases in the meaning, this ensures that we do not follow aliases to where they point and instead - // return the alias symbol. - meaning |= 8388608 /* Alias */; - return resolveEntityName(entityName, meaning); + var meaning = (entityName.parent.kind === 155 /* TypeReference */ || entityName.parent.kind === 267 /* JSDocTypeReference */) ? 793064 /* Type */ : 1920 /* Namespace */; + return resolveEntityName(entityName, meaning, /*ignoreErrors*/ false, /*dontResolveAlias*/ true); } - else if (entityName.parent.kind === 241 /* JsxAttribute */) { + else if (entityName.parent.kind === 246 /* JsxAttribute */) { return getJsxAttributePropertySymbol(entityName.parent); } - if (entityName.parent.kind === 151 /* TypePredicate */) { + if (entityName.parent.kind === 154 /* TypePredicate */) { return resolveEntityName(entityName, /*meaning*/ 1 /* FunctionScopedVariable */); } // Do we want to return undefined here? return undefined; } function getSymbolAtLocation(node) { + if (node.kind === 256 /* SourceFile */) { + return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined; + } if (isInsideWithStatementBody(node)) { // We cannot answer semantic questions within a with block, do not proceed any further return undefined; @@ -28744,14 +32879,15 @@ var ts; // This is a declaration, call getSymbolOfNode return getSymbolOfNode(node.parent); } + else if (ts.isLiteralComputedPropertyDeclarationName(node)) { + return getSymbolOfNode(node.parent.parent); + } if (node.kind === 69 /* Identifier */) { if (isInRightSideOfImportOrExportAssignment(node)) { - return node.parent.kind === 230 /* ExportAssignment */ - ? getSymbolOfEntityNameOrPropertyAccessExpression(node) - : getSymbolOfPartOfRightHandSideOfImportEquals(node); + return getSymbolOfEntityNameOrPropertyAccessExpression(node); } - else if (node.parent.kind === 166 /* BindingElement */ && - node.parent.parent.kind === 164 /* ObjectBindingPattern */ && + else if (node.parent.kind === 169 /* BindingElement */ && + node.parent.parent.kind === 167 /* ObjectBindingPattern */ && node === node.parent.propertyName) { var typeOfPattern = getTypeOfNode(node.parent.parent); var propertyDeclaration = typeOfPattern && getPropertyOfType(typeOfPattern, node.text); @@ -28762,19 +32898,27 @@ var ts; } switch (node.kind) { case 69 /* Identifier */: - case 169 /* PropertyAccessExpression */: - case 136 /* QualifiedName */: + case 172 /* PropertyAccessExpression */: + case 139 /* QualifiedName */: return getSymbolOfEntityNameOrPropertyAccessExpression(node); case 97 /* ThisKeyword */: + var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false); + if (ts.isFunctionLike(container)) { + var sig = getSignatureFromDeclaration(container); + if (sig.thisParameter) { + return sig.thisParameter; + } + } + // fallthrough case 95 /* SuperKeyword */: var type = ts.isExpression(node) ? checkExpression(node) : getTypeFromTypeNode(node); return type.symbol; - case 162 /* ThisType */: + case 165 /* ThisType */: return getTypeFromTypeNode(node).symbol; case 121 /* ConstructorKeyword */: // constructor keyword for an overload, should take us to the definition if it exist var constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 145 /* Constructor */) { + if (constructorDeclaration && constructorDeclaration.kind === 148 /* Constructor */) { return constructorDeclaration.parent.symbol; } return undefined; @@ -28782,14 +32926,14 @@ var ts; // External module name in an import declaration if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || - ((node.parent.kind === 225 /* ImportDeclaration */ || node.parent.kind === 231 /* ExportDeclaration */) && + ((node.parent.kind === 230 /* ImportDeclaration */ || node.parent.kind === 236 /* ExportDeclaration */) && node.parent.moduleSpecifier === node)) { return resolveExternalModuleName(node, node); } // Fall through case 8 /* NumericLiteral */: // index access - if (node.parent.kind === 170 /* ElementAccessExpression */ && node.parent.argumentExpression === node) { + if (node.parent.kind === 173 /* ElementAccessExpression */ && node.parent.argumentExpression === node) { var objectType = checkExpression(node.parent.expression); if (objectType === unknownType) return undefined; @@ -28806,7 +32950,7 @@ var ts; // The function returns a value symbol of an identifier in the short-hand property assignment. // This is necessary as an identifier in short-hand property assignment can contains two meaning: // property name and property value. - if (location && location.kind === 249 /* ShorthandPropertyAssignment */) { + if (location && location.kind === 254 /* ShorthandPropertyAssignment */) { return resolveEntityName(location.name, 107455 /* Value */ | 8388608 /* Alias */); } return undefined; @@ -28815,7 +32959,7 @@ var ts; function getExportSpecifierLocalTargetSymbol(node) { return node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node) : - resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */); + resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */); } function getTypeOfNode(node) { if (isInsideWithStatementBody(node)) { @@ -28852,7 +32996,7 @@ var ts; return symbol && getTypeOfSymbol(symbol); } if (ts.isBindingPattern(node)) { - return getTypeForVariableLikeDeclaration(node.parent); + return getTypeForVariableLikeDeclaration(node.parent, /*includeOptionality*/ true); } if (isInRightSideOfImportOrExportAssignment(node)) { var symbol = getSymbolAtLocation(node); @@ -28861,6 +33005,51 @@ var ts; } return unknownType; } + // Gets the type of object literal or array literal of destructuring assignment. + // { a } from + // for ( { a } of elems) { + // } + // [ a ] from + // [a] = [ some array ...] + function getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr) { + ts.Debug.assert(expr.kind === 171 /* ObjectLiteralExpression */ || expr.kind === 170 /* ArrayLiteralExpression */); + // If this is from "for of" + // for ( { a } of elems) { + // } + if (expr.parent.kind === 208 /* ForOfStatement */) { + var iteratedType = checkRightHandSideOfForOf(expr.parent.expression); + return checkDestructuringAssignment(expr, iteratedType || unknownType); + } + // If this is from "for" initializer + // for ({a } = elems[0];.....) { } + if (expr.parent.kind === 187 /* BinaryExpression */) { + var iteratedType = checkExpression(expr.parent.right); + return checkDestructuringAssignment(expr, iteratedType || unknownType); + } + // If this is from nested object binding pattern + // for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) { + if (expr.parent.kind === 253 /* PropertyAssignment */) { + var typeOfParentObjectLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent.parent); + return checkObjectLiteralDestructuringPropertyAssignment(typeOfParentObjectLiteral || unknownType, expr.parent); + } + // Array literal assignment - array destructuring pattern + ts.Debug.assert(expr.parent.kind === 170 /* ArrayLiteralExpression */); + // [{ property1: p1, property2 }] = elems; + var typeOfArrayLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr.parent); + var elementType = checkIteratedTypeOrElementType(typeOfArrayLiteral || unknownType, expr.parent, /*allowStringInput*/ false) || unknownType; + return checkArrayLiteralDestructuringElementAssignment(expr.parent, typeOfArrayLiteral, ts.indexOf(expr.parent.elements, expr), elementType || unknownType); + } + // Gets the property symbol corresponding to the property in destructuring assignment + // 'property1' from + // for ( { property1: a } of elems) { + // } + // 'property1' at location 'a' from: + // [a] = [ property1, property2 ] + function getPropertySymbolOfDestructuringAssignment(location) { + // Get the type of the object or array literal and then look for property of given name in the type + var typeOfObjectLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(location.parent.parent); + return typeOfObjectLiteral && getPropertyOfType(typeOfObjectLiteral, location.text); + } function getTypeOfExpression(expr) { if (ts.isRightSideOfQualifiedNameOrPropertyAccess(expr)) { expr = expr.parent; @@ -28873,7 +33062,7 @@ var ts; */ function getParentTypeOfClassElement(node) { var classSymbol = getSymbolOfNode(node.parent); - return node.flags & 64 /* Static */ + return node.flags & 32 /* Static */ ? getTypeOfSymbol(classSymbol) : getDeclaredTypeOfSymbol(classSymbol); } @@ -28884,7 +33073,7 @@ var ts; var propsByName = createSymbolTable(getPropertiesOfType(type)); if (getSignaturesOfType(type, 0 /* Call */).length || getSignaturesOfType(type, 1 /* Construct */).length) { ts.forEach(getPropertiesOfType(globalFunctionType), function (p) { - if (!ts.hasProperty(propsByName, p.name)) { + if (!propsByName[p.name]) { propsByName[p.name] = p; } }); @@ -28894,9 +33083,9 @@ var ts; function getRootSymbols(symbol) { if (symbol.flags & 268435456 /* SyntheticProperty */) { var symbols_3 = []; - var name_18 = symbol.name; + var name_20 = symbol.name; ts.forEach(getSymbolLinks(symbol).containingType.types, function (t) { - var symbol = getPropertyOfType(t, name_18); + var symbol = getPropertyOfType(t, name_20); if (symbol) { symbols_3.push(symbol); } @@ -28904,7 +33093,11 @@ var ts; return symbols_3; } else if (symbol.flags & 67108864 /* Transient */) { - var target = getSymbolLinks(symbol).target; + var target = void 0; + var next = symbol; + while (next = getSymbolLinks(next).target) { + target = next; + } if (target) { return [target]; } @@ -28917,8 +33110,8 @@ var ts; } function moduleExportsSomeValue(moduleReferenceExpression) { var moduleSymbol = resolveExternalModuleName(moduleReferenceExpression.parent, moduleReferenceExpression); - if (!moduleSymbol) { - // module not found - be conservative + if (!moduleSymbol || ts.isShorthandAmbientModuleSymbol(moduleSymbol)) { + // If the module is not found or is shorthand, assume that it may export a value. return true; } var hasExportAssignment = hasExportAssignmentSymbol(moduleSymbol); @@ -28931,7 +33124,7 @@ var ts; // otherwise - check if at least one export is value symbolLinks.exportsSomeValue = hasExportAssignment ? !!(moduleSymbol.flags & 107455 /* Value */) - : ts.forEachValue(getExportsOfModule(moduleSymbol), isValue); + : ts.forEachProperty(getExportsOfModule(moduleSymbol), isValue); } return symbolLinks.exportsSomeValue; function isValue(s) { @@ -28956,11 +33149,14 @@ var ts; } var parentSymbol = getParentOfSymbol(symbol); if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && parentSymbol.valueDeclaration.kind === 251 /* SourceFile */) { - return parentSymbol.valueDeclaration; + if (parentSymbol.flags & 512 /* ValueModule */ && parentSymbol.valueDeclaration.kind === 256 /* SourceFile */) { + // If `node` accesses an export and that export isn't in the same file, then symbol is a namespace export, so return undefined. + if (parentSymbol.valueDeclaration === ts.getSourceFileOfNode(node)) { + return parentSymbol.valueDeclaration; + } } for (var n = node.parent; n; n = n.parent) { - if ((n.kind === 221 /* ModuleDeclaration */ || n.kind === 220 /* EnumDeclaration */) && getSymbolOfNode(n) === parentSymbol) { + if ((n.kind === 225 /* ModuleDeclaration */ || n.kind === 224 /* EnumDeclaration */) && getSymbolOfNode(n) === parentSymbol) { return n; } } @@ -28976,13 +33172,13 @@ var ts; function isSymbolOfDeclarationWithCollidingName(symbol) { if (symbol.flags & 418 /* BlockScoped */) { var links = getSymbolLinks(symbol); - if (links.isDeclaratonWithCollidingName === undefined) { + if (links.isDeclarationWithCollidingName === undefined) { var container = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration); if (ts.isStatementWithLocals(container)) { var nodeLinks_1 = getNodeLinks(symbol.valueDeclaration); if (!!resolveName(container.parent, symbol.name, 107455 /* Value */, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined)) { // redeclaration - always should be renamed - links.isDeclaratonWithCollidingName = true; + links.isDeclarationWithCollidingName = true; } else if (nodeLinks_1.flags & 131072 /* CapturedBlockScopedBinding */) { // binding is captured in the function @@ -28997,20 +33193,20 @@ var ts; // console.log(b()); // should print '100' // OR // - binding is declared inside loop but not in inside initializer of iteration statement or directly inside loop body - // * variables from initializer are passed to rewritted loop body as parameters so they are not captured directly + // * variables from initializer are passed to rewritten loop body as parameters so they are not captured directly // * variables that are declared immediately in loop body will become top level variable after loop is rewritten and thus // they will not collide with anything var isDeclaredInLoop = nodeLinks_1.flags & 262144 /* BlockScopedBindingInLoop */; var inLoopInitializer = ts.isIterationStatement(container, /*lookInLabeledStatements*/ false); - var inLoopBodyBlock = container.kind === 195 /* Block */ && ts.isIterationStatement(container.parent, /*lookInLabeledStatements*/ false); - links.isDeclaratonWithCollidingName = !ts.isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || (!inLoopInitializer && !inLoopBodyBlock)); + var inLoopBodyBlock = container.kind === 199 /* Block */ && ts.isIterationStatement(container.parent, /*lookInLabeledStatements*/ false); + links.isDeclarationWithCollidingName = !ts.isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || (!inLoopInitializer && !inLoopBodyBlock)); } else { - links.isDeclaratonWithCollidingName = false; + links.isDeclarationWithCollidingName = false; } } } - return links.isDeclaratonWithCollidingName; + return links.isDeclarationWithCollidingName; } return false; } @@ -29028,22 +33224,22 @@ var ts; } function isValueAliasDeclaration(node) { switch (node.kind) { - case 224 /* ImportEqualsDeclaration */: - case 226 /* ImportClause */: - case 227 /* NamespaceImport */: - case 229 /* ImportSpecifier */: - case 233 /* ExportSpecifier */: + case 229 /* ImportEqualsDeclaration */: + case 231 /* ImportClause */: + case 232 /* NamespaceImport */: + case 234 /* ImportSpecifier */: + case 238 /* ExportSpecifier */: return isAliasResolvedToValue(getSymbolOfNode(node)); - case 231 /* ExportDeclaration */: + case 236 /* ExportDeclaration */: var exportClause = node.exportClause; return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration); - case 230 /* ExportAssignment */: + case 235 /* ExportAssignment */: return node.expression && node.expression.kind === 69 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfNode(node)) : true; } return false; } function isTopLevelValueImportEqualsWithEntityName(node) { - if (node.parent.kind !== 251 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) { + if (node.parent.kind !== 256 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) { // parent is not source file or it is not reference to internal module return false; } @@ -29052,14 +33248,12 @@ var ts; } function isAliasResolvedToValue(symbol) { var target = resolveAlias(symbol); - if (target === unknownSymbol && compilerOptions.isolatedModules) { + if (target === unknownSymbol) { return true; } - // const enums and modules that contain only const enums are not considered values from the emit perespective + // const enums and modules that contain only const enums are not considered values from the emit perspective // unless 'preserveConstEnums' option is set to true - return target !== unknownSymbol && - target && - target.flags & 107455 /* Value */ && + return target.flags & 107455 /* Value */ && (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target)); } function isConstEnumOrConstEnumOnlyModule(s) { @@ -29105,7 +33299,7 @@ var ts; return getNodeLinks(node).enumMemberValue; } function getConstantValue(node) { - if (node.kind === 250 /* EnumMember */) { + if (node.kind === 255 /* EnumMember */) { return getEnumMemberValue(node); } var symbol = getNodeLinks(node).resolvedSymbol; @@ -29118,7 +33312,7 @@ var ts; return undefined; } function isFunctionType(type) { - return type.flags & 80896 /* ObjectType */ && getSignaturesOfType(type, 0 /* Call */).length > 0; + return type.flags & 2588672 /* ObjectType */ && getSignaturesOfType(type, 0 /* Call */).length > 0; } function getTypeReferenceSerializationKind(typeName) { // Resolve the symbol as a value to ensure the type can be reached at runtime during emit. @@ -29128,7 +33322,7 @@ var ts; return ts.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue; } // Resolve the symbol as a type so that we can provide a more useful hint for the type serializer. - var typeSymbol = resolveEntityName(typeName, 793056 /* Type */, /*ignoreErrors*/ true); + var typeSymbol = resolveEntityName(typeName, 793064 /* Type */, /*ignoreErrors*/ true); // We might not be able to resolve type symbol so use unknown type in that case (eg error case) if (!typeSymbol) { return ts.TypeReferenceSerializationKind.ObjectType; @@ -29140,22 +33334,22 @@ var ts; else if (type.flags & 1 /* Any */) { return ts.TypeReferenceSerializationKind.ObjectType; } - else if (allConstituentTypesHaveKind(type, 16 /* Void */)) { + else if (isTypeOfKind(type, 1024 /* Void */)) { return ts.TypeReferenceSerializationKind.VoidType; } - else if (allConstituentTypesHaveKind(type, 8 /* Boolean */)) { + else if (isTypeOfKind(type, 136 /* BooleanLike */)) { return ts.TypeReferenceSerializationKind.BooleanType; } - else if (allConstituentTypesHaveKind(type, 132 /* NumberLike */)) { + else if (isTypeOfKind(type, 340 /* NumberLike */)) { return ts.TypeReferenceSerializationKind.NumberLikeType; } - else if (allConstituentTypesHaveKind(type, 258 /* StringLike */)) { + else if (isTypeOfKind(type, 34 /* StringLike */)) { return ts.TypeReferenceSerializationKind.StringLikeType; } - else if (allConstituentTypesHaveKind(type, 8192 /* Tuple */)) { + else if (isTupleType(type)) { return ts.TypeReferenceSerializationKind.ArrayLikeType; } - else if (allConstituentTypesHaveKind(type, 16777216 /* ESSymbol */)) { + else if (isTypeOfKind(type, 512 /* ESSymbol */)) { return ts.TypeReferenceSerializationKind.ESSymbolType; } else if (isFunctionType(type)) { @@ -29181,11 +33375,17 @@ var ts; getSymbolDisplayBuilder().buildTypeDisplay(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags); } function writeTypeOfExpression(expr, enclosingDeclaration, flags, writer) { - var type = getTypeOfExpression(expr); + var type = getWidenedType(getTypeOfExpression(expr)); getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); } + function writeBaseConstructorTypeOfClass(node, enclosingDeclaration, flags, writer) { + var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(node)); + resolveBaseTypesOfClass(classType); + var baseType = classType.resolvedBaseTypes.length ? classType.resolvedBaseTypes[0] : unknownType; + getSymbolDisplayBuilder().buildTypeDisplay(baseType, writer, enclosingDeclaration, flags); + } function hasGlobalName(name) { - return ts.hasProperty(globals, name); + return !!globals[name]; } function getReferencedValueSymbol(reference) { return getNodeLinks(reference).resolvedSymbol || @@ -29198,6 +33398,22 @@ var ts; return symbol && getExportSymbolOfValueSymbolIfExported(symbol).valueDeclaration; } function createResolver() { + // this variable and functions that use it are deliberately moved here from the outer scope + // to avoid scope pollution + var resolvedTypeReferenceDirectives = host.getResolvedTypeReferenceDirectives(); + var fileToDirective; + if (resolvedTypeReferenceDirectives) { + // populate reverse mapping: file path -> type reference directive that was resolved to this file + fileToDirective = ts.createFileMap(); + for (var key in resolvedTypeReferenceDirectives) { + var resolvedDirective = resolvedTypeReferenceDirectives[key]; + if (!resolvedDirective) { + continue; + } + var file = host.getSourceFile(resolvedDirective.resolvedFileName); + fileToDirective.set(file.path, key); + } + } return { getReferencedExportContainer: getReferencedExportContainer, getReferencedImportDeclaration: getReferencedImportDeclaration, @@ -29213,6 +33429,7 @@ var ts; writeTypeOfDeclaration: writeTypeOfDeclaration, writeReturnTypeOfSignatureDeclaration: writeReturnTypeOfSignatureDeclaration, writeTypeOfExpression: writeTypeOfExpression, + writeBaseConstructorTypeOfClass: writeBaseConstructorTypeOfClass, isSymbolAccessible: isSymbolAccessible, isEntityNameVisible: isEntityNameVisible, getConstantValue: getConstantValue, @@ -29222,8 +33439,79 @@ var ts; isOptionalParameter: isOptionalParameter, moduleExportsSomeValue: moduleExportsSomeValue, isArgumentsLocalBinding: isArgumentsLocalBinding, - getExternalModuleFileFromDeclaration: getExternalModuleFileFromDeclaration + getExternalModuleFileFromDeclaration: getExternalModuleFileFromDeclaration, + getTypeReferenceDirectivesForEntityName: getTypeReferenceDirectivesForEntityName, + getTypeReferenceDirectivesForSymbol: getTypeReferenceDirectivesForSymbol }; + // defined here to avoid outer scope pollution + function getTypeReferenceDirectivesForEntityName(node) { + // program does not have any files with type reference directives - bail out + if (!fileToDirective) { + return undefined; + } + // property access can only be used as values + // qualified names can only be used as types\namespaces + // identifiers are treated as values only if they appear in type queries + var meaning = (node.kind === 172 /* PropertyAccessExpression */) || (node.kind === 69 /* Identifier */ && isInTypeQuery(node)) + ? 107455 /* Value */ | 1048576 /* ExportValue */ + : 793064 /* Type */ | 1920 /* Namespace */; + var symbol = resolveEntityName(node, meaning, /*ignoreErrors*/ true); + return symbol && symbol !== unknownSymbol ? getTypeReferenceDirectivesForSymbol(symbol, meaning) : undefined; + } + // defined here to avoid outer scope pollution + function getTypeReferenceDirectivesForSymbol(symbol, meaning) { + // program does not have any files with type reference directives - bail out + if (!fileToDirective) { + return undefined; + } + if (!isSymbolFromTypeDeclarationFile(symbol)) { + return undefined; + } + // check what declarations in the symbol can contribute to the target meaning + var typeReferenceDirectives; + for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { + var decl = _a[_i]; + // check meaning of the local symbol to see if declaration needs to be analyzed further + if (decl.symbol && decl.symbol.flags & meaning) { + var file = ts.getSourceFileOfNode(decl); + var typeReferenceDirective = fileToDirective.get(file.path); + if (typeReferenceDirective) { + (typeReferenceDirectives || (typeReferenceDirectives = [])).push(typeReferenceDirective); + } + } + } + return typeReferenceDirectives; + } + function isSymbolFromTypeDeclarationFile(symbol) { + // bail out if symbol does not have associated declarations (i.e. this is transient symbol created for property in binding pattern) + if (!symbol.declarations) { + return false; + } + // walk the parent chain for symbols to make sure that top level parent symbol is in the global scope + // external modules cannot define or contribute to type declaration files + var current = symbol; + while (true) { + var parent_12 = getParentOfSymbol(current); + if (parent_12) { + current = parent_12; + } + else { + break; + } + } + if (current.valueDeclaration && current.valueDeclaration.kind === 256 /* SourceFile */ && current.flags & 512 /* ValueModule */) { + return false; + } + // check that at least one declaration of top level symbol originates from type declaration file + for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { + var decl = _a[_i]; + var file = ts.getSourceFileOfNode(decl); + if (fileToDirective.contains(file.path)) { + return true; + } + } + return false; + } } function getExternalModuleFileFromDeclaration(declaration) { var specifier = ts.getExternalModuleName(declaration); @@ -29231,7 +33519,7 @@ var ts; if (!moduleSymbol) { return undefined; } - return ts.getDeclarationOfKind(moduleSymbol, 251 /* SourceFile */); + return ts.getDeclarationOfKind(moduleSymbol, 256 /* SourceFile */); } function initializeTypeChecker() { // Bind all source files and propagate errors @@ -29244,9 +33532,15 @@ var ts; if (!ts.isExternalOrCommonJsModule(file)) { mergeSymbolTable(globals, file.locals); } + if (file.patternAmbientModules && file.patternAmbientModules.length) { + patternAmbientModules = ts.concatenate(patternAmbientModules, file.patternAmbientModules); + } if (file.moduleAugmentations.length) { (augmentations || (augmentations = [])).push(file.moduleAugmentations); } + if (file.symbol && file.symbol.globalExports) { + mergeSymbolTable(globals, file.symbol.globalExports); + } }); if (augmentations) { // merge module augmentations. @@ -29261,7 +33555,7 @@ var ts; } // Setup global builtins addToSymbolTable(globals, builtinGlobals, ts.Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0); - getSymbolLinks(undefinedSymbol).type = undefinedType; + getSymbolLinks(undefinedSymbol).type = undefinedWideningType; getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments"); getSymbolLinks(unknownSymbol).type = unknownType; // Initialize special types @@ -29278,35 +33572,31 @@ var ts; getGlobalMethodDecoratorType = ts.memoize(function () { return getGlobalType("MethodDecorator"); }); getGlobalParameterDecoratorType = ts.memoize(function () { return getGlobalType("ParameterDecorator"); }); getGlobalTypedPropertyDescriptorType = ts.memoize(function () { return getGlobalType("TypedPropertyDescriptor", /*arity*/ 1); }); + getGlobalESSymbolConstructorSymbol = ts.memoize(function () { return getGlobalValueSymbol("Symbol"); }); getGlobalPromiseType = ts.memoize(function () { return getGlobalType("Promise", /*arity*/ 1); }); - tryGetGlobalPromiseType = ts.memoize(function () { return getGlobalSymbol("Promise", 793056 /* Type */, /*diagnostic*/ undefined) && getGlobalPromiseType(); }); + tryGetGlobalPromiseType = ts.memoize(function () { return getGlobalSymbol("Promise", 793064 /* Type */, /*diagnostic*/ undefined) && getGlobalPromiseType(); }); getGlobalPromiseLikeType = ts.memoize(function () { return getGlobalType("PromiseLike", /*arity*/ 1); }); getInstantiatedGlobalPromiseLikeType = ts.memoize(createInstantiatedPromiseLikeType); getGlobalPromiseConstructorSymbol = ts.memoize(function () { return getGlobalValueSymbol("Promise"); }); getGlobalPromiseConstructorLikeType = ts.memoize(function () { return getGlobalType("PromiseConstructorLike"); }); getGlobalThenableType = ts.memoize(createThenableType); - // If we're in ES6 mode, load the TemplateStringsArray. - // Otherwise, default to 'unknown' for the purposes of type checking in LS scenarios. + getGlobalTemplateStringsArrayType = ts.memoize(function () { return getGlobalType("TemplateStringsArray"); }); if (languageVersion >= 2 /* ES6 */) { - globalTemplateStringsArrayType = getGlobalType("TemplateStringsArray"); - globalESSymbolType = getGlobalType("Symbol"); - globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol"); - globalIterableType = getGlobalType("Iterable", /*arity*/ 1); - globalIteratorType = getGlobalType("Iterator", /*arity*/ 1); - globalIterableIteratorType = getGlobalType("IterableIterator", /*arity*/ 1); + getGlobalESSymbolType = ts.memoize(function () { return getGlobalType("Symbol"); }); + getGlobalIterableType = ts.memoize(function () { return getGlobalType("Iterable", /*arity*/ 1); }); + getGlobalIteratorType = ts.memoize(function () { return getGlobalType("Iterator", /*arity*/ 1); }); + getGlobalIterableIteratorType = ts.memoize(function () { return getGlobalType("IterableIterator", /*arity*/ 1); }); } else { - globalTemplateStringsArrayType = unknownType; - // Consider putting Symbol interface in lib.d.ts. On the plus side, putting it in lib.d.ts would make it - // extensible for Polyfilling Symbols. But putting it into lib.d.ts could also break users that have - // a global Symbol already, particularly if it is a class. - globalESSymbolType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - globalESSymbolConstructorSymbol = undefined; - globalIterableType = emptyGenericType; - globalIteratorType = emptyGenericType; - globalIterableIteratorType = emptyGenericType; + getGlobalESSymbolType = ts.memoize(function () { return emptyObjectType; }); + getGlobalIterableType = ts.memoize(function () { return emptyGenericType; }); + getGlobalIteratorType = ts.memoize(function () { return emptyGenericType; }); + getGlobalIterableIteratorType = ts.memoize(function () { return emptyGenericType; }); } anyArrayType = createArrayType(anyType); + var symbol = getGlobalSymbol("ReadonlyArray", 793064 /* Type */, /*diagnostic*/ undefined); + globalReadonlyArrayType = symbol && getTypeOfGlobalSymbol(symbol, /*arity*/ 1); + anyReadonlyArrayType = globalReadonlyArrayType ? createTypeFromGenericGlobalType(globalReadonlyArrayType, [anyType]) : anyArrayType; } function createInstantiatedPromiseLikeType() { var promiseLikeType = getGlobalPromiseLikeType(); @@ -29319,7 +33609,7 @@ var ts; // build the thenable type that is used to verify against a non-promise "thenable" operand to `await`. var thenPropertySymbol = createSymbol(67108864 /* Transient */ | 4 /* Property */, "then"); getSymbolLinks(thenPropertySymbol).type = globalFunctionType; - var thenableType = createObjectType(65536 /* Anonymous */); + var thenableType = createObjectType(2097152 /* Anonymous */); thenableType.properties = [thenPropertySymbol]; thenableType.members = createSymbolTable(thenableType.properties); thenableType.callSignatures = []; @@ -29332,14 +33622,14 @@ var ts; return false; } if (!ts.nodeCanBeDecorated(node)) { - if (node.kind === 144 /* MethodDeclaration */ && !ts.nodeIsPresent(node.body)) { + if (node.kind === 147 /* MethodDeclaration */ && !ts.nodeIsPresent(node.body)) { return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); } else { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here); } } - else if (node.kind === 146 /* GetAccessor */ || node.kind === 147 /* SetAccessor */) { + else if (node.kind === 149 /* GetAccessor */ || node.kind === 150 /* SetAccessor */) { var accessors = ts.getAllAccessorDeclarations(node.parent.members, node); if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) { return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); @@ -29348,84 +33638,52 @@ var ts; return false; } function checkGrammarModifiers(node) { - switch (node.kind) { - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 145 /* Constructor */: - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 150 /* IndexSignature */: - case 221 /* ModuleDeclaration */: - case 225 /* ImportDeclaration */: - case 224 /* ImportEqualsDeclaration */: - case 231 /* ExportDeclaration */: - case 230 /* ExportAssignment */: - case 139 /* Parameter */: - break; - case 216 /* FunctionDeclaration */: - if (node.modifiers && (node.modifiers.length > 1 || node.modifiers[0].kind !== 118 /* AsyncKeyword */) && - node.parent.kind !== 222 /* ModuleBlock */ && node.parent.kind !== 251 /* SourceFile */) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); - } - break; - case 217 /* ClassDeclaration */: - case 218 /* InterfaceDeclaration */: - case 196 /* VariableStatement */: - case 219 /* TypeAliasDeclaration */: - if (node.modifiers && node.parent.kind !== 222 /* ModuleBlock */ && node.parent.kind !== 251 /* SourceFile */) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); - } - break; - case 220 /* EnumDeclaration */: - if (node.modifiers && (node.modifiers.length > 1 || node.modifiers[0].kind !== 74 /* ConstKeyword */) && - node.parent.kind !== 222 /* ModuleBlock */ && node.parent.kind !== 251 /* SourceFile */) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); - } - break; - default: - return false; + var quickResult = reportObviousModifierErrors(node); + if (quickResult !== undefined) { + return quickResult; } - if (!node.modifiers) { - return; - } - var lastStatic, lastPrivate, lastProtected, lastDeclare, lastAsync; + var lastStatic, lastPrivate, lastProtected, lastDeclare, lastAsync, lastReadonly; var flags = 0; for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) { var modifier = _a[_i]; + if (modifier.kind !== 128 /* ReadonlyKeyword */) { + if (node.kind === 144 /* PropertySignature */ || node.kind === 146 /* MethodSignature */) { + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_type_member, ts.tokenToString(modifier.kind)); + } + if (node.kind === 153 /* IndexSignature */) { + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_an_index_signature, ts.tokenToString(modifier.kind)); + } + } switch (modifier.kind) { case 74 /* ConstKeyword */: - if (node.kind !== 220 /* EnumDeclaration */ && node.parent.kind === 217 /* ClassDeclaration */) { + if (node.kind !== 224 /* EnumDeclaration */ && node.parent.kind === 221 /* ClassDeclaration */) { return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(74 /* ConstKeyword */)); } break; case 112 /* PublicKeyword */: case 111 /* ProtectedKeyword */: case 110 /* PrivateKeyword */: - var text = void 0; - if (modifier.kind === 112 /* PublicKeyword */) { - text = "public"; - } - else if (modifier.kind === 111 /* ProtectedKeyword */) { - text = "protected"; + var text = visibilityToString(ts.modifierToFlag(modifier.kind)); + if (modifier.kind === 111 /* ProtectedKeyword */) { lastProtected = modifier; } - else { - text = "private"; + else if (modifier.kind === 110 /* PrivateKeyword */) { lastPrivate = modifier; } - if (flags & 56 /* AccessibilityModifier */) { + if (flags & 28 /* AccessibilityModifier */) { return grammarErrorOnNode(modifier, ts.Diagnostics.Accessibility_modifier_already_seen); } - else if (flags & 64 /* Static */) { + else if (flags & 32 /* Static */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "static"); } + else if (flags & 64 /* Readonly */) { + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly"); + } else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); } - else if (node.parent.kind === 222 /* ModuleBlock */ || node.parent.kind === 251 /* SourceFile */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, text); + else if (node.parent.kind === 226 /* ModuleBlock */ || node.parent.kind === 256 /* SourceFile */) { + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); } else if (flags & 128 /* Abstract */) { if (modifier.kind === 110 /* PrivateKeyword */) { @@ -29438,29 +33696,43 @@ var ts; flags |= ts.modifierToFlag(modifier.kind); break; case 113 /* StaticKeyword */: - if (flags & 64 /* Static */) { + if (flags & 32 /* Static */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "static"); } + else if (flags & 64 /* Readonly */) { + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "readonly"); + } else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); } - else if (node.parent.kind === 222 /* ModuleBlock */ || node.parent.kind === 251 /* SourceFile */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, "static"); + else if (node.parent.kind === 226 /* ModuleBlock */ || node.parent.kind === 256 /* SourceFile */) { + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); } - else if (node.kind === 139 /* Parameter */) { + else if (node.kind === 142 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); } else if (flags & 128 /* Abstract */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); } - flags |= 64 /* Static */; + flags |= 32 /* Static */; lastStatic = modifier; break; + case 128 /* ReadonlyKeyword */: + if (flags & 64 /* Readonly */) { + return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "readonly"); + } + else if (node.kind !== 145 /* PropertyDeclaration */ && node.kind !== 144 /* PropertySignature */ && node.kind !== 153 /* IndexSignature */ && node.kind !== 142 /* Parameter */) { + // If node.kind === SyntaxKind.Parameter, checkParameter report an error if it's not a parameter property. + return grammarErrorOnNode(modifier, ts.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); + } + flags |= 64 /* Readonly */; + lastReadonly = modifier; + break; case 82 /* ExportKeyword */: - if (flags & 2 /* Export */) { + if (flags & 1 /* Export */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "export"); } - else if (flags & 4 /* Ambient */) { + else if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "declare"); } else if (flags & 128 /* Abstract */) { @@ -29469,48 +33741,51 @@ var ts; else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } - else if (node.parent.kind === 217 /* ClassDeclaration */) { + else if (node.parent.kind === 221 /* ClassDeclaration */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export"); } - else if (node.kind === 139 /* Parameter */) { + else if (node.kind === 142 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); } - flags |= 2 /* Export */; + flags |= 1 /* Export */; break; case 122 /* DeclareKeyword */: - if (flags & 4 /* Ambient */) { + if (flags & 2 /* Ambient */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "declare"); } else if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.parent.kind === 217 /* ClassDeclaration */) { + else if (node.parent.kind === 221 /* ClassDeclaration */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare"); } - else if (node.kind === 139 /* Parameter */) { + else if (node.kind === 142 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); } - else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 222 /* ModuleBlock */) { + else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 226 /* ModuleBlock */) { return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } - flags |= 4 /* Ambient */; + flags |= 2 /* Ambient */; lastDeclare = modifier; break; case 115 /* AbstractKeyword */: if (flags & 128 /* Abstract */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract"); } - if (node.kind !== 217 /* ClassDeclaration */) { - if (node.kind !== 144 /* MethodDeclaration */) { - return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_or_method_declaration); + if (node.kind !== 221 /* ClassDeclaration */) { + if (node.kind !== 147 /* MethodDeclaration */ && + node.kind !== 145 /* PropertyDeclaration */ && + node.kind !== 149 /* GetAccessor */ && + node.kind !== 150 /* SetAccessor */) { + return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 217 /* ClassDeclaration */ && node.parent.flags & 128 /* Abstract */)) { + if (!(node.parent.kind === 221 /* ClassDeclaration */ && node.parent.flags & 128 /* Abstract */)) { return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class); } - if (flags & 64 /* Static */) { + if (flags & 32 /* Static */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); } - if (flags & 16 /* Private */) { + if (flags & 8 /* Private */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "private", "abstract"); } } @@ -29520,10 +33795,10 @@ var ts; if (flags & 256 /* Async */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "async"); } - else if (flags & 4 /* Ambient */ || ts.isInAmbientContext(node.parent)) { + else if (flags & 2 /* Ambient */ || ts.isInAmbientContext(node.parent)) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (node.kind === 139 /* Parameter */) { + else if (node.kind === 142 /* Parameter */) { return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } flags |= 256 /* Async */; @@ -29531,43 +33806,97 @@ var ts; break; } } - if (node.kind === 145 /* Constructor */) { - if (flags & 64 /* Static */) { + if (node.kind === 148 /* Constructor */) { + if (flags & 32 /* Static */) { return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } if (flags & 128 /* Abstract */) { return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "abstract"); } - else if (flags & 32 /* Protected */) { - return grammarErrorOnNode(lastProtected, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "protected"); - } - else if (flags & 16 /* Private */) { - return grammarErrorOnNode(lastPrivate, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "private"); - } else if (flags & 256 /* Async */) { return grammarErrorOnNode(lastAsync, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } + else if (flags & 64 /* Readonly */) { + return grammarErrorOnNode(lastReadonly, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "readonly"); + } return; } - else if ((node.kind === 225 /* ImportDeclaration */ || node.kind === 224 /* ImportEqualsDeclaration */) && flags & 4 /* Ambient */) { + else if ((node.kind === 230 /* ImportDeclaration */ || node.kind === 229 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); } - else if (node.kind === 139 /* Parameter */ && (flags & 56 /* AccessibilityModifier */) && ts.isBindingPattern(node.name)) { - return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_a_binding_pattern); + else if (node.kind === 142 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && ts.isBindingPattern(node.name)) { + return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); + } + else if (node.kind === 142 /* Parameter */ && (flags & 92 /* ParameterPropertyModifier */) && node.dotDotDotToken) { + return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } if (flags & 256 /* Async */) { return checkGrammarAsyncModifier(node, lastAsync); } } + /** + * true | false: Early return this value from checkGrammarModifiers. + * undefined: Need to do full checking on the modifiers. + */ + function reportObviousModifierErrors(node) { + return !node.modifiers + ? false + : shouldReportBadModifier(node) + ? grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here) + : undefined; + } + function shouldReportBadModifier(node) { + switch (node.kind) { + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 148 /* Constructor */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 153 /* IndexSignature */: + case 225 /* ModuleDeclaration */: + case 230 /* ImportDeclaration */: + case 229 /* ImportEqualsDeclaration */: + case 236 /* ExportDeclaration */: + case 235 /* ExportAssignment */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: + case 142 /* Parameter */: + return false; + default: + if (node.parent.kind === 226 /* ModuleBlock */ || node.parent.kind === 256 /* SourceFile */) { + return false; + } + switch (node.kind) { + case 220 /* FunctionDeclaration */: + return nodeHasAnyModifiersExcept(node, 118 /* AsyncKeyword */); + case 221 /* ClassDeclaration */: + return nodeHasAnyModifiersExcept(node, 115 /* AbstractKeyword */); + case 222 /* InterfaceDeclaration */: + case 200 /* VariableStatement */: + case 223 /* TypeAliasDeclaration */: + return true; + case 224 /* EnumDeclaration */: + return nodeHasAnyModifiersExcept(node, 74 /* ConstKeyword */); + default: + ts.Debug.fail(); + return false; + } + } + } + function nodeHasAnyModifiersExcept(node, allowedModifier) { + return node.modifiers.length > 1 || node.modifiers[0].kind !== allowedModifier; + } function checkGrammarAsyncModifier(node, asyncModifier) { if (languageVersion < 2 /* ES6 */) { - return grammarErrorOnNode(asyncModifier, ts.Diagnostics.Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher); + return grammarErrorOnNode(asyncModifier, ts.Diagnostics.Async_functions_are_only_available_when_targeting_ECMAScript_2015_or_higher); } switch (node.kind) { - case 144 /* MethodDeclaration */: - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: + case 147 /* MethodDeclaration */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: if (!node.asteriskToken) { return false; } @@ -29594,9 +33923,6 @@ var ts; } } function checkGrammarParameterList(parameters) { - if (checkGrammarForDisallowedTrailingComma(parameters)) { - return true; - } var seenOptionalParameter = false; var parameterCount = parameters.length; for (var i = 0; i < parameterCount; i++) { @@ -29633,7 +33959,7 @@ var ts; checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file); } function checkGrammarArrowFunction(node, file) { - if (node.kind === 177 /* ArrowFunction */) { + if (node.kind === 180 /* ArrowFunction */) { var arrowFunction = node; var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line; var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line; @@ -29656,7 +33982,7 @@ var ts; if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.An_index_signature_cannot_have_a_rest_parameter); } - if (parameter.flags & 1022 /* Modifier */) { + if (parameter.flags & 1023 /* Modifier */) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_cannot_have_an_accessibility_modifier); } if (parameter.questionToken) { @@ -29668,21 +33994,16 @@ var ts; if (!parameter.type) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation); } - if (parameter.type.kind !== 130 /* StringKeyword */ && parameter.type.kind !== 128 /* NumberKeyword */) { + if (parameter.type.kind !== 132 /* StringKeyword */ && parameter.type.kind !== 130 /* NumberKeyword */) { return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); } if (!node.type) { return grammarErrorOnNode(node, ts.Diagnostics.An_index_signature_must_have_a_type_annotation); } } - function checkGrammarForIndexSignatureModifier(node) { - if (node.flags & 1022 /* Modifier */) { - grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_not_permitted_on_index_signature_members); - } - } function checkGrammarIndexSignature(node) { // Prevent cascading error by short-circuit - return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarIndexSignatureParameters(node) || checkGrammarForIndexSignatureModifier(node); + return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarIndexSignatureParameters(node); } function checkGrammarForAtLeastOneTypeArgument(node, typeArguments) { if (typeArguments && typeArguments.length === 0) { @@ -29701,15 +34022,14 @@ var ts; var sourceFile = ts.getSourceFileOfNode(node); for (var _i = 0, args_1 = args; _i < args_1.length; _i++) { var arg = args_1[_i]; - if (arg.kind === 190 /* OmittedExpression */) { + if (arg.kind === 193 /* OmittedExpression */) { return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); } } } } function checkGrammarArguments(node, args) { - return checkGrammarForDisallowedTrailingComma(args) || - checkGrammarForOmittedArgument(node, args); + return checkGrammarForOmittedArgument(node, args); } function checkGrammarHeritageClause(node) { var types = node.types; @@ -29775,19 +34095,19 @@ var ts; } function checkGrammarComputedPropertyName(node) { // If node is not a computedPropertyName, just skip the grammar checking - if (node.kind !== 137 /* ComputedPropertyName */) { + if (node.kind !== 140 /* ComputedPropertyName */) { return false; } var computedPropertyName = node; - if (computedPropertyName.expression.kind === 184 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 24 /* CommaToken */) { + if (computedPropertyName.expression.kind === 187 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 24 /* CommaToken */) { return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); } } function checkGrammarForGenerator(node) { if (node.asteriskToken) { - ts.Debug.assert(node.kind === 216 /* FunctionDeclaration */ || - node.kind === 176 /* FunctionExpression */ || - node.kind === 144 /* MethodDeclaration */); + ts.Debug.assert(node.kind === 220 /* FunctionDeclaration */ || + node.kind === 179 /* FunctionExpression */ || + node.kind === 147 /* MethodDeclaration */); if (ts.isInAmbientContext(node)) { return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } @@ -29795,7 +34115,7 @@ var ts; return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator); } if (languageVersion < 2 /* ES6 */) { - return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_only_available_when_targeting_ECMAScript_6_or_higher); + return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher); } } } @@ -29805,31 +34125,30 @@ var ts; } } function checkGrammarObjectLiteralExpression(node, inDestructuring) { - var seen = {}; + var seen = ts.createMap(); var Property = 1; var GetAccessor = 2; - var SetAccesor = 4; - var GetOrSetAccessor = GetAccessor | SetAccesor; - var _loop_1 = function(prop) { - var name_19 = prop.name; - if (prop.kind === 190 /* OmittedExpression */ || - name_19.kind === 137 /* ComputedPropertyName */) { + var SetAccessor = 4; + var GetOrSetAccessor = GetAccessor | SetAccessor; + var _loop_2 = function(prop) { + var name_21 = prop.name; + if (prop.kind === 193 /* OmittedExpression */ || + name_21.kind === 140 /* ComputedPropertyName */) { // If the name is not a ComputedPropertyName, the grammar checking will skip it - checkGrammarComputedPropertyName(name_19); - return "continue"; + checkGrammarComputedPropertyName(name_21); } - if (prop.kind === 249 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { + if (prop.kind === 254 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { // having objectAssignmentInitializer is only valid in ObjectAssignmentPattern // outside of destructuring it is a syntax error return { value: grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment) }; } // Modifiers are never allowed on properties except for 'async' on a method declaration ts.forEach(prop.modifiers, function (mod) { - if (mod.kind !== 118 /* AsyncKeyword */ || prop.kind !== 144 /* MethodDeclaration */) { + if (mod.kind !== 118 /* AsyncKeyword */ || prop.kind !== 147 /* MethodDeclaration */) { grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod)); } }); - // ECMA-262 11.1.5 Object Initialiser + // ECMA-262 11.1.5 Object Initializer // If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true // a.This production is contained in strict code and IsDataDescriptor(previous) is true and // IsDataDescriptor(propId.descriptor) is true. @@ -29838,71 +34157,74 @@ var ts; // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields var currentKind = void 0; - if (prop.kind === 248 /* PropertyAssignment */ || prop.kind === 249 /* ShorthandPropertyAssignment */) { - // Grammar checking for computedPropertName and shorthandPropertyAssignment + if (prop.kind === 253 /* PropertyAssignment */ || prop.kind === 254 /* ShorthandPropertyAssignment */) { + // Grammar checking for computedPropertyName and shorthandPropertyAssignment checkGrammarForInvalidQuestionMark(prop, prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); - if (name_19.kind === 8 /* NumericLiteral */) { - checkGrammarNumericLiteral(name_19); + if (name_21.kind === 8 /* NumericLiteral */) { + checkGrammarNumericLiteral(name_21); } currentKind = Property; } - else if (prop.kind === 144 /* MethodDeclaration */) { + else if (prop.kind === 147 /* MethodDeclaration */) { currentKind = Property; } - else if (prop.kind === 146 /* GetAccessor */) { + else if (prop.kind === 149 /* GetAccessor */) { currentKind = GetAccessor; } - else if (prop.kind === 147 /* SetAccessor */) { - currentKind = SetAccesor; + else if (prop.kind === 150 /* SetAccessor */) { + currentKind = SetAccessor; } else { ts.Debug.fail("Unexpected syntax kind:" + prop.kind); } - if (!ts.hasProperty(seen, name_19.text)) { - seen[name_19.text] = currentKind; + var effectiveName = ts.getPropertyNameForPropertyNameNode(name_21); + if (effectiveName === undefined) { + return "continue"; + } + if (!seen[effectiveName]) { + seen[effectiveName] = currentKind; } else { - var existingKind = seen[name_19.text]; + var existingKind = seen[effectiveName]; if (currentKind === Property && existingKind === Property) { - return "continue"; + grammarErrorOnNode(name_21, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(name_21)); } else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) { if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) { - seen[name_19.text] = currentKind | existingKind; + seen[effectiveName] = currentKind | existingKind; } else { - return { value: grammarErrorOnNode(name_19, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name) }; + return { value: grammarErrorOnNode(name_21, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name) }; } } else { - return { value: grammarErrorOnNode(name_19, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name) }; + return { value: grammarErrorOnNode(name_21, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name) }; } } }; for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { var prop = _a[_i]; - var state_2 = _loop_1(prop); - if (typeof state_2 === "object") return state_2.value; - if (state_2 === "continue") continue; + var state_3 = _loop_2(prop); + if (typeof state_3 === "object") return state_3.value; } } function checkGrammarJsxElement(node) { - var seen = {}; + var seen = ts.createMap(); for (var _i = 0, _a = node.attributes; _i < _a.length; _i++) { var attr = _a[_i]; - if (attr.kind === 242 /* JsxSpreadAttribute */) { + if (attr.kind === 247 /* JsxSpreadAttribute */) { continue; } var jsxAttr = attr; - var name_20 = jsxAttr.name; - if (!ts.hasProperty(seen, name_20.text)) { - seen[name_20.text] = true; + var name_22 = jsxAttr.name; + if (!seen[name_22.text]) { + seen[name_22.text] = true; } else { - return grammarErrorOnNode(name_20, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); + return grammarErrorOnNode(name_22, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); } var initializer = jsxAttr.initializer; - if (initializer && initializer.kind === 243 /* JsxExpression */ && !initializer.expression) { + if (initializer && initializer.kind === 248 /* JsxExpression */ && !initializer.expression) { return grammarErrorOnNode(jsxAttr.initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); } } @@ -29911,7 +34233,7 @@ var ts; if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { return true; } - if (forInOrOfStatement.initializer.kind === 215 /* VariableDeclarationList */) { + if (forInOrOfStatement.initializer.kind === 219 /* VariableDeclarationList */) { var variableList = forInOrOfStatement.initializer; if (!checkGrammarVariableDeclarationList(variableList)) { var declarations = variableList.declarations; @@ -29926,20 +34248,20 @@ var ts; return false; } if (declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 203 /* ForInStatement */ + var diagnostic = forInOrOfStatement.kind === 207 /* ForInStatement */ ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); } var firstDeclaration = declarations[0]; if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 203 /* ForInStatement */ + var diagnostic = forInOrOfStatement.kind === 207 /* ForInStatement */ ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; return grammarErrorOnNode(firstDeclaration.name, diagnostic); } if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 203 /* ForInStatement */ + var diagnostic = forInOrOfStatement.kind === 207 /* ForInStatement */ ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; return grammarErrorOnNode(firstDeclaration, diagnostic); @@ -29956,30 +34278,26 @@ var ts; else if (ts.isInAmbientContext(accessor)) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_be_declared_in_an_ambient_context); } - else if (accessor.body === undefined) { + else if (accessor.body === undefined && !(accessor.flags & 128 /* Abstract */)) { return grammarErrorAtPos(ts.getSourceFileOfNode(accessor), accessor.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); } else if (accessor.typeParameters) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters); } - else if (kind === 146 /* GetAccessor */ && accessor.parameters.length) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_get_accessor_cannot_have_parameters); + else if (!doesAccessorHaveCorrectParameterCount(accessor)) { + return grammarErrorOnNode(accessor.name, kind === 149 /* GetAccessor */ ? + ts.Diagnostics.A_get_accessor_cannot_have_parameters : + ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter); } - else if (kind === 147 /* SetAccessor */) { + else if (kind === 150 /* SetAccessor */) { if (accessor.type) { return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); } - else if (accessor.parameters.length !== 1) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter); - } else { var parameter = accessor.parameters[0]; if (parameter.dotDotDotToken) { return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter); } - else if (parameter.flags & 1022 /* Modifier */) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); - } else if (parameter.questionToken) { return grammarErrorOnNode(parameter.questionToken, ts.Diagnostics.A_set_accessor_cannot_have_an_optional_parameter); } @@ -29989,6 +34307,27 @@ var ts; } } } + /** Does the accessor have the right number of parameters? + + A get accessor has no parameters or a single `this` parameter. + A set accessor has one parameter or a `this` parameter and one more parameter */ + function doesAccessorHaveCorrectParameterCount(accessor) { + return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 149 /* GetAccessor */ ? 0 : 1); + } + function getAccessorThisParameter(accessor) { + if (accessor.parameters.length === (accessor.kind === 149 /* GetAccessor */ ? 1 : 2) && + accessor.parameters[0].name.kind === 69 /* Identifier */ && + accessor.parameters[0].name.originalKeywordKind === 97 /* ThisKeyword */) { + return accessor.parameters[0]; + } + } + function getFunctionLikeThisParameter(func) { + if (func.parameters.length && + func.parameters[0].name.kind === 69 /* Identifier */ && + func.parameters[0].name.originalKeywordKind === 97 /* ThisKeyword */) { + return func.parameters[0]; + } + } function checkGrammarForNonSymbolComputedProperty(node, message) { if (ts.isDynamicName(node)) { return grammarErrorOnNode(node, message); @@ -30000,8 +34339,8 @@ var ts; checkGrammarForGenerator(node)) { return true; } - if (node.parent.kind === 168 /* ObjectLiteralExpression */) { - if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional)) { + if (node.parent.kind === 171 /* ObjectLiteralExpression */) { + if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional)) { return true; } else if (node.body === undefined) { @@ -30009,9 +34348,6 @@ var ts; } } if (ts.isClassLike(node.parent)) { - if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional)) { - return true; - } // Technically, computed properties in ambient contexts is disallowed // for property declarations and accessors too, not just methods. // However, property declarations disallow computed names in general, @@ -30024,10 +34360,10 @@ var ts; return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol); } } - else if (node.parent.kind === 218 /* InterfaceDeclaration */) { + else if (node.parent.kind === 222 /* InterfaceDeclaration */) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol); } - else if (node.parent.kind === 156 /* TypeLiteral */) { + else if (node.parent.kind === 159 /* TypeLiteral */) { return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol); } } @@ -30038,11 +34374,11 @@ var ts; return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); } switch (current.kind) { - case 210 /* LabeledStatement */: + case 214 /* LabeledStatement */: if (node.label && current.label.text === node.label.text) { // found matching label - verify that label usage is correct // continue can only target labels that are on iteration statements - var isMisplacedContinueLabel = node.kind === 205 /* ContinueStatement */ + var isMisplacedContinueLabel = node.kind === 209 /* ContinueStatement */ && !ts.isIterationStatement(current.statement, /*lookInLabeledStatement*/ true); if (isMisplacedContinueLabel) { return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); @@ -30050,8 +34386,8 @@ var ts; return false; } break; - case 209 /* SwitchStatement */: - if (node.kind === 206 /* BreakStatement */ && !node.label) { + case 213 /* SwitchStatement */: + if (node.kind === 210 /* BreakStatement */ && !node.label) { // unlabeled break within switch statement - ok return false; } @@ -30066,13 +34402,13 @@ var ts; current = current.parent; } if (node.label) { - var message = node.kind === 206 /* BreakStatement */ + var message = node.kind === 210 /* BreakStatement */ ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); } else { - var message = node.kind === 206 /* BreakStatement */ + var message = node.kind === 210 /* BreakStatement */ ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; return grammarErrorOnNode(node, message); @@ -30084,7 +34420,7 @@ var ts; if (node !== ts.lastOrUndefined(elements)) { return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern); } - if (node.name.kind === 165 /* ArrayBindingPattern */ || node.name.kind === 164 /* ObjectBindingPattern */) { + if (node.name.kind === 168 /* ArrayBindingPattern */ || node.name.kind === 167 /* ObjectBindingPattern */) { return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); } if (node.initializer) { @@ -30094,7 +34430,7 @@ var ts; } } function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 203 /* ForInStatement */ && node.parent.parent.kind !== 204 /* ForOfStatement */) { + if (node.parent.parent.kind !== 207 /* ForInStatement */ && node.parent.parent.kind !== 208 /* ForOfStatement */) { if (ts.isInAmbientContext(node)) { if (node.initializer) { // Error on equals token which immediate precedes the initializer @@ -30130,7 +34466,7 @@ var ts; var elements = name.elements; for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) { var element = elements_2[_i]; - if (element.kind !== 190 /* OmittedExpression */) { + if (element.kind !== 193 /* OmittedExpression */) { checkGrammarNameInLetOrConstDeclarations(element.name); } } @@ -30147,15 +34483,15 @@ var ts; } function allowLetAndConstDeclarations(parent) { switch (parent.kind) { - case 199 /* IfStatement */: - case 200 /* DoStatement */: - case 201 /* WhileStatement */: - case 208 /* WithStatement */: - case 202 /* ForStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: + case 203 /* IfStatement */: + case 204 /* DoStatement */: + case 205 /* WhileStatement */: + case 212 /* WithStatement */: + case 206 /* ForStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: return false; - case 210 /* LabeledStatement */: + case 214 /* LabeledStatement */: return allowLetAndConstDeclarations(parent.parent); } return true; @@ -30206,12 +34542,11 @@ var ts; } function checkGrammarProperty(node) { if (ts.isClassLike(node.parent)) { - if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional) || - checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol)) { + if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol)) { return true; } } - else if (node.parent.kind === 218 /* InterfaceDeclaration */) { + else if (node.parent.kind === 222 /* InterfaceDeclaration */) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -30219,7 +34554,7 @@ var ts; return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer); } } - else if (node.parent.kind === 156 /* TypeLiteral */) { + else if (node.parent.kind === 159 /* TypeLiteral */) { if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) { return true; } @@ -30232,7 +34567,7 @@ var ts; } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - // A declare modifier is required for any top level .d.ts declaration except export=, export default, + // A declare modifier is required for any top level .d.ts declaration except export=, export default, export as namespace // interfaces and imports categories: // // DeclarationElement: @@ -30244,14 +34579,15 @@ var ts; // export_opt AmbientDeclaration // // TODO: The spec needs to be amended to reflect this grammar. - if (node.kind === 218 /* InterfaceDeclaration */ || - node.kind === 219 /* TypeAliasDeclaration */ || - node.kind === 225 /* ImportDeclaration */ || - node.kind === 224 /* ImportEqualsDeclaration */ || - node.kind === 231 /* ExportDeclaration */ || - node.kind === 230 /* ExportAssignment */ || - (node.flags & 4 /* Ambient */) || - (node.flags & (2 /* Export */ | 512 /* Default */))) { + if (node.kind === 222 /* InterfaceDeclaration */ || + node.kind === 223 /* TypeAliasDeclaration */ || + node.kind === 230 /* ImportDeclaration */ || + node.kind === 229 /* ImportEqualsDeclaration */ || + node.kind === 236 /* ExportDeclaration */ || + node.kind === 235 /* ExportAssignment */ || + node.kind === 228 /* NamespaceExportDeclaration */ || + (node.flags & 2 /* Ambient */) || + (node.flags & (1 /* Export */ | 512 /* Default */))) { return false; } return grammarErrorOnFirstToken(node, ts.Diagnostics.A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file); @@ -30259,7 +34595,7 @@ var ts; function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { var decl = _a[_i]; - if (ts.isDeclaration(decl) || decl.kind === 196 /* VariableStatement */) { + if (ts.isDeclaration(decl) || decl.kind === 200 /* VariableStatement */) { if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { return true; } @@ -30282,10 +34618,10 @@ var ts; } // We are either parented by another statement, or some sort of block. // If we're in a block, we only want to really report an error once - // to prevent noisyness. So use a bit on the block to indicate if + // to prevent noisiness. So use a bit on the block to indicate if // this has already been reported, and don't report if it has. // - if (node.parent.kind === 195 /* Block */ || node.parent.kind === 222 /* ModuleBlock */ || node.parent.kind === 251 /* SourceFile */) { + if (node.parent.kind === 199 /* Block */ || node.parent.kind === 226 /* ModuleBlock */ || node.parent.kind === 256 /* SourceFile */) { var links_1 = getNodeLinks(node.parent); // Check if the containing block ever report this error if (!links_1.hasReportedStatementInAmbientContext) { @@ -30298,7 +34634,7 @@ var ts; } function checkGrammarNumericLiteral(node) { // Grammar checking - if (node.flags & 32768 /* OctalLiteral */ && languageVersion >= 1 /* ES5 */) { + if (node.isOctalLiteral && languageVersion >= 1 /* ES5 */) { return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher); } } @@ -30310,7 +34646,6 @@ var ts; return true; } } - var _a; } ts.createTypeChecker = createTypeChecker; })(ts || (ts = {})); @@ -30347,6 +34682,7 @@ var ts; ts.getNullSourceMapWriter = getNullSourceMapWriter; function createSourceMapWriter(host, writer) { var compilerOptions = host.getCompilerOptions(); + var extendedDiagnostics = compilerOptions.extendedDiagnostics; var currentSourceFile; var sourceMapDir; // The directory in which sourcemap will be var stopOverridingSpan = false; @@ -30449,7 +34785,7 @@ var ts; lastEncodedSourceMapSpan = sourceMapData.sourceMapDecodedMappings.length ? sourceMapData.sourceMapDecodedMappings[sourceMapData.sourceMapDecodedMappings.length - 1] : defaultLastEncodedSourceMapSpan; - // TODO: Update lastEncodedNameIndex + // TODO: Update lastEncodedNameIndex // Since we dont support this any more, lets not worry about it right now. // When we start supporting nameIndex, we will get back to this // Change the encoded source map @@ -30510,6 +34846,9 @@ var ts; if (pos === -1) { return; } + if (extendedDiagnostics) { + ts.performance.mark("beforeSourcemap"); + } var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSourceFile, pos); // Convert the location to be one-based. sourceLinePos.line++; @@ -30542,6 +34881,10 @@ var ts; lastRecordedSourceMapSpan.sourceIndex = sourceMapSourceIndex; } updateLastEncodedAndRecordedSpans(); + if (extendedDiagnostics) { + ts.performance.mark("afterSourcemap"); + ts.performance.measure("Source Map", "beforeSourcemap", "afterSourcemap"); + } } function getStartPos(range) { var rangeHasDecorators = !!range.decorators; @@ -30656,7 +34999,8 @@ var ts; var increaseIndent; var decreaseIndent; var writeTextOfNode; - var writer = createAndSetNewTextWriterWithSymbolWriter(); + var writer; + createAndSetNewTextWriterWithSymbolWriter(); var enclosingDeclaration; var resultHasExternalModuleIndicator; var currentText; @@ -30673,7 +35017,8 @@ var ts; // Contains the reference paths that needs to go in the declaration file. // Collecting this separately because reference paths need to be first thing in the declaration file // and we could be collecting these paths from multiple files into single one with --out option - var referencePathsOutput = ""; + var referencesOutput = ""; + var usedTypeDirectiveReferences; // Emit references corresponding to each file var emittedReferencedFiles = []; var addedGlobalFileReference = false; @@ -30690,7 +35035,7 @@ var ts; // Emit reference in dts, if the file reference was not already emitted if (referencedFile && !ts.contains(emittedReferencedFiles, referencedFile)) { // Add a reference to generated dts file, - // global file reference is added only + // global file reference is added only // - if it is not bundled emit (because otherwise it would be self reference) // - and it is not already added if (writeReferencePath(referencedFile, !isBundledEmit && !addedGlobalFileReference)) { @@ -30720,7 +35065,7 @@ var ts; var oldWriter = writer; ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) { - ts.Debug.assert(aliasEmitInfo.node.kind === 225 /* ImportDeclaration */); + ts.Debug.assert(aliasEmitInfo.node.kind === 230 /* ImportDeclaration */); createAndSetNewTextWriterWithSymbolWriter(); ts.Debug.assert(aliasEmitInfo.indent === 0 || (aliasEmitInfo.indent === 1 && isBundledEmit)); for (var i = 0; i < aliasEmitInfo.indent; i++) { @@ -30739,17 +35084,22 @@ var ts; } if (!isBundledEmit && ts.isExternalModule(sourceFile) && sourceFile.moduleAugmentations.length && !resultHasExternalModuleIndicator) { // if file was external module with augmentations - this fact should be preserved in .d.ts as well. - // in case if we didn't write any external module specifiers in .d.ts we need to emit something + // in case if we didn't write any external module specifiers in .d.ts we need to emit something // that will force compiler to think that this file is an external module - 'export {}' is a reasonable choice here. write("export {};"); writeLine(); } }); + if (usedTypeDirectiveReferences) { + for (var directive in usedTypeDirectiveReferences) { + referencesOutput += "/// " + newLine; + } + } return { reportedDeclarationError: reportedDeclarationError, moduleElementDeclarationEmitInfo: allSourcesModuleElementDeclarationEmitInfo, synchronousDeclarationOutput: writer.getText(), - referencePathsOutput: referencePathsOutput + referencesOutput: referencesOutput }; function hasInternalAnnotation(range) { var comment = currentText.substring(range.pos, range.end); @@ -30776,7 +35126,6 @@ var ts; writer.writeParameter = writer.write; writer.writeSymbol = writer.write; setWriter(writer); - return writer; } function setWriter(newWriter) { writer = newWriter; @@ -30790,10 +35139,10 @@ var ts; var oldWriter = writer; ts.forEach(nodes, function (declaration) { var nodeToCheck; - if (declaration.kind === 214 /* VariableDeclaration */) { + if (declaration.kind === 218 /* VariableDeclaration */) { nodeToCheck = declaration.parent.parent; } - else if (declaration.kind === 228 /* NamedImports */ || declaration.kind === 229 /* ImportSpecifier */ || declaration.kind === 226 /* ImportClause */) { + else if (declaration.kind === 233 /* NamedImports */ || declaration.kind === 234 /* ImportSpecifier */ || declaration.kind === 231 /* ImportClause */) { ts.Debug.fail("We should be getting ImportDeclaration instead to write"); } else { @@ -30811,7 +35160,7 @@ var ts; // Writing of function bar would mark alias declaration foo as visible but we haven't yet visited that declaration so do nothing, // we would write alias foo declaration when we visit it since it would now be marked as visible if (moduleElementEmitInfo) { - if (moduleElementEmitInfo.node.kind === 225 /* ImportDeclaration */) { + if (moduleElementEmitInfo.node.kind === 230 /* ImportDeclaration */) { // we have to create asynchronous output only after we have collected complete information // because it is possible to enable multiple bindings as asynchronously visible moduleElementEmitInfo.isVisible = true; @@ -30821,12 +35170,12 @@ var ts; for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) { increaseIndent(); } - if (nodeToCheck.kind === 221 /* ModuleDeclaration */) { + if (nodeToCheck.kind === 225 /* ModuleDeclaration */) { ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined); asynchronousSubModuleDeclarationEmitInfo = []; } writeModuleElement(nodeToCheck); - if (nodeToCheck.kind === 221 /* ModuleDeclaration */) { + if (nodeToCheck.kind === 225 /* ModuleDeclaration */) { moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo; asynchronousSubModuleDeclarationEmitInfo = undefined; } @@ -30836,29 +35185,44 @@ var ts; }); setWriter(oldWriter); } - function handleSymbolAccessibilityError(symbolAccesibilityResult) { - if (symbolAccesibilityResult.accessibility === 0 /* Accessible */) { + function recordTypeReferenceDirectivesIfNecessary(typeReferenceDirectives) { + if (!typeReferenceDirectives) { + return; + } + if (!usedTypeDirectiveReferences) { + usedTypeDirectiveReferences = ts.createMap(); + } + for (var _i = 0, typeReferenceDirectives_1 = typeReferenceDirectives; _i < typeReferenceDirectives_1.length; _i++) { + var directive = typeReferenceDirectives_1[_i]; + if (!(directive in usedTypeDirectiveReferences)) { + usedTypeDirectiveReferences[directive] = directive; + } + } + } + function handleSymbolAccessibilityError(symbolAccessibilityResult) { + if (symbolAccessibilityResult.accessibility === 0 /* Accessible */) { // write the aliases - if (symbolAccesibilityResult && symbolAccesibilityResult.aliasesToMakeVisible) { - writeAsynchronousModuleElements(symbolAccesibilityResult.aliasesToMakeVisible); + if (symbolAccessibilityResult && symbolAccessibilityResult.aliasesToMakeVisible) { + writeAsynchronousModuleElements(symbolAccessibilityResult.aliasesToMakeVisible); } } else { // Report error reportedDeclarationError = true; - var errorInfo = writer.getSymbolAccessibilityDiagnostic(symbolAccesibilityResult); + var errorInfo = writer.getSymbolAccessibilityDiagnostic(symbolAccessibilityResult); if (errorInfo) { if (errorInfo.typeName) { - emitterDiagnostics.add(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, ts.getTextOfNodeFromSourceText(currentText, errorInfo.typeName), symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); + emitterDiagnostics.add(ts.createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, ts.getTextOfNodeFromSourceText(currentText, errorInfo.typeName), symbolAccessibilityResult.errorSymbolName, symbolAccessibilityResult.errorModuleName)); } else { - emitterDiagnostics.add(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); + emitterDiagnostics.add(ts.createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccessibilityResult.errorSymbolName, symbolAccessibilityResult.errorModuleName)); } } } } function trackSymbol(symbol, enclosingDeclaration, meaning) { handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning)); + recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning)); } function reportInaccessibleThisError() { if (errorNameNode) { @@ -30875,7 +35239,7 @@ var ts; } else { errorNameNode = declaration.name; - resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer); + resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer); errorNameNode = undefined; } } @@ -30888,7 +35252,7 @@ var ts; } else { errorNameNode = signature.name; - resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer); + resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer); errorNameNode = undefined; } } @@ -30929,40 +35293,43 @@ var ts; function emitType(type) { switch (type.kind) { case 117 /* AnyKeyword */: - case 130 /* StringKeyword */: - case 128 /* NumberKeyword */: + case 132 /* StringKeyword */: + case 130 /* NumberKeyword */: case 120 /* BooleanKeyword */: - case 131 /* SymbolKeyword */: + case 133 /* SymbolKeyword */: case 103 /* VoidKeyword */: - case 162 /* ThisType */: - case 163 /* StringLiteralType */: + case 135 /* UndefinedKeyword */: + case 93 /* NullKeyword */: + case 127 /* NeverKeyword */: + case 165 /* ThisType */: + case 166 /* LiteralType */: return writeTextOfNode(currentText, type); - case 191 /* ExpressionWithTypeArguments */: + case 194 /* ExpressionWithTypeArguments */: return emitExpressionWithTypeArguments(type); - case 152 /* TypeReference */: + case 155 /* TypeReference */: return emitTypeReference(type); - case 155 /* TypeQuery */: + case 158 /* TypeQuery */: return emitTypeQuery(type); - case 157 /* ArrayType */: + case 160 /* ArrayType */: return emitArrayType(type); - case 158 /* TupleType */: + case 161 /* TupleType */: return emitTupleType(type); - case 159 /* UnionType */: + case 162 /* UnionType */: return emitUnionType(type); - case 160 /* IntersectionType */: + case 163 /* IntersectionType */: return emitIntersectionType(type); - case 161 /* ParenthesizedType */: + case 164 /* ParenthesizedType */: return emitParenType(type); - case 153 /* FunctionType */: - case 154 /* ConstructorType */: + case 156 /* FunctionType */: + case 157 /* ConstructorType */: return emitSignatureDeclarationWithJsDocComments(type); - case 156 /* TypeLiteral */: + case 159 /* TypeLiteral */: return emitTypeLiteral(type); case 69 /* Identifier */: return emitEntityName(type); - case 136 /* QualifiedName */: + case 139 /* QualifiedName */: return emitEntityName(type); - case 151 /* TypePredicate */: + case 154 /* TypePredicate */: return emitTypePredicate(type); } function writeEntityName(entityName) { @@ -30970,8 +35337,8 @@ var ts; writeTextOfNode(currentText, entityName); } else { - var left = entityName.kind === 136 /* QualifiedName */ ? entityName.left : entityName.expression; - var right = entityName.kind === 136 /* QualifiedName */ ? entityName.right : entityName.name; + var left = entityName.kind === 139 /* QualifiedName */ ? entityName.left : entityName.expression; + var right = entityName.kind === 139 /* QualifiedName */ ? entityName.right : entityName.name; writeEntityName(left); write("."); writeTextOfNode(currentText, right); @@ -30980,13 +35347,14 @@ var ts; function emitEntityName(entityName) { var visibilityResult = resolver.isEntityNameVisible(entityName, // Aliases can be written asynchronously so use correct enclosing declaration - entityName.parent.kind === 224 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration); + entityName.parent.kind === 229 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); + recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName)); writeEntityName(entityName); } function emitExpressionWithTypeArguments(node) { - if (ts.isSupportedExpressionWithTypeArguments(node)) { - ts.Debug.assert(node.expression.kind === 69 /* Identifier */ || node.expression.kind === 169 /* PropertyAccessExpression */); + if (ts.isEntityNameExpression(node.expression)) { + ts.Debug.assert(node.expression.kind === 69 /* Identifier */ || node.expression.kind === 172 /* PropertyAccessExpression */); emitEntityName(node.expression); if (node.typeArguments) { write("<"); @@ -31059,15 +35427,15 @@ var ts; // do not need to keep track of created temp names. function getExportDefaultTempVariableName() { var baseName = "_default"; - if (!ts.hasProperty(currentIdentifiers, baseName)) { + if (!(baseName in currentIdentifiers)) { return baseName; } var count = 0; while (true) { count++; - var name_21 = baseName + "_" + count; - if (!ts.hasProperty(currentIdentifiers, name_21)) { - return name_21; + var name_23 = baseName + "_" + count; + if (!(name_23 in currentIdentifiers)) { + return name_23; } } } @@ -31079,11 +35447,14 @@ var ts; else { // Expression var tempVarName = getExportDefaultTempVariableName(); - write("declare var "); + if (!noDeclare) { + write("declare "); + } + write("var "); write(tempVarName); write(": "); writer.getSymbolAccessibilityDiagnostic = getDefaultExportAccessibilityDiagnostic; - resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer); + resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer); write(";"); writeLine(); write(node.isExportEquals ? "export = " : "export default "); @@ -31111,10 +35482,10 @@ var ts; if (isModuleElementVisible) { writeModuleElement(node); } - else if (node.kind === 224 /* ImportEqualsDeclaration */ || - (node.parent.kind === 251 /* SourceFile */ && isCurrentFileExternalModule)) { + else if (node.kind === 229 /* ImportEqualsDeclaration */ || + (node.parent.kind === 256 /* SourceFile */ && isCurrentFileExternalModule)) { var isVisible = void 0; - if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 251 /* SourceFile */) { + if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 256 /* SourceFile */) { // Import declaration of another module that is visited async so lets put it in right spot asynchronousSubModuleDeclarationEmitInfo.push({ node: node, @@ -31124,7 +35495,7 @@ var ts; }); } else { - if (node.kind === 225 /* ImportDeclaration */) { + if (node.kind === 230 /* ImportDeclaration */) { var importDeclaration = node; if (importDeclaration.importClause) { isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) || @@ -31142,23 +35513,23 @@ var ts; } function writeModuleElement(node) { switch (node.kind) { - case 216 /* FunctionDeclaration */: + case 220 /* FunctionDeclaration */: return writeFunctionDeclaration(node); - case 196 /* VariableStatement */: + case 200 /* VariableStatement */: return writeVariableStatement(node); - case 218 /* InterfaceDeclaration */: + case 222 /* InterfaceDeclaration */: return writeInterfaceDeclaration(node); - case 217 /* ClassDeclaration */: + case 221 /* ClassDeclaration */: return writeClassDeclaration(node); - case 219 /* TypeAliasDeclaration */: + case 223 /* TypeAliasDeclaration */: return writeTypeAliasDeclaration(node); - case 220 /* EnumDeclaration */: + case 224 /* EnumDeclaration */: return writeEnumDeclaration(node); - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: return writeModuleDeclaration(node); - case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportEqualsDeclaration */: return writeImportEqualsDeclaration(node); - case 225 /* ImportDeclaration */: + case 230 /* ImportDeclaration */: return writeImportDeclaration(node); default: ts.Debug.fail("Unknown symbol kind"); @@ -31166,30 +35537,33 @@ var ts; } function emitModuleElementDeclarationFlags(node) { // If the node is parented in the current source file we need to emit export declare or just export - if (node.parent.kind === 251 /* SourceFile */) { + if (node.parent.kind === 256 /* SourceFile */) { // If the node is exported - if (node.flags & 2 /* Export */) { + if (node.flags & 1 /* Export */) { write("export "); } if (node.flags & 512 /* Default */) { write("default "); } - else if (node.kind !== 218 /* InterfaceDeclaration */ && !noDeclare) { + else if (node.kind !== 222 /* InterfaceDeclaration */ && !noDeclare) { write("declare "); } } } - function emitClassMemberDeclarationFlags(node) { - if (node.flags & 16 /* Private */) { + function emitClassMemberDeclarationFlags(flags) { + if (flags & 8 /* Private */) { write("private "); } - else if (node.flags & 32 /* Protected */) { + else if (flags & 16 /* Protected */) { write("protected "); } - if (node.flags & 64 /* Static */) { + if (flags & 32 /* Static */) { write("static "); } - if (node.flags & 128 /* Abstract */) { + if (flags & 64 /* Readonly */) { + write("readonly "); + } + if (flags & 128 /* Abstract */) { write("abstract "); } } @@ -31197,7 +35571,7 @@ var ts; // note usage of writer. methods instead of aliases created, just to make sure we are using // correct writer especially to handle asynchronous alias writing emitJsDocComments(node); - if (node.flags & 2 /* Export */) { + if (node.flags & 1 /* Export */) { write("export "); } write("import "); @@ -31213,7 +35587,7 @@ var ts; write(");"); } writer.writeLine(); - function getImportEntityNameVisibilityError(symbolAccesibilityResult) { + function getImportEntityNameVisibilityError(symbolAccessibilityResult) { return { diagnosticMessage: ts.Diagnostics.Import_declaration_0_is_using_private_name_1, errorNode: node, @@ -31223,7 +35597,7 @@ var ts; } function isVisibleNamedBinding(namedBindings) { if (namedBindings) { - if (namedBindings.kind === 227 /* NamespaceImport */) { + if (namedBindings.kind === 232 /* NamespaceImport */) { return resolver.isDeclarationVisible(namedBindings); } else { @@ -31233,7 +35607,7 @@ var ts; } function writeImportDeclaration(node) { emitJsDocComments(node); - if (node.flags & 2 /* Export */) { + if (node.flags & 1 /* Export */) { write("export "); } write("import "); @@ -31247,7 +35621,7 @@ var ts; // If the default binding was emitted, write the separated write(", "); } - if (node.importClause.namedBindings.kind === 227 /* NamespaceImport */) { + if (node.importClause.namedBindings.kind === 232 /* NamespaceImport */) { write("* as "); writeTextOfNode(currentText, node.importClause.namedBindings.name); } @@ -31265,16 +35639,16 @@ var ts; } function emitExternalModuleSpecifier(parent) { // emitExternalModuleSpecifier is usually called when we emit something in the.d.ts file that will make it an external module (i.e. import/export declarations). - // the only case when it is not true is when we call it to emit correct name for module augmentation - d.ts files with just module augmentations are not considered - // external modules since they are indistingushable from script files with ambient modules. To fix this in such d.ts files we'll emit top level 'export {}' + // the only case when it is not true is when we call it to emit correct name for module augmentation - d.ts files with just module augmentations are not considered + // external modules since they are indistinguishable from script files with ambient modules. To fix this in such d.ts files we'll emit top level 'export {}' // so compiler will treat them as external modules. - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 221 /* ModuleDeclaration */; + resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== 225 /* ModuleDeclaration */; var moduleSpecifier; - if (parent.kind === 224 /* ImportEqualsDeclaration */) { + if (parent.kind === 229 /* ImportEqualsDeclaration */) { var node = parent; moduleSpecifier = ts.getExternalModuleImportEqualsDeclarationExpression(node); } - else if (parent.kind === 221 /* ModuleDeclaration */) { + else if (parent.kind === 225 /* ModuleDeclaration */) { moduleSpecifier = parent.name; } else { @@ -31284,9 +35658,9 @@ var ts; if (moduleSpecifier.kind === 9 /* StringLiteral */ && isBundledEmit && (compilerOptions.out || compilerOptions.outFile)) { var moduleName = ts.getExternalModuleNameFromDeclaration(host, resolver, parent); if (moduleName) { - write("\""); + write('"'); write(moduleName); - write("\""); + write('"'); return; } } @@ -31331,7 +35705,7 @@ var ts; write("global "); } else { - if (node.flags & 65536 /* Namespace */) { + if (node.flags & 4096 /* Namespace */) { write("namespace "); } else { @@ -31344,21 +35718,26 @@ var ts; writeTextOfNode(currentText, node.name); } } - while (node.body.kind !== 222 /* ModuleBlock */) { + while (node.body && node.body.kind !== 226 /* ModuleBlock */) { node = node.body; write("."); writeTextOfNode(currentText, node.name); } var prevEnclosingDeclaration = enclosingDeclaration; - enclosingDeclaration = node; - write(" {"); - writeLine(); - increaseIndent(); - emitLines(node.body.statements); - decreaseIndent(); - write("}"); - writeLine(); - enclosingDeclaration = prevEnclosingDeclaration; + if (node.body) { + enclosingDeclaration = node; + write(" {"); + writeLine(); + increaseIndent(); + emitLines(node.body.statements); + decreaseIndent(); + write("}"); + writeLine(); + enclosingDeclaration = prevEnclosingDeclaration; + } + else { + write(";"); + } } function writeTypeAliasDeclaration(node) { var prevEnclosingDeclaration = enclosingDeclaration; @@ -31373,7 +35752,7 @@ var ts; write(";"); writeLine(); enclosingDeclaration = prevEnclosingDeclaration; - function getTypeAliasDeclarationVisibilityError(symbolAccesibilityResult) { + function getTypeAliasDeclarationVisibilityError(symbolAccessibilityResult) { return { diagnosticMessage: ts.Diagnostics.Exported_type_alias_0_has_or_is_using_private_name_1, errorNode: node.type, @@ -31409,7 +35788,7 @@ var ts; writeLine(); } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 144 /* MethodDeclaration */ && (node.parent.flags & 16 /* Private */); + return node.parent.kind === 147 /* MethodDeclaration */ && (node.parent.flags & 8 /* Private */); } function emitTypeParameters(typeParameters) { function emitTypeParameter(node) { @@ -31420,50 +35799,50 @@ var ts; // If there is constraint present and this is not a type parameter of the private method emit the constraint if (node.constraint && !isPrivateMethodTypeParameter(node)) { write(" extends "); - if (node.parent.kind === 153 /* FunctionType */ || - node.parent.kind === 154 /* ConstructorType */ || - (node.parent.parent && node.parent.parent.kind === 156 /* TypeLiteral */)) { - ts.Debug.assert(node.parent.kind === 144 /* MethodDeclaration */ || - node.parent.kind === 143 /* MethodSignature */ || - node.parent.kind === 153 /* FunctionType */ || - node.parent.kind === 154 /* ConstructorType */ || - node.parent.kind === 148 /* CallSignature */ || - node.parent.kind === 149 /* ConstructSignature */); + if (node.parent.kind === 156 /* FunctionType */ || + node.parent.kind === 157 /* ConstructorType */ || + (node.parent.parent && node.parent.parent.kind === 159 /* TypeLiteral */)) { + ts.Debug.assert(node.parent.kind === 147 /* MethodDeclaration */ || + node.parent.kind === 146 /* MethodSignature */ || + node.parent.kind === 156 /* FunctionType */ || + node.parent.kind === 157 /* ConstructorType */ || + node.parent.kind === 151 /* CallSignature */ || + node.parent.kind === 152 /* ConstructSignature */); emitType(node.constraint); } else { emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.constraint, getTypeParameterConstraintVisibilityError); } } - function getTypeParameterConstraintVisibilityError(symbolAccesibilityResult) { + function getTypeParameterConstraintVisibilityError(symbolAccessibilityResult) { // Type parameter constraints are named by user so we should always be able to name it var diagnosticMessage; switch (node.parent.kind) { - case 217 /* ClassDeclaration */: + case 221 /* ClassDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; break; - case 218 /* InterfaceDeclaration */: + case 222 /* InterfaceDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; break; - case 149 /* ConstructSignature */: + case 152 /* ConstructSignature */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 148 /* CallSignature */: + case 151 /* CallSignature */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; break; - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - if (node.parent.flags & 64 /* Static */) { + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + if (node.parent.flags & 32 /* Static */) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 217 /* ClassDeclaration */) { + else if (node.parent.parent.kind === 221 /* ClassDeclaration */) { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } break; - case 216 /* FunctionDeclaration */: + case 220 /* FunctionDeclaration */: diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; break; default: @@ -31488,16 +35867,20 @@ var ts; emitCommaList(typeReferences, emitTypeOfTypeReference); } function emitTypeOfTypeReference(node) { - if (ts.isSupportedExpressionWithTypeArguments(node)) { + if (ts.isEntityNameExpression(node.expression)) { emitTypeWithNewGetSymbolAccessibilityDiagnostic(node, getHeritageClauseVisibilityError); } else if (!isImplementsList && node.expression.kind === 93 /* NullKeyword */) { write("null"); } - function getHeritageClauseVisibilityError(symbolAccesibilityResult) { + else { + writer.getSymbolAccessibilityDiagnostic = getHeritageClauseVisibilityError; + resolver.writeBaseConstructorTypeOfClass(enclosingDeclaration, enclosingDeclaration, 2 /* UseTypeOfFunction */ | 1024 /* UseTypeAliasValue */, writer); + } + function getHeritageClauseVisibilityError(symbolAccessibilityResult) { var diagnosticMessage; // Heritage clause is written by user so it can always be named - if (node.parent.parent.kind === 217 /* ClassDeclaration */) { + if (node.parent.parent.kind === 221 /* ClassDeclaration */) { // Class or Interface implemented/extended is inaccessible diagnosticMessage = isImplementsList ? ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : @@ -31519,7 +35902,7 @@ var ts; function emitParameterProperties(constructorDeclaration) { if (constructorDeclaration) { ts.forEach(constructorDeclaration.parameters, function (param) { - if (param.flags & 56 /* AccessibilityModifier */) { + if (param.flags & 92 /* ParameterPropertyModifier */) { emitPropertyDeclaration(param); } }); @@ -31573,7 +35956,7 @@ var ts; return; } emitJsDocComments(node); - emitClassMemberDeclarationFlags(node); + emitClassMemberDeclarationFlags(node.flags); emitVariableDeclaration(node); write(";"); writeLine(); @@ -31581,7 +35964,7 @@ var ts; function emitVariableDeclaration(node) { // If we are emitting property it isn't moduleElement and hence we already know it needs to be emitted // so there is no check needed to see if declaration is visible - if (node.kind !== 214 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { + if (node.kind !== 218 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { if (ts.isBindingPattern(node.name)) { emitBindingPattern(node.name); } @@ -31590,52 +35973,54 @@ var ts; // it if it's not a well known symbol. In that case, the text of the name will be exactly // what we want, namely the name expression enclosed in brackets. writeTextOfNode(currentText, node.name); - // If optional property emit ? - if ((node.kind === 142 /* PropertyDeclaration */ || node.kind === 141 /* PropertySignature */) && ts.hasQuestionToken(node)) { + // If optional property emit ? but in the case of parameterProperty declaration with "?" indicating optional parameter for the constructor + // we don't want to emit property declaration with "?" + if ((node.kind === 145 /* PropertyDeclaration */ || node.kind === 144 /* PropertySignature */ || + (node.kind === 142 /* Parameter */ && !ts.isParameterPropertyDeclaration(node))) && ts.hasQuestionToken(node)) { write("?"); } - if ((node.kind === 142 /* PropertyDeclaration */ || node.kind === 141 /* PropertySignature */) && node.parent.kind === 156 /* TypeLiteral */) { + if ((node.kind === 145 /* PropertyDeclaration */ || node.kind === 144 /* PropertySignature */) && node.parent.kind === 159 /* TypeLiteral */) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } - else if (!(node.flags & 16 /* Private */)) { + else if (!(node.flags & 8 /* Private */)) { writeTypeOfDeclaration(node, node.type, getVariableDeclarationTypeVisibilityError); } } } - function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) { - if (node.kind === 214 /* VariableDeclaration */) { - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? + function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { + if (node.kind === 218 /* VariableDeclaration */) { + return symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; } - else if (node.kind === 142 /* PropertyDeclaration */ || node.kind === 141 /* PropertySignature */) { + else if (node.kind === 145 /* PropertyDeclaration */ || node.kind === 144 /* PropertySignature */) { // TODO(jfreeman): Deal with computed properties in error reporting. - if (node.flags & 64 /* Static */) { - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? + if (node.flags & 32 /* Static */) { + return symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.kind === 217 /* ClassDeclaration */) { - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? + else if (node.parent.kind === 221 /* ClassDeclaration */) { + return symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; } else { // Interfaces cannot have types that cannot be named - return symbolAccesibilityResult.errorModuleName ? + return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; } } } - function getVariableDeclarationTypeVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage = getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult); + function getVariableDeclarationTypeVisibilityError(symbolAccessibilityResult) { + var diagnosticMessage = getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult); return diagnosticMessage !== undefined ? { diagnosticMessage: diagnosticMessage, errorNode: node, @@ -31651,15 +36036,15 @@ var ts; var elements = []; for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) { var element = _a[_i]; - if (element.kind !== 190 /* OmittedExpression */) { + if (element.kind !== 193 /* OmittedExpression */) { elements.push(element); } } emitCommaList(elements, emitBindingElement); } function emitBindingElement(bindingElement) { - function getBindingElementTypeVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage = getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult); + function getBindingElementTypeVisibilityError(symbolAccessibilityResult) { + var diagnosticMessage = getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult); return diagnosticMessage !== undefined ? { diagnosticMessage: diagnosticMessage, errorNode: bindingElement, @@ -31714,14 +36099,14 @@ var ts; if (node === accessors.firstAccessor) { emitJsDocComments(accessors.getAccessor); emitJsDocComments(accessors.setAccessor); - emitClassMemberDeclarationFlags(node); + emitClassMemberDeclarationFlags(node.flags | (accessors.setAccessor ? 0 : 64 /* Readonly */)); writeTextOfNode(currentText, node.name); - if (!(node.flags & 16 /* Private */)) { + if (!(node.flags & 8 /* Private */)) { accessorWithTypeAnnotation = node; var type = getTypeAnnotationFromAccessor(node); if (!type) { // couldn't get type for the first accessor, try the another one - var anotherAccessor = node.kind === 146 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor; + var anotherAccessor = node.kind === 149 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor; type = getTypeAnnotationFromAccessor(anotherAccessor); if (type) { accessorWithTypeAnnotation = anotherAccessor; @@ -31734,24 +36119,24 @@ var ts; } function getTypeAnnotationFromAccessor(accessor) { if (accessor) { - return accessor.kind === 146 /* GetAccessor */ + return accessor.kind === 149 /* GetAccessor */ ? accessor.type // Getter - return type : accessor.parameters.length > 0 ? accessor.parameters[0].type // Setter parameter type : undefined; } } - function getAccessorDeclarationTypeVisibilityError(symbolAccesibilityResult) { + function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { var diagnosticMessage; - if (accessorWithTypeAnnotation.kind === 147 /* SetAccessor */) { + if (accessorWithTypeAnnotation.kind === 150 /* SetAccessor */) { // Setters have to have type named and cannot infer it so, the type should always be named - if (accessorWithTypeAnnotation.parent.flags & 64 /* Static */) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + if (accessorWithTypeAnnotation.parent.flags & 32 /* Static */) { + diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1; } @@ -31763,16 +36148,16 @@ var ts; }; } else { - if (accessorWithTypeAnnotation.flags & 64 /* Static */) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? + if (accessorWithTypeAnnotation.flags & 32 /* Static */) { + diagnosticMessage = symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0; } else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? + diagnosticMessage = symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0; @@ -31793,17 +36178,17 @@ var ts; // so no need to verify if the declaration is visible if (!resolver.isImplementationOfOverload(node)) { emitJsDocComments(node); - if (node.kind === 216 /* FunctionDeclaration */) { + if (node.kind === 220 /* FunctionDeclaration */) { emitModuleElementDeclarationFlags(node); } - else if (node.kind === 144 /* MethodDeclaration */) { - emitClassMemberDeclarationFlags(node); + else if (node.kind === 147 /* MethodDeclaration */ || node.kind === 148 /* Constructor */) { + emitClassMemberDeclarationFlags(node.flags); } - if (node.kind === 216 /* FunctionDeclaration */) { + if (node.kind === 220 /* FunctionDeclaration */) { write("function "); writeTextOfNode(currentText, node.name); } - else if (node.kind === 145 /* Constructor */) { + else if (node.kind === 148 /* Constructor */) { write("constructor"); } else { @@ -31822,35 +36207,48 @@ var ts; function emitSignatureDeclaration(node) { var prevEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = node; - // Construct signature or constructor type write new Signature - if (node.kind === 149 /* ConstructSignature */ || node.kind === 154 /* ConstructorType */) { - write("new "); - } - emitTypeParameters(node.typeParameters); - if (node.kind === 150 /* IndexSignature */) { + var closeParenthesizedFunctionType = false; + if (node.kind === 153 /* IndexSignature */) { + // Index signature can have readonly modifier + emitClassMemberDeclarationFlags(node.flags); write("["); } else { + // Construct signature or constructor type write new Signature + if (node.kind === 152 /* ConstructSignature */ || node.kind === 157 /* ConstructorType */) { + write("new "); + } + else if (node.kind === 156 /* FunctionType */) { + var currentOutput = writer.getText(); + // Do not generate incorrect type when function type with type parameters is type argument + // This could happen if user used space between two '<' making it error free + // e.g var x: A< (a: Tany)=>Tany>; + if (node.typeParameters && currentOutput.charAt(currentOutput.length - 1) === "<") { + closeParenthesizedFunctionType = true; + write("("); + } + } + emitTypeParameters(node.typeParameters); write("("); } // Parameters emitCommaList(node.parameters, emitParameterDeclaration); - if (node.kind === 150 /* IndexSignature */) { + if (node.kind === 153 /* IndexSignature */) { write("]"); } else { write(")"); } // If this is not a constructor and is not private, emit the return type - var isFunctionTypeOrConstructorType = node.kind === 153 /* FunctionType */ || node.kind === 154 /* ConstructorType */; - if (isFunctionTypeOrConstructorType || node.parent.kind === 156 /* TypeLiteral */) { + var isFunctionTypeOrConstructorType = node.kind === 156 /* FunctionType */ || node.kind === 157 /* ConstructorType */; + if (isFunctionTypeOrConstructorType || node.parent.kind === 159 /* TypeLiteral */) { // Emit type literal signature return type only if specified if (node.type) { write(isFunctionTypeOrConstructorType ? " => " : ": "); emitType(node.type); } } - else if (node.kind !== 145 /* Constructor */ && !(node.flags & 16 /* Private */)) { + else if (node.kind !== 148 /* Constructor */ && !(node.flags & 8 /* Private */)) { writeReturnTypeAtSignature(node, getReturnTypeVisibilityError); } enclosingDeclaration = prevEnclosingDeclaration; @@ -31858,53 +36256,56 @@ var ts; write(";"); writeLine(); } - function getReturnTypeVisibilityError(symbolAccesibilityResult) { + else if (closeParenthesizedFunctionType) { + write(")"); + } + function getReturnTypeVisibilityError(symbolAccessibilityResult) { var diagnosticMessage; switch (node.kind) { - case 149 /* ConstructSignature */: + case 152 /* ConstructSignature */: // Interfaces cannot have return types that cannot be named - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 148 /* CallSignature */: + case 151 /* CallSignature */: // Interfaces cannot have return types that cannot be named - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 150 /* IndexSignature */: + case 153 /* IndexSignature */: // Interfaces cannot have return types that cannot be named - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; break; - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - if (node.flags & 64 /* Static */) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + if (node.flags & 32 /* Static */) { + diagnosticMessage = symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; } - else if (node.parent.kind === 217 /* ClassDeclaration */) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? + else if (node.parent.kind === 221 /* ClassDeclaration */) { + diagnosticMessage = symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; } else { // Interfaces cannot have return types that cannot be named - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? + diagnosticMessage = symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; } break; - case 216 /* FunctionDeclaration */: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? + case 220 /* FunctionDeclaration */: + diagnosticMessage = symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; @@ -31937,65 +36338,65 @@ var ts; write("?"); } decreaseIndent(); - if (node.parent.kind === 153 /* FunctionType */ || - node.parent.kind === 154 /* ConstructorType */ || - node.parent.parent.kind === 156 /* TypeLiteral */) { + if (node.parent.kind === 156 /* FunctionType */ || + node.parent.kind === 157 /* ConstructorType */ || + node.parent.parent.kind === 159 /* TypeLiteral */) { emitTypeOfVariableDeclarationFromTypeLiteral(node); } - else if (!(node.parent.flags & 16 /* Private */)) { + else if (!(node.parent.flags & 8 /* Private */)) { writeTypeOfDeclaration(node, node.type, getParameterDeclarationTypeVisibilityError); } - function getParameterDeclarationTypeVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage = getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult); + function getParameterDeclarationTypeVisibilityError(symbolAccessibilityResult) { + var diagnosticMessage = getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult); return diagnosticMessage !== undefined ? { diagnosticMessage: diagnosticMessage, errorNode: node, typeName: node.name } : undefined; } - function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) { + function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { switch (node.parent.kind) { - case 145 /* Constructor */: - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? + case 148 /* Constructor */: + return symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 149 /* ConstructSignature */: + case 152 /* ConstructSignature */: // Interfaces cannot have parameter types that cannot be named - return symbolAccesibilityResult.errorModuleName ? + return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 148 /* CallSignature */: + case 151 /* CallSignature */: // Interfaces cannot have parameter types that cannot be named - return symbolAccesibilityResult.errorModuleName ? + return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - if (node.parent.flags & 64 /* Static */) { - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + if (node.parent.flags & 32 /* Static */) { + return symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; } - else if (node.parent.parent.kind === 217 /* ClassDeclaration */) { - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? + else if (node.parent.parent.kind === 221 /* ClassDeclaration */) { + return symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; } else { // Interfaces cannot have parameter types that cannot be named - return symbolAccesibilityResult.errorModuleName ? + return symbolAccessibilityResult.errorModuleName ? ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; } - case 216 /* FunctionDeclaration */: - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? + case 220 /* FunctionDeclaration */: + return symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; @@ -32005,12 +36406,12 @@ var ts; } function emitBindingPattern(bindingPattern) { // We have to explicitly emit square bracket and bracket because these tokens are not store inside the node. - if (bindingPattern.kind === 164 /* ObjectBindingPattern */) { + if (bindingPattern.kind === 167 /* ObjectBindingPattern */) { write("{"); emitCommaList(bindingPattern.elements, emitBindingElement); write("}"); } - else if (bindingPattern.kind === 165 /* ArrayBindingPattern */) { + else if (bindingPattern.kind === 168 /* ArrayBindingPattern */) { write("["); var elements = bindingPattern.elements; emitCommaList(elements, emitBindingElement); @@ -32021,7 +36422,7 @@ var ts; } } function emitBindingElement(bindingElement) { - if (bindingElement.kind === 190 /* OmittedExpression */) { + if (bindingElement.kind === 193 /* OmittedExpression */) { // If bindingElement is an omittedExpression (i.e. containing elision), // we will emit blank space (although this may differ from users' original code, // it allows emitSeparatedList to write separator appropriately) @@ -32030,7 +36431,7 @@ var ts; // emit : function foo([ , x, , ]) {} write(" "); } - else if (bindingElement.kind === 166 /* BindingElement */) { + else if (bindingElement.kind === 169 /* BindingElement */) { if (bindingElement.propertyName) { // bindingElement has propertyName property in the following case: // { y: [a,b,c] ...} -> bindingPattern will have a property called propertyName for "y" @@ -32069,40 +36470,40 @@ var ts; } function emitNode(node) { switch (node.kind) { - case 216 /* FunctionDeclaration */: - case 221 /* ModuleDeclaration */: - case 224 /* ImportEqualsDeclaration */: - case 218 /* InterfaceDeclaration */: - case 217 /* ClassDeclaration */: - case 219 /* TypeAliasDeclaration */: - case 220 /* EnumDeclaration */: + case 220 /* FunctionDeclaration */: + case 225 /* ModuleDeclaration */: + case 229 /* ImportEqualsDeclaration */: + case 222 /* InterfaceDeclaration */: + case 221 /* ClassDeclaration */: + case 223 /* TypeAliasDeclaration */: + case 224 /* EnumDeclaration */: return emitModuleElement(node, isModuleElementVisible(node)); - case 196 /* VariableStatement */: + case 200 /* VariableStatement */: return emitModuleElement(node, isVariableStatementVisible(node)); - case 225 /* ImportDeclaration */: + case 230 /* ImportDeclaration */: // Import declaration without import clause is visible, otherwise it is not visible return emitModuleElement(node, /*isModuleElementVisible*/ !node.importClause); - case 231 /* ExportDeclaration */: + case 236 /* ExportDeclaration */: return emitExportDeclaration(node); - case 145 /* Constructor */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: + case 148 /* Constructor */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: return writeFunctionDeclaration(node); - case 149 /* ConstructSignature */: - case 148 /* CallSignature */: - case 150 /* IndexSignature */: + case 152 /* ConstructSignature */: + case 151 /* CallSignature */: + case 153 /* IndexSignature */: return emitSignatureDeclarationWithJsDocComments(node); - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: return emitAccessorDeclaration(node); - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: return emitPropertyDeclaration(node); - case 250 /* EnumMember */: + case 255 /* EnumMember */: return emitEnumMemberDeclaration(node); - case 230 /* ExportAssignment */: + case 235 /* ExportAssignment */: return emitExportAssignment(node); - case 251 /* SourceFile */: + case 256 /* SourceFile */: return emitSourceFile(node); } } @@ -32125,7 +36526,7 @@ var ts; if (declFileName) { declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(declarationFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); - referencePathsOutput += "/// " + newLine; + referencesOutput += "/// " + newLine; } return addedBundledEmitReference; function getDeclFileName(emitFileNames, sourceFiles, isBundledEmit) { @@ -32144,9 +36545,9 @@ var ts; var emitDeclarationResult = emitDeclarations(host, resolver, emitterDiagnostics, declarationFilePath, sourceFiles, isBundledEmit); var emitSkipped = emitDeclarationResult.reportedDeclarationError || host.isEmitBlocked(declarationFilePath) || host.getCompilerOptions().noEmit; if (!emitSkipped) { - var declarationOutput = emitDeclarationResult.referencePathsOutput + var declarationOutput = emitDeclarationResult.referencesOutput + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo); - ts.writeFile(host, emitterDiagnostics, declarationFilePath, declarationOutput, host.getCompilerOptions().emitBOM); + ts.writeFile(host, emitterDiagnostics, declarationFilePath, declarationOutput, host.getCompilerOptions().emitBOM, sourceFiles); } return emitSkipped; function getDeclarationOutput(synchronousDeclarationOutput, moduleElementDeclarationEmitInfo) { @@ -32190,7 +36591,7 @@ var ts; Jump[Jump["Continue"] = 4] = "Continue"; Jump[Jump["Return"] = 8] = "Return"; })(Jump || (Jump = {})); - var entities = { + var entities = ts.createMap({ "quot": 0x0022, "amp": 0x0026, "apos": 0x0027, @@ -32444,7 +36845,7 @@ var ts; "clubs": 0x2663, "hearts": 0x2665, "diams": 0x2666 - }; + }); // Flags enum to track count of temp variables and a few dedicated names var TempFlags; (function (TempFlags) { @@ -32473,6 +36874,7 @@ var ts; var languageVersion = ts.getEmitScriptTarget(compilerOptions); var modulekind = ts.getEmitModuleKind(compilerOptions); var sourceMapDataList = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? [] : undefined; + var emittedFilesList = compilerOptions.listEmittedFiles ? [] : undefined; var emitterDiagnostics = ts.createDiagnosticCollection(); var emitSkipped = false; var newLine = host.getNewLine(); @@ -32481,11 +36883,12 @@ var ts; return { emitSkipped: emitSkipped, diagnostics: emitterDiagnostics.getDiagnostics(), + emittedFiles: emittedFilesList, sourceMaps: sourceMapDataList }; function isUniqueLocalName(name, container) { for (var node = container; ts.isNodeDescendentOf(node, container); node = node.nextContainer) { - if (node.locals && ts.hasProperty(node.locals, name)) { + if (node.locals && name in node.locals) { // We conservatively include alias symbols to cover cases where they're emitted as locals if (node.locals[name].flags & (107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */)) { return false; @@ -32497,13 +36900,13 @@ var ts; function setLabeledJump(state, isBreak, labelText, labelMarker) { if (isBreak) { if (!state.labeledNonLocalBreaks) { - state.labeledNonLocalBreaks = {}; + state.labeledNonLocalBreaks = ts.createMap(); } state.labeledNonLocalBreaks[labelText] = labelMarker; } else { if (!state.labeledNonLocalContinues) { - state.labeledNonLocalContinues = {}; + state.labeledNonLocalContinues = ts.createMap(); } state.labeledNonLocalContinues[labelText] = labelMarker; } @@ -32570,26 +36973,26 @@ var ts; /** If removeComments is true, no leading-comments needed to be emitted **/ var emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos) { } : emitLeadingCommentsOfPositionWorker; var setSourceMapWriterEmit = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? changeSourceMapEmit : function (writer) { }; - var moduleEmitDelegates = (_a = {}, - _a[5 /* ES6 */] = emitES6Module, - _a[2 /* AMD */] = emitAMDModule, - _a[4 /* System */] = emitSystemModule, - _a[3 /* UMD */] = emitUMDModule, - _a[1 /* CommonJS */] = emitCommonJSModule, + var moduleEmitDelegates = ts.createMap((_a = {}, + _a[ts.ModuleKind.ES6] = emitES6Module, + _a[ts.ModuleKind.AMD] = emitAMDModule, + _a[ts.ModuleKind.System] = emitSystemModule, + _a[ts.ModuleKind.UMD] = emitUMDModule, + _a[ts.ModuleKind.CommonJS] = emitCommonJSModule, _a - ); - var bundleEmitDelegates = (_b = {}, - _b[5 /* ES6 */] = function () { }, - _b[2 /* AMD */] = emitAMDModule, - _b[4 /* System */] = emitSystemModule, - _b[3 /* UMD */] = function () { }, - _b[1 /* CommonJS */] = function () { }, + )); + var bundleEmitDelegates = ts.createMap((_b = {}, + _b[ts.ModuleKind.ES6] = function () { }, + _b[ts.ModuleKind.AMD] = emitAMDModule, + _b[ts.ModuleKind.System] = emitSystemModule, + _b[ts.ModuleKind.UMD] = function () { }, + _b[ts.ModuleKind.CommonJS] = function () { }, _b - ); + )); return doEmit; function doEmit(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit) { sourceMap.initialize(jsFilePath, sourceMapFilePath, sourceFiles, isBundledEmit); - generatedNameSet = {}; + generatedNameSet = ts.createMap(); nodeToGeneratedName = []; decoratedClassAliases = []; isOwnFileEmit = !isBundledEmit; @@ -32602,9 +37005,9 @@ var ts; writeLine(); var sourceMappingURL = sourceMap.getSourceMappingURL(); if (sourceMappingURL) { - write("//# sourceMappingURL=" + sourceMappingURL); + write("//# " + "sourceMappingURL" + "=" + sourceMappingURL); // Sometimes tools can sometimes see this line as a source mapping url comment } - writeEmittedFiles(writer.getText(), jsFilePath, sourceMapFilePath, /*writeByteOrderMark*/ compilerOptions.emitBOM); + writeEmittedFiles(writer.getText(), jsFilePath, sourceMapFilePath, /*writeByteOrderMark*/ compilerOptions.emitBOM, sourceFiles); // reset the state sourceMap.reset(); writer.reset(); @@ -32651,18 +37054,18 @@ var ts; } function isUniqueName(name) { return !resolver.hasGlobalName(name) && - !ts.hasProperty(currentFileIdentifiers, name) && - !ts.hasProperty(generatedNameSet, name); + !(name in currentFileIdentifiers) && + !(name in generatedNameSet); } // Return the next available name in the pattern _a ... _z, _0, _1, ... // TempFlags._i or TempFlags._n may be used to express a preference for that dedicated name. // Note that names generated by makeTempVariableName and makeUniqueName will never conflict. function makeTempVariableName(flags) { if (flags && !(tempFlags & flags)) { - var name_22 = flags === 268435456 /* _i */ ? "_i" : "_n"; - if (isUniqueName(name_22)) { + var name_24 = flags === 268435456 /* _i */ ? "_i" : "_n"; + if (isUniqueName(name_24)) { tempFlags |= flags; - return name_22; + return name_24; } } while (true) { @@ -32670,9 +37073,9 @@ var ts; tempFlags++; // Skip over 'i' and 'n' if (count !== 8 && count !== 13) { - var name_23 = count < 26 ? "_" + String.fromCharCode(97 /* a */ + count) : "_" + (count - 26); - if (isUniqueName(name_23)) { - return name_23; + var name_25 = count < 26 ? "_" + String.fromCharCode(97 /* a */ + count) : "_" + (count - 26); + if (isUniqueName(name_25)) { + return name_25; } } } @@ -32716,18 +37119,20 @@ var ts; switch (node.kind) { case 69 /* Identifier */: return makeUniqueName(node.text); - case 221 /* ModuleDeclaration */: - case 220 /* EnumDeclaration */: + case 225 /* ModuleDeclaration */: + case 224 /* EnumDeclaration */: return generateNameForModuleOrEnum(node); - case 225 /* ImportDeclaration */: - case 231 /* ExportDeclaration */: + case 230 /* ImportDeclaration */: + case 236 /* ExportDeclaration */: return generateNameForImportOrExportDeclaration(node); - case 216 /* FunctionDeclaration */: - case 217 /* ClassDeclaration */: - case 230 /* ExportAssignment */: + case 220 /* FunctionDeclaration */: + case 221 /* ClassDeclaration */: + case 235 /* ExportAssignment */: return generateNameForExportDefault(); - case 189 /* ClassExpression */: + case 192 /* ClassExpression */: return generateNameForClassExpression(); + default: + ts.Debug.fail(); } } function getGeneratedNameForNode(node) { @@ -32735,14 +37140,14 @@ var ts; return nodeToGeneratedName[id] || (nodeToGeneratedName[id] = ts.unescapeIdentifier(generateNameForNode(node))); } /** Write emitted output to disk */ - function writeEmittedFiles(emitOutput, jsFilePath, sourceMapFilePath, writeByteOrderMark) { + function writeEmittedFiles(emitOutput, jsFilePath, sourceMapFilePath, writeByteOrderMark, sourceFiles) { if (compilerOptions.sourceMap && !compilerOptions.inlineSourceMap) { - ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap.getText(), /*writeByteOrderMark*/ false); + ts.writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap.getText(), /*writeByteOrderMark*/ false, sourceFiles); } if (sourceMapDataList) { sourceMapDataList.push(sourceMap.getSourceMapData()); } - ts.writeFile(host, emitterDiagnostics, jsFilePath, emitOutput, writeByteOrderMark); + ts.writeFile(host, emitterDiagnostics, jsFilePath, emitOutput, writeByteOrderMark, sourceFiles); } // Create a temporary variable with a unique unused name. function createTempVariable(flags) { @@ -32921,7 +37326,7 @@ var ts; // Any template literal or string literal with an extended escape // (e.g. "\u{0067}") will need to be downleveled as a escaped string literal. if (languageVersion < 2 /* ES6 */ && (ts.isTemplateLiteralKind(node.kind) || node.hasExtendedUnicodeEscape)) { - return getQuotedEscapedLiteralText("\"", node.text, "\""); + return getQuotedEscapedLiteralText('"', node.text, '"'); } // If we don't need to downlevel and we can reach the original source text using // the node's parent reference, then simply get the text as it was originally written. @@ -32932,7 +37337,7 @@ var ts; // or an escaped quoted form of the original text if it's string-like. switch (node.kind) { case 9 /* StringLiteral */: - return getQuotedEscapedLiteralText("\"", node.text, "\""); + return getQuotedEscapedLiteralText('"', node.text, '"'); case 11 /* NoSubstitutionTemplateLiteral */: return getQuotedEscapedLiteralText("`", node.text, "`"); case 12 /* TemplateHead */: @@ -32954,7 +37359,7 @@ var ts; // The raw strings contain the (escaped) strings of what the user wrote. // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". var text = ts.getTextOfNodeFromSourceText(currentText, node); - // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), + // text contains the original source, it will also contain quotes ("`"), dollar signs and braces ("${" and "}"), // thus we need to remove those characters. // First template piece starts with "`", others with "}" // Last template piece ends with "`", others with "${" @@ -32996,10 +37401,10 @@ var ts; write("("); emit(tempVariable); // Now we emit the expressions - if (node.template.kind === 186 /* TemplateExpression */) { + if (node.template.kind === 189 /* TemplateExpression */) { ts.forEach(node.template.templateSpans, function (templateSpan) { write(", "); - var needsParens = templateSpan.expression.kind === 184 /* BinaryExpression */ + var needsParens = templateSpan.expression.kind === 187 /* BinaryExpression */ && templateSpan.expression.operatorToken.kind === 24 /* CommaToken */; emitParenthesizedIf(templateSpan.expression, needsParens); }); @@ -33034,7 +37439,7 @@ var ts; // ("abc" + 1) << (2 + "") // rather than // "abc" + (1 << 2) + "" - var needsParens = templateSpan.expression.kind !== 175 /* ParenthesizedExpression */ + var needsParens = templateSpan.expression.kind !== 178 /* ParenthesizedExpression */ && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1 /* GreaterThan */; if (i > 0 || headEmitted) { // If this is the first span and the head was not emitted, then this templateSpan's @@ -33076,11 +37481,11 @@ var ts; } function templateNeedsParens(template, parent) { switch (parent.kind) { - case 171 /* CallExpression */: - case 172 /* NewExpression */: + case 174 /* CallExpression */: + case 175 /* NewExpression */: return parent.expression === template; - case 173 /* TaggedTemplateExpression */: - case 175 /* ParenthesizedExpression */: + case 176 /* TaggedTemplateExpression */: + case 178 /* ParenthesizedExpression */: return false; default: return comparePrecedenceToBinaryPlus(parent) !== -1 /* LessThan */; @@ -33101,7 +37506,7 @@ var ts; // TODO (drosen): Note that we need to account for the upcoming 'yield' and // spread ('...') unary operators that are anticipated for ES6. switch (expression.kind) { - case 184 /* BinaryExpression */: + case 187 /* BinaryExpression */: switch (expression.operatorToken.kind) { case 37 /* AsteriskToken */: case 39 /* SlashToken */: @@ -33113,8 +37518,8 @@ var ts; default: return -1 /* LessThan */; } - case 187 /* YieldExpression */: - case 185 /* ConditionalExpression */: + case 190 /* YieldExpression */: + case 188 /* ConditionalExpression */: return -1 /* LessThan */; default: return 1 /* GreaterThan */; @@ -33130,9 +37535,9 @@ var ts; /// 'Div' for upper-cased or dotted names function emitTagName(name) { if (name.kind === 69 /* Identifier */ && ts.isIntrinsicJsxName(name.text)) { - write("\""); + write('"'); emit(name); - write("\""); + write('"'); } else { emit(name); @@ -33146,9 +37551,9 @@ var ts; emit(name); } else { - write("\""); + write('"'); emit(name); - write("\""); + write('"'); } } /// Emit an name/value pair for an attribute (e.g. "x: 3") @@ -33181,11 +37586,11 @@ var ts; // Either emit one big object literal (no spread attribs), or // a call to the __assign helper var attrs = openingNode.attributes; - if (ts.forEach(attrs, function (attr) { return attr.kind === 242 /* JsxSpreadAttribute */; })) { + if (ts.forEach(attrs, function (attr) { return attr.kind === 247 /* JsxSpreadAttribute */; })) { write("__assign("); var haveOpenedObjectLiteral = false; for (var i = 0; i < attrs.length; i++) { - if (attrs[i].kind === 242 /* JsxSpreadAttribute */) { + if (attrs[i].kind === 247 /* JsxSpreadAttribute */) { // If this is the first argument, we need to emit a {} as the first argument if (i === 0) { write("{}, "); @@ -33200,7 +37605,7 @@ var ts; emit(attrs[i].expression); } else { - ts.Debug.assert(attrs[i].kind === 241 /* JsxAttribute */); + ts.Debug.assert(attrs[i].kind === 246 /* JsxAttribute */); if (haveOpenedObjectLiteral) { write(", "); } @@ -33232,23 +37637,45 @@ var ts; } // Children if (children) { - for (var i = 0; i < children.length; i++) { - // Don't emit empty expressions - if (children[i].kind === 243 /* JsxExpression */ && !(children[i].expression)) { - continue; - } - // Don't emit empty strings - if (children[i].kind === 239 /* JsxText */) { - var text = getTextToEmit(children[i]); - if (text !== undefined) { - write(", \""); - write(text); - write("\""); + var firstChild = void 0; + var multipleEmittableChildren = false; + for (var i = 0, n = children.length; i < n; i++) { + var jsxChild = children[i]; + if (isJsxChildEmittable(jsxChild)) { + // we need to decide whether to emit in single line or multiple lines as indented list + // store firstChild reference, if we see another emittable child, then emit accordingly + if (!firstChild) { + write(", "); + firstChild = jsxChild; + } + else { + // more than one emittable child, emit indented list + if (!multipleEmittableChildren) { + multipleEmittableChildren = true; + increaseIndent(); + writeLine(); + emit(firstChild); + } + write(", "); + writeLine(); + emit(jsxChild); } } + } + if (multipleEmittableChildren) { + decreaseIndent(); + } + else if (firstChild) { + if (firstChild.kind !== 241 /* JsxElement */ && firstChild.kind !== 242 /* JsxSelfClosingElement */) { + emit(firstChild); + } else { - write(", "); - emit(children[i]); + // If the only child is jsx element, put it on a new indented line + increaseIndent(); + writeLine(); + emit(firstChild); + writeLine(); + decreaseIndent(); } } } @@ -33256,11 +37683,11 @@ var ts; write(")"); // closes "React.createElement(" emitTrailingComments(openingNode); } - if (node.kind === 236 /* JsxElement */) { + if (node.kind === 241 /* JsxElement */) { emitJsxElement(node.openingElement, node.children); } else { - ts.Debug.assert(node.kind === 237 /* JsxSelfClosingElement */); + ts.Debug.assert(node.kind === 242 /* JsxSelfClosingElement */); emitJsxElement(node); } } @@ -33282,11 +37709,11 @@ var ts; if (i > 0) { write(" "); } - if (attribs[i].kind === 242 /* JsxSpreadAttribute */) { + if (attribs[i].kind === 247 /* JsxSpreadAttribute */) { emitJsxSpreadAttribute(attribs[i]); } else { - ts.Debug.assert(attribs[i].kind === 241 /* JsxAttribute */); + ts.Debug.assert(attribs[i].kind === 246 /* JsxAttribute */); emitJsxAttribute(attribs[i]); } } @@ -33294,11 +37721,11 @@ var ts; function emitJsxOpeningOrSelfClosingElement(node) { write("<"); emit(node.tagName); - if (node.attributes.length > 0 || (node.kind === 237 /* JsxSelfClosingElement */)) { + if (node.attributes.length > 0 || (node.kind === 242 /* JsxSelfClosingElement */)) { write(" "); } emitAttributes(node.attributes); - if (node.kind === 237 /* JsxSelfClosingElement */) { + if (node.kind === 242 /* JsxSelfClosingElement */) { write("/>"); } else { @@ -33317,11 +37744,11 @@ var ts; } emitJsxClosingElement(node.closingElement); } - if (node.kind === 236 /* JsxElement */) { + if (node.kind === 241 /* JsxElement */) { emitJsxElement(node); } else { - ts.Debug.assert(node.kind === 237 /* JsxSelfClosingElement */); + ts.Debug.assert(node.kind === 242 /* JsxSelfClosingElement */); emitJsxOpeningOrSelfClosingElement(node); } } @@ -33329,11 +37756,11 @@ var ts; // In a sense, it does not actually emit identifiers as much as it declares a name for a specific property. // For example, this is utilized when feeding in a result to Object.defineProperty. function emitExpressionForPropertyName(node) { - ts.Debug.assert(node.kind !== 166 /* BindingElement */); + ts.Debug.assert(node.kind !== 169 /* BindingElement */); if (node.kind === 9 /* StringLiteral */) { emitLiteral(node); } - else if (node.kind === 137 /* ComputedPropertyName */) { + else if (node.kind === 140 /* ComputedPropertyName */) { // if this is a decorated computed property, we will need to capture the result // of the property expression so that we can apply decorators later. This is to ensure // we don't introduce unintended side effects: @@ -33364,75 +37791,77 @@ var ts; emit(node.expression); } else { - write("\""); + write('"'); if (node.kind === 8 /* NumericLiteral */) { write(node.text); } else { writeTextOfNode(currentText, node); } - write("\""); + write('"'); } } function isExpressionIdentifier(node) { var parent = node.parent; switch (parent.kind) { - case 167 /* ArrayLiteralExpression */: - case 192 /* AsExpression */: - case 184 /* BinaryExpression */: - case 171 /* CallExpression */: - case 244 /* CaseClause */: - case 137 /* ComputedPropertyName */: - case 185 /* ConditionalExpression */: - case 140 /* Decorator */: - case 178 /* DeleteExpression */: - case 200 /* DoStatement */: - case 170 /* ElementAccessExpression */: - case 230 /* ExportAssignment */: - case 198 /* ExpressionStatement */: - case 191 /* ExpressionWithTypeArguments */: - case 202 /* ForStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: - case 199 /* IfStatement */: - case 240 /* JsxClosingElement */: - case 237 /* JsxSelfClosingElement */: - case 238 /* JsxOpeningElement */: - case 242 /* JsxSpreadAttribute */: - case 243 /* JsxExpression */: - case 172 /* NewExpression */: - case 175 /* ParenthesizedExpression */: - case 183 /* PostfixUnaryExpression */: - case 182 /* PrefixUnaryExpression */: - case 207 /* ReturnStatement */: - case 249 /* ShorthandPropertyAssignment */: - case 188 /* SpreadElementExpression */: - case 209 /* SwitchStatement */: - case 173 /* TaggedTemplateExpression */: - case 193 /* TemplateSpan */: - case 211 /* ThrowStatement */: - case 174 /* TypeAssertionExpression */: - case 179 /* TypeOfExpression */: - case 180 /* VoidExpression */: - case 201 /* WhileStatement */: - case 208 /* WithStatement */: - case 187 /* YieldExpression */: + case 170 /* ArrayLiteralExpression */: + case 195 /* AsExpression */: + case 184 /* AwaitExpression */: + case 187 /* BinaryExpression */: + case 174 /* CallExpression */: + case 249 /* CaseClause */: + case 140 /* ComputedPropertyName */: + case 188 /* ConditionalExpression */: + case 143 /* Decorator */: + case 181 /* DeleteExpression */: + case 204 /* DoStatement */: + case 173 /* ElementAccessExpression */: + case 235 /* ExportAssignment */: + case 202 /* ExpressionStatement */: + case 194 /* ExpressionWithTypeArguments */: + case 206 /* ForStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: + case 203 /* IfStatement */: + case 245 /* JsxClosingElement */: + case 242 /* JsxSelfClosingElement */: + case 243 /* JsxOpeningElement */: + case 247 /* JsxSpreadAttribute */: + case 248 /* JsxExpression */: + case 175 /* NewExpression */: + case 196 /* NonNullExpression */: + case 178 /* ParenthesizedExpression */: + case 186 /* PostfixUnaryExpression */: + case 185 /* PrefixUnaryExpression */: + case 211 /* ReturnStatement */: + case 254 /* ShorthandPropertyAssignment */: + case 191 /* SpreadElementExpression */: + case 213 /* SwitchStatement */: + case 176 /* TaggedTemplateExpression */: + case 197 /* TemplateSpan */: + case 215 /* ThrowStatement */: + case 177 /* TypeAssertionExpression */: + case 182 /* TypeOfExpression */: + case 183 /* VoidExpression */: + case 205 /* WhileStatement */: + case 212 /* WithStatement */: + case 190 /* YieldExpression */: return true; - case 166 /* BindingElement */: - case 250 /* EnumMember */: - case 139 /* Parameter */: - case 248 /* PropertyAssignment */: - case 142 /* PropertyDeclaration */: - case 214 /* VariableDeclaration */: + case 169 /* BindingElement */: + case 255 /* EnumMember */: + case 142 /* Parameter */: + case 253 /* PropertyAssignment */: + case 145 /* PropertyDeclaration */: + case 218 /* VariableDeclaration */: return parent.initializer === node; - case 169 /* PropertyAccessExpression */: + case 172 /* PropertyAccessExpression */: return parent.expression === node; - case 177 /* ArrowFunction */: - case 176 /* FunctionExpression */: + case 180 /* ArrowFunction */: + case 179 /* FunctionExpression */: return parent.body === node; - case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportEqualsDeclaration */: return parent.moduleReference === node; - case 136 /* QualifiedName */: + case 139 /* QualifiedName */: return parent.left === node; } return false; @@ -33440,9 +37869,9 @@ var ts; function emitExpressionIdentifier(node) { var container = resolver.getReferencedExportContainer(node); if (container) { - if (container.kind === 251 /* SourceFile */) { + if (container.kind === 256 /* SourceFile */) { // Identifier references module export - if (modulekind !== 5 /* ES6 */ && modulekind !== 4 /* System */) { + if (modulekind !== ts.ModuleKind.ES6 && modulekind !== ts.ModuleKind.System) { write("exports."); } } @@ -33453,22 +37882,22 @@ var ts; } } else { - if (modulekind !== 5 /* ES6 */) { + if (modulekind !== ts.ModuleKind.ES6) { var declaration = resolver.getReferencedImportDeclaration(node); if (declaration) { - if (declaration.kind === 226 /* ImportClause */) { + if (declaration.kind === 231 /* ImportClause */) { // Identifier references default import write(getGeneratedNameForNode(declaration.parent)); - write(languageVersion === 0 /* ES3 */ ? "[\"default\"]" : ".default"); + write(languageVersion === 0 /* ES3 */ ? '["default"]' : ".default"); return; } - else if (declaration.kind === 229 /* ImportSpecifier */) { + else if (declaration.kind === 234 /* ImportSpecifier */) { // Identifier references named import write(getGeneratedNameForNode(declaration.parent.parent.parent)); - var name_24 = declaration.propertyName || declaration.name; - var identifier = ts.getTextOfNodeFromSourceText(currentText, name_24); + var name_26 = declaration.propertyName || declaration.name; + var identifier = ts.getTextOfNodeFromSourceText(currentText, name_26); if (languageVersion === 0 /* ES3 */ && identifier === "default") { - write("[\"default\"]"); + write('["default"]'); } else { write("."); @@ -33508,23 +37937,37 @@ var ts; } function isNameOfNestedBlockScopedRedeclarationOrCapturedBinding(node) { if (languageVersion < 2 /* ES6 */) { - var parent_8 = node.parent; - switch (parent_8.kind) { - case 166 /* BindingElement */: - case 217 /* ClassDeclaration */: - case 220 /* EnumDeclaration */: - case 214 /* VariableDeclaration */: - return parent_8.name === node && resolver.isDeclarationWithCollidingName(parent_8); + var parent_13 = node.parent; + switch (parent_13.kind) { + case 169 /* BindingElement */: + case 221 /* ClassDeclaration */: + case 224 /* EnumDeclaration */: + case 218 /* VariableDeclaration */: + return parent_13.name === node && resolver.isDeclarationWithCollidingName(parent_13); } } return false; } + function getClassExpressionInPropertyAccessInStaticPropertyDeclaration(node) { + if (languageVersion >= 2 /* ES6 */) { + var parent_14 = node.parent; + if (parent_14.kind === 172 /* PropertyAccessExpression */ && parent_14.expression === node) { + parent_14 = parent_14.parent; + while (parent_14 && parent_14.kind !== 145 /* PropertyDeclaration */) { + parent_14 = parent_14.parent; + } + return parent_14 && parent_14.kind === 145 /* PropertyDeclaration */ && (parent_14.flags & 32 /* Static */) !== 0 && + parent_14.parent.kind === 192 /* ClassExpression */ ? parent_14.parent : undefined; + } + } + return undefined; + } function emitIdentifier(node) { if (convertedLoopState) { if (node.text == "arguments" && resolver.isArgumentsLocalBinding(node)) { // in converted loop body arguments cannot be used directly. - var name_25 = convertedLoopState.argumentsName || (convertedLoopState.argumentsName = makeUniqueName("arguments")); - write(name_25); + var name_27 = convertedLoopState.argumentsName || (convertedLoopState.argumentsName = makeUniqueName("arguments")); + write(name_27); return; } } @@ -33532,6 +37975,14 @@ var ts; write(node.text); } else if (isExpressionIdentifier(node)) { + var classExpression = getClassExpressionInPropertyAccessInStaticPropertyDeclaration(node); + if (classExpression) { + var declaration = resolver.getReferencedValueDeclaration(node); + if (declaration === classExpression) { + write(getGeneratedNameForNode(declaration.name)); + return; + } + } emitExpressionIdentifier(node); } else if (isNameOfNestedBlockScopedRedeclarationOrCapturedBinding(node)) { @@ -33624,10 +38075,14 @@ var ts; } } function needsParenthesisForAwaitExpressionAsYield(node) { - if (node.parent.kind === 184 /* BinaryExpression */ && !ts.isAssignmentOperator(node.parent.operatorToken.kind)) { + if (node.parent.kind === 187 /* BinaryExpression */ && !ts.isAssignmentOperator(node.parent.operatorToken.kind)) { return true; } - else if (node.parent.kind === 185 /* ConditionalExpression */ && node.parent.condition === node) { + else if (node.parent.kind === 188 /* ConditionalExpression */ && node.parent.condition === node) { + return true; + } + else if (node.parent.kind === 185 /* PrefixUnaryExpression */ || node.parent.kind === 181 /* DeleteExpression */ || + node.parent.kind === 182 /* TypeOfExpression */ || node.parent.kind === 183 /* VoidExpression */) { return true; } return false; @@ -33635,11 +38090,11 @@ var ts; function needsParenthesisForPropertyAccessOrInvocation(node) { switch (node.kind) { case 69 /* Identifier */: - case 167 /* ArrayLiteralExpression */: - case 169 /* PropertyAccessExpression */: - case 170 /* ElementAccessExpression */: - case 171 /* CallExpression */: - case 175 /* ParenthesizedExpression */: + case 170 /* ArrayLiteralExpression */: + case 172 /* PropertyAccessExpression */: + case 173 /* ElementAccessExpression */: + case 174 /* CallExpression */: + case 178 /* ParenthesizedExpression */: // This list is not exhaustive and only includes those cases that are relevant // to the check in emitArrayLiteral. More cases can be added as needed. return false; @@ -33659,17 +38114,17 @@ var ts; write(", "); } var e = elements[pos]; - if (e.kind === 188 /* SpreadElementExpression */) { + if (e.kind === 191 /* SpreadElementExpression */) { e = e.expression; emitParenthesizedIf(e, /*parenthesized*/ group === 0 && needsParenthesisForPropertyAccessOrInvocation(e)); pos++; - if (pos === length && group === 0 && needsUniqueCopy && e.kind !== 167 /* ArrayLiteralExpression */) { + if (pos === length && group === 0 && needsUniqueCopy && e.kind !== 170 /* ArrayLiteralExpression */) { write(".slice()"); } } else { var i = pos; - while (i < length && elements[i].kind !== 188 /* SpreadElementExpression */) { + while (i < length && elements[i].kind !== 191 /* SpreadElementExpression */) { i++; } write("["); @@ -33692,7 +38147,7 @@ var ts; } } function isSpreadElementExpression(node) { - return node.kind === 188 /* SpreadElementExpression */; + return node.kind === 191 /* SpreadElementExpression */; } function emitArrayLiteral(node) { var elements = node.elements; @@ -33705,7 +38160,7 @@ var ts; write("]"); } else { - emitListWithSpread(elements, /*needsUniqueCopy*/ true, /*multiLine*/ (node.flags & 1024 /* MultiLine */) !== 0, + emitListWithSpread(elements, /*needsUniqueCopy*/ true, /*multiLine*/ node.multiLine, /*trailingComma*/ elements.hasTrailingComma, /*useConcat*/ true); } } @@ -33724,7 +38179,7 @@ var ts; emitLinePreservingList(node, properties, /*allowTrailingComma*/ languageVersion >= 1 /* ES5 */, /*spacesBetweenBraces*/ true); } else { - var multiLine = (node.flags & 1024 /* MultiLine */) !== 0; + var multiLine = node.multiLine; if (!multiLine) { write(" "); } @@ -33743,7 +38198,7 @@ var ts; write("}"); } function emitDownlevelObjectLiteralWithComputedProperties(node, firstComputedPropertyIndex) { - var multiLine = (node.flags & 1024 /* MultiLine */) !== 0; + var multiLine = node.multiLine; var properties = node.properties; write("("); if (multiLine) { @@ -33762,7 +38217,7 @@ var ts; writeComma(); var property = properties[i]; emitStart(property); - if (property.kind === 146 /* GetAccessor */ || property.kind === 147 /* SetAccessor */) { + if (property.kind === 149 /* GetAccessor */ || property.kind === 150 /* SetAccessor */) { // TODO (drosen): Reconcile with 'emitMemberFunctions'. var accessors = ts.getAllAccessorDeclarations(node.properties, property); if (property !== accessors.firstAccessor) { @@ -33771,7 +38226,7 @@ var ts; write("Object.defineProperty("); emit(tempVar); write(", "); - emitStart(node.name); + emitStart(property.name); emitExpressionForPropertyName(property.name); emitEnd(property.name); write(", {"); @@ -33814,13 +38269,13 @@ var ts; emitMemberAccessForPropertyName(property.name); emitEnd(property.name); write(" = "); - if (property.kind === 248 /* PropertyAssignment */) { + if (property.kind === 253 /* PropertyAssignment */) { emit(property.initializer); } - else if (property.kind === 249 /* ShorthandPropertyAssignment */) { + else if (property.kind === 254 /* ShorthandPropertyAssignment */) { emitExpressionIdentifier(property.name); } - else if (property.kind === 144 /* MethodDeclaration */) { + else if (property.kind === 147 /* MethodDeclaration */) { emitFunctionDeclaration(property); } else { @@ -33854,7 +38309,7 @@ var ts; // Everything until that point can be emitted as part of the initial object literal. var numInitialNonComputedProperties = numProperties; for (var i = 0, n = properties.length; i < n; i++) { - if (properties[i].name.kind === 137 /* ComputedPropertyName */) { + if (properties[i].name.kind === 140 /* ComputedPropertyName */) { numInitialNonComputedProperties = i; break; } @@ -33870,21 +38325,20 @@ var ts; emitObjectLiteralBody(node, properties.length); } function createBinaryExpression(left, operator, right, startsOnNewLine) { - var result = ts.createSynthesizedNode(184 /* BinaryExpression */, startsOnNewLine); + var result = ts.createSynthesizedNode(187 /* BinaryExpression */, startsOnNewLine); result.operatorToken = ts.createSynthesizedNode(operator); result.left = left; result.right = right; return result; } function createPropertyAccessExpression(expression, name) { - var result = ts.createSynthesizedNode(169 /* PropertyAccessExpression */); + var result = ts.createSynthesizedNode(172 /* PropertyAccessExpression */); result.expression = parenthesizeForAccess(expression); - result.dotToken = ts.createSynthesizedNode(21 /* DotToken */); result.name = name; return result; } function createElementAccessExpression(expression, argumentExpression) { - var result = ts.createSynthesizedNode(170 /* ElementAccessExpression */); + var result = ts.createSynthesizedNode(173 /* ElementAccessExpression */); result.expression = parenthesizeForAccess(expression); result.argumentExpression = argumentExpression; return result; @@ -33892,7 +38346,9 @@ var ts; function parenthesizeForAccess(expr) { // When diagnosing whether the expression needs parentheses, the decision should be based // on the innermost expression in a chain of nested type assertions. - while (expr.kind === 174 /* TypeAssertionExpression */ || expr.kind === 192 /* AsExpression */) { + while (expr.kind === 177 /* TypeAssertionExpression */ || + expr.kind === 195 /* AsExpression */ || + expr.kind === 196 /* NonNullExpression */) { expr = expr.expression; } // isLeftHandSideExpression is almost the correct criterion for when it is not necessary @@ -33904,11 +38360,11 @@ var ts; // 1.x -> not the same as (1).x // if (ts.isLeftHandSideExpression(expr) && - expr.kind !== 172 /* NewExpression */ && + expr.kind !== 175 /* NewExpression */ && expr.kind !== 8 /* NumericLiteral */) { return expr; } - var node = ts.createSynthesizedNode(175 /* ParenthesizedExpression */); + var node = ts.createSynthesizedNode(178 /* ParenthesizedExpression */); node.expression = expr; return node; } @@ -33941,9 +38397,14 @@ var ts; emit(node.initializer); } // Return true if identifier resolves to an exported member of a namespace - function isNamespaceExportReference(node) { + function isExportReference(node) { var container = resolver.getReferencedExportContainer(node); - return container && container.kind !== 251 /* SourceFile */; + return !!container; + } + // Return true if identifier resolves to an imported identifier + function isImportedReference(node) { + var declaration = resolver.getReferencedImportDeclaration(node); + return declaration && (declaration.kind === 231 /* ImportClause */ || declaration.kind === 234 /* ImportSpecifier */); } function emitShorthandPropertyAssignment(node) { // The name property of a short-hand property assignment is considered an expression position, so here @@ -33958,10 +38419,21 @@ var ts; // let obj = { y }; // } // Here we need to emit obj = { y : m.y } regardless of the output target. - if (modulekind !== 5 /* ES6 */ || isNamespaceExportReference(node.name)) { + // The same rules apply for imported identifiers when targeting module formats with indirect access to + // the imported identifiers. For example, when targeting CommonJS: + // + // import {foo} from './foo'; + // export const baz = { foo }; + // + // Must be transformed into: + // + // const foo_1 = require('./foo'); + // exports.baz = { foo: foo_1.foo }; + // + if (languageVersion < 2 /* ES6 */ || (modulekind !== ts.ModuleKind.ES6 && isImportedReference(node.name)) || isExportReference(node.name)) { // Emit identifier as an identifier write(": "); - emit(node.name); + emitExpressionIdentifier(node.name); } if (languageVersion >= 2 /* ES6 */ && node.objectAssignmentInitializer) { write(" = "); @@ -33973,7 +38445,7 @@ var ts; if (constantValue !== undefined) { write(constantValue.toString()); if (!compilerOptions.removeComments) { - var propertyName = node.kind === 169 /* PropertyAccessExpression */ ? ts.declarationNameToString(node.name) : ts.getTextOfNode(node.argumentExpression); + var propertyName = node.kind === 172 /* PropertyAccessExpression */ ? ts.declarationNameToString(node.name) : ts.getTextOfNode(node.argumentExpression); write(" /* " + propertyName + " */"); } return true; @@ -33984,7 +38456,7 @@ var ts; if (compilerOptions.isolatedModules) { return undefined; } - return node.kind === 169 /* PropertyAccessExpression */ || node.kind === 170 /* ElementAccessExpression */ + return node.kind === 172 /* PropertyAccessExpression */ || node.kind === 173 /* ElementAccessExpression */ ? resolver.getConstantValue(node) : undefined; } @@ -34014,13 +38486,16 @@ var ts; if (languageVersion === 2 /* ES6 */ && node.expression.kind === 95 /* SuperKeyword */ && isInAsyncMethodWithSuperInES6(node)) { - var name_26 = ts.createSynthesizedNode(9 /* StringLiteral */); - name_26.text = node.name.text; - emitSuperAccessInAsyncMethod(node.expression, name_26); + var name_28 = ts.createSynthesizedNode(9 /* StringLiteral */); + name_28.text = node.name.text; + emitSuperAccessInAsyncMethod(node.expression, name_28); return; } emit(node.expression); - var indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken); + var dotRangeStart = ts.nodeIsSynthesized(node.expression) ? -1 : node.expression.end; + var dotRangeEnd = ts.nodeIsSynthesized(node.expression) ? -1 : ts.skipTrivia(currentText, node.expression.end) + 1; + var dotToken = { pos: dotRangeStart, end: dotRangeEnd }; + var indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, dotToken); // 1 .toString is a valid property access, emit a space after the literal // Also emit a space if expression is a integer const enum value - it will appear in generated code as numeric literal var shouldEmitSpace = false; @@ -34043,7 +38518,7 @@ var ts; else { write("."); } - var indentedAfterDot = indentIfOnDifferentLines(node, node.dotToken, node.name); + var indentedAfterDot = indentIfOnDifferentLines(node, dotToken, node.name); emit(node.name); decreaseIndentIf(indentedBeforeDot, indentedAfterDot); } @@ -34081,7 +38556,7 @@ var ts; } emitExpressionIdentifier(node); break; - case 136 /* QualifiedName */: + case 139 /* QualifiedName */: emitQualifiedNameAsExpression(node, useFallback); break; default: @@ -34105,10 +38580,13 @@ var ts; write("]"); } function hasSpreadElement(elements) { - return ts.forEach(elements, function (e) { return e.kind === 188 /* SpreadElementExpression */; }); + return ts.forEach(elements, function (e) { return e.kind === 191 /* SpreadElementExpression */; }); } function skipParentheses(node) { - while (node.kind === 175 /* ParenthesizedExpression */ || node.kind === 174 /* TypeAssertionExpression */ || node.kind === 192 /* AsExpression */) { + while (node.kind === 178 /* ParenthesizedExpression */ || + node.kind === 177 /* TypeAssertionExpression */ || + node.kind === 195 /* AsExpression */ || + node.kind === 196 /* NonNullExpression */) { node = node.expression; } return node; @@ -34129,13 +38607,13 @@ var ts; function emitCallWithSpread(node) { var target; var expr = skipParentheses(node.expression); - if (expr.kind === 169 /* PropertyAccessExpression */) { + if (expr.kind === 172 /* PropertyAccessExpression */) { // Target will be emitted as "this" argument target = emitCallTarget(expr.expression); write("."); emit(expr.name); } - else if (expr.kind === 170 /* ElementAccessExpression */) { + else if (expr.kind === 173 /* ElementAccessExpression */) { // Target will be emitted as "this" argument target = emitCallTarget(expr.expression); write("["); @@ -34268,15 +38746,19 @@ var ts; // If the node is synthesized, it means the emitter put the parentheses there, // not the user. If we didn't want them, the emitter would not have put them // there. - if (!ts.nodeIsSynthesized(node) && node.parent.kind !== 177 /* ArrowFunction */) { - if (node.expression.kind === 174 /* TypeAssertionExpression */ || node.expression.kind === 192 /* AsExpression */) { + if (!ts.nodeIsSynthesized(node) && node.parent.kind !== 180 /* ArrowFunction */) { + if (node.expression.kind === 177 /* TypeAssertionExpression */ || + node.expression.kind === 195 /* AsExpression */ || + node.expression.kind === 196 /* NonNullExpression */) { var operand = node.expression.expression; // Make sure we consider all nested cast expressions, e.g.: // (-A).x; - while (operand.kind === 174 /* TypeAssertionExpression */ || operand.kind === 192 /* AsExpression */) { + while (operand.kind === 177 /* TypeAssertionExpression */ || + operand.kind === 195 /* AsExpression */ || + operand.kind === 196 /* NonNullExpression */) { operand = operand.expression; } - // We have an expression of the form: (SubExpr) + // We have an expression of the form: (SubExpr) or (SubExpr as Type) // Emitting this as (SubExpr) is really not desirable. We would like to emit the subexpr as is. // Omitting the parentheses, however, could cause change in the semantics of the generated // code if the casted expression has a lower precedence than the rest of the expression, e.g.: @@ -34284,15 +38766,16 @@ var ts; // (typeof A).toString() should be emitted as (typeof A).toString() and not typeof A.toString() // new (A()) should be emitted as new (A()) and not new A() // (function foo() { })() should be emitted as an IIF (function foo(){})() and not declaration function foo(){} () - if (operand.kind !== 182 /* PrefixUnaryExpression */ && - operand.kind !== 180 /* VoidExpression */ && - operand.kind !== 179 /* TypeOfExpression */ && - operand.kind !== 178 /* DeleteExpression */ && - operand.kind !== 183 /* PostfixUnaryExpression */ && - operand.kind !== 172 /* NewExpression */ && - !(operand.kind === 171 /* CallExpression */ && node.parent.kind === 172 /* NewExpression */) && - !(operand.kind === 176 /* FunctionExpression */ && node.parent.kind === 171 /* CallExpression */) && - !(operand.kind === 8 /* NumericLiteral */ && node.parent.kind === 169 /* PropertyAccessExpression */)) { + if (operand.kind !== 185 /* PrefixUnaryExpression */ && + operand.kind !== 183 /* VoidExpression */ && + operand.kind !== 182 /* TypeOfExpression */ && + operand.kind !== 181 /* DeleteExpression */ && + operand.kind !== 186 /* PostfixUnaryExpression */ && + operand.kind !== 175 /* NewExpression */ && + !(operand.kind === 187 /* BinaryExpression */ && node.expression.kind === 195 /* AsExpression */) && + !(operand.kind === 174 /* CallExpression */ && node.parent.kind === 175 /* NewExpression */) && + !(operand.kind === 179 /* FunctionExpression */ && node.parent.kind === 174 /* CallExpression */) && + !(operand.kind === 8 /* NumericLiteral */ && node.parent.kind === 172 /* PropertyAccessExpression */)) { emit(operand); return; } @@ -34321,16 +38804,24 @@ var ts; if (!isCurrentFileSystemExternalModule() || node.kind !== 69 /* Identifier */ || ts.nodeIsSynthesized(node)) { return false; } - var isVariableDeclarationOrBindingElement = node.parent && (node.parent.kind === 214 /* VariableDeclaration */ || node.parent.kind === 166 /* BindingElement */); + var isVariableDeclarationOrBindingElement = node.parent && (node.parent.kind === 218 /* VariableDeclaration */ || node.parent.kind === 169 /* BindingElement */); var targetDeclaration = isVariableDeclarationOrBindingElement ? node.parent : resolver.getReferencedValueDeclaration(node); return isSourceFileLevelDeclarationInSystemJsModule(targetDeclaration, /*isExported*/ true); } + function isNameOfExportedDeclarationInNonES6Module(node) { + if (modulekind === ts.ModuleKind.System || node.kind !== 69 /* Identifier */ || ts.nodeIsSynthesized(node)) { + return false; + } + return !exportEquals && exportSpecifiers && node.text in exportSpecifiers; + } function emitPrefixUnaryExpression(node) { - var exportChanged = (node.operator === 41 /* PlusPlusToken */ || node.operator === 42 /* MinusMinusToken */) && + var isPlusPlusOrMinusMinus = (node.operator === 41 /* PlusPlusToken */ + || node.operator === 42 /* MinusMinusToken */); + var externalExportChanged = isPlusPlusOrMinusMinus && isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.operand); - if (exportChanged) { + if (externalExportChanged) { // emit // ++x // as @@ -34339,6 +38830,11 @@ var ts; emitNodeWithoutSourceMap(node.operand); write("\", "); } + var internalExportChanged = isPlusPlusOrMinusMinus && + isNameOfExportedDeclarationInNonES6Module(node.operand); + if (internalExportChanged) { + emitAliasEqual(node.operand); + } write(ts.tokenToString(node.operator)); // In some cases, we need to emit a space between the operator and the operand. One obvious case // is when the operator is an identifier, like delete or typeof. We also need to do this for plus @@ -34352,7 +38848,7 @@ var ts; // the resulting expression a prefix increment operation. And in the second, it will make the resulting // expression a prefix increment whose operand is a plus expression - (++(+x)) // The same is true of minus of course. - if (node.operand.kind === 182 /* PrefixUnaryExpression */) { + if (node.operand.kind === 185 /* PrefixUnaryExpression */) { var operand = node.operand; if (node.operator === 35 /* PlusToken */ && (operand.operator === 35 /* PlusToken */ || operand.operator === 41 /* PlusPlusToken */)) { write(" "); @@ -34362,13 +38858,14 @@ var ts; } } emit(node.operand); - if (exportChanged) { + if (externalExportChanged) { write(")"); } } function emitPostfixUnaryExpression(node) { - var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.operand); - if (exportChanged) { + var externalExportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.operand); + var internalExportChanged = isNameOfExportedDeclarationInNonES6Module(node.operand); + if (externalExportChanged) { // export function returns the value that was passes as the second argument // however for postfix unary expressions result value should be the value before modification. // emit 'x++' as '(export('x', ++x) - 1)' and 'x--' as '(export('x', --x) + 1)' @@ -34384,6 +38881,16 @@ var ts; write(") + 1)"); } } + else if (internalExportChanged) { + emitAliasEqual(node.operand); + emit(node.operand); + if (node.operator === 41 /* PlusPlusToken */) { + write(" += 1"); + } + else { + write(" -= 1"); + } + } else { emit(node.operand); write(ts.tokenToString(node.operator)); @@ -34400,7 +38907,7 @@ var ts; * if we should also export the value after its it changed * - check if node is a source level declaration to emit it differently, * i.e non-exported variable statement 'var x = 1' is hoisted so - * we we emit variable statement 'var' should be dropped. + * when we emit variable statement 'var' should be dropped. */ function isSourceFileLevelDeclarationInSystemJsModule(node, isExported) { if (!node || !isCurrentFileSystemExternalModule()) { @@ -34408,8 +38915,8 @@ var ts; } var current = ts.getRootDeclaration(node).parent; while (current) { - if (current.kind === 251 /* SourceFile */) { - return !isExported || ((ts.getCombinedNodeFlags(node) & 2 /* Export */) !== 0); + if (current.kind === 256 /* SourceFile */) { + return !isExported || ((ts.getCombinedNodeFlags(node) & 1 /* Export */) !== 0); } else if (ts.isDeclaration(current)) { return false; @@ -34431,7 +38938,7 @@ var ts; if (ts.isElementAccessExpression(leftHandSideExpression)) { shouldEmitParentheses = true; write("("); - synthesizedLHS = ts.createSynthesizedNode(170 /* ElementAccessExpression */, /*startsOnNewLine*/ false); + synthesizedLHS = ts.createSynthesizedNode(173 /* ElementAccessExpression */, /*startsOnNewLine*/ false); var identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefineTempVariablesInPlace*/ false, /*shouldEmitCommaBeforeAssignment*/ false); synthesizedLHS.expression = identifier; if (leftHandSideExpression.argumentExpression.kind !== 8 /* NumericLiteral */ && @@ -34448,10 +38955,9 @@ var ts; else if (ts.isPropertyAccessExpression(leftHandSideExpression)) { shouldEmitParentheses = true; write("("); - synthesizedLHS = ts.createSynthesizedNode(169 /* PropertyAccessExpression */, /*startsOnNewLine*/ false); + synthesizedLHS = ts.createSynthesizedNode(172 /* PropertyAccessExpression */, /*startsOnNewLine*/ false); var identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefineTempVariablesInPlace*/ false, /*shouldEmitCommaBeforeAssignment*/ false); synthesizedLHS.expression = identifier; - synthesizedLHS.dotToken = leftHandSideExpression.dotToken; synthesizedLHS.name = leftHandSideExpression.name; write(", "); } @@ -34474,21 +38980,45 @@ var ts; write(")"); } } + function emitAliasEqual(name) { + for (var _a = 0, _b = exportSpecifiers[name.text]; _a < _b.length; _a++) { + var specifier = _b[_a]; + emitStart(specifier.name); + emitContainingModuleName(specifier); + if (languageVersion === 0 /* ES3 */ && name.text === "default") { + write('["default"]'); + } + else { + write("."); + emitNodeWithCommentsAndWithoutSourcemap(specifier.name); + } + emitEnd(specifier.name); + write(" = "); + } + return true; + } function emitBinaryExpression(node) { if (languageVersion < 2 /* ES6 */ && node.operatorToken.kind === 56 /* EqualsToken */ && - (node.left.kind === 168 /* ObjectLiteralExpression */ || node.left.kind === 167 /* ArrayLiteralExpression */)) { - emitDestructuring(node, node.parent.kind === 198 /* ExpressionStatement */); + (node.left.kind === 171 /* ObjectLiteralExpression */ || node.left.kind === 170 /* ArrayLiteralExpression */)) { + emitDestructuring(node, node.parent.kind === 202 /* ExpressionStatement */); } else { - var exportChanged = node.operatorToken.kind >= 56 /* FirstAssignment */ && - node.operatorToken.kind <= 68 /* LastAssignment */ && + var isAssignment = ts.isAssignmentOperator(node.operatorToken.kind); + var externalExportChanged = isAssignment && isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.left); - if (exportChanged) { + if (externalExportChanged) { // emit assignment 'x y' as 'exports("x", x y)' write(exportFunctionForFile + "(\""); emitNodeWithoutSourceMap(node.left); write("\", "); } + var internalExportChanged = isAssignment && + isNameOfExportedDeclarationInNonES6Module(node.left); + if (internalExportChanged) { + // export { foo } + // emit foo = 2 as exports.foo = foo = 2 + emitAliasEqual(node.left); + } if (node.operatorToken.kind === 38 /* AsteriskAsteriskToken */ || node.operatorToken.kind === 60 /* AsteriskAsteriskEqualsToken */) { // Downleveled emit exponentiation operator using Math.pow emitExponentiationOperator(node); @@ -34508,7 +39038,7 @@ var ts; emit(node.right); decreaseIndentIf(indentedBeforeOperator, indentedAfterOperator); } - if (exportChanged) { + if (externalExportChanged) { write(")"); } } @@ -34542,7 +39072,7 @@ var ts; } } function isSingleLineEmptyBlock(node) { - if (node && node.kind === 195 /* Block */) { + if (node && node.kind === 199 /* Block */) { var block = node; return block.statements.length === 0 && nodeEndIsOnSameLineAsNodeStart(block, block); } @@ -34556,12 +39086,12 @@ var ts; } emitToken(15 /* OpenBraceToken */, node.pos); increaseIndent(); - if (node.kind === 222 /* ModuleBlock */) { - ts.Debug.assert(node.parent.kind === 221 /* ModuleDeclaration */); + if (node.kind === 226 /* ModuleBlock */) { + ts.Debug.assert(node.parent.kind === 225 /* ModuleDeclaration */); emitCaptureThisForNodeIfNecessary(node.parent); } emitLines(node.statements); - if (node.kind === 222 /* ModuleBlock */) { + if (node.kind === 226 /* ModuleBlock */) { emitTempDeclarations(/*newLine*/ true); } decreaseIndent(); @@ -34569,7 +39099,7 @@ var ts; emitToken(16 /* CloseBraceToken */, node.statements.end); } function emitEmbeddedStatement(node) { - if (node.kind === 195 /* Block */) { + if (node.kind === 199 /* Block */) { write(" "); emit(node); } @@ -34581,7 +39111,7 @@ var ts; } } function emitExpressionStatement(node) { - emitParenthesizedIf(node.expression, /*parenthesized*/ node.expression.kind === 177 /* ArrowFunction */); + emitParenthesizedIf(node.expression, /*parenthesized*/ node.expression.kind === 180 /* ArrowFunction */); write(";"); } function emitIfStatement(node) { @@ -34594,7 +39124,7 @@ var ts; if (node.elseStatement) { writeLine(); emitToken(80 /* ElseKeyword */, node.thenStatement.end); - if (node.elseStatement.kind === 199 /* IfStatement */) { + if (node.elseStatement.kind === 203 /* IfStatement */) { write(" "); emit(node.elseStatement); } @@ -34614,7 +39144,7 @@ var ts; else { emitNormalLoopBody(node, /*emitAsEmbeddedStatement*/ true); } - if (node.statement.kind === 195 /* Block */) { + if (node.statement.kind === 199 /* Block */) { write(" "); } else { @@ -34648,7 +39178,7 @@ var ts; // variables in variable declaration list were already hoisted return false; } - if (convertedLoopState && (ts.getCombinedNodeFlags(decl) & 24576 /* BlockScoped */) === 0) { + if (convertedLoopState && (ts.getCombinedNodeFlags(decl) & 3072 /* BlockScoped */) === 0) { // we are inside a converted loop - this can only happen in downlevel scenarios // record names for all variable declarations for (var _a = 0, _b = decl.declarations; _a < _b.length; _a++) { @@ -34704,7 +39234,7 @@ var ts; } else { var loop = convertLoopBody(node); - if (node.parent.kind === 210 /* LabeledStatement */) { + if (node.parent.kind === 214 /* LabeledStatement */) { // if parent of the loop was labeled statement - attach the label to loop skipping converted loop body emitLabelAndColon(node.parent); } @@ -34715,18 +39245,18 @@ var ts; var functionName = makeUniqueName("_loop"); var loopInitializer; switch (node.kind) { - case 202 /* ForStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: + case 206 /* ForStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: var initializer = node.initializer; - if (initializer && initializer.kind === 215 /* VariableDeclarationList */) { + if (initializer && initializer.kind === 219 /* VariableDeclarationList */) { loopInitializer = node.initializer; } break; } var loopParameters; var loopOutParameters; - if (loopInitializer && (ts.getCombinedNodeFlags(loopInitializer) & 24576 /* BlockScoped */)) { + if (loopInitializer && (ts.getCombinedNodeFlags(loopInitializer) & 3072 /* BlockScoped */)) { // if loop initializer contains block scoped variables - they should be passed to converted loop body as parameters loopParameters = []; for (var _a = 0, _b = loopInitializer.declarations; _a < _b.length; _a++) { @@ -34734,7 +39264,7 @@ var ts; processVariableDeclaration(varDeclaration.name); } } - var bodyIsBlock = node.statement.kind === 195 /* Block */; + var bodyIsBlock = node.statement.kind === 199 /* Block */; var paramList = loopParameters ? loopParameters.join(", ") : ""; writeLine(); write("var " + functionName + " = function(" + paramList + ")"); @@ -34829,12 +39359,12 @@ var ts; // Don't initialize seen unless we have at least one element. // Emit a comma to separate for all but the first element. if (!seen) { - seen = {}; + seen = ts.createMap(); } else { write(", "); } - if (!ts.hasProperty(seen, id.text)) { + if (!(id.text in seen)) { emit(id); seen[id.text] = id.text; } @@ -34876,7 +39406,7 @@ var ts; if (emitAsEmbeddedStatement) { emitEmbeddedStatement(node.statement); } - else if (node.statement.kind === 195 /* Block */) { + else if (node.statement.kind === 199 /* Block */) { emitLines(node.statement.statements); } else { @@ -34917,7 +39447,8 @@ var ts; } // loop is considered simple if it does not have any return statements or break\continue that transfer control outside of the loop // simple loops are emitted as just 'loop()'; - var isSimpleLoop = !loop.state.nonLocalJumps && + // NOTE: if loop uses only 'continue' it still will be emitted as simple loop + var isSimpleLoop = !(loop.state.nonLocalJumps & ~4 /* Continue */) && !loop.state.labeledNonLocalBreaks && !loop.state.labeledNonLocalContinues; var loopResult = makeUniqueName("state"); @@ -34952,10 +39483,6 @@ var ts; write("if (" + loopResult + " === \"break\") break;"); writeLine(); } - if (loop.state.nonLocalJumps & 4 /* Continue */) { - write("if (" + loopResult + " === \"continue\") continue;"); - writeLine(); - } // in case of labeled breaks emit code that either breaks to some known label inside outer loop or delegates jump decision to outer loop emitDispatchTableForLabeledJumps(loopResult, loop.state, convertedLoopState); } @@ -35010,7 +39537,7 @@ var ts; var endPos = emitToken(86 /* ForKeyword */, node.pos); write(" "); endPos = emitToken(17 /* OpenParenToken */, endPos); - if (node.initializer && node.initializer.kind === 215 /* VariableDeclarationList */) { + if (node.initializer && node.initializer.kind === 219 /* VariableDeclarationList */) { var variableDeclarationList = node.initializer; var startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList); if (startIsEmitted) { @@ -35036,7 +39563,7 @@ var ts; } } function emitForInOrForOfStatement(node) { - if (languageVersion < 2 /* ES6 */ && node.kind === 204 /* ForOfStatement */) { + if (languageVersion < 2 /* ES6 */ && node.kind === 208 /* ForOfStatement */) { emitLoop(node, emitDownLevelForOfStatementWorker); } else { @@ -35047,7 +39574,7 @@ var ts; var endPos = emitToken(86 /* ForKeyword */, node.pos); write(" "); endPos = emitToken(17 /* OpenParenToken */, endPos); - if (node.initializer.kind === 215 /* VariableDeclarationList */) { + if (node.initializer.kind === 219 /* VariableDeclarationList */) { var variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length >= 1) { tryEmitStartOfVariableDeclarationList(variableDeclarationList); @@ -35057,7 +39584,7 @@ var ts; else { emit(node.initializer); } - if (node.kind === 203 /* ForInStatement */) { + if (node.kind === 207 /* ForInStatement */) { write(" in "); } else { @@ -35147,7 +39674,7 @@ var ts; // let v = _a[_i]; var rhsIterationValue = createElementAccessExpression(rhsReference, counter); emitStart(node.initializer); - if (node.initializer.kind === 215 /* VariableDeclarationList */) { + if (node.initializer.kind === 219 /* VariableDeclarationList */) { write("var "); var variableDeclarationList = node.initializer; if (variableDeclarationList.declarations.length > 0) { @@ -35177,7 +39704,7 @@ var ts; // Initializer is an expression. Emit the expression in the body, so that it's // evaluated on every iteration. var assignmentExpression = createBinaryExpression(node.initializer, 56 /* EqualsToken */, rhsIterationValue, /*startsOnNewLine*/ false); - if (node.initializer.kind === 167 /* ArrayLiteralExpression */ || node.initializer.kind === 168 /* ObjectLiteralExpression */) { + if (node.initializer.kind === 170 /* ArrayLiteralExpression */ || node.initializer.kind === 171 /* ObjectLiteralExpression */) { // This is a destructuring pattern, so call emitDestructuring instead of emit. Calling emit will not work, because it will cause // the BinaryExpression to be passed in instead of the expression statement, which will cause emitDestructuring to crash. emitDestructuring(assignmentExpression, /*isAssignmentExpressionStatement*/ true, /*value*/ undefined); @@ -35205,7 +39732,7 @@ var ts; // it is possible if either // - break\continue is statement labeled and label is located inside the converted loop // - break\continue is non-labeled and located in non-converted loop\switch statement - var jump = node.kind === 206 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; + var jump = node.kind === 210 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels[node.label.text]) || (!node.label && (convertedLoopState.allowedNonLabeledJumps & jump)); if (!canUseBreakOrContinue) { @@ -35213,18 +39740,19 @@ var ts; // explicit exit from loop -> copy out parameters copyLoopOutParameters(convertedLoopState, 1 /* ToOutParameter */, /*emitAsStatements*/ false); if (!node.label) { - if (node.kind === 206 /* BreakStatement */) { + if (node.kind === 210 /* BreakStatement */) { convertedLoopState.nonLocalJumps |= 2 /* Break */; write("\"break\";"); } else { convertedLoopState.nonLocalJumps |= 4 /* Continue */; + // note: return value is emitted only to simplify debugging, call to converted loop body does not do any dispatching on it. write("\"continue\";"); } } else { var labelMarker = void 0; - if (node.kind === 206 /* BreakStatement */) { + if (node.kind === 210 /* BreakStatement */) { labelMarker = "break-" + node.label.text; setLabeledJump(convertedLoopState, /*isBreak*/ true, node.label.text, labelMarker); } @@ -35237,7 +39765,7 @@ var ts; return; } } - emitToken(node.kind === 206 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */, node.pos); + emitToken(node.kind === 210 /* BreakStatement */ ? 70 /* BreakKeyword */ : 75 /* ContinueKeyword */, node.pos); emitOptional(" ", node.label); write(";"); } @@ -35303,7 +39831,7 @@ var ts; ts.getLineOfLocalPositionFromLineMap(currentLineMap, ts.skipTrivia(currentText, node2.pos)); } function emitCaseOrDefaultClause(node) { - if (node.kind === 244 /* CaseClause */) { + if (node.kind === 249 /* CaseClause */) { write("case "); emit(node.expression); write(":"); @@ -35360,7 +39888,7 @@ var ts; } if (convertedLoopState) { if (!convertedLoopState.labels) { - convertedLoopState.labels = {}; + convertedLoopState.labels = ts.createMap(); } convertedLoopState.labels[node.label.text] = node.label.text; } @@ -35372,7 +39900,7 @@ var ts; function getContainingModule(node) { do { node = node.parent; - } while (node && node.kind !== 221 /* ModuleDeclaration */); + } while (node && node.kind !== 225 /* ModuleDeclaration */); return node; } function emitContainingModuleName(node) { @@ -35381,13 +39909,13 @@ var ts; } function emitModuleMemberName(node) { emitStart(node.name); - if (ts.getCombinedNodeFlags(node) & 2 /* Export */) { + if (ts.getCombinedNodeFlags(node) & 1 /* Export */) { var container = getContainingModule(node); if (container) { write(getGeneratedNameForNode(container)); write("."); } - else if (modulekind !== 5 /* ES6 */ && modulekind !== 4 /* System */) { + else if (modulekind !== ts.ModuleKind.ES6 && modulekind !== ts.ModuleKind.System) { write("exports."); } } @@ -35397,19 +39925,19 @@ var ts; function createVoidZero() { var zero = ts.createSynthesizedNode(8 /* NumericLiteral */); zero.text = "0"; - var result = ts.createSynthesizedNode(180 /* VoidExpression */); + var result = ts.createSynthesizedNode(183 /* VoidExpression */); result.expression = zero; return result; } function emitEs6ExportDefaultCompat(node) { - if (node.parent.kind === 251 /* SourceFile */) { - ts.Debug.assert(!!(node.flags & 512 /* Default */) || node.kind === 230 /* ExportAssignment */); + if (node.parent.kind === 256 /* SourceFile */) { + ts.Debug.assert(!!(node.flags & 512 /* Default */) || node.kind === 235 /* ExportAssignment */); // only allow export default at a source file level - if (modulekind === 1 /* CommonJS */ || modulekind === 2 /* AMD */ || modulekind === 3 /* UMD */) { + if (modulekind === ts.ModuleKind.CommonJS || modulekind === ts.ModuleKind.AMD || modulekind === ts.ModuleKind.UMD) { if (!isEs6Module) { if (languageVersion !== 0 /* ES3 */) { // default value of configurable, enumerable, writable are `false`. - write("Object.defineProperty(exports, \"__esModule\", { value: true });"); + write('Object.defineProperty(exports, "__esModule", { value: true });'); writeLine(); } else { @@ -35421,11 +39949,11 @@ var ts; } } function emitExportMemberAssignment(node) { - if (node.flags & 2 /* Export */) { + if (node.flags & 1 /* Export */) { writeLine(); emitStart(node); // emit call to exporter only for top level nodes - if (modulekind === 4 /* System */ && node.parent === currentSourceFile) { + if (modulekind === ts.ModuleKind.System && node.parent === currentSourceFile) { // emit export default as // export("default", ) write(exportFunctionForFile + "(\""); @@ -35443,7 +39971,7 @@ var ts; if (node.flags & 512 /* Default */) { emitEs6ExportDefaultCompat(node); if (languageVersion === 0 /* ES3 */) { - write("exports[\"default\"]"); + write('exports["default"]'); } else { write("exports.default"); @@ -35460,10 +39988,10 @@ var ts; } } function emitExportMemberAssignments(name) { - if (modulekind === 4 /* System */) { + if (modulekind === ts.ModuleKind.System) { return; } - if (!exportEquals && exportSpecifiers && ts.hasProperty(exportSpecifiers, name.text)) { + if (!exportEquals && exportSpecifiers && name.text in exportSpecifiers) { for (var _a = 0, _b = exportSpecifiers[name.text]; _a < _b.length; _a++) { var specifier = _b[_a]; writeLine(); @@ -35479,7 +40007,7 @@ var ts; } } function emitExportSpecifierInSystemModule(specifier) { - ts.Debug.assert(modulekind === 4 /* System */); + ts.Debug.assert(modulekind === ts.ModuleKind.System); if (!resolver.getReferencedValueDeclaration(specifier.propertyName || specifier.name) && !resolver.isValueAliasDeclaration(specifier)) { return; } @@ -35509,7 +40037,7 @@ var ts; emitNodeWithCommentsAndWithoutSourcemap(name); write("\", "); } - var isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === 214 /* VariableDeclaration */ || name.parent.kind === 166 /* BindingElement */); + var isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === 218 /* VariableDeclaration */ || name.parent.kind === 169 /* BindingElement */); // If this is first var declaration, we need to start at var/let/const keyword instead // otherwise use nodeForSourceMap as the start position emitStart(isFirstVariableDeclaration(nodeForSourceMap) ? nodeForSourceMap.parent : nodeForSourceMap); @@ -35543,8 +40071,8 @@ var ts; return identifier; } function isFirstVariableDeclaration(root) { - return root.kind === 214 /* VariableDeclaration */ && - root.parent.kind === 215 /* VariableDeclarationList */ && + return root.kind === 218 /* VariableDeclaration */ && + root.parent.kind === 219 /* VariableDeclarationList */ && root.parent.declarations[0] === root; } function emitDestructuring(root, isAssignmentExpressionStatement, value) { @@ -35554,15 +40082,15 @@ var ts; // Also temporary variables should be explicitly allocated for source level declarations when module target is system // because actual variable declarations are hoisted var canDefineTempVariablesInPlace = false; - if (root.kind === 214 /* VariableDeclaration */) { - var isExported = ts.getCombinedNodeFlags(root) & 2 /* Export */; + if (root.kind === 218 /* VariableDeclaration */) { + var isExported = ts.getCombinedNodeFlags(root) & 1 /* Export */; var isSourceLevelForSystemModuleKind = shouldHoistDeclarationInSystemJsModule(root); canDefineTempVariablesInPlace = !isExported && !isSourceLevelForSystemModuleKind; } - else if (root.kind === 139 /* Parameter */) { + else if (root.kind === 142 /* Parameter */) { canDefineTempVariablesInPlace = true; } - if (root.kind === 184 /* BinaryExpression */) { + if (root.kind === 187 /* BinaryExpression */) { emitAssignmentExpression(root); } else { @@ -35597,14 +40125,14 @@ var ts; // If the temporary variable needs to be emitted use the source Map node for assignment of that statement value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode); // Return the expression 'value === void 0 ? defaultValue : value' - var equals = ts.createSynthesizedNode(184 /* BinaryExpression */); + var equals = ts.createSynthesizedNode(187 /* BinaryExpression */); equals.left = value; equals.operatorToken = ts.createSynthesizedNode(32 /* EqualsEqualsEqualsToken */); equals.right = createVoidZero(); return createConditionalExpression(equals, defaultValue, value); } function createConditionalExpression(condition, whenTrue, whenFalse) { - var cond = ts.createSynthesizedNode(185 /* ConditionalExpression */); + var cond = ts.createSynthesizedNode(188 /* ConditionalExpression */); cond.condition = condition; cond.questionToken = ts.createSynthesizedNode(53 /* QuestionToken */); cond.whenTrue = whenTrue; @@ -35619,7 +40147,7 @@ var ts; } function createPropertyAccessForDestructuringProperty(object, propName) { var index; - var nameIsComputed = propName.kind === 137 /* ComputedPropertyName */; + var nameIsComputed = propName.kind === 140 /* ComputedPropertyName */; if (nameIsComputed) { // TODO to handle when we look into sourcemaps for computed properties, for now use propName index = ensureIdentifier(propName.expression, /*reuseIdentifierExpressions*/ false, propName); @@ -35639,7 +40167,7 @@ var ts; : createElementAccessExpression(object, index); } function createSliceCall(value, sliceIndex) { - var call = ts.createSynthesizedNode(171 /* CallExpression */); + var call = ts.createSynthesizedNode(174 /* CallExpression */); var sliceIdentifier = ts.createSynthesizedNode(69 /* Identifier */); sliceIdentifier.text = "slice"; call.expression = createPropertyAccessExpression(value, sliceIdentifier); @@ -35652,15 +40180,15 @@ var ts; if (properties.length !== 1) { // For anything but a single element destructuring we need to generate a temporary // to ensure value is evaluated exactly once. - // When doing so we want to hightlight the passed in source map node since thats the one needing this temp assignment + // When doing so we want to highlight the passed in source map node since thats the one needing this temp assignment value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode); } for (var _a = 0, properties_5 = properties; _a < properties_5.length; _a++) { var p = properties_5[_a]; - if (p.kind === 248 /* PropertyAssignment */ || p.kind === 249 /* ShorthandPropertyAssignment */) { + if (p.kind === 253 /* PropertyAssignment */ || p.kind === 254 /* ShorthandPropertyAssignment */) { var propName = p.name; - var target_1 = p.kind === 249 /* ShorthandPropertyAssignment */ ? p : p.initializer || propName; - // Assignment for target = value.propName should highligh whole property, hence use p as source map node + var target_1 = p.kind === 254 /* ShorthandPropertyAssignment */ ? p : p.initializer || propName; + // Assignment for target = value.propName should highlight whole property, hence use p as source map node emitDestructuringAssignment(target_1, createPropertyAccessForDestructuringProperty(value, propName), p); } } @@ -35670,14 +40198,14 @@ var ts; if (elements.length !== 1) { // For anything but a single element destructuring we need to generate a temporary // to ensure value is evaluated exactly once. - // When doing so we want to hightlight the passed in source map node since thats the one needing this temp assignment + // When doing so we want to highlight the passed in source map node since thats the one needing this temp assignment value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode); } for (var i = 0; i < elements.length; i++) { var e = elements[i]; - if (e.kind !== 190 /* OmittedExpression */) { - // Assignment for target = value.propName should highligh whole property, hence use e as source map node - if (e.kind !== 188 /* SpreadElementExpression */) { + if (e.kind !== 193 /* OmittedExpression */) { + // Assignment for target = value.propName should highlight whole property, hence use e as source map node + if (e.kind !== 191 /* SpreadElementExpression */) { emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i)), e); } else if (i === elements.length - 1) { @@ -35688,20 +40216,20 @@ var ts; } function emitDestructuringAssignment(target, value, sourceMapNode) { // When emitting target = value use source map node to highlight, including any temporary assignments needed for this - if (target.kind === 249 /* ShorthandPropertyAssignment */) { + if (target.kind === 254 /* ShorthandPropertyAssignment */) { if (target.objectAssignmentInitializer) { value = createDefaultValueCheck(value, target.objectAssignmentInitializer, sourceMapNode); } target = target.name; } - else if (target.kind === 184 /* BinaryExpression */ && target.operatorToken.kind === 56 /* EqualsToken */) { + else if (target.kind === 187 /* BinaryExpression */ && target.operatorToken.kind === 56 /* EqualsToken */) { value = createDefaultValueCheck(value, target.right, sourceMapNode); target = target.left; } - if (target.kind === 168 /* ObjectLiteralExpression */) { + if (target.kind === 171 /* ObjectLiteralExpression */) { emitObjectLiteralAssignment(target, value, sourceMapNode); } - else if (target.kind === 167 /* ArrayLiteralExpression */) { + else if (target.kind === 170 /* ArrayLiteralExpression */) { emitArrayLiteralAssignment(target, value, sourceMapNode); } else { @@ -35723,7 +40251,7 @@ var ts; emitDestructuringAssignment(target, value, ts.nodeIsSynthesized(root) ? target : root); } else { - if (root.parent.kind !== 175 /* ParenthesizedExpression */) { + if (root.parent.kind !== 178 /* ParenthesizedExpression */) { write("("); } // Temporary assignment needed to emit root should highlight whole binary expression @@ -35732,7 +40260,7 @@ var ts; emitDestructuringAssignment(target, value, root); write(", "); emit(value); - if (root.parent.kind !== 175 /* ParenthesizedExpression */) { + if (root.parent.kind !== 178 /* ParenthesizedExpression */) { write(")"); } } @@ -35760,12 +40288,12 @@ var ts; } for (var i = 0; i < numElements; i++) { var element = elements[i]; - if (pattern.kind === 164 /* ObjectBindingPattern */) { + if (pattern.kind === 167 /* ObjectBindingPattern */) { // Rewrite element to a declaration with an initializer that fetches property var propName = element.propertyName || element.name; emitBindingElement(element, createPropertyAccessForDestructuringProperty(value, propName)); } - else if (element.kind !== 190 /* OmittedExpression */) { + else if (element.kind !== 193 /* OmittedExpression */) { if (!element.dotDotDotToken) { // Rewrite element to a declaration that accesses array element at index i emitBindingElement(element, createElementAccessExpression(value, createNumericLiteral(i))); @@ -35784,12 +40312,26 @@ var ts; } function emitVariableDeclaration(node) { if (ts.isBindingPattern(node.name)) { - if (languageVersion < 2 /* ES6 */) { - emitDestructuring(node, /*isAssignmentExpressionStatement*/ false); - } - else { + var isExported = ts.getCombinedNodeFlags(node) & 1 /* Export */; + if (languageVersion >= 2 /* ES6 */ && (!isExported || modulekind === ts.ModuleKind.ES6)) { + // emit ES6 destructuring only if target module is ES6 or variable is not exported + // exported variables in CJS/AMD are prefixed with 'exports.' so result javascript { exports.toString } = 1; is illegal + var isTopLevelDeclarationInSystemModule = modulekind === ts.ModuleKind.System && + shouldHoistVariable(node, /*checkIfSourceFileLevelDecl*/ true); + if (isTopLevelDeclarationInSystemModule) { + // In System modules top level variables are hoisted + // so variable declarations with destructuring are turned into destructuring assignments. + // As a result, they will need parentheses to disambiguate object binding assignments from blocks. + write("("); + } emit(node.name); emitOptional(" = ", node.initializer); + if (isTopLevelDeclarationInSystemModule) { + write(")"); + } + } + else { + emitDestructuring(node, /*isAssignmentExpressionStatement*/ false); } } else { @@ -35825,12 +40367,12 @@ var ts; var isCapturedInFunction = flags & 131072 /* CapturedBlockScopedBinding */; var isDeclaredInLoop = flags & 262144 /* BlockScopedBindingInLoop */; var emittedAsTopLevel = ts.isBlockScopedContainerTopLevel(container) || - (isCapturedInFunction && isDeclaredInLoop && container.kind === 195 /* Block */ && ts.isIterationStatement(container.parent, /*lookInLabeledStatements*/ false)); - var emittedAsNestedLetDeclaration = ts.getCombinedNodeFlags(node) & 8192 /* Let */ && + (isCapturedInFunction && isDeclaredInLoop && container.kind === 199 /* Block */ && ts.isIterationStatement(container.parent, /*lookInLabeledStatements*/ false)); + var emittedAsNestedLetDeclaration = ts.getCombinedNodeFlags(node) & 1024 /* Let */ && !emittedAsTopLevel; var emitExplicitInitializer = emittedAsNestedLetDeclaration && - container.kind !== 203 /* ForInStatement */ && - container.kind !== 204 /* ForOfStatement */ && + container.kind !== 207 /* ForInStatement */ && + container.kind !== 208 /* ForOfStatement */ && (!resolver.isDeclarationWithCollidingName(node) || (isDeclaredInLoop && !isCapturedInFunction && !ts.isIterationStatement(container, /*lookInLabeledStatements*/ false))); if (emitExplicitInitializer) { @@ -35851,7 +40393,7 @@ var ts; } } function emitExportVariableAssignments(node) { - if (node.kind === 190 /* OmittedExpression */) { + if (node.kind === 193 /* OmittedExpression */) { return; } var name = node.name; @@ -35863,13 +40405,13 @@ var ts; } } function isES6ExportedDeclaration(node) { - return !!(node.flags & 2 /* Export */) && - modulekind === 5 /* ES6 */ && - node.parent.kind === 251 /* SourceFile */; + return !!(node.flags & 1 /* Export */) && + modulekind === ts.ModuleKind.ES6 && + node.parent.kind === 256 /* SourceFile */; } function emitVariableStatement(node) { var startIsEmitted = false; - if (node.flags & 2 /* Export */) { + if (node.flags & 1 /* Export */) { if (isES6ExportedDeclaration(node)) { // Exported ES6 module member write("export "); @@ -35889,14 +40431,14 @@ var ts; write(";"); } } - if (modulekind !== 5 /* ES6 */ && node.parent === currentSourceFile) { + if (modulekind !== ts.ModuleKind.ES6 && node.parent === currentSourceFile) { ts.forEach(node.declarationList.declarations, emitExportVariableAssignments); } } function shouldEmitLeadingAndTrailingCommentsForVariableStatement(node) { // If we're not exporting the variables, there's nothing special here. // Always emit comments for these nodes. - if (!(node.flags & 2 /* Export */)) { + if (!(node.flags & 1 /* Export */)) { return true; } // If we are exporting, but it's a top-level ES6 module exports, @@ -35916,12 +40458,12 @@ var ts; function emitParameter(node) { if (languageVersion < 2 /* ES6 */) { if (ts.isBindingPattern(node.name)) { - var name_27 = createTempVariable(0 /* Auto */); + var name_29 = createTempVariable(0 /* Auto */); if (!tempParameters) { tempParameters = []; } - tempParameters.push(name_27); - emit(name_27); + tempParameters.push(name_29); + emit(name_29); } else { emit(node.name); @@ -35962,8 +40504,10 @@ var ts; emit(initializer); } write(";"); - tempIndex_1++; } + // Regardless of whether we will emit a var declaration for the binding pattern, we generate the temporary + // variable for the parameter (see: emitParameter) + tempIndex_1++; } else if (initializer) { writeLine(); @@ -35984,13 +40528,14 @@ var ts; } } function emitRestParameter(node) { - if (languageVersion < 2 /* ES6 */ && ts.hasRestParameter(node)) { - var restIndex = node.parameters.length - 1; - var restParam = node.parameters[restIndex]; + if (languageVersion < 2 /* ES6 */ && ts.hasDeclaredRestParameter(node)) { + var restParam = node.parameters[node.parameters.length - 1]; // A rest parameter cannot have a binding pattern, so let's just ignore it if it does. if (ts.isBindingPattern(restParam.name)) { return; } + var skipThisCount = node.parameters.length && node.parameters[0].name.originalKeywordKind === 97 /* ThisKeyword */ ? 1 : 0; + var restIndex = node.parameters.length - 1 - skipThisCount; var tempName = createTempVariable(268435456 /* _i */).text; writeLine(); emitLeadingComments(restParam); @@ -36026,12 +40571,12 @@ var ts; } } function emitAccessor(node) { - write(node.kind === 146 /* GetAccessor */ ? "get " : "set "); + write(node.kind === 149 /* GetAccessor */ ? "get " : "set "); emit(node.name); emitSignatureAndBody(node); } function shouldEmitAsArrowFunction(node) { - return node.kind === 177 /* ArrowFunction */ && languageVersion >= 2 /* ES6 */; + return node.kind === 180 /* ArrowFunction */ && languageVersion >= 2 /* ES6 */; } function emitDeclarationName(node) { if (node.name) { @@ -36042,13 +40587,13 @@ var ts; } } function shouldEmitFunctionName(node) { - if (node.kind === 176 /* FunctionExpression */) { + if (node.kind === 179 /* FunctionExpression */) { // Emit name if one is present return !!node.name; } - if (node.kind === 216 /* FunctionDeclaration */) { + if (node.kind === 220 /* FunctionDeclaration */) { // Emit name if one is present, or emit generated name in down-level case (for export default case) - return !!node.name || modulekind !== 5 /* ES6 */; + return !!node.name || modulekind !== ts.ModuleKind.ES6; } } function emitFunctionDeclaration(node) { @@ -36058,12 +40603,12 @@ var ts; // TODO (yuisu) : we should not have special cases to condition emitting comments // but have one place to fix check for these conditions. var kind = node.kind, parent = node.parent; - if (kind !== 144 /* MethodDeclaration */ && - kind !== 143 /* MethodSignature */ && + if (kind !== 147 /* MethodDeclaration */ && + kind !== 146 /* MethodSignature */ && parent && - parent.kind !== 248 /* PropertyAssignment */ && - parent.kind !== 171 /* CallExpression */ && - parent.kind !== 167 /* ArrayLiteralExpression */) { + parent.kind !== 253 /* PropertyAssignment */ && + parent.kind !== 174 /* CallExpression */ && + parent.kind !== 170 /* ArrayLiteralExpression */) { // 1. Methods will emit comments at their assignment declaration sites. // // 2. If the function is a property of object literal, emitting leading-comments @@ -36102,11 +40647,13 @@ var ts; emitDeclarationName(node); } emitSignatureAndBody(node); - if (modulekind !== 5 /* ES6 */ && kind === 216 /* FunctionDeclaration */ && parent === currentSourceFile && node.name) { + if (modulekind !== ts.ModuleKind.ES6 && kind === 220 /* FunctionDeclaration */ && parent === currentSourceFile && node.name) { emitExportMemberAssignments(node.name); } emitEnd(node); - if (kind !== 144 /* MethodDeclaration */ && kind !== 143 /* MethodSignature */) { + if (kind !== 147 /* MethodDeclaration */ && + kind !== 146 /* MethodSignature */ && + kind !== 180 /* ArrowFunction */) { emitTrailingComments(node); } } @@ -36123,8 +40670,9 @@ var ts; write("("); if (node) { var parameters = node.parameters; - var omitCount = languageVersion < 2 /* ES6 */ && ts.hasRestParameter(node) ? 1 : 0; - emitList(parameters, 0, parameters.length - omitCount, /*multiLine*/ false, /*trailingComma*/ false); + var skipCount = node.parameters.length && node.parameters[0].name.originalKeywordKind === 97 /* ThisKeyword */ ? 1 : 0; + var omitCount = languageVersion < 2 /* ES6 */ && ts.hasDeclaredRestParameter(node) ? 1 : 0; + emitList(parameters, skipCount, parameters.length - omitCount - skipCount, /*multiLine*/ false, /*trailingComma*/ false); } write(")"); decreaseIndent(); @@ -36139,7 +40687,7 @@ var ts; } function emitAsyncFunctionBodyForES6(node) { var promiseConstructor = ts.getEntityNameFromTypeNode(node.type); - var isArrowFunction = node.kind === 177 /* ArrowFunction */; + var isArrowFunction = node.kind === 180 /* ArrowFunction */; var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192 /* CaptureArguments */) !== 0; // An async function is emit as an outer function that calls an inner // generator function. To preserve lexical bindings, we pass the current @@ -36235,7 +40783,7 @@ var ts; else { write(", void 0, "); } - if (!promiseConstructor || (compilerOptions.noCustomAsyncPromise && languageVersion >= 2 /* ES6 */)) { + if (languageVersion >= 2 /* ES6 */ || !promiseConstructor) { write("void 0"); } else { @@ -36261,7 +40809,7 @@ var ts; write(" { }"); } else { - if (node.body.kind === 195 /* Block */) { + if (node.body.kind === 199 /* Block */) { emitBlockFunctionBody(node, node.body); } else { @@ -36320,10 +40868,10 @@ var ts; write(" "); // Unwrap all type assertions. var current = body; - while (current.kind === 174 /* TypeAssertionExpression */) { + while (current.kind === 177 /* TypeAssertionExpression */) { current = current.expression; } - emitParenthesizedIf(body, current.kind === 168 /* ObjectLiteralExpression */); + emitParenthesizedIf(body, current.kind === 171 /* ObjectLiteralExpression */); } function emitDownLevelExpressionFunctionBody(node, body) { write(" {"); @@ -36408,13 +40956,13 @@ var ts; return undefined; } var statement = statements[index]; - if (statement.kind === 198 /* ExpressionStatement */) { + if (statement.kind === 202 /* ExpressionStatement */) { return ts.isSuperCallExpression(statement.expression) ? statement : undefined; } } function emitParameterPropertyAssignments(node) { ts.forEach(node.parameters, function (param) { - if (param.flags & 56 /* AccessibilityModifier */) { + if (param.flags & 92 /* ParameterPropertyModifier */) { writeLine(); emitStart(param); emitStart(param.name); @@ -36437,7 +40985,7 @@ var ts; emitNodeWithCommentsAndWithoutSourcemap(memberName); write("]"); } - else if (memberName.kind === 137 /* ComputedPropertyName */) { + else if (memberName.kind === 140 /* ComputedPropertyName */) { emitComputedPropertyName(memberName); } else { @@ -36449,7 +40997,7 @@ var ts; var properties = []; for (var _a = 0, _b = node.members; _a < _b.length; _a++) { var member = _b[_a]; - if (member.kind === 142 /* PropertyDeclaration */ && isStatic === ((member.flags & 64 /* Static */) !== 0) && member.initializer) { + if (member.kind === 145 /* PropertyDeclaration */ && isStatic === ((member.flags & 32 /* Static */) !== 0) && member.initializer) { properties.push(member); } } @@ -36467,10 +41015,10 @@ var ts; emitStart(property); emitStart(property.name); if (receiver) { - emit(receiver); + write(receiver); } else { - if (property.flags & 64 /* Static */) { + if (property.flags & 32 /* Static */) { emitDeclarationName(node); } else { @@ -36489,11 +41037,11 @@ var ts; } function emitMemberFunctionsForES5AndLower(node) { ts.forEach(node.members, function (member) { - if (member.kind === 194 /* SemicolonClassElement */) { + if (member.kind === 198 /* SemicolonClassElement */) { writeLine(); write(";"); } - else if (member.kind === 144 /* MethodDeclaration */ || node.kind === 143 /* MethodSignature */) { + else if (member.kind === 147 /* MethodDeclaration */ || node.kind === 146 /* MethodSignature */) { if (!member.body) { return emitCommentsOnNotEmittedNode(member); } @@ -36510,7 +41058,7 @@ var ts; write(";"); emitTrailingComments(member); } - else if (member.kind === 146 /* GetAccessor */ || member.kind === 147 /* SetAccessor */) { + else if (member.kind === 149 /* GetAccessor */ || member.kind === 150 /* SetAccessor */) { var accessors = ts.getAllAccessorDeclarations(node.members, member); if (member === accessors.firstAccessor) { writeLine(); @@ -36560,22 +41108,22 @@ var ts; function emitMemberFunctionsForES6AndHigher(node) { for (var _a = 0, _b = node.members; _a < _b.length; _a++) { var member = _b[_a]; - if ((member.kind === 144 /* MethodDeclaration */ || node.kind === 143 /* MethodSignature */) && !member.body) { + if ((member.kind === 147 /* MethodDeclaration */ || node.kind === 146 /* MethodSignature */) && !member.body) { emitCommentsOnNotEmittedNode(member); } - else if (member.kind === 144 /* MethodDeclaration */ || - member.kind === 146 /* GetAccessor */ || - member.kind === 147 /* SetAccessor */) { + else if (member.kind === 147 /* MethodDeclaration */ || + member.kind === 149 /* GetAccessor */ || + member.kind === 150 /* SetAccessor */) { writeLine(); emitLeadingComments(member); emitStart(member); - if (member.flags & 64 /* Static */) { + if (member.flags & 32 /* Static */) { write("static "); } - if (member.kind === 146 /* GetAccessor */) { + if (member.kind === 149 /* GetAccessor */) { write("get "); } - else if (member.kind === 147 /* SetAccessor */) { + else if (member.kind === 150 /* SetAccessor */) { write("set "); } if (member.asteriskToken) { @@ -36586,7 +41134,7 @@ var ts; emitEnd(member); emitTrailingComments(member); } - else if (member.kind === 194 /* SemicolonClassElement */) { + else if (member.kind === 198 /* SemicolonClassElement */) { writeLine(); write(";"); } @@ -36615,11 +41163,11 @@ var ts; var hasInstancePropertyWithInitializer = false; // Emit the constructor overload pinned comments ts.forEach(node.members, function (member) { - if (member.kind === 145 /* Constructor */ && !member.body) { + if (member.kind === 148 /* Constructor */ && !member.body) { emitCommentsOnNotEmittedNode(member); } // Check if there is any non-static property assignment - if (member.kind === 142 /* PropertyDeclaration */ && member.initializer && (member.flags & 64 /* Static */) === 0) { + if (member.kind === 145 /* PropertyDeclaration */ && member.initializer && (member.flags & 32 /* Static */) === 0) { hasInstancePropertyWithInitializer = true; } }); @@ -36644,18 +41192,22 @@ var ts; emitSignatureParameters(ctor); } else { - // Based on EcmaScript6 section 14.5.14: Runtime Semantics: ClassDefinitionEvaluation. - // If constructor is empty, then, - // If ClassHeritageopt is present, then - // Let constructor be the result of parsing the String "constructor(... args){ super (...args);}" using the syntactic grammar with the goal symbol MethodDefinition. + // The ES2015 spec specifies in 14.5.14. Runtime Semantics: ClassDefinitionEvaluation: + // If constructor is empty, then + // If ClassHeritag_eopt is present and protoParent is not null, then + // Let constructor be the result of parsing the source text + // constructor(...args) { super (...args);} + // using the syntactic grammar with the goal symbol MethodDefinition[~Yield]. // Else, - // Let constructor be the result of parsing the String "constructor( ){ }" using the syntactic grammar with the goal symbol MethodDefinition - if (baseTypeElement) { - write("(...args)"); - } - else { - write("()"); - } + // Let constructor be the result of parsing the source text + // constructor( ){ } + // using the syntactic grammar with the goal symbol MethodDefinition[~Yield]. + // + // While we could emit the '...args' rest parameter, certain later tools in the pipeline might + // downlevel the '...args' portion less efficiently by naively copying the contents of 'arguments' to an array. + // Instead, we'll avoid using a rest parameter and spread into the super call as + // 'super(...arguments)' instead of 'super(...args)', as you can see below. + write("()"); } } var startIndex = 0; @@ -36689,7 +41241,8 @@ var ts; write("_super.apply(this, arguments);"); } else { - write("super(...args);"); + // See comment above on using '...arguments' instead of '...args'. + write("super(...arguments);"); } emitEnd(baseTypeElement); } @@ -36727,15 +41280,17 @@ var ts; else { emitClassLikeDeclarationForES6AndHigher(node); } - if (modulekind !== 5 /* ES6 */ && node.parent === currentSourceFile && node.name) { + if (modulekind !== ts.ModuleKind.ES6 && node.parent === currentSourceFile && node.name) { emitExportMemberAssignments(node.name); } } function emitClassLikeDeclarationForES6AndHigher(node) { var decoratedClassAlias; - var thisNodeIsDecorated = ts.nodeIsDecorated(node); - if (node.kind === 217 /* ClassDeclaration */) { - if (thisNodeIsDecorated) { + var isHoistedDeclarationInSystemModule = shouldHoistDeclarationInSystemJsModule(node); + var isDecorated = ts.nodeIsDecorated(node); + var rewriteAsClassExpression = isDecorated || isHoistedDeclarationInSystemModule; + if (node.kind === 221 /* ClassDeclaration */) { + if (rewriteAsClassExpression) { // When we emit an ES6 class that has a class decorator, we must tailor the // emit to certain specific cases. // @@ -36766,17 +41321,17 @@ var ts; // // TypeScript | Javascript // --------------------------------|------------------------------------ - // @dec | let C_1; - // class C { | let C = C_1 = class C { - // static x() { return C.y; } | static x() { return C_1.y; } - // static y = 1; | } + // @dec | let C_1 = class C { + // class C { | static x() { return C_1.y; } + // static x() { return C.y; } | } + // static y = 1; | let C = C_1; // } | C.y = 1; // | C = C_1 = __decorate([dec], C); // --------------------------------|------------------------------------ - // @dec | let C_1; - // export class C { | export let C = C_1 = class C { - // static x() { return C.y; } | static x() { return C_1.y; } - // static y = 1; | } + // @dec | let C_1 = class C { + // export class C { | static x() { return C_1.y; } + // static x() { return C.y; } | } + // static y = 1; | export let C = C_1; // } | C.y = 1; // | C = C_1 = __decorate([dec], C); // --------------------------------------------------------------------- @@ -36805,29 +41360,34 @@ var ts; // // TypeScript | Javascript // --------------------------------|------------------------------------ - // @dec | let C_1; - // export default class C { | let C = C_1 = class C { - // static x() { return C.y; } | static x() { return C_1.y; } - // static y = 1; | } + // @dec | let C_1 = class C { + // export default class C { | static x() { return C_1.y; } + // static x() { return C.y; } | }; + // static y = 1; | let C = C_1; // } | C.y = 1; // | C = C_1 = __decorate([dec], C); // | export default C; // --------------------------------------------------------------------- // [Example 4] // - if (resolver.getNodeCheckFlags(node) & 524288 /* ClassWithBodyScopedClassBinding */) { + // NOTE: we reuse the same rewriting logic for cases when targeting ES6 and module kind is System. + // Because of hoisting top level class declaration need to be emitted as class expressions. + // Double bind case is only required if node is decorated. + if (isDecorated && resolver.getNodeCheckFlags(node) & 524288 /* ClassWithBodyScopedClassBinding */) { decoratedClassAlias = ts.unescapeIdentifier(makeUniqueName(node.name ? node.name.text : "default")); decoratedClassAliases[ts.getNodeId(node)] = decoratedClassAlias; - write("let " + decoratedClassAlias + ";"); - writeLine(); } - if (isES6ExportedDeclaration(node) && !(node.flags & 512 /* Default */)) { + if (isES6ExportedDeclaration(node) && !(node.flags & 512 /* Default */) && decoratedClassAlias === undefined) { write("export "); } - write("let "); - emitDeclarationName(node); if (decoratedClassAlias !== undefined) { - write(" = " + decoratedClassAlias); + write("let " + decoratedClassAlias); + } + else { + if (!isHoistedDeclarationInSystemModule) { + write("let "); + } + emitDeclarationName(node); } write(" = "); } @@ -36841,29 +41401,38 @@ var ts; // If the class has static properties, and it's a class expression, then we'll need // to specialize the emit a bit. for a class expression of the form: // - // class C { static a = 1; static b = 2; ... } + // (class C { static a = 1; static b = 2; ... }) // // We'll emit: // - // (_temp = class C { ... }, _temp.a = 1, _temp.b = 2, _temp) + // ((C_1 = class C { + // // Normal class body + // }, + // C_1.a = 1, + // C_1.b = 2, + // C_1)); + // var C_1; // // This keeps the expression as an expression, while ensuring that the static parts // of it have been initialized by the time it is used. var staticProperties = getInitializedProperties(node, /*isStatic*/ true); - var isClassExpressionWithStaticProperties = staticProperties.length > 0 && node.kind === 189 /* ClassExpression */; - var tempVariable; + var isClassExpressionWithStaticProperties = staticProperties.length > 0 && node.kind === 192 /* ClassExpression */; + var generatedName; if (isClassExpressionWithStaticProperties) { - tempVariable = createAndRecordTempVariable(0 /* Auto */); + generatedName = node.name ? getGeneratedNameForNode(node.name) : makeUniqueName("classExpression"); + var synthesizedNode = ts.createSynthesizedNode(69 /* Identifier */); + synthesizedNode.text = generatedName; + recordTempDeclaration(synthesizedNode); write("("); increaseIndent(); - emit(tempVariable); + emit(synthesizedNode); write(" = "); } write("class"); // emit name if // - node has a name // - this is default export with static initializers - if (node.name || (node.flags & 512 /* Default */ && (staticProperties.length > 0 || modulekind !== 5 /* ES6 */) && !thisNodeIsDecorated)) { + if (node.name || (node.flags & 512 /* Default */ && (staticProperties.length > 0 || modulekind !== ts.ModuleKind.ES6) && !rewriteAsClassExpression)) { write(" "); emitDeclarationName(node); } @@ -36880,7 +41449,17 @@ var ts; decreaseIndent(); writeLine(); emitToken(16 /* CloseBraceToken */, node.members.end); - if (thisNodeIsDecorated) { + if (rewriteAsClassExpression) { + if (decoratedClassAlias !== undefined) { + write(";"); + writeLine(); + if (isES6ExportedDeclaration(node) && !(node.flags & 512 /* Default */)) { + write("export "); + } + write("let "); + emitDeclarationName(node); + write(" = " + decoratedClassAlias); + } decoratedClassAliases[ts.getNodeId(node)] = undefined; write(";"); } @@ -36894,11 +41473,11 @@ var ts; var property = staticProperties_1[_a]; write(","); writeLine(); - emitPropertyDeclaration(node, property, /*receiver*/ tempVariable, /*isExpression*/ true); + emitPropertyDeclaration(node, property, /*receiver*/ generatedName, /*isExpression*/ true); } write(","); writeLine(); - emit(tempVariable); + write(generatedName); decreaseIndent(); write(")"); } @@ -36907,10 +41486,10 @@ var ts; emitPropertyDeclarations(node, staticProperties); emitDecoratorsOfClass(node, decoratedClassAlias); } - if (!(node.flags & 2 /* Export */)) { + if (!(node.flags & 1 /* Export */)) { return; } - if (modulekind !== 5 /* ES6 */) { + if (modulekind !== ts.ModuleKind.ES6) { emitExportMemberAssignment(node); } else { @@ -36918,14 +41497,14 @@ var ts; // module), export it if (node.flags & 512 /* Default */) { // if this is a top level default export of decorated class, write the export after the declaration. - if (thisNodeIsDecorated) { + if (isDecorated) { writeLine(); write("export default "); emitDeclarationName(node); write(";"); } } - else if (node.parent.kind !== 251 /* SourceFile */) { + else if (node.parent.kind !== 256 /* SourceFile */) { writeLine(); emitStart(node); emitModuleMemberName(node); @@ -36937,7 +41516,11 @@ var ts; } } function emitClassLikeDeclarationBelowES6(node) { - if (node.kind === 217 /* ClassDeclaration */) { + var isES6ExportedClass = isES6ExportedDeclaration(node); + if (node.kind === 221 /* ClassDeclaration */) { + if (isES6ExportedClass && !(node.flags & 512 /* Default */)) { + write("export "); + } // source file level classes in system modules are hoisted so 'var's for them are already defined if (!shouldHoistDeclarationInSystemJsModule(node)) { write("var "); @@ -36998,23 +41581,29 @@ var ts; emit(baseTypeNode.expression); } write("))"); - if (node.kind === 217 /* ClassDeclaration */) { + if (node.kind === 221 /* ClassDeclaration */) { write(";"); } emitEnd(node); - if (node.kind === 217 /* ClassDeclaration */) { + if (node.kind === 221 /* ClassDeclaration */ && !isES6ExportedClass) { emitExportMemberAssignment(node); } + else if (isES6ExportedClass && (node.flags & 512 /* Default */)) { + writeLine(); + write("export default "); + emitDeclarationName(node); + write(";"); + } } function emitClassMemberPrefix(node, member) { emitDeclarationName(node); - if (!(member.flags & 64 /* Static */)) { + if (!(member.flags & 32 /* Static */)) { write(".prototype"); } } function emitDecoratorsOfClass(node, decoratedClassAlias) { emitDecoratorsOfMembers(node, /*staticFlag*/ 0); - emitDecoratorsOfMembers(node, 64 /* Static */); + emitDecoratorsOfMembers(node, 32 /* Static */); emitDecoratorsOfConstructor(node, decoratedClassAlias); } function emitDecoratorsOfConstructor(node, decoratedClassAlias) { @@ -37063,7 +41652,7 @@ var ts; for (var _a = 0, _b = node.members; _a < _b.length; _a++) { var member = _b[_a]; // only emit members in the correct group - if ((member.flags & 64 /* Static */) !== staticFlag) { + if ((member.flags & 32 /* Static */) !== staticFlag) { continue; } // skip members that cannot be decorated (such as the constructor) @@ -37089,7 +41678,7 @@ var ts; else { decorators = member.decorators; // we only decorate the parameters here if this is a method - if (member.kind === 144 /* MethodDeclaration */) { + if (member.kind === 147 /* MethodDeclaration */) { functionLikeMember = member; } } @@ -37146,7 +41735,7 @@ var ts; write(", "); emitExpressionForPropertyName(member.name); if (languageVersion > 0 /* ES3 */) { - if (member.kind !== 142 /* PropertyDeclaration */) { + if (member.kind !== 145 /* PropertyDeclaration */) { // We emit `null` here to indicate to `__decorate` that it can invoke `Object.getOwnPropertyDescriptor` directly. // We have this extra argument here so that we can inject an explicit property descriptor at a later date. write(", null"); @@ -37188,10 +41777,10 @@ var ts; // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata // compiler option is set. switch (node.kind) { - case 144 /* MethodDeclaration */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 142 /* PropertyDeclaration */: + case 147 /* MethodDeclaration */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 145 /* PropertyDeclaration */: return true; } return false; @@ -37201,7 +41790,7 @@ var ts; // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata // compiler option is set. switch (node.kind) { - case 144 /* MethodDeclaration */: + case 147 /* MethodDeclaration */: return true; } return false; @@ -37211,9 +41800,9 @@ var ts; // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata // compiler option is set. switch (node.kind) { - case 217 /* ClassDeclaration */: - case 144 /* MethodDeclaration */: - case 147 /* SetAccessor */: + case 221 /* ClassDeclaration */: + case 147 /* MethodDeclaration */: + case 150 /* SetAccessor */: return true; } return false; @@ -37231,19 +41820,19 @@ var ts; // // For rules on serializing type annotations, see `serializeTypeNode`. switch (node.kind) { - case 217 /* ClassDeclaration */: + case 221 /* ClassDeclaration */: write("Function"); return; - case 142 /* PropertyDeclaration */: + case 145 /* PropertyDeclaration */: emitSerializedTypeNode(node.type); return; - case 139 /* Parameter */: + case 142 /* Parameter */: emitSerializedTypeNode(node.type); return; - case 146 /* GetAccessor */: + case 149 /* GetAccessor */: emitSerializedTypeNode(node.type); return; - case 147 /* SetAccessor */: + case 150 /* SetAccessor */: emitSerializedTypeNode(ts.getSetAccessorTypeAnnotationNode(node)); return; } @@ -37259,40 +41848,40 @@ var ts; case 103 /* VoidKeyword */: write("void 0"); return; - case 161 /* ParenthesizedType */: + case 164 /* ParenthesizedType */: emitSerializedTypeNode(node.type); return; - case 153 /* FunctionType */: - case 154 /* ConstructorType */: + case 156 /* FunctionType */: + case 157 /* ConstructorType */: write("Function"); return; - case 157 /* ArrayType */: - case 158 /* TupleType */: + case 160 /* ArrayType */: + case 161 /* TupleType */: write("Array"); return; - case 151 /* TypePredicate */: + case 154 /* TypePredicate */: case 120 /* BooleanKeyword */: write("Boolean"); return; - case 130 /* StringKeyword */: - case 163 /* StringLiteralType */: + case 132 /* StringKeyword */: + case 166 /* LiteralType */: write("String"); return; - case 128 /* NumberKeyword */: + case 130 /* NumberKeyword */: write("Number"); return; - case 131 /* SymbolKeyword */: + case 133 /* SymbolKeyword */: write("Symbol"); return; - case 152 /* TypeReference */: + case 155 /* TypeReference */: emitSerializedTypeReferenceNode(node); return; - case 155 /* TypeQuery */: - case 156 /* TypeLiteral */: - case 159 /* UnionType */: - case 160 /* IntersectionType */: + case 158 /* TypeQuery */: + case 159 /* TypeLiteral */: + case 162 /* UnionType */: + case 163 /* IntersectionType */: case 117 /* AnyKeyword */: - case 162 /* ThisType */: + case 165 /* ThisType */: break; default: ts.Debug.fail("Cannot serialize unexpected type node."); @@ -37365,7 +41954,7 @@ var ts; // For the rules on serializing the type of each parameter declaration, see `serializeTypeOfDeclaration`. if (node) { var valueDeclaration = void 0; - if (node.kind === 217 /* ClassDeclaration */) { + if (node.kind === 221 /* ClassDeclaration */) { valueDeclaration = ts.getFirstConstructorWithBody(node); } else if (ts.isFunctionLike(node) && ts.nodeIsPresent(node.body)) { @@ -37373,18 +41962,19 @@ var ts; } if (valueDeclaration) { var parameters = valueDeclaration.parameters; + var skipThisCount = parameters.length && parameters[0].name.originalKeywordKind === 97 /* ThisKeyword */ ? 1 : 0; var parameterCount = parameters.length; - if (parameterCount > 0) { - for (var i = 0; i < parameterCount; i++) { - if (i > 0) { + if (parameterCount > skipThisCount) { + for (var i = skipThisCount; i < parameterCount; i++) { + if (i > skipThisCount) { write(", "); } if (parameters[i].dotDotDotToken) { var parameterType = parameters[i].type; - if (parameterType.kind === 157 /* ArrayType */) { + if (parameterType && parameterType.kind === 160 /* ArrayType */) { parameterType = parameterType.elementType; } - else if (parameterType.kind === 152 /* TypeReference */ && parameterType.typeArguments && parameterType.typeArguments.length === 1) { + else if (parameterType && parameterType.kind === 155 /* TypeReference */ && parameterType.typeArguments && parameterType.typeArguments.length === 1) { parameterType = parameterType.typeArguments[0]; } else { @@ -37402,9 +41992,15 @@ var ts; } /** Serializes the return type of function. Used by the __metadata decorator for a method. */ function emitSerializedReturnTypeOfNode(node) { - if (node && ts.isFunctionLike(node) && node.type) { - emitSerializedTypeNode(node.type); - return; + if (node && ts.isFunctionLike(node)) { + if (node.type) { + emitSerializedTypeNode(node.type); + return; + } + else if (ts.isAsyncFunctionLike(node)) { + write("Promise"); + return; + } } write("void 0"); } @@ -37461,7 +42057,7 @@ var ts; if (!shouldHoistDeclarationInSystemJsModule(node)) { // do not emit var if variable was already hoisted var isES6ExportedEnum = isES6ExportedDeclaration(node); - if (!(node.flags & 2 /* Export */) || (isES6ExportedEnum && isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 220 /* EnumDeclaration */))) { + if (!(node.flags & 1 /* Export */) || (isES6ExportedEnum && isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 224 /* EnumDeclaration */))) { emitStart(node); if (isES6ExportedEnum) { write("export "); @@ -37490,7 +42086,7 @@ var ts; emitModuleMemberName(node); write(" = {}));"); emitEnd(node); - if (!isES6ExportedDeclaration(node) && node.flags & 2 /* Export */ && !shouldHoistDeclarationInSystemJsModule(node)) { + if (!isES6ExportedDeclaration(node) && node.flags & 1 /* Export */ && !shouldHoistDeclarationInSystemJsModule(node)) { // do not emit var if variable was already hoisted writeLine(); emitStart(node); @@ -37501,8 +42097,8 @@ var ts; emitEnd(node); write(";"); } - if (modulekind !== 5 /* ES6 */ && node.parent === currentSourceFile) { - if (modulekind === 4 /* System */ && (node.flags & 2 /* Export */)) { + if (modulekind !== ts.ModuleKind.ES6 && node.parent === currentSourceFile) { + if (modulekind === ts.ModuleKind.System && (node.flags & 1 /* Export */)) { // write the call to exporter for enum writeLine(); write(exportFunctionForFile + "(\""); @@ -37543,7 +42139,7 @@ var ts; } } function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 221 /* ModuleDeclaration */) { + if (moduleDeclaration.body && moduleDeclaration.body.kind === 225 /* ModuleDeclaration */) { var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); return recursiveInnerModule || moduleDeclaration.body; } @@ -37567,7 +42163,7 @@ var ts; var emitVarForModule = !hoistedInDeclarationScope && !isModuleMergedWithES6Class(node); if (emitVarForModule) { var isES6ExportedNamespace = isES6ExportedDeclaration(node); - if (!isES6ExportedNamespace || isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 221 /* ModuleDeclaration */)) { + if (!isES6ExportedNamespace || isFirstDeclarationOfKind(node, node.symbol && node.symbol.declarations, 225 /* ModuleDeclaration */)) { emitStart(node); if (isES6ExportedNamespace) { write("export "); @@ -37585,7 +42181,8 @@ var ts; write(getGeneratedNameForNode(node)); emitEnd(node.name); write(") "); - if (node.body.kind === 222 /* ModuleBlock */) { + ts.Debug.assert(node.body !== undefined); // node.body must exist, as this is a non-ambient module + if (node.body.kind === 226 /* ModuleBlock */) { var saveConvertedLoopState = convertedLoopState; var saveTempFlags = tempFlags; var saveTempVariables = tempVariables; @@ -37611,7 +42208,7 @@ var ts; } write(")("); // write moduleDecl = containingModule.m only if it is not exported es6 module member - if ((node.flags & 2 /* Export */) && !isES6ExportedDeclaration(node)) { + if ((node.flags & 1 /* Export */) && !isES6ExportedDeclaration(node)) { emit(node.name); write(" = "); } @@ -37621,7 +42218,7 @@ var ts; write(" = {}));"); emitEnd(node); if (!isES6ExportedDeclaration(node) && node.name.kind === 69 /* Identifier */ && node.parent === currentSourceFile) { - if (modulekind === 4 /* System */ && (node.flags & 2 /* Export */)) { + if (modulekind === ts.ModuleKind.System && (node.flags & 1 /* Export */)) { writeLine(); write(exportFunctionForFile + "(\""); emitDeclarationName(node); @@ -37637,7 +42234,7 @@ var ts; * Here we check if alternative name was provided for a given moduleName and return it if possible. */ function tryRenameExternalModule(moduleName) { - if (renamedDependencies && ts.hasProperty(renamedDependencies, moduleName.text)) { + if (renamedDependencies && moduleName.text in renamedDependencies) { return "\"" + renamedDependencies[moduleName.text] + "\""; } return undefined; @@ -37661,16 +42258,16 @@ var ts; } } function getNamespaceDeclarationNode(node) { - if (node.kind === 224 /* ImportEqualsDeclaration */) { + if (node.kind === 229 /* ImportEqualsDeclaration */) { return node; } var importClause = node.importClause; - if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 227 /* NamespaceImport */) { + if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 232 /* NamespaceImport */) { return importClause.namedBindings; } } function isDefaultImport(node) { - return node.kind === 225 /* ImportDeclaration */ && node.importClause && !!node.importClause.name; + return node.kind === 230 /* ImportDeclaration */ && node.importClause && !!node.importClause.name; } function emitExportImportAssignments(node) { if (ts.isAliasSymbolDeclaration(node) && resolver.isValueAliasDeclaration(node)) { @@ -37679,7 +42276,7 @@ var ts; ts.forEachChild(node, emitExportImportAssignments); } function emitImportDeclaration(node) { - if (modulekind !== 5 /* ES6 */) { + if (modulekind !== ts.ModuleKind.ES6) { return emitExternalImportDeclaration(node); } // ES6 import @@ -37698,7 +42295,7 @@ var ts; if (shouldEmitNamedBindings) { emitLeadingComments(node.importClause.namedBindings); emitStart(node.importClause.namedBindings); - if (node.importClause.namedBindings.kind === 227 /* NamespaceImport */) { + if (node.importClause.namedBindings.kind === 232 /* NamespaceImport */) { write("* as "); emit(node.importClause.namedBindings.name); } @@ -37724,10 +42321,10 @@ var ts; } function emitExternalImportDeclaration(node) { if (ts.contains(externalImports, node)) { - var isExportedImport = node.kind === 224 /* ImportEqualsDeclaration */ && (node.flags & 2 /* Export */) !== 0; + var isExportedImport = node.kind === 229 /* ImportEqualsDeclaration */ && (node.flags & 1 /* Export */) !== 0; var namespaceDeclaration = getNamespaceDeclarationNode(node); var varOrConst = (languageVersion <= 1 /* ES5 */) ? "var " : "const "; - if (modulekind !== 2 /* AMD */) { + if (modulekind !== ts.ModuleKind.AMD) { emitLeadingComments(node); emitStart(node); if (namespaceDeclaration && !isDefaultImport(node)) { @@ -37746,7 +42343,7 @@ var ts; // import { x, y } from "foo" // import d, * as x from "foo" // import d, { x, y } from "foo" - var isNakedImport = 225 /* ImportDeclaration */ && !node.importClause; + var isNakedImport = 230 /* ImportDeclaration */ && !node.importClause; if (!isNakedImport) { write(varOrConst); write(getGeneratedNameForNode(node)); @@ -37809,7 +42406,7 @@ var ts; write("export "); write("var "); } - else if (!(node.flags & 2 /* Export */)) { + else if (!(node.flags & 1 /* Export */)) { write("var "); } } @@ -37831,14 +42428,14 @@ var ts; } } function emitExportDeclaration(node) { - ts.Debug.assert(modulekind !== 4 /* System */); - if (modulekind !== 5 /* ES6 */) { + ts.Debug.assert(modulekind !== ts.ModuleKind.System); + if (modulekind !== ts.ModuleKind.ES6) { if (node.moduleSpecifier && (!node.exportClause || resolver.isValueAliasDeclaration(node))) { emitStart(node); var generatedName = getGeneratedNameForNode(node); if (node.exportClause) { // export { x, y, ... } from "foo" - if (modulekind !== 2 /* AMD */) { + if (modulekind !== ts.ModuleKind.AMD) { write("var "); write(generatedName); write(" = "); @@ -37867,7 +42464,7 @@ var ts; if (hasExportStarsToExportValues && resolver.moduleExportsSomeValue(node.moduleSpecifier)) { writeLine(); write("__export("); - if (modulekind !== 2 /* AMD */) { + if (modulekind !== ts.ModuleKind.AMD) { emitRequire(ts.getExternalModuleName(node)); } else { @@ -37900,7 +42497,7 @@ var ts; } } function emitExportOrImportSpecifierList(specifiers, shouldEmit) { - ts.Debug.assert(modulekind === 5 /* ES6 */); + ts.Debug.assert(modulekind === ts.ModuleKind.ES6); var needsComma = false; for (var _a = 0, specifiers_1 = specifiers; _a < specifiers_1.length; _a++) { var specifier = specifiers_1[_a]; @@ -37919,14 +42516,14 @@ var ts; } function emitExportAssignment(node) { if (!node.isExportEquals && resolver.isValueAliasDeclaration(node)) { - if (modulekind === 5 /* ES6 */) { + if (modulekind === ts.ModuleKind.ES6) { writeLine(); emitStart(node); write("export default "); var expression = node.expression; emit(expression); - if (expression.kind !== 216 /* FunctionDeclaration */ && - expression.kind !== 217 /* ClassDeclaration */) { + if (expression.kind !== 220 /* FunctionDeclaration */ && + expression.kind !== 221 /* ClassDeclaration */) { write(";"); } emitEnd(node); @@ -37934,7 +42531,7 @@ var ts; else { writeLine(); emitStart(node); - if (modulekind === 4 /* System */) { + if (modulekind === ts.ModuleKind.System) { write(exportFunctionForFile + "(\"default\","); emit(node.expression); write(")"); @@ -37943,7 +42540,7 @@ var ts; emitEs6ExportDefaultCompat(node); emitContainingModuleName(node); if (languageVersion === 0 /* ES3 */) { - write("[\"default\"] = "); + write('["default"] = '); } else { write(".default = "); @@ -37957,13 +42554,13 @@ var ts; } function collectExternalModuleInfo(sourceFile) { externalImports = []; - exportSpecifiers = {}; + exportSpecifiers = ts.createMap(); exportEquals = undefined; hasExportStarsToExportValues = false; for (var _a = 0, _b = sourceFile.statements; _a < _b.length; _a++) { var node = _b[_a]; switch (node.kind) { - case 225 /* ImportDeclaration */: + case 230 /* ImportDeclaration */: if (!node.importClause || resolver.isReferencedAliasDeclaration(node.importClause, /*checkChildren*/ true)) { // import "mod" @@ -37973,13 +42570,13 @@ var ts; externalImports.push(node); } break; - case 224 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 235 /* ExternalModuleReference */ && resolver.isReferencedAliasDeclaration(node)) { + case 229 /* ImportEqualsDeclaration */: + if (node.moduleReference.kind === 240 /* ExternalModuleReference */ && resolver.isReferencedAliasDeclaration(node)) { // import x = require("mod") where x is referenced externalImports.push(node); } break; - case 231 /* ExportDeclaration */: + case 236 /* ExportDeclaration */: if (node.moduleSpecifier) { if (!node.exportClause) { // export * from "mod" @@ -37997,12 +42594,12 @@ var ts; // export { x, y } for (var _c = 0, _d = node.exportClause.elements; _c < _d.length; _c++) { var specifier = _d[_c]; - var name_28 = (specifier.propertyName || specifier.name).text; - (exportSpecifiers[name_28] || (exportSpecifiers[name_28] = [])).push(specifier); + var name_30 = (specifier.propertyName || specifier.name).text; + (exportSpecifiers[name_30] || (exportSpecifiers[name_30] = [])).push(specifier); } } break; - case 230 /* ExportAssignment */: + case 235 /* ExportAssignment */: if (node.isExportEquals && !exportEquals) { // export = x exportEquals = node; @@ -38028,18 +42625,18 @@ var ts; if (namespaceDeclaration && !isDefaultImport(node)) { return ts.getTextOfNodeFromSourceText(currentText, namespaceDeclaration.name); } - if (node.kind === 225 /* ImportDeclaration */ && node.importClause) { + if (node.kind === 230 /* ImportDeclaration */ && node.importClause) { return getGeneratedNameForNode(node); } - if (node.kind === 231 /* ExportDeclaration */ && node.moduleSpecifier) { + if (node.kind === 236 /* ExportDeclaration */ && node.moduleSpecifier) { return getGeneratedNameForNode(node); } } function getExternalModuleNameText(importNode, emitRelativePathAsModuleName) { if (emitRelativePathAsModuleName) { - var name_29 = getExternalModuleNameFromDeclaration(host, resolver, importNode); - if (name_29) { - return "\"" + name_29 + "\""; + var name_31 = getExternalModuleNameFromDeclaration(host, resolver, importNode); + if (name_31) { + return "\"" + name_31 + "\""; } } var moduleName = ts.getExternalModuleName(importNode); @@ -38057,8 +42654,8 @@ var ts; for (var _a = 0, externalImports_1 = externalImports; _a < externalImports_1.length; _a++) { var importNode = externalImports_1[_a]; // do not create variable declaration for exports and imports that lack import clause - var skipNode = importNode.kind === 231 /* ExportDeclaration */ || - (importNode.kind === 225 /* ImportDeclaration */ && !importNode.importClause); + var skipNode = importNode.kind === 236 /* ExportDeclaration */ || + (importNode.kind === 230 /* ImportDeclaration */ && !importNode.importClause); if (skipNode) { continue; } @@ -38079,19 +42676,19 @@ var ts; // when resolving exports local exported entries/indirect exported entries in the module // should always win over entries with similar names that were added via star exports // to support this we store names of local/indirect exported entries in a set. - // this set is used to filter names brought by star expors. + // this set is used to filter names brought by star exports. if (!hasExportStarsToExportValues) { // local names set is needed only in presence of star exports return undefined; } // local names set should only be added if we have anything exported - if (!exportedDeclarations && ts.isEmpty(exportSpecifiers)) { + if (!exportedDeclarations && !ts.someProperties(exportSpecifiers)) { // no exported declarations (export var ...) or export specifiers (export {x}) // check if we have any non star export declarations. var hasExportDeclarationWithExportClause = false; for (var _a = 0, externalImports_2 = externalImports; _a < externalImports_2.length; _a++) { var externalImport = externalImports_2[_a]; - if (externalImport.kind === 231 /* ExportDeclaration */ && externalImport.exportClause) { + if (externalImport.kind === 236 /* ExportDeclaration */ && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -38123,7 +42720,7 @@ var ts; } for (var _d = 0, externalImports_3 = externalImports; _d < externalImports_3.length; _d++) { var externalImport = externalImports_3[_d]; - if (externalImport.kind !== 231 /* ExportDeclaration */) { + if (externalImport.kind !== 236 /* ExportDeclaration */) { continue; } var exportDecl = externalImport; @@ -38208,16 +42805,16 @@ var ts; if (hoistedVars) { writeLine(); write("var "); - var seen = {}; + var seen = ts.createMap(); for (var i = 0; i < hoistedVars.length; i++) { var local = hoistedVars[i]; - var name_30 = local.kind === 69 /* Identifier */ + var name_32 = local.kind === 69 /* Identifier */ ? local : local.name; - if (name_30) { + if (name_32) { // do not emit duplicate entries (in case of declaration merging) in the list of hoisted variables - var text = ts.unescapeIdentifier(name_30.text); - if (ts.hasProperty(seen, text)) { + var text = ts.unescapeIdentifier(name_32.text); + if (text in seen) { continue; } else { @@ -38227,14 +42824,14 @@ var ts; if (i !== 0) { write(", "); } - if (local.kind === 217 /* ClassDeclaration */ || local.kind === 221 /* ModuleDeclaration */ || local.kind === 220 /* EnumDeclaration */) { + if (local.kind === 221 /* ClassDeclaration */ || local.kind === 225 /* ModuleDeclaration */ || local.kind === 224 /* EnumDeclaration */) { emitDeclarationName(local); } else { emit(local); } var flags = ts.getCombinedNodeFlags(local.kind === 69 /* Identifier */ ? local.parent : local); - if (flags & 2 /* Export */) { + if (flags & 1 /* Export */) { if (!exportedDeclarations) { exportedDeclarations = []; } @@ -38248,7 +42845,7 @@ var ts; var f = hoistedFunctionDeclarations_1[_a]; writeLine(); emit(f); - if (f.flags & 2 /* Export */) { + if (f.flags & 1 /* Export */) { if (!exportedDeclarations) { exportedDeclarations = []; } @@ -38258,24 +42855,24 @@ var ts; } return exportedDeclarations; function visit(node) { - if (node.flags & 4 /* Ambient */) { + if (node.flags & 2 /* Ambient */) { return; } - if (node.kind === 216 /* FunctionDeclaration */) { + if (node.kind === 220 /* FunctionDeclaration */) { if (!hoistedFunctionDeclarations) { hoistedFunctionDeclarations = []; } hoistedFunctionDeclarations.push(node); return; } - if (node.kind === 217 /* ClassDeclaration */) { + if (node.kind === 221 /* ClassDeclaration */) { if (!hoistedVars) { hoistedVars = []; } hoistedVars.push(node); return; } - if (node.kind === 220 /* EnumDeclaration */) { + if (node.kind === 224 /* EnumDeclaration */) { if (shouldEmitEnumDeclaration(node)) { if (!hoistedVars) { hoistedVars = []; @@ -38284,7 +42881,7 @@ var ts; } return; } - if (node.kind === 221 /* ModuleDeclaration */) { + if (node.kind === 225 /* ModuleDeclaration */) { if (shouldEmitModuleDeclaration(node)) { if (!hoistedVars) { hoistedVars = []; @@ -38293,17 +42890,17 @@ var ts; } return; } - if (node.kind === 214 /* VariableDeclaration */ || node.kind === 166 /* BindingElement */) { + if (node.kind === 218 /* VariableDeclaration */ || node.kind === 169 /* BindingElement */) { if (shouldHoistVariable(node, /*checkIfSourceFileLevelDecl*/ false)) { - var name_31 = node.name; - if (name_31.kind === 69 /* Identifier */) { + var name_33 = node.name; + if (name_33.kind === 69 /* Identifier */) { if (!hoistedVars) { hoistedVars = []; } - hoistedVars.push(name_31); + hoistedVars.push(name_33); } else { - ts.forEachChild(name_31, visit); + ts.forEachChild(name_33, visit); } } return; @@ -38333,11 +42930,11 @@ var ts; // - it is top level block scoped // if block scoped variables are nested in some another block then // no other functions can use them except ones that are defined at least in the same block - return (ts.getCombinedNodeFlags(node) & 24576 /* BlockScoped */) === 0 || - ts.getEnclosingBlockScopeContainer(node).kind === 251 /* SourceFile */; + return (ts.getCombinedNodeFlags(node) & 3072 /* BlockScoped */) === 0 || + ts.getEnclosingBlockScopeContainer(node).kind === 256 /* SourceFile */; } function isCurrentFileSystemExternalModule() { - return modulekind === 4 /* System */ && isCurrentFileExternalModule; + return modulekind === ts.ModuleKind.System && isCurrentFileExternalModule; } function emitSystemModuleBody(node, dependencyGroups, startIndex) { // shape of the body in system modules: @@ -38409,21 +43006,21 @@ var ts; var entry = group_1[_a]; var importVariableName = getLocalNameForExternalImport(entry) || ""; switch (entry.kind) { - case 225 /* ImportDeclaration */: + case 230 /* ImportDeclaration */: if (!entry.importClause) { // 'import "..."' case // module is imported only for side-effects, no emit required break; } // fall-through - case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportEqualsDeclaration */: ts.Debug.assert(importVariableName !== ""); writeLine(); // save import into the local write(importVariableName + " = " + parameterName + ";"); writeLine(); break; - case 231 /* ExportDeclaration */: + case 236 /* ExportDeclaration */: ts.Debug.assert(importVariableName !== ""); if (entry.exportClause) { // export {a, b as c} from 'foo' @@ -38482,10 +43079,10 @@ var ts; // - import declarations are not emitted since they are already handled in setters // - export declarations with module specifiers are not emitted since they were already written in setters // - export declarations without module specifiers are emitted preserving the order - case 216 /* FunctionDeclaration */: - case 225 /* ImportDeclaration */: + case 220 /* FunctionDeclaration */: + case 230 /* ImportDeclaration */: continue; - case 231 /* ExportDeclaration */: + case 236 /* ExportDeclaration */: if (!statement.moduleSpecifier) { for (var _a = 0, _b = statement.exportClause.elements; _a < _b.length; _a++) { var element = _b[_a]; @@ -38494,7 +43091,7 @@ var ts; } } continue; - case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportEqualsDeclaration */: if (!ts.isInternalModuleImportEqualsDeclaration(statement)) { // - import equals declarations that import external modules are not emitted continue; @@ -38533,7 +43130,7 @@ var ts; write("System.register("); writeModuleName(node, emitRelativePathAsModuleName); write("["); - var groupIndices = {}; + var groupIndices = ts.createMap(); var dependencyGroups = []; for (var i = 0; i < externalImports.length; i++) { var text = getExternalModuleNameText(externalImports[i], emitRelativePathAsModuleName); @@ -38543,7 +43140,7 @@ var ts; // text should be quoted string // for deduplication purposes in key remove leading and trailing quotes so 'a' and "a" will be considered the same var key = text.substr(1, text.length - 2); - if (ts.hasProperty(groupIndices, key)) { + if (key in groupIndices) { // deduplicate/group entries in dependency list by the dependency name var groupIndex = groupIndices[key]; dependencyGroups[groupIndex].push(externalImports[i]); @@ -38584,11 +43181,11 @@ var ts; for (var _a = 0, _b = node.amdDependencies; _a < _b.length; _a++) { var amdDependency = _b[_a]; if (amdDependency.name) { - aliasedModuleNames.push("\"" + amdDependency.path + "\""); + aliasedModuleNames.push('"' + amdDependency.path + '"'); importAliasNames.push(amdDependency.name); } else { - unaliasedModuleNames.push("\"" + amdDependency.path + "\""); + unaliasedModuleNames.push('"' + amdDependency.path + '"'); } } for (var _c = 0, externalImports_4 = externalImports; _c < externalImports_4.length; _c++) { @@ -38626,7 +43223,7 @@ var ts; } function emitAMDDependencyList(_a) { var aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames; - write("[\"require\", \"exports\""); + write('["require", "exports"'); if (aliasedModuleNames.length) { write(", "); write(aliasedModuleNames.join(", ")); @@ -38658,8 +43255,8 @@ var ts; emitExportStarHelper(); emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); - emitTempDeclarations(/*newLine*/ true); emitExportEquals(/*emitAsReturn*/ true); + emitTempDeclarations(/*newLine*/ true); decreaseIndent(); writeLine(); write("});"); @@ -38671,8 +43268,8 @@ var ts; emitExportStarHelper(); emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); - emitTempDeclarations(/*newLine*/ true); emitExportEquals(/*emitAsReturn*/ false); + emitTempDeclarations(/*newLine*/ true); } function emitUMDModule(node) { emitEmitHelpers(node); @@ -38689,8 +43286,8 @@ var ts; emitExportStarHelper(); emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); - emitTempDeclarations(/*newLine*/ true); emitExportEquals(/*emitAsReturn*/ true); + emitTempDeclarations(/*newLine*/ true); decreaseIndent(); writeLine(); write("});"); @@ -38747,7 +43344,7 @@ var ts; } firstNonWhitespace = -1; } - else if (!ts.isWhiteSpace(c)) { + else if (!ts.isWhiteSpaceSingleLine(c)) { lastNonWhitespace = i; if (firstNonWhitespace === -1) { firstNonWhitespace = i; @@ -38764,7 +43361,7 @@ var ts; if (entities[m] !== undefined) { var ch = String.fromCharCode(entities[m]); // " needs to be escaped - return ch === "\"" ? "\\\"" : ch; + return ch === '"' ? "\\\"" : ch; } else { return s; @@ -38773,6 +43370,18 @@ var ts; } return result; } + function isJsxChildEmittable(child) { + if (child.kind === 248 /* JsxExpression */) { + // Don't emit empty expressions + return !!child.expression; + } + else if (child.kind === 244 /* JsxText */) { + // Don't emit empty strings + return !!getTextToEmit(child); + } + return true; + } + ; function getTextToEmit(node) { switch (compilerOptions.jsx) { case 2 /* React */: @@ -38791,9 +43400,9 @@ var ts; function emitJsxText(node) { switch (compilerOptions.jsx) { case 2 /* React */: - write("\""); + write('"'); write(trimReactWhitespaceAndApplyEntities(node)); - write("\""); + write('"'); break; case 1 /* Preserve */: default: @@ -38817,7 +43426,7 @@ var ts; } } function isUseStrictPrologue(node) { - return !!node.expression.text.match(/use strict/); + return node.expression.text === "use strict"; } function ensureUseStrictPrologue(startWithNewLine, writeUseStrict) { if (writeUseStrict) { @@ -38863,7 +43472,7 @@ var ts; if (!compilerOptions.noEmitHelpers) { // Only Emit __extends function when target ES5. // For target ES6 and above, we can emit classDeclaration as is. - if (languageVersion < 2 /* ES6 */ && !extendsEmitted && node.flags & 4194304 /* HasClassExtends */) { + if (languageVersion < 2 /* ES6 */ && !extendsEmitted && node.flags & 262144 /* HasClassExtends */) { writeLines(extendsHelper); extendsEmitted = true; } @@ -38871,18 +43480,18 @@ var ts; writeLines(assignHelper); assignEmitted = true; } - if (!decorateEmitted && node.flags & 8388608 /* HasDecorators */) { + if (!decorateEmitted && node.flags & 524288 /* HasDecorators */) { writeLines(decorateHelper); if (compilerOptions.emitDecoratorMetadata) { writeLines(metadataHelper); } decorateEmitted = true; } - if (!paramEmitted && node.flags & 16777216 /* HasParamDecorators */) { + if (!paramEmitted && node.flags & 1048576 /* HasParamDecorators */) { writeLines(paramHelper); paramEmitted = true; } - if (!awaiterEmitted && node.flags & 33554432 /* HasAsyncFunctions */) { + if (!awaiterEmitted && node.flags & 2097152 /* HasAsyncFunctions */) { writeLines(awaiterHelper); awaiterEmitted = true; } @@ -38895,7 +43504,7 @@ var ts; emitDetachedCommentsAndUpdateCommentsInfo(node); if (ts.isExternalModule(node) || compilerOptions.isolatedModules) { if (isOwnFileEmit || (!ts.isExternalModule(node) && compilerOptions.isolatedModules)) { - var emitModule = moduleEmitDelegates[modulekind] || moduleEmitDelegates[1 /* CommonJS */]; + var emitModule = moduleEmitDelegates[modulekind] || moduleEmitDelegates[ts.ModuleKind.CommonJS]; emitModule(node); } else { @@ -38924,7 +43533,7 @@ var ts; } function emitNodeConsideringCommentsOption(node, emitNodeConsideringSourcemap) { if (node) { - if (node.flags & 4 /* Ambient */) { + if (node.flags & 2 /* Ambient */) { return emitCommentsOnNotEmittedNode(node); } if (isSpecializedCommentHandling(node)) { @@ -38970,24 +43579,24 @@ var ts; switch (node.kind) { // All of these entities are emitted in a specialized fashion. As such, we allow // the specialized methods for each to handle the comments on the nodes. - case 218 /* InterfaceDeclaration */: - case 216 /* FunctionDeclaration */: - case 225 /* ImportDeclaration */: - case 224 /* ImportEqualsDeclaration */: - case 219 /* TypeAliasDeclaration */: - case 230 /* ExportAssignment */: + case 222 /* InterfaceDeclaration */: + case 220 /* FunctionDeclaration */: + case 230 /* ImportDeclaration */: + case 229 /* ImportEqualsDeclaration */: + case 223 /* TypeAliasDeclaration */: + case 235 /* ExportAssignment */: return true; } } function shouldEmitLeadingAndTrailingComments(node) { switch (node.kind) { - case 196 /* VariableStatement */: + case 200 /* VariableStatement */: return shouldEmitLeadingAndTrailingCommentsForVariableStatement(node); - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: // Only emit the leading/trailing comments for a module if we're actually // emitting the module as well. return shouldEmitModuleDeclaration(node); - case 220 /* EnumDeclaration */: + case 224 /* EnumDeclaration */: // Only emit the leading/trailing comments for an enum if we're actually // emitting the module as well. return shouldEmitEnumDeclaration(node); @@ -38999,11 +43608,11 @@ var ts; // then we don't want to emit comments when we emit the body. It will have already // been taken care of when we emitted the 'return' statement for the function // expression body. - if (node.kind !== 195 /* Block */ && + if (node.kind !== 199 /* Block */ && node.parent && - node.parent.kind === 177 /* ArrowFunction */ && + node.parent.kind === 180 /* ArrowFunction */ && node.parent.body === node && - compilerOptions.target <= 1 /* ES5 */) { + languageVersion <= 1 /* ES5 */) { return false; } // Emit comments for everything else. @@ -39014,13 +43623,13 @@ var ts; switch (node.kind) { case 69 /* Identifier */: return emitIdentifier(node); - case 139 /* Parameter */: + case 142 /* Parameter */: return emitParameter(node); - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: return emitMethod(node); - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: return emitAccessor(node); case 97 /* ThisKeyword */: return emitThis(node); @@ -39040,142 +43649,142 @@ var ts; case 13 /* TemplateMiddle */: case 14 /* TemplateTail */: return emitLiteral(node); - case 186 /* TemplateExpression */: + case 189 /* TemplateExpression */: return emitTemplateExpression(node); - case 193 /* TemplateSpan */: + case 197 /* TemplateSpan */: return emitTemplateSpan(node); - case 236 /* JsxElement */: - case 237 /* JsxSelfClosingElement */: + case 241 /* JsxElement */: + case 242 /* JsxSelfClosingElement */: return emitJsxElement(node); - case 239 /* JsxText */: + case 244 /* JsxText */: return emitJsxText(node); - case 243 /* JsxExpression */: + case 248 /* JsxExpression */: return emitJsxExpression(node); - case 136 /* QualifiedName */: + case 139 /* QualifiedName */: return emitQualifiedName(node); - case 164 /* ObjectBindingPattern */: + case 167 /* ObjectBindingPattern */: return emitObjectBindingPattern(node); - case 165 /* ArrayBindingPattern */: + case 168 /* ArrayBindingPattern */: return emitArrayBindingPattern(node); - case 166 /* BindingElement */: + case 169 /* BindingElement */: return emitBindingElement(node); - case 167 /* ArrayLiteralExpression */: + case 170 /* ArrayLiteralExpression */: return emitArrayLiteral(node); - case 168 /* ObjectLiteralExpression */: + case 171 /* ObjectLiteralExpression */: return emitObjectLiteral(node); - case 248 /* PropertyAssignment */: + case 253 /* PropertyAssignment */: return emitPropertyAssignment(node); - case 249 /* ShorthandPropertyAssignment */: + case 254 /* ShorthandPropertyAssignment */: return emitShorthandPropertyAssignment(node); - case 137 /* ComputedPropertyName */: + case 140 /* ComputedPropertyName */: return emitComputedPropertyName(node); - case 169 /* PropertyAccessExpression */: + case 172 /* PropertyAccessExpression */: return emitPropertyAccess(node); - case 170 /* ElementAccessExpression */: + case 173 /* ElementAccessExpression */: return emitIndexedAccess(node); - case 171 /* CallExpression */: + case 174 /* CallExpression */: return emitCallExpression(node); - case 172 /* NewExpression */: + case 175 /* NewExpression */: return emitNewExpression(node); - case 173 /* TaggedTemplateExpression */: + case 176 /* TaggedTemplateExpression */: return emitTaggedTemplateExpression(node); - case 174 /* TypeAssertionExpression */: + case 177 /* TypeAssertionExpression */: + case 195 /* AsExpression */: + case 196 /* NonNullExpression */: return emit(node.expression); - case 192 /* AsExpression */: - return emit(node.expression); - case 175 /* ParenthesizedExpression */: + case 178 /* ParenthesizedExpression */: return emitParenExpression(node); - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: return emitFunctionDeclaration(node); - case 178 /* DeleteExpression */: + case 181 /* DeleteExpression */: return emitDeleteExpression(node); - case 179 /* TypeOfExpression */: + case 182 /* TypeOfExpression */: return emitTypeOfExpression(node); - case 180 /* VoidExpression */: + case 183 /* VoidExpression */: return emitVoidExpression(node); - case 181 /* AwaitExpression */: + case 184 /* AwaitExpression */: return emitAwaitExpression(node); - case 182 /* PrefixUnaryExpression */: + case 185 /* PrefixUnaryExpression */: return emitPrefixUnaryExpression(node); - case 183 /* PostfixUnaryExpression */: + case 186 /* PostfixUnaryExpression */: return emitPostfixUnaryExpression(node); - case 184 /* BinaryExpression */: + case 187 /* BinaryExpression */: return emitBinaryExpression(node); - case 185 /* ConditionalExpression */: + case 188 /* ConditionalExpression */: return emitConditionalExpression(node); - case 188 /* SpreadElementExpression */: + case 191 /* SpreadElementExpression */: return emitSpreadElementExpression(node); - case 187 /* YieldExpression */: + case 190 /* YieldExpression */: return emitYieldExpression(node); - case 190 /* OmittedExpression */: + case 193 /* OmittedExpression */: return; - case 195 /* Block */: - case 222 /* ModuleBlock */: + case 199 /* Block */: + case 226 /* ModuleBlock */: return emitBlock(node); - case 196 /* VariableStatement */: + case 200 /* VariableStatement */: return emitVariableStatement(node); - case 197 /* EmptyStatement */: + case 201 /* EmptyStatement */: return write(";"); - case 198 /* ExpressionStatement */: + case 202 /* ExpressionStatement */: return emitExpressionStatement(node); - case 199 /* IfStatement */: + case 203 /* IfStatement */: return emitIfStatement(node); - case 200 /* DoStatement */: + case 204 /* DoStatement */: return emitDoStatement(node); - case 201 /* WhileStatement */: + case 205 /* WhileStatement */: return emitWhileStatement(node); - case 202 /* ForStatement */: + case 206 /* ForStatement */: return emitForStatement(node); - case 204 /* ForOfStatement */: - case 203 /* ForInStatement */: + case 208 /* ForOfStatement */: + case 207 /* ForInStatement */: return emitForInOrForOfStatement(node); - case 205 /* ContinueStatement */: - case 206 /* BreakStatement */: + case 209 /* ContinueStatement */: + case 210 /* BreakStatement */: return emitBreakOrContinueStatement(node); - case 207 /* ReturnStatement */: + case 211 /* ReturnStatement */: return emitReturnStatement(node); - case 208 /* WithStatement */: + case 212 /* WithStatement */: return emitWithStatement(node); - case 209 /* SwitchStatement */: + case 213 /* SwitchStatement */: return emitSwitchStatement(node); - case 244 /* CaseClause */: - case 245 /* DefaultClause */: + case 249 /* CaseClause */: + case 250 /* DefaultClause */: return emitCaseOrDefaultClause(node); - case 210 /* LabeledStatement */: + case 214 /* LabeledStatement */: return emitLabeledStatement(node); - case 211 /* ThrowStatement */: + case 215 /* ThrowStatement */: return emitThrowStatement(node); - case 212 /* TryStatement */: + case 216 /* TryStatement */: return emitTryStatement(node); - case 247 /* CatchClause */: + case 252 /* CatchClause */: return emitCatchClause(node); - case 213 /* DebuggerStatement */: + case 217 /* DebuggerStatement */: return emitDebuggerStatement(node); - case 214 /* VariableDeclaration */: + case 218 /* VariableDeclaration */: return emitVariableDeclaration(node); - case 189 /* ClassExpression */: + case 192 /* ClassExpression */: return emitClassExpression(node); - case 217 /* ClassDeclaration */: + case 221 /* ClassDeclaration */: return emitClassDeclaration(node); - case 218 /* InterfaceDeclaration */: + case 222 /* InterfaceDeclaration */: return emitInterfaceDeclaration(node); - case 220 /* EnumDeclaration */: + case 224 /* EnumDeclaration */: return emitEnumDeclaration(node); - case 250 /* EnumMember */: + case 255 /* EnumMember */: return emitEnumMember(node); - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: return emitModuleDeclaration(node); - case 225 /* ImportDeclaration */: + case 230 /* ImportDeclaration */: return emitImportDeclaration(node); - case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportEqualsDeclaration */: return emitImportEqualsDeclaration(node); - case 231 /* ExportDeclaration */: + case 236 /* ExportDeclaration */: return emitExportDeclaration(node); - case 230 /* ExportAssignment */: + case 235 /* ExportAssignment */: return emitExportAssignment(node); - case 251 /* SourceFile */: + case 256 /* SourceFile */: return emitSourceFileNode(node); } } @@ -39214,7 +43823,7 @@ var ts; function getLeadingCommentsToEmit(node) { // Emit the leading comments only if the parent's pos doesn't match because parent should take care of emitting these comments if (node.parent) { - if (node.parent.kind === 251 /* SourceFile */ || node.pos !== node.parent.pos) { + if (node.parent.kind === 256 /* SourceFile */ || node.pos !== node.parent.pos) { if (hasDetachedComments(node.pos)) { // get comments without detached comments return getLeadingCommentsWithoutDetachedComments(); @@ -39229,7 +43838,7 @@ var ts; function getTrailingCommentsToEmit(node) { // Emit the trailing comments only if the parent's pos doesn't match because parent should take care of emitting these comments if (node.parent) { - if (node.parent.kind === 251 /* SourceFile */ || node.end !== node.parent.end) { + if (node.parent.kind === 256 /* SourceFile */ || node.end !== node.parent.end) { return ts.getTrailingCommentRanges(currentText, node.end); } } @@ -39259,7 +43868,7 @@ var ts; // declare var x; // /// // interface F {} - // The first /// will NOT be removed while the second one will be removed eventhough both node will not be emitted + // The first /// will NOT be removed while the second one will be removed even though both node will not be emitted if (node.pos === 0) { leadingComments = ts.filter(getLeadingCommentsToEmit(node), isTripleSlashComment); } @@ -39344,6 +43953,15 @@ var ts; if (declarationFilePath) { emitSkipped = ts.writeDeclarationFile(declarationFilePath, sourceFiles, isBundledEmit, host, resolver, emitterDiagnostics) || emitSkipped; } + if (!emitSkipped && emittedFilesList) { + emittedFilesList.push(jsFilePath); + if (sourceMapFilePath) { + emittedFilesList.push(sourceMapFilePath); + } + if (declarationFilePath) { + emittedFilesList.push(declarationFilePath); + } + } } } ts.emitFiles = emitFiles; @@ -39353,17 +43971,12 @@ var ts; /// var ts; (function (ts) { - /* @internal */ ts.programTime = 0; - /* @internal */ ts.emitTime = 0; - /* @internal */ ts.ioReadTime = 0; - /* @internal */ ts.ioWriteTime = 0; - /* @internal */ ts.maxProgramSizeForNonTsFiles = 20 * 1024 * 1024; /** The version of the TypeScript compiler release */ + ts.version = "2.0.3"; var emptyArray = []; - ts.version = "1.8.10"; function findConfigFile(searchPath, fileExists) { - var fileName = "tsconfig.json"; while (true) { + var fileName = ts.combinePaths(searchPath, "tsconfig.json"); if (fileExists(fileName)) { return fileName; } @@ -39372,7 +43985,6 @@ var ts; break; } searchPath = parentPath; - fileName = "../" + fileName; } return undefined; } @@ -39383,36 +43995,566 @@ var ts; return ts.normalizePath(referencedFileName); } ts.resolveTripleslashReference = resolveTripleslashReference; - function resolveModuleName(moduleName, containingFile, compilerOptions, host) { - var moduleResolution = compilerOptions.moduleResolution !== undefined - ? compilerOptions.moduleResolution - : ts.getEmitModuleKind(compilerOptions) === 1 /* CommonJS */ ? 2 /* NodeJs */ : 1 /* Classic */; - switch (moduleResolution) { - case 2 /* NodeJs */: return nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host); - case 1 /* Classic */: return classicNameResolver(moduleName, containingFile, compilerOptions, host); + /* @internal */ + function computeCommonSourceDirectoryOfFilenames(fileNames, currentDirectory, getCanonicalFileName) { + var commonPathComponents; + var failed = ts.forEach(fileNames, function (sourceFile) { + // Each file contributes into common source file path + var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile, currentDirectory); + sourcePathComponents.pop(); // The base file name is not part of the common directory path + if (!commonPathComponents) { + // first file + commonPathComponents = sourcePathComponents; + return; + } + for (var i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) { + if (getCanonicalFileName(commonPathComponents[i]) !== getCanonicalFileName(sourcePathComponents[i])) { + if (i === 0) { + // Failed to find any common path component + return true; + } + // New common path found that is 0 -> i-1 + commonPathComponents.length = i; + break; + } + } + // If the sourcePathComponents was shorter than the commonPathComponents, truncate to the sourcePathComponents + if (sourcePathComponents.length < commonPathComponents.length) { + commonPathComponents.length = sourcePathComponents.length; + } + }); + // A common path can not be found when paths span multiple drives on windows, for example + if (failed) { + return ""; + } + if (!commonPathComponents) { + return currentDirectory; + } + return ts.getNormalizedPathFromPathComponents(commonPathComponents); + } + ts.computeCommonSourceDirectoryOfFilenames = computeCommonSourceDirectoryOfFilenames; + function trace(host, message) { + host.trace(ts.formatMessage.apply(undefined, arguments)); + } + function isTraceEnabled(compilerOptions, host) { + return compilerOptions.traceResolution && host.trace !== undefined; + } + /* @internal */ + function hasZeroOrOneAsteriskCharacter(str) { + var seenAsterisk = false; + for (var i = 0; i < str.length; i++) { + if (str.charCodeAt(i) === 42 /* asterisk */) { + if (!seenAsterisk) { + seenAsterisk = true; + } + else { + // have already seen asterisk + return false; + } + } + } + return true; + } + ts.hasZeroOrOneAsteriskCharacter = hasZeroOrOneAsteriskCharacter; + function createResolvedModule(resolvedFileName, isExternalLibraryImport, failedLookupLocations) { + return { resolvedModule: resolvedFileName ? { resolvedFileName: resolvedFileName, isExternalLibraryImport: isExternalLibraryImport } : undefined, failedLookupLocations: failedLookupLocations }; + } + function moduleHasNonRelativeName(moduleName) { + return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName)); + } + function tryReadTypesSection(packageJsonPath, baseDirectory, state) { + var jsonContent = readJson(packageJsonPath, state.host); + function tryReadFromField(fieldName) { + if (ts.hasProperty(jsonContent, fieldName)) { + var typesFile = jsonContent[fieldName]; + if (typeof typesFile === "string") { + var typesFilePath_1 = ts.normalizePath(ts.combinePaths(baseDirectory, typesFile)); + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, typesFile, typesFilePath_1); + } + return typesFilePath_1; + } + else { + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_string_got_1, fieldName, typeof typesFile); + } + } + } + } + var typesFilePath = tryReadFromField("typings") || tryReadFromField("types"); + if (typesFilePath) { + return typesFilePath; + } + // Use the main module for inferring types if no types package specified and the allowJs is set + if (state.compilerOptions.allowJs && jsonContent.main && typeof jsonContent.main === "string") { + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.No_types_specified_in_package_json_but_allowJs_is_set_so_returning_main_value_of_0, jsonContent.main); + } + var mainFilePath = ts.normalizePath(ts.combinePaths(baseDirectory, jsonContent.main)); + return mainFilePath; + } + return undefined; + } + function readJson(path, host) { + try { + var jsonText = host.readFile(path); + return jsonText ? JSON.parse(jsonText) : {}; + } + catch (e) { + // gracefully handle if readFile fails or returns not JSON + return {}; } } + var typeReferenceExtensions = [".d.ts"]; + function getEffectiveTypeRoots(options, host) { + if (options.typeRoots) { + return options.typeRoots; + } + var currentDirectory; + if (options.configFilePath) { + currentDirectory = ts.getDirectoryPath(options.configFilePath); + } + else if (host.getCurrentDirectory) { + currentDirectory = host.getCurrentDirectory(); + } + return currentDirectory && getDefaultTypeRoots(currentDirectory, host); + } + /** + * Returns the path to every node_modules/@types directory from some ancestor directory. + * Returns undefined if there are none. + */ + function getDefaultTypeRoots(currentDirectory, host) { + if (!host.directoryExists) { + return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)]; + } + var typeRoots; + while (true) { + var atTypes = ts.combinePaths(currentDirectory, nodeModulesAtTypes); + if (host.directoryExists(atTypes)) { + (typeRoots || (typeRoots = [])).push(atTypes); + } + var parent_15 = ts.getDirectoryPath(currentDirectory); + if (parent_15 === currentDirectory) { + break; + } + currentDirectory = parent_15; + } + return typeRoots; + } + var nodeModulesAtTypes = ts.combinePaths("node_modules", "@types"); + /** + * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. + * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups + * is assumed to be the same as root directory of the project. + */ + function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFile, options, host) { + var traceEnabled = isTraceEnabled(options, host); + var moduleResolutionState = { + compilerOptions: options, + host: host, + skipTsx: true, + traceEnabled: traceEnabled + }; + var typeRoots = getEffectiveTypeRoots(options, host); + if (traceEnabled) { + if (containingFile === undefined) { + if (typeRoots === undefined) { + trace(host, ts.Diagnostics.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set, typeReferenceDirectiveName); + } + else { + trace(host, ts.Diagnostics.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1, typeReferenceDirectiveName, typeRoots); + } + } + else { + if (typeRoots === undefined) { + trace(host, ts.Diagnostics.Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set, typeReferenceDirectiveName, containingFile); + } + else { + trace(host, ts.Diagnostics.Resolving_type_reference_directive_0_containing_file_1_root_directory_2, typeReferenceDirectiveName, containingFile, typeRoots); + } + } + } + var failedLookupLocations = []; + // Check primary library paths + if (typeRoots && typeRoots.length) { + if (traceEnabled) { + trace(host, ts.Diagnostics.Resolving_with_primary_search_path_0, typeRoots.join(", ")); + } + var primarySearchPaths = typeRoots; + for (var _i = 0, primarySearchPaths_1 = primarySearchPaths; _i < primarySearchPaths_1.length; _i++) { + var typeRoot = primarySearchPaths_1[_i]; + var candidate = ts.combinePaths(typeRoot, typeReferenceDirectiveName); + var candidateDirectory = ts.getDirectoryPath(candidate); + var resolvedFile_1 = loadNodeModuleFromDirectory(typeReferenceExtensions, candidate, failedLookupLocations, !directoryProbablyExists(candidateDirectory, host), moduleResolutionState); + if (resolvedFile_1) { + if (traceEnabled) { + trace(host, ts.Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, resolvedFile_1, true); + } + return { + resolvedTypeReferenceDirective: { primary: true, resolvedFileName: resolvedFile_1 }, + failedLookupLocations: failedLookupLocations + }; + } + } + } + else { + if (traceEnabled) { + trace(host, ts.Diagnostics.Root_directory_cannot_be_determined_skipping_primary_search_paths); + } + } + var resolvedFile; + var initialLocationForSecondaryLookup; + if (containingFile) { + initialLocationForSecondaryLookup = ts.getDirectoryPath(containingFile); + } + if (initialLocationForSecondaryLookup !== undefined) { + // check secondary locations + if (traceEnabled) { + trace(host, ts.Diagnostics.Looking_up_in_node_modules_folder_initial_location_0, initialLocationForSecondaryLookup); + } + resolvedFile = loadModuleFromNodeModules(typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState); + if (traceEnabled) { + if (resolvedFile) { + trace(host, ts.Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, resolvedFile, false); + } + else { + trace(host, ts.Diagnostics.Type_reference_directive_0_was_not_resolved, typeReferenceDirectiveName); + } + } + } + else { + if (traceEnabled) { + trace(host, ts.Diagnostics.Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder); + } + } + return { + resolvedTypeReferenceDirective: resolvedFile + ? { primary: false, resolvedFileName: resolvedFile } + : undefined, + failedLookupLocations: failedLookupLocations + }; + } + ts.resolveTypeReferenceDirective = resolveTypeReferenceDirective; + function resolveModuleName(moduleName, containingFile, compilerOptions, host) { + var traceEnabled = isTraceEnabled(compilerOptions, host); + if (traceEnabled) { + trace(host, ts.Diagnostics.Resolving_module_0_from_1, moduleName, containingFile); + } + var moduleResolution = compilerOptions.moduleResolution; + if (moduleResolution === undefined) { + moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic; + if (traceEnabled) { + trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]); + } + } + else { + if (traceEnabled) { + trace(host, ts.Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ts.ModuleResolutionKind[moduleResolution]); + } + } + var result; + switch (moduleResolution) { + case ts.ModuleResolutionKind.NodeJs: + result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host); + break; + case ts.ModuleResolutionKind.Classic: + result = classicNameResolver(moduleName, containingFile, compilerOptions, host); + break; + } + if (traceEnabled) { + if (result.resolvedModule) { + trace(host, ts.Diagnostics.Module_name_0_was_successfully_resolved_to_1, moduleName, result.resolvedModule.resolvedFileName); + } + else { + trace(host, ts.Diagnostics.Module_name_0_was_not_resolved, moduleName); + } + } + return result; + } ts.resolveModuleName = resolveModuleName; + /** + * Any module resolution kind can be augmented with optional settings: 'baseUrl', 'paths' and 'rootDirs' - they are used to + * mitigate differences between design time structure of the project and its runtime counterpart so the same import name + * can be resolved successfully by TypeScript compiler and runtime module loader. + * If these settings are set then loading procedure will try to use them to resolve module name and it can of failure it will + * fallback to standard resolution routine. + * + * - baseUrl - this setting controls how non-relative module names are resolved. If this setting is specified then non-relative + * names will be resolved relative to baseUrl: i.e. if baseUrl is '/a/b' then candidate location to resolve module name 'c/d' will + * be '/a/b/c/d' + * - paths - this setting can only be used when baseUrl is specified. allows to tune how non-relative module names + * will be resolved based on the content of the module name. + * Structure of 'paths' compiler options + * 'paths': { + * pattern-1: [...substitutions], + * pattern-2: [...substitutions], + * ... + * pattern-n: [...substitutions] + * } + * Pattern here is a string that can contain zero or one '*' character. During module resolution module name will be matched against + * all patterns in the list. Matching for patterns that don't contain '*' means that module name must be equal to pattern respecting the case. + * If pattern contains '*' then to match pattern "*" module name must start with the and end with . + * denotes part of the module name between and . + * If module name can be matches with multiple patterns then pattern with the longest prefix will be picked. + * After selecting pattern we'll use list of substitutions to get candidate locations of the module and the try to load module + * from the candidate location. + * Substitution is a string that can contain zero or one '*'. To get candidate location from substitution we'll pick every + * substitution in the list and replace '*' with string. If candidate location is not rooted it + * will be converted to absolute using baseUrl. + * For example: + * baseUrl: /a/b/c + * "paths": { + * // match all module names + * "*": [ + * "*", // use matched name as is, + * // will be looked as /a/b/c/ + * + * "folder1/*" // substitution will convert matched name to 'folder1/', + * // since it is not rooted then final candidate location will be /a/b/c/folder1/ + * ], + * // match module names that start with 'components/' + * "components/*": [ "/root/components/*" ] // substitution will convert /components/folder1/ to '/root/components/folder1/', + * // it is rooted so it will be final candidate location + * } + * + * 'rootDirs' allows the project to be spreaded across multiple locations and resolve modules with relative names as if + * they were in the same location. For example lets say there are two files + * '/local/src/content/file1.ts' + * '/shared/components/contracts/src/content/protocols/file2.ts' + * After bundling content of '/shared/components/contracts/src' will be merged with '/local/src' so + * if file1 has the following import 'import {x} from "./protocols/file2"' it will be resolved successfully in runtime. + * 'rootDirs' provides the way to tell compiler that in order to get the whole project it should behave as if content of all + * root dirs were merged together. + * I.e. for the example above 'rootDirs' will have two entries: [ '/local/src', '/shared/components/contracts/src' ]. + * Compiler will first convert './protocols/file2' into absolute path relative to the location of containing file: + * '/local/src/content/protocols/file2' and try to load it - failure. + * Then it will search 'rootDirs' looking for a longest matching prefix of this absolute path and if such prefix is found - absolute path will + * be converted to a path relative to found rootDir entry './content/protocols/file2' (*). As a last step compiler will check all remaining + * entries in 'rootDirs', use them to build absolute path out of (*) and try to resolve module from this location. + */ + function tryLoadModuleUsingOptionalResolutionSettings(moduleName, containingDirectory, loader, failedLookupLocations, supportedExtensions, state) { + if (moduleHasNonRelativeName(moduleName)) { + return tryLoadModuleUsingBaseUrl(moduleName, loader, failedLookupLocations, supportedExtensions, state); + } + else { + return tryLoadModuleUsingRootDirs(moduleName, containingDirectory, loader, failedLookupLocations, supportedExtensions, state); + } + } + function tryLoadModuleUsingRootDirs(moduleName, containingDirectory, loader, failedLookupLocations, supportedExtensions, state) { + if (!state.compilerOptions.rootDirs) { + return undefined; + } + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0, moduleName); + } + var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName)); + var matchedRootDir; + var matchedNormalizedPrefix; + for (var _i = 0, _a = state.compilerOptions.rootDirs; _i < _a.length; _i++) { + var rootDir = _a[_i]; + // rootDirs are expected to be absolute + // in case of tsconfig.json this will happen automatically - compiler will expand relative names + // using location of tsconfig.json as base location + var normalizedRoot = ts.normalizePath(rootDir); + if (!ts.endsWith(normalizedRoot, ts.directorySeparator)) { + normalizedRoot += ts.directorySeparator; + } + var isLongestMatchingPrefix = ts.startsWith(candidate, normalizedRoot) && + (matchedNormalizedPrefix === undefined || matchedNormalizedPrefix.length < normalizedRoot.length); + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.Checking_if_0_is_the_longest_matching_prefix_for_1_2, normalizedRoot, candidate, isLongestMatchingPrefix); + } + if (isLongestMatchingPrefix) { + matchedNormalizedPrefix = normalizedRoot; + matchedRootDir = rootDir; + } + } + if (matchedNormalizedPrefix) { + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.Longest_matching_prefix_for_0_is_1, candidate, matchedNormalizedPrefix); + } + var suffix = candidate.substr(matchedNormalizedPrefix.length); + // first - try to load from a initial location + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, matchedNormalizedPrefix, candidate); + } + var resolvedFileName = loader(candidate, supportedExtensions, failedLookupLocations, !directoryProbablyExists(containingDirectory, state.host), state); + if (resolvedFileName) { + return resolvedFileName; + } + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.Trying_other_entries_in_rootDirs); + } + // then try to resolve using remaining entries in rootDirs + for (var _b = 0, _c = state.compilerOptions.rootDirs; _b < _c.length; _b++) { + var rootDir = _c[_b]; + if (rootDir === matchedRootDir) { + // skip the initially matched entry + continue; + } + var candidate_1 = ts.combinePaths(ts.normalizePath(rootDir), suffix); + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, rootDir, candidate_1); + } + var baseDirectory = ts.getDirectoryPath(candidate_1); + var resolvedFileName_1 = loader(candidate_1, supportedExtensions, failedLookupLocations, !directoryProbablyExists(baseDirectory, state.host), state); + if (resolvedFileName_1) { + return resolvedFileName_1; + } + } + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.Module_resolution_using_rootDirs_has_failed); + } + } + return undefined; + } + function tryLoadModuleUsingBaseUrl(moduleName, loader, failedLookupLocations, supportedExtensions, state) { + if (!state.compilerOptions.baseUrl) { + return undefined; + } + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1, state.compilerOptions.baseUrl, moduleName); + } + // string is for exact match + var matchedPattern = undefined; + if (state.compilerOptions.paths) { + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0, moduleName); + } + matchedPattern = matchPatternOrExact(ts.getOwnKeys(state.compilerOptions.paths), moduleName); + } + if (matchedPattern) { + var matchedStar = typeof matchedPattern === "string" ? undefined : matchedText(matchedPattern, moduleName); + var matchedPatternText = typeof matchedPattern === "string" ? matchedPattern : patternText(matchedPattern); + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPatternText); + } + for (var _i = 0, _a = state.compilerOptions.paths[matchedPatternText]; _i < _a.length; _i++) { + var subst = _a[_i]; + var path = matchedStar ? subst.replace("*", matchedStar) : subst; + var candidate = ts.normalizePath(ts.combinePaths(state.compilerOptions.baseUrl, path)); + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path); + } + var resolvedFileName = loader(candidate, supportedExtensions, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state); + if (resolvedFileName) { + return resolvedFileName; + } + } + return undefined; + } + else { + var candidate = ts.normalizePath(ts.combinePaths(state.compilerOptions.baseUrl, moduleName)); + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.Resolving_module_name_0_relative_to_base_url_1_2, moduleName, state.compilerOptions.baseUrl, candidate); + } + return loader(candidate, supportedExtensions, failedLookupLocations, !directoryProbablyExists(ts.getDirectoryPath(candidate), state.host), state); + } + } + /** + * patternStrings contains both pattern strings (containing "*") and regular strings. + * Return an exact match if possible, or a pattern match, or undefined. + * (These are verified by verifyCompilerOptions to have 0 or 1 "*" characters.) + */ + function matchPatternOrExact(patternStrings, candidate) { + var patterns = []; + for (var _i = 0, patternStrings_1 = patternStrings; _i < patternStrings_1.length; _i++) { + var patternString = patternStrings_1[_i]; + var pattern = tryParsePattern(patternString); + if (pattern) { + patterns.push(pattern); + } + else if (patternString === candidate) { + // pattern was matched as is - no need to search further + return patternString; + } + } + return findBestPatternMatch(patterns, function (_) { return _; }, candidate); + } + function patternText(_a) { + var prefix = _a.prefix, suffix = _a.suffix; + return prefix + "*" + suffix; + } + /** + * Given that candidate matches pattern, returns the text matching the '*'. + * E.g.: matchedText(tryParsePattern("foo*baz"), "foobarbaz") === "bar" + */ + function matchedText(pattern, candidate) { + ts.Debug.assert(isPatternMatch(pattern, candidate)); + return candidate.substr(pattern.prefix.length, candidate.length - pattern.suffix.length); + } + /** Return the object corresponding to the best pattern to match `candidate`. */ + /* @internal */ + function findBestPatternMatch(values, getPattern, candidate) { + var matchedValue = undefined; + // use length of prefix as betterness criteria + var longestMatchPrefixLength = -1; + for (var _i = 0, values_1 = values; _i < values_1.length; _i++) { + var v = values_1[_i]; + var pattern = getPattern(v); + if (isPatternMatch(pattern, candidate) && pattern.prefix.length > longestMatchPrefixLength) { + longestMatchPrefixLength = pattern.prefix.length; + matchedValue = v; + } + } + return matchedValue; + } + ts.findBestPatternMatch = findBestPatternMatch; + function isPatternMatch(_a, candidate) { + var prefix = _a.prefix, suffix = _a.suffix; + return candidate.length >= prefix.length + suffix.length && + ts.startsWith(candidate, prefix) && + ts.endsWith(candidate, suffix); + } + /* @internal */ + function tryParsePattern(pattern) { + // This should be verified outside of here and a proper error thrown. + ts.Debug.assert(hasZeroOrOneAsteriskCharacter(pattern)); + var indexOfStar = pattern.indexOf("*"); + return indexOfStar === -1 ? undefined : { + prefix: pattern.substr(0, indexOfStar), + suffix: pattern.substr(indexOfStar + 1) + }; + } + ts.tryParsePattern = tryParsePattern; function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host) { var containingDirectory = ts.getDirectoryPath(containingFile); var supportedExtensions = ts.getSupportedExtensions(compilerOptions); - if (ts.getRootLength(moduleName) !== 0 || nameStartsWithDotSlashOrDotDotSlash(moduleName)) { - var failedLookupLocations = []; - var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName)); - var resolvedFileName = loadNodeModuleFromFile(supportedExtensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, host); - if (resolvedFileName) { - return { resolvedModule: { resolvedFileName: resolvedFileName }, failedLookupLocations: failedLookupLocations }; + var traceEnabled = isTraceEnabled(compilerOptions, host); + var failedLookupLocations = []; + var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, skipTsx: false }; + var resolvedFileName = tryLoadModuleUsingOptionalResolutionSettings(moduleName, containingDirectory, nodeLoadModuleByRelativeName, failedLookupLocations, supportedExtensions, state); + var isExternalLibraryImport = false; + if (!resolvedFileName) { + if (moduleHasNonRelativeName(moduleName)) { + if (traceEnabled) { + trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder, moduleName); + } + resolvedFileName = loadModuleFromNodeModules(moduleName, containingDirectory, failedLookupLocations, state); + isExternalLibraryImport = resolvedFileName !== undefined; + } + else { + var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName)); + resolvedFileName = nodeLoadModuleByRelativeName(candidate, supportedExtensions, failedLookupLocations, /*onlyRecordFailures*/ false, state); } - resolvedFileName = loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, host); - return resolvedFileName - ? { resolvedModule: { resolvedFileName: resolvedFileName }, failedLookupLocations: failedLookupLocations } - : { resolvedModule: undefined, failedLookupLocations: failedLookupLocations }; } - else { - return loadModuleFromNodeModules(moduleName, containingDirectory, host); + if (resolvedFileName && host.realpath) { + var originalFileName = resolvedFileName; + resolvedFileName = ts.normalizePath(host.realpath(resolvedFileName)); + if (traceEnabled) { + trace(host, ts.Diagnostics.Resolving_real_path_for_0_result_1, originalFileName, resolvedFileName); + } } + return createResolvedModule(resolvedFileName, isExternalLibraryImport, failedLookupLocations); } ts.nodeModuleNameResolver = nodeModuleNameResolver; + function nodeLoadModuleByRelativeName(candidate, supportedExtensions, failedLookupLocations, onlyRecordFailures, state) { + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0, candidate); + } + var resolvedFileName = loadModuleFromFile(candidate, supportedExtensions, failedLookupLocations, onlyRecordFailures, state); + return resolvedFileName || loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, onlyRecordFailures, state); + } /* @internal */ function directoryProbablyExists(directoryName, host) { // if host does not support 'directoryExists' assume that directory will exist @@ -39423,63 +44565,118 @@ var ts; * @param {boolean} onlyRecordFailures - if true then function won't try to actually load files but instead record all attempts as failures. This flag is necessary * in cases when we know upfront that all load attempts will fail (because containing folder does not exists) however we still need to record all failed lookup locations. */ - function loadNodeModuleFromFile(extensions, candidate, failedLookupLocation, onlyRecordFailures, host) { - return ts.forEach(extensions, tryLoad); - function tryLoad(ext) { - var fileName = ts.fileExtensionIs(candidate, ext) ? candidate : candidate + ext; - if (!onlyRecordFailures && host.fileExists(fileName)) { - return fileName; - } - else { - failedLookupLocation.push(fileName); - return undefined; + function loadModuleFromFile(candidate, extensions, failedLookupLocation, onlyRecordFailures, state) { + // First, try adding an extension. An import of "foo" could be matched by a file "foo.ts", or "foo.js" by "foo.js.ts" + var resolvedByAddingExtension = tryAddingExtensions(candidate, extensions, failedLookupLocation, onlyRecordFailures, state); + if (resolvedByAddingExtension) { + return resolvedByAddingExtension; + } + // If that didn't work, try stripping a ".js" or ".jsx" extension and replacing it with a TypeScript one; + // e.g. "./foo.js" can be matched by "./foo.ts" or "./foo.d.ts" + if (ts.hasJavaScriptFileExtension(candidate)) { + var extensionless = ts.removeFileExtension(candidate); + if (state.traceEnabled) { + var extension = candidate.substring(extensionless.length); + trace(state.host, ts.Diagnostics.File_name_0_has_a_1_extension_stripping_it, candidate, extension); } + return tryAddingExtensions(extensionless, extensions, failedLookupLocation, onlyRecordFailures, state); } } - function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocation, onlyRecordFailures, host) { - var packageJsonPath = ts.combinePaths(candidate, "package.json"); - var directoryExists = !onlyRecordFailures && directoryProbablyExists(candidate, host); - if (directoryExists && host.fileExists(packageJsonPath)) { - var jsonContent = void 0; - try { - var jsonText = host.readFile(packageJsonPath); - jsonContent = jsonText ? JSON.parse(jsonText) : { typings: undefined }; + /** Try to return an existing file that adds one of the `extensions` to `candidate`. */ + function tryAddingExtensions(candidate, extensions, failedLookupLocation, onlyRecordFailures, state) { + if (!onlyRecordFailures) { + // check if containing folder exists - if it doesn't then just record failures for all supported extensions without disk probing + var directory = ts.getDirectoryPath(candidate); + if (directory) { + onlyRecordFailures = !directoryProbablyExists(directory, state.host); } - catch (e) { - // gracefully handle if readFile fails or returns not JSON - jsonContent = { typings: undefined }; + } + return ts.forEach(extensions, function (ext) { + return !(state.skipTsx && ts.isJsxOrTsxExtension(ext)) && tryFile(candidate + ext, failedLookupLocation, onlyRecordFailures, state); + }); + } + /** Return the file if it exists. */ + function tryFile(fileName, failedLookupLocation, onlyRecordFailures, state) { + if (!onlyRecordFailures && state.host.fileExists(fileName)) { + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName); } - if (typeof jsonContent.typings === "string") { - var path = ts.normalizePath(ts.combinePaths(candidate, jsonContent.typings)); - var result = loadNodeModuleFromFile(extensions, path, failedLookupLocation, !directoryProbablyExists(ts.getDirectoryPath(path), host), host); + return fileName; + } + else { + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName); + } + failedLookupLocation.push(fileName); + return undefined; + } + } + function loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocation, onlyRecordFailures, state) { + var packageJsonPath = pathToPackageJson(candidate); + var directoryExists = !onlyRecordFailures && directoryProbablyExists(candidate, state.host); + if (directoryExists && state.host.fileExists(packageJsonPath)) { + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.Found_package_json_at_0, packageJsonPath); + } + var typesFile = tryReadTypesSection(packageJsonPath, candidate, state); + if (typesFile) { + var onlyRecordFailures_1 = !directoryProbablyExists(ts.getDirectoryPath(typesFile), state.host); + // A package.json "typings" may specify an exact filename, or may choose to omit an extension. + var result = tryFile(typesFile, failedLookupLocation, onlyRecordFailures_1, state) || + tryAddingExtensions(typesFile, extensions, failedLookupLocation, onlyRecordFailures_1, state); if (result) { return result; } } + else { + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.package_json_does_not_have_types_field); + } + } } else { + if (state.traceEnabled) { + trace(state.host, ts.Diagnostics.File_0_does_not_exist, packageJsonPath); + } // record package json as one of failed lookup locations - in the future if this file will appear it will invalidate resolution results failedLookupLocation.push(packageJsonPath); } - return loadNodeModuleFromFile(extensions, ts.combinePaths(candidate, "index"), failedLookupLocation, !directoryExists, host); + return loadModuleFromFile(ts.combinePaths(candidate, "index"), extensions, failedLookupLocation, !directoryExists, state); } - function loadModuleFromNodeModules(moduleName, directory, host) { - var failedLookupLocations = []; + function pathToPackageJson(directory) { + return ts.combinePaths(directory, "package.json"); + } + function loadModuleFromNodeModulesFolder(moduleName, directory, failedLookupLocations, state) { + var nodeModulesFolder = ts.combinePaths(directory, "node_modules"); + var nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host); + var candidate = ts.normalizePath(ts.combinePaths(nodeModulesFolder, moduleName)); + var supportedExtensions = ts.getSupportedExtensions(state.compilerOptions); + var result = loadModuleFromFile(candidate, supportedExtensions, failedLookupLocations, !nodeModulesFolderExists, state); + if (result) { + return result; + } + result = loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state); + if (result) { + return result; + } + } + function loadModuleFromNodeModules(moduleName, directory, failedLookupLocations, state) { directory = ts.normalizeSlashes(directory); while (true) { var baseName = ts.getBaseFileName(directory); if (baseName !== "node_modules") { - var nodeModulesFolder = ts.combinePaths(directory, "node_modules"); - var nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, host); - var candidate = ts.normalizePath(ts.combinePaths(nodeModulesFolder, moduleName)); - // Load only typescript files irrespective of allowJs option if loading from node modules - var result = loadNodeModuleFromFile(ts.supportedTypeScriptExtensions, candidate, failedLookupLocations, !nodeModulesFolderExists, host); - if (result) { - return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations: failedLookupLocations }; + // Try to load source from the package + var packageResult = loadModuleFromNodeModulesFolder(moduleName, directory, failedLookupLocations, state); + if (packageResult && ts.hasTypeScriptFileExtension(packageResult)) { + // Always prefer a TypeScript (.ts, .tsx, .d.ts) file shipped with the package + return packageResult; } - result = loadNodeModuleFromDirectory(ts.supportedTypeScriptExtensions, candidate, failedLookupLocations, !nodeModulesFolderExists, host); - if (result) { - return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations: failedLookupLocations }; + else { + // Else prefer a types package over non-TypeScript results (e.g. JavaScript files) + var typesResult = loadModuleFromNodeModulesFolder(ts.combinePaths("@types", moduleName), directory, failedLookupLocations, state); + if (typesResult || packageResult) { + return typesResult || packageResult; + } } } var parentPath = ts.getDirectoryPath(directory); @@ -39488,61 +44685,44 @@ var ts; } directory = parentPath; } - return { resolvedModule: undefined, failedLookupLocations: failedLookupLocations }; - } - function nameStartsWithDotSlashOrDotDotSlash(name) { - var i = name.lastIndexOf("./", 1); - return i === 0 || (i === 1 && name.charCodeAt(0) === 46 /* dot */); + return undefined; } function classicNameResolver(moduleName, containingFile, compilerOptions, host) { - // module names that contain '!' are used to reference resources and are not resolved to actual files on disk - if (moduleName.indexOf("!") != -1) { - return { resolvedModule: undefined, failedLookupLocations: [] }; - } - var searchPath = ts.getDirectoryPath(containingFile); - var searchName; + var traceEnabled = isTraceEnabled(compilerOptions, host); + var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, skipTsx: !compilerOptions.jsx }; var failedLookupLocations = []; - var referencedSourceFile; var supportedExtensions = ts.getSupportedExtensions(compilerOptions); - while (true) { - searchName = ts.normalizePath(ts.combinePaths(searchPath, moduleName)); - referencedSourceFile = ts.forEach(supportedExtensions, function (extension) { - if (extension === ".tsx" && !compilerOptions.jsx) { - // resolve .tsx files only if jsx support is enabled - // 'logical not' handles both undefined and None cases - return undefined; + var containingDirectory = ts.getDirectoryPath(containingFile); + var resolvedFileName = tryLoadModuleUsingOptionalResolutionSettings(moduleName, containingDirectory, loadModuleFromFile, failedLookupLocations, supportedExtensions, state); + if (resolvedFileName) { + return createResolvedModule(resolvedFileName, /*isExternalLibraryImport*/ false, failedLookupLocations); + } + var referencedSourceFile; + if (moduleHasNonRelativeName(moduleName)) { + while (true) { + var searchName = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName)); + referencedSourceFile = loadModuleFromFile(searchName, supportedExtensions, failedLookupLocations, /*onlyRecordFailures*/ false, state); + if (referencedSourceFile) { + break; } - var candidate = searchName + extension; - if (host.fileExists(candidate)) { - return candidate; + var parentPath = ts.getDirectoryPath(containingDirectory); + if (parentPath === containingDirectory) { + break; } - else { - failedLookupLocations.push(candidate); - } - }); - if (referencedSourceFile) { - break; + containingDirectory = parentPath; } - var parentPath = ts.getDirectoryPath(searchPath); - if (parentPath === searchPath) { - break; - } - searchPath = parentPath; + } + else { + var candidate = ts.normalizePath(ts.combinePaths(containingDirectory, moduleName)); + referencedSourceFile = loadModuleFromFile(candidate, supportedExtensions, failedLookupLocations, /*onlyRecordFailures*/ false, state); } return referencedSourceFile ? { resolvedModule: { resolvedFileName: referencedSourceFile }, failedLookupLocations: failedLookupLocations } : { resolvedModule: undefined, failedLookupLocations: failedLookupLocations }; } ts.classicNameResolver = classicNameResolver; - /* @internal */ - ts.defaultInitCompilerOptions = { - module: 1 /* CommonJS */, - target: 1 /* ES5 */, - noImplicitAny: false, - sourceMap: false - }; function createCompilerHost(options, setParentNodes) { - var existingDirectories = {}; + var existingDirectories = ts.createMap(); function getCanonicalFileName(fileName) { // if underlying system can distinguish between two files whose names differs only in cases then file name already in canonical form. // otherwise use toLowerCase as a canonical form. @@ -39553,9 +44733,10 @@ var ts; function getSourceFile(fileName, languageVersion, onError) { var text; try { - var start = new Date().getTime(); + ts.performance.mark("beforeIORead"); text = ts.sys.readFile(fileName, options.charset); - ts.ioReadTime += new Date().getTime() - start; + ts.performance.mark("afterIORead"); + ts.performance.measure("I/O Read", "beforeIORead", "afterIORead"); } catch (e) { if (onError) { @@ -39568,7 +44749,7 @@ var ts; return text !== undefined ? ts.createSourceFile(fileName, text, languageVersion, setParentNodes) : undefined; } function directoryExists(directoryPath) { - if (ts.hasProperty(existingDirectories, directoryPath)) { + if (directoryPath in existingDirectories) { return true; } if (ts.sys.directoryExists(directoryPath)) { @@ -39584,12 +44765,42 @@ var ts; ts.sys.createDirectory(directoryPath); } } + var outputFingerprints; + function writeFileIfUpdated(fileName, data, writeByteOrderMark) { + if (!outputFingerprints) { + outputFingerprints = ts.createMap(); + } + var hash = ts.sys.createHash(data); + var mtimeBefore = ts.sys.getModifiedTime(fileName); + if (mtimeBefore && fileName in outputFingerprints) { + var fingerprint = outputFingerprints[fileName]; + // If output has not been changed, and the file has no external modification + if (fingerprint.byteOrderMark === writeByteOrderMark && + fingerprint.hash === hash && + fingerprint.mtime.getTime() === mtimeBefore.getTime()) { + return; + } + } + ts.sys.writeFile(fileName, data, writeByteOrderMark); + var mtimeAfter = ts.sys.getModifiedTime(fileName); + outputFingerprints[fileName] = { + hash: hash, + byteOrderMark: writeByteOrderMark, + mtime: mtimeAfter + }; + } function writeFile(fileName, data, writeByteOrderMark, onError) { try { - var start = new Date().getTime(); + ts.performance.mark("beforeIOWrite"); ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); - ts.sys.writeFile(fileName, data, writeByteOrderMark); - ts.ioWriteTime += new Date().getTime() - start; + if (ts.isWatchSet(options) && ts.sys.createHash && ts.sys.getModifiedTime) { + writeFileIfUpdated(fileName, data, writeByteOrderMark); + } + else { + ts.sys.writeFile(fileName, data, writeByteOrderMark); + } + ts.performance.mark("afterIOWrite"); + ts.performance.measure("I/O Write", "beforeIOWrite", "afterIOWrite"); } catch (e) { if (onError) { @@ -39597,10 +44808,15 @@ var ts; } } } + function getDefaultLibLocation() { + return ts.getDirectoryPath(ts.normalizePath(ts.sys.getExecutingFilePath())); + } var newLine = ts.getNewLineCharacter(options); + var realpath = ts.sys.realpath && (function (path) { return ts.sys.realpath(path); }); return { getSourceFile: getSourceFile, - getDefaultLibFileName: function (options) { return ts.combinePaths(ts.getDirectoryPath(ts.normalizePath(ts.sys.getExecutingFilePath())), ts.getDefaultLibFileName(options)); }, + getDefaultLibLocation: getDefaultLibLocation, + getDefaultLibFileName: function (options) { return ts.combinePaths(getDefaultLibLocation(), ts.getDefaultLibFileName(options)); }, writeFile: writeFile, getCurrentDirectory: ts.memoize(function () { return ts.sys.getCurrentDirectory(); }), useCaseSensitiveFileNames: function () { return ts.sys.useCaseSensitiveFileNames; }, @@ -39608,7 +44824,10 @@ var ts; getNewLine: function () { return newLine; }, fileExists: function (fileName) { return ts.sys.fileExists(fileName); }, readFile: function (fileName) { return ts.sys.readFile(fileName); }, - directoryExists: function (directoryName) { return ts.sys.directoryExists(directoryName); } + trace: function (s) { return ts.sys.write(s + newLine); }, + directoryExists: function (directoryName) { return ts.sys.directoryExists(directoryName); }, + getDirectories: function (path) { return ts.sys.getDirectories(path); }, + realpath: realpath }; } ts.createCompilerHost = createCompilerHost; @@ -39620,6 +44839,22 @@ var ts; return ts.sortAndDeduplicateDiagnostics(diagnostics); } ts.getPreEmitDiagnostics = getPreEmitDiagnostics; + function formatDiagnostics(diagnostics, host) { + var output = ""; + for (var _i = 0, diagnostics_2 = diagnostics; _i < diagnostics_2.length; _i++) { + var diagnostic = diagnostics_2[_i]; + if (diagnostic.file) { + var _a = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start), line = _a.line, character = _a.character; + var fileName = diagnostic.file.fileName; + var relativeFileName = ts.convertToRelativePath(fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); }); + output += relativeFileName + "(" + (line + 1) + "," + (character + 1) + "): "; + } + var category = ts.DiagnosticCategory[diagnostic.category].toLowerCase(); + output += category + " TS" + diagnostic.code + ": " + flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine()) + host.getNewLine(); + } + return output; + } + ts.formatDiagnostics = formatDiagnostics; function flattenDiagnosticMessageText(messageText, newLine) { if (typeof messageText === "string") { return messageText; @@ -39643,71 +44878,139 @@ var ts; } } ts.flattenDiagnosticMessageText = flattenDiagnosticMessageText; + function loadWithLocalCache(names, containingFile, loader) { + if (names.length === 0) { + return []; + } + var resolutions = []; + var cache = ts.createMap(); + for (var _i = 0, names_1 = names; _i < names_1.length; _i++) { + var name_34 = names_1[_i]; + var result = name_34 in cache + ? cache[name_34] + : cache[name_34] = loader(name_34, containingFile); + resolutions.push(result); + } + return resolutions; + } + /** + * Given a set of options, returns the set of type directive names + * that should be included for this program automatically. + * This list could either come from the config file, + * or from enumerating the types root + initial secondary types lookup location. + * More type directives might appear in the program later as a result of loading actual source files; + * this list is only the set of defaults that are implicitly included. + */ + function getAutomaticTypeDirectiveNames(options, host) { + // Use explicit type list from tsconfig.json + if (options.types) { + return options.types; + } + // Walk the primary type lookup locations + var result = []; + if (host.directoryExists && host.getDirectories) { + var typeRoots = getEffectiveTypeRoots(options, host); + if (typeRoots) { + for (var _i = 0, typeRoots_1 = typeRoots; _i < typeRoots_1.length; _i++) { + var root = typeRoots_1[_i]; + if (host.directoryExists(root)) { + for (var _a = 0, _b = host.getDirectories(root); _a < _b.length; _a++) { + var typeDirectivePath = _b[_a]; + var normalized = ts.normalizePath(typeDirectivePath); + var packageJsonPath = pathToPackageJson(ts.combinePaths(root, normalized)); + // tslint:disable-next-line:no-null-keyword + var isNotNeededPackage = host.fileExists(packageJsonPath) && readJson(packageJsonPath, host).typings === null; + if (!isNotNeededPackage) { + // Return just the type directive names + result.push(ts.getBaseFileName(normalized)); + } + } + } + } + } + } + return result; + } + ts.getAutomaticTypeDirectiveNames = getAutomaticTypeDirectiveNames; function createProgram(rootNames, options, host, oldProgram) { var program; var files = []; - var fileProcessingDiagnostics = ts.createDiagnosticCollection(); - var programDiagnostics = ts.createDiagnosticCollection(); var commonSourceDirectory; var diagnosticsProducingTypeChecker; var noDiagnosticsTypeChecker; var classifiableNames; - var programSizeLimitExceeded = -1; - var programSizeForNonTsFiles = 0; - var skipDefaultLib = options.noLib; - var supportedExtensions = ts.getSupportedExtensions(options); - var start = new Date().getTime(); + var resolvedTypeReferenceDirectives = ts.createMap(); + var fileProcessingDiagnostics = ts.createDiagnosticCollection(); + // The below settings are to track if a .js file should be add to the program if loaded via searching under node_modules. + // This works as imported modules are discovered recursively in a depth first manner, specifically: + // - For each root file, findSourceFile is called. + // - This calls processImportedModules for each module imported in the source file. + // - This calls resolveModuleNames, and then calls findSourceFile for each resolved module. + // As all these operations happen - and are nested - within the createProgram call, they close over the below variables. + // The current resolution depth is tracked by incrementing/decrementing as the depth first search progresses. + var maxNodeModulesJsDepth = typeof options.maxNodeModuleJsDepth === "number" ? options.maxNodeModuleJsDepth : 0; + var currentNodeModulesDepth = 0; + // If a module has some of its imports skipped due to being at the depth limit under node_modules, then track + // this, as it may be imported at a shallower depth later, and then it will need its skipped imports processed. + var modulesWithElidedImports = ts.createMap(); + // Track source files that are source files found by searching under node_modules, as these shouldn't be compiled. + var sourceFilesFoundSearchingNodeModules = ts.createMap(); + ts.performance.mark("beforeProgram"); host = host || createCompilerHost(options); + var skipDefaultLib = options.noLib; + var programDiagnostics = ts.createDiagnosticCollection(); + var currentDirectory = host.getCurrentDirectory(); + var supportedExtensions = ts.getSupportedExtensions(options); // Map storing if there is emit blocking diagnostics for given input var hasEmitBlockingDiagnostics = ts.createFileMap(getCanonicalFileName); - var currentDirectory = host.getCurrentDirectory(); - var resolveModuleNamesWorker = host.resolveModuleNames - ? (function (moduleNames, containingFile) { return host.resolveModuleNames(moduleNames, containingFile); }) - : (function (moduleNames, containingFile) { - var resolvedModuleNames = []; - // resolveModuleName does not store any results between calls. - // lookup is a local cache to avoid resolving the same module name several times - var lookup = {}; - for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) { - var moduleName = moduleNames_1[_i]; - var resolvedName = void 0; - if (ts.hasProperty(lookup, moduleName)) { - resolvedName = lookup[moduleName]; - } - else { - resolvedName = resolveModuleName(moduleName, containingFile, options, host).resolvedModule; - lookup[moduleName] = resolvedName; - } - resolvedModuleNames.push(resolvedName); - } - return resolvedModuleNames; - }); + var resolveModuleNamesWorker; + if (host.resolveModuleNames) { + resolveModuleNamesWorker = function (moduleNames, containingFile) { return host.resolveModuleNames(moduleNames, containingFile); }; + } + else { + var loader_1 = function (moduleName, containingFile) { return resolveModuleName(moduleName, containingFile, options, host).resolvedModule; }; + resolveModuleNamesWorker = function (moduleNames, containingFile) { return loadWithLocalCache(moduleNames, containingFile, loader_1); }; + } + var resolveTypeReferenceDirectiveNamesWorker; + if (host.resolveTypeReferenceDirectives) { + resolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile) { return host.resolveTypeReferenceDirectives(typeDirectiveNames, containingFile); }; + } + else { + var loader_2 = function (typesRef, containingFile) { return resolveTypeReferenceDirective(typesRef, containingFile, options, host).resolvedTypeReferenceDirective; }; + resolveTypeReferenceDirectiveNamesWorker = function (typeReferenceDirectiveNames, containingFile) { return loadWithLocalCache(typeReferenceDirectiveNames, containingFile, loader_2); }; + } var filesByName = ts.createFileMap(); // stores 'filename -> file association' ignoring case - // used to track cases when two file names differ only in casing + // used to track cases when two file names differ only in casing var filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? ts.createFileMap(function (fileName) { return fileName.toLowerCase(); }) : undefined; - if (oldProgram) { - // check properties that can affect structure of the program or module resolution strategy - // if any of these properties has changed - structure cannot be reused - var oldOptions = oldProgram.getCompilerOptions(); - if ((oldOptions.module !== options.module) || - (oldOptions.noResolve !== options.noResolve) || - (oldOptions.target !== options.target) || - (oldOptions.noLib !== options.noLib) || - (oldOptions.jsx !== options.jsx) || - (oldOptions.allowJs !== options.allowJs) || - (oldOptions.disableSizeLimit !== options.disableSizeLimit)) { - oldProgram = undefined; - } - } if (!tryReuseStructureFromOldProgram()) { ts.forEach(rootNames, function (name) { return processRootFile(name, /*isDefaultLib*/ false); }); + // load type declarations specified via 'types' argument or implicitly from types/ and node_modules/@types folders + var typeReferences = getAutomaticTypeDirectiveNames(options, host); + if (typeReferences) { + // This containingFilename needs to match with the one used in managed-side + var containingFilename = ts.combinePaths(host.getCurrentDirectory(), "__inferred type names__.ts"); + var resolutions = resolveTypeReferenceDirectiveNamesWorker(typeReferences, containingFilename); + for (var i = 0; i < typeReferences.length; i++) { + processTypeReferenceDirective(typeReferences[i], resolutions[i]); + } + } // Do not process the default library if: // - The '--noLib' flag is used. // - A 'no-default-lib' reference comment is encountered in // processing the root files. if (!skipDefaultLib) { - processRootFile(host.getDefaultLibFileName(options), /*isDefaultLib*/ true); + // If '--lib' is not specified, include default library file according to '--target' + // otherwise, using options specified in '--lib' instead of '--target' default library file + if (!options.lib) { + processRootFile(host.getDefaultLibFileName(options), /*isDefaultLib*/ true); + } + else { + var libDirectory_1 = host.getDefaultLibLocation ? host.getDefaultLibLocation() : ts.getDirectoryPath(host.getDefaultLibFileName(options)); + ts.forEach(options.lib, function (libFileName) { + processRootFile(ts.combinePaths(libDirectory_1, libFileName), /*isDefaultLib*/ true); + }); + } } } // unconditionally set oldProgram to undefined to prevent it from being captured in closure @@ -39715,6 +45018,7 @@ var ts; program = { getRootFileNames: function () { return rootNames; }, getSourceFile: getSourceFile, + getSourceFileByPath: getSourceFileByPath, getSourceFiles: function () { return files; }, getCompilerOptions: function () { return options; }, getSyntacticDiagnostics: getSyntacticDiagnostics, @@ -39732,14 +45036,13 @@ var ts; getIdentifierCount: function () { return getDiagnosticsProducingTypeChecker().getIdentifierCount(); }, getSymbolCount: function () { return getDiagnosticsProducingTypeChecker().getSymbolCount(); }, getTypeCount: function () { return getDiagnosticsProducingTypeChecker().getTypeCount(); }, - getFileProcessingDiagnostics: function () { return fileProcessingDiagnostics; } + getFileProcessingDiagnostics: function () { return fileProcessingDiagnostics; }, + getResolvedTypeReferenceDirectives: function () { return resolvedTypeReferenceDirectives; } }; verifyCompilerOptions(); - ts.programTime += new Date().getTime() - start; + ts.performance.mark("afterProgram"); + ts.performance.measure("Program", "beforeProgram", "afterProgram"); return program; - function exceedProgramSizeLimit() { - return !options.disableSizeLimit && programSizeForNonTsFiles === programSizeLimitExceeded; - } function getCommonSourceDirectory() { if (typeof commonSourceDirectory === "undefined") { if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) { @@ -39762,10 +45065,10 @@ var ts; if (!classifiableNames) { // Initialize a checker so that all our files are bound. getTypeChecker(); - classifiableNames = {}; - for (var _i = 0, files_3 = files; _i < files_3.length; _i++) { - var sourceFile = files_3[_i]; - ts.copyMap(sourceFile.classifiableNames, classifiableNames); + classifiableNames = ts.createMap(); + for (var _i = 0, files_2 = files; _i < files_2.length; _i++) { + var sourceFile = files_2[_i]; + ts.copyProperties(sourceFile.classifiableNames, classifiableNames); } } return classifiableNames; @@ -39774,19 +45077,43 @@ var ts; if (!oldProgram) { return false; } + // check properties that can affect structure of the program or module resolution strategy + // if any of these properties has changed - structure cannot be reused + var oldOptions = oldProgram.getCompilerOptions(); + if ((oldOptions.module !== options.module) || + (oldOptions.moduleResolution !== options.moduleResolution) || + (oldOptions.noResolve !== options.noResolve) || + (oldOptions.target !== options.target) || + (oldOptions.noLib !== options.noLib) || + (oldOptions.jsx !== options.jsx) || + (oldOptions.allowJs !== options.allowJs) || + (oldOptions.rootDir !== options.rootDir) || + (oldOptions.configFilePath !== options.configFilePath) || + (oldOptions.baseUrl !== options.baseUrl) || + (oldOptions.maxNodeModuleJsDepth !== options.maxNodeModuleJsDepth) || + !ts.arrayIsEqualTo(oldOptions.typeRoots, oldOptions.typeRoots) || + !ts.arrayIsEqualTo(oldOptions.rootDirs, options.rootDirs) || + !ts.equalOwnProperties(oldOptions.paths, options.paths)) { + return false; + } ts.Debug.assert(!oldProgram.structureIsReused); // there is an old program, check if we can reuse its structure var oldRootNames = oldProgram.getRootFileNames(); if (!ts.arrayIsEqualTo(oldRootNames, rootNames)) { return false; } + if (!ts.arrayIsEqualTo(options.types, oldOptions.types)) { + return false; + } // check if program source files has changed in the way that can affect structure of the program var newSourceFiles = []; var filePaths = []; var modifiedSourceFiles = []; for (var _i = 0, _a = oldProgram.getSourceFiles(); _i < _a.length; _i++) { var oldSourceFile = _a[_i]; - var newSourceFile = host.getSourceFile(oldSourceFile.fileName, options.target); + var newSourceFile = host.getSourceFileByPath + ? host.getSourceFileByPath(oldSourceFile.fileName, oldSourceFile.path, options.target) + : host.getSourceFile(oldSourceFile.fileName, options.target); if (!newSourceFile) { return false; } @@ -39813,25 +45140,32 @@ var ts; // moduleAugmentations has changed return false; } + if (!ts.arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) { + // 'types' references has changed + return false; + } + var newSourceFilePath = ts.getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory); if (resolveModuleNamesWorker) { var moduleNames = ts.map(ts.concatenate(newSourceFile.imports, newSourceFile.moduleAugmentations), getTextOfLiteral); - var resolutions = resolveModuleNamesWorker(moduleNames, ts.getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory)); + var resolutions = resolveModuleNamesWorker(moduleNames, newSourceFilePath); // ensure that module resolution results are still correct - for (var i = 0; i < moduleNames.length; i++) { - var newResolution = resolutions[i]; - var oldResolution = ts.getResolvedModule(oldSourceFile, moduleNames[i]); - var resolutionChanged = oldResolution - ? !newResolution || - oldResolution.resolvedFileName !== newResolution.resolvedFileName || - !!oldResolution.isExternalLibraryImport !== !!newResolution.isExternalLibraryImport - : newResolution; - if (resolutionChanged) { - return false; - } + var resolutionsChanged = ts.hasChangesInResolutions(moduleNames, resolutions, oldSourceFile.resolvedModules, ts.moduleResolutionIsEqualTo); + if (resolutionsChanged) { + return false; } } - // pass the cache of module resolutions from the old source file + if (resolveTypeReferenceDirectiveNamesWorker) { + var typesReferenceDirectives = ts.map(newSourceFile.typeReferenceDirectives, function (x) { return x.fileName; }); + var resolutions = resolveTypeReferenceDirectiveNamesWorker(typesReferenceDirectives, newSourceFilePath); + // ensure that types resolutions are still correct + var resolutionsChanged = ts.hasChangesInResolutions(typesReferenceDirectives, resolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, ts.typeDirectiveIsEqualTo); + if (resolutionsChanged) { + return false; + } + } + // pass the cache of module/types resolutions from the old source file newSourceFile.resolvedModules = oldSourceFile.resolvedModules; + newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames; modifiedSourceFiles.push(newSourceFile); } else { @@ -39851,6 +45185,7 @@ var ts; var modifiedFile = modifiedSourceFiles_1[_b]; fileProcessingDiagnostics.reattachFileDiagnostics(modifiedFile); } + resolvedTypeReferenceDirectives = oldProgram.getResolvedTypeReferenceDirectives(); oldProgram.structureIsReused = true; return true; } @@ -39862,8 +45197,10 @@ var ts; getCurrentDirectory: function () { return currentDirectory; }, getNewLine: function () { return host.getNewLine(); }, getSourceFile: program.getSourceFile, + getSourceFileByPath: program.getSourceFileByPath, getSourceFiles: program.getSourceFiles, - writeFile: writeFileCallback || (function (fileName, data, writeByteOrderMark, onError) { return host.writeFile(fileName, data, writeByteOrderMark, onError); }), + isSourceFileFromExternalLibrary: function (file) { return !!sourceFilesFoundSearchingNodeModules[file.path]; }, + writeFile: writeFileCallback || (function (fileName, data, writeByteOrderMark, onError, sourceFiles) { return host.writeFile(fileName, data, writeByteOrderMark, onError, sourceFiles); }), isEmitBlocked: isEmitBlocked }; } @@ -39874,24 +45211,31 @@ var ts; return noDiagnosticsTypeChecker || (noDiagnosticsTypeChecker = ts.createTypeChecker(program, /*produceDiagnostics:*/ false)); } function emit(sourceFile, writeFileCallback, cancellationToken) { - var _this = this; - return runWithCancellationToken(function () { return emitWorker(_this, sourceFile, writeFileCallback, cancellationToken); }); + return runWithCancellationToken(function () { return emitWorker(program, sourceFile, writeFileCallback, cancellationToken); }); } function isEmitBlocked(emitFileName) { return hasEmitBlockingDiagnostics.contains(ts.toPath(emitFileName, currentDirectory, getCanonicalFileName)); } function emitWorker(program, sourceFile, writeFileCallback, cancellationToken) { + var declarationDiagnostics = []; + if (options.noEmit) { + return { diagnostics: declarationDiagnostics, sourceMaps: undefined, emittedFiles: undefined, emitSkipped: true }; + } // If the noEmitOnError flag is set, then check if we have any errors so far. If so, // immediately bail out. Note that we pass 'undefined' for 'sourceFile' so that we // get any preEmit diagnostics, not just the ones if (options.noEmitOnError) { var diagnostics = program.getOptionsDiagnostics(cancellationToken).concat(program.getSyntacticDiagnostics(sourceFile, cancellationToken), program.getGlobalDiagnostics(cancellationToken), program.getSemanticDiagnostics(sourceFile, cancellationToken)); - var declarationDiagnostics = []; if (diagnostics.length === 0 && program.getCompilerOptions().declaration) { declarationDiagnostics = program.getDeclarationDiagnostics(/*sourceFile*/ undefined, cancellationToken); } if (diagnostics.length > 0 || declarationDiagnostics.length > 0) { - return { diagnostics: declarationDiagnostics, sourceMaps: undefined, emitSkipped: true }; + return { + diagnostics: ts.concatenate(diagnostics, declarationDiagnostics), + sourceMaps: undefined, + emittedFiles: undefined, + emitSkipped: true + }; } } // Create the emit resolver outside of the "emitTime" tracking code below. That way @@ -39903,13 +45247,17 @@ var ts; // files need to be type checked. And the way to specify that all files need to be type // checked is to not pass the file to getEmitResolver. var emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver((options.outFile || options.out) ? undefined : sourceFile); - var start = new Date().getTime(); + ts.performance.mark("beforeEmit"); var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile); - ts.emitTime += new Date().getTime() - start; + ts.performance.mark("afterEmit"); + ts.performance.measure("Emit", "beforeEmit", "afterEmit"); return emitResult; } function getSourceFile(fileName) { - return filesByName.get(ts.toPath(fileName, currentDirectory, getCanonicalFileName)); + return getSourceFileByPath(ts.toPath(fileName, currentDirectory, getCanonicalFileName)); + } + function getSourceFileByPath(path) { + return filesByName.get(path); } function getDiagnosticsHelper(sourceFile, getDiagnostics, cancellationToken) { if (sourceFile) { @@ -39952,7 +45300,7 @@ var ts; // We were canceled while performing the operation. Because our type checker // might be a bad state, we need to throw it away. // - // Note: we are overly agressive here. We do not actually *have* to throw away + // Note: we are overly aggressive here. We do not actually *have* to throw away // the "noDiagnosticsTypeChecker". However, for simplicity, i'd like to keep // the lifetimes of these two TypeCheckers the same. Also, we generally only // cancel when the user has made a change anyways. And, in that case, we (the @@ -39990,47 +45338,47 @@ var ts; return false; } switch (node.kind) { - case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportEqualsDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file)); return true; - case 230 /* ExportAssignment */: + case 235 /* ExportAssignment */: if (node.isExportEquals) { diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file)); return true; } break; - case 217 /* ClassDeclaration */: + case 221 /* ClassDeclaration */: var classDeclaration = node; if (checkModifiers(classDeclaration.modifiers) || checkTypeParameters(classDeclaration.typeParameters)) { return true; } break; - case 246 /* HeritageClause */: + case 251 /* HeritageClause */: var heritageClause = node; if (heritageClause.token === 106 /* ImplementsKeyword */) { diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); return true; } break; - case 218 /* InterfaceDeclaration */: + case 222 /* InterfaceDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); return true; - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); return true; - case 219 /* TypeAliasDeclaration */: + case 223 /* TypeAliasDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); return true; - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 145 /* Constructor */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 176 /* FunctionExpression */: - case 216 /* FunctionDeclaration */: - case 177 /* ArrowFunction */: - case 216 /* FunctionDeclaration */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 148 /* Constructor */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 179 /* FunctionExpression */: + case 220 /* FunctionDeclaration */: + case 180 /* ArrowFunction */: + case 220 /* FunctionDeclaration */: var functionDeclaration = node; if (checkModifiers(functionDeclaration.modifiers) || checkTypeParameters(functionDeclaration.typeParameters) || @@ -40038,32 +45386,32 @@ var ts; return true; } break; - case 196 /* VariableStatement */: + case 200 /* VariableStatement */: var variableStatement = node; if (checkModifiers(variableStatement.modifiers)) { return true; } break; - case 214 /* VariableDeclaration */: + case 218 /* VariableDeclaration */: var variableDeclaration = node; if (checkTypeAnnotation(variableDeclaration.type)) { return true; } break; - case 171 /* CallExpression */: - case 172 /* NewExpression */: + case 174 /* CallExpression */: + case 175 /* NewExpression */: var expression = node; if (expression.typeArguments && expression.typeArguments.length > 0) { - var start_2 = expression.typeArguments.pos; - diagnostics.push(ts.createFileDiagnostic(sourceFile, start_2, expression.typeArguments.end - start_2, ts.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file)); + var start = expression.typeArguments.pos; + diagnostics.push(ts.createFileDiagnostic(sourceFile, start, expression.typeArguments.end - start, ts.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file)); return true; } break; - case 139 /* Parameter */: + case 142 /* Parameter */: var parameter = node; if (parameter.modifiers) { - var start_3 = parameter.modifiers.pos; - diagnostics.push(ts.createFileDiagnostic(sourceFile, start_3, parameter.modifiers.end - start_3, ts.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file)); + var start = parameter.modifiers.pos; + diagnostics.push(ts.createFileDiagnostic(sourceFile, start, parameter.modifiers.end - start, ts.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file)); return true; } if (parameter.questionToken) { @@ -40075,17 +45423,29 @@ var ts; return true; } break; - case 142 /* PropertyDeclaration */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.property_declarations_can_only_be_used_in_a_ts_file)); - return true; - case 220 /* EnumDeclaration */: + case 145 /* PropertyDeclaration */: + var propertyDeclaration = node; + if (propertyDeclaration.modifiers) { + for (var _i = 0, _a = propertyDeclaration.modifiers; _i < _a.length; _i++) { + var modifier = _a[_i]; + if (modifier.kind !== 113 /* StaticKeyword */) { + diagnostics.push(ts.createDiagnosticForNode(modifier, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, ts.tokenToString(modifier.kind))); + return true; + } + } + } + if (checkTypeAnnotation(node.type)) { + return true; + } + break; + case 224 /* EnumDeclaration */: diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); return true; - case 174 /* TypeAssertionExpression */: + case 177 /* TypeAssertionExpression */: var typeAssertionExpression = node; diagnostics.push(ts.createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); return true; - case 140 /* Decorator */: + case 143 /* Decorator */: if (!options.experimentalDecorators) { diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning)); } @@ -40095,8 +45455,8 @@ var ts; } function checkTypeParameters(typeParameters) { if (typeParameters) { - var start_4 = typeParameters.pos; - diagnostics.push(ts.createFileDiagnostic(sourceFile, start_4, typeParameters.end - start_4, ts.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file)); + var start = typeParameters.pos; + diagnostics.push(ts.createFileDiagnostic(sourceFile, start, typeParameters.end - start, ts.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file)); return true; } return false; @@ -40116,6 +45476,7 @@ var ts; case 112 /* PublicKeyword */: case 110 /* PrivateKeyword */: case 111 /* ProtectedKeyword */: + case 128 /* ReadonlyKeyword */: case 122 /* DeclareKeyword */: diagnostics.push(ts.createDiagnosticForNode(modifier, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, ts.tokenToString(modifier.kind))); return true; @@ -40158,7 +45519,7 @@ var ts; return ts.getBaseFileName(fileName).indexOf(".") >= 0; } function processRootFile(fileName, isDefaultLib) { - processSourceFile(ts.normalizePath(fileName), isDefaultLib); + processSourceFile(ts.normalizePath(fileName), isDefaultLib, /*isReference*/ true); } function fileReferenceIsEqualTo(a, b) { return a.fileName === b.fileName; @@ -40189,9 +45550,9 @@ var ts; return; function collectModuleReferences(node, inAmbientModule) { switch (node.kind) { - case 225 /* ImportDeclaration */: - case 224 /* ImportEqualsDeclaration */: - case 231 /* ExportDeclaration */: + case 230 /* ImportDeclaration */: + case 229 /* ImportEqualsDeclaration */: + case 236 /* ExportDeclaration */: var moduleNameExpr = ts.getExternalModuleName(node); if (!moduleNameExpr || moduleNameExpr.kind !== 9 /* StringLiteral */) { break; @@ -40200,14 +45561,14 @@ var ts; break; } // TypeScript 1.0 spec (April 2014): 12.1.6 - // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference other external modules + // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference other external modules // only through top - level external module names. Relative external module names are not permitted. if (!inAmbientModule || !ts.isExternalModuleNameRelative(moduleNameExpr.text)) { (imports || (imports = [])).push(moduleNameExpr); } break; - case 221 /* ModuleDeclaration */: - if (ts.isAmbientModule(node) && (inAmbientModule || node.flags & 4 /* Ambient */ || ts.isDeclarationFile(file))) { + case 225 /* ModuleDeclaration */: + if (ts.isAmbientModule(node) && (inAmbientModule || node.flags & 2 /* Ambient */ || ts.isDeclarationFile(file))) { var moduleName = node.name; // Ambient module declarations can be interpreted as augmentations for some existing external modules. // This will happen in two cases: @@ -40218,14 +45579,17 @@ var ts; (moduleAugmentations || (moduleAugmentations = [])).push(moduleName); } else if (!inAmbientModule) { - // An AmbientExternalModuleDeclaration declares an external module. + // An AmbientExternalModuleDeclaration declares an external module. // This type of declaration is permitted only in the global module. // The StringLiteral must specify a top - level external module name. // Relative external module names are not permitted - // NOTE: body of ambient module is always a module block - for (var _i = 0, _a = node.body.statements; _i < _a.length; _i++) { - var statement = _a[_i]; - collectModuleReferences(statement, /*inAmbientModule*/ true); + // NOTE: body of ambient module is always a module block, if it exists + var body = node.body; + if (body) { + for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { + var statement = _a[_i]; + collectModuleReferences(statement, /*inAmbientModule*/ true); + } } } } @@ -40240,7 +45604,10 @@ var ts; } } } - function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) { + /** + * 'isReference' indicates whether the file was brought in via a reference directive (rather than an import declaration) + */ + function processSourceFile(fileName, isDefaultLib, isReference, refFile, refPos, refEnd) { var diagnosticArgument; var diagnostic; if (hasExtension(fileName)) { @@ -40248,7 +45615,7 @@ var ts; diagnostic = ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1; diagnosticArgument = [fileName, "'" + supportedExtensions.join("', '") + "'"]; } - else if (!findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd)) { + else if (!findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, isReference, refFile, refPos, refEnd)) { diagnostic = ts.Diagnostics.File_0_not_found; diagnosticArgument = [fileName]; } @@ -40258,20 +45625,20 @@ var ts; } } else { - var nonTsFile = options.allowNonTsExtensions && findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd); + var nonTsFile = options.allowNonTsExtensions && findSourceFile(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName), isDefaultLib, isReference, refFile, refPos, refEnd); if (!nonTsFile) { if (options.allowNonTsExtensions) { diagnostic = ts.Diagnostics.File_0_not_found; diagnosticArgument = [fileName]; } - else if (!ts.forEach(supportedExtensions, function (extension) { return findSourceFile(fileName + extension, ts.toPath(fileName + extension, currentDirectory, getCanonicalFileName), isDefaultLib, refFile, refPos, refEnd); })) { + else if (!ts.forEach(supportedExtensions, function (extension) { return findSourceFile(fileName + extension, ts.toPath(fileName + extension, currentDirectory, getCanonicalFileName), isDefaultLib, isReference, refFile, refPos, refEnd); })) { diagnostic = ts.Diagnostics.File_0_not_found; fileName += ".ts"; diagnosticArgument = [fileName]; } } } - if (diagnostic && !exceedProgramSizeLimit()) { + if (diagnostic) { if (refFile !== undefined && refEnd !== undefined && refPos !== undefined) { fileProcessingDiagnostics.add(ts.createFileDiagnostic.apply(void 0, [refFile, refPos, refEnd - refPos, diagnostic].concat(diagnosticArgument))); } @@ -40289,7 +45656,7 @@ var ts; } } // Get source file from normalized fileName - function findSourceFile(fileName, path, isDefaultLib, refFile, refPos, refEnd) { + function findSourceFile(fileName, path, isDefaultLib, isReference, refFile, refPos, refEnd) { if (filesByName.contains(path)) { var file_1 = filesByName.get(path); // try to check if we've already seen this file but with a different casing in path @@ -40297,12 +45664,25 @@ var ts; if (file_1 && options.forceConsistentCasingInFileNames && ts.getNormalizedAbsolutePath(file_1.fileName, currentDirectory) !== ts.getNormalizedAbsolutePath(fileName, currentDirectory)) { reportFileNamesDifferOnlyInCasingError(fileName, file_1.fileName, refFile, refPos, refEnd); } + // If the file was previously found via a node_modules search, but is now being processed as a root file, + // then everything it sucks in may also be marked incorrectly, and needs to be checked again. + if (file_1 && sourceFilesFoundSearchingNodeModules[file_1.path] && currentNodeModulesDepth == 0) { + sourceFilesFoundSearchingNodeModules[file_1.path] = false; + if (!options.noResolve) { + processReferencedFiles(file_1, ts.getDirectoryPath(fileName), isDefaultLib); + processTypeReferenceDirectives(file_1); + } + modulesWithElidedImports[file_1.path] = false; + processImportedModules(file_1, ts.getDirectoryPath(fileName)); + } + else if (file_1 && modulesWithElidedImports[file_1.path]) { + if (currentNodeModulesDepth < maxNodeModulesJsDepth) { + modulesWithElidedImports[file_1.path] = false; + processImportedModules(file_1, ts.getDirectoryPath(fileName)); + } + } return file_1; } - var isNonTsFile = !ts.hasTypeScriptFileExtension(fileName); - if (isNonTsFile && exceedProgramSizeLimit()) { - return undefined; - } // We haven't looked for this file, do so now and cache result var file = host.getSourceFile(fileName, options.target, function (hostErrorMessage) { if (refFile !== undefined && refPos !== undefined && refEnd !== undefined) { @@ -40312,26 +45692,9 @@ var ts; fileProcessingDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, hostErrorMessage)); } }); - if (isNonTsFile && !options.disableSizeLimit && file && file.text) { - programSizeForNonTsFiles += file.text.length; - if (programSizeForNonTsFiles > ts.maxProgramSizeForNonTsFiles) { - // If the program size limit was reached when processing a file, this file is - // likely in the problematic folder than contains too many files. - // Normally the folder is one level down from the commonSourceDirectory, for example, - // if the commonSourceDirectory is "/src/", and the last processed path was "/src/node_modules/a/b.js", - // we should show in the error message "/src/node_modules/". - var commonSourceDirectory_1 = getCommonSourceDirectory(); - var rootLevelDirectory = path.substring(0, Math.max(commonSourceDirectory_1.length, path.indexOf(ts.directorySeparator, commonSourceDirectory_1.length))); - if (rootLevelDirectory[rootLevelDirectory.length - 1] !== ts.directorySeparator) { - rootLevelDirectory += ts.directorySeparator; - } - programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Too_many_JavaScript_files_in_the_project_Consider_specifying_the_exclude_setting_in_project_configuration_to_limit_included_source_folders_The_likely_folder_to_exclude_is_0_To_disable_the_project_size_limit_set_the_disableSizeLimit_compiler_option_to_true, rootLevelDirectory)); - programSizeForNonTsFiles = programSizeLimitExceeded; - return undefined; - } - } filesByName.set(path, file); if (file) { + sourceFilesFoundSearchingNodeModules[path] = (currentNodeModulesDepth > 0); file.path = path; if (host.useCaseSensitiveFileNames()) { // for case-sensitive file systems check if we've already seen some file with similar filename ignoring case @@ -40346,7 +45709,8 @@ var ts; skipDefaultLib = skipDefaultLib || file.hasNoDefaultLib; var basePath = ts.getDirectoryPath(fileName); if (!options.noResolve) { - processReferencedFiles(file, basePath); + processReferencedFiles(file, basePath, isDefaultLib); + processTypeReferenceDirectives(file); } // always process imported modules to record module name resolutions processImportedModules(file, basePath); @@ -40359,45 +45723,107 @@ var ts; } return file; } - function processReferencedFiles(file, basePath) { + function processReferencedFiles(file, basePath, isDefaultLib) { ts.forEach(file.referencedFiles, function (ref) { var referencedFileName = resolveTripleslashReference(ref.fileName, file.fileName); - processSourceFile(referencedFileName, /*isDefaultLib*/ false, file, ref.pos, ref.end); + processSourceFile(referencedFileName, isDefaultLib, /*isReference*/ true, file, ref.pos, ref.end); }); } + function processTypeReferenceDirectives(file) { + // We lower-case all type references because npm automatically lowercases all packages. See GH#9824. + var typeDirectives = ts.map(file.typeReferenceDirectives, function (ref) { return ref.fileName.toLocaleLowerCase(); }); + var resolutions = resolveTypeReferenceDirectiveNamesWorker(typeDirectives, file.fileName); + for (var i = 0; i < typeDirectives.length; i++) { + var ref = file.typeReferenceDirectives[i]; + var resolvedTypeReferenceDirective = resolutions[i]; + // store resolved type directive on the file + var fileName = ref.fileName.toLocaleLowerCase(); + ts.setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective); + processTypeReferenceDirective(fileName, resolvedTypeReferenceDirective, file, ref.pos, ref.end); + } + } + function processTypeReferenceDirective(typeReferenceDirective, resolvedTypeReferenceDirective, refFile, refPos, refEnd) { + // If we already found this library as a primary reference - nothing to do + var previousResolution = resolvedTypeReferenceDirectives[typeReferenceDirective]; + if (previousResolution && previousResolution.primary) { + return; + } + var saveResolution = true; + if (resolvedTypeReferenceDirective) { + if (resolvedTypeReferenceDirective.primary) { + // resolved from the primary path + processSourceFile(resolvedTypeReferenceDirective.resolvedFileName, /*isDefaultLib*/ false, /*isReference*/ true, refFile, refPos, refEnd); + } + else { + // If we already resolved to this file, it must have been a secondary reference. Check file contents + // for sameness and possibly issue an error + if (previousResolution) { + var otherFileText = host.readFile(resolvedTypeReferenceDirective.resolvedFileName); + if (otherFileText !== getSourceFile(previousResolution.resolvedFileName).text) { + fileProcessingDiagnostics.add(createDiagnostic(refFile, refPos, refEnd, ts.Diagnostics.Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict, typeReferenceDirective, resolvedTypeReferenceDirective.resolvedFileName, previousResolution.resolvedFileName)); + } + // don't overwrite previous resolution result + saveResolution = false; + } + else { + // First resolution of this library + processSourceFile(resolvedTypeReferenceDirective.resolvedFileName, /*isDefaultLib*/ false, /*isReference*/ true, refFile, refPos, refEnd); + } + } + } + else { + fileProcessingDiagnostics.add(createDiagnostic(refFile, refPos, refEnd, ts.Diagnostics.Cannot_find_type_definition_file_for_0, typeReferenceDirective)); + } + if (saveResolution) { + resolvedTypeReferenceDirectives[typeReferenceDirective] = resolvedTypeReferenceDirective; + } + } + function createDiagnostic(refFile, refPos, refEnd, message) { + var args = []; + for (var _i = 4; _i < arguments.length; _i++) { + args[_i - 4] = arguments[_i]; + } + if (refFile === undefined || refPos === undefined || refEnd === undefined) { + return ts.createCompilerDiagnostic.apply(void 0, [message].concat(args)); + } + else { + return ts.createFileDiagnostic.apply(void 0, [refFile, refPos, refEnd - refPos, message].concat(args)); + } + } function getCanonicalFileName(fileName) { return host.getCanonicalFileName(fileName); } function processImportedModules(file, basePath) { collectExternalModuleReferences(file); if (file.imports.length || file.moduleAugmentations.length) { - file.resolvedModules = {}; + file.resolvedModules = ts.createMap(); var moduleNames = ts.map(ts.concatenate(file.imports, file.moduleAugmentations), getTextOfLiteral); var resolutions = resolveModuleNamesWorker(moduleNames, ts.getNormalizedAbsolutePath(file.fileName, currentDirectory)); for (var i = 0; i < moduleNames.length; i++) { var resolution = resolutions[i]; ts.setResolvedModule(file, moduleNames[i], resolution); + var resolvedPath = resolution ? ts.toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName) : undefined; // add file to program only if: - // - resolution was successfull + // - resolution was successful // - noResolve is falsy - // - module name come from the list fo imports - var shouldAddFile = resolution && - !options.noResolve && - i < file.imports.length; - if (shouldAddFile) { - var importedFile = findSourceFile(resolution.resolvedFileName, ts.toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName), /*isDefaultLib*/ false, file, ts.skipTrivia(file.text, file.imports[i].pos), file.imports[i].end); - if (importedFile && resolution.isExternalLibraryImport) { - // Since currently irrespective of allowJs, we only look for supportedTypeScript extension external module files, - // this check is ok. Otherwise this would be never true for javascript file - if (!ts.isExternalModule(importedFile) && importedFile.statements.length) { - var start_5 = ts.getTokenPosOfNode(file.imports[i], file); - fileProcessingDiagnostics.add(ts.createFileDiagnostic(file, start_5, file.imports[i].end - start_5, ts.Diagnostics.Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition, importedFile.fileName)); - } - else if (importedFile.referencedFiles.length) { - var firstRef = importedFile.referencedFiles[0]; - fileProcessingDiagnostics.add(ts.createFileDiagnostic(importedFile, firstRef.pos, firstRef.end - firstRef.pos, ts.Diagnostics.Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition)); - } - } + // - module name comes from the list of imports + // - it's not a top level JavaScript module that exceeded the search max + var isFromNodeModulesSearch = resolution && resolution.isExternalLibraryImport; + var isJsFileFromNodeModules = isFromNodeModulesSearch && ts.hasJavaScriptFileExtension(resolution.resolvedFileName); + if (isFromNodeModulesSearch) { + currentNodeModulesDepth++; + } + var elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModulesJsDepth; + var shouldAddFile = resolution && !options.noResolve && i < file.imports.length && !elideImport; + if (elideImport) { + modulesWithElidedImports[file.path] = true; + } + else if (shouldAddFile) { + findSourceFile(resolution.resolvedFileName, resolvedPath, + /*isDefaultLib*/ false, /*isReference*/ false, file, ts.skipTrivia(file.text, file.imports[i].pos), file.imports[i].end); + } + if (isFromNodeModulesSearch) { + currentNodeModulesDepth--; } } } @@ -40408,50 +45834,21 @@ var ts; return; } function computeCommonSourceDirectory(sourceFiles) { - var commonPathComponents; - var failed = ts.forEach(files, function (sourceFile) { - // Each file contributes into common source file path - if (ts.isDeclarationFile(sourceFile)) { - return; + var fileNames = []; + for (var _i = 0, sourceFiles_2 = sourceFiles; _i < sourceFiles_2.length; _i++) { + var file = sourceFiles_2[_i]; + if (!file.isDeclarationFile) { + fileNames.push(file.fileName); } - var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, currentDirectory); - sourcePathComponents.pop(); // The base file name is not part of the common directory path - if (!commonPathComponents) { - // first file - commonPathComponents = sourcePathComponents; - return; - } - for (var i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) { - if (getCanonicalFileName(commonPathComponents[i]) !== getCanonicalFileName(sourcePathComponents[i])) { - if (i === 0) { - // Failed to find any common path component - return true; - } - // New common path found that is 0 -> i-1 - commonPathComponents.length = i; - break; - } - } - // If the sourcePathComponents was shorter than the commonPathComponents, truncate to the sourcePathComponents - if (sourcePathComponents.length < commonPathComponents.length) { - commonPathComponents.length = sourcePathComponents.length; - } - }); - // A common path can not be found when paths span multiple drives on windows, for example - if (failed) { - return ""; } - if (!commonPathComponents) { - return currentDirectory; - } - return ts.getNormalizedPathFromPathComponents(commonPathComponents); + return computeCommonSourceDirectoryOfFilenames(fileNames, currentDirectory, getCanonicalFileName); } function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) { var allFilesBelongToPath = true; if (sourceFiles) { var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory)); - for (var _i = 0, sourceFiles_2 = sourceFiles; _i < sourceFiles_2.length; _i++) { - var sourceFile = sourceFiles_2[_i]; + for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) { + var sourceFile = sourceFiles_3[_i]; if (!ts.isDeclarationFile(sourceFile)) { var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory)); if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) { @@ -40486,31 +45883,70 @@ var ts; programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "mapRoot", "inlineSourceMap")); } } - if (options.inlineSources) { - if (!options.sourceMap && !options.inlineSourceMap) { - programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided)); + if (options.paths && options.baseUrl === undefined) { + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_paths_cannot_be_used_without_specifying_baseUrl_option)); + } + if (options.paths) { + for (var key in options.paths) { + if (!ts.hasProperty(options.paths, key)) { + continue; + } + if (!hasZeroOrOneAsteriskCharacter(key)) { + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character, key)); + } + if (ts.isArray(options.paths[key])) { + if (options.paths[key].length === 0) { + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array, key)); + } + for (var _i = 0, _a = options.paths[key]; _i < _a.length; _i++) { + var subst = _a[_i]; + var typeOfSubst = typeof subst; + if (typeOfSubst === "string") { + if (!hasZeroOrOneAsteriskCharacter(subst)) { + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character, subst, key)); + } + } + else { + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2, subst, key, typeOfSubst)); + } + } + } + else { + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Substitutions_for_pattern_0_should_be_an_array, key)); + } + } + } + if (!options.sourceMap && !options.inlineSourceMap) { + if (options.inlineSources) { + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided, "inlineSources")); } if (options.sourceRoot) { - programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "sourceRoot", "inlineSources")); + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided, "sourceRoot")); } } if (options.out && options.outFile) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "out", "outFile")); } - if (!options.sourceMap && (options.mapRoot || options.sourceRoot)) { - // Error to specify --mapRoot or --sourceRoot without mapSourceFiles - if (options.mapRoot) { - programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "mapRoot", "sourceMap")); + if (options.mapRoot && !options.sourceMap) { + // Error to specify --mapRoot without --sourcemap + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "mapRoot", "sourceMap")); + } + if (options.declarationDir) { + if (!options.declaration) { + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "declarationDir", "declaration")); } - if (options.sourceRoot && !options.inlineSourceMap) { - programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "sourceRoot", "sourceMap")); + if (options.out || options.outFile) { + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "declarationDir", options.out ? "out" : "outFile")); } } + if (options.lib && options.noLib) { + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "lib", "noLib")); + } var languageVersion = options.target || 0 /* ES3 */; var outFile = options.outFile || options.out; - var firstExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) ? f : undefined; }); + var firstNonAmbientExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) && !ts.isDeclarationFile(f) ? f : undefined; }); if (options.isolatedModules) { - if (options.module === 0 /* None */ && languageVersion < 2 /* ES6 */) { + if (options.module === ts.ModuleKind.None && languageVersion < 2 /* ES6 */) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher)); } var firstNonExternalModuleSourceFile = ts.forEach(files, function (f) { return !ts.isExternalModule(f) && !ts.isDeclarationFile(f) ? f : undefined; }); @@ -40519,18 +45955,20 @@ var ts; programDiagnostics.add(ts.createFileDiagnostic(firstNonExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided)); } } - else if (firstExternalModuleSourceFile && languageVersion < 2 /* ES6 */ && options.module === 0 /* None */) { + else if (firstNonAmbientExternalModuleSourceFile && languageVersion < 2 /* ES6 */ && options.module === ts.ModuleKind.None) { // We cannot use createDiagnosticFromNode because nodes do not have parents yet - var span = ts.getErrorSpanForNode(firstExternalModuleSourceFile, firstExternalModuleSourceFile.externalModuleIndicator); - programDiagnostics.add(ts.createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_modules_unless_the_module_flag_is_provided_with_a_valid_module_type_Consider_setting_the_module_compiler_option_in_a_tsconfig_json_file)); - } - // Cannot specify module gen target of es6 when below es6 - if (options.module === 5 /* ES6 */ && languageVersion < 2 /* ES6 */) { - programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_compile_modules_into_es2015_when_targeting_ES5_or_lower)); + var span = ts.getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, firstNonAmbientExternalModuleSourceFile.externalModuleIndicator); + programDiagnostics.add(ts.createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none)); } // Cannot specify module gen that isn't amd or system with --out - if (outFile && options.module && !(options.module === 2 /* AMD */ || options.module === 4 /* System */)) { - programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, options.out ? "out" : "outFile")); + if (outFile) { + if (options.module && !(options.module === ts.ModuleKind.AMD || options.module === ts.ModuleKind.System)) { + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, options.out ? "out" : "outFile")); + } + else if (options.module === undefined && firstNonAmbientExternalModuleSourceFile) { + var span = ts.getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, firstNonAmbientExternalModuleSourceFile.externalModuleIndicator); + programDiagnostics.add(ts.createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system, options.out ? "out" : "outFile")); + } } // there has to be common source directory if user specified --outdir || --sourceRoot // if user specified --mapRoot, there needs to be common source directory if there would be multiple files being emitted @@ -40544,21 +45982,7 @@ var ts; programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files)); } } - if (options.noEmit) { - if (options.out) { - programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "out")); - } - if (options.outFile) { - programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "outFile")); - } - if (options.outDir) { - programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "outDir")); - } - if (options.declaration) { - programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", "declaration")); - } - } - else if (options.allowJs && options.declaration) { + if (!options.noEmit && options.allowJs && options.declaration) { programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration")); } if (options.emitDecoratorMetadata && @@ -40566,7 +45990,7 @@ var ts; programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators")); } if (options.reactNamespace && !ts.isIdentifier(options.reactNamespace, languageVersion)) { - programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Invalide_value_for_reactNamespace_0_is_not_a_valid_identifier, options.reactNamespace)); + programDiagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier, options.reactNamespace)); } // If the emit is enabled make sure that every output file is unique and not overwriting any of the input files if (!options.noEmit && !options.suppressOutputPathCheck) { @@ -40622,10 +46046,20 @@ var ts; type: "boolean", description: ts.Diagnostics.Generates_corresponding_d_ts_file }, + { + name: "declarationDir", + type: "string", + isFilePath: true, + paramType: ts.Diagnostics.DIRECTORY + }, { name: "diagnostics", type: "boolean" }, + { + name: "extendedDiagnostics", + type: "boolean" + }, { name: "emitBOM", type: "boolean" @@ -40636,6 +46070,11 @@ var ts; type: "boolean", description: ts.Diagnostics.Print_this_message }, + { + name: "help", + shortName: "?", + type: "boolean" + }, { name: "init", type: "boolean", @@ -40651,18 +46090,17 @@ var ts; }, { name: "jsx", - type: { + type: ts.createMap({ "preserve": 1 /* Preserve */, "react": 2 /* React */ - }, + }), paramType: ts.Diagnostics.KIND, - description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_or_react, - error: ts.Diagnostics.Argument_for_jsx_must_be_preserve_or_react + description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_or_react }, { name: "reactNamespace", type: "string", - description: ts.Diagnostics.Specifies_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit + description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit }, { name: "listFiles", @@ -40676,34 +46114,32 @@ var ts; name: "mapRoot", type: "string", isFilePath: true, - description: ts.Diagnostics.Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations, + description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations, paramType: ts.Diagnostics.LOCATION }, { name: "module", shortName: "m", - type: { - "none": 0 /* None */, - "commonjs": 1 /* CommonJS */, - "amd": 2 /* AMD */, - "system": 4 /* System */, - "umd": 3 /* UMD */, - "es6": 5 /* ES6 */, - "es2015": 5 /* ES2015 */ - }, + type: ts.createMap({ + "none": ts.ModuleKind.None, + "commonjs": ts.ModuleKind.CommonJS, + "amd": ts.ModuleKind.AMD, + "system": ts.ModuleKind.System, + "umd": ts.ModuleKind.UMD, + "es6": ts.ModuleKind.ES6, + "es2015": ts.ModuleKind.ES2015 + }), description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015, - paramType: ts.Diagnostics.KIND, - error: ts.Diagnostics.Argument_for_module_option_must_be_commonjs_amd_system_umd_es2015_or_none + paramType: ts.Diagnostics.KIND }, { name: "newLine", - type: { + type: ts.createMap({ "crlf": 0 /* CarriageReturnLineFeed */, "lf": 1 /* LineFeed */ - }, - description: ts.Diagnostics.Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix, - paramType: ts.Diagnostics.NEWLINE, - error: ts.Diagnostics.Argument_for_newLine_option_must_be_CRLF_or_LF + }), + description: ts.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix, + paramType: ts.Diagnostics.NEWLINE }, { name: "noEmit", @@ -40719,11 +46155,30 @@ var ts; type: "boolean", description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported }, + { + name: "noErrorTruncation", + type: "boolean" + }, { name: "noImplicitAny", type: "boolean", description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type }, + { + name: "noImplicitThis", + type: "boolean", + description: ts.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type + }, + { + name: "noUnusedLocals", + type: "boolean", + description: ts.Diagnostics.Report_errors_on_unused_locals + }, + { + name: "noUnusedParameters", + type: "boolean", + description: ts.Diagnostics.Report_errors_on_unused_parameters + }, { name: "noLib", type: "boolean" @@ -40736,6 +46191,11 @@ var ts; name: "skipDefaultLibCheck", type: "boolean" }, + { + name: "skipLibCheck", + type: "boolean", + description: ts.Diagnostics.Skip_type_checking_of_declaration_files + }, { name: "out", type: "string", @@ -40764,7 +46224,6 @@ var ts; }, { name: "pretty", - paramType: ts.Diagnostics.KIND, description: ts.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental, type: "boolean" }, @@ -40785,8 +46244,8 @@ var ts; name: "rootDir", type: "string", isFilePath: true, - description: ts.Diagnostics.Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir, - paramType: ts.Diagnostics.LOCATION + paramType: ts.Diagnostics.LOCATION, + description: ts.Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir }, { name: "isolatedModules", @@ -40801,7 +46260,7 @@ var ts; name: "sourceRoot", type: "string", isFilePath: true, - description: ts.Diagnostics.Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations, + description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations, paramType: ts.Diagnostics.LOCATION }, { @@ -40824,15 +46283,14 @@ var ts; { name: "target", shortName: "t", - type: { + type: ts.createMap({ "es3": 0 /* ES3 */, "es5": 1 /* ES5 */, "es6": 2 /* ES6 */, "es2015": 2 /* ES2015 */ - }, - description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015_experimental, - paramType: ts.Diagnostics.VERSION, - error: ts.Diagnostics.Argument_for_target_option_must_be_ES3_ES5_or_ES2015 + }), + description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015, + paramType: ts.Diagnostics.VERSION }, { name: "version", @@ -40859,12 +46317,11 @@ var ts; }, { name: "moduleResolution", - type: { - "node": 2 /* NodeJs */, - "classic": 1 /* Classic */ - }, - description: ts.Diagnostics.Specifies_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6, - error: ts.Diagnostics.Argument_for_moduleResolution_option_must_be_node_or_classic + type: ts.createMap({ + "node": ts.ModuleResolutionKind.NodeJs, + "classic": ts.ModuleResolutionKind.Classic + }), + description: ts.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6 }, { name: "allowUnusedLabels", @@ -40892,38 +46349,159 @@ var ts; description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file }, { - name: "allowSyntheticDefaultImports", + name: "baseUrl", + type: "string", + isFilePath: true, + description: ts.Diagnostics.Base_directory_to_resolve_non_absolute_module_names + }, + { + // this option can only be specified in tsconfig.json + // use type = object to copy the value as-is + name: "paths", + type: "object", + isTSConfigOnly: true + }, + { + // this option can only be specified in tsconfig.json + // use type = object to copy the value as-is + name: "rootDirs", + type: "list", + isTSConfigOnly: true, + element: { + name: "rootDirs", + type: "string", + isFilePath: true + } + }, + { + name: "typeRoots", + type: "list", + element: { + name: "typeRoots", + type: "string", + isFilePath: true + } + }, + { + name: "types", + type: "list", + element: { + name: "types", + type: "string" + }, + description: ts.Diagnostics.Type_declaration_files_to_be_included_in_compilation + }, + { + name: "traceResolution", type: "boolean", - description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking + description: ts.Diagnostics.Enable_tracing_of_the_name_resolution_process }, { name: "allowJs", type: "boolean", description: ts.Diagnostics.Allow_javascript_files_to_be_compiled }, + { + name: "allowSyntheticDefaultImports", + type: "boolean", + description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking + }, { name: "noImplicitUseStrict", type: "boolean", description: ts.Diagnostics.Do_not_emit_use_strict_directives_in_module_output }, { - name: "noCustomAsyncPromise", - type: "boolean", - experimental: true + name: "maxNodeModuleJsDepth", + type: "number", + description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files + }, + { + name: "listEmittedFiles", + type: "boolean" + }, + { + name: "lib", + type: "list", + element: { + name: "lib", + type: ts.createMap({ + // JavaScript only + "es5": "lib.es5.d.ts", + "es6": "lib.es2015.d.ts", + "es2015": "lib.es2015.d.ts", + "es7": "lib.es2016.d.ts", + "es2016": "lib.es2016.d.ts", + "es2017": "lib.es2017.d.ts", + // Host only + "dom": "lib.dom.d.ts", + "webworker": "lib.webworker.d.ts", + "scripthost": "lib.scripthost.d.ts", + // ES2015 Or ESNext By-feature options + "es2015.core": "lib.es2015.core.d.ts", + "es2015.collection": "lib.es2015.collection.d.ts", + "es2015.generator": "lib.es2015.generator.d.ts", + "es2015.iterable": "lib.es2015.iterable.d.ts", + "es2015.promise": "lib.es2015.promise.d.ts", + "es2015.proxy": "lib.es2015.proxy.d.ts", + "es2015.reflect": "lib.es2015.reflect.d.ts", + "es2015.symbol": "lib.es2015.symbol.d.ts", + "es2015.symbol.wellknown": "lib.es2015.symbol.wellknown.d.ts", + "es2016.array.include": "lib.es2016.array.include.d.ts", + "es2017.object": "lib.es2017.object.d.ts", + "es2017.sharedmemory": "lib.es2017.sharedmemory.d.ts" + }) + }, + description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation_Colon }, { name: "disableSizeLimit", type: "boolean" + }, + { + name: "strictNullChecks", + type: "boolean", + description: ts.Diagnostics.Enable_strict_null_checks } ]; + /* @internal */ + ts.typingOptionDeclarations = [ + { + name: "enableAutoDiscovery", + type: "boolean" + }, + { + name: "include", + type: "list", + element: { + name: "include", + type: "string" + } + }, + { + name: "exclude", + type: "list", + element: { + name: "exclude", + type: "string" + } + } + ]; + /* @internal */ + ts.defaultInitCompilerOptions = { + module: ts.ModuleKind.CommonJS, + target: 1 /* ES5 */, + noImplicitAny: false, + sourceMap: false + }; var optionNameMapCache; /* @internal */ function getOptionNameMap() { if (optionNameMapCache) { return optionNameMapCache; } - var optionNameMap = {}; - var shortOptionNames = {}; + var optionNameMap = ts.createMap(); + var shortOptionNames = ts.createMap(); ts.forEach(ts.optionDeclarations, function (option) { optionNameMap[option.name.toLowerCase()] = option; if (option.shortName) { @@ -40934,6 +46512,49 @@ var ts; return optionNameMapCache; } ts.getOptionNameMap = getOptionNameMap; + /* @internal */ + function createCompilerDiagnosticForInvalidCustomType(opt) { + var namesOfType = []; + for (var key in opt.type) { + namesOfType.push(" '" + key + "'"); + } + return ts.createCompilerDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--" + opt.name, namesOfType); + } + ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType; + /* @internal */ + function parseCustomTypeOption(opt, value, errors) { + var key = trimString((value || "")).toLowerCase(); + var map = opt.type; + if (key in map) { + return map[key]; + } + else { + errors.push(createCompilerDiagnosticForInvalidCustomType(opt)); + } + } + ts.parseCustomTypeOption = parseCustomTypeOption; + /* @internal */ + function parseListTypeOption(opt, value, errors) { + if (value === void 0) { value = ""; } + value = trimString(value); + if (ts.startsWith(value, "-")) { + return undefined; + } + if (value === "") { + return []; + } + var values = value.split(","); + switch (opt.element.type) { + case "number": + return ts.map(values, parseInt); + case "string": + return ts.map(values, function (v) { return v || ""; }); + default: + return ts.filter(ts.map(values, function (v) { return parseCustomTypeOption(opt.element, v, errors); }), function (v) { return !!v; }); + } + } + ts.parseListTypeOption = parseListTypeOption; + /* @internal */ function parseCommandLine(commandLine, readFile) { var options = {}; var fileNames = []; @@ -40956,38 +46577,44 @@ var ts; else if (s.charCodeAt(0) === 45 /* minus */) { s = s.slice(s.charCodeAt(1) === 45 /* minus */ ? 2 : 1).toLowerCase(); // Try to translate short option names to their full equivalents. - if (ts.hasProperty(shortOptionNames, s)) { + if (s in shortOptionNames) { s = shortOptionNames[s]; } - if (ts.hasProperty(optionNameMap, s)) { + if (s in optionNameMap) { var opt = optionNameMap[s]; - // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). - if (!args[i] && opt.type !== "boolean") { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_expects_an_argument, opt.name)); + if (opt.isTSConfigOnly) { + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file, opt.name)); } - switch (opt.type) { - case "number": - options[opt.name] = parseInt(args[i]); - i++; - break; - case "boolean": - options[opt.name] = true; - break; - case "string": - options[opt.name] = args[i] || ""; - i++; - break; - // If not a primitive, the possible types are specified in what is effectively a map of options. - default: - var map_1 = opt.type; - var key = (args[i] || "").toLowerCase(); - i++; - if (ts.hasProperty(map_1, key)) { - options[opt.name] = map_1[key]; - } - else { - errors.push(ts.createCompilerDiagnostic(opt.error)); - } + else { + // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). + if (!args[i] && opt.type !== "boolean") { + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_expects_an_argument, opt.name)); + } + switch (opt.type) { + case "number": + options[opt.name] = parseInt(args[i]); + i++; + break; + case "boolean": + options[opt.name] = true; + break; + case "string": + options[opt.name] = args[i] || ""; + i++; + break; + case "list": + var result = parseListTypeOption(opt, args[i], errors); + options[opt.name] = result || []; + if (result) { + i++; + } + break; + // If not a primitive, the possible types are specified in what is effectively a map of options. + default: + options[opt.name] = parseCustomTypeOption(opt, args[i], errors); + i++; + break; + } } } else { @@ -41065,6 +46692,90 @@ var ts; } } ts.parseConfigFileTextToJson = parseConfigFileTextToJson; + /** + * Generate tsconfig configuration when running command line "--init" + * @param options commandlineOptions to be generated into tsconfig.json + * @param fileNames array of filenames to be generated into tsconfig.json + */ + /* @internal */ + function generateTSConfig(options, fileNames) { + var compilerOptions = ts.extend(options, ts.defaultInitCompilerOptions); + var configurations = { + compilerOptions: serializeCompilerOptions(compilerOptions) + }; + if (fileNames && fileNames.length) { + // only set the files property if we have at least one file + configurations.files = fileNames; + } + return configurations; + function getCustomTypeMapOfCommandLineOption(optionDefinition) { + if (optionDefinition.type === "string" || optionDefinition.type === "number" || optionDefinition.type === "boolean") { + // this is of a type CommandLineOptionOfPrimitiveType + return undefined; + } + else if (optionDefinition.type === "list") { + return getCustomTypeMapOfCommandLineOption(optionDefinition.element); + } + else { + return optionDefinition.type; + } + } + function getNameOfCompilerOptionValue(value, customTypeMap) { + // There is a typeMap associated with this command-line option so use it to map value back to its name + for (var key in customTypeMap) { + if (customTypeMap[key] === value) { + return key; + } + } + return undefined; + } + function serializeCompilerOptions(options) { + var result = ts.createMap(); + var optionsNameMap = getOptionNameMap().optionNameMap; + for (var name_35 in options) { + if (ts.hasProperty(options, name_35)) { + // tsconfig only options cannot be specified via command line, + // so we can assume that only types that can appear here string | number | boolean + switch (name_35) { + case "init": + case "watch": + case "version": + case "help": + case "project": + break; + default: + var value = options[name_35]; + var optionDefinition = optionsNameMap[name_35.toLowerCase()]; + if (optionDefinition) { + var customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition); + if (!customTypeMap) { + // There is no map associated with this compiler option then use the value as-is + // This is the case if the value is expect to be string, number, boolean or list of string + result[name_35] = value; + } + else { + if (optionDefinition.type === "list") { + var convertedValue = []; + for (var _i = 0, _a = value; _i < _a.length; _i++) { + var element = _a[_i]; + convertedValue.push(getNameOfCompilerOptionValue(element, customTypeMap)); + } + result[name_35] = convertedValue; + } + else { + // There is a typeMap associated with this command-line option so use it to map value back to its name + result[name_35] = getNameOfCompilerOptionValue(value, customTypeMap); + } + } + } + break; + } + } + } + return result; + } + } + ts.generateTSConfig = generateTSConfig; /** * Remove the comments from a json like text. * Comments can be single line comments (starting with # or //) or multiline comments using / * * / @@ -41098,170 +46809,423 @@ var ts; */ function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName) { if (existingOptions === void 0) { existingOptions = {}; } - var _a = convertCompilerOptionsFromJson(json["compilerOptions"], basePath, configFileName), optionsFromJsonConfigFile = _a.options, errors = _a.errors; - var options = ts.extend(existingOptions, optionsFromJsonConfigFile); + var errors = []; + var compilerOptions = convertCompilerOptionsFromJsonWorker(json["compilerOptions"], basePath, errors, configFileName); + var options = ts.extend(existingOptions, compilerOptions); + var typingOptions = convertTypingOptionsFromJsonWorker(json["typingOptions"], basePath, errors, configFileName); + options.configFilePath = configFileName; + var _a = getFileNames(errors), fileNames = _a.fileNames, wildcardDirectories = _a.wildcardDirectories; return { options: options, - fileNames: getFileNames(), - typingOptions: getTypingOptions(), - errors: errors + fileNames: fileNames, + typingOptions: typingOptions, + raw: json, + errors: errors, + wildcardDirectories: wildcardDirectories }; - function getFileNames() { - var fileNames = []; + function getFileNames(errors) { + var fileNames; if (ts.hasProperty(json, "files")) { - if (json["files"] instanceof Array) { - fileNames = ts.map(json["files"], function (s) { return ts.combinePaths(basePath, s); }); + if (ts.isArray(json["files"])) { + fileNames = json["files"]; } else { errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "files", "Array")); } } - else { - var filesSeen = {}; - var exclude = []; - if (json["exclude"] instanceof Array) { - exclude = json["exclude"]; + var includeSpecs; + if (ts.hasProperty(json, "include")) { + if (ts.isArray(json["include"])) { + includeSpecs = json["include"]; } else { - // by default exclude node_modules, and any specificied output directory - exclude = ["node_modules", "bower_components"]; - var outDir = json["compilerOptions"] && json["compilerOptions"]["outDir"]; - if (outDir) { - exclude.push(outDir); - } - } - exclude = ts.map(exclude, ts.normalizeSlashes); - var supportedExtensions = ts.getSupportedExtensions(options); - ts.Debug.assert(ts.indexOf(supportedExtensions, ".ts") < ts.indexOf(supportedExtensions, ".d.ts"), "Changed priority of extensions to pick"); - // Get files of supported extensions in their order of resolution - for (var _i = 0, supportedExtensions_1 = supportedExtensions; _i < supportedExtensions_1.length; _i++) { - var extension = supportedExtensions_1[_i]; - var filesInDirWithExtension = host.readDirectory(basePath, extension, exclude); - for (var _a = 0, filesInDirWithExtension_1 = filesInDirWithExtension; _a < filesInDirWithExtension_1.length; _a++) { - var fileName = filesInDirWithExtension_1[_a]; - // .ts extension would read the .d.ts extension files too but since .d.ts is lower priority extension, - // lets pick them when its turn comes up - if (extension === ".ts" && ts.fileExtensionIs(fileName, ".d.ts")) { - continue; - } - // Skip over any minified JavaScript files (ending in ".min.js") - if (/\.min\.js$/.test(fileName)) { - continue; - } - // If this is one of the output extension (which would be .d.ts and .js if we are allowing compilation of js files) - // do not include this file if we included .ts or .tsx file with same base name as it could be output of the earlier compilation - if (extension === ".d.ts" || (options.allowJs && ts.contains(ts.supportedJavascriptExtensions, extension))) { - var baseName = fileName.substr(0, fileName.length - extension.length); - if (ts.hasProperty(filesSeen, baseName + ".ts") || ts.hasProperty(filesSeen, baseName + ".tsx")) { - continue; - } - } - filesSeen[fileName] = true; - fileNames.push(fileName); - } + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "include", "Array")); } } - return fileNames; - } - function getTypingOptions() { - var options = ts.getBaseFileName(configFileName) === "jsconfig.json" - ? { enableAutoDiscovery: true, include: [], exclude: [] } - : { enableAutoDiscovery: false, include: [], exclude: [] }; - var jsonTypingOptions = json["typingOptions"]; - if (jsonTypingOptions) { - for (var id in jsonTypingOptions) { - if (id === "enableAutoDiscovery") { - if (typeof jsonTypingOptions[id] === "boolean") { - options.enableAutoDiscovery = jsonTypingOptions[id]; - } - else { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_typing_option_0, id)); - } - } - else if (id === "include") { - options.include = convertJsonOptionToStringArray(id, jsonTypingOptions[id], errors); - } - else if (id === "exclude") { - options.exclude = convertJsonOptionToStringArray(id, jsonTypingOptions[id], errors); - } - else { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_typing_option_0, id)); - } + var excludeSpecs; + if (ts.hasProperty(json, "exclude")) { + if (ts.isArray(json["exclude"])) { + excludeSpecs = json["exclude"]; + } + else { + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "exclude", "Array")); } } - return options; + else if (ts.hasProperty(json, "excludes")) { + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude)); + } + else { + // By default, exclude common package folders + excludeSpecs = ["node_modules", "bower_components", "jspm_packages"]; + } + // Always exclude the output directory unless explicitly included + var outDir = json["compilerOptions"] && json["compilerOptions"]["outDir"]; + if (outDir) { + excludeSpecs.push(outDir); + } + if (fileNames === undefined && includeSpecs === undefined) { + includeSpecs = ["**/*"]; + } + return matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors); } } ts.parseJsonConfigFileContent = parseJsonConfigFileContent; function convertCompilerOptionsFromJson(jsonOptions, basePath, configFileName) { - var options = {}; var errors = []; - if (configFileName && ts.getBaseFileName(configFileName) === "jsconfig.json") { - options.allowJs = true; - } - if (!jsonOptions) { - return { options: options, errors: errors }; - } - var optionNameMap = ts.arrayToMap(ts.optionDeclarations, function (opt) { return opt.name; }); - for (var id in jsonOptions) { - if (ts.hasProperty(optionNameMap, id)) { - var opt = optionNameMap[id]; - var optType = opt.type; - var value = jsonOptions[id]; - var expectedType = typeof optType === "string" ? optType : "string"; - if (typeof value === expectedType) { - if (typeof optType !== "string") { - var key = value.toLowerCase(); - if (ts.hasProperty(optType, key)) { - value = optType[key]; - } - else { - errors.push(ts.createCompilerDiagnostic(opt.error)); - value = 0; - } - } - if (opt.isFilePath) { - value = ts.normalizePath(ts.combinePaths(basePath, value)); - if (value === "") { - value = "."; - } - } - options[opt.name] = value; - } - else { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, id, expectedType)); - } - } - else { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_compiler_option_0, id)); - } - } + var options = convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName); return { options: options, errors: errors }; } ts.convertCompilerOptionsFromJson = convertCompilerOptionsFromJson; - function convertJsonOptionToStringArray(optionName, optionJson, errors, func) { - var items = []; - var invalidOptionType = false; - if (!ts.isArray(optionJson)) { - invalidOptionType = true; + function convertTypingOptionsFromJson(jsonOptions, basePath, configFileName) { + var errors = []; + var options = convertTypingOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName); + return { options: options, errors: errors }; + } + ts.convertTypingOptionsFromJson = convertTypingOptionsFromJson; + function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) { + var options = ts.getBaseFileName(configFileName) === "jsconfig.json" ? { allowJs: true, maxNodeModuleJsDepth: 2 } : {}; + convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, ts.Diagnostics.Unknown_compiler_option_0, errors); + return options; + } + function convertTypingOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) { + var options = ts.getBaseFileName(configFileName) === "jsconfig.json" + ? { enableAutoDiscovery: true, include: [], exclude: [] } + : { enableAutoDiscovery: false, include: [], exclude: [] }; + convertOptionsFromJson(ts.typingOptionDeclarations, jsonOptions, basePath, options, ts.Diagnostics.Unknown_typing_option_0, errors); + return options; + } + function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnosticMessage, errors) { + if (!jsonOptions) { + return; + } + var optionNameMap = ts.arrayToMap(optionDeclarations, function (opt) { return opt.name; }); + for (var id in jsonOptions) { + if (id in optionNameMap) { + var opt = optionNameMap[id]; + defaultOptions[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors); + } + else { + errors.push(ts.createCompilerDiagnostic(diagnosticMessage, id)); + } + } + } + function convertJsonOption(opt, value, basePath, errors) { + var optType = opt.type; + var expectedType = typeof optType === "string" ? optType : "string"; + if (optType === "list" && ts.isArray(value)) { + return convertJsonOptionOfListType(opt, value, basePath, errors); + } + else if (typeof value === expectedType) { + if (typeof optType !== "string") { + return convertJsonOptionOfCustomType(opt, value, errors); + } + else { + if (opt.isFilePath) { + value = ts.normalizePath(ts.combinePaths(basePath, value)); + if (value === "") { + value = "."; + } + } + } + return value; } else { - for (var _i = 0, _a = optionJson; _i < _a.length; _i++) { - var element = _a[_i]; - if (typeof element === "string") { - var item = func ? func(element) : element; - items.push(item); + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.name, expectedType)); + } + } + function convertJsonOptionOfCustomType(opt, value, errors) { + var key = value.toLowerCase(); + if (key in opt.type) { + return opt.type[key]; + } + else { + errors.push(createCompilerDiagnosticForInvalidCustomType(opt)); + } + } + function convertJsonOptionOfListType(option, values, basePath, errors) { + return ts.filter(ts.map(values, function (v) { return convertJsonOption(option.element, v, basePath, errors); }), function (v) { return !!v; }); + } + function trimString(s) { + return typeof s.trim === "function" ? s.trim() : s.replace(/^[\s]+|[\s]+$/g, ""); + } + /** + * Tests for a path that ends in a recursive directory wildcard. + * Matches **, \**, **\, and \**\, but not a**b. + * + * NOTE: used \ in place of / above to avoid issues with multiline comments. + * + * Breakdown: + * (^|\/) # matches either the beginning of the string or a directory separator. + * \*\* # matches the recursive directory wildcard "**". + * \/?$ # matches an optional trailing directory separator at the end of the string. + */ + var invalidTrailingRecursionPattern = /(^|\/)\*\*\/?$/; + /** + * Tests for a path with multiple recursive directory wildcards. + * Matches **\** and **\a\**, but not **\a**b. + * + * NOTE: used \ in place of / above to avoid issues with multiline comments. + * + * Breakdown: + * (^|\/) # matches either the beginning of the string or a directory separator. + * \*\*\/ # matches a recursive directory wildcard "**" followed by a directory separator. + * (.*\/)? # optionally matches any number of characters followed by a directory separator. + * \*\* # matches a recursive directory wildcard "**" + * ($|\/) # matches either the end of the string or a directory separator. + */ + var invalidMultipleRecursionPatterns = /(^|\/)\*\*\/(.*\/)?\*\*($|\/)/; + /** + * Tests for a path where .. appears after a recursive directory wildcard. + * Matches **\..\*, **\a\..\*, and **\.., but not ..\**\* + * + * NOTE: used \ in place of / above to avoid issues with multiline comments. + * + * Breakdown: + * (^|\/) # matches either the beginning of the string or a directory separator. + * \*\*\/ # matches a recursive directory wildcard "**" followed by a directory separator. + * (.*\/)? # optionally matches any number of characters followed by a directory separator. + * \.\. # matches a parent directory path component ".." + * ($|\/) # matches either the end of the string or a directory separator. + */ + var invalidDotDotAfterRecursiveWildcardPattern = /(^|\/)\*\*\/(.*\/)?\.\.($|\/)/; + /** + * Tests for a path containing a wildcard character in a directory component of the path. + * Matches \*\, \?\, and \a*b\, but not \a\ or \a\*. + * + * NOTE: used \ in place of / above to avoid issues with multiline comments. + * + * Breakdown: + * \/ # matches a directory separator. + * [^/]*? # matches any number of characters excluding directory separators (non-greedy). + * [*?] # matches either a wildcard character (* or ?) + * [^/]* # matches any number of characters excluding directory separators (greedy). + * \/ # matches a directory separator. + */ + var watchRecursivePattern = /\/[^/]*?[*?][^/]*\//; + /** + * Matches the portion of a wildcard path that does not contain wildcards. + * Matches \a of \a\*, or \a\b\c of \a\b\c\?\d. + * + * NOTE: used \ in place of / above to avoid issues with multiline comments. + * + * Breakdown: + * ^ # matches the beginning of the string + * [^*?]* # matches any number of non-wildcard characters + * (?=\/[^/]*[*?]) # lookahead that matches a directory separator followed by + * # a path component that contains at least one wildcard character (* or ?). + */ + var wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/; + /** + * Expands an array of file specifications. + * + * @param fileNames The literal file names to include. + * @param include The wildcard file specifications to include. + * @param exclude The wildcard file specifications to exclude. + * @param basePath The base path for any relative file specifications. + * @param options Compiler options. + * @param host The host used to resolve files and directories. + * @param errors An array for diagnostic reporting. + */ + function matchFileNames(fileNames, include, exclude, basePath, options, host, errors) { + basePath = ts.normalizePath(basePath); + // The exclude spec list is converted into a regular expression, which allows us to quickly + // test whether a file or directory should be excluded before recursively traversing the + // file system. + var keyMapper = host.useCaseSensitiveFileNames ? caseSensitiveKeyMapper : caseInsensitiveKeyMapper; + // Literal file names (provided via the "files" array in tsconfig.json) are stored in a + // file map with a possibly case insensitive key. We use this map later when when including + // wildcard paths. + var literalFileMap = ts.createMap(); + // Wildcard paths (provided via the "includes" array in tsconfig.json) are stored in a + // file map with a possibly case insensitive key. We use this map to store paths matched + // via wildcard, and to handle extension priority. + var wildcardFileMap = ts.createMap(); + if (include) { + include = validateSpecs(include, errors, /*allowTrailingRecursion*/ false); + } + if (exclude) { + exclude = validateSpecs(exclude, errors, /*allowTrailingRecursion*/ true); + } + // Wildcard directories (provided as part of a wildcard path) are stored in a + // file map that marks whether it was a regular wildcard match (with a `*` or `?` token), + // or a recursive directory. This information is used by filesystem watchers to monitor for + // new entries in these paths. + var wildcardDirectories = getWildcardDirectories(include, exclude, basePath, host.useCaseSensitiveFileNames); + // Rather than requery this for each file and filespec, we query the supported extensions + // once and store it on the expansion context. + var supportedExtensions = ts.getSupportedExtensions(options); + // Literal files are always included verbatim. An "include" or "exclude" specification cannot + // remove a literal file. + if (fileNames) { + for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) { + var fileName = fileNames_1[_i]; + var file = ts.combinePaths(basePath, fileName); + literalFileMap[keyMapper(file)] = file; + } + } + if (include && include.length > 0) { + for (var _a = 0, _b = host.readDirectory(basePath, supportedExtensions, exclude, include); _a < _b.length; _a++) { + var file = _b[_a]; + // If we have already included a literal or wildcard path with a + // higher priority extension, we should skip this file. + // + // This handles cases where we may encounter both .ts and + // .d.ts (or .js if "allowJs" is enabled) in the same + // directory when they are compilation outputs. + if (hasFileWithHigherPriorityExtension(file, literalFileMap, wildcardFileMap, supportedExtensions, keyMapper)) { + continue; } - else { - invalidOptionType = true; - break; + // We may have included a wildcard path with a lower priority + // extension due to the user-defined order of entries in the + // "include" array. If there is a lower priority extension in the + // same directory, we should remove it. + removeWildcardFilesWithLowerPriorityExtension(file, wildcardFileMap, supportedExtensions, keyMapper); + var key = keyMapper(file); + if (!(key in literalFileMap) && !(key in wildcardFileMap)) { + wildcardFileMap[key] = file; } } } - if (invalidOptionType) { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Option_0_should_have_array_of_strings_as_a_value, optionName)); + var literalFiles = ts.reduceProperties(literalFileMap, addFileToOutput, []); + var wildcardFiles = ts.reduceProperties(wildcardFileMap, addFileToOutput, []); + wildcardFiles.sort(host.useCaseSensitiveFileNames ? ts.compareStrings : ts.compareStringsCaseInsensitive); + return { + fileNames: literalFiles.concat(wildcardFiles), + wildcardDirectories: wildcardDirectories + }; + } + function validateSpecs(specs, errors, allowTrailingRecursion) { + var validSpecs = []; + for (var _i = 0, specs_2 = specs; _i < specs_2.length; _i++) { + var spec = specs_2[_i]; + if (!allowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) { + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec)); + } + else if (invalidMultipleRecursionPatterns.test(spec)) { + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0, spec)); + } + else if (invalidDotDotAfterRecursiveWildcardPattern.test(spec)) { + errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec)); + } + else { + validSpecs.push(spec); + } } - return items; + return validSpecs; + } + /** + * Gets directories in a set of include patterns that should be watched for changes. + */ + function getWildcardDirectories(include, exclude, path, useCaseSensitiveFileNames) { + // We watch a directory recursively if it contains a wildcard anywhere in a directory segment + // of the pattern: + // + // /a/b/**/d - Watch /a/b recursively to catch changes to any d in any subfolder recursively + // /a/b/*/d - Watch /a/b recursively to catch any d in any immediate subfolder, even if a new subfolder is added + // + // We watch a directory without recursion if it contains a wildcard in the file segment of + // the pattern: + // + // /a/b/* - Watch /a/b directly to catch any new file + // /a/b/a?z - Watch /a/b directly to catch any new file matching a?z + var rawExcludeRegex = ts.getRegularExpressionForWildcard(exclude, path, "exclude"); + var excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames ? "" : "i"); + var wildcardDirectories = ts.createMap(); + if (include !== undefined) { + var recursiveKeys = []; + for (var _i = 0, include_1 = include; _i < include_1.length; _i++) { + var file = include_1[_i]; + var name_36 = ts.normalizePath(ts.combinePaths(path, file)); + if (excludeRegex && excludeRegex.test(name_36)) { + continue; + } + var match = wildcardDirectoryPattern.exec(name_36); + if (match) { + var key = useCaseSensitiveFileNames ? match[0] : match[0].toLowerCase(); + var flags = watchRecursivePattern.test(name_36) ? 1 /* Recursive */ : 0 /* None */; + var existingFlags = wildcardDirectories[key]; + if (existingFlags === undefined || existingFlags < flags) { + wildcardDirectories[key] = flags; + if (flags === 1 /* Recursive */) { + recursiveKeys.push(key); + } + } + } + } + // Remove any subpaths under an existing recursively watched directory. + for (var key in wildcardDirectories) { + for (var _a = 0, recursiveKeys_1 = recursiveKeys; _a < recursiveKeys_1.length; _a++) { + var recursiveKey = recursiveKeys_1[_a]; + if (key !== recursiveKey && ts.containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) { + delete wildcardDirectories[key]; + } + } + } + } + return wildcardDirectories; + } + /** + * Determines whether a literal or wildcard file has already been included that has a higher + * extension priority. + * + * @param file The path to the file. + * @param extensionPriority The priority of the extension. + * @param context The expansion context. + */ + function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) { + var extensionPriority = ts.getExtensionPriority(file, extensions); + var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority); + for (var i = 0 /* Highest */; i < adjustedExtensionPriority; i++) { + var higherPriorityExtension = extensions[i]; + var higherPriorityPath = keyMapper(ts.changeExtension(file, higherPriorityExtension)); + if (higherPriorityPath in literalFiles || higherPriorityPath in wildcardFiles) { + return true; + } + } + return false; + } + /** + * Removes files included via wildcard expansion with a lower extension priority that have + * already been included. + * + * @param file The path to the file. + * @param extensionPriority The priority of the extension. + * @param context The expansion context. + */ + function removeWildcardFilesWithLowerPriorityExtension(file, wildcardFiles, extensions, keyMapper) { + var extensionPriority = ts.getExtensionPriority(file, extensions); + var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority); + for (var i = nextExtensionPriority; i < extensions.length; i++) { + var lowerPriorityExtension = extensions[i]; + var lowerPriorityPath = keyMapper(ts.changeExtension(file, lowerPriorityExtension)); + delete wildcardFiles[lowerPriorityPath]; + } + } + /** + * Adds a file to an array of files. + * + * @param output The output array. + * @param file The file path. + */ + function addFileToOutput(output, file) { + output.push(file); + return output; + } + /** + * Gets a case sensitive key. + * + * @param key The original key. + */ + function caseSensitiveKeyMapper(key) { + return key; + } + /** + * Gets a case insensitive key. + * + * @param key The original key. + */ + function caseInsensitiveKeyMapper(key) { + return key.toLowerCase(); } })(ts || (ts = {})); /* @internal */ @@ -41336,7 +47300,7 @@ var ts; } } function autoCollapse(node) { - return ts.isFunctionBlock(node) && node.parent.kind !== 177 /* ArrowFunction */; + return ts.isFunctionBlock(node) && node.parent.kind !== 180 /* ArrowFunction */; } var depth = 0; var maxDepth = 20; @@ -41348,30 +47312,30 @@ var ts; addOutliningForLeadingCommentsForNode(n); } switch (n.kind) { - case 195 /* Block */: + case 199 /* Block */: if (!ts.isFunctionBlock(n)) { - var parent_9 = n.parent; + var parent_16 = n.parent; var openBrace = ts.findChildOfKind(n, 15 /* OpenBraceToken */, sourceFile); var closeBrace = ts.findChildOfKind(n, 16 /* CloseBraceToken */, sourceFile); // Check if the block is standalone, or 'attached' to some parent statement. - // If the latter, we want to collaps the block, but consider its hint span + // If the latter, we want to collapse the block, but consider its hint span // to be the entire span of the parent. - if (parent_9.kind === 200 /* DoStatement */ || - parent_9.kind === 203 /* ForInStatement */ || - parent_9.kind === 204 /* ForOfStatement */ || - parent_9.kind === 202 /* ForStatement */ || - parent_9.kind === 199 /* IfStatement */ || - parent_9.kind === 201 /* WhileStatement */ || - parent_9.kind === 208 /* WithStatement */ || - parent_9.kind === 247 /* CatchClause */) { - addOutliningSpan(parent_9, openBrace, closeBrace, autoCollapse(n)); + if (parent_16.kind === 204 /* DoStatement */ || + parent_16.kind === 207 /* ForInStatement */ || + parent_16.kind === 208 /* ForOfStatement */ || + parent_16.kind === 206 /* ForStatement */ || + parent_16.kind === 203 /* IfStatement */ || + parent_16.kind === 205 /* WhileStatement */ || + parent_16.kind === 212 /* WithStatement */ || + parent_16.kind === 252 /* CatchClause */) { + addOutliningSpan(parent_16, openBrace, closeBrace, autoCollapse(n)); break; } - if (parent_9.kind === 212 /* TryStatement */) { + if (parent_16.kind === 216 /* TryStatement */) { // Could be the try-block, or the finally-block. - var tryStatement = parent_9; + var tryStatement = parent_16; if (tryStatement.tryBlock === n) { - addOutliningSpan(parent_9, openBrace, closeBrace, autoCollapse(n)); + addOutliningSpan(parent_16, openBrace, closeBrace, autoCollapse(n)); break; } else if (tryStatement.finallyBlock === n) { @@ -41394,23 +47358,23 @@ var ts; break; } // Fallthrough. - case 222 /* ModuleBlock */: { + case 226 /* ModuleBlock */: { var openBrace = ts.findChildOfKind(n, 15 /* OpenBraceToken */, sourceFile); var closeBrace = ts.findChildOfKind(n, 16 /* CloseBraceToken */, sourceFile); addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n)); break; } - case 217 /* ClassDeclaration */: - case 218 /* InterfaceDeclaration */: - case 220 /* EnumDeclaration */: - case 168 /* ObjectLiteralExpression */: - case 223 /* CaseBlock */: { + case 221 /* ClassDeclaration */: + case 222 /* InterfaceDeclaration */: + case 224 /* EnumDeclaration */: + case 171 /* ObjectLiteralExpression */: + case 227 /* CaseBlock */: { var openBrace = ts.findChildOfKind(n, 15 /* OpenBraceToken */, sourceFile); var closeBrace = ts.findChildOfKind(n, 16 /* CloseBraceToken */, sourceFile); addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n)); break; } - case 167 /* ArrayLiteralExpression */: + case 170 /* ArrayLiteralExpression */: var openBracket = ts.findChildOfKind(n, 19 /* OpenBracketToken */, sourceFile); var closeBracket = ts.findChildOfKind(n, 20 /* CloseBracketToken */, sourceFile); addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n)); @@ -41431,45 +47395,57 @@ var ts; (function (ts) { var NavigateTo; (function (NavigateTo) { - function getNavigateToItems(program, cancellationToken, searchValue, maxResultCount) { + function getNavigateToItems(program, checker, cancellationToken, searchValue, maxResultCount) { var patternMatcher = ts.createPatternMatcher(searchValue); var rawItems = []; // This means "compare in a case insensitive manner." var baseSensitivity = { sensitivity: "base" }; - // Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[] + // Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[] ts.forEach(program.getSourceFiles(), function (sourceFile) { cancellationToken.throwIfCancellationRequested(); var nameToDeclarations = sourceFile.getNamedDeclarations(); - for (var name_32 in nameToDeclarations) { - var declarations = ts.getProperty(nameToDeclarations, name_32); + for (var name_37 in nameToDeclarations) { + var declarations = nameToDeclarations[name_37]; if (declarations) { - // First do a quick check to see if the name of the declaration matches the + // First do a quick check to see if the name of the declaration matches the // last portion of the (possibly) dotted name they're searching for. - var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_32); + var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_37); if (!matches) { continue; } - for (var _i = 0, declarations_6 = declarations; _i < declarations_6.length; _i++) { - var declaration = declarations_6[_i]; - // It was a match! If the pattern has dots in it, then also see if the + for (var _i = 0, declarations_7 = declarations; _i < declarations_7.length; _i++) { + var declaration = declarations_7[_i]; + // It was a match! If the pattern has dots in it, then also see if the // declaration container matches as well. if (patternMatcher.patternContainsDots) { var containers = getContainers(declaration); if (!containers) { return undefined; } - matches = patternMatcher.getMatches(containers, name_32); + matches = patternMatcher.getMatches(containers, name_37); if (!matches) { continue; } } var fileName = sourceFile.fileName; var matchKind = bestMatchKind(matches); - rawItems.push({ name: name_32, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); + rawItems.push({ name: name_37, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); } } } }); + // Remove imports when the imported declaration is already in the list and has the same name. + rawItems = ts.filter(rawItems, function (item) { + var decl = item.declaration; + if (decl.kind === 231 /* ImportClause */ || decl.kind === 234 /* ImportSpecifier */ || decl.kind === 229 /* ImportEqualsDeclaration */) { + var importer = checker.getSymbolAtLocation(decl.name); + var imported = checker.getAliasedSymbol(importer); + return importer.name !== imported.name; + } + else { + return true; + } + }); rawItems.sort(compareNavigateToItems); if (maxResultCount !== undefined) { rawItems = rawItems.slice(0, maxResultCount); @@ -41503,7 +47479,7 @@ var ts; if (text !== undefined) { containers.unshift(text); } - else if (declaration.name.kind === 137 /* ComputedPropertyName */) { + else if (declaration.name.kind === 140 /* ComputedPropertyName */) { return tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ true); } else { @@ -41524,7 +47500,7 @@ var ts; } return true; } - if (expression.kind === 169 /* PropertyAccessExpression */) { + if (expression.kind === 172 /* PropertyAccessExpression */) { var propertyAccess = expression; if (includeLastPortion) { containers.unshift(propertyAccess.name.text); @@ -41537,7 +47513,7 @@ var ts; var containers = []; // First, if we started with a computed property name, then add all but the last // portion into the container array. - if (declaration.name.kind === 137 /* ComputedPropertyName */) { + if (declaration.name.kind === 140 /* ComputedPropertyName */) { if (!tryAddComputedPropertyName(declaration.name.expression, containers, /*includeLastPortion*/ false)) { return undefined; } @@ -41599,604 +47575,542 @@ var ts; (function (ts) { var NavigationBar; (function (NavigationBar) { - function getNavigationBarItems(sourceFile, compilerOptions) { - // TODO: Handle JS files differently in 'navbar' calls for now, but ideally we should unify - // the 'navbar' and 'navto' logic for TypeScript and JavaScript. - if (ts.isSourceFileJavaScript(sourceFile)) { - return getJsNavigationBarItems(sourceFile, compilerOptions); + function getNavigationBarItems(sourceFile) { + curSourceFile = sourceFile; + var result = ts.map(topLevelItems(rootNavigationBarNode(sourceFile)), convertToTopLevelItem); + curSourceFile = undefined; + return result; + } + NavigationBar.getNavigationBarItems = getNavigationBarItems; + // Keep sourceFile handy so we don't have to search for it every time we need to call `getText`. + var curSourceFile; + function nodeText(node) { + return node.getText(curSourceFile); + } + function navigationBarNodeKind(n) { + return n.node.kind; + } + function pushChild(parent, child) { + if (parent.children) { + parent.children.push(child); } - // If the source file has any child items, then it included in the tree - // and takes lexical ownership of all other top-level items. - var hasGlobalNode = false; - return getItemsWorker(getTopLevelNodes(sourceFile), createTopLevelItem); - function getIndent(node) { - // If we have a global node in the tree, - // then it adds an extra layer of depth to all subnodes. - var indent = hasGlobalNode ? 1 : 0; - var current = node.parent; - while (current) { - switch (current.kind) { - case 221 /* ModuleDeclaration */: - // If we have a module declared as A.B.C, it is more "intuitive" - // to say it only has a single layer of depth - do { - current = current.parent; - } while (current.kind === 221 /* ModuleDeclaration */); - // fall through - case 217 /* ClassDeclaration */: - case 220 /* EnumDeclaration */: - case 218 /* InterfaceDeclaration */: - case 216 /* FunctionDeclaration */: - indent++; + else { + parent.children = [child]; + } + } + /* + For performance, we keep navigation bar parents on a stack rather than passing them through each recursion. + `parent` is the current parent and is *not* stored in parentsStack. + `startNode` sets a new parent and `endNode` returns to the previous parent. + */ + var parentsStack = []; + var parent; + function rootNavigationBarNode(sourceFile) { + ts.Debug.assert(!parentsStack.length); + var root = { node: sourceFile, additionalNodes: undefined, parent: undefined, children: undefined, indent: 0 }; + parent = root; + for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) { + var statement = _a[_i]; + addChildrenRecursively(statement); + } + endNode(); + ts.Debug.assert(!parent && !parentsStack.length); + return root; + } + function addLeafNode(node) { + pushChild(parent, emptyNavigationBarNode(node)); + } + function emptyNavigationBarNode(node) { + return { + node: node, + additionalNodes: undefined, + parent: parent, + children: undefined, + indent: parent.indent + 1 + }; + } + /** + * Add a new level of NavigationBarNodes. + * This pushes to the stack, so you must call `endNode` when you are done adding to this node. + */ + function startNode(node) { + var navNode = emptyNavigationBarNode(node); + pushChild(parent, navNode); + // Save the old parent + parentsStack.push(parent); + parent = navNode; + } + /** Call after calling `startNode` and adding children to it. */ + function endNode() { + if (parent.children) { + mergeChildren(parent.children); + sortChildren(parent.children); + } + parent = parentsStack.pop(); + } + function addNodeWithRecursiveChild(node, child) { + startNode(node); + addChildrenRecursively(child); + endNode(); + } + /** Look for navigation bar items in node's subtree, adding them to the current `parent`. */ + function addChildrenRecursively(node) { + if (!node || ts.isToken(node)) { + return; + } + switch (node.kind) { + case 148 /* Constructor */: + // Get parameter properties, and treat them as being on the *same* level as the constructor, not under it. + var ctr = node; + addNodeWithRecursiveChild(ctr, ctr.body); + // Parameter properties are children of the class, not the constructor. + for (var _i = 0, _a = ctr.parameters; _i < _a.length; _i++) { + var param = _a[_i]; + if (ts.isParameterPropertyDeclaration(param)) { + addLeafNode(param); + } } - current = current.parent; - } - return indent; - } - function getChildNodes(nodes) { - var childNodes = []; - function visit(node) { - switch (node.kind) { - case 196 /* VariableStatement */: - ts.forEach(node.declarationList.declarations, visit); - break; - case 164 /* ObjectBindingPattern */: - case 165 /* ArrayBindingPattern */: - ts.forEach(node.elements, visit); - break; - case 231 /* ExportDeclaration */: - // Handle named exports case e.g.: - // export {a, b as B} from "mod"; - if (node.exportClause) { - ts.forEach(node.exportClause.elements, visit); + break; + case 147 /* MethodDeclaration */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 146 /* MethodSignature */: + if (!ts.hasDynamicName(node)) { + addNodeWithRecursiveChild(node, node.body); + } + break; + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + if (!ts.hasDynamicName(node)) { + addLeafNode(node); + } + break; + case 231 /* ImportClause */: + var importClause = node; + // Handle default import case e.g.: + // import d from "mod"; + if (importClause.name) { + addLeafNode(importClause); + } + // Handle named bindings in imports e.g.: + // import * as NS from "mod"; + // import {a, b as B} from "mod"; + var namedBindings = importClause.namedBindings; + if (namedBindings) { + if (namedBindings.kind === 232 /* NamespaceImport */) { + addLeafNode(namedBindings); + } + else { + for (var _b = 0, _c = namedBindings.elements; _b < _c.length; _b++) { + var element = _c[_b]; + addLeafNode(element); } - break; - case 225 /* ImportDeclaration */: - var importClause = node.importClause; - if (importClause) { - // Handle default import case e.g.: - // import d from "mod"; - if (importClause.name) { - childNodes.push(importClause); - } - // Handle named bindings in imports e.g.: - // import * as NS from "mod"; - // import {a, b as B} from "mod"; - if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 227 /* NamespaceImport */) { - childNodes.push(importClause.namedBindings); - } - else { - ts.forEach(importClause.namedBindings.elements, visit); - } - } - } - break; - case 166 /* BindingElement */: - case 214 /* VariableDeclaration */: - if (ts.isBindingPattern(node.name)) { - visit(node.name); - break; - } - // Fall through - case 217 /* ClassDeclaration */: - case 220 /* EnumDeclaration */: - case 218 /* InterfaceDeclaration */: - case 221 /* ModuleDeclaration */: - case 216 /* FunctionDeclaration */: - case 224 /* ImportEqualsDeclaration */: - case 229 /* ImportSpecifier */: - case 233 /* ExportSpecifier */: - childNodes.push(node); - break; + } } - } - //for (let i = 0, n = nodes.length; i < n; i++) { - // let node = nodes[i]; - // if (node.kind === SyntaxKind.ClassDeclaration || - // node.kind === SyntaxKind.EnumDeclaration || - // node.kind === SyntaxKind.InterfaceDeclaration || - // node.kind === SyntaxKind.ModuleDeclaration || - // node.kind === SyntaxKind.FunctionDeclaration) { - // childNodes.push(node); - // } - // else if (node.kind === SyntaxKind.VariableStatement) { - // childNodes.push.apply(childNodes, (node).declarations); - // } - //} - ts.forEach(nodes, visit); - return sortNodes(childNodes); - } - function getTopLevelNodes(node) { - var topLevelNodes = []; - topLevelNodes.push(node); - addTopLevelNodes(node.statements, topLevelNodes); - return topLevelNodes; - } - function sortNodes(nodes) { - return nodes.slice(0).sort(function (n1, n2) { - if (n1.name && n2.name) { - return ts.getPropertyNameForPropertyNameNode(n1.name).localeCompare(ts.getPropertyNameForPropertyNameNode(n2.name)); + break; + case 169 /* BindingElement */: + case 218 /* VariableDeclaration */: + var decl = node; + var name_38 = decl.name; + if (ts.isBindingPattern(name_38)) { + addChildrenRecursively(name_38); } - else if (n1.name) { - return 1; - } - else if (n2.name) { - return -1; + else if (decl.initializer && isFunctionOrClassExpression(decl.initializer)) { + // For `const x = function() {}`, just use the function node, not the const. + addChildrenRecursively(decl.initializer); } else { - return n1.kind - n2.kind; + addNodeWithRecursiveChild(decl, decl.initializer); } - }); - } - function addTopLevelNodes(nodes, topLevelNodes) { - nodes = sortNodes(nodes); - for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) { - var node = nodes_4[_i]; - switch (node.kind) { - case 217 /* ClassDeclaration */: - case 220 /* EnumDeclaration */: - case 218 /* InterfaceDeclaration */: - topLevelNodes.push(node); - break; - case 221 /* ModuleDeclaration */: - var moduleDeclaration = node; - topLevelNodes.push(node); - addTopLevelNodes(getInnermostModule(moduleDeclaration).body.statements, topLevelNodes); - break; - case 216 /* FunctionDeclaration */: - var functionDeclaration = node; - if (isTopLevelFunctionDeclaration(functionDeclaration)) { - topLevelNodes.push(node); - addTopLevelNodes(functionDeclaration.body.statements, topLevelNodes); - } - break; - } - } - } - function isTopLevelFunctionDeclaration(functionDeclaration) { - if (functionDeclaration.kind === 216 /* FunctionDeclaration */) { - // A function declaration is 'top level' if it contains any function declarations - // within it. - if (functionDeclaration.body && functionDeclaration.body.kind === 195 /* Block */) { - // Proper function declarations can only have identifier names - if (ts.forEach(functionDeclaration.body.statements, function (s) { return s.kind === 216 /* FunctionDeclaration */ && !isEmpty(s.name.text); })) { - return true; - } - // Or if it is not parented by another function. i.e all functions - // at module scope are 'top level'. - if (!ts.isFunctionBlock(functionDeclaration.parent)) { - return true; + break; + case 180 /* ArrowFunction */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + addNodeWithRecursiveChild(node, node.body); + break; + case 224 /* EnumDeclaration */: + startNode(node); + for (var _d = 0, _e = node.members; _d < _e.length; _d++) { + var member = _e[_d]; + if (!isComputedProperty(member)) { + addLeafNode(member); } } - } - return false; - } - function getItemsWorker(nodes, createItem) { - var items = []; - var keyToItem = {}; - for (var _i = 0, nodes_5 = nodes; _i < nodes_5.length; _i++) { - var child = nodes_5[_i]; - var item = createItem(child); - if (item !== undefined) { - if (item.text.length > 0) { - var key = item.text + "-" + item.kind + "-" + item.indent; - var itemWithSameName = keyToItem[key]; - if (itemWithSameName) { - // We had an item with the same name. Merge these items together. - merge(itemWithSameName, item); - } - else { - keyToItem[key] = item; - items.push(item); + endNode(); + break; + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: + case 222 /* InterfaceDeclaration */: + startNode(node); + for (var _f = 0, _g = node.members; _f < _g.length; _f++) { + var member = _g[_f]; + addChildrenRecursively(member); + } + endNode(); + break; + case 225 /* ModuleDeclaration */: + addNodeWithRecursiveChild(node, getInteriorModule(node).body); + break; + case 238 /* ExportSpecifier */: + case 229 /* ImportEqualsDeclaration */: + case 153 /* IndexSignature */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: + case 223 /* TypeAliasDeclaration */: + addLeafNode(node); + break; + default: + if (node.jsDocComments) { + for (var _h = 0, _j = node.jsDocComments; _h < _j.length; _h++) { + var jsDocComment = _j[_h]; + for (var _k = 0, _l = jsDocComment.tags; _k < _l.length; _k++) { + var tag = _l[_k]; + if (tag.kind === 279 /* JSDocTypedefTag */) { + addLeafNode(tag); + } } } } - } - return items; + ts.forEachChild(node, addChildrenRecursively); } + } + /** Merge declarations of the same kind. */ + function mergeChildren(children) { + var nameToItems = ts.createMap(); + ts.filterMutate(children, function (child) { + var decl = child.node; + var name = decl.name && nodeText(decl.name); + if (!name) { + // Anonymous items are never merged. + return true; + } + var itemsWithSameName = nameToItems[name]; + if (!itemsWithSameName) { + nameToItems[name] = child; + return true; + } + if (itemsWithSameName instanceof Array) { + for (var _i = 0, itemsWithSameName_1 = itemsWithSameName; _i < itemsWithSameName_1.length; _i++) { + var itemWithSameName = itemsWithSameName_1[_i]; + if (tryMerge(itemWithSameName, child)) { + return false; + } + } + itemsWithSameName.push(child); + return true; + } + else { + var itemWithSameName = itemsWithSameName; + if (tryMerge(itemWithSameName, child)) { + return false; + } + nameToItems[name] = [itemWithSameName, child]; + return true; + } + function tryMerge(a, b) { + if (shouldReallyMerge(a.node, b.node)) { + merge(a, b); + return true; + } + return false; + } + }); + /** a and b have the same name, but they may not be mergeable. */ + function shouldReallyMerge(a, b) { + return a.kind === b.kind && (a.kind !== 225 /* ModuleDeclaration */ || areSameModule(a, b)); + // We use 1 NavNode to represent 'A.B.C', but there are multiple source nodes. + // Only merge module nodes that have the same chain. Don't merge 'A.B.C' with 'A'! + function areSameModule(a, b) { + if (a.body.kind !== b.body.kind) { + return false; + } + if (a.body.kind !== 225 /* ModuleDeclaration */) { + return true; + } + return areSameModule(a.body, b.body); + } + } + /** Merge source into target. Source should be thrown away after this is called. */ function merge(target, source) { - // First, add any spans in the source to the target. - ts.addRange(target.spans, source.spans); - if (source.childItems) { - if (!target.childItems) { - target.childItems = []; - } - // Next, recursively merge or add any children in the source as appropriate. - outer: for (var _i = 0, _a = source.childItems; _i < _a.length; _i++) { - var sourceChild = _a[_i]; - for (var _b = 0, _c = target.childItems; _b < _c.length; _b++) { - var targetChild = _c[_b]; - if (targetChild.text === sourceChild.text && targetChild.kind === sourceChild.kind) { - // Found a match. merge them. - merge(targetChild, sourceChild); - continue outer; - } - } - // Didn't find a match, just add this child to the list. - target.childItems.push(sourceChild); - } + target.additionalNodes = target.additionalNodes || []; + target.additionalNodes.push(source.node); + if (source.additionalNodes) { + (_a = target.additionalNodes).push.apply(_a, source.additionalNodes); + } + target.children = ts.concatenate(target.children, source.children); + if (target.children) { + mergeChildren(target.children); + sortChildren(target.children); + } + var _a; + } + } + /** Recursively ensure that each NavNode's children are in sorted order. */ + function sortChildren(children) { + children.sort(compareChildren); + } + function compareChildren(child1, child2) { + var name1 = tryGetName(child1.node), name2 = tryGetName(child2.node); + if (name1 && name2) { + var cmp = localeCompareFix(name1, name2); + return cmp !== 0 ? cmp : navigationBarNodeKind(child1) - navigationBarNodeKind(child2); + } + else { + return name1 ? 1 : name2 ? -1 : navigationBarNodeKind(child1) - navigationBarNodeKind(child2); + } + } + // More efficient to create a collator once and use its `compare` than to call `a.localeCompare(b)` many times. + var collator = typeof Intl === "undefined" ? undefined : new Intl.Collator(); + // Intl is missing in Safari, and node 0.10 treats "a" as greater than "B". + var localeCompareIsCorrect = collator && collator.compare("a", "B") < 0; + var localeCompareFix = localeCompareIsCorrect ? collator.compare : function (a, b) { + // This isn't perfect, but it passes all of our tests. + for (var i = 0; i < Math.min(a.length, b.length); i++) { + var chA = a.charAt(i), chB = b.charAt(i); + if (chA === "\"" && chB === "'") { + return 1; + } + if (chA === "'" && chB === "\"") { + return -1; + } + var cmp = chA.toLocaleLowerCase().localeCompare(chB.toLocaleLowerCase()); + if (cmp !== 0) { + return cmp; } } - function createChildItem(node) { - switch (node.kind) { - case 139 /* Parameter */: - if (ts.isBindingPattern(node.name)) { - break; - } - if ((node.flags & 1022 /* Modifier */) === 0) { - return undefined; - } - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberFunctionElement); - case 146 /* GetAccessor */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberGetAccessorElement); - case 147 /* SetAccessor */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberSetAccessorElement); - case 150 /* IndexSignature */: - return createItem(node, "[]", ts.ScriptElementKind.indexSignatureElement); - case 250 /* EnumMember */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 148 /* CallSignature */: - return createItem(node, "()", ts.ScriptElementKind.callSignatureElement); - case 149 /* ConstructSignature */: - return createItem(node, "new()", ts.ScriptElementKind.constructSignatureElement); - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 216 /* FunctionDeclaration */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.functionElement); - case 214 /* VariableDeclaration */: - case 166 /* BindingElement */: - var variableDeclarationNode = void 0; - var name_33; - if (node.kind === 166 /* BindingElement */) { - name_33 = node.name; - variableDeclarationNode = node; - // binding elements are added only for variable declarations - // bubble up to the containing variable declaration - while (variableDeclarationNode && variableDeclarationNode.kind !== 214 /* VariableDeclaration */) { - variableDeclarationNode = variableDeclarationNode.parent; - } - ts.Debug.assert(variableDeclarationNode !== undefined); - } - else { - ts.Debug.assert(!ts.isBindingPattern(node.name)); - variableDeclarationNode = node; - name_33 = node.name; - } - if (ts.isConst(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_33), ts.ScriptElementKind.constElement); - } - else if (ts.isLet(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_33), ts.ScriptElementKind.letElement); - } - else { - return createItem(node, getTextOfNode(name_33), ts.ScriptElementKind.variableElement); - } - case 145 /* Constructor */: - return createItem(node, "constructor", ts.ScriptElementKind.constructorImplementationElement); - case 233 /* ExportSpecifier */: - case 229 /* ImportSpecifier */: - case 224 /* ImportEqualsDeclaration */: - case 226 /* ImportClause */: - case 227 /* NamespaceImport */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.alias); - } - return undefined; - function createItem(node, name, scriptElementKind) { - return getNavigationBarItem(name, scriptElementKind, ts.getNodeModifiers(node), [getNodeSpan(node)]); - } + return a.length - b.length; + }; + /** + * This differs from getItemName because this is just used for sorting. + * We only sort nodes by name that have a more-or-less "direct" name, as opposed to `new()` and the like. + * So `new()` can still come before an `aardvark` method. + */ + function tryGetName(node) { + if (node.kind === 225 /* ModuleDeclaration */) { + return getModuleName(node); } - function isEmpty(text) { - return !text || text.trim() === ""; + var decl = node; + if (decl.name) { + return ts.getPropertyNameForPropertyNameNode(decl.name); } - function getNavigationBarItem(text, kind, kindModifiers, spans, childItems, indent) { - if (childItems === void 0) { childItems = []; } - if (indent === void 0) { indent = 0; } - if (isEmpty(text)) { + switch (node.kind) { + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: + case 192 /* ClassExpression */: + return getFunctionOrClassName(node); + case 279 /* JSDocTypedefTag */: + return getJSDocTypedefTagName(node); + default: return undefined; + } + } + function getItemName(node) { + if (node.kind === 225 /* ModuleDeclaration */) { + return getModuleName(node); + } + var name = node.name; + if (name) { + var text = nodeText(name); + if (text.length > 0) { + return text; } + } + switch (node.kind) { + case 256 /* SourceFile */: + var sourceFile = node; + return ts.isExternalModule(sourceFile) + ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))) + "\"" + : ""; + case 180 /* ArrowFunction */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: + if (node.flags & 512 /* Default */) { + return "default"; + } + return getFunctionOrClassName(node); + case 148 /* Constructor */: + return "constructor"; + case 152 /* ConstructSignature */: + return "new()"; + case 151 /* CallSignature */: + return "()"; + case 153 /* IndexSignature */: + return "[]"; + case 279 /* JSDocTypedefTag */: + return getJSDocTypedefTagName(node); + default: + return ""; + } + } + function getJSDocTypedefTagName(node) { + if (node.name) { + return node.name.text; + } + else { + var parentNode = node.parent && node.parent.parent; + if (parentNode && parentNode.kind === 200 /* VariableStatement */) { + if (parentNode.declarationList.declarations.length > 0) { + var nameIdentifier = parentNode.declarationList.declarations[0].name; + if (nameIdentifier.kind === 69 /* Identifier */) { + return nameIdentifier.text; + } + } + } + return ""; + } + } + /** Flattens the NavNode tree to a list, keeping only the top-level items. */ + function topLevelItems(root) { + var topLevel = []; + function recur(item) { + if (isTopLevel(item)) { + topLevel.push(item); + if (item.children) { + for (var _i = 0, _a = item.children; _i < _a.length; _i++) { + var child = _a[_i]; + recur(child); + } + } + } + } + recur(root); + return topLevel; + function isTopLevel(item) { + switch (navigationBarNodeKind(item)) { + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: + case 224 /* EnumDeclaration */: + case 222 /* InterfaceDeclaration */: + case 225 /* ModuleDeclaration */: + case 256 /* SourceFile */: + case 223 /* TypeAliasDeclaration */: + case 279 /* JSDocTypedefTag */: + return true; + case 148 /* Constructor */: + case 147 /* MethodDeclaration */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + return hasSomeImportantChild(item); + case 180 /* ArrowFunction */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + return isTopLevelFunctionDeclaration(item); + default: + return false; + } + function isTopLevelFunctionDeclaration(item) { + if (!item.node.body) { + return false; + } + switch (navigationBarNodeKind(item.parent)) { + case 226 /* ModuleBlock */: + case 256 /* SourceFile */: + case 147 /* MethodDeclaration */: + case 148 /* Constructor */: + return true; + default: + return hasSomeImportantChild(item); + } + } + function hasSomeImportantChild(item) { + return ts.forEach(item.children, function (child) { + var childKind = navigationBarNodeKind(child); + return childKind !== 218 /* VariableDeclaration */ && childKind !== 169 /* BindingElement */; + }); + } + } + } + // NavigationBarItem requires an array, but will not mutate it, so just give it this for performance. + var emptyChildItemArray = []; + function convertToTopLevelItem(n) { + return { + text: getItemName(n.node), + kind: ts.getNodeKind(n.node), + kindModifiers: ts.getNodeModifiers(n.node), + spans: getSpans(n), + childItems: ts.map(n.children, convertToChildItem) || emptyChildItemArray, + indent: n.indent, + bolded: false, + grayed: false + }; + function convertToChildItem(n) { return { - text: text, - kind: kind, - kindModifiers: kindModifiers, - spans: spans, - childItems: childItems, - indent: indent, + text: getItemName(n.node), + kind: ts.getNodeKind(n.node), + kindModifiers: ts.getNodeModifiers(n.node), + spans: getSpans(n), + childItems: emptyChildItemArray, + indent: 0, bolded: false, grayed: false }; } - function createTopLevelItem(node) { - switch (node.kind) { - case 251 /* SourceFile */: - return createSourceFileItem(node); - case 217 /* ClassDeclaration */: - return createClassItem(node); - case 220 /* EnumDeclaration */: - return createEnumItem(node); - case 218 /* InterfaceDeclaration */: - return createIterfaceItem(node); - case 221 /* ModuleDeclaration */: - return createModuleItem(node); - case 216 /* FunctionDeclaration */: - return createFunctionItem(node); - } - return undefined; - function getModuleName(moduleDeclaration) { - // We want to maintain quotation marks. - if (ts.isAmbientModule(moduleDeclaration)) { - return getTextOfNode(moduleDeclaration.name); + function getSpans(n) { + var spans = [getNodeSpan(n.node)]; + if (n.additionalNodes) { + for (var _i = 0, _a = n.additionalNodes; _i < _a.length; _i++) { + var node = _a[_i]; + spans.push(getNodeSpan(node)); } - // Otherwise, we need to aggregate each identifier to build up the qualified name. - var result = []; - result.push(moduleDeclaration.name.text); - while (moduleDeclaration.body && moduleDeclaration.body.kind === 221 /* ModuleDeclaration */) { - moduleDeclaration = moduleDeclaration.body; - result.push(moduleDeclaration.name.text); - } - return result.join("."); } - function createModuleItem(node) { - var moduleName = getModuleName(node); - var childItems = getItemsWorker(getChildNodes(getInnermostModule(node).body.statements), createChildItem); - return getNavigationBarItem(moduleName, ts.ScriptElementKind.moduleElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); - } - function createFunctionItem(node) { - if (node.body && node.body.kind === 195 /* Block */) { - var childItems = getItemsWorker(sortNodes(node.body.statements), createChildItem); - return getNavigationBarItem(!node.name ? "default" : node.name.text, ts.ScriptElementKind.functionElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); - } - return undefined; - } - function createSourceFileItem(node) { - var childItems = getItemsWorker(getChildNodes(node.statements), createChildItem); - if (childItems === undefined || childItems.length === 0) { - return undefined; - } - hasGlobalNode = true; - var rootName = ts.isExternalModule(node) - ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(node.fileName)))) + "\"" - : ""; - return getNavigationBarItem(rootName, ts.ScriptElementKind.moduleElement, ts.ScriptElementKindModifier.none, [getNodeSpan(node)], childItems); - } - function createClassItem(node) { - var childItems; - if (node.members) { - var constructor = ts.forEach(node.members, function (member) { - return member.kind === 145 /* Constructor */ && member; - }); - // Add the constructor parameters in as children of the class (for property parameters). - // Note that *all non-binding pattern named* parameters will be added to the nodes array, but parameters that - // are not properties will be filtered out later by createChildItem. - var nodes = removeDynamicallyNamedProperties(node); - if (constructor) { - ts.addRange(nodes, ts.filter(constructor.parameters, function (p) { return !ts.isBindingPattern(p.name); })); - } - childItems = getItemsWorker(sortNodes(nodes), createChildItem); - } - var nodeName = !node.name ? "default" : node.name.text; - return getNavigationBarItem(nodeName, ts.ScriptElementKind.classElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); - } - function createEnumItem(node) { - var childItems = getItemsWorker(sortNodes(removeComputedProperties(node)), createChildItem); - return getNavigationBarItem(node.name.text, ts.ScriptElementKind.enumElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); - } - function createIterfaceItem(node) { - var childItems = getItemsWorker(sortNodes(removeDynamicallyNamedProperties(node)), createChildItem); - return getNavigationBarItem(node.name.text, ts.ScriptElementKind.interfaceElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); - } - } - function removeComputedProperties(node) { - return ts.filter(node.members, function (member) { return member.name === undefined || member.name.kind !== 137 /* ComputedPropertyName */; }); - } - /** - * Like removeComputedProperties, but retains the properties with well known symbol names - */ - function removeDynamicallyNamedProperties(node) { - return ts.filter(node.members, function (member) { return !ts.hasDynamicName(member); }); - } - function getInnermostModule(node) { - while (node.body.kind === 221 /* ModuleDeclaration */) { - node = node.body; - } - return node; - } - function getNodeSpan(node) { - return node.kind === 251 /* SourceFile */ - ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) - : ts.createTextSpanFromBounds(node.getStart(), node.getEnd()); - } - function getTextOfNode(node) { - return ts.getTextOfNodeFromSourceText(sourceFile.text, node); + return spans; } } - NavigationBar.getNavigationBarItems = getNavigationBarItems; - function getJsNavigationBarItems(sourceFile, compilerOptions) { - var anonFnText = ""; - var anonClassText = ""; - var indent = 0; - var rootName = ts.isExternalModule(sourceFile) ? - "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(sourceFile.fileName)))) + "\"" - : ""; - var sourceFileItem = getNavBarItem(rootName, ts.ScriptElementKind.moduleElement, [getNodeSpan(sourceFile)]); - var topItem = sourceFileItem; - // Walk the whole file, because we want to also find function expressions - which may be in variable initializer, - // call arguments, expressions, etc... - ts.forEachChild(sourceFile, visitNode); - function visitNode(node) { - var newItem = createNavBarItem(node); - if (newItem) { - topItem.childItems.push(newItem); - } - // Add a level if traversing into a container - if (newItem && (ts.isFunctionLike(node) || ts.isClassLike(node))) { - var lastTop = topItem; - indent++; - topItem = newItem; - ts.forEachChild(node, visitNode); - topItem = lastTop; - indent--; - // If the last item added was an anonymous function expression, and it had no children, discard it. - if (newItem && newItem.text === anonFnText && newItem.childItems.length === 0) { - topItem.childItems.pop(); - } - } - else { - ts.forEachChild(node, visitNode); - } + function getModuleName(moduleDeclaration) { + // We want to maintain quotation marks. + if (ts.isAmbientModule(moduleDeclaration)) { + return ts.getTextOfNode(moduleDeclaration.name); } - function createNavBarItem(node) { - switch (node.kind) { - case 214 /* VariableDeclaration */: - // Only add to the navbar if at the top-level of the file - // Note: "const" and "let" are also SyntaxKind.VariableDeclarations - if (node.parent /*VariableDeclarationList*/.parent /*VariableStatement*/ - .parent /*SourceFile*/.kind !== 251 /* SourceFile */) { - return undefined; - } - // If it is initialized with a function expression, handle it when we reach the function expression node - var varDecl = node; - if (varDecl.initializer && (varDecl.initializer.kind === 176 /* FunctionExpression */ || - varDecl.initializer.kind === 177 /* ArrowFunction */ || - varDecl.initializer.kind === 189 /* ClassExpression */)) { - return undefined; - } - // Fall through - case 216 /* FunctionDeclaration */: - case 217 /* ClassDeclaration */: - case 145 /* Constructor */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - // "export default function().." looks just like a regular function/class declaration, except with the 'default' flag - var name_34 = node.flags && (node.flags & 512 /* Default */) && !node.name ? "default" : - node.kind === 145 /* Constructor */ ? "constructor" : - ts.declarationNameToString(node.name); - return getNavBarItem(name_34, getScriptKindForElementKind(node.kind), [getNodeSpan(node)]); - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: - case 189 /* ClassExpression */: - return getDefineModuleItem(node) || getFunctionOrClassExpressionItem(node); - case 144 /* MethodDeclaration */: - var methodDecl = node; - return getNavBarItem(ts.declarationNameToString(methodDecl.name), ts.ScriptElementKind.memberFunctionElement, [getNodeSpan(node)]); - case 230 /* ExportAssignment */: - // e.g. "export default " - return getNavBarItem("default", ts.ScriptElementKind.variableElement, [getNodeSpan(node)]); - case 226 /* ImportClause */: - if (!node.name) { - // No default import (this node is still a parent of named & namespace imports, which are handled below) - return undefined; - } - // fall through - case 229 /* ImportSpecifier */: // e.g. 'id' in: import {id} from 'mod' (in NamedImports, in ImportClause) - case 227 /* NamespaceImport */: // e.g. '* as ns' in: import * as ns from 'mod' (in ImportClause) - case 233 /* ExportSpecifier */: - // Export specifiers are only interesting if they are reexports from another module, or renamed, else they are already globals - if (node.kind === 233 /* ExportSpecifier */) { - if (!node.parent.parent.moduleSpecifier && !node.propertyName) { - return undefined; - } - } - var decl = node; - if (!decl.name) { - return undefined; - } - var declName = ts.declarationNameToString(decl.name); - return getNavBarItem(declName, ts.ScriptElementKind.constElement, [getNodeSpan(node)]); - default: - return undefined; - } + // Otherwise, we need to aggregate each identifier to build up the qualified name. + var result = []; + result.push(moduleDeclaration.name.text); + while (moduleDeclaration.body && moduleDeclaration.body.kind === 225 /* ModuleDeclaration */) { + moduleDeclaration = moduleDeclaration.body; + result.push(moduleDeclaration.name.text); } - function getNavBarItem(text, kind, spans, kindModifiers) { - if (kindModifiers === void 0) { kindModifiers = ts.ScriptElementKindModifier.none; } - return { - text: text, kind: kind, kindModifiers: kindModifiers, spans: spans, childItems: [], indent: indent, bolded: false, grayed: false - }; - } - function getDefineModuleItem(node) { - if (node.kind !== 176 /* FunctionExpression */ && node.kind !== 177 /* ArrowFunction */) { - return undefined; - } - // No match if this is not a call expression to an identifier named 'define' - if (node.parent.kind !== 171 /* CallExpression */) { - return undefined; - } - var callExpr = node.parent; - if (callExpr.expression.kind !== 69 /* Identifier */ || callExpr.expression.getText() !== 'define') { - return undefined; - } - // Return a module of either the given text in the first argument, or of the source file path - var defaultName = node.getSourceFile().fileName; - if (callExpr.arguments[0].kind === 9 /* StringLiteral */) { - defaultName = (callExpr.arguments[0]).text; - } - return getNavBarItem(defaultName, ts.ScriptElementKind.moduleElement, [getNodeSpan(node.parent)]); - } - function getFunctionOrClassExpressionItem(node) { - if (node.kind !== 176 /* FunctionExpression */ && - node.kind !== 177 /* ArrowFunction */ && - node.kind !== 189 /* ClassExpression */) { - return undefined; - } - var fnExpr = node; - var fnName; - if (fnExpr.name && ts.getFullWidth(fnExpr.name) > 0) { - // The expression has an identifier, so use that as the name - fnName = ts.declarationNameToString(fnExpr.name); - } - else { - // See if it is a var initializer. If so, use the var name. - if (fnExpr.parent.kind === 214 /* VariableDeclaration */) { - fnName = ts.declarationNameToString(fnExpr.parent.name); - } - else if (fnExpr.parent.kind === 184 /* BinaryExpression */ && - fnExpr.parent.operatorToken.kind === 56 /* EqualsToken */) { - fnName = fnExpr.parent.left.getText(); - if (fnName.length > 20) { - fnName = fnName.substring(0, 17) + "..."; - } - } - else if (fnExpr.parent.kind === 248 /* PropertyAssignment */ && - fnExpr.parent.name) { - fnName = fnExpr.parent.name.getText(); - } - else { - fnName = node.kind === 189 /* ClassExpression */ ? anonClassText : anonFnText; - } - } - var scriptKind = node.kind === 189 /* ClassExpression */ ? ts.ScriptElementKind.classElement : ts.ScriptElementKind.functionElement; - return getNavBarItem(fnName, scriptKind, [getNodeSpan(node)]); - } - function getNodeSpan(node) { - return node.kind === 251 /* SourceFile */ - ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) - : ts.createTextSpanFromBounds(node.getStart(), node.getEnd()); - } - function getScriptKindForElementKind(kind) { - switch (kind) { - case 214 /* VariableDeclaration */: - return ts.ScriptElementKind.variableElement; - case 216 /* FunctionDeclaration */: - return ts.ScriptElementKind.functionElement; - case 217 /* ClassDeclaration */: - return ts.ScriptElementKind.classElement; - case 145 /* Constructor */: - return ts.ScriptElementKind.constructorImplementationElement; - case 146 /* GetAccessor */: - return ts.ScriptElementKind.memberGetAccessorElement; - case 147 /* SetAccessor */: - return ts.ScriptElementKind.memberSetAccessorElement; - default: - return "unknown"; - } - } - return sourceFileItem.childItems; + return result.join("."); + } + /** + * For 'module A.B.C', we want to get the node for 'C'. + * We store 'A' as associated with a NavNode, and use getModuleName to traverse down again. + */ + function getInteriorModule(decl) { + return decl.body.kind === 225 /* ModuleDeclaration */ ? getInteriorModule(decl.body) : decl; + } + function isComputedProperty(member) { + return !member.name || member.name.kind === 140 /* ComputedPropertyName */; + } + function getNodeSpan(node) { + return node.kind === 256 /* SourceFile */ + ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) + : ts.createTextSpanFromBounds(node.getStart(curSourceFile), node.getEnd()); + } + function getFunctionOrClassName(node) { + if (node.name && ts.getFullWidth(node.name) > 0) { + return ts.declarationNameToString(node.name); + } + else if (node.parent.kind === 218 /* VariableDeclaration */) { + return ts.declarationNameToString(node.parent.name); + } + else if (node.parent.kind === 187 /* BinaryExpression */ && + node.parent.operatorToken.kind === 56 /* EqualsToken */) { + return nodeText(node.parent.left); + } + else if (node.parent.kind === 253 /* PropertyAssignment */ && node.parent.name) { + return nodeText(node.parent.name); + } + else if (node.flags & 512 /* Default */) { + return "default"; + } + else { + return ts.isClassLike(node) ? "" : ""; + } + } + function isFunctionOrClassExpression(node) { + return node.kind === 179 /* FunctionExpression */ || node.kind === 180 /* ArrowFunction */ || node.kind === 192 /* ClassExpression */; } - NavigationBar.getJsNavigationBarItems = getJsNavigationBarItems; })(NavigationBar = ts.NavigationBar || (ts.NavigationBar = {})); })(ts || (ts = {})); /* @internal */ @@ -42223,7 +48137,7 @@ var ts; // we see the name of a module that is used everywhere, or the name of an overload). As // such, we cache the information we compute about the candidate for the life of this // pattern matcher so we don't have to compute it multiple times. - var stringToWordSpans = {}; + var stringToWordSpans = ts.createMap(); pattern = pattern.trim(); var dotSeparatedSegments = pattern.split(".").map(function (p) { return createSegment(p.trim()); }); var invalidPattern = dotSeparatedSegments.length === 0 || ts.forEach(dotSeparatedSegments, segmentIsInvalid); @@ -42279,7 +48193,7 @@ var ts; return totalMatch; } function getWordSpans(word) { - if (!ts.hasProperty(stringToWordSpans, word)) { + if (!(word in stringToWordSpans)) { stringToWordSpans[word] = breakIntoWordSpans(word); } return stringToWordSpans[word]; @@ -42295,7 +48209,7 @@ var ts; else { // b) Check if the part is a prefix of the candidate, in a case insensitive or sensitive // manner. If it does, return that there was a prefix match. - return createPatternMatch(PatternMatchKind.prefix, punctuationStripped, /*isCaseSensitive:*/ startsWith(candidate, chunk.text)); + return createPatternMatch(PatternMatchKind.prefix, punctuationStripped, /*isCaseSensitive:*/ ts.startsWith(candidate, chunk.text)); } } var isLowercase = chunk.isLowerCase; @@ -42561,14 +48475,6 @@ var ts; var str = String.fromCharCode(ch); return str === str.toLowerCase(); } - function startsWith(string, search) { - for (var i = 0, n = search.length; i < n; i++) { - if (string.charCodeAt(i) !== search.charCodeAt(i)) { - return false; - } - } - return true; - } // Assumes 'value' is already lowercase. function indexOfIgnoringCase(string, value) { for (var i = 0, n = string.length - value.length; i <= n; i++) { @@ -42773,11 +48679,11 @@ var ts; var SignatureHelp; (function (SignatureHelp) { // A partially written generic type expression is not guaranteed to have the correct syntax tree. the expression could be parsed as less than/greater than expression or a comma expression - // or some other combination depending on what the user has typed so far. For the purposes of signature help we need to consider any location after "<" as a possible generic type reference. - // To do this, the method will back parse the expression starting at the position required. it will try to parse the current expression as a generic type expression, if it did succeed it - // will return the generic identifier that started the expression (e.g. "foo" in "foo(#a, b) -> The token introduces a list, and should begin a sig help session - // Case 2: - // fo#o#(a, b)# -> The token is either not associated with a list, or ends a list, so the session should end - // Case 3: - // foo(a#, #b#) -> The token is buried inside a list, and should give sig help - // Find out if 'node' is an argument, a type argument, or neither - if (node.kind === 25 /* LessThanToken */ || - node.kind === 17 /* OpenParenToken */) { - // Find the list that starts right *after* the < or ( token. - // If the user has just opened a list, consider this item 0. - var list = getChildListThatStartsWithOpenerToken(callExpression, node, sourceFile); - var isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; - ts.Debug.assert(list !== undefined); - return { - kind: isTypeArgList ? 0 /* TypeArguments */ : 1 /* CallArguments */, - invocation: callExpression, - argumentsSpan: getApplicableSpanForArguments(list), - argumentIndex: 0, - argumentCount: getArgumentCount(list) - }; - } - // findListItemInfo can return undefined if we are not in parent's argument list - // or type argument list. This includes cases where the cursor is: - // - To the right of the closing paren, non-substitution template, or template tail. - // - Between the type arguments and the arguments (greater than token) - // - On the target of the call (parent.func) - // - On the 'new' keyword in a 'new' expression - var listItemInfo = ts.findListItemInfo(node); - if (listItemInfo) { - var list = listItemInfo.list; - var isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; - var argumentIndex = getArgumentIndex(list, node); - var argumentCount = getArgumentCount(list); - ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); - return { - kind: isTypeArgList ? 0 /* TypeArguments */ : 1 /* CallArguments */, - invocation: callExpression, - argumentsSpan: getApplicableSpanForArguments(list), - argumentIndex: argumentIndex, - argumentCount: argumentCount - }; - } - } - else if (node.kind === 11 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 173 /* TaggedTemplateExpression */) { - // Check if we're actually inside the template; - // otherwise we'll fall out and return undefined. - if (ts.isInsideTemplateLiteral(node, position)) { - return getArgumentListInfoForTemplate(node.parent, /*argumentIndex*/ 0); - } - } - else if (node.kind === 12 /* TemplateHead */ && node.parent.parent.kind === 173 /* TaggedTemplateExpression */) { - var templateExpression = node.parent; - var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 186 /* TemplateExpression */); - var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; - return getArgumentListInfoForTemplate(tagExpression, argumentIndex); - } - else if (node.parent.kind === 193 /* TemplateSpan */ && node.parent.parent.parent.kind === 173 /* TaggedTemplateExpression */) { - var templateSpan = node.parent; - var templateExpression = templateSpan.parent; - var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 186 /* TemplateExpression */); - // If we're just after a template tail, don't show signature help. - if (node.kind === 14 /* TemplateTail */ && !ts.isInsideTemplateLiteral(node, position)) { - return undefined; - } - var spanIndex = templateExpression.templateSpans.indexOf(templateSpan); - var argumentIndex = getArgumentIndexForTemplatePiece(spanIndex, node); - return getArgumentListInfoForTemplate(tagExpression, argumentIndex); - } - return undefined; - } - function getArgumentIndex(argumentsList, node) { - // The list we got back can include commas. In the presence of errors it may - // also just have nodes without commas. For example "Foo(a b c)" will have 3 - // args without commas. We want to find what index we're at. So we count - // forward until we hit ourselves, only incrementing the index if it isn't a - // comma. + } + /** + * Returns relevant information for the argument list and the current argument if we are + * in the argument of an invocation; returns undefined otherwise. + */ + function getImmediatelyContainingArgumentInfo(node, position, sourceFile) { + if (node.parent.kind === 174 /* CallExpression */ || node.parent.kind === 175 /* NewExpression */) { + var callExpression = node.parent; + // There are 3 cases to handle: + // 1. The token introduces a list, and should begin a sig help session + // 2. The token is either not associated with a list, or ends a list, so the session should end + // 3. The token is buried inside a list, and should give sig help // - // Note: the subtlety around trailing commas (in getArgumentCount) does not apply - // here. That's because we're only walking forward until we hit the node we're - // on. In that case, even if we're after the trailing comma, we'll still see - // that trailing comma in the list, and we'll have generated the appropriate - // arg index. - var argumentIndex = 0; - var listChildren = argumentsList.getChildren(); - for (var _i = 0, listChildren_1 = listChildren; _i < listChildren_1.length; _i++) { - var child = listChildren_1[_i]; - if (child === node) { - break; - } - if (child.kind !== 24 /* CommaToken */) { - argumentIndex++; - } - } - return argumentIndex; - } - function getArgumentCount(argumentsList) { - // The argument count for a list is normally the number of non-comma children it has. - // For example, if you have "Foo(a,b)" then there will be three children of the arg - // list 'a' '' 'b'. So, in this case the arg count will be 2. However, there - // is a small subtlety. If you have "Foo(a,)", then the child list will just have - // 'a' ''. So, in the case where the last child is a comma, we increase the - // arg count by one to compensate. + // The following are examples of each: // - // Note: this subtlety only applies to the last comma. If you had "Foo(a,," then - // we'll have: 'a' '' '' - // That will give us 2 non-commas. We then add one for the last comma, givin us an - // arg count of 3. - var listChildren = argumentsList.getChildren(); - var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 24 /* CommaToken */; }); - if (listChildren.length > 0 && ts.lastOrUndefined(listChildren).kind === 24 /* CommaToken */) { - argumentCount++; - } - return argumentCount; - } - // spanIndex is either the index for a given template span. - // This does not give appropriate results for a NoSubstitutionTemplateLiteral - function getArgumentIndexForTemplatePiece(spanIndex, node) { - // Because the TemplateStringsArray is the first argument, we have to offset each substitution expression by 1. - // There are three cases we can encounter: - // 1. We are precisely in the template literal (argIndex = 0). - // 2. We are in or to the right of the substitution expression (argIndex = spanIndex + 1). - // 3. We are directly to the right of the template literal, but because we look for the token on the left, - // not enough to put us in the substitution expression; we should consider ourselves part of - // the *next* span's expression by offsetting the index (argIndex = (spanIndex + 1) + 1). - // - // Example: f `# abcd $#{# 1 + 1# }# efghi ${ #"#hello"# } # ` - // ^ ^ ^ ^ ^ ^ ^ ^ ^ - // Case: 1 1 3 2 1 3 2 2 1 - ts.Debug.assert(position >= node.getStart(), "Assumed 'position' could not occur before node."); - if (ts.isTemplateLiteralKind(node.kind)) { - if (ts.isInsideTemplateLiteral(node, position)) { - return 0; - } - return spanIndex + 2; - } - return spanIndex + 1; - } - function getArgumentListInfoForTemplate(tagExpression, argumentIndex) { - // argumentCount is either 1 or (numSpans + 1) to account for the template strings array argument. - var argumentCount = tagExpression.template.kind === 11 /* NoSubstitutionTemplateLiteral */ - ? 1 - : tagExpression.template.templateSpans.length + 1; - ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); - return { - kind: 2 /* TaggedTemplateArguments */, - invocation: tagExpression, - argumentsSpan: getApplicableSpanForTaggedTemplate(tagExpression), - argumentIndex: argumentIndex, - argumentCount: argumentCount - }; - } - function getApplicableSpanForArguments(argumentsList) { - // We use full start and skip trivia on the end because we want to include trivia on - // both sides. For example, - // - // foo( /*comment */ a, b, c /*comment*/ ) - // | | - // - // The applicable span is from the first bar to the second bar (inclusive, - // but not including parentheses) - var applicableSpanStart = argumentsList.getFullStart(); - var applicableSpanEnd = ts.skipTrivia(sourceFile.text, argumentsList.getEnd(), /*stopAfterLineBreak*/ false); - return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); - } - function getApplicableSpanForTaggedTemplate(taggedTemplate) { - var template = taggedTemplate.template; - var applicableSpanStart = template.getStart(); - var applicableSpanEnd = template.getEnd(); - // We need to adjust the end position for the case where the template does not have a tail. - // Otherwise, we will not show signature help past the expression. - // For example, - // - // ` ${ 1 + 1 foo(10) - // | | - // - // This is because a Missing node has no width. However, what we actually want is to include trivia - // leading up to the next token in case the user is about to type in a TemplateMiddle or TemplateTail. - if (template.kind === 186 /* TemplateExpression */) { - var lastSpan = ts.lastOrUndefined(template.templateSpans); - if (lastSpan.literal.getFullWidth() === 0) { - applicableSpanEnd = ts.skipTrivia(sourceFile.text, applicableSpanEnd, /*stopAfterLineBreak*/ false); - } - } - return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); - } - function getContainingArgumentInfo(node) { - for (var n = node; n.kind !== 251 /* SourceFile */; n = n.parent) { - if (ts.isFunctionBlock(n)) { - return undefined; - } - // If the node is not a subspan of its parent, this is a big problem. - // There have been crashes that might be caused by this violation. - if (n.pos < n.parent.pos || n.end > n.parent.end) { - ts.Debug.fail("Node of kind " + n.kind + " is not a subspan of its parent of kind " + n.parent.kind); - } - var argumentInfo_1 = getImmediatelyContainingArgumentInfo(n); - if (argumentInfo_1) { - return argumentInfo_1; - } - } - return undefined; - } - function getChildListThatStartsWithOpenerToken(parent, openerToken, sourceFile) { - var children = parent.getChildren(sourceFile); - var indexOfOpenerToken = children.indexOf(openerToken); - ts.Debug.assert(indexOfOpenerToken >= 0 && children.length > indexOfOpenerToken + 1); - return children[indexOfOpenerToken + 1]; - } - /** - * The selectedItemIndex could be negative for several reasons. - * 1. There are too many arguments for all of the overloads - * 2. None of the overloads were type compatible - * The solution here is to try to pick the best overload by picking - * either the first one that has an appropriate number of parameters, - * or the one with the most parameters. - */ - function selectBestInvalidOverloadIndex(candidates, argumentCount) { - var maxParamsSignatureIndex = -1; - var maxParams = -1; - for (var i = 0; i < candidates.length; i++) { - var candidate = candidates[i]; - if (candidate.hasRestParameter || candidate.parameters.length >= argumentCount) { - return i; - } - if (candidate.parameters.length > maxParams) { - maxParams = candidate.parameters.length; - maxParamsSignatureIndex = i; - } - } - return maxParamsSignatureIndex; - } - function createSignatureHelpItems(candidates, bestSignature, argumentListInfo) { - var applicableSpan = argumentListInfo.argumentsSpan; - var isTypeParameterList = argumentListInfo.kind === 0 /* TypeArguments */; - var invocation = argumentListInfo.invocation; - var callTarget = ts.getInvokedExpression(invocation); - var callTargetSymbol = typeChecker.getSymbolAtLocation(callTarget); - var callTargetDisplayParts = callTargetSymbol && ts.symbolToDisplayParts(typeChecker, callTargetSymbol, /*enclosingDeclaration*/ undefined, /*meaning*/ undefined); - var items = ts.map(candidates, function (candidateSignature) { - var signatureHelpParameters; - var prefixDisplayParts = []; - var suffixDisplayParts = []; - if (callTargetDisplayParts) { - ts.addRange(prefixDisplayParts, callTargetDisplayParts); - } - if (isTypeParameterList) { - prefixDisplayParts.push(ts.punctuationPart(25 /* LessThanToken */)); - var typeParameters = candidateSignature.typeParameters; - signatureHelpParameters = typeParameters && typeParameters.length > 0 ? ts.map(typeParameters, createSignatureHelpParameterForTypeParameter) : emptyArray; - suffixDisplayParts.push(ts.punctuationPart(27 /* GreaterThanToken */)); - var parameterParts = ts.mapToDisplayParts(function (writer) { - return typeChecker.getSymbolDisplayBuilder().buildDisplayForParametersAndDelimiters(candidateSignature.parameters, writer, invocation); - }); - ts.addRange(suffixDisplayParts, parameterParts); - } - else { - var typeParameterParts = ts.mapToDisplayParts(function (writer) { - return typeChecker.getSymbolDisplayBuilder().buildDisplayForTypeParametersAndDelimiters(candidateSignature.typeParameters, writer, invocation); - }); - ts.addRange(prefixDisplayParts, typeParameterParts); - prefixDisplayParts.push(ts.punctuationPart(17 /* OpenParenToken */)); - var parameters = candidateSignature.parameters; - signatureHelpParameters = parameters.length > 0 ? ts.map(parameters, createSignatureHelpParameterForParameter) : emptyArray; - suffixDisplayParts.push(ts.punctuationPart(18 /* CloseParenToken */)); - } - var returnTypeParts = ts.mapToDisplayParts(function (writer) { - return typeChecker.getSymbolDisplayBuilder().buildReturnTypeDisplay(candidateSignature, writer, invocation); - }); - ts.addRange(suffixDisplayParts, returnTypeParts); + // Case 1: + // foo<#T, U>(#a, b) -> The token introduces a list, and should begin a sig help session + // Case 2: + // fo#o#(a, b)# -> The token is either not associated with a list, or ends a list, so the session should end + // Case 3: + // foo(a#, #b#) -> The token is buried inside a list, and should give sig help + // Find out if 'node' is an argument, a type argument, or neither + if (node.kind === 25 /* LessThanToken */ || + node.kind === 17 /* OpenParenToken */) { + // Find the list that starts right *after* the < or ( token. + // If the user has just opened a list, consider this item 0. + var list = getChildListThatStartsWithOpenerToken(callExpression, node, sourceFile); + var isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; + ts.Debug.assert(list !== undefined); return { - isVariadic: candidateSignature.hasRestParameter, - prefixDisplayParts: prefixDisplayParts, - suffixDisplayParts: suffixDisplayParts, - separatorDisplayParts: [ts.punctuationPart(24 /* CommaToken */), ts.spacePart()], - parameters: signatureHelpParameters, - documentation: candidateSignature.getDocumentationComment() + kind: isTypeArgList ? 0 /* TypeArguments */ : 1 /* CallArguments */, + invocation: callExpression, + argumentsSpan: getApplicableSpanForArguments(list, sourceFile), + argumentIndex: 0, + argumentCount: getArgumentCount(list) }; + } + // findListItemInfo can return undefined if we are not in parent's argument list + // or type argument list. This includes cases where the cursor is: + // - To the right of the closing paren, non-substitution template, or template tail. + // - Between the type arguments and the arguments (greater than token) + // - On the target of the call (parent.func) + // - On the 'new' keyword in a 'new' expression + var listItemInfo = ts.findListItemInfo(node); + if (listItemInfo) { + var list = listItemInfo.list; + var isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; + var argumentIndex = getArgumentIndex(list, node); + var argumentCount = getArgumentCount(list); + ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); + return { + kind: isTypeArgList ? 0 /* TypeArguments */ : 1 /* CallArguments */, + invocation: callExpression, + argumentsSpan: getApplicableSpanForArguments(list, sourceFile), + argumentIndex: argumentIndex, + argumentCount: argumentCount + }; + } + return undefined; + } + else if (node.kind === 11 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 176 /* TaggedTemplateExpression */) { + // Check if we're actually inside the template; + // otherwise we'll fall out and return undefined. + if (ts.isInsideTemplateLiteral(node, position)) { + return getArgumentListInfoForTemplate(node.parent, /*argumentIndex*/ 0, sourceFile); + } + } + else if (node.kind === 12 /* TemplateHead */ && node.parent.parent.kind === 176 /* TaggedTemplateExpression */) { + var templateExpression = node.parent; + var tagExpression = templateExpression.parent; + ts.Debug.assert(templateExpression.kind === 189 /* TemplateExpression */); + var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; + return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); + } + else if (node.parent.kind === 197 /* TemplateSpan */ && node.parent.parent.parent.kind === 176 /* TaggedTemplateExpression */) { + var templateSpan = node.parent; + var templateExpression = templateSpan.parent; + var tagExpression = templateExpression.parent; + ts.Debug.assert(templateExpression.kind === 189 /* TemplateExpression */); + // If we're just after a template tail, don't show signature help. + if (node.kind === 14 /* TemplateTail */ && !ts.isInsideTemplateLiteral(node, position)) { + return undefined; + } + var spanIndex = templateExpression.templateSpans.indexOf(templateSpan); + var argumentIndex = getArgumentIndexForTemplatePiece(spanIndex, node, position); + return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); + } + return undefined; + } + function getArgumentIndex(argumentsList, node) { + // The list we got back can include commas. In the presence of errors it may + // also just have nodes without commas. For example "Foo(a b c)" will have 3 + // args without commas. We want to find what index we're at. So we count + // forward until we hit ourselves, only incrementing the index if it isn't a + // comma. + // + // Note: the subtlety around trailing commas (in getArgumentCount) does not apply + // here. That's because we're only walking forward until we hit the node we're + // on. In that case, even if we're after the trailing comma, we'll still see + // that trailing comma in the list, and we'll have generated the appropriate + // arg index. + var argumentIndex = 0; + var listChildren = argumentsList.getChildren(); + for (var _i = 0, listChildren_1 = listChildren; _i < listChildren_1.length; _i++) { + var child = listChildren_1[_i]; + if (child === node) { + break; + } + if (child.kind !== 24 /* CommaToken */) { + argumentIndex++; + } + } + return argumentIndex; + } + function getArgumentCount(argumentsList) { + // The argument count for a list is normally the number of non-comma children it has. + // For example, if you have "Foo(a,b)" then there will be three children of the arg + // list 'a' '' 'b'. So, in this case the arg count will be 2. However, there + // is a small subtlety. If you have "Foo(a,)", then the child list will just have + // 'a' ''. So, in the case where the last child is a comma, we increase the + // arg count by one to compensate. + // + // Note: this subtlety only applies to the last comma. If you had "Foo(a,," then + // we'll have: 'a' '' '' + // That will give us 2 non-commas. We then add one for the last comma, givin us an + // arg count of 3. + var listChildren = argumentsList.getChildren(); + var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 24 /* CommaToken */; }); + if (listChildren.length > 0 && ts.lastOrUndefined(listChildren).kind === 24 /* CommaToken */) { + argumentCount++; + } + return argumentCount; + } + // spanIndex is either the index for a given template span. + // This does not give appropriate results for a NoSubstitutionTemplateLiteral + function getArgumentIndexForTemplatePiece(spanIndex, node, position) { + // Because the TemplateStringsArray is the first argument, we have to offset each substitution expression by 1. + // There are three cases we can encounter: + // 1. We are precisely in the template literal (argIndex = 0). + // 2. We are in or to the right of the substitution expression (argIndex = spanIndex + 1). + // 3. We are directly to the right of the template literal, but because we look for the token on the left, + // not enough to put us in the substitution expression; we should consider ourselves part of + // the *next* span's expression by offsetting the index (argIndex = (spanIndex + 1) + 1). + // + // Example: f `# abcd $#{# 1 + 1# }# efghi ${ #"#hello"# } # ` + // ^ ^ ^ ^ ^ ^ ^ ^ ^ + // Case: 1 1 3 2 1 3 2 2 1 + ts.Debug.assert(position >= node.getStart(), "Assumed 'position' could not occur before node."); + if (ts.isTemplateLiteralKind(node.kind)) { + if (ts.isInsideTemplateLiteral(node, position)) { + return 0; + } + return spanIndex + 2; + } + return spanIndex + 1; + } + function getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile) { + // argumentCount is either 1 or (numSpans + 1) to account for the template strings array argument. + var argumentCount = tagExpression.template.kind === 11 /* NoSubstitutionTemplateLiteral */ + ? 1 + : tagExpression.template.templateSpans.length + 1; + ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); + return { + kind: 2 /* TaggedTemplateArguments */, + invocation: tagExpression, + argumentsSpan: getApplicableSpanForTaggedTemplate(tagExpression, sourceFile), + argumentIndex: argumentIndex, + argumentCount: argumentCount + }; + } + function getApplicableSpanForArguments(argumentsList, sourceFile) { + // We use full start and skip trivia on the end because we want to include trivia on + // both sides. For example, + // + // foo( /*comment */ a, b, c /*comment*/ ) + // | | + // + // The applicable span is from the first bar to the second bar (inclusive, + // but not including parentheses) + var applicableSpanStart = argumentsList.getFullStart(); + var applicableSpanEnd = ts.skipTrivia(sourceFile.text, argumentsList.getEnd(), /*stopAfterLineBreak*/ false); + return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); + } + function getApplicableSpanForTaggedTemplate(taggedTemplate, sourceFile) { + var template = taggedTemplate.template; + var applicableSpanStart = template.getStart(); + var applicableSpanEnd = template.getEnd(); + // We need to adjust the end position for the case where the template does not have a tail. + // Otherwise, we will not show signature help past the expression. + // For example, + // + // ` ${ 1 + 1 foo(10) + // | | + // + // This is because a Missing node has no width. However, what we actually want is to include trivia + // leading up to the next token in case the user is about to type in a TemplateMiddle or TemplateTail. + if (template.kind === 189 /* TemplateExpression */) { + var lastSpan = ts.lastOrUndefined(template.templateSpans); + if (lastSpan.literal.getFullWidth() === 0) { + applicableSpanEnd = ts.skipTrivia(sourceFile.text, applicableSpanEnd, /*stopAfterLineBreak*/ false); + } + } + return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); + } + function getContainingArgumentInfo(node, position, sourceFile) { + for (var n = node; n.kind !== 256 /* SourceFile */; n = n.parent) { + if (ts.isFunctionBlock(n)) { + return undefined; + } + // If the node is not a subspan of its parent, this is a big problem. + // There have been crashes that might be caused by this violation. + if (n.pos < n.parent.pos || n.end > n.parent.end) { + ts.Debug.fail("Node of kind " + n.kind + " is not a subspan of its parent of kind " + n.parent.kind); + } + var argumentInfo = getImmediatelyContainingArgumentInfo(n, position, sourceFile); + if (argumentInfo) { + return argumentInfo; + } + } + return undefined; + } + SignatureHelp.getContainingArgumentInfo = getContainingArgumentInfo; + function getChildListThatStartsWithOpenerToken(parent, openerToken, sourceFile) { + var children = parent.getChildren(sourceFile); + var indexOfOpenerToken = children.indexOf(openerToken); + ts.Debug.assert(indexOfOpenerToken >= 0 && children.length > indexOfOpenerToken + 1); + return children[indexOfOpenerToken + 1]; + } + /** + * The selectedItemIndex could be negative for several reasons. + * 1. There are too many arguments for all of the overloads + * 2. None of the overloads were type compatible + * The solution here is to try to pick the best overload by picking + * either the first one that has an appropriate number of parameters, + * or the one with the most parameters. + */ + function selectBestInvalidOverloadIndex(candidates, argumentCount) { + var maxParamsSignatureIndex = -1; + var maxParams = -1; + for (var i = 0; i < candidates.length; i++) { + var candidate = candidates[i]; + if (candidate.hasRestParameter || candidate.parameters.length >= argumentCount) { + return i; + } + if (candidate.parameters.length > maxParams) { + maxParams = candidate.parameters.length; + maxParamsSignatureIndex = i; + } + } + return maxParamsSignatureIndex; + } + function createSignatureHelpItems(candidates, bestSignature, argumentListInfo, typeChecker) { + var applicableSpan = argumentListInfo.argumentsSpan; + var isTypeParameterList = argumentListInfo.kind === 0 /* TypeArguments */; + var invocation = argumentListInfo.invocation; + var callTarget = ts.getInvokedExpression(invocation); + var callTargetSymbol = typeChecker.getSymbolAtLocation(callTarget); + var callTargetDisplayParts = callTargetSymbol && ts.symbolToDisplayParts(typeChecker, callTargetSymbol, /*enclosingDeclaration*/ undefined, /*meaning*/ undefined); + var items = ts.map(candidates, function (candidateSignature) { + var signatureHelpParameters; + var prefixDisplayParts = []; + var suffixDisplayParts = []; + if (callTargetDisplayParts) { + ts.addRange(prefixDisplayParts, callTargetDisplayParts); + } + if (isTypeParameterList) { + prefixDisplayParts.push(ts.punctuationPart(25 /* LessThanToken */)); + var typeParameters = candidateSignature.typeParameters; + signatureHelpParameters = typeParameters && typeParameters.length > 0 ? ts.map(typeParameters, createSignatureHelpParameterForTypeParameter) : emptyArray; + suffixDisplayParts.push(ts.punctuationPart(27 /* GreaterThanToken */)); + var parameterParts = ts.mapToDisplayParts(function (writer) { + return typeChecker.getSymbolDisplayBuilder().buildDisplayForParametersAndDelimiters(candidateSignature.thisParameter, candidateSignature.parameters, writer, invocation); + }); + ts.addRange(suffixDisplayParts, parameterParts); + } + else { + var typeParameterParts = ts.mapToDisplayParts(function (writer) { + return typeChecker.getSymbolDisplayBuilder().buildDisplayForTypeParametersAndDelimiters(candidateSignature.typeParameters, writer, invocation); + }); + ts.addRange(prefixDisplayParts, typeParameterParts); + prefixDisplayParts.push(ts.punctuationPart(17 /* OpenParenToken */)); + var parameters = candidateSignature.parameters; + signatureHelpParameters = parameters.length > 0 ? ts.map(parameters, createSignatureHelpParameterForParameter) : emptyArray; + suffixDisplayParts.push(ts.punctuationPart(18 /* CloseParenToken */)); + } + var returnTypeParts = ts.mapToDisplayParts(function (writer) { + return typeChecker.getSymbolDisplayBuilder().buildReturnTypeDisplay(candidateSignature, writer, invocation); }); - var argumentIndex = argumentListInfo.argumentIndex; - // argumentCount is the *apparent* number of arguments. - var argumentCount = argumentListInfo.argumentCount; - var selectedItemIndex = candidates.indexOf(bestSignature); - if (selectedItemIndex < 0) { - selectedItemIndex = selectBestInvalidOverloadIndex(candidates, argumentCount); - } - ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); + ts.addRange(suffixDisplayParts, returnTypeParts); return { - items: items, - applicableSpan: applicableSpan, - selectedItemIndex: selectedItemIndex, - argumentIndex: argumentIndex, - argumentCount: argumentCount + isVariadic: candidateSignature.hasRestParameter, + prefixDisplayParts: prefixDisplayParts, + suffixDisplayParts: suffixDisplayParts, + separatorDisplayParts: [ts.punctuationPart(24 /* CommaToken */), ts.spacePart()], + parameters: signatureHelpParameters, + documentation: candidateSignature.getDocumentationComment() + }; + }); + var argumentIndex = argumentListInfo.argumentIndex; + // argumentCount is the *apparent* number of arguments. + var argumentCount = argumentListInfo.argumentCount; + var selectedItemIndex = candidates.indexOf(bestSignature); + if (selectedItemIndex < 0) { + selectedItemIndex = selectBestInvalidOverloadIndex(candidates, argumentCount); + } + ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); + return { + items: items, + applicableSpan: applicableSpan, + selectedItemIndex: selectedItemIndex, + argumentIndex: argumentIndex, + argumentCount: argumentCount + }; + function createSignatureHelpParameterForParameter(parameter) { + var displayParts = ts.mapToDisplayParts(function (writer) { + return typeChecker.getSymbolDisplayBuilder().buildParameterDisplay(parameter, writer, invocation); + }); + return { + name: parameter.name, + documentation: parameter.getDocumentationComment(), + displayParts: displayParts, + isOptional: typeChecker.isOptionalParameter(parameter.valueDeclaration) + }; + } + function createSignatureHelpParameterForTypeParameter(typeParameter) { + var displayParts = ts.mapToDisplayParts(function (writer) { + return typeChecker.getSymbolDisplayBuilder().buildTypeParameterDisplay(typeParameter, writer, invocation); + }); + return { + name: typeParameter.symbol.name, + documentation: emptyArray, + displayParts: displayParts, + isOptional: false }; - function createSignatureHelpParameterForParameter(parameter) { - var displayParts = ts.mapToDisplayParts(function (writer) { - return typeChecker.getSymbolDisplayBuilder().buildParameterDisplay(parameter, writer, invocation); - }); - return { - name: parameter.name, - documentation: parameter.getDocumentationComment(), - displayParts: displayParts, - isOptional: typeChecker.isOptionalParameter(parameter.valueDeclaration) - }; - } - function createSignatureHelpParameterForTypeParameter(typeParameter) { - var displayParts = ts.mapToDisplayParts(function (writer) { - return typeChecker.getSymbolDisplayBuilder().buildTypeParameterDisplay(typeParameter, writer, invocation); - }); - return { - name: typeParameter.symbol.name, - documentation: emptyArray, - displayParts: displayParts, - isOptional: false - }; - } } } - SignatureHelp.getSignatureHelpItems = getSignatureHelpItems; })(SignatureHelp = ts.SignatureHelp || (ts.SignatureHelp = {})); })(ts || (ts = {})); // These utilities are common to multiple language service features. /* @internal */ var ts; (function (ts) { - function getEndLinePosition(line, sourceFile) { - ts.Debug.assert(line >= 0); - var lineStarts = sourceFile.getLineStarts(); - var lineIndex = line; - if (lineIndex + 1 === lineStarts.length) { - // last line - return EOF - return sourceFile.text.length - 1; - } - else { - // current line start - var start = lineStarts[lineIndex]; - // take the start position of the next line -1 = it should be some line break - var pos = lineStarts[lineIndex + 1] - 1; - ts.Debug.assert(ts.isLineBreak(sourceFile.text.charCodeAt(pos))); - // walk backwards skipping line breaks, stop the the beginning of current line. - // i.e: - // - // $ <- end of line for this position should match the start position - while (start <= pos && ts.isLineBreak(sourceFile.text.charCodeAt(pos))) { - pos--; - } - return pos; - } - } - ts.getEndLinePosition = getEndLinePosition; function getLineStartPositionForPosition(position, sourceFile) { var lineStarts = sourceFile.getLineStarts(); var line = sourceFile.getLineAndCharacterOfPosition(position).line; @@ -43378,40 +49261,42 @@ var ts; return false; } switch (n.kind) { - case 217 /* ClassDeclaration */: - case 218 /* InterfaceDeclaration */: - case 220 /* EnumDeclaration */: - case 168 /* ObjectLiteralExpression */: - case 164 /* ObjectBindingPattern */: - case 156 /* TypeLiteral */: - case 195 /* Block */: - case 222 /* ModuleBlock */: - case 223 /* CaseBlock */: + case 221 /* ClassDeclaration */: + case 222 /* InterfaceDeclaration */: + case 224 /* EnumDeclaration */: + case 171 /* ObjectLiteralExpression */: + case 167 /* ObjectBindingPattern */: + case 159 /* TypeLiteral */: + case 199 /* Block */: + case 226 /* ModuleBlock */: + case 227 /* CaseBlock */: + case 233 /* NamedImports */: + case 237 /* NamedExports */: return nodeEndsWith(n, 16 /* CloseBraceToken */, sourceFile); - case 247 /* CatchClause */: + case 252 /* CatchClause */: return isCompletedNode(n.block, sourceFile); - case 172 /* NewExpression */: + case 175 /* NewExpression */: if (!n.arguments) { return true; } // fall through - case 171 /* CallExpression */: - case 175 /* ParenthesizedExpression */: - case 161 /* ParenthesizedType */: + case 174 /* CallExpression */: + case 178 /* ParenthesizedExpression */: + case 164 /* ParenthesizedType */: return nodeEndsWith(n, 18 /* CloseParenToken */, sourceFile); - case 153 /* FunctionType */: - case 154 /* ConstructorType */: + case 156 /* FunctionType */: + case 157 /* ConstructorType */: return isCompletedNode(n.type, sourceFile); - case 145 /* Constructor */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 149 /* ConstructSignature */: - case 148 /* CallSignature */: - case 177 /* ArrowFunction */: + case 148 /* Constructor */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 152 /* ConstructSignature */: + case 151 /* CallSignature */: + case 180 /* ArrowFunction */: if (n.body) { return isCompletedNode(n.body, sourceFile); } @@ -43421,64 +49306,67 @@ var ts; // Even though type parameters can be unclosed, we can get away with // having at least a closing paren. return hasChildOfKind(n, 18 /* CloseParenToken */, sourceFile); - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: return n.body && isCompletedNode(n.body, sourceFile); - case 199 /* IfStatement */: + case 203 /* IfStatement */: if (n.elseStatement) { return isCompletedNode(n.elseStatement, sourceFile); } return isCompletedNode(n.thenStatement, sourceFile); - case 198 /* ExpressionStatement */: + case 202 /* ExpressionStatement */: return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 23 /* SemicolonToken */); - case 167 /* ArrayLiteralExpression */: - case 165 /* ArrayBindingPattern */: - case 170 /* ElementAccessExpression */: - case 137 /* ComputedPropertyName */: - case 158 /* TupleType */: + case 170 /* ArrayLiteralExpression */: + case 168 /* ArrayBindingPattern */: + case 173 /* ElementAccessExpression */: + case 140 /* ComputedPropertyName */: + case 161 /* TupleType */: return nodeEndsWith(n, 20 /* CloseBracketToken */, sourceFile); - case 150 /* IndexSignature */: + case 153 /* IndexSignature */: if (n.type) { return isCompletedNode(n.type, sourceFile); } return hasChildOfKind(n, 20 /* CloseBracketToken */, sourceFile); - case 244 /* CaseClause */: - case 245 /* DefaultClause */: - // there is no such thing as terminator token for CaseClause/DefaultClause so for simplicitly always consider them non-completed + case 249 /* CaseClause */: + case 250 /* DefaultClause */: + // there is no such thing as terminator token for CaseClause/DefaultClause so for simplicity always consider them non-completed return false; - case 202 /* ForStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: - case 201 /* WhileStatement */: + case 206 /* ForStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: + case 205 /* WhileStatement */: return isCompletedNode(n.statement, sourceFile); - case 200 /* DoStatement */: + case 204 /* DoStatement */: // rough approximation: if DoStatement has While keyword - then if node is completed is checking the presence of ')'; var hasWhileKeyword = findChildOfKind(n, 104 /* WhileKeyword */, sourceFile); if (hasWhileKeyword) { return nodeEndsWith(n, 18 /* CloseParenToken */, sourceFile); } return isCompletedNode(n.statement, sourceFile); - case 155 /* TypeQuery */: + case 158 /* TypeQuery */: return isCompletedNode(n.exprName, sourceFile); - case 179 /* TypeOfExpression */: - case 178 /* DeleteExpression */: - case 180 /* VoidExpression */: - case 187 /* YieldExpression */: - case 188 /* SpreadElementExpression */: + case 182 /* TypeOfExpression */: + case 181 /* DeleteExpression */: + case 183 /* VoidExpression */: + case 190 /* YieldExpression */: + case 191 /* SpreadElementExpression */: var unaryWordExpression = n; return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 173 /* TaggedTemplateExpression */: + case 176 /* TaggedTemplateExpression */: return isCompletedNode(n.template, sourceFile); - case 186 /* TemplateExpression */: + case 189 /* TemplateExpression */: var lastSpan = ts.lastOrUndefined(n.templateSpans); return isCompletedNode(lastSpan, sourceFile); - case 193 /* TemplateSpan */: + case 197 /* TemplateSpan */: return ts.nodeIsPresent(n.literal); - case 182 /* PrefixUnaryExpression */: + case 236 /* ExportDeclaration */: + case 230 /* ImportDeclaration */: + return ts.nodeIsPresent(n.moduleSpecifier); + case 185 /* PrefixUnaryExpression */: return isCompletedNode(n.operand, sourceFile); - case 184 /* BinaryExpression */: + case 187 /* BinaryExpression */: return isCompletedNode(n.right, sourceFile); - case 185 /* ConditionalExpression */: + case 188 /* ConditionalExpression */: return isCompletedNode(n.whenFalse, sourceFile); default: return true; @@ -43534,7 +49422,7 @@ var ts; // for the position of the relevant node (or comma). var syntaxList = ts.forEach(node.parent.getChildren(), function (c) { // find syntax list that covers the span of the node - if (c.kind === 274 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) { + if (c.kind === 286 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) { return c; } }); @@ -43546,39 +49434,68 @@ var ts; /* Gets the token whose text has range [start, end) and * position >= start and (position < end or (position === end && token is keyword or identifier)) */ - function getTouchingWord(sourceFile, position) { - return getTouchingToken(sourceFile, position, function (n) { return isWord(n.kind); }); + function getTouchingWord(sourceFile, position, includeJsDocComment) { + if (includeJsDocComment === void 0) { includeJsDocComment = false; } + return getTouchingToken(sourceFile, position, function (n) { return isWord(n.kind); }, includeJsDocComment); } ts.getTouchingWord = getTouchingWord; /* Gets the token whose text has range [start, end) and position >= start - * and (position < end or (position === end && token is keyword or identifier or numeric\string litera)) + * and (position < end or (position === end && token is keyword or identifier or numeric/string literal)) */ - function getTouchingPropertyName(sourceFile, position) { - return getTouchingToken(sourceFile, position, function (n) { return isPropertyName(n.kind); }); + function getTouchingPropertyName(sourceFile, position, includeJsDocComment) { + if (includeJsDocComment === void 0) { includeJsDocComment = false; } + return getTouchingToken(sourceFile, position, function (n) { return isPropertyName(n.kind); }, includeJsDocComment); } ts.getTouchingPropertyName = getTouchingPropertyName; /** Returns the token if position is in [start, end) or if position === end and includeItemAtEndPosition(token) === true */ - function getTouchingToken(sourceFile, position, includeItemAtEndPosition) { - return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ false, includeItemAtEndPosition); + function getTouchingToken(sourceFile, position, includeItemAtEndPosition, includeJsDocComment) { + if (includeJsDocComment === void 0) { includeJsDocComment = false; } + return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ false, includeItemAtEndPosition, includeJsDocComment); } ts.getTouchingToken = getTouchingToken; /** Returns a token if position is in [start-of-leading-trivia, end) */ - function getTokenAtPosition(sourceFile, position) { - return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ true, /*includeItemAtEndPosition*/ undefined); + function getTokenAtPosition(sourceFile, position, includeJsDocComment) { + if (includeJsDocComment === void 0) { includeJsDocComment = false; } + return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ true, /*includeItemAtEndPosition*/ undefined, includeJsDocComment); } ts.getTokenAtPosition = getTokenAtPosition; /** Get the token whose text contains the position */ - function getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTrivia, includeItemAtEndPosition) { + function getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTrivia, includeItemAtEndPosition, includeJsDocComment) { + if (includeJsDocComment === void 0) { includeJsDocComment = false; } var current = sourceFile; outer: while (true) { if (isToken(current)) { // exit early return current; } + if (includeJsDocComment) { + var jsDocChildren = ts.filter(current.getChildren(), ts.isJSDocNode); + for (var _i = 0, jsDocChildren_1 = jsDocChildren; _i < jsDocChildren_1.length; _i++) { + var jsDocChild = jsDocChildren_1[_i]; + var start = allowPositionInLeadingTrivia ? jsDocChild.getFullStart() : jsDocChild.getStart(sourceFile, includeJsDocComment); + if (start <= position) { + var end = jsDocChild.getEnd(); + if (position < end || (position === end && jsDocChild.kind === 1 /* EndOfFileToken */)) { + current = jsDocChild; + continue outer; + } + else if (includeItemAtEndPosition && end === position) { + var previousToken = findPrecedingToken(position, sourceFile, jsDocChild); + if (previousToken && includeItemAtEndPosition(previousToken)) { + return previousToken; + } + } + } + } + } // find the child that contains 'position' for (var i = 0, n = current.getChildCount(sourceFile); i < n; i++) { var child = current.getChildAt(i); - var start = allowPositionInLeadingTrivia ? child.getFullStart() : child.getStart(sourceFile); + // all jsDocComment nodes were already visited + if (ts.isJSDocNode(child)) { + continue; + } + var start = allowPositionInLeadingTrivia ? child.getFullStart() : child.getStart(sourceFile, includeJsDocComment); if (start <= position) { var end = child.getEnd(); if (position < end || (position === end && child.kind === 1 /* EndOfFileToken */)) { @@ -43640,7 +49557,7 @@ var ts; function findPrecedingToken(position, sourceFile, startNode) { return find(startNode || sourceFile); function findRightmostToken(n) { - if (isToken(n) || n.kind === 239 /* JsxText */) { + if (isToken(n) || n.kind === 244 /* JsxText */) { return n; } var children = n.getChildren(); @@ -43648,7 +49565,7 @@ var ts; return candidate && findRightmostToken(candidate); } function find(n) { - if (isToken(n) || n.kind === 239 /* JsxText */) { + if (isToken(n) || n.kind === 244 /* JsxText */) { return n; } var children = n.getChildren(); @@ -43662,10 +49579,10 @@ var ts; // if no - position is in the node itself so we should recurse in it. // NOTE: JsxText is a weird kind of node that can contain only whitespaces (since they are not counted as trivia). // if this is the case - then we should assume that token in question is located in previous child. - if (position < child.end && (nodeHasTokens(child) || child.kind === 239 /* JsxText */)) { + if (position < child.end && (nodeHasTokens(child) || child.kind === 244 /* JsxText */)) { var start = child.getStart(sourceFile); var lookInPreviousChild = (start >= position) || - (child.kind === 239 /* JsxText */ && start === child.end); // whitespace only JsxText + (child.kind === 244 /* JsxText */ && start === child.end); // whitespace only JsxText if (lookInPreviousChild) { // actual start of the node is past the position - previous token should be at the end of previous child var candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ i); @@ -43677,7 +49594,7 @@ var ts; } } } - ts.Debug.assert(startNode !== undefined || n.kind === 251 /* SourceFile */); + ts.Debug.assert(startNode !== undefined || n.kind === 256 /* SourceFile */); // Here we know that none of child token nodes embrace the position, // the only known case is when position is at the end of the file. // Try to find the rightmost token in the file without filtering. @@ -43689,7 +49606,7 @@ var ts; } /// finds last node that is considered as candidate for search (isCandidate(node) === true) starting from 'exclusiveStartPosition' function findRightmostChildNodeWithTokens(children, exclusiveStartPosition) { - for (var i = exclusiveStartPosition - 1; i >= 0; --i) { + for (var i = exclusiveStartPosition - 1; i >= 0; i--) { if (nodeHasTokens(children[i])) { return children[i]; } @@ -43698,21 +49615,72 @@ var ts; } ts.findPrecedingToken = findPrecedingToken; function isInString(sourceFile, position) { - var token = getTokenAtPosition(sourceFile, position); - return token && (token.kind === 9 /* StringLiteral */ || token.kind === 163 /* StringLiteralType */) && position > token.getStart(); + var previousToken = findPrecedingToken(position, sourceFile); + if (previousToken && previousToken.kind === 9 /* StringLiteral */) { + var start = previousToken.getStart(); + var end = previousToken.getEnd(); + // To be "in" one of these literals, the position has to be: + // 1. entirely within the token text. + // 2. at the end position of an unterminated token. + // 3. at the end of a regular expression (due to trailing flags like '/foo/g'). + if (start < position && position < end) { + return true; + } + if (position === end) { + return !!previousToken.isUnterminated; + } + } + return false; } ts.isInString = isInString; function isInComment(sourceFile, position) { return isInCommentHelper(sourceFile, position, /*predicate*/ undefined); } ts.isInComment = isInComment; + /** + * returns true if the position is in between the open and close elements of an JSX expression. + */ + function isInsideJsxElementOrAttribute(sourceFile, position) { + var token = getTokenAtPosition(sourceFile, position); + if (!token) { + return false; + } + if (token.kind === 244 /* JsxText */) { + return true; + } + //
Hello |
+ if (token.kind === 25 /* LessThanToken */ && token.parent.kind === 244 /* JsxText */) { + return true; + } + //
{ |
or
+ if (token.kind === 25 /* LessThanToken */ && token.parent.kind === 248 /* JsxExpression */) { + return true; + } + //
{ + // | + // } < /div> + if (token && token.kind === 16 /* CloseBraceToken */ && token.parent.kind === 248 /* JsxExpression */) { + return true; + } + //
|
+ if (token.kind === 25 /* LessThanToken */ && token.parent.kind === 245 /* JsxClosingElement */) { + return true; + } + return false; + } + ts.isInsideJsxElementOrAttribute = isInsideJsxElementOrAttribute; + function isInTemplateString(sourceFile, position) { + var token = getTokenAtPosition(sourceFile, position); + return ts.isTemplateLiteralKind(token.kind) && position > token.getStart(sourceFile); + } + ts.isInTemplateString = isInTemplateString; /** * Returns true if the cursor at position in sourceFile is within a comment that additionally * satisfies predicate, and false otherwise. */ function isInCommentHelper(sourceFile, position, predicate) { var token = getTokenAtPosition(sourceFile, position); - if (token && position <= token.getStart()) { + if (token && position <= token.getStart(sourceFile)) { var commentRanges = ts.getLeadingCommentRanges(sourceFile.text, token.pos); // The end marker of a single-line comment does not include the newline character. // In the following case, we are inside a comment (^ denotes the cursor position): @@ -43741,7 +49709,7 @@ var ts; return ts.forEach(commentRanges, jsDocPrefix); function jsDocPrefix(c) { var text = sourceFile.text; - return text.length >= c.pos + 3 && text[c.pos] === '/' && text[c.pos + 1] === '*' && text[c.pos + 2] === '*'; + return text.length >= c.pos + 3 && text[c.pos] === "/" && text[c.pos + 1] === "*" && text[c.pos + 2] === "*"; } } ts.hasDocComment = hasDocComment; @@ -43764,12 +49732,14 @@ var ts; } } if (node) { - var jsDocComment = node.jsDocComment; - if (jsDocComment) { - for (var _i = 0, _a = jsDocComment.tags; _i < _a.length; _i++) { - var tag = _a[_i]; - if (tag.pos <= position && position <= tag.end) { - return tag; + if (node.jsDocComments) { + for (var _i = 0, _a = node.jsDocComments; _i < _a.length; _i++) { + var jsDocComment = _a[_i]; + for (var _b = 0, _c = jsDocComment.tags; _b < _c.length; _b++) { + var tag = _c[_b]; + if (tag.pos <= position && position <= tag.end) { + return tag; + } } } } @@ -43785,35 +49755,35 @@ var ts; function getNodeModifiers(node) { var flags = ts.getCombinedNodeFlags(node); var result = []; - if (flags & 16 /* Private */) + if (flags & 8 /* Private */) result.push(ts.ScriptElementKindModifier.privateMemberModifier); - if (flags & 32 /* Protected */) + if (flags & 16 /* Protected */) result.push(ts.ScriptElementKindModifier.protectedMemberModifier); - if (flags & 8 /* Public */) + if (flags & 4 /* Public */) result.push(ts.ScriptElementKindModifier.publicMemberModifier); - if (flags & 64 /* Static */) + if (flags & 32 /* Static */) result.push(ts.ScriptElementKindModifier.staticModifier); if (flags & 128 /* Abstract */) result.push(ts.ScriptElementKindModifier.abstractModifier); - if (flags & 2 /* Export */) + if (flags & 1 /* Export */) result.push(ts.ScriptElementKindModifier.exportedModifier); if (ts.isInAmbientContext(node)) result.push(ts.ScriptElementKindModifier.ambientModifier); - return result.length > 0 ? result.join(',') : ts.ScriptElementKindModifier.none; + return result.length > 0 ? result.join(",") : ts.ScriptElementKindModifier.none; } ts.getNodeModifiers = getNodeModifiers; function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 152 /* TypeReference */ || node.kind === 171 /* CallExpression */) { + if (node.kind === 155 /* TypeReference */ || node.kind === 174 /* CallExpression */) { return node.typeArguments; } - if (ts.isFunctionLike(node) || node.kind === 217 /* ClassDeclaration */ || node.kind === 218 /* InterfaceDeclaration */) { + if (ts.isFunctionLike(node) || node.kind === 221 /* ClassDeclaration */ || node.kind === 222 /* InterfaceDeclaration */) { return node.typeParameters; } return undefined; } ts.getTypeArgumentOrTypeParameterList = getTypeArgumentOrTypeParameterList; function isToken(n) { - return n.kind >= 0 /* FirstToken */ && n.kind <= 135 /* LastToken */; + return n.kind >= 0 /* FirstToken */ && n.kind <= 138 /* LastToken */; } ts.isToken = isToken; function isWord(kind) { @@ -43829,7 +49799,6 @@ var ts; ts.isComment = isComment; function isStringOrRegularExpressionOrTemplateLiteral(kind) { if (kind === 9 /* StringLiteral */ - || kind === 163 /* StringLiteralType */ || kind === 10 /* RegularExpressionLiteral */ || ts.isTemplateLiteralKind(kind)) { return true; @@ -43873,26 +49842,26 @@ var ts; } ts.compareDataObjects = compareDataObjects; function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 167 /* ArrayLiteralExpression */ || - node.kind === 168 /* ObjectLiteralExpression */) { + if (node.kind === 170 /* ArrayLiteralExpression */ || + node.kind === 171 /* ObjectLiteralExpression */) { // [a,b,c] from: // [a, b, c] = someExpression; - if (node.parent.kind === 184 /* BinaryExpression */ && + if (node.parent.kind === 187 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 56 /* EqualsToken */) { return true; } // [a, b, c] from: // for([a, b, c] of expression) - if (node.parent.kind === 204 /* ForOfStatement */ && + if (node.parent.kind === 208 /* ForOfStatement */ && node.parent.initializer === node) { return true; } // [a, b, c] of // [x, [a, b, c] ] = someExpression - // or + // or // {x, a: {a, b, c} } = someExpression - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 248 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { + if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 253 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { return true; } } @@ -43905,7 +49874,7 @@ var ts; var ts; (function (ts) { function isFirstDeclarationOfSymbolParameter(symbol) { - return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 139 /* Parameter */; + return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 142 /* Parameter */; } ts.isFirstDeclarationOfSymbolParameter = isFirstDeclarationOfSymbolParameter; var displayPartWriter = getDisplayPartWriter(); @@ -44084,6 +50053,10 @@ var ts; if (isImportOrExportSpecifierName(location)) { return location.getText(); } + else if (ts.isStringOrNumericLiteral(location.kind) && + location.parent.kind === 140 /* ComputedPropertyName */) { + return location.text; + } // Try to get the local symbol if we're dealing with an 'export default' // since that symbol has the "true" name. var localExportDefaultSymbol = ts.getLocalSymbolForExportDefault(symbol); @@ -44093,7 +50066,7 @@ var ts; ts.getDeclaredName = getDeclaredName; function isImportOrExportSpecifierName(location) { return location.parent && - (location.parent.kind === 229 /* ImportSpecifier */ || location.parent.kind === 233 /* ExportSpecifier */) && + (location.parent.kind === 234 /* ImportSpecifier */ || location.parent.kind === 238 /* ExportSpecifier */) && location.parent.propertyName === location; } ts.isImportOrExportSpecifierName = isImportOrExportSpecifierName; @@ -44123,15 +50096,40 @@ var ts; } ts.scriptKindIs = scriptKindIs; function getScriptKind(fileName, host) { - // First check to see if the script kind can be determined from the file name - var scriptKind = ts.getScriptKindFromFileName(fileName); - if (scriptKind === 0 /* Unknown */ && host && host.getScriptKind) { - // Next check to see if the host can resolve the script kind + // First check to see if the script kind was specified by the host. Chances are the host + // may override the default script kind for the file extension. + var scriptKind; + if (host && host.getScriptKind) { scriptKind = host.getScriptKind(fileName); } + if (!scriptKind) { + scriptKind = ts.getScriptKindFromFileName(fileName); + } return ts.ensureScriptKind(fileName, scriptKind); } ts.getScriptKind = getScriptKind; + function parseAndReEmitConfigJSONFile(content) { + var options = { + fileName: "config.js", + compilerOptions: { + target: 2 /* ES6 */, + removeComments: true + }, + reportDiagnostics: true + }; + var _a = ts.transpileModule("(" + content + ")", options), outputText = _a.outputText, diagnostics = _a.diagnostics; + // Becasue the content was wrapped in "()", the start position of diagnostics needs to be subtract by 1 + // also, the emitted result will have "(" in the beginning and ");" in the end. We need to strip these + // as well + var trimmedOutput = outputText.trim(); + var configJsonObject = JSON.parse(trimmedOutput.substring(1, trimmedOutput.length - 2)); + for (var _i = 0, diagnostics_3 = diagnostics; _i < diagnostics_3.length; _i++) { + var diagnostic = diagnostics_3[_i]; + diagnostic.start = diagnostic.start - 1; + } + return { configJsonObject: configJsonObject, diagnostics: diagnostics }; + } + ts.parseAndReEmitConfigJSONFile = parseAndReEmitConfigJSONFile; })(ts || (ts = {})); // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. @@ -44157,7 +50155,7 @@ var ts; */ function discoverTypings(host, fileNames, projectRootPath, safeListPath, packageNameToTypingLocation, typingOptions, compilerOptions) { // A typing name to typing file path mapping - var inferredTypings = {}; + var inferredTypings = ts.createMap(); if (!typingOptions || !typingOptions.enableAutoDiscovery) { return { cachedTypingPaths: [], newTypingNames: [], filesToWatch: [] }; } @@ -44165,12 +50163,7 @@ var ts; fileNames = ts.filter(ts.map(fileNames, ts.normalizePath), function (f) { return ts.scriptKindIs(f, /*LanguageServiceHost*/ undefined, 1 /* JS */, 2 /* JSX */); }); if (!safeList) { var result = ts.readConfigFile(safeListPath, function (path) { return host.readFile(path); }); - if (result.config) { - safeList = result.config; - } - else { - safeList = {}; - } + safeList = ts.createMap(result.config); } var filesToWatch = []; // Directories to search for package.json, bower.json and other typing information @@ -44194,9 +50187,9 @@ var ts; } getTypingNamesFromSourceFileNames(fileNames); // Add the cached typing locations for inferred typings that are already installed - for (var name_35 in packageNameToTypingLocation) { - if (ts.hasProperty(inferredTypings, name_35) && !inferredTypings[name_35]) { - inferredTypings[name_35] = packageNameToTypingLocation[name_35]; + for (var name_39 in packageNameToTypingLocation) { + if (name_39 in inferredTypings && !inferredTypings[name_39]) { + inferredTypings[name_39] = packageNameToTypingLocation[name_39]; } } // Remove typings that the user has added to the exclude list @@ -44224,7 +50217,7 @@ var ts; } for (var _i = 0, typingNames_1 = typingNames; _i < typingNames_1.length; _i++) { var typing = typingNames_1[_i]; - if (!ts.hasProperty(inferredTypings, typing)) { + if (!(typing in inferredTypings)) { inferredTypings[typing] = undefined; } } @@ -44238,16 +50231,16 @@ var ts; var jsonConfig = result.config; filesToWatch.push(jsonPath); if (jsonConfig.dependencies) { - mergeTypings(ts.getKeys(jsonConfig.dependencies)); + mergeTypings(ts.getOwnKeys(jsonConfig.dependencies)); } if (jsonConfig.devDependencies) { - mergeTypings(ts.getKeys(jsonConfig.devDependencies)); + mergeTypings(ts.getOwnKeys(jsonConfig.devDependencies)); } if (jsonConfig.optionalDependencies) { - mergeTypings(ts.getKeys(jsonConfig.optionalDependencies)); + mergeTypings(ts.getOwnKeys(jsonConfig.optionalDependencies)); } if (jsonConfig.peerDependencies) { - mergeTypings(ts.getKeys(jsonConfig.peerDependencies)); + mergeTypings(ts.getOwnKeys(jsonConfig.peerDependencies)); } } } @@ -44265,7 +50258,7 @@ var ts; mergeTypings(cleanedTypingNames); } else { - mergeTypings(ts.filter(cleanedTypingNames, function (f) { return ts.hasProperty(safeList, f); })); + mergeTypings(ts.filter(cleanedTypingNames, function (f) { return f in safeList; })); } var hasJsxFile = ts.forEach(fileNames, function (f) { return ts.scriptKindIs(f, /*LanguageServiceHost*/ undefined, 2 /* JSX */); }); if (hasJsxFile) { @@ -44282,9 +50275,9 @@ var ts; return; } var typingNames = []; - var fileNames = host.readDirectory(nodeModulesPath, "*.json", /*exclude*/ undefined, /*depth*/ 2); - for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) { - var fileName = fileNames_1[_i]; + var fileNames = host.readDirectory(nodeModulesPath, ["*.json"], /*excludes*/ undefined, /*includes*/ undefined, /*depth*/ 2); + for (var _i = 0, fileNames_2 = fileNames; _i < fileNames_2.length; _i++) { + var fileName = fileNames_2[_i]; var normalizedFileName = ts.normalizePath(fileName); if (ts.getBaseFileName(normalizedFileName) !== "package.json") { continue; @@ -44340,6 +50333,7 @@ var ts; ScanAction[ScanAction["RescanSlashToken"] = 2] = "RescanSlashToken"; ScanAction[ScanAction["RescanTemplateToken"] = 3] = "RescanTemplateToken"; ScanAction[ScanAction["RescanJsxIdentifier"] = 4] = "RescanJsxIdentifier"; + ScanAction[ScanAction["RescanJsxText"] = 5] = "RescanJsxText"; })(ScanAction || (ScanAction = {})); function getFormattingScanner(sourceFile, startPos, endPos) { ts.Debug.assert(scanner === undefined); @@ -44358,6 +50352,7 @@ var ts; isOnToken: isOnToken, getCurrentLeadingTrivia: function () { return leadingTrivia; }, lastTrailingTriviaWasNewLine: function () { return wasNewLine; }, + skipToEndOf: skipToEndOf, close: function () { ts.Debug.assert(scanner !== undefined); lastTokenInfo = undefined; @@ -44383,12 +50378,11 @@ var ts; if (!isStarted) { scanner.scan(); } - var t; var pos = scanner.getStartPos(); // Read leading trivia and token while (pos < endPos) { - var t_1 = scanner.getToken(); - if (!ts.isTrivia(t_1)) { + var t = scanner.getToken(); + if (!ts.isTrivia(t)) { break; } // consume leading trivia @@ -44396,7 +50390,7 @@ var ts; var item = { pos: pos, end: scanner.getStartPos(), - kind: t_1 + kind: t }; pos = scanner.getStartPos(); if (!leadingTrivia) { @@ -44422,15 +50416,18 @@ var ts; function shouldRescanJsxIdentifier(node) { if (node.parent) { switch (node.parent.kind) { - case 241 /* JsxAttribute */: - case 238 /* JsxOpeningElement */: - case 240 /* JsxClosingElement */: - case 237 /* JsxSelfClosingElement */: + case 246 /* JsxAttribute */: + case 243 /* JsxOpeningElement */: + case 245 /* JsxClosingElement */: + case 242 /* JsxSelfClosingElement */: return node.kind === 69 /* Identifier */; } } return false; } + function shouldRescanJsxText(node) { + return node && node.kind === 244 /* JsxText */; + } function shouldRescanSlashToken(container) { return container.kind === 10 /* RegularExpressionLiteral */; } @@ -44461,12 +50458,14 @@ var ts; ? 3 /* RescanTemplateToken */ : shouldRescanJsxIdentifier(n) ? 4 /* RescanJsxIdentifier */ - : 0 /* Scan */; + : shouldRescanJsxText(n) + ? 5 /* RescanJsxText */ + : 0 /* Scan */; if (lastTokenInfo && expectedScanAction === lastScanAction) { // readTokenInfo was called before with the same expected scan action. // No need to re-scan text, return existing 'lastTokenInfo' // it is ok to call fixTokenKind here since it does not affect - // what portion of text is consumed. In opposize rescanning can change it, + // what portion of text is consumed. In contrast rescanning can change it, // i.e. for '>=' when originally scanner eats just one character // and rescanning forces it to consume more. return fixTokenKind(lastTokenInfo, n); @@ -44496,6 +50495,10 @@ var ts; currentToken = scanner.scanJsxIdentifier(); lastScanAction = 4 /* RescanJsxIdentifier */; } + else if (expectedScanAction === 5 /* RescanJsxText */) { + currentToken = scanner.reScanJsxToken(); + lastScanAction = 5 /* RescanJsxText */; + } else { lastScanAction = 0 /* Scan */; } @@ -44541,9 +50544,9 @@ var ts; var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); return startPos < endPos && current !== 1 /* EndOfFileToken */ && !ts.isTrivia(current); } - // when containing node in the tree is token + // when containing node in the tree is token // but its kind differs from the kind that was returned by the scanner, - // then kind needs to be fixed. This might happen in cases + // then kind needs to be fixed. This might happen in cases // when parser interprets token differently, i.e keyword treated as identifier function fixTokenKind(tokenInfo, container) { if (ts.isToken(container) && tokenInfo.token.kind !== container.kind) { @@ -44551,6 +50554,15 @@ var ts; } return tokenInfo; } + function skipToEndOf(node) { + scanner.setTextPos(node.end); + savedPos = scanner.getStartPos(); + lastScanAction = undefined; + lastTokenInfo = undefined; + wasNewLine = false; + leadingTrivia = undefined; + trailingTrivia = undefined; + } } formatting.getFormattingScanner = getFormattingScanner; })(formatting = ts.formatting || (ts.formatting = {})); @@ -44742,9 +50754,9 @@ var ts; var formatting; (function (formatting) { var RuleOperation = (function () { - function RuleOperation() { - this.Context = null; - this.Action = null; + function RuleOperation(Context, Action) { + this.Context = Context; + this.Action = Action; } RuleOperation.prototype.toString = function () { return "[context=" + this.Context + "," + @@ -44754,10 +50766,7 @@ var ts; return RuleOperation.create2(formatting.RuleOperationContext.Any, action); }; RuleOperation.create2 = function (context, action) { - var result = new RuleOperation(); - result.Context = context; - result.Action = action; - return result; + return new RuleOperation(context, action); }; return RuleOperation; }()); @@ -44814,30 +50823,30 @@ var ts; this.IgnoreBeforeComment = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.Comments), formatting.RuleOperation.create1(1 /* Ignore */)); this.IgnoreAfterLineComment = new formatting.Rule(formatting.RuleDescriptor.create3(2 /* SingleLineCommentTrivia */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create1(1 /* Ignore */)); // Space after keyword but not before ; or : or ? - this.NoSpaceBeforeSemicolon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 23 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeColon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 54 /* ColonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - this.NoSpaceBeforeQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 53 /* QuestionToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - this.SpaceAfterColon = new formatting.Rule(formatting.RuleDescriptor.create3(54 /* ColonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 2 /* Space */)); - this.SpaceAfterQuestionMarkInConditionalOperator = new formatting.Rule(formatting.RuleDescriptor.create3(53 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsConditionalOperatorContext), 2 /* Space */)); - this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(53 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(23 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBeforeSemicolon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 23 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeColon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 54 /* ColonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); + this.NoSpaceBeforeQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 53 /* QuestionToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); + this.SpaceAfterColon = new formatting.Rule(formatting.RuleDescriptor.create3(54 /* ColonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 2 /* Space */)); + this.SpaceAfterQuestionMarkInConditionalOperator = new formatting.Rule(formatting.RuleDescriptor.create3(53 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsConditionalOperatorContext), 2 /* Space */)); + this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(53 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(23 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // Space after }. - this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* CloseBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2 /* Space */)); + this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* CloseBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2 /* Space */)); // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied - this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(16 /* CloseBraceToken */, 80 /* ElseKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(16 /* CloseBraceToken */, 104 /* WhileKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* CloseBraceToken */, formatting.Shared.TokenRange.FromTokens([18 /* CloseParenToken */, 20 /* CloseBracketToken */, 24 /* CommaToken */, 23 /* SemicolonToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(16 /* CloseBraceToken */, 80 /* ElseKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(16 /* CloseBraceToken */, 104 /* WhileKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* CloseBraceToken */, formatting.Shared.TokenRange.FromTokens([18 /* CloseParenToken */, 20 /* CloseBracketToken */, 24 /* CommaToken */, 23 /* SemicolonToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // No space for dot - this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21 /* DotToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* DotToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 21 /* DotToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(21 /* DotToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // No space before and after indexer - this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* OpenBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(20 /* CloseBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8 /* Delete */)); + this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* OpenBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(20 /* CloseBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8 /* Delete */)); // Place a space before open brace in a function declaration this.FunctionOpenBraceLeftTokenRange = formatting.Shared.TokenRange.AnyIncludingMultilineComments; this.SpaceBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 15 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); // Place a space before open brace in a TypeScript declaration that has braces as children (class, module, enum, etc) - this.TypeScriptOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([69 /* Identifier */, 3 /* MultiLineCommentTrivia */, 73 /* ClassKeyword */]); + this.TypeScriptOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([69 /* Identifier */, 3 /* MultiLineCommentTrivia */, 73 /* ClassKeyword */, 82 /* ExportKeyword */, 89 /* ImportKeyword */]); this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 15 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); // Place a space before open brace in a control flow construct this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([18 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 79 /* DoKeyword */, 100 /* TryKeyword */, 85 /* FinallyKeyword */, 80 /* ElseKeyword */]); @@ -44845,7 +50854,7 @@ var ts; // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}. this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(15 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2 /* Space */)); this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 16 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2 /* Space */)); - this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(15 /* OpenBraceToken */, 16 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectContext), 8 /* Delete */)); + this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(15 /* OpenBraceToken */, 16 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectContext), 8 /* Delete */)); // Insert new line after { and before } in multi-line contexts. this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(15 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */)); // For functions and control block place } on a new line [multi-line rule] @@ -44853,79 +50862,85 @@ var ts; // Special handling of unary operators. // Prefix operators generally shouldn't have a space between // them and their target unary expression. - this.NoSpaceAfterUnaryPrefixOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.UnaryPrefixOperators, formatting.Shared.TokenRange.UnaryPrefixExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - this.NoSpaceAfterUnaryPreincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(41 /* PlusPlusToken */, formatting.Shared.TokenRange.UnaryPreincrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterUnaryPredecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(42 /* MinusMinusToken */, formatting.Shared.TokenRange.UnaryPredecrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeUnaryPostincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostincrementExpressions, 41 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeUnaryPostdecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostdecrementExpressions, 42 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterUnaryPrefixOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.UnaryPrefixOperators, formatting.Shared.TokenRange.UnaryPrefixExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); + this.NoSpaceAfterUnaryPreincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(41 /* PlusPlusToken */, formatting.Shared.TokenRange.UnaryPreincrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterUnaryPredecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(42 /* MinusMinusToken */, formatting.Shared.TokenRange.UnaryPredecrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeUnaryPostincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostincrementExpressions, 41 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeUnaryPostdecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostdecrementExpressions, 42 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // More unary operator special-casing. // DevDiv 181814: Be careful when removing leading whitespace // around unary operators. Examples: // 1 - -2 --X--> 1--2 // a + ++b --X--> a+++b - this.SpaceAfterPostincrementWhenFollowedByAdd = new formatting.Rule(formatting.RuleDescriptor.create1(41 /* PlusPlusToken */, 35 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterAddWhenFollowedByUnaryPlus = new formatting.Rule(formatting.RuleDescriptor.create1(35 /* PlusToken */, 35 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterAddWhenFollowedByPreincrement = new formatting.Rule(formatting.RuleDescriptor.create1(35 /* PlusToken */, 41 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterPostdecrementWhenFollowedBySubtract = new formatting.Rule(formatting.RuleDescriptor.create1(42 /* MinusMinusToken */, 36 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new formatting.Rule(formatting.RuleDescriptor.create1(36 /* MinusToken */, 36 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(36 /* MinusToken */, 42 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 24 /* CommaToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([102 /* VarKeyword */, 98 /* ThrowKeyword */, 92 /* NewKeyword */, 78 /* DeleteKeyword */, 94 /* ReturnKeyword */, 101 /* TypeOfKeyword */, 119 /* AwaitKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([108 /* LetKeyword */, 74 /* ConstKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2 /* Space */)); - this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8 /* Delete */)); + this.SpaceAfterPostincrementWhenFollowedByAdd = new formatting.Rule(formatting.RuleDescriptor.create1(41 /* PlusPlusToken */, 35 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterAddWhenFollowedByUnaryPlus = new formatting.Rule(formatting.RuleDescriptor.create1(35 /* PlusToken */, 35 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterAddWhenFollowedByPreincrement = new formatting.Rule(formatting.RuleDescriptor.create1(35 /* PlusToken */, 41 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterPostdecrementWhenFollowedBySubtract = new formatting.Rule(formatting.RuleDescriptor.create1(42 /* MinusMinusToken */, 36 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new formatting.Rule(formatting.RuleDescriptor.create1(36 /* MinusToken */, 36 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(36 /* MinusToken */, 42 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 24 /* CommaToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([102 /* VarKeyword */, 98 /* ThrowKeyword */, 92 /* NewKeyword */, 78 /* DeleteKeyword */, 94 /* ReturnKeyword */, 101 /* TypeOfKeyword */, 119 /* AwaitKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([108 /* LetKeyword */, 74 /* ConstKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2 /* Space */)); + this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8 /* Delete */)); this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(87 /* FunctionKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); - this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionDeclContext), 8 /* Delete */)); - this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(103 /* VoidKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsVoidOpContext), 2 /* Space */)); - this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(94 /* ReturnKeyword */, 23 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsFunctionDeclContext), 8 /* Delete */)); + this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(103 /* VoidKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsVoidOpContext), 2 /* Space */)); + this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(94 /* ReturnKeyword */, 23 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any] - this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([18 /* CloseParenToken */, 79 /* DoKeyword */, 80 /* ElseKeyword */, 71 /* CaseKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotForContext), 2 /* Space */)); + this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([18 /* CloseParenToken */, 79 /* DoKeyword */, 80 /* ElseKeyword */, 71 /* CaseKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNotForContext), 2 /* Space */)); // This low-pri rule takes care of "try {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. - this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([100 /* TryKeyword */, 85 /* FinallyKeyword */]), 15 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([100 /* TryKeyword */, 85 /* FinallyKeyword */]), 15 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // get x() {} // set x(val) {} - this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([123 /* GetKeyword */, 129 /* SetKeyword */]), 69 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); + this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([123 /* GetKeyword */, 131 /* SetKeyword */]), 69 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. - this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); // TypeScript-specific higher priority rules // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses - this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(121 /* ConstructorKeyword */, 17 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(121 /* ConstructorKeyword */, 17 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // Use of module as a function call. e.g.: import m2 = module("m2"); - this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([125 /* ModuleKeyword */, 127 /* RequireKeyword */]), 17 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([125 /* ModuleKeyword */, 129 /* RequireKeyword */]), 17 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // Add a space around certain TypeScript keywords - this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([115 /* AbstractKeyword */, 73 /* ClassKeyword */, 122 /* DeclareKeyword */, 77 /* DefaultKeyword */, 81 /* EnumKeyword */, 82 /* ExportKeyword */, 83 /* ExtendsKeyword */, 123 /* GetKeyword */, 106 /* ImplementsKeyword */, 89 /* ImportKeyword */, 107 /* InterfaceKeyword */, 125 /* ModuleKeyword */, 126 /* NamespaceKeyword */, 110 /* PrivateKeyword */, 112 /* PublicKeyword */, 111 /* ProtectedKeyword */, 129 /* SetKeyword */, 113 /* StaticKeyword */, 132 /* TypeKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([83 /* ExtendsKeyword */, 106 /* ImplementsKeyword */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([115 /* AbstractKeyword */, 73 /* ClassKeyword */, 122 /* DeclareKeyword */, 77 /* DefaultKeyword */, 81 /* EnumKeyword */, 82 /* ExportKeyword */, 83 /* ExtendsKeyword */, 123 /* GetKeyword */, 106 /* ImplementsKeyword */, 89 /* ImportKeyword */, 107 /* InterfaceKeyword */, 125 /* ModuleKeyword */, 126 /* NamespaceKeyword */, 110 /* PrivateKeyword */, 112 /* PublicKeyword */, 111 /* ProtectedKeyword */, 131 /* SetKeyword */, 113 /* StaticKeyword */, 134 /* TypeKeyword */, 136 /* FromKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([83 /* ExtendsKeyword */, 106 /* ImplementsKeyword */, 136 /* FromKeyword */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" { this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(9 /* StringLiteral */, 15 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2 /* Space */)); // Lambda expressions - this.SpaceBeforeArrow = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 34 /* EqualsGreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(34 /* EqualsGreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeArrow = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 34 /* EqualsGreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(34 /* EqualsGreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // Optional parameters and let args - this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(22 /* DotDotDotToken */, 69 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterOptionalParameters = new formatting.Rule(formatting.RuleDescriptor.create3(53 /* QuestionToken */, formatting.Shared.TokenRange.FromTokens([18 /* CloseParenToken */, 24 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); + this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(22 /* DotDotDotToken */, 69 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterOptionalParameters = new formatting.Rule(formatting.RuleDescriptor.create3(53 /* QuestionToken */, formatting.Shared.TokenRange.FromTokens([18 /* CloseParenToken */, 24 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); // generics and type assertions - this.NoSpaceBeforeOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.TypeNames, 25 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); - this.NoSpaceBetweenCloseParenAndAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create1(18 /* CloseParenToken */, 25 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); - this.NoSpaceAfterOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* LessThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 27 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); - this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(27 /* GreaterThanToken */, formatting.Shared.TokenRange.FromTokens([17 /* OpenParenToken */, 19 /* OpenBracketToken */, 27 /* GreaterThanToken */, 24 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); - this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(27 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeAssertionContext), 8 /* Delete */)); + this.NoSpaceBeforeOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.TypeNames, 25 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); + this.NoSpaceBetweenCloseParenAndAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create1(18 /* CloseParenToken */, 25 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); + this.NoSpaceAfterOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* LessThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); + this.NoSpaceBeforeCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 27 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); + this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(27 /* GreaterThanToken */, formatting.Shared.TokenRange.FromTokens([17 /* OpenParenToken */, 19 /* OpenBracketToken */, 27 /* GreaterThanToken */, 24 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeArgumentOrParameterOrAssertionContext), 8 /* Delete */)); + this.NoSpaceAfterTypeAssertion = new formatting.Rule(formatting.RuleDescriptor.create3(27 /* GreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsTypeAssertionContext), 8 /* Delete */)); // Remove spaces in empty interface literals. e.g.: x: {} - this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(15 /* OpenBraceToken */, 16 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectTypeContext), 8 /* Delete */)); + this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(15 /* OpenBraceToken */, 16 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsObjectTypeContext), 8 /* Delete */)); // decorators - this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 55 /* AtToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(55 /* AtToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([115 /* AbstractKeyword */, 69 /* Identifier */, 82 /* ExportKeyword */, 77 /* DefaultKeyword */, 73 /* ClassKeyword */, 113 /* StaticKeyword */, 112 /* PublicKeyword */, 110 /* PrivateKeyword */, 111 /* ProtectedKeyword */, 123 /* GetKeyword */, 129 /* SetKeyword */, 19 /* OpenBracketToken */, 37 /* AsteriskToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2 /* Space */)); + this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 55 /* AtToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(55 /* AtToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([115 /* AbstractKeyword */, 69 /* Identifier */, 82 /* ExportKeyword */, 77 /* DefaultKeyword */, 73 /* ClassKeyword */, 113 /* StaticKeyword */, 112 /* PublicKeyword */, 110 /* PrivateKeyword */, 111 /* ProtectedKeyword */, 123 /* GetKeyword */, 131 /* SetKeyword */, 19 /* OpenBracketToken */, 37 /* AsteriskToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2 /* Space */)); this.NoSpaceBetweenFunctionKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(87 /* FunctionKeyword */, 37 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 8 /* Delete */)); this.SpaceAfterStarInGeneratorDeclaration = new formatting.Rule(formatting.RuleDescriptor.create3(37 /* AsteriskToken */, formatting.Shared.TokenRange.FromTokens([69 /* Identifier */, 17 /* OpenParenToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 2 /* Space */)); - this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(114 /* YieldKeyword */, 37 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8 /* Delete */)); - this.SpaceBetweenYieldOrYieldStarAndOperand = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([114 /* YieldKeyword */, 37 /* AsteriskToken */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 2 /* Space */)); + this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(114 /* YieldKeyword */, 37 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8 /* Delete */)); + this.SpaceBetweenYieldOrYieldStarAndOperand = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([114 /* YieldKeyword */, 37 /* AsteriskToken */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 2 /* Space */)); // Async-await - this.SpaceBetweenAsyncAndOpenParen = new formatting.Rule(formatting.RuleDescriptor.create1(118 /* AsyncKeyword */, 17 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsArrowFunctionContext, Rules.IsSameLineTokenContext), 2 /* Space */)); - this.SpaceBetweenAsyncAndFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(118 /* AsyncKeyword */, 87 /* FunctionKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.SpaceBetweenAsyncAndOpenParen = new formatting.Rule(formatting.RuleDescriptor.create1(118 /* AsyncKeyword */, 17 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsArrowFunctionContext, Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBetweenAsyncAndFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(118 /* AsyncKeyword */, 87 /* FunctionKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); // template string - this.NoSpaceBetweenTagAndTemplateString = new formatting.Rule(formatting.RuleDescriptor.create3(69 /* Identifier */, formatting.Shared.TokenRange.FromTokens([11 /* NoSubstitutionTemplateLiteral */, 12 /* TemplateHead */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBetweenTagAndTemplateString = new formatting.Rule(formatting.RuleDescriptor.create3(69 /* Identifier */, formatting.Shared.TokenRange.FromTokens([11 /* NoSubstitutionTemplateLiteral */, 12 /* TemplateHead */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + // jsx opening element + this.SpaceBeforeJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 69 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNextTokenParentJsxAttribute, Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeSlashInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 39 /* SlashToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement = new formatting.Rule(formatting.RuleDescriptor.create1(39 /* SlashToken */, 27 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxSelfClosingElementContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 56 /* EqualsToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterEqualInJsxAttribute = new formatting.Rule(formatting.RuleDescriptor.create3(56 /* EqualsToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsJsxAttributeContext, Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // These rules are higher in priority than user-configurable rules. this.HighPriorityCommonRules = [ this.IgnoreBeforeComment, this.IgnoreAfterLineComment, @@ -44953,6 +50968,8 @@ var ts; this.SpaceAfterVoidOperator, this.SpaceBetweenAsyncAndOpenParen, this.SpaceBetweenAsyncAndFunctionKeyword, this.NoSpaceBetweenTagAndTemplateString, + this.SpaceBeforeJsxAttribute, this.SpaceBeforeSlashInJsxOpeningElement, this.NoSpaceBeforeGreaterThanTokenInJsxOpeningElement, + this.NoSpaceBeforeEqualInJsxAttribute, this.NoSpaceAfterEqualInJsxAttribute, // TypeScript-specific rules this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport, this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords, @@ -44986,52 +51003,57 @@ var ts; /// Rules controlled by user options /// // Insert space after comma delimiter - this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(24 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNextTokenNotCloseBracket), 2 /* Space */)); - this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(24 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(24 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext, Rules.IsNextTokenNotCloseBracket), 2 /* Space */)); + this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(24 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsNonJsxElementContext), 8 /* Delete */)); // Insert space before and after binary operators - this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */)); - this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */)); + this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); + this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */)); + this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */)); // Insert space after keywords in control flow statements this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 17 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2 /* Space */)); this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 17 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8 /* Delete */)); // Open Brace braces after function - //TypeScript: Function can have return types, which can be made of tons of different token kinds + // TypeScript: Function can have return types, which can be made of tons of different token kinds this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 15 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); // Open Brace braces after TypeScript module/class/interface this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 15 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); // Open Brace braces after control block this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 15 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); // Insert space after semicolon in for statement - this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(23 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsForContext), 2 /* Space */)); - this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(23 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsForContext), 8 /* Delete */)); + this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(23 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 2 /* Space */)); + this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(23 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsForContext), 8 /* Delete */)); // Insert space after opening and before closing nonempty parenthesis - this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* OpenParenToken */, 18 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* OpenParenToken */, 18 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(17 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // Insert space after opening and before closing nonempty brackets - this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(19 /* OpenBracketToken */, 20 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.SpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBetweenBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(19 /* OpenBracketToken */, 20 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); // Insert space after opening and before closing template string braces - this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([12 /* TemplateHead */, 13 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([12 /* TemplateHead */, 13 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([13 /* TemplateMiddle */, 14 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([13 /* TemplateMiddle */, 14 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); + this.NoSpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([12 /* TemplateHead */, 13 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceAfterTemplateHeadAndMiddle = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([12 /* TemplateHead */, 13 /* TemplateMiddle */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + this.NoSpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([13 /* TemplateMiddle */, 14 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 8 /* Delete */)); + this.SpaceBeforeTemplateMiddleAndTail = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([13 /* TemplateMiddle */, 14 /* TemplateTail */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext), 2 /* Space */)); + // No space after { and before } in JSX expression + this.NoSpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(15 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */)); + this.SpaceAfterOpenBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create3(15 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */)); + this.NoSpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 16 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 8 /* Delete */)); + this.SpaceBeforeCloseBraceInJsxExpression = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 16 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsNonJsxSameLineTokenContext, Rules.IsJsxExpressionContext), 2 /* Space */)); // Insert space after function keyword for anonymous functions this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(87 /* FunctionKeyword */, 17 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(87 /* FunctionKeyword */, 17 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8 /* Delete */)); } Rules.prototype.getRuleName = function (rule) { var o = this; - for (var name_36 in o) { - if (o[name_36] === rule) { - return name_36; + for (var name_40 in o) { + if (o[name_40] === rule) { + return name_40; } } throw new Error("Unknown rule"); @@ -45040,40 +51062,42 @@ var ts; /// Contexts /// Rules.IsForContext = function (context) { - return context.contextNode.kind === 202 /* ForStatement */; + return context.contextNode.kind === 206 /* ForStatement */; }; Rules.IsNotForContext = function (context) { return !Rules.IsForContext(context); }; Rules.IsBinaryOpContext = function (context) { switch (context.contextNode.kind) { - case 184 /* BinaryExpression */: - case 185 /* ConditionalExpression */: - case 192 /* AsExpression */: - case 151 /* TypePredicate */: - case 159 /* UnionType */: - case 160 /* IntersectionType */: + case 187 /* BinaryExpression */: + case 188 /* ConditionalExpression */: + case 195 /* AsExpression */: + case 238 /* ExportSpecifier */: + case 234 /* ImportSpecifier */: + case 154 /* TypePredicate */: + case 162 /* UnionType */: + case 163 /* IntersectionType */: return true; // equals in binding elements: function foo([[x, y] = [1, 2]]) - case 166 /* BindingElement */: + case 169 /* BindingElement */: // equals in type X = ... - case 219 /* TypeAliasDeclaration */: + case 223 /* TypeAliasDeclaration */: // equal in import a = module('a'); - case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportEqualsDeclaration */: // equal in let a = 0; - case 214 /* VariableDeclaration */: + case 218 /* VariableDeclaration */: // equal in p = 0; - case 139 /* Parameter */: - case 250 /* EnumMember */: - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: + case 142 /* Parameter */: + case 255 /* EnumMember */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: return context.currentTokenSpan.kind === 56 /* EqualsToken */ || context.nextTokenSpan.kind === 56 /* EqualsToken */; // "in" keyword in for (let x in []) { } - case 203 /* ForInStatement */: + case 207 /* ForInStatement */: return context.currentTokenSpan.kind === 90 /* InKeyword */ || context.nextTokenSpan.kind === 90 /* InKeyword */; // Technically, "of" is not a binary operator, but format it the same way as "in" - case 204 /* ForOfStatement */: - return context.currentTokenSpan.kind === 135 /* OfKeyword */ || context.nextTokenSpan.kind === 135 /* OfKeyword */; + case 208 /* ForOfStatement */: + return context.currentTokenSpan.kind === 138 /* OfKeyword */ || context.nextTokenSpan.kind === 138 /* OfKeyword */; } return false; }; @@ -45081,25 +51105,25 @@ var ts; return !Rules.IsBinaryOpContext(context); }; Rules.IsConditionalOperatorContext = function (context) { - return context.contextNode.kind === 185 /* ConditionalExpression */; + return context.contextNode.kind === 188 /* ConditionalExpression */; }; Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) { //// This check is mainly used inside SpaceBeforeOpenBraceInControl and SpaceBeforeOpenBraceInFunction. //// - //// Ex: + //// Ex: //// if (1) { .... //// * ) and { are on the same line so apply the rule. Here we don't care whether it's same or multi block context //// - //// Ex: + //// Ex: //// if (1) //// { ... } - //// * ) and { are on differnet lines. We only need to format if the block is multiline context. So in this case we don't format. + //// * ) and { are on different lines. We only need to format if the block is multiline context. So in this case we don't format. //// //// Ex: - //// if (1) + //// if (1) //// { ... //// } - //// * ) and { are on differnet lines. We only need to format if the block is multiline context. So in this case we format. + //// * ) and { are on different lines. We only need to format if the block is multiline context. So in this case we format. return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context); }; // This check is done before an open brace in a control construct, a function, or a typescript block declaration @@ -45125,93 +51149,97 @@ var ts; return true; } switch (node.kind) { - case 195 /* Block */: - case 223 /* CaseBlock */: - case 168 /* ObjectLiteralExpression */: - case 222 /* ModuleBlock */: + case 199 /* Block */: + case 227 /* CaseBlock */: + case 171 /* ObjectLiteralExpression */: + case 226 /* ModuleBlock */: return true; } return false; }; Rules.IsFunctionDeclContext = function (context) { switch (context.contextNode.kind) { - case 216 /* FunctionDeclaration */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - //case SyntaxKind.MemberFunctionDeclaration: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - ///case SyntaxKind.MethodSignature: - case 148 /* CallSignature */: - case 176 /* FunctionExpression */: - case 145 /* Constructor */: - case 177 /* ArrowFunction */: - //case SyntaxKind.ConstructorDeclaration: - //case SyntaxKind.SimpleArrowFunctionExpression: - //case SyntaxKind.ParenthesizedArrowFunctionExpression: - case 218 /* InterfaceDeclaration */: + case 220 /* FunctionDeclaration */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + // case SyntaxKind.MemberFunctionDeclaration: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + // case SyntaxKind.MethodSignature: + case 151 /* CallSignature */: + case 179 /* FunctionExpression */: + case 148 /* Constructor */: + case 180 /* ArrowFunction */: + // case SyntaxKind.ConstructorDeclaration: + // case SyntaxKind.SimpleArrowFunctionExpression: + // case SyntaxKind.ParenthesizedArrowFunctionExpression: + case 222 /* InterfaceDeclaration */: return true; } return false; }; Rules.IsFunctionDeclarationOrFunctionExpressionContext = function (context) { - return context.contextNode.kind === 216 /* FunctionDeclaration */ || context.contextNode.kind === 176 /* FunctionExpression */; + return context.contextNode.kind === 220 /* FunctionDeclaration */ || context.contextNode.kind === 179 /* FunctionExpression */; }; Rules.IsTypeScriptDeclWithBlockContext = function (context) { return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); }; Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) { switch (node.kind) { - case 217 /* ClassDeclaration */: - case 189 /* ClassExpression */: - case 218 /* InterfaceDeclaration */: - case 220 /* EnumDeclaration */: - case 156 /* TypeLiteral */: - case 221 /* ModuleDeclaration */: + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: + case 222 /* InterfaceDeclaration */: + case 224 /* EnumDeclaration */: + case 159 /* TypeLiteral */: + case 225 /* ModuleDeclaration */: + case 236 /* ExportDeclaration */: + case 237 /* NamedExports */: + case 230 /* ImportDeclaration */: + case 233 /* NamedImports */: return true; } return false; }; Rules.IsAfterCodeBlockContext = function (context) { switch (context.currentTokenParent.kind) { - case 217 /* ClassDeclaration */: - case 221 /* ModuleDeclaration */: - case 220 /* EnumDeclaration */: - case 195 /* Block */: - case 247 /* CatchClause */: - case 222 /* ModuleBlock */: - case 209 /* SwitchStatement */: + case 221 /* ClassDeclaration */: + case 225 /* ModuleDeclaration */: + case 224 /* EnumDeclaration */: + case 199 /* Block */: + case 252 /* CatchClause */: + case 226 /* ModuleBlock */: + case 213 /* SwitchStatement */: return true; } return false; }; Rules.IsControlDeclContext = function (context) { switch (context.contextNode.kind) { - case 199 /* IfStatement */: - case 209 /* SwitchStatement */: - case 202 /* ForStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: - case 201 /* WhileStatement */: - case 212 /* TryStatement */: - case 200 /* DoStatement */: - case 208 /* WithStatement */: + case 203 /* IfStatement */: + case 213 /* SwitchStatement */: + case 206 /* ForStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: + case 205 /* WhileStatement */: + case 216 /* TryStatement */: + case 204 /* DoStatement */: + case 212 /* WithStatement */: // TODO // case SyntaxKind.ElseClause: - case 247 /* CatchClause */: + case 252 /* CatchClause */: return true; default: return false; } }; Rules.IsObjectContext = function (context) { - return context.contextNode.kind === 168 /* ObjectLiteralExpression */; + return context.contextNode.kind === 171 /* ObjectLiteralExpression */; }; Rules.IsFunctionCallContext = function (context) { - return context.contextNode.kind === 171 /* CallExpression */; + return context.contextNode.kind === 174 /* CallExpression */; }; Rules.IsNewContext = function (context) { - return context.contextNode.kind === 172 /* NewExpression */; + return context.contextNode.kind === 175 /* NewExpression */; }; Rules.IsFunctionCallOrNewContext = function (context) { return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context); @@ -45223,10 +51251,25 @@ var ts; return context.nextTokenSpan.kind !== 20 /* CloseBracketToken */; }; Rules.IsArrowFunctionContext = function (context) { - return context.contextNode.kind === 177 /* ArrowFunction */; + return context.contextNode.kind === 180 /* ArrowFunction */; }; - Rules.IsSameLineTokenContext = function (context) { - return context.TokensAreOnSameLine(); + Rules.IsNonJsxSameLineTokenContext = function (context) { + return context.TokensAreOnSameLine() && context.contextNode.kind !== 244 /* JsxText */; + }; + Rules.IsNonJsxElementContext = function (context) { + return context.contextNode.kind !== 241 /* JsxElement */; + }; + Rules.IsJsxExpressionContext = function (context) { + return context.contextNode.kind === 248 /* JsxExpression */; + }; + Rules.IsNextTokenParentJsxAttribute = function (context) { + return context.nextTokenParent.kind === 246 /* JsxAttribute */; + }; + Rules.IsJsxAttributeContext = function (context) { + return context.contextNode.kind === 246 /* JsxAttribute */; + }; + Rules.IsJsxSelfClosingElementContext = function (context) { + return context.contextNode.kind === 242 /* JsxSelfClosingElement */; }; Rules.IsNotBeforeBlockInFunctionDeclarationContext = function (context) { return !Rules.IsFunctionDeclContext(context) && !Rules.IsBeforeBlockContext(context); @@ -45241,41 +51284,41 @@ var ts; while (ts.isExpression(node)) { node = node.parent; } - return node.kind === 140 /* Decorator */; + return node.kind === 143 /* Decorator */; }; Rules.IsStartOfVariableDeclarationList = function (context) { - return context.currentTokenParent.kind === 215 /* VariableDeclarationList */ && + return context.currentTokenParent.kind === 219 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; }; Rules.IsNotFormatOnEnter = function (context) { return context.formattingRequestKind !== 2 /* FormatOnEnter */; }; Rules.IsModuleDeclContext = function (context) { - return context.contextNode.kind === 221 /* ModuleDeclaration */; + return context.contextNode.kind === 225 /* ModuleDeclaration */; }; Rules.IsObjectTypeContext = function (context) { - return context.contextNode.kind === 156 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; + return context.contextNode.kind === 159 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; }; Rules.IsTypeArgumentOrParameterOrAssertion = function (token, parent) { if (token.kind !== 25 /* LessThanToken */ && token.kind !== 27 /* GreaterThanToken */) { return false; } switch (parent.kind) { - case 152 /* TypeReference */: - case 174 /* TypeAssertionExpression */: - case 217 /* ClassDeclaration */: - case 189 /* ClassExpression */: - case 218 /* InterfaceDeclaration */: - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 148 /* CallSignature */: - case 149 /* ConstructSignature */: - case 171 /* CallExpression */: - case 172 /* NewExpression */: - case 191 /* ExpressionWithTypeArguments */: + case 155 /* TypeReference */: + case 177 /* TypeAssertionExpression */: + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: + case 222 /* InterfaceDeclaration */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: + case 174 /* CallExpression */: + case 175 /* NewExpression */: + case 194 /* ExpressionWithTypeArguments */: return true; default: return false; @@ -45286,13 +51329,13 @@ var ts; Rules.IsTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); }; Rules.IsTypeAssertionContext = function (context) { - return context.contextNode.kind === 174 /* TypeAssertionExpression */; + return context.contextNode.kind === 177 /* TypeAssertionExpression */; }; Rules.IsVoidOpContext = function (context) { - return context.currentTokenSpan.kind === 103 /* VoidKeyword */ && context.currentTokenParent.kind === 180 /* VoidExpression */; + return context.currentTokenSpan.kind === 103 /* VoidKeyword */ && context.currentTokenParent.kind === 183 /* VoidExpression */; }; Rules.IsYieldOrYieldStarWithOperand = function (context) { - return context.contextNode.kind === 187 /* YieldExpression */ && context.contextNode.expression !== undefined; + return context.contextNode.kind === 190 /* YieldExpression */ && context.contextNode.expression !== undefined; }; return Rules; }()); @@ -45316,10 +51359,10 @@ var ts; return result; }; RulesMap.prototype.Initialize = function (rules) { - this.mapRowLength = 135 /* LastToken */ + 1; - this.map = new Array(this.mapRowLength * this.mapRowLength); //new Array(this.mapRowLength * this.mapRowLength); + this.mapRowLength = 138 /* LastToken */ + 1; + this.map = new Array(this.mapRowLength * this.mapRowLength); // new Array(this.mapRowLength * this.mapRowLength); // This array is used only during construction of the rulesbucket in the map - var rulesBucketConstructionStateList = new Array(this.map.length); //new Array(this.map.length); + var rulesBucketConstructionStateList = new Array(this.map.length); // new Array(this.map.length); this.FillRules(rules, rulesBucketConstructionStateList); return this.map; }; @@ -45331,7 +51374,7 @@ var ts; }; RulesMap.prototype.GetRuleBucketIndex = function (row, column) { var rulesBucketIndex = (row * this.mapRowLength) + column; - //Debug.Assert(rulesBucketIndex < this.map.Length, "Trying to access an index outside the array."); + // Debug.Assert(rulesBucketIndex < this.map.Length, "Trying to access an index outside the array."); return rulesBucketIndex; }; RulesMap.prototype.FillRule = function (rule, rulesBucketConstructionStateList) { @@ -45352,7 +51395,7 @@ var ts; RulesMap.prototype.GetRule = function (context) { var bucketIndex = this.GetRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind); var bucket = this.map[bucketIndex]; - if (bucket != null) { + if (bucket) { for (var _i = 0, _a = bucket.Rules(); _i < _a.length; _i++) { var rule = _a[_i]; if (rule.Operation.Context.InContext(context)) { @@ -45360,7 +51403,7 @@ var ts; } } } - return null; + return undefined; }; return RulesMap; }()); @@ -45385,9 +51428,9 @@ var ts; //// 4- Context rules with any token combination //// 5- Non-context rules with specific token combination //// 6- Non-context rules with any token combination - //// + //// //// The member rulesInsertionIndexBitmap is used to describe the number of rules - //// in each sub-bucket (above) hence can be used to know the index of where to insert + //// in each sub-bucket (above) hence can be used to know the index of where to insert //// the next rule. It's a bitmap which contains 6 different sections each is given 5 bits. //// //// Example: @@ -45511,7 +51554,7 @@ var ts; } TokenAllAccess.prototype.GetTokens = function () { var result = []; - for (var token = 0 /* FirstToken */; token <= 135 /* LastToken */; token++) { + for (var token = 0 /* FirstToken */; token <= 138 /* LastToken */; token++) { result.push(token); } return result; @@ -45553,9 +51596,9 @@ var ts; }; TokenRange.Any = TokenRange.AllTokens(); TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3 /* MultiLineCommentTrivia */])); - TokenRange.Keywords = TokenRange.FromRange(70 /* FirstKeyword */, 135 /* LastKeyword */); + TokenRange.Keywords = TokenRange.FromRange(70 /* FirstKeyword */, 138 /* LastKeyword */); TokenRange.BinaryOperators = TokenRange.FromRange(25 /* FirstBinaryOperator */, 68 /* LastBinaryOperator */); - TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([90 /* InKeyword */, 91 /* InstanceOfKeyword */, 135 /* OfKeyword */, 116 /* AsKeyword */, 124 /* IsKeyword */]); + TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([90 /* InKeyword */, 91 /* InstanceOfKeyword */, 138 /* OfKeyword */, 116 /* AsKeyword */, 124 /* IsKeyword */]); TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([41 /* PlusPlusToken */, 42 /* MinusMinusToken */, 50 /* TildeToken */, 49 /* ExclamationToken */]); TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([8 /* NumericLiteral */, 69 /* Identifier */, 17 /* OpenParenToken */, 19 /* OpenBracketToken */, 15 /* OpenBraceToken */, 97 /* ThisKeyword */, 92 /* NewKeyword */]); TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([69 /* Identifier */, 17 /* OpenParenToken */, 97 /* ThisKeyword */, 92 /* NewKeyword */]); @@ -45563,7 +51606,7 @@ var ts; TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([69 /* Identifier */, 17 /* OpenParenToken */, 97 /* ThisKeyword */, 92 /* NewKeyword */]); TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([69 /* Identifier */, 18 /* CloseParenToken */, 20 /* CloseBracketToken */, 92 /* NewKeyword */]); TokenRange.Comments = TokenRange.FromTokens([2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]); - TokenRange.TypeNames = TokenRange.FromTokens([69 /* Identifier */, 128 /* NumberKeyword */, 130 /* StringKeyword */, 120 /* BooleanKeyword */, 131 /* SymbolKeyword */, 103 /* VoidKeyword */, 117 /* AnyKeyword */]); + TokenRange.TypeNames = TokenRange.FromTokens([69 /* Identifier */, 130 /* NumberKeyword */, 132 /* StringKeyword */, 120 /* BooleanKeyword */, 133 /* SymbolKeyword */, 103 /* VoidKeyword */, 117 /* AnyKeyword */]); return TokenRange; }()); Shared.TokenRange = TokenRange; @@ -45602,8 +51645,7 @@ var ts; return this.rulesMap; }; RulesProvider.prototype.ensureUpToDate = function (options) { - // TODO: Should this be '==='? - if (this.options == null || !ts.compareDataObjects(this.options, options)) { + if (!this.options || !ts.compareDataObjects(this.options, options)) { var activeRules = this.createActiveRules(options); var rulesMap = formatting.RulesMap.create(activeRules); this.activeRules = activeRules; @@ -45659,6 +51701,14 @@ var ts; rules.push(this.globalRules.NoSpaceAfterTemplateHeadAndMiddle); rules.push(this.globalRules.NoSpaceBeforeTemplateMiddleAndTail); } + if (options.InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces) { + rules.push(this.globalRules.SpaceAfterOpenBraceInJsxExpression); + rules.push(this.globalRules.SpaceBeforeCloseBraceInJsxExpression); + } + else { + rules.push(this.globalRules.NoSpaceAfterOpenBraceInJsxExpression); + rules.push(this.globalRules.NoSpaceBeforeCloseBraceInJsxExpression); + } if (options.InsertSpaceAfterSemicolonInForStatements) { rules.push(this.globalRules.SpaceAfterSemicolonInFor); } @@ -45712,7 +51762,13 @@ var ts; // 1. the end of the previous line // 2. the last non-whitespace character in the current line var endOfFormatSpan = ts.getEndLinePosition(line, sourceFile); - while (ts.isWhiteSpace(sourceFile.text.charCodeAt(endOfFormatSpan)) && !ts.isLineBreak(sourceFile.text.charCodeAt(endOfFormatSpan))) { + while (ts.isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(endOfFormatSpan))) { + endOfFormatSpan--; + } + // if the character at the end of the span is a line break, we shouldn't include it, because it indicates we don't want to + // touch the current line at all. Also, on some OSes the line break consists of two characters (\r\n), we should test if the + // previous character before the end of format span is line break character as well. + if (ts.isLineBreak(sourceFile.text.charCodeAt(endOfFormatSpan))) { endOfFormatSpan--; } var span = { @@ -45762,9 +51818,9 @@ var ts; } function findOutermostParent(position, expectedTokenKind, sourceFile) { var precedingToken = ts.findPrecedingToken(position, sourceFile); - // when it is claimed that trigger character was typed at given position + // when it is claimed that trigger character was typed at given position // we verify that there is a token with a matching kind whose end is equal to position (because the character was just typed). - // If this condition is not hold - then trigger character was typed in some other context, + // If this condition is not hold - then trigger character was typed in some other context, // i.e.in comment and thus should not trigger autoformatting if (!precedingToken || precedingToken.kind !== expectedTokenKind || @@ -45773,12 +51829,12 @@ var ts; } // walk up and search for the parent node that ends at the same position with precedingToken. // for cases like this - // + // // let x = 1; // while (true) { - // } + // } // after typing close curly in while statement we want to reformat just the while statement. - // However if we just walk upwards searching for the parent that has the same end value - + // However if we just walk upwards searching for the parent that has the same end value - // we'll end up with the whole source file. isListElement allows to stop on the list element level var current = precedingToken; while (current && @@ -45793,17 +51849,17 @@ var ts; // i.e. parent is class declaration with the list of members and node is one of members. function isListElement(parent, node) { switch (parent.kind) { - case 217 /* ClassDeclaration */: - case 218 /* InterfaceDeclaration */: + case 221 /* ClassDeclaration */: + case 222 /* InterfaceDeclaration */: return ts.rangeContainsRange(parent.members, node); - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: var body = parent.body; - return body && body.kind === 195 /* Block */ && ts.rangeContainsRange(body.statements, node); - case 251 /* SourceFile */: - case 195 /* Block */: - case 222 /* ModuleBlock */: + return body && body.kind === 199 /* Block */ && ts.rangeContainsRange(body.statements, node); + case 256 /* SourceFile */: + case 199 /* Block */: + case 226 /* ModuleBlock */: return ts.rangeContainsRange(parent.statements, node); - case 247 /* CatchClause */: + case 252 /* CatchClause */: return ts.rangeContainsRange(parent.block.statements, node); } return false; @@ -45843,7 +51899,7 @@ var ts; // 'index' tracks the index of the most recent error that was checked. while (true) { if (index >= sorted.length) { - // all errors in the range were already checked -> no error in specified range + // all errors in the range were already checked -> no error in specified range return false; } var error = sorted[index]; @@ -45877,7 +51933,7 @@ var ts; // no preceding token found - start from the beginning of enclosing node return enclosingNode.pos; } - // preceding token ends after the start of original range (i.e when originaRange.pos falls in the middle of literal) + // preceding token ends after the start of original range (i.e when originalRange.pos falls in the middle of literal) // start from the beginning of enclosingNode to handle the entire 'originalRange' if (precedingToken.end >= originalRange.pos) { return enclosingNode.pos; @@ -45970,7 +52026,10 @@ var ts; var startLinePosition = ts.getLineStartPositionForPosition(startPos, sourceFile); var column = formatting.SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options); if (startLine !== parentStartLine || startPos === column) { - return column; + // Use the base indent size if it is greater than + // the indentation of the inherited predecessor. + var baseIndentSize = formatting.SmartIndenter.getBaseIndentation(options); + return baseIndentSize > column ? baseIndentSize : column; } } return -1 /* Unknown */; @@ -46005,19 +52064,20 @@ var ts; return node.modifiers[0].kind; } switch (node.kind) { - case 217 /* ClassDeclaration */: return 73 /* ClassKeyword */; - case 218 /* InterfaceDeclaration */: return 107 /* InterfaceKeyword */; - case 216 /* FunctionDeclaration */: return 87 /* FunctionKeyword */; - case 220 /* EnumDeclaration */: return 220 /* EnumDeclaration */; - case 146 /* GetAccessor */: return 123 /* GetKeyword */; - case 147 /* SetAccessor */: return 129 /* SetKeyword */; - case 144 /* MethodDeclaration */: + case 221 /* ClassDeclaration */: return 73 /* ClassKeyword */; + case 222 /* InterfaceDeclaration */: return 107 /* InterfaceKeyword */; + case 220 /* FunctionDeclaration */: return 87 /* FunctionKeyword */; + case 224 /* EnumDeclaration */: return 224 /* EnumDeclaration */; + case 149 /* GetAccessor */: return 123 /* GetKeyword */; + case 150 /* SetAccessor */: return 131 /* SetKeyword */; + case 147 /* MethodDeclaration */: if (node.asteriskToken) { return 37 /* AsteriskToken */; - } - // fall-through - case 142 /* PropertyDeclaration */: - case 139 /* Parameter */: + } /* + fall-through + */ + case 145 /* PropertyDeclaration */: + case 142 /* Parameter */: return node.name.kind; } } @@ -46092,19 +52152,19 @@ var ts; // a useful observations when tracking context node // / // [a] - // / | \ + // / | \ // [b] [c] [d] - // node 'a' is a context node for nodes 'b', 'c', 'd' + // node 'a' is a context node for nodes 'b', 'c', 'd' // except for the leftmost leaf token in [b] - in this case context node ('e') is located somewhere above 'a' // this rule can be applied recursively to child nodes of 'a'. - // + // // context node is set to parent node value after processing every child node // context node is set to parent of the token after processing every token var childContextNode = contextNode; // if there are any tokens that logically belong to node and interleave child nodes // such tokens will be consumed in processChildNode for for the child that follows them ts.forEachChild(node, function (child) { - processChildNode(child, /*inheritedIndentation*/ -1 /* Unknown */, node, nodeDynamicIndentation, nodeStartLine, undecoratedNodeStartLine, /*isListElement*/ false); + processChildNode(child, /*inheritedIndentation*/ -1 /* Unknown */, node, nodeDynamicIndentation, nodeStartLine, undecoratedNodeStartLine, /*isListItem*/ false); }, function (nodes) { processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation); }); @@ -46116,7 +52176,7 @@ var ts; } consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation); } - function processChildNode(child, inheritedIndentation, parent, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem) { + function processChildNode(child, inheritedIndentation, parent, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem, isFirstListItem) { var childStartPos = child.getStart(sourceFile); var childStartLine = sourceFile.getLineAndCharacterOfPosition(childStartPos).line; var undecoratedChildStartLine = childStartLine; @@ -46133,6 +52193,9 @@ var ts; } // child node is outside the target range - do not dive inside if (!ts.rangeOverlapsWithStartEnd(originalRange, child.pos, child.end)) { + if (child.end < originalRange.pos) { + formattingScanner.skipToEndOf(child); + } return inheritedIndentation; } if (child.getFullWidth() === 0) { @@ -46157,10 +52220,13 @@ var ts; consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child); return inheritedIndentation; } - var effectiveParentStartLine = child.kind === 140 /* Decorator */ ? childStartLine : undecoratedParentStartLine; + var effectiveParentStartLine = child.kind === 143 /* Decorator */ ? childStartLine : undecoratedParentStartLine; var childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); childContextNode = node; + if (isFirstListItem && parent.kind === 170 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { + inheritedIndentation = childIndentation.indentation; + } return inheritedIndentation; } function processChildNodes(nodes, parent, parentStartLine, parentDynamicIndentation) { @@ -46190,16 +52256,16 @@ var ts; } } var inheritedIndentation = -1 /* Unknown */; - for (var _i = 0, nodes_6 = nodes; _i < nodes_6.length; _i++) { - var child = nodes_6[_i]; - inheritedIndentation = processChildNode(child, inheritedIndentation, node, listDynamicIndentation, startLine, startLine, /*isListElement*/ true); + for (var i = 0; i < nodes.length; i++) { + var child = nodes[i]; + inheritedIndentation = processChildNode(child, inheritedIndentation, node, listDynamicIndentation, startLine, startLine, /*isListItem*/ true, /*isFirstListItem*/ i === 0); } if (listEndToken !== 0 /* Unknown */) { if (formattingScanner.isOnToken()) { var tokenInfo = formattingScanner.readTokenInfo(parent); // consume the list end token only if it is still belong to the parent // there might be the case when current token matches end token but does not considered as one - // function (x: function) <-- + // function (x: function) <-- // without this check close paren will be interpreted as list end token for function expression which is wrong if (tokenInfo.token.kind === listEndToken && ts.rangeContainsRange(parent, tokenInfo.token)) { // consume list end token @@ -46245,24 +52311,24 @@ var ts; var tokenIndentation = (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) ? dynamicIndentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind, container) : -1 /* Unknown */; + var indentNextTokenOrTrivia = true; if (currentTokenInfo.leadingTrivia) { var commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind, tokenIndentation, container); - var indentNextTokenOrTrivia = true; for (var _i = 0, _a = currentTokenInfo.leadingTrivia; _i < _a.length; _i++) { var triviaItem = _a[_i]; - if (!ts.rangeContainsRange(originalRange, triviaItem)) { - continue; - } + var triviaInRange = ts.rangeContainsRange(originalRange, triviaItem); switch (triviaItem.kind) { case 3 /* MultiLineCommentTrivia */: - indentMultilineComment(triviaItem, commentIndentation, /*firstLineIsIndented*/ !indentNextTokenOrTrivia); + if (triviaInRange) { + indentMultilineComment(triviaItem, commentIndentation, /*firstLineIsIndented*/ !indentNextTokenOrTrivia); + } indentNextTokenOrTrivia = false; break; case 2 /* SingleLineCommentTrivia */: - if (indentNextTokenOrTrivia) { + if (indentNextTokenOrTrivia && triviaInRange) { insertIndentation(triviaItem.pos, commentIndentation, /*lineAdded*/ false); - indentNextTokenOrTrivia = false; } + indentNextTokenOrTrivia = false; break; case 4 /* NewLineTrivia */: indentNextTokenOrTrivia = true; @@ -46271,7 +52337,7 @@ var ts; } } // indent token only if is it is in target range and does not overlap with any error ranges - if (tokenIndentation !== -1 /* Unknown */) { + if (tokenIndentation !== -1 /* Unknown */ && indentNextTokenOrTrivia) { insertIndentation(currentTokenInfo.token.pos, tokenIndentation, lineAdded); lastIndentedLine = tokenStart.line; indentationOnLastIndentedLine = tokenIndentation; @@ -46319,19 +52385,19 @@ var ts; applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine); if (rule.Operation.Action & (2 /* Space */ | 8 /* Delete */) && currentStartLine !== previousStartLine) { lineAdded = false; - // Handle the case where the next line is moved to be the end of this line. + // Handle the case where the next line is moved to be the end of this line. // In this case we don't indent the next line in the next pass. if (currentParent.getStart(sourceFile) === currentItem.pos) { - dynamicIndentation.recomputeIndentation(/*lineAdded*/ false); + dynamicIndentation.recomputeIndentation(/*lineAddedByFormatting*/ false); } } else if (rule.Operation.Action & 4 /* NewLine */ && currentStartLine === previousStartLine) { lineAdded = true; - // Handle the case where token2 is moved to the new line. + // Handle the case where token2 is moved to the new line. // In this case we indent token2 in the next pass but we set // sameLineIndent flag to notify the indenter that the indentation is within the line. if (currentParent.getStart(sourceFile) === currentItem.pos) { - dynamicIndentation.recomputeIndentation(/*lineAdded*/ true); + dynamicIndentation.recomputeIndentation(/*lineAddedByFormatting*/ true); } } // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line @@ -46355,12 +52421,15 @@ var ts; } else { var tokenStart = sourceFile.getLineAndCharacterOfPosition(pos); - if (indentation !== tokenStart.character) { - var startLinePosition = ts.getStartPositionOfLine(tokenStart.line, sourceFile); + var startLinePosition = ts.getStartPositionOfLine(tokenStart.line, sourceFile); + if (indentation !== tokenStart.character || indentationIsDifferent(indentationString, startLinePosition)) { recordReplace(startLinePosition, tokenStart.character, indentationString); } } } + function indentationIsDifferent(indentationString, startLinePosition) { + return indentationString !== sourceFile.text.substr(startLinePosition, indentationString.length); + } function indentMultilineComment(commentRange, indentation, firstLineIsIndented) { // split comment in lines var startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; @@ -46376,7 +52445,7 @@ var ts; else { parts = []; var startPos = commentRange.pos; - for (var line = startLine; line < endLine; ++line) { + for (var line = startLine; line < endLine; line++) { var endOfLine = ts.getEndLinePosition(line, sourceFile); parts.push({ pos: startPos, end: endOfLine }); startPos = ts.getStartPositionOfLine(line + 1, sourceFile); @@ -46395,7 +52464,7 @@ var ts; } // shift all parts on the delta size var delta = indentation - nonWhitespaceColumnInFirstPart.column; - for (var i = startIndex, len = parts.length; i < len; ++i, ++startLine) { + for (var i = startIndex, len = parts.length; i < len; i++, startLine++) { var startLinePos_1 = ts.getStartPositionOfLine(startLine, sourceFile); var nonWhitespaceCharacterAndColumn = i === 0 ? nonWhitespaceColumnInFirstPart @@ -46411,7 +52480,7 @@ var ts; } } function trimTrailingWhitespacesForLines(line1, line2, range) { - for (var line = line1; line < line2; ++line) { + for (var line = line1; line < line2; line++) { var lineStartPosition = ts.getStartPositionOfLine(line, sourceFile); var lineEndPosition = ts.getEndLinePosition(line, sourceFile); // do not trim whitespaces in comments or template expression @@ -46420,7 +52489,7 @@ var ts; } var whitespaceStart = getTrailingWhitespaceStartPosition(lineStartPosition, lineEndPosition); if (whitespaceStart !== -1) { - ts.Debug.assert(whitespaceStart === lineStartPosition || !ts.isWhiteSpace(sourceFile.text.charCodeAt(whitespaceStart - 1))); + ts.Debug.assert(whitespaceStart === lineStartPosition || !ts.isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(whitespaceStart - 1))); recordDelete(whitespaceStart, lineEndPosition + 1 - whitespaceStart); } } @@ -46431,7 +52500,7 @@ var ts; */ function getTrailingWhitespaceStartPosition(start, end) { var pos = end; - while (pos >= start && ts.isWhiteSpace(sourceFile.text.charCodeAt(pos))) { + while (pos >= start && ts.isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(pos))) { pos--; } if (pos !== end) { @@ -46462,7 +52531,6 @@ var ts; } } function applyRuleEdits(rule, previousRange, previousStartLine, currentRange, currentStartLine) { - var between; switch (rule.Operation.Action) { case 1 /* Ignore */: // no action required @@ -46499,22 +52567,14 @@ var ts; } } } - function isSomeBlock(kind) { - switch (kind) { - case 195 /* Block */: - case 222 /* ModuleBlock */: - return true; - } - return false; - } function getOpenTokenForList(node, list) { switch (node.kind) { - case 145 /* Constructor */: - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 177 /* ArrowFunction */: + case 148 /* Constructor */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 180 /* ArrowFunction */: if (node.typeParameters === list) { return 25 /* LessThanToken */; } @@ -46522,8 +52582,8 @@ var ts; return 17 /* OpenParenToken */; } break; - case 171 /* CallExpression */: - case 172 /* NewExpression */: + case 174 /* CallExpression */: + case 175 /* NewExpression */: if (node.typeArguments === list) { return 25 /* LessThanToken */; } @@ -46531,7 +52591,7 @@ var ts; return 17 /* OpenParenToken */; } break; - case 152 /* TypeReference */: + case 155 /* TypeReference */: if (node.typeArguments === list) { return 25 /* LessThanToken */; } @@ -46565,7 +52625,7 @@ var ts; internedTabsIndentation = []; } if (internedTabsIndentation[tabs] === undefined) { - internedTabsIndentation[tabs] = tabString = repeat('\t', tabs); + internedTabsIndentation[tabs] = tabString = repeat("\t", tabs); } else { tabString = internedTabsIndentation[tabs]; @@ -46590,7 +52650,7 @@ var ts; } function repeat(value, count) { var s = ""; - for (var i = 0; i < count; ++i) { + for (var i = 0; i < count; i++) { s += value; } return s; @@ -46613,7 +52673,7 @@ var ts; })(Value || (Value = {})); function getIndentation(position, sourceFile, options) { if (position > sourceFile.text.length) { - return 0; // past EOF + return getBaseIndentation(options); // past EOF } // no indentation when the indent style is set to none, // so we can return fast @@ -46622,7 +52682,7 @@ var ts; } var precedingToken = ts.findPrecedingToken(position, sourceFile); if (!precedingToken) { - return 0; + return getBaseIndentation(options); } // no indentation in string \regex\template literals var precedingTokenIsLiteral = ts.isStringOrRegularExpressionOrTemplateLiteral(precedingToken.kind); @@ -46639,7 +52699,7 @@ var ts; var current_1 = position; while (current_1 > 0) { var char = sourceFile.text.charCodeAt(current_1); - if (!ts.isWhiteSpace(char) && !ts.isLineBreak(char)) { + if (!ts.isWhiteSpace(char)) { break; } current_1--; @@ -46647,7 +52707,7 @@ var ts; var lineStart = ts.getLineStartPositionForPosition(current_1, sourceFile); return SmartIndenter.findFirstNonWhitespaceColumn(lineStart, current_1, sourceFile, options); } - if (precedingToken.kind === 24 /* CommaToken */ && precedingToken.parent.kind !== 184 /* BinaryExpression */) { + if (precedingToken.kind === 24 /* CommaToken */ && precedingToken.parent.kind !== 187 /* BinaryExpression */) { // previous token is comma that separates items in list - find the previous item and try to derive indentation from it var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); if (actualIndentation !== -1 /* Unknown */) { @@ -46684,12 +52744,16 @@ var ts; current = current.parent; } if (!current) { - // no parent was found - return 0 to be indented on the level of SourceFile - return 0; + // no parent was found - return the base indentation of the SourceFile + return getBaseIndentation(options); } return getIndentationForNodeWorker(current, currentStart, /*ignoreActualIndentationRange*/ undefined, indentationDelta, sourceFile, options); } SmartIndenter.getIndentation = getIndentation; + function getBaseIndentation(options) { + return options.BaseIndentSize || 0; + } + SmartIndenter.getBaseIndentation = getBaseIndentation; function getIndentationForNode(n, ignoreActualIndentationRange, sourceFile, options) { var start = sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); return getIndentationForNodeWorker(n, start, ignoreActualIndentationRange, /*indentationDelta*/ 0, sourceFile, options); @@ -46735,7 +52799,7 @@ var ts; currentStart = parentStart; parent = current.parent; } - return indentationDelta; + return indentationDelta + getBaseIndentation(options); } function getParentStart(parent, child, sourceFile) { var containingList = getContainingList(child, sourceFile); @@ -46766,7 +52830,7 @@ var ts; // - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually // - parent and child are not on the same line var useActualIndentation = (ts.isDeclaration(current) || ts.isStatement(current)) && - (parent.kind === 251 /* SourceFile */ || !parentAndChildShareLine); + (parent.kind === 256 /* SourceFile */ || !parentAndChildShareLine); if (!useActualIndentation) { return -1 /* Unknown */; } @@ -46799,7 +52863,7 @@ var ts; return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); } function childStartsOnTheSameLineWithElseInIfStatement(parent, child, childStartLine, sourceFile) { - if (parent.kind === 199 /* IfStatement */ && parent.elseStatement === child) { + if (parent.kind === 203 /* IfStatement */ && parent.elseStatement === child) { var elseKeyword = ts.findChildOfKind(parent, 80 /* ElseKeyword */, sourceFile); ts.Debug.assert(elseKeyword !== undefined); var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; @@ -46811,23 +52875,23 @@ var ts; function getContainingList(node, sourceFile) { if (node.parent) { switch (node.parent.kind) { - case 152 /* TypeReference */: + case 155 /* TypeReference */: if (node.parent.typeArguments && ts.rangeContainsStartEnd(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd())) { return node.parent.typeArguments; } break; - case 168 /* ObjectLiteralExpression */: + case 171 /* ObjectLiteralExpression */: return node.parent.properties; - case 167 /* ArrayLiteralExpression */: + case 170 /* ArrayLiteralExpression */: return node.parent.elements; - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 148 /* CallSignature */: - case 149 /* ConstructSignature */: { + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: { var start = node.getStart(sourceFile); if (node.parent.typeParameters && ts.rangeContainsStartEnd(node.parent.typeParameters, start, node.getEnd())) { @@ -46838,8 +52902,8 @@ var ts; } break; } - case 172 /* NewExpression */: - case 171 /* CallExpression */: { + case 175 /* NewExpression */: + case 174 /* CallExpression */: { var start = node.getStart(sourceFile); if (node.parent.typeArguments && ts.rangeContainsStartEnd(node.parent.typeArguments, start, node.getEnd())) { @@ -46869,8 +52933,8 @@ var ts; if (node.kind === 18 /* CloseParenToken */) { return -1 /* Unknown */; } - if (node.parent && (node.parent.kind === 171 /* CallExpression */ || - node.parent.kind === 172 /* NewExpression */) && + if (node.parent && (node.parent.kind === 174 /* CallExpression */ || + node.parent.kind === 175 /* NewExpression */) && node.parent.expression !== node) { var fullCallOrNewExpression = node.parent.expression; var startingExpression = getStartingExpression(fullCallOrNewExpression); @@ -46888,10 +52952,10 @@ var ts; function getStartingExpression(node) { while (true) { switch (node.kind) { - case 171 /* CallExpression */: - case 172 /* NewExpression */: - case 169 /* PropertyAccessExpression */: - case 170 /* ElementAccessExpression */: + case 174 /* CallExpression */: + case 175 /* NewExpression */: + case 172 /* PropertyAccessExpression */: + case 173 /* ElementAccessExpression */: node = node.expression; break; default: @@ -46906,7 +52970,7 @@ var ts; // walk toward the start of the list starting from current node and check if the line is the same for all items. // if end line for item [i - 1] differs from the start line for item [i] - find column of the first non-whitespace character on the line of item [i] var lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); - for (var i = index - 1; i >= 0; --i) { + for (var i = index - 1; i >= 0; i--) { if (list[i].kind === 24 /* CommaToken */) { continue; } @@ -46933,9 +52997,9 @@ var ts; function findFirstNonWhitespaceCharacterAndColumn(startPos, endPos, sourceFile, options) { var character = 0; var column = 0; - for (var pos = startPos; pos < endPos; ++pos) { + for (var pos = startPos; pos < endPos; pos++) { var ch = sourceFile.text.charCodeAt(pos); - if (!ts.isWhiteSpace(ch)) { + if (!ts.isWhiteSpaceSingleLine(ch)) { break; } if (ch === 9 /* tab */) { @@ -46955,45 +53019,48 @@ var ts; SmartIndenter.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn; function nodeContentIsAlwaysIndented(kind) { switch (kind) { - case 198 /* ExpressionStatement */: - case 217 /* ClassDeclaration */: - case 189 /* ClassExpression */: - case 218 /* InterfaceDeclaration */: - case 220 /* EnumDeclaration */: - case 219 /* TypeAliasDeclaration */: - case 167 /* ArrayLiteralExpression */: - case 195 /* Block */: - case 222 /* ModuleBlock */: - case 168 /* ObjectLiteralExpression */: - case 156 /* TypeLiteral */: - case 158 /* TupleType */: - case 223 /* CaseBlock */: - case 245 /* DefaultClause */: - case 244 /* CaseClause */: - case 175 /* ParenthesizedExpression */: - case 169 /* PropertyAccessExpression */: - case 171 /* CallExpression */: - case 172 /* NewExpression */: - case 196 /* VariableStatement */: - case 214 /* VariableDeclaration */: - case 230 /* ExportAssignment */: - case 207 /* ReturnStatement */: - case 185 /* ConditionalExpression */: - case 165 /* ArrayBindingPattern */: - case 164 /* ObjectBindingPattern */: - case 238 /* JsxOpeningElement */: - case 237 /* JsxSelfClosingElement */: - case 243 /* JsxExpression */: - case 143 /* MethodSignature */: - case 148 /* CallSignature */: - case 149 /* ConstructSignature */: - case 139 /* Parameter */: - case 153 /* FunctionType */: - case 154 /* ConstructorType */: - case 161 /* ParenthesizedType */: - case 173 /* TaggedTemplateExpression */: - case 181 /* AwaitExpression */: - case 228 /* NamedImports */: + case 202 /* ExpressionStatement */: + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: + case 222 /* InterfaceDeclaration */: + case 224 /* EnumDeclaration */: + case 223 /* TypeAliasDeclaration */: + case 170 /* ArrayLiteralExpression */: + case 199 /* Block */: + case 226 /* ModuleBlock */: + case 171 /* ObjectLiteralExpression */: + case 159 /* TypeLiteral */: + case 161 /* TupleType */: + case 227 /* CaseBlock */: + case 250 /* DefaultClause */: + case 249 /* CaseClause */: + case 178 /* ParenthesizedExpression */: + case 172 /* PropertyAccessExpression */: + case 174 /* CallExpression */: + case 175 /* NewExpression */: + case 200 /* VariableStatement */: + case 218 /* VariableDeclaration */: + case 235 /* ExportAssignment */: + case 211 /* ReturnStatement */: + case 188 /* ConditionalExpression */: + case 168 /* ArrayBindingPattern */: + case 167 /* ObjectBindingPattern */: + case 243 /* JsxOpeningElement */: + case 242 /* JsxSelfClosingElement */: + case 248 /* JsxExpression */: + case 146 /* MethodSignature */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: + case 142 /* Parameter */: + case 156 /* FunctionType */: + case 157 /* ConstructorType */: + case 164 /* ParenthesizedType */: + case 176 /* TaggedTemplateExpression */: + case 184 /* AwaitExpression */: + case 237 /* NamedExports */: + case 233 /* NamedImports */: + case 238 /* ExportSpecifier */: + case 234 /* ImportSpecifier */: return true; } return false; @@ -47002,22 +53069,27 @@ var ts; function nodeWillIndentChild(parent, child, indentByDefault) { var childKind = child ? child.kind : 0 /* Unknown */; switch (parent.kind) { - case 200 /* DoStatement */: - case 201 /* WhileStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: - case 202 /* ForStatement */: - case 199 /* IfStatement */: - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 144 /* MethodDeclaration */: - case 177 /* ArrowFunction */: - case 145 /* Constructor */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - return childKind !== 195 /* Block */; - case 236 /* JsxElement */: - return childKind !== 240 /* JsxClosingElement */; + case 204 /* DoStatement */: + case 205 /* WhileStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: + case 206 /* ForStatement */: + case 203 /* IfStatement */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 147 /* MethodDeclaration */: + case 180 /* ArrowFunction */: + case 148 /* Constructor */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + return childKind !== 199 /* Block */; + case 236 /* ExportDeclaration */: + return childKind !== 237 /* NamedExports */; + case 230 /* ImportDeclaration */: + return childKind !== 231 /* ImportClause */ || + (child.namedBindings && child.namedBindings.kind !== 233 /* NamedImports */); + case 241 /* JsxElement */: + return childKind !== 245 /* JsxClosingElement */; } // No explicit rule for given nodes so the result will follow the default value argument return indentByDefault; @@ -47027,13 +53099,14 @@ var ts; Function returns true when the parent node should indent the given child by an explicit rule */ function shouldIndentChildNode(parent, child) { - return nodeContentIsAlwaysIndented(parent.kind) || nodeWillIndentChild(parent, child, false); + return nodeContentIsAlwaysIndented(parent.kind) || nodeWillIndentChild(parent, child, /*indentByDefault*/ false); } SmartIndenter.shouldIndentChildNode = shouldIndentChildNode; })(SmartIndenter = formatting.SmartIndenter || (formatting.SmartIndenter = {})); })(formatting = ts.formatting || (ts.formatting = {})); })(ts || (ts = {})); /// +/// /// /// /// @@ -47110,28 +53183,32 @@ var ts; "static", "throws", "type", + "typedef", + "property", + "prop", "version" ]; var jsDocCompletionEntries; - function createNode(kind, pos, end, flags, parent) { - var node = new NodeObject(kind, pos, end); - node.flags = flags; + function createNode(kind, pos, end, parent) { + var node = kind >= 139 /* FirstNode */ ? new NodeObject(kind, pos, end) : + kind === 69 /* Identifier */ ? new IdentifierObject(kind, pos, end) : + new TokenObject(kind, pos, end); node.parent = parent; return node; } var NodeObject = (function () { function NodeObject(kind, pos, end) { - this.kind = kind; this.pos = pos; this.end = end; this.flags = 0 /* None */; this.parent = undefined; + this.kind = kind; } NodeObject.prototype.getSourceFile = function () { return ts.getSourceFileOfNode(this); }; - NodeObject.prototype.getStart = function (sourceFile) { - return ts.getTokenPosOfNode(this, sourceFile); + NodeObject.prototype.getStart = function (sourceFile, includeJsDocComment) { + return ts.getTokenPosOfNode(this, sourceFile, includeJsDocComment); }; NodeObject.prototype.getFullStart = function () { return this.pos; @@ -47154,22 +53231,24 @@ var ts; NodeObject.prototype.getText = function (sourceFile) { return (sourceFile || this.getSourceFile()).text.substring(this.getStart(), this.getEnd()); }; - NodeObject.prototype.addSyntheticNodes = function (nodes, pos, end) { + NodeObject.prototype.addSyntheticNodes = function (nodes, pos, end, useJSDocScanner) { scanner.setTextPos(pos); while (pos < end) { - var token = scanner.scan(); + var token = useJSDocScanner ? scanner.scanJSDocToken() : scanner.scan(); var textPos = scanner.getTextPos(); - nodes.push(createNode(token, pos, textPos, 2048 /* Synthetic */, this)); + if (textPos <= end) { + nodes.push(createNode(token, pos, textPos, this)); + } pos = textPos; } return pos; }; NodeObject.prototype.createSyntaxList = function (nodes) { - var list = createNode(274 /* SyntaxList */, nodes.pos, nodes.end, 2048 /* Synthetic */, this); + var list = createNode(286 /* SyntaxList */, nodes.pos, nodes.end, this); list._children = []; var pos = nodes.pos; - for (var _i = 0, nodes_7 = nodes; _i < nodes_7.length; _i++) { - var node = nodes_7[_i]; + for (var _i = 0, nodes_4 = nodes; _i < nodes_4.length; _i++) { + var node = nodes_4[_i]; if (pos < node.pos) { pos = this.addSyntheticNodes(list._children, pos, node.pos); } @@ -47184,24 +53263,35 @@ var ts; NodeObject.prototype.createChildren = function (sourceFile) { var _this = this; var children; - if (this.kind >= 136 /* FirstNode */) { + if (this.kind >= 139 /* FirstNode */) { scanner.setText((sourceFile || this.getSourceFile()).text); children = []; var pos_3 = this.pos; + var useJSDocScanner_1 = this.kind >= 273 /* FirstJSDocTagNode */ && this.kind <= 285 /* LastJSDocTagNode */; var processNode = function (node) { - if (pos_3 < node.pos) { - pos_3 = _this.addSyntheticNodes(children, pos_3, node.pos); + var isJSDocTagNode = ts.isJSDocTag(node); + if (!isJSDocTagNode && pos_3 < node.pos) { + pos_3 = _this.addSyntheticNodes(children, pos_3, node.pos, useJSDocScanner_1); } children.push(node); - pos_3 = node.end; + if (!isJSDocTagNode) { + pos_3 = node.end; + } }; var processNodes = function (nodes) { if (pos_3 < nodes.pos) { - pos_3 = _this.addSyntheticNodes(children, pos_3, nodes.pos); + pos_3 = _this.addSyntheticNodes(children, pos_3, nodes.pos, useJSDocScanner_1); } children.push(_this.createSyntaxList(nodes)); pos_3 = nodes.end; }; + // jsDocComments need to be the first children + if (this.jsDocComments) { + for (var _i = 0, _a = this.jsDocComments; _i < _a.length; _i++) { + var jsDocComment = _a[_i]; + processNode(jsDocComment); + } + } ts.forEachChild(this, processNode, processNodes); if (pos_3 < this.end) { this.addSyntheticNodes(children, pos_3, this.end); @@ -47231,7 +53321,7 @@ var ts; return undefined; } var child = children[0]; - return child.kind < 136 /* FirstNode */ ? child : child.getFirstToken(sourceFile); + return child.kind < 139 /* FirstNode */ ? child : child.getFirstToken(sourceFile); }; NodeObject.prototype.getLastToken = function (sourceFile) { var children = this.getChildren(sourceFile); @@ -47239,10 +53329,78 @@ var ts; if (!child) { return undefined; } - return child.kind < 136 /* FirstNode */ ? child : child.getLastToken(sourceFile); + return child.kind < 139 /* FirstNode */ ? child : child.getLastToken(sourceFile); }; return NodeObject; }()); + var TokenOrIdentifierObject = (function () { + function TokenOrIdentifierObject(pos, end) { + // Set properties in same order as NodeObject + this.pos = pos; + this.end = end; + this.flags = 0 /* None */; + this.parent = undefined; + } + TokenOrIdentifierObject.prototype.getSourceFile = function () { + return ts.getSourceFileOfNode(this); + }; + TokenOrIdentifierObject.prototype.getStart = function (sourceFile, includeJsDocComment) { + return ts.getTokenPosOfNode(this, sourceFile, includeJsDocComment); + }; + TokenOrIdentifierObject.prototype.getFullStart = function () { + return this.pos; + }; + TokenOrIdentifierObject.prototype.getEnd = function () { + return this.end; + }; + TokenOrIdentifierObject.prototype.getWidth = function (sourceFile) { + return this.getEnd() - this.getStart(sourceFile); + }; + TokenOrIdentifierObject.prototype.getFullWidth = function () { + return this.end - this.pos; + }; + TokenOrIdentifierObject.prototype.getLeadingTriviaWidth = function (sourceFile) { + return this.getStart(sourceFile) - this.pos; + }; + TokenOrIdentifierObject.prototype.getFullText = function (sourceFile) { + return (sourceFile || this.getSourceFile()).text.substring(this.pos, this.end); + }; + TokenOrIdentifierObject.prototype.getText = function (sourceFile) { + return (sourceFile || this.getSourceFile()).text.substring(this.getStart(), this.getEnd()); + }; + TokenOrIdentifierObject.prototype.getChildCount = function (sourceFile) { + return 0; + }; + TokenOrIdentifierObject.prototype.getChildAt = function (index, sourceFile) { + return undefined; + }; + TokenOrIdentifierObject.prototype.getChildren = function (sourceFile) { + return emptyArray; + }; + TokenOrIdentifierObject.prototype.getFirstToken = function (sourceFile) { + return undefined; + }; + TokenOrIdentifierObject.prototype.getLastToken = function (sourceFile) { + return undefined; + }; + return TokenOrIdentifierObject; + }()); + var TokenObject = (function (_super) { + __extends(TokenObject, _super); + function TokenObject(kind, pos, end) { + _super.call(this, pos, end); + this.kind = kind; + } + return TokenObject; + }(TokenOrIdentifierObject)); + var IdentifierObject = (function (_super) { + __extends(IdentifierObject, _super); + function IdentifierObject(kind, pos, end) { + _super.call(this, pos, end); + } + return IdentifierObject; + }(TokenOrIdentifierObject)); + IdentifierObject.prototype.kind = 69 /* Identifier */; var SymbolObject = (function () { function SymbolObject(flags, name) { this.flags = flags; @@ -47286,34 +53444,48 @@ var ts; // The property length will have two declarations of property length coming // from Array - Array and Array if (ts.indexOf(declarations, declaration) === indexOfDeclaration) { - var sourceFileOfDeclaration_1 = ts.getSourceFileOfNode(declaration); + var sourceFileOfDeclaration = ts.getSourceFileOfNode(declaration); // If it is parameter - try and get the jsDoc comment with @param tag from function declaration's jsDoc comments - if (canUseParsedParamTagComments && declaration.kind === 139 /* Parameter */) { - ts.forEach(getJsDocCommentTextRange(declaration.parent, sourceFileOfDeclaration_1), function (jsDocCommentTextRange) { - var cleanedParamJsDocComment = getCleanedParamJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration_1); - if (cleanedParamJsDocComment) { - ts.addRange(jsDocCommentParts, cleanedParamJsDocComment); - } - }); + if (canUseParsedParamTagComments && declaration.kind === 142 /* Parameter */) { + if ((declaration.parent.kind === 179 /* FunctionExpression */ || declaration.parent.kind === 180 /* ArrowFunction */) && + declaration.parent.parent.kind === 218 /* VariableDeclaration */) { + addCommentParts(declaration.parent.parent.parent, sourceFileOfDeclaration, getCleanedParamJsDocComment); + } + addCommentParts(declaration.parent, sourceFileOfDeclaration, getCleanedParamJsDocComment); } // If this is left side of dotted module declaration, there is no doc comments associated with this node - if (declaration.kind === 221 /* ModuleDeclaration */ && declaration.body.kind === 221 /* ModuleDeclaration */) { + if (declaration.kind === 225 /* ModuleDeclaration */ && declaration.body && declaration.body.kind === 225 /* ModuleDeclaration */) { return; } + if ((declaration.kind === 179 /* FunctionExpression */ || declaration.kind === 180 /* ArrowFunction */) && + declaration.parent.kind === 218 /* VariableDeclaration */) { + addCommentParts(declaration.parent.parent, sourceFileOfDeclaration, getCleanedJsDocComment); + } // If this is dotted module name, get the doc comments from the parent - while (declaration.kind === 221 /* ModuleDeclaration */ && declaration.parent.kind === 221 /* ModuleDeclaration */) { + while (declaration.kind === 225 /* ModuleDeclaration */ && declaration.parent.kind === 225 /* ModuleDeclaration */) { declaration = declaration.parent; } - // Get the cleaned js doc comment text from the declaration - ts.forEach(getJsDocCommentTextRange(declaration.kind === 214 /* VariableDeclaration */ ? declaration.parent.parent : declaration, sourceFileOfDeclaration_1), function (jsDocCommentTextRange) { - var cleanedJsDocComment = getCleanedJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration_1); - if (cleanedJsDocComment) { - ts.addRange(jsDocCommentParts, cleanedJsDocComment); + addCommentParts(declaration.kind === 218 /* VariableDeclaration */ ? declaration.parent.parent : declaration, sourceFileOfDeclaration, getCleanedJsDocComment); + if (declaration.kind === 218 /* VariableDeclaration */) { + var init = declaration.initializer; + if (init && (init.kind === 179 /* FunctionExpression */ || init.kind === 180 /* ArrowFunction */)) { + // Get the cleaned js doc comment text from the initializer + addCommentParts(init, sourceFileOfDeclaration, getCleanedJsDocComment); } - }); + } } }); return jsDocCommentParts; + function addCommentParts(commented, sourceFileOfDeclaration, getCommentPart) { + var ranges = getJsDocCommentTextRange(commented, sourceFileOfDeclaration); + // Get the cleaned js doc comment text from the declaration + ts.forEach(ranges, function (jsDocCommentTextRange) { + var cleanedComment = getCommentPart(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); + if (cleanedComment) { + ts.addRange(jsDocCommentParts, cleanedComment); + } + }); + } function getJsDocCommentTextRange(node, sourceFile) { return ts.map(ts.getJsDocComments(node, sourceFile), function (jsDocComment) { return { @@ -47328,8 +53500,7 @@ var ts; } for (; pos < end; pos++) { var ch = sourceFile.text.charCodeAt(pos); - if (!ts.isWhiteSpace(ch) || ts.isLineBreak(ch)) { - // Either found lineBreak or non whiteSpace + if (!ts.isWhiteSpaceSingleLine(ch)) { return pos; } } @@ -47344,8 +53515,7 @@ var ts; function isName(pos, end, sourceFile, name) { return pos + name.length < end && sourceFile.text.substr(pos, name.length) === name && - (ts.isWhiteSpace(sourceFile.text.charCodeAt(pos + name.length)) || - ts.isLineBreak(sourceFile.text.charCodeAt(pos + name.length))); + ts.isWhiteSpace(sourceFile.text.charCodeAt(pos + name.length)); } function isParamTag(pos, end, sourceFile) { // If it is @param tag @@ -47380,7 +53550,7 @@ var ts; else if (spacesToRemoveAfterAsterisk === undefined) { spacesToRemoveAfterAsterisk = 0; } - // Analyse text on this line + // Analyze text on this line while (pos < end && !ts.isLineBreak(sourceFile.text.charCodeAt(pos))) { var ch = sourceFile.text.charAt(pos); if (ch === "@") { @@ -47500,7 +53670,7 @@ var ts; } paramHelpStringMargin = undefined; } - // If this is the start of another tag, continue with the loop in seach of param tag with symbol name + // If this is the start of another tag, continue with the loop in search of param tag with symbol name if (sourceFile.text.charCodeAt(pos) === 64 /* at */) { continue; } @@ -47510,7 +53680,7 @@ var ts; } return paramDocComments; function consumeWhiteSpaces(pos) { - while (pos < end && ts.isWhiteSpace(sourceFile.text.charCodeAt(pos))) { + while (pos < end && ts.isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(pos))) { pos++; } return pos; @@ -47575,10 +53745,13 @@ var ts; return this.checker.getIndexTypeOfType(this, 1 /* Number */); }; TypeObject.prototype.getBaseTypes = function () { - return this.flags & (1024 /* Class */ | 2048 /* Interface */) + return this.flags & (32768 /* Class */ | 65536 /* Interface */) ? this.checker.getBaseTypes(this) : undefined; }; + TypeObject.prototype.getNonNullableType = function () { + return this.checker.getNonNullableType(this); + }; return TypeObject; }()); var SignatureObject = (function () { @@ -47631,7 +53804,7 @@ var ts; return this.namedDeclarations; }; SourceFileObject.prototype.computeNamedDeclarations = function () { - var result = {}; + var result = ts.createMap(); ts.forEachChild(this, visit); return result; function addDeclaration(declaration) { @@ -47642,7 +53815,7 @@ var ts; } } function getDeclarations(name) { - return ts.getProperty(result, name) || (result[name] = []); + return result[name] || (result[name] = []); } function getDeclarationName(declaration) { if (declaration.name) { @@ -47650,9 +53823,9 @@ var ts; if (result_3 !== undefined) { return result_3; } - if (declaration.name.kind === 137 /* ComputedPropertyName */) { + if (declaration.name.kind === 140 /* ComputedPropertyName */) { var expr = declaration.name.expression; - if (expr.kind === 169 /* PropertyAccessExpression */) { + if (expr.kind === 172 /* PropertyAccessExpression */) { return expr.name.text; } return getTextOfIdentifierOrLiteral(expr); @@ -47672,9 +53845,10 @@ var ts; } function visit(node) { switch (node.kind) { - case 216 /* FunctionDeclaration */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: var functionDeclaration = node; var declarationName = getDeclarationName(functionDeclaration); if (declarationName) { @@ -47694,60 +53868,53 @@ var ts; ts.forEachChild(node, visit); } break; - case 217 /* ClassDeclaration */: - case 218 /* InterfaceDeclaration */: - case 219 /* TypeAliasDeclaration */: - case 220 /* EnumDeclaration */: - case 221 /* ModuleDeclaration */: - case 224 /* ImportEqualsDeclaration */: - case 233 /* ExportSpecifier */: - case 229 /* ImportSpecifier */: - case 224 /* ImportEqualsDeclaration */: - case 226 /* ImportClause */: - case 227 /* NamespaceImport */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 156 /* TypeLiteral */: + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: + case 222 /* InterfaceDeclaration */: + case 223 /* TypeAliasDeclaration */: + case 224 /* EnumDeclaration */: + case 225 /* ModuleDeclaration */: + case 229 /* ImportEqualsDeclaration */: + case 238 /* ExportSpecifier */: + case 234 /* ImportSpecifier */: + case 229 /* ImportEqualsDeclaration */: + case 231 /* ImportClause */: + case 232 /* NamespaceImport */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 159 /* TypeLiteral */: addDeclaration(node); - // fall through - case 145 /* Constructor */: - case 196 /* VariableStatement */: - case 215 /* VariableDeclarationList */: - case 164 /* ObjectBindingPattern */: - case 165 /* ArrayBindingPattern */: - case 222 /* ModuleBlock */: ts.forEachChild(node, visit); break; - case 195 /* Block */: - if (ts.isFunctionBlock(node)) { - ts.forEachChild(node, visit); - } - break; - case 139 /* Parameter */: - // Only consider properties defined as constructor parameters - if (!(node.flags & 56 /* AccessibilityModifier */)) { + case 142 /* Parameter */: + // Only consider parameter properties + if (!(node.flags & 92 /* ParameterPropertyModifier */)) { break; } // fall through - case 214 /* VariableDeclaration */: - case 166 /* BindingElement */: - if (ts.isBindingPattern(node.name)) { - ts.forEachChild(node.name, visit); + case 218 /* VariableDeclaration */: + case 169 /* BindingElement */: { + var decl = node; + if (ts.isBindingPattern(decl.name)) { + ts.forEachChild(decl.name, visit); break; } - case 250 /* EnumMember */: - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: + if (decl.initializer) + visit(decl.initializer); + } + case 255 /* EnumMember */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: addDeclaration(node); break; - case 231 /* ExportDeclaration */: + case 236 /* ExportDeclaration */: // Handle named exports case e.g.: // export {a, b as B} from "mod"; if (node.exportClause) { ts.forEach(node.exportClause.elements, visit); } break; - case 225 /* ImportDeclaration */: + case 230 /* ImportDeclaration */: var importClause = node.importClause; if (importClause) { // Handle default import case e.g.: @@ -47759,7 +53926,7 @@ var ts; // import * as NS from "mod"; // import {a, b as B} from "mod"; if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 227 /* NamespaceImport */) { + if (importClause.namedBindings.kind === 232 /* NamespaceImport */) { addDeclaration(importClause.namedBindings); } else { @@ -47768,6 +53935,8 @@ var ts; } } break; + default: + ts.forEachChild(node, visit); } } }; @@ -47850,49 +54019,57 @@ var ts; (function (ScriptElementKind) { ScriptElementKind.unknown = ""; ScriptElementKind.warning = "warning"; - // predefined type (void) or keyword (class) + /** predefined type (void) or keyword (class) */ ScriptElementKind.keyword = "keyword"; - // top level script node + /** top level script node */ ScriptElementKind.scriptElement = "script"; - // module foo {} + /** module foo {} */ ScriptElementKind.moduleElement = "module"; - // class X {} + /** class X {} */ ScriptElementKind.classElement = "class"; - // var x = class X {} + /** var x = class X {} */ ScriptElementKind.localClassElement = "local class"; - // interface Y {} + /** interface Y {} */ ScriptElementKind.interfaceElement = "interface"; - // type T = ... + /** type T = ... */ ScriptElementKind.typeElement = "type"; - // enum E + /** enum E */ ScriptElementKind.enumElement = "enum"; - // Inside module and script only - // const v = .. + // TODO: GH#9983 + ScriptElementKind.enumMemberElement = "const"; + /** + * Inside module and script only + * const v = .. + */ ScriptElementKind.variableElement = "var"; - // Inside function + /** Inside function */ ScriptElementKind.localVariableElement = "local var"; - // Inside module and script only - // function f() { } + /** + * Inside module and script only + * function f() { } + */ ScriptElementKind.functionElement = "function"; - // Inside function + /** Inside function */ ScriptElementKind.localFunctionElement = "local function"; - // class X { [public|private]* foo() {} } + /** class X { [public|private]* foo() {} } */ ScriptElementKind.memberFunctionElement = "method"; - // class X { [public|private]* [get|set] foo:number; } + /** class X { [public|private]* [get|set] foo:number; } */ ScriptElementKind.memberGetAccessorElement = "getter"; ScriptElementKind.memberSetAccessorElement = "setter"; - // class X { [public|private]* foo:number; } - // interface Y { foo:number; } + /** + * class X { [public|private]* foo:number; } + * interface Y { foo:number; } + */ ScriptElementKind.memberVariableElement = "property"; - // class X { constructor() { } } + /** class X { constructor() { } } */ ScriptElementKind.constructorImplementationElement = "constructor"; - // interface Y { ():number; } + /** interface Y { ():number; } */ ScriptElementKind.callSignatureElement = "call"; - // interface Y { []:number; } + /** interface Y { []:number; } */ ScriptElementKind.indexSignatureElement = "index"; - // interface Y { new():Y; } + /** interface Y { new():Y; } */ ScriptElementKind.constructSignatureElement = "construct"; - // function foo(*Y*: string) + /** function foo(*Y*: string) */ ScriptElementKind.parameterElement = "parameter"; ScriptElementKind.typeParameterElement = "type parameter"; ScriptElementKind.primitiveType = "primitive type"; @@ -47981,16 +54158,16 @@ var ts; } return ts.forEach(symbol.declarations, function (declaration) { // Function expressions are local - if (declaration.kind === 176 /* FunctionExpression */) { + if (declaration.kind === 179 /* FunctionExpression */) { return true; } - if (declaration.kind !== 214 /* VariableDeclaration */ && declaration.kind !== 216 /* FunctionDeclaration */) { + if (declaration.kind !== 218 /* VariableDeclaration */ && declaration.kind !== 220 /* FunctionDeclaration */) { return false; } // If the parent is not sourceFile or module block it is local variable - for (var parent_10 = declaration.parent; !ts.isFunctionBlock(parent_10); parent_10 = parent_10.parent) { + for (var parent_17 = declaration.parent; !ts.isFunctionBlock(parent_17); parent_17 = parent_17.parent) { // Reached source file or module block - if (parent_10.kind === 251 /* SourceFile */ || parent_10.kind === 222 /* ModuleBlock */) { + if (parent_17.kind === 256 /* SourceFile */ || parent_17.kind === 226 /* ModuleBlock */) { return false; } } @@ -48006,7 +54183,7 @@ var ts; }; } ts.getDefaultCompilerOptions = getDefaultCompilerOptions; - // Cache host information about scrip Should be refreshed + // Cache host information about script should be refreshed // at each language service public entry point, since we don't know when // set of scripts handled by the host changes. var HostCache = (function () { @@ -48050,10 +54227,12 @@ var ts; }; HostCache.prototype.getOrCreateEntry = function (fileName) { var path = ts.toPath(fileName, this.currentDirectory, this.getCanonicalFileName); - if (this.contains(path)) { - return this.getEntry(path); - } - return this.createEntry(fileName, path); + return this.getOrCreateEntryByPath(fileName, path); + }; + HostCache.prototype.getOrCreateEntryByPath = function (fileName, path) { + return this.contains(path) + ? this.getEntry(path) + : this.createEntry(fileName, path); }; HostCache.prototype.getRootFileNames = function () { var fileNames = []; @@ -48111,6 +54290,37 @@ var ts; sourceFile.version = version; sourceFile.scriptSnapshot = scriptSnapshot; } + var commandLineOptionsStringToEnum; + /** JS users may pass in string values for enum compiler options (such as ModuleKind), so convert. */ + function fixupCompilerOptions(options, diagnostics) { + // Lazily create this value to fix module loading errors. + commandLineOptionsStringToEnum = commandLineOptionsStringToEnum || ts.filter(ts.optionDeclarations, function (o) { + return typeof o.type === "object" && !ts.forEachProperty(o.type, function (v) { return typeof v !== "number"; }); + }); + options = ts.clone(options); + var _loop_3 = function(opt) { + if (!ts.hasProperty(options, opt.name)) { + return "continue"; + } + var value = options[opt.name]; + // Value should be a key of opt.type + if (typeof value === "string") { + // If value is not a string, this will fail + options[opt.name] = ts.parseCustomTypeOption(opt, value, diagnostics); + } + else { + if (!ts.forEachProperty(opt.type, function (v) { return v === value; })) { + // Supplied value isn't a valid enum value. + diagnostics.push(ts.createCompilerDiagnosticForInvalidCustomType(opt)); + } + } + }; + for (var _i = 0, commandLineOptionsStringToEnum_1 = commandLineOptionsStringToEnum; _i < commandLineOptionsStringToEnum_1.length; _i++) { + var opt = commandLineOptionsStringToEnum_1[_i]; + _loop_3(opt); + } + return options; + } /* * This function will compile source text from 'input' argument using specified compiler options. * If not options are provided - it will use a set of default compiler options. @@ -48121,15 +54331,27 @@ var ts; * - noResolve = true */ function transpileModule(input, transpileOptions) { - var options = transpileOptions.compilerOptions ? ts.clone(transpileOptions.compilerOptions) : getDefaultCompilerOptions(); + var diagnostics = []; + var options = transpileOptions.compilerOptions ? fixupCompilerOptions(transpileOptions.compilerOptions, diagnostics) : getDefaultCompilerOptions(); options.isolatedModules = true; - // transpileModule does not write anything to disk so there is no need to verify that there are no conflicts between input and output paths. + // transpileModule does not write anything to disk so there is no need to verify that there are no conflicts between input and output paths. options.suppressOutputPathCheck = true; // Filename can be non-ts file. options.allowNonTsExtensions = true; // We are not returning a sourceFile for lib file when asked by the program, // so pass --noLib to avoid reporting a file not found error. options.noLib = true; + // Clear out other settings that would not be used in transpiling this module + options.lib = undefined; + options.types = undefined; + options.noEmit = undefined; + options.noEmitOnError = undefined; + options.paths = undefined; + options.rootDirs = undefined; + options.declaration = undefined; + options.declarationDir = undefined; + options.out = undefined; + options.outFile = undefined; // We are not doing a full typecheck, we are not resolving the whole context, // so pass --noResolve to avoid reporting missing file errors. options.noResolve = true; @@ -48139,14 +54361,16 @@ var ts; if (transpileOptions.moduleName) { sourceFile.moduleName = transpileOptions.moduleName; } - sourceFile.renamedDependencies = transpileOptions.renamedDependencies; + if (transpileOptions.renamedDependencies) { + sourceFile.renamedDependencies = ts.createMap(transpileOptions.renamedDependencies); + } var newLine = ts.getNewLineCharacter(options); // Output var outputText; var sourceMapText; // Create a compilerHost object to allow the compiler to read and write files var compilerHost = { - getSourceFile: function (fileName, target) { return fileName === ts.normalizeSlashes(inputFileName) ? sourceFile : undefined; }, + getSourceFile: function (fileName, target) { return fileName === ts.normalizePath(inputFileName) ? sourceFile : undefined; }, writeFile: function (name, text, writeByteOrderMark) { if (ts.fileExtensionIs(name, ".map")) { ts.Debug.assert(sourceMapText === undefined, "Unexpected multiple source map outputs for the file '" + name + "'"); @@ -48164,12 +54388,11 @@ var ts; getNewLine: function () { return newLine; }, fileExists: function (fileName) { return fileName === inputFileName; }, readFile: function (fileName) { return ""; }, - directoryExists: function (directoryExists) { return true; } + directoryExists: function (directoryExists) { return true; }, + getDirectories: function (path) { return []; } }; var program = ts.createProgram([inputFileName], options, compilerHost); - var diagnostics; if (transpileOptions.reportDiagnostics) { - diagnostics = []; ts.addRange(/*to*/ diagnostics, /*from*/ program.getSyntacticDiagnostics(sourceFile)); ts.addRange(/*to*/ diagnostics, /*from*/ program.getOptionsDiagnostics()); } @@ -48251,14 +54474,13 @@ var ts; if (currentDirectory === void 0) { currentDirectory = ""; } // Maps from compiler setting target (ES3, ES5, etc.) to all the cached documents we have // for those settings. - var buckets = {}; + var buckets = ts.createMap(); var getCanonicalFileName = ts.createGetCanonicalFileName(!!useCaseSensitiveFileNames); - function getKeyFromCompilationSettings(settings) { - return "_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx + +"|" + settings.allowJs; + function getKeyForCompilationSettings(settings) { + return ("_" + settings.target + "|" + settings.module + "|" + settings.noResolve + "|" + settings.jsx + "|" + settings.allowJs + "|" + settings.baseUrl + "|" + JSON.stringify(settings.typeRoots) + "|" + JSON.stringify(settings.rootDirs) + "|" + JSON.stringify(settings.paths)); } - function getBucketForCompilationSettings(settings, createIfMissing) { - var key = getKeyFromCompilationSettings(settings); - var bucket = ts.lookUp(buckets, key); + function getBucketForCompilationSettings(key, createIfMissing) { + var bucket = buckets[key]; if (!bucket && createIfMissing) { buckets[key] = bucket = ts.createFileMap(); } @@ -48266,7 +54488,7 @@ var ts; } function reportStats() { var bucketInfoArray = Object.keys(buckets).filter(function (name) { return name && name.charAt(0) === "_"; }).map(function (name) { - var entries = ts.lookUp(buckets, name); + var entries = buckets[name]; var sourceFiles = []; entries.forEachValue(function (key, entry) { sourceFiles.push({ @@ -48284,14 +54506,23 @@ var ts; return JSON.stringify(bucketInfoArray, undefined, 2); } function acquireDocument(fileName, compilationSettings, scriptSnapshot, version, scriptKind) { - return acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, /*acquiring*/ true, scriptKind); + var path = ts.toPath(fileName, currentDirectory, getCanonicalFileName); + var key = getKeyForCompilationSettings(compilationSettings); + return acquireDocumentWithKey(fileName, path, compilationSettings, key, scriptSnapshot, version, scriptKind); + } + function acquireDocumentWithKey(fileName, path, compilationSettings, key, scriptSnapshot, version, scriptKind) { + return acquireOrUpdateDocument(fileName, path, compilationSettings, key, scriptSnapshot, version, /*acquiring*/ true, scriptKind); } function updateDocument(fileName, compilationSettings, scriptSnapshot, version, scriptKind) { - return acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, /*acquiring*/ false, scriptKind); - } - function acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, acquiring, scriptKind) { - var bucket = getBucketForCompilationSettings(compilationSettings, /*createIfMissing*/ true); var path = ts.toPath(fileName, currentDirectory, getCanonicalFileName); + var key = getKeyForCompilationSettings(compilationSettings); + return updateDocumentWithKey(fileName, path, compilationSettings, key, scriptSnapshot, version, scriptKind); + } + function updateDocumentWithKey(fileName, path, compilationSettings, key, scriptSnapshot, version, scriptKind) { + return acquireOrUpdateDocument(fileName, path, compilationSettings, key, scriptSnapshot, version, /*acquiring*/ false, scriptKind); + } + function acquireOrUpdateDocument(fileName, path, compilationSettings, key, scriptSnapshot, version, acquiring, scriptKind) { + var bucket = getBucketForCompilationSettings(key, /*createIfMissing*/ true); var entry = bucket.get(path); if (!entry) { ts.Debug.assert(acquiring, "How could we be trying to update a document that the registry doesn't have?"); @@ -48323,9 +54554,13 @@ var ts; return entry.sourceFile; } function releaseDocument(fileName, compilationSettings) { - var bucket = getBucketForCompilationSettings(compilationSettings, /*createIfMissing*/ false); - ts.Debug.assert(bucket !== undefined); var path = ts.toPath(fileName, currentDirectory, getCanonicalFileName); + var key = getKeyForCompilationSettings(compilationSettings); + return releaseDocumentWithKey(path, key); + } + function releaseDocumentWithKey(path, key) { + var bucket = getBucketForCompilationSettings(key, /*createIfMissing*/ false); + ts.Debug.assert(bucket !== undefined); var entry = bucket.get(path); entry.languageServiceRefCount--; ts.Debug.assert(entry.languageServiceRefCount >= 0); @@ -48335,9 +54570,13 @@ var ts; } return { acquireDocument: acquireDocument, + acquireDocumentWithKey: acquireDocumentWithKey, updateDocument: updateDocument, + updateDocumentWithKey: updateDocumentWithKey, releaseDocument: releaseDocument, - reportStats: reportStats + releaseDocumentWithKey: releaseDocumentWithKey, + reportStats: reportStats, + getKeyForCompilationSettings: getKeyForCompilationSettings }; } ts.createDocumentRegistry = createDocumentRegistry; @@ -48345,9 +54584,24 @@ var ts; if (readImportFiles === void 0) { readImportFiles = true; } if (detectJavaScriptImports === void 0) { detectJavaScriptImports = false; } var referencedFiles = []; + var typeReferenceDirectives = []; var importedFiles = []; var ambientExternalModules; var isNoDefaultLib = false; + var braceNesting = 0; + // assume that text represent an external module if it contains at least one top level import/export + // ambient modules that are found inside external modules are interpreted as module augmentations + var externalModule = false; + function nextToken() { + var token = scanner.scan(); + if (token === 15 /* OpenBraceToken */) { + braceNesting++; + } + else if (token === 16 /* CloseBraceToken */) { + braceNesting--; + } + return token; + } function processTripleSlashDirectives() { var commentRanges = ts.getLeadingCommentRanges(sourceText, 0); ts.forEach(commentRanges, function (commentRange) { @@ -48357,25 +54611,37 @@ var ts; isNoDefaultLib = referencePathMatchResult.isNoDefaultLib; var fileReference = referencePathMatchResult.fileReference; if (fileReference) { - referencedFiles.push(fileReference); + var collection = referencePathMatchResult.isTypeReferenceDirective + ? typeReferenceDirectives + : referencedFiles; + collection.push(fileReference); } } }); } + function getFileReference() { + var file = scanner.getTokenValue(); + var pos = scanner.getTokenPos(); + return { + fileName: file, + pos: pos, + end: pos + file.length + }; + } function recordAmbientExternalModule() { if (!ambientExternalModules) { ambientExternalModules = []; } - ambientExternalModules.push(scanner.getTokenValue()); + ambientExternalModules.push({ ref: getFileReference(), depth: braceNesting }); } function recordModuleName() { - var importPath = scanner.getTokenValue(); - var pos = scanner.getTokenPos(); - importedFiles.push({ - fileName: importPath, - pos: pos, - end: pos + importPath.length - }); + importedFiles.push(getFileReference()); + markAsExternalModuleIfTopLevel(); + } + function markAsExternalModuleIfTopLevel() { + if (braceNesting === 0) { + externalModule = true; + } } /** * Returns true if at least one token was consumed from the stream @@ -48384,9 +54650,9 @@ var ts; var token = scanner.getToken(); if (token === 122 /* DeclareKeyword */) { // declare module "mod" - token = scanner.scan(); + token = nextToken(); if (token === 125 /* ModuleKeyword */) { - token = scanner.scan(); + token = nextToken(); if (token === 9 /* StringLiteral */) { recordAmbientExternalModule(); } @@ -48401,7 +54667,7 @@ var ts; function tryConsumeImport() { var token = scanner.getToken(); if (token === 89 /* ImportKeyword */) { - token = scanner.scan(); + token = nextToken(); if (token === 9 /* StringLiteral */) { // import "mod"; recordModuleName(); @@ -48409,9 +54675,9 @@ var ts; } else { if (token === 69 /* Identifier */ || ts.isKeyword(token)) { - token = scanner.scan(); - if (token === 133 /* FromKeyword */) { - token = scanner.scan(); + token = nextToken(); + if (token === 136 /* FromKeyword */) { + token = nextToken(); if (token === 9 /* StringLiteral */) { // import d from "mod"; recordModuleName(); @@ -48425,7 +54691,7 @@ var ts; } else if (token === 24 /* CommaToken */) { // consume comma and keep going - token = scanner.scan(); + token = nextToken(); } else { // unknown syntax @@ -48433,16 +54699,16 @@ var ts; } } if (token === 15 /* OpenBraceToken */) { - token = scanner.scan(); + token = nextToken(); // consume "{ a as B, c, d as D}" clauses // make sure that it stops on EOF while (token !== 16 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { - token = scanner.scan(); + token = nextToken(); } if (token === 16 /* CloseBraceToken */) { - token = scanner.scan(); - if (token === 133 /* FromKeyword */) { - token = scanner.scan(); + token = nextToken(); + if (token === 136 /* FromKeyword */) { + token = nextToken(); if (token === 9 /* StringLiteral */) { // import {a as A} from "mod"; // import d, {a, b as B} from "mod" @@ -48452,13 +54718,13 @@ var ts; } } else if (token === 37 /* AsteriskToken */) { - token = scanner.scan(); + token = nextToken(); if (token === 116 /* AsKeyword */) { - token = scanner.scan(); + token = nextToken(); if (token === 69 /* Identifier */ || ts.isKeyword(token)) { - token = scanner.scan(); - if (token === 133 /* FromKeyword */) { - token = scanner.scan(); + token = nextToken(); + if (token === 136 /* FromKeyword */) { + token = nextToken(); if (token === 9 /* StringLiteral */) { // import * as NS from "mod" // import d, * as NS from "mod" @@ -48476,18 +54742,19 @@ var ts; function tryConsumeExport() { var token = scanner.getToken(); if (token === 82 /* ExportKeyword */) { - token = scanner.scan(); + markAsExternalModuleIfTopLevel(); + token = nextToken(); if (token === 15 /* OpenBraceToken */) { - token = scanner.scan(); + token = nextToken(); // consume "{ a as B, c, d as D}" clauses // make sure it stops on EOF while (token !== 16 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { - token = scanner.scan(); + token = nextToken(); } if (token === 16 /* CloseBraceToken */) { - token = scanner.scan(); - if (token === 133 /* FromKeyword */) { - token = scanner.scan(); + token = nextToken(); + if (token === 136 /* FromKeyword */) { + token = nextToken(); if (token === 9 /* StringLiteral */) { // export {a as A} from "mod"; // export {a, b as B} from "mod" @@ -48497,9 +54764,9 @@ var ts; } } else if (token === 37 /* AsteriskToken */) { - token = scanner.scan(); - if (token === 133 /* FromKeyword */) { - token = scanner.scan(); + token = nextToken(); + if (token === 136 /* FromKeyword */) { + token = nextToken(); if (token === 9 /* StringLiteral */) { // export * from "mod" recordModuleName(); @@ -48507,9 +54774,9 @@ var ts; } } else if (token === 89 /* ImportKeyword */) { - token = scanner.scan(); + token = nextToken(); if (token === 69 /* Identifier */ || ts.isKeyword(token)) { - token = scanner.scan(); + token = nextToken(); if (token === 56 /* EqualsToken */) { if (tryConsumeRequireCall(/*skipCurrentToken*/ true)) { return true; @@ -48522,11 +54789,11 @@ var ts; return false; } function tryConsumeRequireCall(skipCurrentToken) { - var token = skipCurrentToken ? scanner.scan() : scanner.getToken(); - if (token === 127 /* RequireKeyword */) { - token = scanner.scan(); + var token = skipCurrentToken ? nextToken() : scanner.getToken(); + if (token === 129 /* RequireKeyword */) { + token = nextToken(); if (token === 17 /* OpenParenToken */) { - token = scanner.scan(); + token = nextToken(); if (token === 9 /* StringLiteral */) { // require("mod"); recordModuleName(); @@ -48539,16 +54806,16 @@ var ts; function tryConsumeDefine() { var token = scanner.getToken(); if (token === 69 /* Identifier */ && scanner.getTokenValue() === "define") { - token = scanner.scan(); + token = nextToken(); if (token !== 17 /* OpenParenToken */) { return true; } - token = scanner.scan(); + token = nextToken(); if (token === 9 /* StringLiteral */) { // looks like define ("modname", ... - skip string literal and comma - token = scanner.scan(); + token = nextToken(); if (token === 24 /* CommaToken */) { - token = scanner.scan(); + token = nextToken(); } else { // unexpected token @@ -48560,7 +54827,7 @@ var ts; return true; } // skip open bracket - token = scanner.scan(); + token = nextToken(); var i = 0; // scan until ']' or EOF while (token !== 20 /* CloseBracketToken */ && token !== 1 /* EndOfFileToken */) { @@ -48569,7 +54836,7 @@ var ts; recordModuleName(); i++; } - token = scanner.scan(); + token = nextToken(); } return true; } @@ -48577,7 +54844,7 @@ var ts; } function processImports() { scanner.setText(sourceText); - scanner.scan(); + nextToken(); // Look for: // import "mod"; // import d from "mod" @@ -48602,7 +54869,7 @@ var ts; continue; } else { - scanner.scan(); + nextToken(); } } scanner.setText(undefined); @@ -48611,13 +54878,42 @@ var ts; processImports(); } processTripleSlashDirectives(); - return { referencedFiles: referencedFiles, importedFiles: importedFiles, isLibFile: isNoDefaultLib, ambientExternalModules: ambientExternalModules }; + if (externalModule) { + // for external modules module all nested ambient modules are augmentations + if (ambientExternalModules) { + // move all detected ambient modules to imported files since they need to be resolved + for (var _i = 0, ambientExternalModules_1 = ambientExternalModules; _i < ambientExternalModules_1.length; _i++) { + var decl = ambientExternalModules_1[_i]; + importedFiles.push(decl.ref); + } + } + return { referencedFiles: referencedFiles, typeReferenceDirectives: typeReferenceDirectives, importedFiles: importedFiles, isLibFile: isNoDefaultLib, ambientExternalModules: undefined }; + } + else { + // for global scripts ambient modules still can have augmentations - look for ambient modules with depth > 0 + var ambientModuleNames = void 0; + if (ambientExternalModules) { + for (var _a = 0, ambientExternalModules_2 = ambientExternalModules; _a < ambientExternalModules_2.length; _a++) { + var decl = ambientExternalModules_2[_a]; + if (decl.depth === 0) { + if (!ambientModuleNames) { + ambientModuleNames = []; + } + ambientModuleNames.push(decl.ref.fileName); + } + else { + importedFiles.push(decl.ref); + } + } + } + return { referencedFiles: referencedFiles, typeReferenceDirectives: typeReferenceDirectives, importedFiles: importedFiles, isLibFile: isNoDefaultLib, ambientExternalModules: ambientModuleNames }; + } } ts.preProcessFile = preProcessFile; /// Helpers function getTargetLabel(referenceNode, labelName) { while (referenceNode) { - if (referenceNode.kind === 210 /* LabeledStatement */ && referenceNode.label.text === labelName) { + if (referenceNode.kind === 214 /* LabeledStatement */ && referenceNode.label.text === labelName) { return referenceNode.label; } referenceNode = referenceNode.parent; @@ -48626,12 +54922,12 @@ var ts; } function isJumpStatementTarget(node) { return node.kind === 69 /* Identifier */ && - (node.parent.kind === 206 /* BreakStatement */ || node.parent.kind === 205 /* ContinueStatement */) && + (node.parent.kind === 210 /* BreakStatement */ || node.parent.kind === 209 /* ContinueStatement */) && node.parent.label === node; } function isLabelOfLabeledStatement(node) { return node.kind === 69 /* Identifier */ && - node.parent.kind === 210 /* LabeledStatement */ && + node.parent.kind === 214 /* LabeledStatement */ && node.parent.label === node; } /** @@ -48639,7 +54935,7 @@ var ts; * Note: 'node' cannot be a SourceFile. */ function isLabeledBy(node, labelName) { - for (var owner = node.parent; owner.kind === 210 /* LabeledStatement */; owner = owner.parent) { + for (var owner = node.parent; owner.kind === 214 /* LabeledStatement */; owner = owner.parent) { if (owner.label.text === labelName) { return true; } @@ -48650,50 +54946,74 @@ var ts; return isLabelOfLabeledStatement(node) || isJumpStatementTarget(node); } function isRightSideOfQualifiedName(node) { - return node.parent.kind === 136 /* QualifiedName */ && node.parent.right === node; + return node.parent.kind === 139 /* QualifiedName */ && node.parent.right === node; } function isRightSideOfPropertyAccess(node) { - return node && node.parent && node.parent.kind === 169 /* PropertyAccessExpression */ && node.parent.name === node; + return node && node.parent && node.parent.kind === 172 /* PropertyAccessExpression */ && node.parent.name === node; } function isCallExpressionTarget(node) { if (isRightSideOfPropertyAccess(node)) { node = node.parent; } - return node && node.parent && node.parent.kind === 171 /* CallExpression */ && node.parent.expression === node; + return node && node.parent && node.parent.kind === 174 /* CallExpression */ && node.parent.expression === node; } function isNewExpressionTarget(node) { if (isRightSideOfPropertyAccess(node)) { node = node.parent; } - return node && node.parent && node.parent.kind === 172 /* NewExpression */ && node.parent.expression === node; + return node && node.parent && node.parent.kind === 175 /* NewExpression */ && node.parent.expression === node; } function isNameOfModuleDeclaration(node) { - return node.parent.kind === 221 /* ModuleDeclaration */ && node.parent.name === node; + return node.parent.kind === 225 /* ModuleDeclaration */ && node.parent.name === node; } function isNameOfFunctionDeclaration(node) { return node.kind === 69 /* Identifier */ && ts.isFunctionLike(node.parent) && node.parent.name === node; } - /** Returns true if node is a name of an object literal property, e.g. "a" in x = { "a": 1 } */ - function isNameOfPropertyAssignment(node) { - return (node.kind === 69 /* Identifier */ || node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) && - (node.parent.kind === 248 /* PropertyAssignment */ || node.parent.kind === 249 /* ShorthandPropertyAssignment */) && node.parent.name === node; + function isObjectLiteralPropertyDeclaration(node) { + switch (node.kind) { + case 253 /* PropertyAssignment */: + case 254 /* ShorthandPropertyAssignment */: + case 147 /* MethodDeclaration */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + return true; + } + return false; + } + /** + * Returns the containing object literal property declaration given a possible name node, e.g. "a" in x = { "a": 1 } + */ + function getContainingObjectLiteralElement(node) { + switch (node.kind) { + case 9 /* StringLiteral */: + case 8 /* NumericLiteral */: + if (node.parent.kind === 140 /* ComputedPropertyName */) { + return isObjectLiteralPropertyDeclaration(node.parent.parent) ? node.parent.parent : undefined; + } + // intential fall through + case 69 /* Identifier */: + return isObjectLiteralPropertyDeclaration(node.parent) && node.parent.name === node ? node.parent : undefined; + } + return undefined; } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { if (node.kind === 9 /* StringLiteral */ || node.kind === 8 /* NumericLiteral */) { switch (node.parent.kind) { - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - case 248 /* PropertyAssignment */: - case 250 /* EnumMember */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 221 /* ModuleDeclaration */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + case 253 /* PropertyAssignment */: + case 255 /* EnumMember */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 225 /* ModuleDeclaration */: return node.parent.name === node; - case 170 /* ElementAccessExpression */: + case 173 /* ElementAccessExpression */: return node.parent.argumentExpression === node; + case 140 /* ComputedPropertyName */: + return true; } } return false; @@ -48751,7 +55071,7 @@ var ts; })(BreakContinueSearchType || (BreakContinueSearchType = {})); // A cache of completion entries for keywords, these do not change between sessions var keywordCompletions = []; - for (var i = 70 /* FirstKeyword */; i <= 135 /* LastKeyword */; i++) { + for (var i = 70 /* FirstKeyword */; i <= 138 /* LastKeyword */; i++) { keywordCompletions.push({ name: ts.tokenToString(i), kind: ScriptElementKind.keyword, @@ -48766,17 +55086,17 @@ var ts; return undefined; } switch (node.kind) { - case 251 /* SourceFile */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 217 /* ClassDeclaration */: - case 218 /* InterfaceDeclaration */: - case 220 /* EnumDeclaration */: - case 221 /* ModuleDeclaration */: + case 256 /* SourceFile */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 221 /* ClassDeclaration */: + case 222 /* InterfaceDeclaration */: + case 224 /* EnumDeclaration */: + case 225 /* ModuleDeclaration */: return node; } } @@ -48784,41 +55104,57 @@ var ts; ts.getContainerNode = getContainerNode; /* @internal */ function getNodeKind(node) { switch (node.kind) { - case 221 /* ModuleDeclaration */: return ScriptElementKind.moduleElement; - case 217 /* ClassDeclaration */: return ScriptElementKind.classElement; - case 218 /* InterfaceDeclaration */: return ScriptElementKind.interfaceElement; - case 219 /* TypeAliasDeclaration */: return ScriptElementKind.typeElement; - case 220 /* EnumDeclaration */: return ScriptElementKind.enumElement; - case 214 /* VariableDeclaration */: - return ts.isConst(node) - ? ScriptElementKind.constElement - : ts.isLet(node) - ? ScriptElementKind.letElement - : ScriptElementKind.variableElement; - case 216 /* FunctionDeclaration */: return ScriptElementKind.functionElement; - case 146 /* GetAccessor */: return ScriptElementKind.memberGetAccessorElement; - case 147 /* SetAccessor */: return ScriptElementKind.memberSetAccessorElement; - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: + case 256 /* SourceFile */: + return ts.isExternalModule(node) ? ScriptElementKind.moduleElement : ScriptElementKind.scriptElement; + case 225 /* ModuleDeclaration */: + return ScriptElementKind.moduleElement; + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: + return ScriptElementKind.classElement; + case 222 /* InterfaceDeclaration */: return ScriptElementKind.interfaceElement; + case 223 /* TypeAliasDeclaration */: return ScriptElementKind.typeElement; + case 224 /* EnumDeclaration */: return ScriptElementKind.enumElement; + case 218 /* VariableDeclaration */: + return getKindOfVariableDeclaration(node); + case 169 /* BindingElement */: + return getKindOfVariableDeclaration(ts.getRootDeclaration(node)); + case 180 /* ArrowFunction */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + return ScriptElementKind.functionElement; + case 149 /* GetAccessor */: return ScriptElementKind.memberGetAccessorElement; + case 150 /* SetAccessor */: return ScriptElementKind.memberSetAccessorElement; + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: return ScriptElementKind.memberFunctionElement; - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: return ScriptElementKind.memberVariableElement; - case 150 /* IndexSignature */: return ScriptElementKind.indexSignatureElement; - case 149 /* ConstructSignature */: return ScriptElementKind.constructSignatureElement; - case 148 /* CallSignature */: return ScriptElementKind.callSignatureElement; - case 145 /* Constructor */: return ScriptElementKind.constructorImplementationElement; - case 138 /* TypeParameter */: return ScriptElementKind.typeParameterElement; - case 250 /* EnumMember */: return ScriptElementKind.variableElement; - case 139 /* Parameter */: return (node.flags & 56 /* AccessibilityModifier */) ? ScriptElementKind.memberVariableElement : ScriptElementKind.parameterElement; - case 224 /* ImportEqualsDeclaration */: - case 229 /* ImportSpecifier */: - case 226 /* ImportClause */: - case 233 /* ExportSpecifier */: - case 227 /* NamespaceImport */: + case 153 /* IndexSignature */: return ScriptElementKind.indexSignatureElement; + case 152 /* ConstructSignature */: return ScriptElementKind.constructSignatureElement; + case 151 /* CallSignature */: return ScriptElementKind.callSignatureElement; + case 148 /* Constructor */: return ScriptElementKind.constructorImplementationElement; + case 141 /* TypeParameter */: return ScriptElementKind.typeParameterElement; + case 255 /* EnumMember */: return ScriptElementKind.enumMemberElement; + case 142 /* Parameter */: return (node.flags & 92 /* ParameterPropertyModifier */) ? ScriptElementKind.memberVariableElement : ScriptElementKind.parameterElement; + case 229 /* ImportEqualsDeclaration */: + case 234 /* ImportSpecifier */: + case 231 /* ImportClause */: + case 238 /* ExportSpecifier */: + case 232 /* NamespaceImport */: return ScriptElementKind.alias; + case 279 /* JSDocTypedefTag */: + return ScriptElementKind.typeElement; + default: + return ScriptElementKind.unknown; + } + function getKindOfVariableDeclaration(v) { + return ts.isConst(v) + ? ScriptElementKind.constElement + : ts.isLet(v) + ? ScriptElementKind.letElement + : ScriptElementKind.variableElement; } - return ScriptElementKind.unknown; } ts.getNodeKind = getNodeKind; var CancellationTokenObject = (function () { @@ -48893,16 +55229,20 @@ var ts; // incremental parsing. var oldSettings = program && program.getCompilerOptions(); var newSettings = hostCache.compilationSettings(); - var changesInCompilationSettingsAffectSyntax = oldSettings && + var shouldCreateNewSourceFiles = oldSettings && (oldSettings.target !== newSettings.target || oldSettings.module !== newSettings.module || + oldSettings.moduleResolution !== newSettings.moduleResolution || oldSettings.noResolve !== newSettings.noResolve || oldSettings.jsx !== newSettings.jsx || oldSettings.allowJs !== newSettings.allowJs || - oldSettings.disableSizeLimit !== oldSettings.disableSizeLimit); + oldSettings.disableSizeLimit !== oldSettings.disableSizeLimit || + oldSettings.baseUrl !== newSettings.baseUrl || + !ts.equalOwnProperties(oldSettings.paths, newSettings.paths)); // Now create a new compiler var compilerHost = { getSourceFile: getOrCreateSourceFile, + getSourceFileByPath: getOrCreateSourceFileByPath, getCancellationToken: function () { return cancellationToken; }, getCanonicalFileName: getCanonicalFileName, useCaseSensitiveFileNames: function () { return useCaseSensitivefileNames; }, @@ -48912,7 +55252,6 @@ var ts; getCurrentDirectory: function () { return currentDirectory; }, fileExists: function (fileName) { // stub missing host functionality - ts.Debug.assert(!host.resolveModuleNames); return hostCache.getOrCreateEntry(fileName) !== undefined; }, readFile: function (fileName) { @@ -48921,22 +55260,34 @@ var ts; return entry && entry.scriptSnapshot.getText(0, entry.scriptSnapshot.getLength()); }, directoryExists: function (directoryName) { - ts.Debug.assert(!host.resolveModuleNames); return ts.directoryProbablyExists(directoryName, host); + }, + getDirectories: function (path) { + return host.getDirectories ? host.getDirectories(path) : []; } }; + if (host.trace) { + compilerHost.trace = function (message) { return host.trace(message); }; + } if (host.resolveModuleNames) { compilerHost.resolveModuleNames = function (moduleNames, containingFile) { return host.resolveModuleNames(moduleNames, containingFile); }; } + if (host.resolveTypeReferenceDirectives) { + compilerHost.resolveTypeReferenceDirectives = function (typeReferenceDirectiveNames, containingFile) { + return host.resolveTypeReferenceDirectives(typeReferenceDirectiveNames, containingFile); + }; + } + var documentRegistryBucketKey = documentRegistry.getKeyForCompilationSettings(newSettings); var newProgram = ts.createProgram(hostCache.getRootFileNames(), newSettings, compilerHost, program); // Release any files we have acquired in the old program but are // not part of the new program. if (program) { var oldSourceFiles = program.getSourceFiles(); + var oldSettingsKey = documentRegistry.getKeyForCompilationSettings(oldSettings); for (var _i = 0, oldSourceFiles_1 = oldSourceFiles; _i < oldSourceFiles_1.length; _i++) { var oldSourceFile = oldSourceFiles_1[_i]; - if (!newProgram.getSourceFile(oldSourceFile.fileName) || changesInCompilationSettingsAffectSyntax) { - documentRegistry.releaseDocument(oldSourceFile.fileName, oldSettings); + if (!newProgram.getSourceFile(oldSourceFile.fileName) || shouldCreateNewSourceFiles) { + documentRegistry.releaseDocumentWithKey(oldSourceFile.path, oldSettingsKey); } } } @@ -48949,24 +55300,27 @@ var ts; program.getTypeChecker(); return; function getOrCreateSourceFile(fileName) { + return getOrCreateSourceFileByPath(fileName, ts.toPath(fileName, currentDirectory, getCanonicalFileName)); + } + function getOrCreateSourceFileByPath(fileName, path) { ts.Debug.assert(hostCache !== undefined); // The program is asking for this file, check first if the host can locate it. // If the host can not locate the file, then it does not exist. return undefined // to the program to allow reporting of errors for missing files. - var hostFileInformation = hostCache.getOrCreateEntry(fileName); + var hostFileInformation = hostCache.getOrCreateEntryByPath(fileName, path); if (!hostFileInformation) { return undefined; } // Check if the language version has changed since we last created a program; if they are the same, - // it is safe to reuse the souceFiles; if not, then the shape of the AST can change, and the oldSourceFile + // it is safe to reuse the sourceFiles; if not, then the shape of the AST can change, and the oldSourceFile // can not be reused. we have to dump all syntax trees and create new ones. - if (!changesInCompilationSettingsAffectSyntax) { + if (!shouldCreateNewSourceFiles) { // Check if the old program had this file already - var oldSourceFile = program && program.getSourceFile(fileName); + var oldSourceFile = program && program.getSourceFileByPath(path); if (oldSourceFile) { // We already had a source file for this file name. Go to the registry to // ensure that we get the right up to date version of it. We need this to - // address the following 'race'. Specifically, say we have the following: + // address the following race-condition. Specifically, say we have the following: // // LS1 // \ @@ -48988,12 +55342,12 @@ var ts; // We do not support the scenario where a host can modify a registered // file's script kind, i.e. in one project some file is treated as ".ts" // and in another as ".js" - ts.Debug.assert(hostFileInformation.scriptKind === oldSourceFile.scriptKind, "Registered script kind (" + oldSourceFile.scriptKind + ") should match new script kind (" + hostFileInformation.scriptKind + ") for file: " + fileName); - return documentRegistry.updateDocument(fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version, hostFileInformation.scriptKind); + ts.Debug.assert(hostFileInformation.scriptKind === oldSourceFile.scriptKind, "Registered script kind (" + oldSourceFile.scriptKind + ") should match new script kind (" + hostFileInformation.scriptKind + ") for file: " + path); + return documentRegistry.updateDocumentWithKey(fileName, path, newSettings, documentRegistryBucketKey, hostFileInformation.scriptSnapshot, hostFileInformation.version, hostFileInformation.scriptKind); } } // Could not find this file in the old program, create a new SourceFile for it. - return documentRegistry.acquireDocument(fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version, hostFileInformation.scriptKind); + return documentRegistry.acquireDocumentWithKey(fileName, path, newSettings, documentRegistryBucketKey, hostFileInformation.scriptSnapshot, hostFileInformation.version, hostFileInformation.scriptKind); } function sourceFileUpToDate(sourceFile) { if (!sourceFile) { @@ -49043,7 +55397,7 @@ var ts; return program.getSyntacticDiagnostics(getValidSourceFile(fileName), cancellationToken); } /** - * getSemanticDiagnostiscs return array of Diagnostics. If '-d' is not enabled, only report semantic errors + * getSemanticDiagnostics return array of Diagnostics. If '-d' is not enabled, only report semantic errors * If '-d' enabled, report both semantic and emitter errors */ function getSemanticDiagnostics(fileName) { @@ -49073,7 +55427,7 @@ var ts; if (displayName) { var firstCharCode = displayName.charCodeAt(0); // First check of the displayName is not external module; if it is an external module, it is not valid entry - if ((symbol.flags & 1536 /* Namespace */) && (firstCharCode === 39 /* singleQuote */ || firstCharCode === 34 /* doubleQuote */)) { + if ((symbol.flags & 1920 /* Namespace */) && (firstCharCode === 39 /* singleQuote */ || firstCharCode === 34 /* doubleQuote */)) { // If the symbol is external module, don't show it in the completion list // (i.e declare module "http" { const x; } | // <= request completion here, "http" should not be there) return undefined; @@ -49109,13 +55463,13 @@ var ts; var sourceFile = getValidSourceFile(fileName); var isJavaScriptFile = ts.isSourceFileJavaScript(sourceFile); var isJsDocTagName = false; - var start = new Date().getTime(); + var start = ts.timestamp(); var currentToken = ts.getTokenAtPosition(sourceFile, position); - log("getCompletionData: Get current token: " + (new Date().getTime() - start)); - start = new Date().getTime(); + log("getCompletionData: Get current token: " + (ts.timestamp() - start)); + start = ts.timestamp(); // Completion not allowed inside comments, bail out if this is the case var insideComment = isInsideComment(sourceFile, currentToken, position); - log("getCompletionData: Is inside comment: " + (new Date().getTime() - start)); + log("getCompletionData: Is inside comment: " + (ts.timestamp() - start)); if (insideComment) { // The current position is next to the '@' sign, when no tag name being provided yet. // Provide a full list of tag names @@ -49132,9 +55486,9 @@ var ts; isJsDocTagName = true; } switch (tag.kind) { - case 272 /* JSDocTypeTag */: - case 270 /* JSDocParameterTag */: - case 271 /* JSDocReturnTag */: + case 277 /* JSDocTypeTag */: + case 275 /* JSDocParameterTag */: + case 276 /* JSDocReturnTag */: var tagWithExpression = tag; if (tagWithExpression.typeExpression) { insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end; @@ -49152,18 +55506,18 @@ var ts; return undefined; } } - start = new Date().getTime(); + start = ts.timestamp(); var previousToken = ts.findPrecedingToken(position, sourceFile); - log("getCompletionData: Get previous token 1: " + (new Date().getTime() - start)); + log("getCompletionData: Get previous token 1: " + (ts.timestamp() - start)); // The decision to provide completion depends on the contextToken, which is determined through the previousToken. // Note: 'previousToken' (and thus 'contextToken') can be undefined if we are the beginning of the file var contextToken = previousToken; // Check if the caret is at the end of an identifier; this is a partial identifier that we want to complete: e.g. a.toS| // Skip this partial identifier and adjust the contextToken to the token that precedes it. if (contextToken && position <= contextToken.end && ts.isWord(contextToken.kind)) { - var start_6 = new Date().getTime(); + var start_2 = ts.timestamp(); contextToken = ts.findPrecedingToken(contextToken.getFullStart(), sourceFile); - log("getCompletionData: Get previous token 2: " + (new Date().getTime() - start_6)); + log("getCompletionData: Get previous token 2: " + (ts.timestamp() - start_2)); } // Find the node where completion is requested on. // Also determine whether we are trying to complete with members of that node @@ -49179,13 +55533,13 @@ var ts; log("Returning an empty list because completion was requested in an invalid position."); return undefined; } - var parent_11 = contextToken.parent, kind = contextToken.kind; + var parent_18 = contextToken.parent, kind = contextToken.kind; if (kind === 21 /* DotToken */) { - if (parent_11.kind === 169 /* PropertyAccessExpression */) { + if (parent_18.kind === 172 /* PropertyAccessExpression */) { node = contextToken.parent.expression; isRightOfDot = true; } - else if (parent_11.kind === 136 /* QualifiedName */) { + else if (parent_18.kind === 139 /* QualifiedName */) { node = contextToken.parent.left; isRightOfDot = true; } @@ -49200,13 +55554,13 @@ var ts; isRightOfOpenTag = true; location = contextToken; } - else if (kind === 39 /* SlashToken */ && contextToken.parent.kind === 240 /* JsxClosingElement */) { + else if (kind === 39 /* SlashToken */ && contextToken.parent.kind === 245 /* JsxClosingElement */) { isStartingCloseTag = true; location = contextToken; } } } - var semanticStart = new Date().getTime(); + var semanticStart = ts.timestamp(); var isMemberCompletion; var isNewIdentifierLocation; var symbols = []; @@ -49216,7 +55570,7 @@ var ts; else if (isRightOfOpenTag) { var tagSymbols = typeChecker.getJsxIntrinsicTagNames(); if (tryGetGlobalSymbols()) { - symbols = tagSymbols.concat(symbols.filter(function (s) { return !!(s.flags & 107455 /* Value */); })); + symbols = tagSymbols.concat(symbols.filter(function (s) { return !!(s.flags & (107455 /* Value */ | 8388608 /* Alias */)); })); } else { symbols = tagSymbols; @@ -49241,13 +55595,13 @@ var ts; return undefined; } } - log("getCompletionData: Semantic work: " + (new Date().getTime() - semanticStart)); + log("getCompletionData: Semantic work: " + (ts.timestamp() - semanticStart)); return { symbols: symbols, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: (isRightOfDot || isRightOfOpenTag), isJsDocTagName: isJsDocTagName }; function getTypeScriptMemberSymbols() { // Right of dot member completion list isMemberCompletion = true; isNewIdentifierLocation = false; - if (node.kind === 69 /* Identifier */ || node.kind === 136 /* QualifiedName */ || node.kind === 169 /* PropertyAccessExpression */) { + if (node.kind === 69 /* Identifier */ || node.kind === 139 /* QualifiedName */ || node.kind === 172 /* PropertyAccessExpression */) { var symbol = typeChecker.getSymbolAtLocation(node); // This is an alias, follow what it aliases if (symbol && symbol.flags & 8388608 /* Alias */) { @@ -49275,7 +55629,7 @@ var ts; symbols.push(symbol); } } - if (isJavaScriptFile && type.flags & 16384 /* Union */) { + if (isJavaScriptFile && type.flags & 524288 /* Union */) { // In javascript files, for union types, we don't just get the members that // the individual types have in common, we also include all the members that // each individual type has. This is because we're going to add all identifiers @@ -49303,7 +55657,7 @@ var ts; } if (jsxContainer = tryGetContainingJsxElement(contextToken)) { var attrsType = void 0; - if ((jsxContainer.kind === 237 /* JsxSelfClosingElement */) || (jsxContainer.kind === 238 /* JsxOpeningElement */)) { + if ((jsxContainer.kind === 242 /* JsxSelfClosingElement */) || (jsxContainer.kind === 243 /* JsxOpeningElement */)) { // Cursor is inside a JSX self-closing element or opening element attrsType = typeChecker.getJsxElementAttributesType(jsxContainer); if (attrsType) { @@ -49350,7 +55704,7 @@ var ts; position; var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile; /// TODO filter meaning based on the current context - var symbolMeanings = 793056 /* Type */ | 107455 /* Value */ | 1536 /* Namespace */ | 8388608 /* Alias */; + var symbolMeanings = 793064 /* Type */ | 107455 /* Value */ | 1920 /* Namespace */ | 8388608 /* Alias */; symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings); return true; } @@ -49366,24 +55720,24 @@ var ts; return scope; } function isCompletionListBlocker(contextToken) { - var start = new Date().getTime(); + var start = ts.timestamp(); var result = isInStringOrRegularExpressionOrTemplateLiteral(contextToken) || isSolelyIdentifierDefinitionLocation(contextToken) || isDotOfNumericLiteral(contextToken) || isInJsxText(contextToken); - log("getCompletionsAtPosition: isCompletionListBlocker: " + (new Date().getTime() - start)); + log("getCompletionsAtPosition: isCompletionListBlocker: " + (ts.timestamp() - start)); return result; } function isInJsxText(contextToken) { - if (contextToken.kind === 239 /* JsxText */) { + if (contextToken.kind === 244 /* JsxText */) { return true; } if (contextToken.kind === 27 /* GreaterThanToken */ && contextToken.parent) { - if (contextToken.parent.kind === 238 /* JsxOpeningElement */) { + if (contextToken.parent.kind === 243 /* JsxOpeningElement */) { return true; } - if (contextToken.parent.kind === 240 /* JsxClosingElement */ || contextToken.parent.kind === 237 /* JsxSelfClosingElement */) { - return contextToken.parent.parent && contextToken.parent.parent.kind === 236 /* JsxElement */; + if (contextToken.parent.kind === 245 /* JsxClosingElement */ || contextToken.parent.kind === 242 /* JsxSelfClosingElement */) { + return contextToken.parent.parent && contextToken.parent.parent.kind === 241 /* JsxElement */; } } return false; @@ -49393,40 +55747,40 @@ var ts; var containingNodeKind = previousToken.parent.kind; switch (previousToken.kind) { case 24 /* CommaToken */: - return containingNodeKind === 171 /* CallExpression */ // func( a, | - || containingNodeKind === 145 /* Constructor */ // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */ - || containingNodeKind === 172 /* NewExpression */ // new C(a, | - || containingNodeKind === 167 /* ArrayLiteralExpression */ // [a, | - || containingNodeKind === 184 /* BinaryExpression */ // const x = (a, | - || containingNodeKind === 153 /* FunctionType */; // var x: (s: string, list| + return containingNodeKind === 174 /* CallExpression */ // func( a, | + || containingNodeKind === 148 /* Constructor */ // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */ + || containingNodeKind === 175 /* NewExpression */ // new C(a, | + || containingNodeKind === 170 /* ArrayLiteralExpression */ // [a, | + || containingNodeKind === 187 /* BinaryExpression */ // const x = (a, | + || containingNodeKind === 156 /* FunctionType */; // var x: (s: string, list| case 17 /* OpenParenToken */: - return containingNodeKind === 171 /* CallExpression */ // func( | - || containingNodeKind === 145 /* Constructor */ // constructor( | - || containingNodeKind === 172 /* NewExpression */ // new C(a| - || containingNodeKind === 175 /* ParenthesizedExpression */ // const x = (a| - || containingNodeKind === 161 /* ParenthesizedType */; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */ + return containingNodeKind === 174 /* CallExpression */ // func( | + || containingNodeKind === 148 /* Constructor */ // constructor( | + || containingNodeKind === 175 /* NewExpression */ // new C(a| + || containingNodeKind === 178 /* ParenthesizedExpression */ // const x = (a| + || containingNodeKind === 164 /* ParenthesizedType */; // function F(pred: (a| /* this can become an arrow function, where 'a' is the argument */ case 19 /* OpenBracketToken */: - return containingNodeKind === 167 /* ArrayLiteralExpression */ // [ | - || containingNodeKind === 150 /* IndexSignature */ // [ | : string ] - || containingNodeKind === 137 /* ComputedPropertyName */; // [ | /* this can become an index signature */ + return containingNodeKind === 170 /* ArrayLiteralExpression */ // [ | + || containingNodeKind === 153 /* IndexSignature */ // [ | : string ] + || containingNodeKind === 140 /* ComputedPropertyName */; // [ | /* this can become an index signature */ case 125 /* ModuleKeyword */: // module | case 126 /* NamespaceKeyword */: return true; case 21 /* DotToken */: - return containingNodeKind === 221 /* ModuleDeclaration */; // module A.| + return containingNodeKind === 225 /* ModuleDeclaration */; // module A.| case 15 /* OpenBraceToken */: - return containingNodeKind === 217 /* ClassDeclaration */; // class A{ | + return containingNodeKind === 221 /* ClassDeclaration */; // class A{ | case 56 /* EqualsToken */: - return containingNodeKind === 214 /* VariableDeclaration */ // const x = a| - || containingNodeKind === 184 /* BinaryExpression */; // x = a| + return containingNodeKind === 218 /* VariableDeclaration */ // const x = a| + || containingNodeKind === 187 /* BinaryExpression */; // x = a| case 12 /* TemplateHead */: - return containingNodeKind === 186 /* TemplateExpression */; // `aa ${| + return containingNodeKind === 189 /* TemplateExpression */; // `aa ${| case 13 /* TemplateMiddle */: - return containingNodeKind === 193 /* TemplateSpan */; // `aa ${10} dd ${| + return containingNodeKind === 197 /* TemplateSpan */; // `aa ${10} dd ${| case 112 /* PublicKeyword */: case 110 /* PrivateKeyword */: case 111 /* ProtectedKeyword */: - return containingNodeKind === 142 /* PropertyDeclaration */; // class A{ public | + return containingNodeKind === 145 /* PropertyDeclaration */; // class A{ public | } // Previous token may have been a keyword that was converted to an identifier. switch (previousToken.getText()) { @@ -49440,16 +55794,15 @@ var ts; } function isInStringOrRegularExpressionOrTemplateLiteral(contextToken) { if (contextToken.kind === 9 /* StringLiteral */ - || contextToken.kind === 163 /* StringLiteralType */ || contextToken.kind === 10 /* RegularExpressionLiteral */ || ts.isTemplateLiteralKind(contextToken.kind)) { - var start_7 = contextToken.getStart(); + var start_3 = contextToken.getStart(); var end = contextToken.getEnd(); // To be "in" one of these literals, the position has to be: // 1. entirely within the token text. // 2. at the end position of an unterminated token. // 3. at the end of a regular expression (due to trailing flags like '/foo/g'). - if (start_7 < position && position < end) { + if (start_3 < position && position < end) { return true; } if (position === end) { @@ -49470,14 +55823,17 @@ var ts; isMemberCompletion = true; var typeForObject; var existingMembers; - if (objectLikeContainer.kind === 168 /* ObjectLiteralExpression */) { + if (objectLikeContainer.kind === 171 /* ObjectLiteralExpression */) { // We are completing on contextual types, but may also include properties // other than those within the declared type. isNewIdentifierLocation = true; + // If the object literal is being assigned to something of type 'null | { hello: string }', + // it clearly isn't trying to satisfy the 'null' type. So we grab the non-nullable type if possible. typeForObject = typeChecker.getContextualType(objectLikeContainer); + typeForObject = typeForObject && typeForObject.getNonNullableType(); existingMembers = objectLikeContainer.properties; } - else if (objectLikeContainer.kind === 164 /* ObjectBindingPattern */) { + else if (objectLikeContainer.kind === 167 /* ObjectBindingPattern */) { // We are *only* completing on properties from the type being destructured. isNewIdentifierLocation = false; var rootDeclaration = ts.getRootDeclaration(objectLikeContainer.parent); @@ -49485,7 +55841,18 @@ var ts; // We don't want to complete using the type acquired by the shape // of the binding pattern; we are only interested in types acquired // through type declaration or inference. - if (rootDeclaration.initializer || rootDeclaration.type) { + // Also proceed if rootDeclaration is a parameter and if its containing function expression/arrow function is contextually typed - + // type of parameter will flow in from the contextual type of the function + var canGetType = !!(rootDeclaration.initializer || rootDeclaration.type); + if (!canGetType && rootDeclaration.kind === 142 /* Parameter */) { + if (ts.isExpression(rootDeclaration.parent)) { + canGetType = !!typeChecker.getContextualType(rootDeclaration.parent); + } + else if (rootDeclaration.parent.kind === 147 /* MethodDeclaration */ || rootDeclaration.parent.kind === 150 /* SetAccessor */) { + canGetType = ts.isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent); + } + } + if (canGetType) { typeForObject = typeChecker.getTypeAtLocation(objectLikeContainer); existingMembers = objectLikeContainer.elements; } @@ -49523,9 +55890,9 @@ var ts; * @returns true if 'symbols' was successfully populated; false otherwise. */ function tryGetImportOrExportClauseCompletionSymbols(namedImportsOrExports) { - var declarationKind = namedImportsOrExports.kind === 228 /* NamedImports */ ? - 225 /* ImportDeclaration */ : - 231 /* ExportDeclaration */; + var declarationKind = namedImportsOrExports.kind === 233 /* NamedImports */ ? + 230 /* ImportDeclaration */ : + 236 /* ExportDeclaration */; var importOrExportDeclaration = ts.getAncestor(namedImportsOrExports, declarationKind); var moduleSpecifier = importOrExportDeclaration.moduleSpecifier; if (!moduleSpecifier) { @@ -49550,9 +55917,9 @@ var ts; switch (contextToken.kind) { case 15 /* OpenBraceToken */: // const x = { | case 24 /* CommaToken */: - var parent_12 = contextToken.parent; - if (parent_12 && (parent_12.kind === 168 /* ObjectLiteralExpression */ || parent_12.kind === 164 /* ObjectBindingPattern */)) { - return parent_12; + var parent_19 = contextToken.parent; + if (parent_19 && (parent_19.kind === 171 /* ObjectLiteralExpression */ || parent_19.kind === 167 /* ObjectBindingPattern */)) { + return parent_19; } break; } @@ -49569,8 +55936,8 @@ var ts; case 15 /* OpenBraceToken */: // import { | case 24 /* CommaToken */: switch (contextToken.parent.kind) { - case 228 /* NamedImports */: - case 232 /* NamedExports */: + case 233 /* NamedImports */: + case 237 /* NamedExports */: return contextToken.parent; } } @@ -49579,37 +55946,37 @@ var ts; } function tryGetContainingJsxElement(contextToken) { if (contextToken) { - var parent_13 = contextToken.parent; + var parent_20 = contextToken.parent; switch (contextToken.kind) { case 26 /* LessThanSlashToken */: case 39 /* SlashToken */: case 69 /* Identifier */: - case 241 /* JsxAttribute */: - case 242 /* JsxSpreadAttribute */: - if (parent_13 && (parent_13.kind === 237 /* JsxSelfClosingElement */ || parent_13.kind === 238 /* JsxOpeningElement */)) { - return parent_13; + case 246 /* JsxAttribute */: + case 247 /* JsxSpreadAttribute */: + if (parent_20 && (parent_20.kind === 242 /* JsxSelfClosingElement */ || parent_20.kind === 243 /* JsxOpeningElement */)) { + return parent_20; } - else if (parent_13.kind === 241 /* JsxAttribute */) { - return parent_13.parent; + else if (parent_20.kind === 246 /* JsxAttribute */) { + return parent_20.parent; } break; // The context token is the closing } or " of an attribute, which means // its parent is a JsxExpression, whose parent is a JsxAttribute, // whose parent is a JsxOpeningLikeElement case 9 /* StringLiteral */: - if (parent_13 && ((parent_13.kind === 241 /* JsxAttribute */) || (parent_13.kind === 242 /* JsxSpreadAttribute */))) { - return parent_13.parent; + if (parent_20 && ((parent_20.kind === 246 /* JsxAttribute */) || (parent_20.kind === 247 /* JsxSpreadAttribute */))) { + return parent_20.parent; } break; case 16 /* CloseBraceToken */: - if (parent_13 && - parent_13.kind === 243 /* JsxExpression */ && - parent_13.parent && - (parent_13.parent.kind === 241 /* JsxAttribute */)) { - return parent_13.parent.parent; + if (parent_20 && + parent_20.kind === 248 /* JsxExpression */ && + parent_20.parent && + (parent_20.parent.kind === 246 /* JsxAttribute */)) { + return parent_20.parent.parent; } - if (parent_13 && parent_13.kind === 242 /* JsxSpreadAttribute */) { - return parent_13.parent; + if (parent_20 && parent_20.kind === 247 /* JsxSpreadAttribute */) { + return parent_20.parent; } break; } @@ -49618,16 +55985,16 @@ var ts; } function isFunction(kind) { switch (kind) { - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: - case 216 /* FunctionDeclaration */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 148 /* CallSignature */: - case 149 /* ConstructSignature */: - case 150 /* IndexSignature */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: + case 220 /* FunctionDeclaration */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 151 /* CallSignature */: + case 152 /* ConstructSignature */: + case 153 /* IndexSignature */: return true; } return false; @@ -49639,66 +56006,66 @@ var ts; var containingNodeKind = contextToken.parent.kind; switch (contextToken.kind) { case 24 /* CommaToken */: - return containingNodeKind === 214 /* VariableDeclaration */ || - containingNodeKind === 215 /* VariableDeclarationList */ || - containingNodeKind === 196 /* VariableStatement */ || - containingNodeKind === 220 /* EnumDeclaration */ || + return containingNodeKind === 218 /* VariableDeclaration */ || + containingNodeKind === 219 /* VariableDeclarationList */ || + containingNodeKind === 200 /* VariableStatement */ || + containingNodeKind === 224 /* EnumDeclaration */ || isFunction(containingNodeKind) || - containingNodeKind === 217 /* ClassDeclaration */ || - containingNodeKind === 189 /* ClassExpression */ || - containingNodeKind === 218 /* InterfaceDeclaration */ || - containingNodeKind === 165 /* ArrayBindingPattern */ || - containingNodeKind === 219 /* TypeAliasDeclaration */; // type Map, K, | + containingNodeKind === 221 /* ClassDeclaration */ || + containingNodeKind === 192 /* ClassExpression */ || + containingNodeKind === 222 /* InterfaceDeclaration */ || + containingNodeKind === 168 /* ArrayBindingPattern */ || + containingNodeKind === 223 /* TypeAliasDeclaration */; // type Map, K, | case 21 /* DotToken */: - return containingNodeKind === 165 /* ArrayBindingPattern */; // var [.| + return containingNodeKind === 168 /* ArrayBindingPattern */; // var [.| case 54 /* ColonToken */: - return containingNodeKind === 166 /* BindingElement */; // var {x :html| + return containingNodeKind === 169 /* BindingElement */; // var {x :html| case 19 /* OpenBracketToken */: - return containingNodeKind === 165 /* ArrayBindingPattern */; // var [x| + return containingNodeKind === 168 /* ArrayBindingPattern */; // var [x| case 17 /* OpenParenToken */: - return containingNodeKind === 247 /* CatchClause */ || + return containingNodeKind === 252 /* CatchClause */ || isFunction(containingNodeKind); case 15 /* OpenBraceToken */: - return containingNodeKind === 220 /* EnumDeclaration */ || - containingNodeKind === 218 /* InterfaceDeclaration */ || - containingNodeKind === 156 /* TypeLiteral */; // const x : { | + return containingNodeKind === 224 /* EnumDeclaration */ || + containingNodeKind === 222 /* InterfaceDeclaration */ || + containingNodeKind === 159 /* TypeLiteral */; // const x : { | case 23 /* SemicolonToken */: - return containingNodeKind === 141 /* PropertySignature */ && + return containingNodeKind === 144 /* PropertySignature */ && contextToken.parent && contextToken.parent.parent && - (contextToken.parent.parent.kind === 218 /* InterfaceDeclaration */ || - contextToken.parent.parent.kind === 156 /* TypeLiteral */); // const x : { a; | + (contextToken.parent.parent.kind === 222 /* InterfaceDeclaration */ || + contextToken.parent.parent.kind === 159 /* TypeLiteral */); // const x : { a; | case 25 /* LessThanToken */: - return containingNodeKind === 217 /* ClassDeclaration */ || - containingNodeKind === 189 /* ClassExpression */ || - containingNodeKind === 218 /* InterfaceDeclaration */ || - containingNodeKind === 219 /* TypeAliasDeclaration */ || + return containingNodeKind === 221 /* ClassDeclaration */ || + containingNodeKind === 192 /* ClassExpression */ || + containingNodeKind === 222 /* InterfaceDeclaration */ || + containingNodeKind === 223 /* TypeAliasDeclaration */ || isFunction(containingNodeKind); case 113 /* StaticKeyword */: - return containingNodeKind === 142 /* PropertyDeclaration */; + return containingNodeKind === 145 /* PropertyDeclaration */; case 22 /* DotDotDotToken */: - return containingNodeKind === 139 /* Parameter */ || + return containingNodeKind === 142 /* Parameter */ || (contextToken.parent && contextToken.parent.parent && - contextToken.parent.parent.kind === 165 /* ArrayBindingPattern */); // var [...z| + contextToken.parent.parent.kind === 168 /* ArrayBindingPattern */); // var [...z| case 112 /* PublicKeyword */: case 110 /* PrivateKeyword */: case 111 /* ProtectedKeyword */: - return containingNodeKind === 139 /* Parameter */; + return containingNodeKind === 142 /* Parameter */; case 116 /* AsKeyword */: - return containingNodeKind === 229 /* ImportSpecifier */ || - containingNodeKind === 233 /* ExportSpecifier */ || - containingNodeKind === 227 /* NamespaceImport */; + return containingNodeKind === 234 /* ImportSpecifier */ || + containingNodeKind === 238 /* ExportSpecifier */ || + containingNodeKind === 232 /* NamespaceImport */; case 73 /* ClassKeyword */: case 81 /* EnumKeyword */: case 107 /* InterfaceKeyword */: case 87 /* FunctionKeyword */: case 102 /* VarKeyword */: case 123 /* GetKeyword */: - case 129 /* SetKeyword */: + case 131 /* SetKeyword */: case 89 /* ImportKeyword */: case 108 /* LetKeyword */: case 74 /* ConstKeyword */: case 114 /* YieldKeyword */: - case 132 /* TypeKeyword */: + case 134 /* TypeKeyword */: return true; } // Previous token may have been a keyword that was converted to an identifier. @@ -49739,20 +56106,20 @@ var ts; * do not occur at the current position and have not otherwise been typed. */ function filterNamedImportOrExportCompletionItems(exportsOfModule, namedImportsOrExports) { - var exisingImportsOrExports = {}; + var existingImportsOrExports = ts.createMap(); for (var _i = 0, namedImportsOrExports_1 = namedImportsOrExports; _i < namedImportsOrExports_1.length; _i++) { var element = namedImportsOrExports_1[_i]; // If this is the current item we are editing right now, do not filter it out if (element.getStart() <= position && position <= element.getEnd()) { continue; } - var name_37 = element.propertyName || element.name; - exisingImportsOrExports[name_37.text] = true; + var name_41 = element.propertyName || element.name; + existingImportsOrExports[name_41.text] = true; } - if (ts.isEmpty(exisingImportsOrExports)) { - return exportsOfModule; + if (!ts.someProperties(existingImportsOrExports)) { + return ts.filter(exportsOfModule, function (e) { return e.name !== "default"; }); } - return ts.filter(exportsOfModule, function (e) { return !ts.lookUp(exisingImportsOrExports, e.name); }); + return ts.filter(exportsOfModule, function (e) { return e.name !== "default" && !existingImportsOrExports[e.name]; }); } /** * Filters out completion suggestions for named imports or exports. @@ -49764,14 +56131,14 @@ var ts; if (!existingMembers || existingMembers.length === 0) { return contextualMemberSymbols; } - var existingMemberNames = {}; + var existingMemberNames = ts.createMap(); for (var _i = 0, existingMembers_1 = existingMembers; _i < existingMembers_1.length; _i++) { var m = existingMembers_1[_i]; // Ignore omitted expressions for missing members - if (m.kind !== 248 /* PropertyAssignment */ && - m.kind !== 249 /* ShorthandPropertyAssignment */ && - m.kind !== 166 /* BindingElement */ && - m.kind !== 144 /* MethodDeclaration */) { + if (m.kind !== 253 /* PropertyAssignment */ && + m.kind !== 254 /* ShorthandPropertyAssignment */ && + m.kind !== 169 /* BindingElement */ && + m.kind !== 147 /* MethodDeclaration */) { continue; } // If this is the current item we are editing right now, do not filter it out @@ -49779,7 +56146,7 @@ var ts; continue; } var existingName = void 0; - if (m.kind === 166 /* BindingElement */ && m.propertyName) { + if (m.kind === 169 /* BindingElement */ && m.propertyName) { // include only identifiers in completion list if (m.propertyName.kind === 69 /* Identifier */) { existingName = m.propertyName.text; @@ -49793,7 +56160,7 @@ var ts; } existingMemberNames[existingName] = true; } - return ts.filter(contextualMemberSymbols, function (m) { return !ts.lookUp(existingMemberNames, m.name); }); + return ts.filter(contextualMemberSymbols, function (m) { return !existingMemberNames[m.name]; }); } /** * Filters out completion suggestions from 'symbols' according to existing JSX attributes. @@ -49802,22 +56169,26 @@ var ts; * do not occur at the current position and have not otherwise been typed. */ function filterJsxAttributes(symbols, attributes) { - var seenNames = {}; + var seenNames = ts.createMap(); for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) { var attr = attributes_1[_i]; // If this is the current item we are editing right now, do not filter it out if (attr.getStart() <= position && position <= attr.getEnd()) { continue; } - if (attr.kind === 241 /* JsxAttribute */) { + if (attr.kind === 246 /* JsxAttribute */) { seenNames[attr.name.text] = true; } } - return ts.filter(symbols, function (a) { return !ts.lookUp(seenNames, a.name); }); + return ts.filter(symbols, function (a) { return !seenNames[a.name]; }); } } function getCompletionsAtPosition(fileName, position) { synchronizeHostData(); + var sourceFile = getValidSourceFile(fileName); + if (ts.isInString(sourceFile, position)) { + return getStringLiteralCompletionEntries(sourceFile, position); + } var completionData = getCompletionData(fileName, position); if (!completionData) { return undefined; @@ -49827,16 +56198,15 @@ var ts; // If the current position is a jsDoc tag name, only tag names should be provided for completion return { isMemberCompletion: false, isNewIdentifierLocation: false, entries: getAllJsDocCompletionEntries() }; } - var sourceFile = getValidSourceFile(fileName); var entries = []; if (ts.isSourceFileJavaScript(sourceFile)) { - var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries); + var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ false); ts.addRange(entries, getJavaScriptCompletionEntries(sourceFile, location.pos, uniqueNames)); } else { if (!symbols || symbols.length === 0) { if (sourceFile.languageVariant === 1 /* JSX */ && - location.parent && location.parent.kind === 240 /* JsxClosingElement */) { + location.parent && location.parent.kind === 245 /* JsxClosingElement */) { // In the TypeScript JSX element, if such element is not defined. When users query for completion at closing tag, // instead of simply giving unknown value, the completion will return the tag-name of an associated opening-element. // For example: @@ -49853,25 +56223,25 @@ var ts; return undefined; } } - getCompletionEntriesFromSymbols(symbols, entries); + getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ true); } // Add keywords if this is not a member completion list if (!isMemberCompletion && !isJsDocTagName) { ts.addRange(entries, keywordCompletions); } - return { isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries }; + return { isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation || ts.isSourceFileJavaScript(sourceFile), entries: entries }; function getJavaScriptCompletionEntries(sourceFile, position, uniqueNames) { var entries = []; var target = program.getCompilerOptions().target; var nameTable = getNameTable(sourceFile); - for (var name_38 in nameTable) { + for (var name_42 in nameTable) { // Skip identifiers produced only from the current location - if (nameTable[name_38] === position) { + if (nameTable[name_42] === position) { continue; } - if (!uniqueNames[name_38]) { - uniqueNames[name_38] = name_38; - var displayName = getCompletionEntryDisplayName(name_38, target, /*performCharacterChecks*/ true); + if (!uniqueNames[name_42]) { + uniqueNames[name_42] = name_42; + var displayName = getCompletionEntryDisplayName(ts.unescapeIdentifier(name_42), target, /*performCharacterChecks*/ true); if (displayName) { var entry = { name: displayName, @@ -49895,11 +56265,11 @@ var ts; }; })); } - function createCompletionEntry(symbol, location) { + function createCompletionEntry(symbol, location, performCharacterChecks) { // Try to get a valid display name for this symbol, if we could not find one, then ignore it. // We would like to only show things that can be added after a dot, so for instance numeric properties can // not be accessed with a dot (a.1 <- invalid) - var displayName = getCompletionEntryDisplayNameForSymbol(symbol, program.getCompilerOptions().target, /*performCharacterChecks*/ true, location); + var displayName = getCompletionEntryDisplayNameForSymbol(symbol, program.getCompilerOptions().target, performCharacterChecks, location); if (!displayName) { return undefined; } @@ -49917,25 +56287,137 @@ var ts; sortText: "0" }; } - function getCompletionEntriesFromSymbols(symbols, entries) { - var start = new Date().getTime(); - var uniqueNames = {}; + function getCompletionEntriesFromSymbols(symbols, entries, location, performCharacterChecks) { + var start = ts.timestamp(); + var uniqueNames = ts.createMap(); if (symbols) { for (var _i = 0, symbols_4 = symbols; _i < symbols_4.length; _i++) { var symbol = symbols_4[_i]; - var entry = createCompletionEntry(symbol, location); + var entry = createCompletionEntry(symbol, location, performCharacterChecks); if (entry) { var id = ts.escapeIdentifier(entry.name); - if (!ts.lookUp(uniqueNames, id)) { + if (!uniqueNames[id]) { entries.push(entry); uniqueNames[id] = id; } } } } - log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (new Date().getTime() - start)); + log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (ts.timestamp() - start)); return uniqueNames; } + function getStringLiteralCompletionEntries(sourceFile, position) { + var node = ts.findPrecedingToken(position, sourceFile); + if (!node || node.kind !== 9 /* StringLiteral */) { + return undefined; + } + if (node.parent.kind === 253 /* PropertyAssignment */ && node.parent.parent.kind === 171 /* ObjectLiteralExpression */) { + // Get quoted name of properties of the object literal expression + // i.e. interface ConfigFiles { + // 'jspm:dev': string + // } + // let files: ConfigFiles = { + // '/*completion position*/' + // } + // + // function foo(c: ConfigFiles) {} + // foo({ + // '/*completion position*/' + // }); + return getStringLiteralCompletionEntriesFromPropertyAssignment(node.parent); + } + else if (ts.isElementAccessExpression(node.parent) && node.parent.argumentExpression === node) { + // Get all names of properties on the expression + // i.e. interface A { + // 'prop1': string + // } + // let a: A; + // a['/*completion position*/'] + return getStringLiteralCompletionEntriesFromElementAccess(node.parent); + } + else { + var argumentInfo = ts.SignatureHelp.getContainingArgumentInfo(node, position, sourceFile); + if (argumentInfo) { + // Get string literal completions from specialized signatures of the target + // i.e. declare function f(a: 'A'); + // f("/*completion position*/") + return getStringLiteralCompletionEntriesFromCallExpression(argumentInfo, node); + } + // Get completion for string literal from string literal type + // i.e. var x: "hi" | "hello" = "/*completion position*/" + return getStringLiteralCompletionEntriesFromContextualType(node); + } + } + function getStringLiteralCompletionEntriesFromPropertyAssignment(element) { + var typeChecker = program.getTypeChecker(); + var type = typeChecker.getContextualType(element.parent); + var entries = []; + if (type) { + getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, element, /*performCharacterChecks*/ false); + if (entries.length) { + return { isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries }; + } + } + } + function getStringLiteralCompletionEntriesFromCallExpression(argumentInfo, location) { + var typeChecker = program.getTypeChecker(); + var candidates = []; + var entries = []; + typeChecker.getResolvedSignature(argumentInfo.invocation, candidates); + for (var _i = 0, candidates_3 = candidates; _i < candidates_3.length; _i++) { + var candidate = candidates_3[_i]; + if (candidate.parameters.length > argumentInfo.argumentIndex) { + var parameter = candidate.parameters[argumentInfo.argumentIndex]; + addStringLiteralCompletionsFromType(typeChecker.getTypeAtLocation(parameter.valueDeclaration), entries); + } + } + if (entries.length) { + return { isMemberCompletion: false, isNewIdentifierLocation: true, entries: entries }; + } + return undefined; + } + function getStringLiteralCompletionEntriesFromElementAccess(node) { + var typeChecker = program.getTypeChecker(); + var type = typeChecker.getTypeAtLocation(node.expression); + var entries = []; + if (type) { + getCompletionEntriesFromSymbols(type.getApparentProperties(), entries, node, /*performCharacterChecks*/ false); + if (entries.length) { + return { isMemberCompletion: true, isNewIdentifierLocation: true, entries: entries }; + } + } + return undefined; + } + function getStringLiteralCompletionEntriesFromContextualType(node) { + var typeChecker = program.getTypeChecker(); + var type = typeChecker.getContextualType(node); + if (type) { + var entries_2 = []; + addStringLiteralCompletionsFromType(type, entries_2); + if (entries_2.length) { + return { isMemberCompletion: false, isNewIdentifierLocation: false, entries: entries_2 }; + } + } + return undefined; + } + function addStringLiteralCompletionsFromType(type, result) { + if (!type) { + return; + } + if (type.flags & 524288 /* Union */) { + ts.forEach(type.types, function (t) { return addStringLiteralCompletionsFromType(t, result); }); + } + else { + if (type.flags & 32 /* StringLiteral */) { + result.push({ + name: type.text, + kindModifiers: ScriptElementKindModifier.none, + kind: ScriptElementKind.variableElement, + sortText: "0" + }); + } + } + } } function getCompletionEntryDetails(fileName, position, entryName) { synchronizeHostData(); @@ -49977,7 +56459,7 @@ var ts; function getSymbolKind(symbol, location) { var flags = symbol.getFlags(); if (flags & 32 /* Class */) - return ts.getDeclarationOfKind(symbol, 189 /* ClassExpression */) ? + return ts.getDeclarationOfKind(symbol, 192 /* ClassExpression */) ? ScriptElementKind.localClassElement : ScriptElementKind.classElement; if (flags & 384 /* Enum */) return ScriptElementKind.enumElement; @@ -50008,6 +56490,9 @@ var ts; if (typeChecker.isArgumentsSymbol(symbol)) { return ScriptElementKind.localVariableElement; } + if (location.kind === 97 /* ThisKeyword */ && ts.isExpression(location)) { + return ScriptElementKind.parameterElement; + } if (flags & 3 /* Variable */) { if (ts.isFirstDeclarationOfSymbolParameter(symbol)) { return ScriptElementKind.parameterElement; @@ -50069,6 +56554,7 @@ var ts; var symbolFlags = symbol.flags; var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, symbolFlags, location); var hasAddedSymbolInfo; + var isThisExpression = location.kind === 97 /* ThisKeyword */ && ts.isExpression(location); var type; // Class at constructor site need to be shown as constructor apart from property,method, vars if (symbolKind !== ScriptElementKind.unknown || symbolFlags & 32 /* Class */ || symbolFlags & 8388608 /* Alias */) { @@ -50077,9 +56563,9 @@ var ts; symbolKind = ScriptElementKind.memberVariableElement; } var signature = void 0; - type = typeChecker.getTypeOfSymbolAtLocation(symbol, location); + type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location); if (type) { - if (location.parent && location.parent.kind === 169 /* PropertyAccessExpression */) { + if (location.parent && location.parent.kind === 172 /* PropertyAccessExpression */) { var right = location.parent.name; // Either the location is on the right of a property access, or on the left and the right is missing if (right === location || (right && right.getFullWidth() === 0)) { @@ -50088,7 +56574,7 @@ var ts; } // try get the call/construct signature from the type if it matches var callExpression = void 0; - if (location.kind === 171 /* CallExpression */ || location.kind === 172 /* NewExpression */) { + if (location.kind === 174 /* CallExpression */ || location.kind === 175 /* NewExpression */) { callExpression = location; } else if (isCallExpressionTarget(location) || isNewExpressionTarget(location)) { @@ -50101,7 +56587,7 @@ var ts; // Use the first candidate: signature = candidateSignatures[0]; } - var useConstructSignatures = callExpression.kind === 172 /* NewExpression */ || callExpression.expression.kind === 95 /* SuperKeyword */; + var useConstructSignatures = callExpression.kind === 175 /* NewExpression */ || callExpression.expression.kind === 95 /* SuperKeyword */; var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (!ts.contains(allSignatures, signature.target) && !ts.contains(allSignatures, signature)) { // Get the first signature if there is one -- allSignatures may contain @@ -50141,7 +56627,7 @@ var ts; displayParts.push(ts.keywordPart(92 /* NewKeyword */)); displayParts.push(ts.spacePart()); } - if (!(type.flags & 65536 /* Anonymous */)) { + if (!(type.flags & 2097152 /* Anonymous */) && type.symbol) { ts.addRange(displayParts, ts.symbolToDisplayParts(typeChecker, type.symbol, enclosingDeclaration, /*meaning*/ undefined, 1 /* WriteTypeParametersOrArguments */)); } addSignatureDisplayParts(signature, allSignatures, 8 /* WriteArrowStyleSignature */); @@ -50154,24 +56640,24 @@ var ts; } } else if ((isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304 /* Accessor */)) || - (location.kind === 121 /* ConstructorKeyword */ && location.parent.kind === 145 /* Constructor */)) { + (location.kind === 121 /* ConstructorKeyword */ && location.parent.kind === 148 /* Constructor */)) { // get the signature from the declaration and write it var functionDeclaration = location.parent; - var allSignatures = functionDeclaration.kind === 145 /* Constructor */ ? type.getConstructSignatures() : type.getCallSignatures(); + var allSignatures = functionDeclaration.kind === 148 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); } else { signature = allSignatures[0]; } - if (functionDeclaration.kind === 145 /* Constructor */) { + if (functionDeclaration.kind === 148 /* Constructor */) { // show (constructor) Type(...) signature symbolKind = ScriptElementKind.constructorImplementationElement; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { // (function/method) symbol(..signature) - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 148 /* CallSignature */ && + addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 151 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); } addSignatureDisplayParts(signature, allSignatures); @@ -50179,8 +56665,8 @@ var ts; } } } - if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo) { - if (ts.getDeclarationOfKind(symbol, 189 /* ClassExpression */)) { + if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) { + if (ts.getDeclarationOfKind(symbol, 192 /* ClassExpression */)) { // Special case for class expressions because we would like to indicate that // the class name is local to the class body (similar to function expression) // (local class) class @@ -50203,14 +56689,14 @@ var ts; } if (symbolFlags & 524288 /* TypeAlias */) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(132 /* TypeKeyword */)); + displayParts.push(ts.keywordPart(134 /* TypeKeyword */)); displayParts.push(ts.spacePart()); addFullSymbolName(symbol); writeTypeParametersOfSymbol(symbol, sourceFile); displayParts.push(ts.spacePart()); displayParts.push(ts.operatorPart(56 /* EqualsToken */)); displayParts.push(ts.spacePart()); - ts.addRange(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration)); + ts.addRange(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 512 /* InTypeAlias */)); } if (symbolFlags & 384 /* Enum */) { addNewLineIfDisplayPartsExist(); @@ -50224,7 +56710,7 @@ var ts; } if (symbolFlags & 1536 /* Module */) { addNewLineIfDisplayPartsExist(); - var declaration = ts.getDeclarationOfKind(symbol, 221 /* ModuleDeclaration */); + var declaration = ts.getDeclarationOfKind(symbol, 225 /* ModuleDeclaration */); var isNamespace = declaration && declaration.name && declaration.name.kind === 69 /* Identifier */; displayParts.push(ts.keywordPart(isNamespace ? 126 /* NamespaceKeyword */ : 125 /* ModuleKeyword */)); displayParts.push(ts.spacePart()); @@ -50247,17 +56733,17 @@ var ts; } else { // Method/function type parameter - var declaration = ts.getDeclarationOfKind(symbol, 138 /* TypeParameter */); + var declaration = ts.getDeclarationOfKind(symbol, 141 /* TypeParameter */); ts.Debug.assert(declaration !== undefined); declaration = declaration.parent; if (declaration) { if (ts.isFunctionLikeKind(declaration.kind)) { var signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 149 /* ConstructSignature */) { + if (declaration.kind === 152 /* ConstructSignature */) { displayParts.push(ts.keywordPart(92 /* NewKeyword */)); displayParts.push(ts.spacePart()); } - else if (declaration.kind !== 148 /* CallSignature */ && declaration.name) { + else if (declaration.kind !== 151 /* CallSignature */ && declaration.name) { addFullSymbolName(declaration.symbol); } ts.addRange(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); @@ -50266,7 +56752,7 @@ var ts; // Type alias type parameter // For example // type list = T[]; // Both T will go through same code path - displayParts.push(ts.keywordPart(132 /* TypeKeyword */)); + displayParts.push(ts.keywordPart(134 /* TypeKeyword */)); displayParts.push(ts.spacePart()); addFullSymbolName(declaration.symbol); writeTypeParametersOfSymbol(declaration.symbol, sourceFile); @@ -50277,7 +56763,7 @@ var ts; if (symbolFlags & 8 /* EnumMember */) { addPrefixForAnyFunctionOrVar(symbol, "enum member"); var declaration = symbol.declarations[0]; - if (declaration.kind === 250 /* EnumMember */) { + if (declaration.kind === 255 /* EnumMember */) { var constantValue = typeChecker.getConstantValue(declaration); if (constantValue !== undefined) { displayParts.push(ts.spacePart()); @@ -50289,17 +56775,24 @@ var ts; } if (symbolFlags & 8388608 /* Alias */) { addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(89 /* ImportKeyword */)); + if (symbol.declarations[0].kind === 228 /* NamespaceExportDeclaration */) { + displayParts.push(ts.keywordPart(82 /* ExportKeyword */)); + displayParts.push(ts.spacePart()); + displayParts.push(ts.keywordPart(126 /* NamespaceKeyword */)); + } + else { + displayParts.push(ts.keywordPart(89 /* ImportKeyword */)); + } displayParts.push(ts.spacePart()); addFullSymbolName(symbol); ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 224 /* ImportEqualsDeclaration */) { + if (declaration.kind === 229 /* ImportEqualsDeclaration */) { var importEqualsDeclaration = declaration; if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { displayParts.push(ts.spacePart()); displayParts.push(ts.operatorPart(56 /* EqualsToken */)); displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(127 /* RequireKeyword */)); + displayParts.push(ts.keywordPart(129 /* RequireKeyword */)); displayParts.push(ts.punctuationPart(17 /* OpenParenToken */)); displayParts.push(ts.displayPart(ts.getTextOfNode(ts.getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), SymbolDisplayPartKind.stringLiteral)); displayParts.push(ts.punctuationPart(18 /* CloseParenToken */)); @@ -50320,11 +56813,18 @@ var ts; if (!hasAddedSymbolInfo) { if (symbolKind !== ScriptElementKind.unknown) { if (type) { - addPrefixForAnyFunctionOrVar(symbol, symbolKind); + if (isThisExpression) { + addNewLineIfDisplayPartsExist(); + displayParts.push(ts.keywordPart(97 /* ThisKeyword */)); + } + else { + addPrefixForAnyFunctionOrVar(symbol, symbolKind); + } // For properties, variables and local vars: show the type if (symbolKind === ScriptElementKind.memberVariableElement || symbolFlags & 3 /* Variable */ || - symbolKind === ScriptElementKind.localVariableElement) { + symbolKind === ScriptElementKind.localVariableElement || + isThisExpression) { displayParts.push(ts.punctuationPart(54 /* ColonToken */)); displayParts.push(ts.spacePart()); // If the type is type parameter, format it specially @@ -50344,7 +56844,7 @@ var ts; symbolFlags & 131072 /* Signature */ || symbolFlags & 98304 /* Accessor */ || symbolKind === ScriptElementKind.memberFunctionElement) { - var allSignatures = type.getCallSignatures(); + var allSignatures = type.getNonNullableType().getCallSignatures(); addSignatureDisplayParts(allSignatures[0], allSignatures); } } @@ -50355,6 +56855,27 @@ var ts; } if (!documentation) { documentation = symbol.getDocumentationComment(); + if (documentation.length === 0 && symbol.flags & 4 /* Property */) { + // For some special property access expressions like `experts.foo = foo` or `module.exports.foo = foo` + // there documentation comments might be attached to the right hand side symbol of their declarations. + // The pattern of such special property access is that the parent symbol is the symbol of the file. + if (symbol.parent && ts.forEach(symbol.parent.declarations, function (declaration) { return declaration.kind === 256 /* SourceFile */; })) { + for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { + var declaration = _a[_i]; + if (!declaration.parent || declaration.parent.kind !== 187 /* BinaryExpression */) { + continue; + } + var rhsSymbol = program.getTypeChecker().getSymbolAtLocation(declaration.parent.right); + if (!rhsSymbol) { + continue; + } + documentation = rhsSymbol.getDocumentationComment(); + if (documentation.length > 0) { + break; + } + } + } + } } return { displayParts: displayParts, documentation: documentation, symbolKind: symbolKind }; function addNewLineIfDisplayPartsExist() { @@ -50414,7 +56935,7 @@ var ts; synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); var node = ts.getTouchingPropertyName(sourceFile, position); - if (!node) { + if (node === sourceFile) { return undefined; } if (isLabelName(node)) { @@ -50426,10 +56947,10 @@ var ts; // Try getting just type at this position and show switch (node.kind) { case 69 /* Identifier */: - case 169 /* PropertyAccessExpression */: - case 136 /* QualifiedName */: + case 172 /* PropertyAccessExpression */: + case 139 /* QualifiedName */: case 97 /* ThisKeyword */: - case 162 /* ThisType */: + case 165 /* ThisType */: case 95 /* SuperKeyword */: // For the identifiers/this/super etc get the type at position var type = typeChecker.getTypeAtLocation(node); @@ -50508,8 +57029,8 @@ var ts; var declarations = []; var definition; ts.forEach(signatureDeclarations, function (d) { - if ((selectConstructors && d.kind === 145 /* Constructor */) || - (!selectConstructors && (d.kind === 216 /* FunctionDeclaration */ || d.kind === 144 /* MethodDeclaration */ || d.kind === 143 /* MethodSignature */))) { + if ((selectConstructors && d.kind === 148 /* Constructor */) || + (!selectConstructors && (d.kind === 220 /* FunctionDeclaration */ || d.kind === 147 /* MethodDeclaration */ || d.kind === 146 /* MethodSignature */))) { declarations.push(d); if (d.body) definition = d; @@ -50526,12 +57047,49 @@ var ts; return false; } } + function findReferenceInPosition(refs, pos) { + for (var _i = 0, refs_1 = refs; _i < refs_1.length; _i++) { + var ref = refs_1[_i]; + if (ref.pos <= pos && pos < ref.end) { + return ref; + } + } + return undefined; + } + function getDefinitionInfoForFileReference(name, targetFileName) { + return { + fileName: targetFileName, + textSpan: ts.createTextSpanFromBounds(0, 0), + kind: ScriptElementKind.scriptElement, + name: name, + containerName: undefined, + containerKind: undefined + }; + } /// Goto definition function getDefinitionAtPosition(fileName, position) { synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); + /// Triple slash reference comments + var comment = findReferenceInPosition(sourceFile.referencedFiles, position); + if (comment) { + var referenceFile = ts.tryResolveScriptReference(program, sourceFile, comment); + if (referenceFile) { + return [getDefinitionInfoForFileReference(comment.fileName, referenceFile.fileName)]; + } + return undefined; + } + // Type reference directives + var typeReferenceDirective = findReferenceInPosition(sourceFile.typeReferenceDirectives, position); + if (typeReferenceDirective) { + var referenceFile = program.getResolvedTypeReferenceDirectives()[typeReferenceDirective.fileName]; + if (referenceFile && referenceFile.resolvedFileName) { + return [getDefinitionInfoForFileReference(typeReferenceDirective.fileName, referenceFile.resolvedFileName)]; + } + return undefined; + } var node = ts.getTouchingPropertyName(sourceFile, position); - if (!node) { + if (node === sourceFile) { return undefined; } // Labels @@ -50540,22 +57098,6 @@ var ts; var label = getTargetLabel(node.parent, node.text); return label ? [createDefinitionInfo(label, ScriptElementKind.label, labelName, /*containerName*/ undefined)] : undefined; } - /// Triple slash reference comments - var comment = ts.forEach(sourceFile.referencedFiles, function (r) { return (r.pos <= position && position < r.end) ? r : undefined; }); - if (comment) { - var referenceFile = ts.tryResolveScriptReference(program, sourceFile, comment); - if (referenceFile) { - return [{ - fileName: referenceFile.fileName, - textSpan: ts.createTextSpanFromBounds(0, 0), - kind: ScriptElementKind.scriptElement, - name: comment.fileName, - containerName: undefined, - containerKind: undefined - }]; - } - return undefined; - } var typeChecker = program.getTypeChecker(); var symbol = typeChecker.getSymbolAtLocation(node); // Could not find a symbol e.g. node is string or number keyword, @@ -50569,7 +57111,14 @@ var ts; // to jump to the implementation directly. if (symbol.flags & 8388608 /* Alias */) { var declaration = symbol.declarations[0]; - if (node.kind === 69 /* Identifier */ && node.parent === declaration) { + // Go to the original declaration for cases: + // + // (1) when the aliased symbol was declared in the location(parent). + // (2) when the aliased symbol is originating from a named import. + // + if (node.kind === 69 /* Identifier */ && + (node.parent === declaration || + (declaration.kind === 234 /* ImportSpecifier */ && declaration.parent && declaration.parent.kind === 233 /* NamedImports */))) { symbol = typeChecker.getAliasedSymbol(symbol); } } @@ -50578,7 +57127,7 @@ var ts; // go to the declaration of the property name (in this case stay at the same position). However, if go-to-definition // is performed at the location of property access, we would like to go to definition of the property in the short-hand // assignment. This case and others are handled by the following code. - if (node.parent.kind === 249 /* ShorthandPropertyAssignment */) { + if (node.parent.kind === 254 /* ShorthandPropertyAssignment */) { var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); if (!shorthandSymbol) { return []; @@ -50596,7 +57145,7 @@ var ts; synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); var node = ts.getTouchingPropertyName(sourceFile, position); - if (!node) { + if (node === sourceFile) { return undefined; } var typeChecker = program.getTypeChecker(); @@ -50608,7 +57157,7 @@ var ts; if (!type) { return undefined; } - if (type.flags & 16384 /* Union */) { + if (type.flags & 524288 /* Union */ && !(type.flags & 16 /* Enum */)) { var result_4 = []; ts.forEach(type.types, function (t) { if (t.symbol) { @@ -50625,17 +57174,16 @@ var ts; function getOccurrencesAtPosition(fileName, position) { var results = getOccurrencesAtPositionCore(fileName, position); if (results) { - var sourceFile_2 = getCanonicalFileName(ts.normalizeSlashes(fileName)); + var sourceFile_1 = getCanonicalFileName(ts.normalizeSlashes(fileName)); // Get occurrences only supports reporting occurrences for the file queried. So // filter down to that list. - results = ts.filter(results, function (r) { return getCanonicalFileName(ts.normalizeSlashes(r.fileName)) === sourceFile_2; }); + results = ts.filter(results, function (r) { return getCanonicalFileName(ts.normalizeSlashes(r.fileName)) === sourceFile_1; }); } return results; } function getDocumentHighlights(fileName, position, filesToSearch) { synchronizeHostData(); - filesToSearch = ts.map(filesToSearch, ts.normalizeSlashes); - var sourceFilesToSearch = ts.filter(program.getSourceFiles(), function (f) { return ts.contains(filesToSearch, f.fileName); }); + var sourceFilesToSearch = ts.map(filesToSearch, function (f) { return program.getSourceFile(f); }); var sourceFile = getValidSourceFile(fileName); var node = ts.getTouchingWord(sourceFile, position); if (!node) { @@ -50654,10 +57202,10 @@ var ts; function getSemanticDocumentHighlights(node) { if (node.kind === 69 /* Identifier */ || node.kind === 97 /* ThisKeyword */ || - node.kind === 162 /* ThisType */ || + node.kind === 165 /* ThisType */ || node.kind === 95 /* SuperKeyword */ || - isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || - isNameOfExternalModuleImportOrDeclaration(node)) { + node.kind === 9 /* StringLiteral */ || + isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) { var referencedSymbols = getReferencedSymbolsForNode(node, sourceFilesToSearch, /*findInStrings*/ false, /*findInComments*/ false); return convertReferencedSymbols(referencedSymbols); } @@ -50666,14 +57214,14 @@ var ts; if (!referencedSymbols) { return undefined; } - var fileNameToDocumentHighlights = {}; + var fileNameToDocumentHighlights = ts.createMap(); var result = []; for (var _i = 0, referencedSymbols_1 = referencedSymbols; _i < referencedSymbols_1.length; _i++) { var referencedSymbol = referencedSymbols_1[_i]; for (var _a = 0, _b = referencedSymbol.references; _a < _b.length; _a++) { var referenceEntry = _b[_a]; var fileName_1 = referenceEntry.fileName; - var documentHighlights = ts.getProperty(fileNameToDocumentHighlights, fileName_1); + var documentHighlights = fileNameToDocumentHighlights[fileName_1]; if (!documentHighlights) { documentHighlights = { fileName: fileName_1, highlightSpans: [] }; fileNameToDocumentHighlights[fileName_1] = documentHighlights; @@ -50708,75 +57256,75 @@ var ts; switch (node.kind) { case 88 /* IfKeyword */: case 80 /* ElseKeyword */: - if (hasKind(node.parent, 199 /* IfStatement */)) { + if (hasKind(node.parent, 203 /* IfStatement */)) { return getIfElseOccurrences(node.parent); } break; case 94 /* ReturnKeyword */: - if (hasKind(node.parent, 207 /* ReturnStatement */)) { + if (hasKind(node.parent, 211 /* ReturnStatement */)) { return getReturnOccurrences(node.parent); } break; case 98 /* ThrowKeyword */: - if (hasKind(node.parent, 211 /* ThrowStatement */)) { + if (hasKind(node.parent, 215 /* ThrowStatement */)) { return getThrowOccurrences(node.parent); } break; case 72 /* CatchKeyword */: - if (hasKind(parent(parent(node)), 212 /* TryStatement */)) { + if (hasKind(parent(parent(node)), 216 /* TryStatement */)) { return getTryCatchFinallyOccurrences(node.parent.parent); } break; case 100 /* TryKeyword */: case 85 /* FinallyKeyword */: - if (hasKind(parent(node), 212 /* TryStatement */)) { + if (hasKind(parent(node), 216 /* TryStatement */)) { return getTryCatchFinallyOccurrences(node.parent); } break; case 96 /* SwitchKeyword */: - if (hasKind(node.parent, 209 /* SwitchStatement */)) { + if (hasKind(node.parent, 213 /* SwitchStatement */)) { return getSwitchCaseDefaultOccurrences(node.parent); } break; case 71 /* CaseKeyword */: case 77 /* DefaultKeyword */: - if (hasKind(parent(parent(parent(node))), 209 /* SwitchStatement */)) { + if (hasKind(parent(parent(parent(node))), 213 /* SwitchStatement */)) { return getSwitchCaseDefaultOccurrences(node.parent.parent.parent); } break; case 70 /* BreakKeyword */: case 75 /* ContinueKeyword */: - if (hasKind(node.parent, 206 /* BreakStatement */) || hasKind(node.parent, 205 /* ContinueStatement */)) { + if (hasKind(node.parent, 210 /* BreakStatement */) || hasKind(node.parent, 209 /* ContinueStatement */)) { return getBreakOrContinueStatementOccurrences(node.parent); } break; case 86 /* ForKeyword */: - if (hasKind(node.parent, 202 /* ForStatement */) || - hasKind(node.parent, 203 /* ForInStatement */) || - hasKind(node.parent, 204 /* ForOfStatement */)) { + if (hasKind(node.parent, 206 /* ForStatement */) || + hasKind(node.parent, 207 /* ForInStatement */) || + hasKind(node.parent, 208 /* ForOfStatement */)) { return getLoopBreakContinueOccurrences(node.parent); } break; case 104 /* WhileKeyword */: case 79 /* DoKeyword */: - if (hasKind(node.parent, 201 /* WhileStatement */) || hasKind(node.parent, 200 /* DoStatement */)) { + if (hasKind(node.parent, 205 /* WhileStatement */) || hasKind(node.parent, 204 /* DoStatement */)) { return getLoopBreakContinueOccurrences(node.parent); } break; case 121 /* ConstructorKeyword */: - if (hasKind(node.parent, 145 /* Constructor */)) { + if (hasKind(node.parent, 148 /* Constructor */)) { return getConstructorOccurrences(node.parent); } break; case 123 /* GetKeyword */: - case 129 /* SetKeyword */: - if (hasKind(node.parent, 146 /* GetAccessor */) || hasKind(node.parent, 147 /* SetAccessor */)) { + case 131 /* SetKeyword */: + if (hasKind(node.parent, 149 /* GetAccessor */) || hasKind(node.parent, 150 /* SetAccessor */)) { return getGetAndSetOccurrences(node.parent); } break; default: if (ts.isModifierKind(node.kind) && node.parent && - (ts.isDeclaration(node.parent) || node.parent.kind === 196 /* VariableStatement */)) { + (ts.isDeclaration(node.parent) || node.parent.kind === 200 /* VariableStatement */)) { return getModifierOccurrences(node.kind, node.parent); } } @@ -50792,10 +57340,10 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 211 /* ThrowStatement */) { + if (node.kind === 215 /* ThrowStatement */) { statementAccumulator.push(node); } - else if (node.kind === 212 /* TryStatement */) { + else if (node.kind === 216 /* TryStatement */) { var tryStatement = node; if (tryStatement.catchClause) { aggregate(tryStatement.catchClause); @@ -50822,19 +57370,19 @@ var ts; function getThrowStatementOwner(throwStatement) { var child = throwStatement; while (child.parent) { - var parent_14 = child.parent; - if (ts.isFunctionBlock(parent_14) || parent_14.kind === 251 /* SourceFile */) { - return parent_14; + var parent_21 = child.parent; + if (ts.isFunctionBlock(parent_21) || parent_21.kind === 256 /* SourceFile */) { + return parent_21; } // A throw-statement is only owned by a try-statement if the try-statement has // a catch clause, and if the throw-statement occurs within the try block. - if (parent_14.kind === 212 /* TryStatement */) { - var tryStatement = parent_14; + if (parent_21.kind === 216 /* TryStatement */) { + var tryStatement = parent_21; if (tryStatement.tryBlock === child && tryStatement.catchClause) { return child; } } - child = parent_14; + child = parent_21; } return undefined; } @@ -50843,7 +57391,7 @@ var ts; aggregate(node); return statementAccumulator; function aggregate(node) { - if (node.kind === 206 /* BreakStatement */ || node.kind === 205 /* ContinueStatement */) { + if (node.kind === 210 /* BreakStatement */ || node.kind === 209 /* ContinueStatement */) { statementAccumulator.push(node); } else if (!ts.isFunctionLike(node)) { @@ -50856,25 +57404,25 @@ var ts; return actualOwner && actualOwner === owner; } function getBreakOrContinueOwner(statement) { - for (var node_2 = statement.parent; node_2; node_2 = node_2.parent) { - switch (node_2.kind) { - case 209 /* SwitchStatement */: - if (statement.kind === 205 /* ContinueStatement */) { + for (var node_1 = statement.parent; node_1; node_1 = node_1.parent) { + switch (node_1.kind) { + case 213 /* SwitchStatement */: + if (statement.kind === 209 /* ContinueStatement */) { continue; } // Fall through. - case 202 /* ForStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: - case 201 /* WhileStatement */: - case 200 /* DoStatement */: - if (!statement.label || isLabeledBy(node_2, statement.label.text)) { - return node_2; + case 206 /* ForStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: + case 205 /* WhileStatement */: + case 204 /* DoStatement */: + if (!statement.label || isLabeledBy(node_1, statement.label.text)) { + return node_1; } break; default: // Don't cross function boundaries. - if (ts.isFunctionLike(node_2)) { + if (ts.isFunctionLike(node_1)) { return undefined; } break; @@ -50886,24 +57434,24 @@ var ts; var container = declaration.parent; // Make sure we only highlight the keyword when it makes sense to do so. if (ts.isAccessibilityModifier(modifier)) { - if (!(container.kind === 217 /* ClassDeclaration */ || - container.kind === 189 /* ClassExpression */ || - (declaration.kind === 139 /* Parameter */ && hasKind(container, 145 /* Constructor */)))) { + if (!(container.kind === 221 /* ClassDeclaration */ || + container.kind === 192 /* ClassExpression */ || + (declaration.kind === 142 /* Parameter */ && hasKind(container, 148 /* Constructor */)))) { return undefined; } } else if (modifier === 113 /* StaticKeyword */) { - if (!(container.kind === 217 /* ClassDeclaration */ || container.kind === 189 /* ClassExpression */)) { + if (!(container.kind === 221 /* ClassDeclaration */ || container.kind === 192 /* ClassExpression */)) { return undefined; } } else if (modifier === 82 /* ExportKeyword */ || modifier === 122 /* DeclareKeyword */) { - if (!(container.kind === 222 /* ModuleBlock */ || container.kind === 251 /* SourceFile */)) { + if (!(container.kind === 226 /* ModuleBlock */ || container.kind === 256 /* SourceFile */)) { return undefined; } } else if (modifier === 115 /* AbstractKeyword */) { - if (!(container.kind === 217 /* ClassDeclaration */ || declaration.kind === 217 /* ClassDeclaration */)) { + if (!(container.kind === 221 /* ClassDeclaration */ || declaration.kind === 221 /* ClassDeclaration */)) { return undefined; } } @@ -50915,8 +57463,8 @@ var ts; var modifierFlag = getFlagFromModifier(modifier); var nodes; switch (container.kind) { - case 222 /* ModuleBlock */: - case 251 /* SourceFile */: + case 226 /* ModuleBlock */: + case 256 /* SourceFile */: // Container is either a class declaration or the declaration is a classDeclaration if (modifierFlag & 128 /* Abstract */) { nodes = declaration.members.concat(declaration); @@ -50925,17 +57473,17 @@ var ts; nodes = container.statements; } break; - case 145 /* Constructor */: + case 148 /* Constructor */: nodes = container.parameters.concat(container.parent.members); break; - case 217 /* ClassDeclaration */: - case 189 /* ClassExpression */: + case 221 /* ClassDeclaration */: + case 192 /* ClassExpression */: nodes = container.members; // If we're an accessibility modifier, we're in an instance member and should search // the constructor's parameter list for instance members as well. - if (modifierFlag & 56 /* AccessibilityModifier */) { + if (modifierFlag & 28 /* AccessibilityModifier */) { var constructor = ts.forEach(container.members, function (member) { - return member.kind === 145 /* Constructor */ && member; + return member.kind === 148 /* Constructor */ && member; }); if (constructor) { nodes = nodes.concat(constructor.parameters); @@ -50957,17 +57505,17 @@ var ts; function getFlagFromModifier(modifier) { switch (modifier) { case 112 /* PublicKeyword */: - return 8 /* Public */; + return 4 /* Public */; case 110 /* PrivateKeyword */: - return 16 /* Private */; + return 8 /* Private */; case 111 /* ProtectedKeyword */: - return 32 /* Protected */; + return 16 /* Protected */; case 113 /* StaticKeyword */: - return 64 /* Static */; + return 32 /* Static */; case 82 /* ExportKeyword */: - return 2 /* Export */; + return 1 /* Export */; case 122 /* DeclareKeyword */: - return 4 /* Ambient */; + return 2 /* Ambient */; case 115 /* AbstractKeyword */: return 128 /* Abstract */; default: @@ -50988,13 +57536,13 @@ var ts; } function getGetAndSetOccurrences(accessorDeclaration) { var keywords = []; - tryPushAccessorKeyword(accessorDeclaration.symbol, 146 /* GetAccessor */); - tryPushAccessorKeyword(accessorDeclaration.symbol, 147 /* SetAccessor */); + tryPushAccessorKeyword(accessorDeclaration.symbol, 149 /* GetAccessor */); + tryPushAccessorKeyword(accessorDeclaration.symbol, 150 /* SetAccessor */); return ts.map(keywords, getHighlightSpanForNode); function tryPushAccessorKeyword(accessorSymbol, accessorKind) { var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind); if (accessor) { - ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 123 /* GetKeyword */, 129 /* SetKeyword */); }); + ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 123 /* GetKeyword */, 131 /* SetKeyword */); }); } } } @@ -51012,7 +57560,7 @@ var ts; var keywords = []; if (pushKeywordIf(keywords, loopNode.getFirstToken(), 86 /* ForKeyword */, 104 /* WhileKeyword */, 79 /* DoKeyword */)) { // If we succeeded and got a do-while loop, then start looking for a 'while' keyword. - if (loopNode.kind === 200 /* DoStatement */) { + if (loopNode.kind === 204 /* DoStatement */) { var loopTokens = loopNode.getChildren(); for (var i = loopTokens.length - 1; i >= 0; i--) { if (pushKeywordIf(keywords, loopTokens[i], 104 /* WhileKeyword */)) { @@ -51033,13 +57581,13 @@ var ts; var owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { - case 202 /* ForStatement */: - case 203 /* ForInStatement */: - case 204 /* ForOfStatement */: - case 200 /* DoStatement */: - case 201 /* WhileStatement */: + case 206 /* ForStatement */: + case 207 /* ForInStatement */: + case 208 /* ForOfStatement */: + case 204 /* DoStatement */: + case 205 /* WhileStatement */: return getLoopBreakContinueOccurrences(owner); - case 209 /* SwitchStatement */: + case 213 /* SwitchStatement */: return getSwitchCaseDefaultOccurrences(owner); } } @@ -51093,7 +57641,7 @@ var ts; function getReturnOccurrences(returnStatement) { var func = ts.getContainingFunction(returnStatement); // If we didn't find a containing function with a block body, bail out. - if (!(func && hasKind(func.body, 195 /* Block */))) { + if (!(func && hasKind(func.body, 199 /* Block */))) { return undefined; } var keywords = []; @@ -51109,7 +57657,7 @@ var ts; function getIfElseOccurrences(ifStatement) { var keywords = []; // Traverse upwards through all parent if-statements linked by their else-branches. - while (hasKind(ifStatement.parent, 199 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) { + while (hasKind(ifStatement.parent, 203 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) { ifStatement = ifStatement.parent; } // Now traverse back down through the else branches, aggregating if/else keywords of if-statements. @@ -51122,7 +57670,7 @@ var ts; break; } } - if (!hasKind(ifStatement.elseStatement, 199 /* IfStatement */)) { + if (!hasKind(ifStatement.elseStatement, 203 /* IfStatement */)) { break; } ifStatement = ifStatement.elseStatement; @@ -51137,7 +57685,7 @@ var ts; var shouldCombindElseAndIf = true; // Avoid recalculating getStart() by iterating backwards. for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) { - if (!ts.isWhiteSpace(sourceFile.text.charCodeAt(j))) { + if (!ts.isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(j))) { shouldCombindElseAndIf = false; break; } @@ -51175,7 +57723,8 @@ var ts; result.push({ fileName: entry.fileName, textSpan: highlightSpan.textSpan, - isWriteAccess: highlightSpan.kind === HighlightSpanKind.writtenReference + isWriteAccess: highlightSpan.kind === HighlightSpanKind.writtenReference, + isDefinition: false }); } } @@ -51209,20 +57758,35 @@ var ts; function findReferencedSymbols(fileName, position, findInStrings, findInComments) { synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); - var node = ts.getTouchingPropertyName(sourceFile, position); - if (!node) { + var node = ts.getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true); + if (node === sourceFile) { return undefined; } - if (node.kind !== 69 /* Identifier */ && - // TODO (drosen): This should be enabled in a later release - currently breaks rename. - // node.kind !== SyntaxKind.ThisKeyword && - // node.kind !== SyntaxKind.SuperKeyword && - !isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && - !isNameOfExternalModuleImportOrDeclaration(node)) { - return undefined; + switch (node.kind) { + case 8 /* NumericLiteral */: + if (!isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) { + break; + } + // Fallthrough + case 69 /* Identifier */: + case 97 /* ThisKeyword */: + // case SyntaxKind.SuperKeyword: TODO:GH#9268 + case 9 /* StringLiteral */: + return getReferencedSymbolsForNode(node, program.getSourceFiles(), findInStrings, findInComments); + } + return undefined; + } + function isThis(node) { + switch (node.kind) { + case 97 /* ThisKeyword */: + // case SyntaxKind.ThisType: TODO: GH#9267 + return true; + case 69 /* Identifier */: + // 'this' as a parameter + return node.originalKeywordKind === 97 /* ThisKeyword */ && node.parent.kind === 142 /* Parameter */; + default: + return false; } - ts.Debug.assert(node.kind === 69 /* Identifier */ || node.kind === 8 /* NumericLiteral */ || node.kind === 9 /* StringLiteral */); - return getReferencedSymbolsForNode(node, program.getSourceFiles(), findInStrings, findInComments); } function getReferencedSymbolsForNode(node, sourceFiles, findInStrings, findInComments) { var typeChecker = program.getTypeChecker(); @@ -51239,13 +57803,16 @@ var ts; return getLabelReferencesInNode(node.parent, node); } } - if (node.kind === 97 /* ThisKeyword */ || node.kind === 162 /* ThisType */) { + if (isThis(node)) { return getReferencesForThisKeyword(node, sourceFiles); } if (node.kind === 95 /* SuperKeyword */) { return getReferencesForSuperKeyword(node); } var symbol = typeChecker.getSymbolAtLocation(node); + if (!symbol && node.kind === 9 /* StringLiteral */) { + return getReferencesForStringLiteral(node, sourceFiles); + } // Could not find a symbol e.g. unknown identifier if (!symbol) { // Can't have references to something that we have no symbol for. @@ -51273,11 +57840,11 @@ var ts; } else { var internedName = getInternedName(symbol, node, declarations); - for (var _i = 0, sourceFiles_3 = sourceFiles; _i < sourceFiles_3.length; _i++) { - var sourceFile = sourceFiles_3[_i]; + for (var _i = 0, sourceFiles_4 = sourceFiles; _i < sourceFiles_4.length; _i++) { + var sourceFile = sourceFiles_4[_i]; cancellationToken.throwIfCancellationRequested(); var nameTable = getNameTable(sourceFile); - if (ts.lookUp(nameTable, internedName) !== undefined) { + if (nameTable[internedName] !== undefined) { result = result || []; getReferencesInNode(sourceFile, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result, symbolToIndex); } @@ -51300,8 +57867,46 @@ var ts; textSpan: ts.createTextSpan(declarations[0].getStart(), 0) }; } - function isImportSpecifierSymbol(symbol) { - return (symbol.flags & 8388608 /* Alias */) && !!ts.getDeclarationOfKind(symbol, 229 /* ImportSpecifier */); + function getAliasSymbolForPropertyNameSymbol(symbol, location) { + if (symbol.flags & 8388608 /* Alias */) { + // Default import get alias + var defaultImport = ts.getDeclarationOfKind(symbol, 231 /* ImportClause */); + if (defaultImport) { + return typeChecker.getAliasedSymbol(symbol); + } + var importOrExportSpecifier = ts.forEach(symbol.declarations, function (declaration) { return (declaration.kind === 234 /* ImportSpecifier */ || + declaration.kind === 238 /* ExportSpecifier */) ? declaration : undefined; }); + if (importOrExportSpecifier && + // export { a } + (!importOrExportSpecifier.propertyName || + // export {a as class } where a is location + importOrExportSpecifier.propertyName === location)) { + // If Import specifier -> get alias + // else Export specifier -> get local target + return importOrExportSpecifier.kind === 234 /* ImportSpecifier */ ? + typeChecker.getAliasedSymbol(symbol) : + typeChecker.getExportSpecifierLocalTargetSymbol(importOrExportSpecifier); + } + } + return undefined; + } + function getPropertySymbolOfDestructuringAssignment(location) { + return ts.isArrayLiteralOrObjectLiteralDestructuringPattern(location.parent.parent) && + typeChecker.getPropertySymbolOfDestructuringAssignment(location); + } + function isObjectBindingPatternElementWithoutPropertyName(symbol) { + var bindingElement = ts.getDeclarationOfKind(symbol, 169 /* BindingElement */); + return bindingElement && + bindingElement.parent.kind === 167 /* ObjectBindingPattern */ && + !bindingElement.propertyName; + } + function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol) { + if (isObjectBindingPatternElementWithoutPropertyName(symbol)) { + var bindingElement = ts.getDeclarationOfKind(symbol, 169 /* BindingElement */); + var typeOfPattern = typeChecker.getTypeAtLocation(bindingElement.parent); + return typeOfPattern && typeChecker.getPropertyOfType(typeOfPattern, bindingElement.name.text); + } + return undefined; } function getInternedName(symbol, location, declarations) { // If this is an export or import specifier it could have been renamed using the 'as' syntax. @@ -51327,21 +57932,26 @@ var ts; // If this is the symbol of a named function expression or named class expression, // then named references are limited to its own scope. var valueDeclaration = symbol.valueDeclaration; - if (valueDeclaration && (valueDeclaration.kind === 176 /* FunctionExpression */ || valueDeclaration.kind === 189 /* ClassExpression */)) { + if (valueDeclaration && (valueDeclaration.kind === 179 /* FunctionExpression */ || valueDeclaration.kind === 192 /* ClassExpression */)) { return valueDeclaration; } // If this is private property or method, the scope is the containing class if (symbol.flags & (4 /* Property */ | 8192 /* Method */)) { - var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (d.flags & 16 /* Private */) ? d : undefined; }); + var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (d.flags & 8 /* Private */) ? d : undefined; }); if (privateDeclaration) { - return ts.getAncestor(privateDeclaration, 217 /* ClassDeclaration */); + return ts.getAncestor(privateDeclaration, 221 /* ClassDeclaration */); } } // If the symbol is an import we would like to find it if we are looking for what it imports. - // So consider it visibile outside its declaration scope. + // So consider it visible outside its declaration scope. if (symbol.flags & 8388608 /* Alias */) { return undefined; } + // If symbol is of object binding pattern element without property name we would want to + // look for property too and that could be anywhere + if (isObjectBindingPatternElementWithoutPropertyName(symbol)) { + return undefined; + } // if this symbol is visible from its parent container, e.g. exported, then bail out // if symbol correspond to the union property - bail out if (symbol.parent || (symbol.flags & 268435456 /* SyntheticProperty */)) { @@ -51350,8 +57960,8 @@ var ts; var scope; var declarations = symbol.getDeclarations(); if (declarations) { - for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) { - var declaration = declarations_8[_i]; + for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) { + var declaration = declarations_9[_i]; var container = getContainerNode(declaration); if (!container) { return undefined; @@ -51360,7 +57970,7 @@ var ts; // Different declarations have different containers, bail out return undefined; } - if (container.kind === 251 /* SourceFile */ && !ts.isExternalModule(container)) { + if (container.kind === 256 /* SourceFile */ && !ts.isExternalModule(container)) { // This is a global variable and not an external module, any declaration defined // within this scope is visible outside the file return undefined; @@ -51456,7 +58066,8 @@ var ts; function getReferencesInNode(container, searchSymbol, searchText, searchLocation, searchMeaning, findInStrings, findInComments, result, symbolToIndex) { var sourceFile = container.getSourceFile(); var tripleSlashDirectivePrefixRegex = /^\/\/\/\s*= 0) { - return aliasedSymbol; - } - } - // For export specifiers, it can be a local symbol, e.g. - // import {a} from "mod"; - // export {a as somethingElse} - // We want the local target of the export (i.e. the import symbol) and not the final target (i.e. "mod".a) - if (referenceLocation.parent.kind === 233 /* ExportSpecifier */) { - var aliasedSymbol = typeChecker.getExportSpecifierLocalTargetSymbol(referenceLocation.parent); - if (searchSymbols.indexOf(aliasedSymbol) >= 0) { - return aliasedSymbol; - } + // symbols but by looking up for related symbol of this alias so it can handle multiple level of indirectness. + var aliasSymbol = getAliasSymbolForPropertyNameSymbol(referenceSymbol, referenceLocation); + if (aliasSymbol) { + return getRelatedSymbol(searchSymbols, aliasSymbol, referenceLocation); } // If the reference location is in an object literal, try to get the contextual type for the // object literal, lookup the property symbol in the contextual type, and use this symbol to // compare to our searchSymbol - if (isNameOfPropertyAssignment(referenceLocation)) { - return ts.forEach(getPropertySymbolsFromContextualType(referenceLocation), function (contextualSymbol) { + var containingObjectLiteralElement = getContainingObjectLiteralElement(referenceLocation); + if (containingObjectLiteralElement) { + var contextualSymbol = ts.forEach(getPropertySymbolsFromContextualType(containingObjectLiteralElement), function (contextualSymbol) { return ts.forEach(typeChecker.getRootSymbols(contextualSymbol), function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; }); }); + if (contextualSymbol) { + return contextualSymbol; + } + // If the reference location is the name of property from object literal destructuring pattern + // Get the property symbol from the object literal's type and look if thats the search symbol + // In below eg. get 'property' from type of elems iterating type + // for ( { property: p2 } of elems) { } + var propertySymbol = getPropertySymbolOfDestructuringAssignment(referenceLocation); + if (propertySymbol && searchSymbols.indexOf(propertySymbol) >= 0) { + return propertySymbol; + } + } + // If the reference location is the binding element and doesn't have property name + // then include the binding element in the related symbols + // let { a } : { a }; + var bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(referenceSymbol); + if (bindingElementPropertySymbol && searchSymbols.indexOf(bindingElementPropertySymbol) >= 0) { + return bindingElementPropertySymbol; } // Unwrap symbols to get to the root (e.g. transient symbols as a result of widening) // Or a union property, use its underlying unioned symbols @@ -51813,43 +58490,42 @@ var ts; // see if any is in the list if (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */)) { var result_5 = []; - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result_5, /*previousIterationSymbolsCache*/ {}); + getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result_5, /*previousIterationSymbolsCache*/ ts.createMap()); return ts.forEach(result_5, function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; }); } return undefined; }); } - function getPropertySymbolsFromContextualType(node) { - if (isNameOfPropertyAssignment(node)) { - var objectLiteral = node.parent.parent; - var contextualType = typeChecker.getContextualType(objectLiteral); - var name_39 = node.text; - if (contextualType) { - if (contextualType.flags & 16384 /* Union */) { - // This is a union type, first see if the property we are looking for is a union property (i.e. exists in all types) - // if not, search the constituent types for the property - var unionProperty = contextualType.getProperty(name_39); - if (unionProperty) { - return [unionProperty]; - } - else { - var result_6 = []; - ts.forEach(contextualType.types, function (t) { - var symbol = t.getProperty(name_39); - if (symbol) { - result_6.push(symbol); - } - }); - return result_6; - } - } - else { - var symbol_1 = contextualType.getProperty(name_39); - if (symbol_1) { - return [symbol_1]; - } - } + function getNameFromObjectLiteralElement(node) { + if (node.name.kind === 140 /* ComputedPropertyName */) { + var nameExpression = node.name.expression; + // treat computed property names where expression is string/numeric literal as just string/numeric literal + if (ts.isStringOrNumericLiteral(nameExpression.kind)) { + return nameExpression.text; } + return undefined; + } + return node.name.text; + } + function getPropertySymbolsFromContextualType(node) { + var objectLiteral = node.parent; + var contextualType = typeChecker.getContextualType(objectLiteral); + var name = getNameFromObjectLiteralElement(node); + if (name && contextualType) { + var result_6 = []; + var symbol_2 = contextualType.getProperty(name); + if (symbol_2) { + result_6.push(symbol_2); + } + if (contextualType.flags & 524288 /* Union */) { + ts.forEach(contextualType.types, function (t) { + var symbol = t.getProperty(name); + if (symbol) { + result_6.push(symbol); + } + }); + } + return result_6; } return undefined; } @@ -51870,8 +58546,8 @@ var ts; // To achieve that we will keep iterating until the result stabilizes. // Remember the last meaning lastIterationMeaning = meaning; - for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) { - var declaration = declarations_9[_i]; + for (var _i = 0, declarations_10 = declarations; _i < declarations_10.length; _i++) { + var declaration = declarations_10[_i]; var declarationMeaning = getMeaningFromDeclaration(declaration); if (declarationMeaning & meaning) { meaning |= declarationMeaning; @@ -51892,7 +58568,8 @@ var ts; return { fileName: node.getSourceFile().fileName, textSpan: ts.createTextSpanFromBounds(start, end), - isWriteAccess: isWriteAccess(node) + isWriteAccess: isWriteAccess(node), + isDefinition: ts.isDeclarationName(node) || ts.isLiteralComputedPropertyDeclarationName(node) }; } /** A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment */ @@ -51902,10 +58579,10 @@ var ts; } var parent = node.parent; if (parent) { - if (parent.kind === 183 /* PostfixUnaryExpression */ || parent.kind === 182 /* PrefixUnaryExpression */) { + if (parent.kind === 186 /* PostfixUnaryExpression */ || parent.kind === 185 /* PrefixUnaryExpression */) { return true; } - else if (parent.kind === 184 /* BinaryExpression */ && parent.left === node) { + else if (parent.kind === 187 /* BinaryExpression */ && parent.left === node) { var operator = parent.operatorToken.kind; return 56 /* FirstAssignment */ <= operator && operator <= 68 /* LastAssignment */; } @@ -51915,7 +58592,8 @@ var ts; /// NavigateTo function getNavigateToItems(searchValue, maxResultCount) { synchronizeHostData(); - return ts.NavigateTo.getNavigateToItems(program, cancellationToken, searchValue, maxResultCount); + var checker = getProgram().getTypeChecker(); + return ts.NavigateTo.getNavigateToItems(program, checker, cancellationToken, searchValue, maxResultCount); } function getEmitOutput(fileName) { synchronizeHostData(); @@ -51936,33 +58614,33 @@ var ts; } function getMeaningFromDeclaration(node) { switch (node.kind) { - case 139 /* Parameter */: - case 214 /* VariableDeclaration */: - case 166 /* BindingElement */: - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: - case 248 /* PropertyAssignment */: - case 249 /* ShorthandPropertyAssignment */: - case 250 /* EnumMember */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 145 /* Constructor */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 216 /* FunctionDeclaration */: - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: - case 247 /* CatchClause */: + case 142 /* Parameter */: + case 218 /* VariableDeclaration */: + case 169 /* BindingElement */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: + case 253 /* PropertyAssignment */: + case 254 /* ShorthandPropertyAssignment */: + case 255 /* EnumMember */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 148 /* Constructor */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 220 /* FunctionDeclaration */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: + case 252 /* CatchClause */: return 1 /* Value */; - case 138 /* TypeParameter */: - case 218 /* InterfaceDeclaration */: - case 219 /* TypeAliasDeclaration */: - case 156 /* TypeLiteral */: + case 141 /* TypeParameter */: + case 222 /* InterfaceDeclaration */: + case 223 /* TypeAliasDeclaration */: + case 159 /* TypeLiteral */: return 2 /* Type */; - case 217 /* ClassDeclaration */: - case 220 /* EnumDeclaration */: + case 221 /* ClassDeclaration */: + case 224 /* EnumDeclaration */: return 1 /* Value */ | 2 /* Type */; - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: if (ts.isAmbientModule(node)) { return 4 /* Namespace */ | 1 /* Value */; } @@ -51972,15 +58650,15 @@ var ts; else { return 4 /* Namespace */; } - case 228 /* NamedImports */: - case 229 /* ImportSpecifier */: - case 224 /* ImportEqualsDeclaration */: - case 225 /* ImportDeclaration */: - case 230 /* ExportAssignment */: - case 231 /* ExportDeclaration */: + case 233 /* NamedImports */: + case 234 /* ImportSpecifier */: + case 229 /* ImportEqualsDeclaration */: + case 230 /* ImportDeclaration */: + case 235 /* ExportAssignment */: + case 236 /* ExportDeclaration */: return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; // An external module can be a Value - case 251 /* SourceFile */: + case 256 /* SourceFile */: return 4 /* Namespace */ | 1 /* Value */; } return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; @@ -51989,10 +58667,10 @@ var ts; if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) { node = node.parent; } - return node.parent.kind === 152 /* TypeReference */ || - (node.parent.kind === 191 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || + return node.parent.kind === 155 /* TypeReference */ || + (node.parent.kind === 194 /* ExpressionWithTypeArguments */ && !ts.isExpressionWithTypeArgumentsInClassExtendsClause(node.parent)) || (node.kind === 97 /* ThisKeyword */ && !ts.isExpression(node)) || - node.kind === 162 /* ThisType */; + node.kind === 165 /* ThisType */; } function isNamespaceReference(node) { return isQualifiedNameNamespaceReference(node) || isPropertyAccessNamespaceReference(node); @@ -52000,32 +58678,32 @@ var ts; function isPropertyAccessNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 169 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 169 /* PropertyAccessExpression */) { + if (root.parent.kind === 172 /* PropertyAccessExpression */) { + while (root.parent && root.parent.kind === 172 /* PropertyAccessExpression */) { root = root.parent; } isLastClause = root.name === node; } - if (!isLastClause && root.parent.kind === 191 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 246 /* HeritageClause */) { + if (!isLastClause && root.parent.kind === 194 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 251 /* HeritageClause */) { var decl = root.parent.parent.parent; - return (decl.kind === 217 /* ClassDeclaration */ && root.parent.parent.token === 106 /* ImplementsKeyword */) || - (decl.kind === 218 /* InterfaceDeclaration */ && root.parent.parent.token === 83 /* ExtendsKeyword */); + return (decl.kind === 221 /* ClassDeclaration */ && root.parent.parent.token === 106 /* ImplementsKeyword */) || + (decl.kind === 222 /* InterfaceDeclaration */ && root.parent.parent.token === 83 /* ExtendsKeyword */); } return false; } function isQualifiedNameNamespaceReference(node) { var root = node; var isLastClause = true; - if (root.parent.kind === 136 /* QualifiedName */) { - while (root.parent && root.parent.kind === 136 /* QualifiedName */) { + if (root.parent.kind === 139 /* QualifiedName */) { + while (root.parent && root.parent.kind === 139 /* QualifiedName */) { root = root.parent; } isLastClause = root.right === node; } - return root.parent.kind === 152 /* TypeReference */ && !isLastClause; + return root.parent.kind === 155 /* TypeReference */ && !isLastClause; } function isInRightSideOfImport(node) { - while (node.parent.kind === 136 /* QualifiedName */) { + while (node.parent.kind === 139 /* QualifiedName */) { node = node.parent; } return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; @@ -52035,15 +58713,15 @@ var ts; // import a = |b|; // Namespace // import a = |b.c|; // Value, type, namespace // import a = |b.c|.d; // Namespace - if (node.parent.kind === 136 /* QualifiedName */ && + if (node.parent.kind === 139 /* QualifiedName */ && node.parent.right === node && - node.parent.parent.kind === 224 /* ImportEqualsDeclaration */) { + node.parent.parent.kind === 229 /* ImportEqualsDeclaration */) { return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; } return 4 /* Namespace */; } function getMeaningFromLocation(node) { - if (node.parent.kind === 230 /* ExportAssignment */) { + if (node.parent.kind === 235 /* ExportAssignment */) { return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; } else if (isInRightSideOfImport(node)) { @@ -52072,27 +58750,29 @@ var ts; return ts.SignatureHelp.getSignatureHelpItems(program, sourceFile, position, cancellationToken); } /// Syntactic features - function getSourceFile(fileName) { + function getNonBoundSourceFile(fileName) { return syntaxTreeCache.getCurrentSourceFile(fileName); } + function getSourceFile(fileName) { + return getNonBoundSourceFile(fileName); + } function getNameOrDottedNameSpan(fileName, startPos, endPos) { var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); // Get node at the location var node = ts.getTouchingPropertyName(sourceFile, startPos); - if (!node) { + if (node === sourceFile) { return; } switch (node.kind) { - case 169 /* PropertyAccessExpression */: - case 136 /* QualifiedName */: + case 172 /* PropertyAccessExpression */: + case 139 /* QualifiedName */: case 9 /* StringLiteral */: - case 163 /* StringLiteralType */: case 84 /* FalseKeyword */: case 99 /* TrueKeyword */: case 93 /* NullKeyword */: case 95 /* SuperKeyword */: case 97 /* ThisKeyword */: - case 162 /* ThisType */: + case 165 /* ThisType */: case 69 /* Identifier */: break; // Cant create the text span @@ -52109,7 +58789,7 @@ var ts; // If this is name of a module declarations, check if this is right side of dotted module name // If parent of the module declaration which is parent of this node is module declaration and its body is the module declaration that this node is name of // Then this name is name from dotted module - if (nodeForStartPos.parent.parent.kind === 221 /* ModuleDeclaration */ && + if (nodeForStartPos.parent.parent.kind === 225 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { // Use parent module declarations name for start pos nodeForStartPos = nodeForStartPos.parent.parent.name; @@ -52133,7 +58813,7 @@ var ts; } function getNavigationBarItems(fileName) { var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return ts.NavigationBar.getNavigationBarItems(sourceFile, host.getCompilationSettings()); + return ts.NavigationBar.getNavigationBarItems(sourceFile); } function getSemanticClassifications(fileName, span) { return convertClassifications(getEncodedSemanticClassifications(fileName, span)); @@ -52150,10 +58830,10 @@ var ts; // That means we're calling back into the host around every 1.2k of the file we process. // Lib.d.ts has similar numbers. switch (kind) { - case 221 /* ModuleDeclaration */: - case 217 /* ClassDeclaration */: - case 218 /* InterfaceDeclaration */: - case 216 /* FunctionDeclaration */: + case 225 /* ModuleDeclaration */: + case 221 /* ClassDeclaration */: + case 222 /* InterfaceDeclaration */: + case 220 /* FunctionDeclaration */: cancellationToken.throwIfCancellationRequested(); } } @@ -52207,7 +58887,7 @@ var ts; */ function hasValueSideModule(symbol) { return ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 221 /* ModuleDeclaration */ && + return declaration.kind === 225 /* ModuleDeclaration */ && ts.getModuleInstanceState(declaration) === 1 /* Instantiated */; }); } @@ -52368,16 +59048,16 @@ var ts; pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */); pos = tag.tagName.end; switch (tag.kind) { - case 270 /* JSDocParameterTag */: + case 275 /* JSDocParameterTag */: processJSDocParameterTag(tag); break; - case 273 /* JSDocTemplateTag */: + case 278 /* JSDocTemplateTag */: processJSDocTemplateTag(tag); break; - case 272 /* JSDocTypeTag */: + case 277 /* JSDocTypeTag */: processElement(tag.typeExpression); break; - case 271 /* JSDocReturnTag */: + case 276 /* JSDocReturnTag */: processElement(tag.typeExpression); break; } @@ -52440,14 +59120,17 @@ var ts; * False will mean that node is not classified and traverse routine should recurse into node contents. */ function tryClassifyNode(node) { + if (ts.isJSDocTag(node)) { + return true; + } if (ts.nodeIsMissing(node)) { return true; } var classifiedElementName = tryClassifyJsxElementName(node); - if (!ts.isToken(node) && node.kind !== 239 /* JsxText */ && classifiedElementName === undefined) { + if (!ts.isToken(node) && node.kind !== 244 /* JsxText */ && classifiedElementName === undefined) { return false; } - var tokenStart = node.kind === 239 /* JsxText */ ? node.pos : classifyLeadingTriviaAndGetTokenStart(node); + var tokenStart = node.kind === 244 /* JsxText */ ? node.pos : classifyLeadingTriviaAndGetTokenStart(node); var tokenWidth = node.end - tokenStart; ts.Debug.assert(tokenWidth >= 0); if (tokenWidth > 0) { @@ -52460,22 +59143,22 @@ var ts; } function tryClassifyJsxElementName(token) { switch (token.parent && token.parent.kind) { - case 238 /* JsxOpeningElement */: + case 243 /* JsxOpeningElement */: if (token.parent.tagName === token) { return 19 /* jsxOpenTagName */; } break; - case 240 /* JsxClosingElement */: + case 245 /* JsxClosingElement */: if (token.parent.tagName === token) { return 20 /* jsxCloseTagName */; } break; - case 237 /* JsxSelfClosingElement */: + case 242 /* JsxSelfClosingElement */: if (token.parent.tagName === token) { return 21 /* jsxSelfClosingTagName */; } break; - case 241 /* JsxAttribute */: + case 246 /* JsxAttribute */: if (token.parent.name === token) { return 22 /* jsxAttribute */; } @@ -52503,17 +59186,17 @@ var ts; if (token) { if (tokenKind === 56 /* EqualsToken */) { // the '=' in a variable declaration is special cased here. - if (token.parent.kind === 214 /* VariableDeclaration */ || - token.parent.kind === 142 /* PropertyDeclaration */ || - token.parent.kind === 139 /* Parameter */ || - token.parent.kind === 241 /* JsxAttribute */) { + if (token.parent.kind === 218 /* VariableDeclaration */ || + token.parent.kind === 145 /* PropertyDeclaration */ || + token.parent.kind === 142 /* Parameter */ || + token.parent.kind === 246 /* JsxAttribute */) { return 5 /* operator */; } } - if (token.parent.kind === 184 /* BinaryExpression */ || - token.parent.kind === 182 /* PrefixUnaryExpression */ || - token.parent.kind === 183 /* PostfixUnaryExpression */ || - token.parent.kind === 185 /* ConditionalExpression */) { + if (token.parent.kind === 187 /* BinaryExpression */ || + token.parent.kind === 185 /* PrefixUnaryExpression */ || + token.parent.kind === 186 /* PostfixUnaryExpression */ || + token.parent.kind === 188 /* ConditionalExpression */) { return 5 /* operator */; } } @@ -52522,8 +59205,8 @@ var ts; else if (tokenKind === 8 /* NumericLiteral */) { return 4 /* numericLiteral */; } - else if (tokenKind === 9 /* StringLiteral */ || tokenKind === 163 /* StringLiteralType */) { - return token.parent.kind === 241 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; + else if (tokenKind === 9 /* StringLiteral */) { + return token.parent.kind === 246 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 10 /* RegularExpressionLiteral */) { // TODO: we should get another classification type for these literals. @@ -52533,40 +59216,41 @@ var ts; // TODO (drosen): we should *also* get another classification type for these literals. return 6 /* stringLiteral */; } - else if (tokenKind === 239 /* JsxText */) { + else if (tokenKind === 244 /* JsxText */) { return 23 /* jsxText */; } else if (tokenKind === 69 /* Identifier */) { if (token) { switch (token.parent.kind) { - case 217 /* ClassDeclaration */: + case 221 /* ClassDeclaration */: if (token.parent.name === token) { return 11 /* className */; } return; - case 138 /* TypeParameter */: + case 141 /* TypeParameter */: if (token.parent.name === token) { return 15 /* typeParameterName */; } return; - case 218 /* InterfaceDeclaration */: + case 222 /* InterfaceDeclaration */: if (token.parent.name === token) { return 13 /* interfaceName */; } return; - case 220 /* EnumDeclaration */: + case 224 /* EnumDeclaration */: if (token.parent.name === token) { return 12 /* enumName */; } return; - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: if (token.parent.name === token) { return 14 /* moduleName */; } return; - case 139 /* Parameter */: + case 142 /* Parameter */: if (token.parent.name === token) { - return 17 /* parameterName */; + var isThis_1 = token.kind === 69 /* Identifier */ && token.originalKeywordKind === 97 /* ThisKeyword */; + return isThis_1 ? 3 /* keyword */ : 17 /* parameterName */; } return; } @@ -52640,12 +59324,12 @@ var ts; } } function getIndentationAtPosition(fileName, position, editorOptions) { - var start = new Date().getTime(); + var start = ts.timestamp(); var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - log("getIndentationAtPosition: getCurrentSourceFile: " + (new Date().getTime() - start)); - start = new Date().getTime(); + log("getIndentationAtPosition: getCurrentSourceFile: " + (ts.timestamp() - start)); + start = ts.timestamp(); var result = ts.formatting.SmartIndenter.getIndentation(position, sourceFile, editorOptions); - log("getIndentationAtPosition: computeIndentation : " + (new Date().getTime() - start)); + log("getIndentationAtPosition: computeIndentation : " + (ts.timestamp() - start)); return result; } function getFormattingEditsForRange(fileName, start, end, options) { @@ -52708,19 +59392,19 @@ var ts; var commentOwner; findOwner: for (commentOwner = tokenAtPos; commentOwner; commentOwner = commentOwner.parent) { switch (commentOwner.kind) { - case 216 /* FunctionDeclaration */: - case 144 /* MethodDeclaration */: - case 145 /* Constructor */: - case 217 /* ClassDeclaration */: - case 196 /* VariableStatement */: + case 220 /* FunctionDeclaration */: + case 147 /* MethodDeclaration */: + case 148 /* Constructor */: + case 221 /* ClassDeclaration */: + case 200 /* VariableStatement */: break findOwner; - case 251 /* SourceFile */: + case 256 /* SourceFile */: return undefined; - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: // If in walking up the tree, we hit a a nested namespace declaration, // then we must be somewhere within a dotted namespace name; however we don't // want to give back a JSDoc template for the 'b' or 'c' in 'namespace a.b.c { }'. - if (commentOwner.parent.kind === 221 /* ModuleDeclaration */) { + if (commentOwner.parent.kind === 225 /* ModuleDeclaration */) { return undefined; } break findOwner; @@ -52757,11 +59441,34 @@ var ts; (tokenStart === position ? newLine + indentationStr : ""); return { newText: result, caretOffset: preamble.length }; } + function isValidBraceCompletionAtPosition(fileName, position, openingBrace) { + // '<' is currently not supported, figuring out if we're in a Generic Type vs. a comparison is too + // expensive to do during typing scenarios + // i.e. whether we're dealing with: + // var x = new foo<| ( with class foo{} ) + // or + // var y = 3 <| + if (openingBrace === 60 /* lessThan */) { + return false; + } + var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); + // Check if in a context where we don't want to perform any insertion + if (ts.isInString(sourceFile, position) || ts.isInComment(sourceFile, position)) { + return false; + } + if (ts.isInsideJsxElementOrAttribute(sourceFile, position)) { + return openingBrace === 123 /* openBrace */; + } + if (ts.isInTemplateString(sourceFile, position)) { + return false; + } + return true; + } function getParametersForJsDocOwningNode(commentOwner) { if (ts.isFunctionLike(commentOwner)) { return commentOwner.parameters; } - if (commentOwner.kind === 196 /* VariableStatement */) { + if (commentOwner.kind === 200 /* VariableStatement */) { var varStatement = commentOwner; var varDeclarations = varStatement.declarationList.declarations; if (varDeclarations.length === 1 && varDeclarations[0].initializer) { @@ -52779,17 +59486,17 @@ var ts; * @returns the parameters of a signature found on the RHS if one exists; otherwise 'emptyArray'. */ function getParametersFromRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 175 /* ParenthesizedExpression */) { + while (rightHandSide.kind === 178 /* ParenthesizedExpression */) { rightHandSide = rightHandSide.expression; } switch (rightHandSide.kind) { - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: return rightHandSide.parameters; - case 189 /* ClassExpression */: + case 192 /* ClassExpression */: for (var _i = 0, _a = rightHandSide.members; _i < _a.length; _i++) { var member = _a[_i]; - if (member.kind === 145 /* Constructor */) { + if (member.kind === 148 /* Constructor */) { return member.parameters; } } @@ -52882,11 +59589,11 @@ var ts; // comment portion. var singleLineCommentStart = /(?:\/\/+\s*)/.source; var multiLineCommentStart = /(?:\/\*+\s*)/.source; - var anyNumberOfSpacesAndAsterixesAtStartOfLine = /(?:^(?:\s|\*)*)/.source; + var anyNumberOfSpacesAndAsterisksAtStartOfLine = /(?:^(?:\s|\*)*)/.source; // Match any of the above three TODO comment start regexps. // Note that the outermost group *is* a capture group. We want to capture the preamble // so that we can determine the starting position of the TODO comment match. - var preamble = "(" + anyNumberOfSpacesAndAsterixesAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; + var preamble = "(" + anyNumberOfSpacesAndAsterisksAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; // Takes the descriptors and forms a regexp that matches them as if they were literals. // For example, if the descriptors are "TODO(jason)" and "HACK", then this will be: // @@ -52921,47 +59628,68 @@ var ts; (char >= 48 /* _0 */ && char <= 57 /* _9 */); } } + function getStringLiteralTypeForNode(node, typeChecker) { + var searchNode = node.parent.kind === 166 /* LiteralType */ ? node.parent : node; + var type = typeChecker.getTypeAtLocation(searchNode); + if (type && type.flags & 32 /* StringLiteral */) { + return type; + } + return undefined; + } function getRenameInfo(fileName, position) { synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); var typeChecker = program.getTypeChecker(); - var node = ts.getTouchingWord(sourceFile, position); - // Can only rename an identifier. - if (node && node.kind === 69 /* Identifier */) { - var symbol = typeChecker.getSymbolAtLocation(node); - // Only allow a symbol to be renamed if it actually has at least one declaration. - if (symbol) { - var declarations = symbol.getDeclarations(); - if (declarations && declarations.length > 0) { - // Disallow rename for elements that are defined in the standard TypeScript library. - var defaultLibFileName = host.getDefaultLibFileName(host.getCompilationSettings()); - var canonicalDefaultLibName = getCanonicalFileName(ts.normalizePath(defaultLibFileName)); - if (defaultLibFileName) { - for (var _i = 0, declarations_10 = declarations; _i < declarations_10.length; _i++) { - var current = declarations_10[_i]; - var sourceFile_3 = current.getSourceFile(); - // TODO (drosen): When is there no source file? - if (!sourceFile_3) { - continue; - } - var canonicalName = getCanonicalFileName(ts.normalizePath(sourceFile_3.fileName)); - if (canonicalName === canonicalDefaultLibName) { - return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library)); - } + var defaultLibFileName = host.getDefaultLibFileName(host.getCompilationSettings()); + var canonicalDefaultLibName = getCanonicalFileName(ts.normalizePath(defaultLibFileName)); + var node = ts.getTouchingWord(sourceFile, position, /*includeJsDocComment*/ true); + if (node) { + if (node.kind === 69 /* Identifier */ || + node.kind === 9 /* StringLiteral */ || + isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || + isThis(node)) { + var symbol = typeChecker.getSymbolAtLocation(node); + // Only allow a symbol to be renamed if it actually has at least one declaration. + if (symbol) { + var declarations = symbol.getDeclarations(); + if (declarations && declarations.length > 0) { + // Disallow rename for elements that are defined in the standard TypeScript library. + if (ts.forEach(declarations, isDefinedInLibraryFile)) { + return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library)); + } + var displayName = ts.stripQuotes(ts.getDeclaredName(typeChecker, symbol, node)); + var kind = getSymbolKind(symbol, node); + if (kind) { + return { + canRename: true, + kind: kind, + displayName: displayName, + localizedErrorMessage: undefined, + fullDisplayName: typeChecker.getFullyQualifiedName(symbol), + kindModifiers: getSymbolModifiers(symbol), + triggerSpan: createTriggerSpanForNode(node, sourceFile) + }; } } - var displayName = ts.stripQuotes(ts.getDeclaredName(typeChecker, symbol, node)); - var kind = getSymbolKind(symbol, node); - if (kind) { - return { - canRename: true, - kind: kind, - displayName: displayName, - localizedErrorMessage: undefined, - fullDisplayName: typeChecker.getFullyQualifiedName(symbol), - kindModifiers: getSymbolModifiers(symbol), - triggerSpan: ts.createTextSpan(node.getStart(), node.getWidth()) - }; + } + else if (node.kind === 9 /* StringLiteral */) { + var type = getStringLiteralTypeForNode(node, typeChecker); + if (type) { + if (isDefinedInLibraryFile(node)) { + return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library)); + } + else { + var displayName = ts.stripQuotes(type.text); + return { + canRename: true, + kind: ScriptElementKind.variableElement, + displayName: displayName, + localizedErrorMessage: undefined, + fullDisplayName: displayName, + kindModifiers: ScriptElementKindModifier.none, + triggerSpan: createTriggerSpanForNode(node, sourceFile) + }; + } } } } @@ -52978,6 +59706,26 @@ var ts; triggerSpan: undefined }; } + function isDefinedInLibraryFile(declaration) { + if (defaultLibFileName) { + var sourceFile_2 = declaration.getSourceFile(); + var canonicalName = getCanonicalFileName(ts.normalizePath(sourceFile_2.fileName)); + if (canonicalName === canonicalDefaultLibName) { + return true; + } + } + return false; + } + function createTriggerSpanForNode(node, sourceFile) { + var start = node.getStart(sourceFile); + var width = node.getWidth(sourceFile); + if (node.kind === 9 /* StringLiteral */) { + // Exclude the quotes + start += 1; + width -= 2; + } + return ts.createTextSpan(start, width); + } } return { dispose: dispose, @@ -53013,7 +59761,9 @@ var ts; getFormattingEditsForDocument: getFormattingEditsForDocument, getFormattingEditsAfterKeystroke: getFormattingEditsAfterKeystroke, getDocCommentTemplateAtPosition: getDocCommentTemplateAtPosition, + isValidBraceCompletionAtPosition: isValidBraceCompletionAtPosition, getEmitOutput: getEmitOutput, + getNonBoundSourceFile: getNonBoundSourceFile, getSourceFile: getSourceFile, getProgram: getProgram }; @@ -53028,7 +59778,7 @@ var ts; } ts.getNameTable = getNameTable; function initializeNameTable(sourceFile) { - var nameTable = {}; + var nameTable = ts.createMap(); walk(sourceFile); sourceFile.nameTable = nameTable; function walk(node) { @@ -53043,20 +59793,27 @@ var ts; // then we want 'something' to be in the name table. Similarly, if we have // "a['propname']" then we want to store "propname" in the name table. if (ts.isDeclarationName(node) || - node.parent.kind === 235 /* ExternalModuleReference */ || - isArgumentOfElementAccessExpression(node)) { + node.parent.kind === 240 /* ExternalModuleReference */ || + isArgumentOfElementAccessExpression(node) || + ts.isLiteralComputedPropertyDeclarationName(node)) { nameTable[node.text] = nameTable[node.text] === undefined ? node.pos : -1; } break; default: ts.forEachChild(node, walk); + if (node.jsDocComments) { + for (var _i = 0, _a = node.jsDocComments; _i < _a.length; _i++) { + var jsDocComment = _a[_i]; + ts.forEachChild(jsDocComment, walk); + } + } } } } function isArgumentOfElementAccessExpression(node) { return node && node.parent && - node.parent.kind === 170 /* ElementAccessExpression */ && + node.parent.kind === 173 /* ElementAccessExpression */ && node.parent.argumentExpression === node; } /// Classifier @@ -53104,7 +59861,7 @@ var ts; function canFollow(keyword1, keyword2) { if (ts.isAccessibilityModifier(keyword1)) { if (keyword2 === 123 /* GetKeyword */ || - keyword2 === 129 /* SetKeyword */ || + keyword2 === 131 /* SetKeyword */ || keyword2 === 121 /* ConstructorKeyword */ || keyword2 === 113 /* StaticKeyword */) { // Allow things like "public get", "public constructor" and "public static". @@ -53125,7 +59882,7 @@ var ts; var lastEnd = 0; for (var i = 0, n = dense.length; i < n; i += 3) { var start = dense[i]; - var length_3 = dense[i + 1]; + var length_4 = dense[i + 1]; var type = dense[i + 2]; // Make a whitespace entry between the last item and this one. if (lastEnd >= 0) { @@ -53134,8 +59891,8 @@ var ts; entries.push({ length: whitespaceLength_1, classification: TokenClass.Whitespace }); } } - entries.push({ length: length_3, classification: convertClassification(type) }); - lastEnd = start + length_3; + entries.push({ length: length_4, classification: convertClassification(type) }); + lastEnd = start + length_4; } var whitespaceLength = text.length - lastEnd; if (whitespaceLength > 0) { @@ -53263,10 +60020,10 @@ var ts; angleBracketStack--; } else if (token === 117 /* AnyKeyword */ || - token === 130 /* StringKeyword */ || - token === 128 /* NumberKeyword */ || + token === 132 /* StringKeyword */ || + token === 130 /* NumberKeyword */ || token === 120 /* BooleanKeyword */ || - token === 131 /* SymbolKeyword */) { + token === 133 /* SymbolKeyword */) { if (angleBracketStack > 0 && !syntacticClassifierAbsent) { // If it looks like we're could be in something generic, don't classify this // as a keyword. We may just get overwritten by the syntactic classifier, @@ -53315,7 +60072,7 @@ var ts; var end = scanner.getTextPos(); addResult(start, end, classFromKind(token)); if (end >= text.length) { - if (token === 9 /* StringLiteral */ || token === 163 /* StringLiteralType */) { + if (token === 9 /* StringLiteral */) { // Check to see if we finished up on a multiline string literal. var tokenText = scanner.getTokenText(); if (scanner.isUnterminated()) { @@ -53438,7 +60195,7 @@ var ts; } } function isKeyword(token) { - return token >= 70 /* FirstKeyword */ && token <= 135 /* LastKeyword */; + return token >= 70 /* FirstKeyword */ && token <= 138 /* LastKeyword */; } function classFromKind(token) { if (isKeyword(token)) { @@ -53454,7 +60211,6 @@ var ts; case 8 /* NumericLiteral */: return 4 /* numericLiteral */; case 9 /* StringLiteral */: - case 163 /* StringLiteralType */: return 6 /* stringLiteral */; case 10 /* RegularExpressionLiteral */: return 7 /* regularExpressionLiteral */; @@ -53495,6 +60251,8 @@ var ts; function initializeServices() { ts.objectAllocator = { getNodeConstructor: function () { return NodeObject; }, + getTokenConstructor: function () { return TokenObject; }, + getIdentifierConstructor: function () { return IdentifierObject; }, getSourceFileConstructor: function () { return SourceFileObject; }, getSymbolConstructor: function () { return SymbolObject; }, getTypeConstructor: function () { return TypeObject; }, @@ -53503,7 +60261,7 @@ var ts; } initializeServices(); })(ts || (ts = {})); -// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. +// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// /* @internal */ @@ -53516,7 +60274,7 @@ var ts; */ function spanInSourceFileAtLocation(sourceFile, position) { // Cannot set breakpoint in dts file - if (sourceFile.flags & 4096 /* DeclarationFile */) { + if (sourceFile.isDeclarationFile) { return undefined; } var tokenAtLocation = ts.getTokenAtPosition(sourceFile, position); @@ -53524,11 +60282,11 @@ var ts; if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart(sourceFile)).line > lineOfPosition) { // Get previous token if the token is returned starts on new line // eg: let x =10; |--- cursor is here - // let y = 10; - // token at position will return let keyword on second line as the token but we would like to use + // let y = 10; + // token at position will return let keyword on second line as the token but we would like to use // token on same line if trailing trivia (comments or white spaces on same line) part of the last token on that line tokenAtLocation = ts.findPrecedingToken(tokenAtLocation.pos, sourceFile); - // Its a blank line + // It's a blank line if (!tokenAtLocation || sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getEnd()).line !== lineOfPosition) { return undefined; } @@ -53566,113 +60324,113 @@ var ts; function spanInNode(node) { if (node) { switch (node.kind) { - case 196 /* VariableStatement */: + case 200 /* VariableStatement */: // Span on first variable declaration return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 214 /* VariableDeclaration */: - case 142 /* PropertyDeclaration */: - case 141 /* PropertySignature */: + case 218 /* VariableDeclaration */: + case 145 /* PropertyDeclaration */: + case 144 /* PropertySignature */: return spanInVariableDeclaration(node); - case 139 /* Parameter */: + case 142 /* Parameter */: return spanInParameterDeclaration(node); - case 216 /* FunctionDeclaration */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 145 /* Constructor */: - case 176 /* FunctionExpression */: - case 177 /* ArrowFunction */: + case 220 /* FunctionDeclaration */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 148 /* Constructor */: + case 179 /* FunctionExpression */: + case 180 /* ArrowFunction */: return spanInFunctionDeclaration(node); - case 195 /* Block */: + case 199 /* Block */: if (ts.isFunctionBlock(node)) { return spanInFunctionBlock(node); } // Fall through - case 222 /* ModuleBlock */: + case 226 /* ModuleBlock */: return spanInBlock(node); - case 247 /* CatchClause */: + case 252 /* CatchClause */: return spanInBlock(node.block); - case 198 /* ExpressionStatement */: + case 202 /* ExpressionStatement */: // span on the expression return textSpan(node.expression); - case 207 /* ReturnStatement */: + case 211 /* ReturnStatement */: // span on return keyword and expression if present return textSpan(node.getChildAt(0), node.expression); - case 201 /* WhileStatement */: + case 205 /* WhileStatement */: // Span on while(...) return textSpanEndingAtNextToken(node, node.expression); - case 200 /* DoStatement */: + case 204 /* DoStatement */: // span in statement of the do statement return spanInNode(node.statement); - case 213 /* DebuggerStatement */: + case 217 /* DebuggerStatement */: // span on debugger keyword return textSpan(node.getChildAt(0)); - case 199 /* IfStatement */: + case 203 /* IfStatement */: // set on if(..) span return textSpanEndingAtNextToken(node, node.expression); - case 210 /* LabeledStatement */: + case 214 /* LabeledStatement */: // span in statement return spanInNode(node.statement); - case 206 /* BreakStatement */: - case 205 /* ContinueStatement */: + case 210 /* BreakStatement */: + case 209 /* ContinueStatement */: // On break or continue keyword and label if present return textSpan(node.getChildAt(0), node.label); - case 202 /* ForStatement */: + case 206 /* ForStatement */: return spanInForStatement(node); - case 203 /* ForInStatement */: + case 207 /* ForInStatement */: // span of for (a in ...) return textSpanEndingAtNextToken(node, node.expression); - case 204 /* ForOfStatement */: + case 208 /* ForOfStatement */: // span in initializer return spanInInitializerOfForLike(node); - case 209 /* SwitchStatement */: + case 213 /* SwitchStatement */: // span on switch(...) return textSpanEndingAtNextToken(node, node.expression); - case 244 /* CaseClause */: - case 245 /* DefaultClause */: + case 249 /* CaseClause */: + case 250 /* DefaultClause */: // span in first statement of the clause return spanInNode(node.statements[0]); - case 212 /* TryStatement */: + case 216 /* TryStatement */: // span in try block return spanInBlock(node.tryBlock); - case 211 /* ThrowStatement */: + case 215 /* ThrowStatement */: // span in throw ... return textSpan(node, node.expression); - case 230 /* ExportAssignment */: + case 235 /* ExportAssignment */: // span on export = id return textSpan(node, node.expression); - case 224 /* ImportEqualsDeclaration */: + case 229 /* ImportEqualsDeclaration */: // import statement without including semicolon return textSpan(node, node.moduleReference); - case 225 /* ImportDeclaration */: + case 230 /* ImportDeclaration */: // import statement without including semicolon return textSpan(node, node.moduleSpecifier); - case 231 /* ExportDeclaration */: + case 236 /* ExportDeclaration */: // import statement without including semicolon return textSpan(node, node.moduleSpecifier); - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: // span on complete module if it is instantiated if (ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { return undefined; } - case 217 /* ClassDeclaration */: - case 220 /* EnumDeclaration */: - case 250 /* EnumMember */: - case 166 /* BindingElement */: + case 221 /* ClassDeclaration */: + case 224 /* EnumDeclaration */: + case 255 /* EnumMember */: + case 169 /* BindingElement */: // span on complete node return textSpan(node); - case 208 /* WithStatement */: + case 212 /* WithStatement */: // span in statement return spanInNode(node.statement); - case 140 /* Decorator */: + case 143 /* Decorator */: return spanInNodeArray(node.parent.decorators); - case 164 /* ObjectBindingPattern */: - case 165 /* ArrayBindingPattern */: + case 167 /* ObjectBindingPattern */: + case 168 /* ArrayBindingPattern */: return spanInBindingPattern(node); // No breakpoint in interface, type alias - case 218 /* InterfaceDeclaration */: - case 219 /* TypeAliasDeclaration */: + case 222 /* InterfaceDeclaration */: + case 223 /* TypeAliasDeclaration */: return undefined; // Tokens: case 23 /* SemicolonToken */: @@ -53702,7 +60460,7 @@ var ts; case 72 /* CatchKeyword */: case 85 /* FinallyKeyword */: return spanInNextNode(node); - case 135 /* OfKeyword */: + case 138 /* OfKeyword */: return spanInOfKeyword(node); default: // Destructuring pattern in destructuring assignment @@ -53712,20 +60470,20 @@ var ts; return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); } // Set breakpoint on identifier element of destructuring pattern - // a or ...c or d: x from + // a or ...c or d: x from // [a, b, ...c] or { a, b } or { d: x } from destructuring pattern if ((node.kind === 69 /* Identifier */ || - node.kind == 188 /* SpreadElementExpression */ || - node.kind === 248 /* PropertyAssignment */ || - node.kind === 249 /* ShorthandPropertyAssignment */) && + node.kind == 191 /* SpreadElementExpression */ || + node.kind === 253 /* PropertyAssignment */ || + node.kind === 254 /* ShorthandPropertyAssignment */) && ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { return textSpan(node); } - if (node.kind === 184 /* BinaryExpression */) { + if (node.kind === 187 /* BinaryExpression */) { var binaryExpression = node; // Set breakpoint in destructuring pattern if its destructuring assignment // [a, b, c] or {a, b, c} of - // [a, b, c] = expression or + // [a, b, c] = expression or // {a, b, c} = expression if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left)) { return spanInArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left); @@ -53733,8 +60491,8 @@ var ts; if (binaryExpression.operatorToken.kind === 56 /* EqualsToken */ && ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.parent)) { // Set breakpoint on assignment expression element of destructuring pattern - // a = expression of - // [a = expression, b, c] = someExpression or + // a = expression of + // [a = expression, b, c] = someExpression or // { a = expression, b, c } = someExpression return textSpan(node); } @@ -53744,22 +60502,22 @@ var ts; } if (ts.isExpression(node)) { switch (node.parent.kind) { - case 200 /* DoStatement */: + case 204 /* DoStatement */: // Set span as if on while keyword return spanInPreviousNode(node); - case 140 /* Decorator */: + case 143 /* Decorator */: // Set breakpoint on the decorator emit return spanInNode(node.parent); - case 202 /* ForStatement */: - case 204 /* ForOfStatement */: + case 206 /* ForStatement */: + case 208 /* ForOfStatement */: return textSpan(node); - case 184 /* BinaryExpression */: + case 187 /* BinaryExpression */: if (node.parent.operatorToken.kind === 24 /* CommaToken */) { - // if this is comma expression, the breakpoint is possible in this expression + // If this is a comma expression, the breakpoint is possible in this expression return textSpan(node); } break; - case 177 /* ArrowFunction */: + case 180 /* ArrowFunction */: if (node.parent.body === node) { // If this is body of arrow function, it is allowed to have the breakpoint return textSpan(node); @@ -53768,13 +60526,13 @@ var ts; } } // If this is name of property assignment, set breakpoint in the initializer - if (node.parent.kind === 248 /* PropertyAssignment */ && + if (node.parent.kind === 253 /* PropertyAssignment */ && node.parent.name === node && !ts.isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { return spanInNode(node.parent.initializer); } // Breakpoint in type assertion goes to its operand - if (node.parent.kind === 174 /* TypeAssertionExpression */ && node.parent.type === node) { + if (node.parent.kind === 177 /* TypeAssertionExpression */ && node.parent.type === node) { return spanInNextNode(node.parent.type); } // return type of function go to previous token @@ -53782,8 +60540,8 @@ var ts; return spanInPreviousNode(node); } // initializer of variable/parameter declaration go to previous node - if ((node.parent.kind === 214 /* VariableDeclaration */ || - node.parent.kind === 139 /* Parameter */)) { + if ((node.parent.kind === 218 /* VariableDeclaration */ || + node.parent.kind === 142 /* Parameter */)) { var paramOrVarDecl = node.parent; if (paramOrVarDecl.initializer === node || paramOrVarDecl.type === node || @@ -53791,7 +60549,7 @@ var ts; return spanInPreviousNode(node); } } - if (node.parent.kind === 184 /* BinaryExpression */) { + if (node.parent.kind === 187 /* BinaryExpression */) { var binaryExpression = node.parent; if (ts.isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left) && (binaryExpression.right === node || @@ -53817,25 +60575,25 @@ var ts; } function spanInVariableDeclaration(variableDeclaration) { // If declaration of for in statement, just set the span in parent - if (variableDeclaration.parent.parent.kind === 203 /* ForInStatement */) { + if (variableDeclaration.parent.parent.kind === 207 /* ForInStatement */) { return spanInNode(variableDeclaration.parent.parent); } - // If this is a destructuring pattern set breakpoint in binding pattern + // If this is a destructuring pattern, set breakpoint in binding pattern if (ts.isBindingPattern(variableDeclaration.name)) { return spanInBindingPattern(variableDeclaration.name); } // Breakpoint is possible in variableDeclaration only if there is initialization // or its declaration from 'for of' if (variableDeclaration.initializer || - (variableDeclaration.flags & 2 /* Export */) || - variableDeclaration.parent.parent.kind === 204 /* ForOfStatement */) { + (variableDeclaration.flags & 1 /* Export */) || + variableDeclaration.parent.parent.kind === 208 /* ForOfStatement */) { return textSpanFromVariableDeclaration(variableDeclaration); } var declarations = variableDeclaration.parent.declarations; if (declarations && declarations[0] !== variableDeclaration) { - // If we cant set breakpoint on this declaration, set it on previous one - // Because the variable declaration may be binding pattern and - // we would like to set breakpoint in last binding element if thats the case, + // If we cannot set breakpoint on this declaration, set it on previous one + // Because the variable declaration may be binding pattern and + // we would like to set breakpoint in last binding element if that's the case, // use preceding token instead return spanInNode(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent)); } @@ -53843,11 +60601,11 @@ var ts; function canHaveSpanInParameterDeclaration(parameter) { // Breakpoint is possible on parameter only if it has initializer, is a rest parameter, or has public or private modifier return !!parameter.initializer || parameter.dotDotDotToken !== undefined || - !!(parameter.flags & 8 /* Public */) || !!(parameter.flags & 16 /* Private */); + !!(parameter.flags & 4 /* Public */) || !!(parameter.flags & 8 /* Private */); } function spanInParameterDeclaration(parameter) { if (ts.isBindingPattern(parameter.name)) { - // set breakpoint in binding pattern + // Set breakpoint in binding pattern return spanInBindingPattern(parameter.name); } else if (canHaveSpanInParameterDeclaration(parameter)) { @@ -53867,8 +60625,8 @@ var ts; } } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return !!(functionDeclaration.flags & 2 /* Export */) || - (functionDeclaration.parent.kind === 217 /* ClassDeclaration */ && functionDeclaration.kind !== 145 /* Constructor */); + return !!(functionDeclaration.flags & 1 /* Export */) || + (functionDeclaration.parent.kind === 221 /* ClassDeclaration */ && functionDeclaration.kind !== 148 /* Constructor */); } function spanInFunctionDeclaration(functionDeclaration) { // No breakpoints in the function signature @@ -53891,34 +60649,34 @@ var ts; } function spanInBlock(block) { switch (block.parent.kind) { - case 221 /* ModuleDeclaration */: + case 225 /* ModuleDeclaration */: if (ts.getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { return undefined; } // Set on parent if on same line otherwise on first statement - case 201 /* WhileStatement */: - case 199 /* IfStatement */: - case 203 /* ForInStatement */: + case 205 /* WhileStatement */: + case 203 /* IfStatement */: + case 207 /* ForInStatement */: return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); // Set span on previous token if it starts on same line otherwise on the first statement of the block - case 202 /* ForStatement */: - case 204 /* ForOfStatement */: + case 206 /* ForStatement */: + case 208 /* ForOfStatement */: return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); } // Default action is to set on first statement return spanInNode(block.statements[0]); } - function spanInInitializerOfForLike(forLikeStaement) { - if (forLikeStaement.initializer.kind === 215 /* VariableDeclarationList */) { - // declaration list, set breakpoint in first declaration - var variableDeclarationList = forLikeStaement.initializer; + function spanInInitializerOfForLike(forLikeStatement) { + if (forLikeStatement.initializer.kind === 219 /* VariableDeclarationList */) { + // Declaration list - set breakpoint in first declaration + var variableDeclarationList = forLikeStatement.initializer; if (variableDeclarationList.declarations.length > 0) { return spanInNode(variableDeclarationList.declarations[0]); } } else { // Expression - set breakpoint in it - return spanInNode(forLikeStaement.initializer); + return spanInNode(forLikeStatement.initializer); } } function spanInForStatement(forStatement) { @@ -53934,42 +60692,42 @@ var ts; } function spanInBindingPattern(bindingPattern) { // Set breakpoint in first binding element - var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 190 /* OmittedExpression */ ? element : undefined; }); + var firstBindingElement = ts.forEach(bindingPattern.elements, function (element) { return element.kind !== 193 /* OmittedExpression */ ? element : undefined; }); if (firstBindingElement) { return spanInNode(firstBindingElement); } // Empty binding pattern of binding element, set breakpoint on binding element - if (bindingPattern.parent.kind === 166 /* BindingElement */) { + if (bindingPattern.parent.kind === 169 /* BindingElement */) { return textSpan(bindingPattern.parent); } // Variable declaration is used as the span return textSpanFromVariableDeclaration(bindingPattern.parent); } function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node) { - ts.Debug.assert(node.kind !== 165 /* ArrayBindingPattern */ && node.kind !== 164 /* ObjectBindingPattern */); - var elements = node.kind === 167 /* ArrayLiteralExpression */ ? + ts.Debug.assert(node.kind !== 168 /* ArrayBindingPattern */ && node.kind !== 167 /* ObjectBindingPattern */); + var elements = node.kind === 170 /* ArrayLiteralExpression */ ? node.elements : node.properties; - var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 190 /* OmittedExpression */ ? element : undefined; }); + var firstBindingElement = ts.forEach(elements, function (element) { return element.kind !== 193 /* OmittedExpression */ ? element : undefined; }); if (firstBindingElement) { return spanInNode(firstBindingElement); } - // Could be ArrayLiteral from destructuring assignment or + // Could be ArrayLiteral from destructuring assignment or // just nested element in another destructuring assignment // set breakpoint on assignment when parent is destructuring assignment // Otherwise set breakpoint for this element - return textSpan(node.parent.kind === 184 /* BinaryExpression */ ? node.parent : node); + return textSpan(node.parent.kind === 187 /* BinaryExpression */ ? node.parent : node); } // Tokens: function spanInOpenBraceToken(node) { switch (node.parent.kind) { - case 220 /* EnumDeclaration */: + case 224 /* EnumDeclaration */: var enumDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 217 /* ClassDeclaration */: + case 221 /* ClassDeclaration */: var classDeclaration = node.parent; return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 223 /* CaseBlock */: + case 227 /* CaseBlock */: return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]); } // Default to parent node @@ -53977,24 +60735,24 @@ var ts; } function spanInCloseBraceToken(node) { switch (node.parent.kind) { - case 222 /* ModuleBlock */: - // If this is not instantiated module block no bp span + case 226 /* ModuleBlock */: + // If this is not an instantiated module block, no bp span if (ts.getModuleInstanceState(node.parent.parent) !== 1 /* Instantiated */) { return undefined; } - case 220 /* EnumDeclaration */: - case 217 /* ClassDeclaration */: + case 224 /* EnumDeclaration */: + case 221 /* ClassDeclaration */: // Span on close brace token return textSpan(node); - case 195 /* Block */: + case 199 /* Block */: if (ts.isFunctionBlock(node.parent)) { // Span on close brace token return textSpan(node); } - // fall through. - case 247 /* CatchClause */: + // fall through + case 252 /* CatchClause */: return spanInNode(ts.lastOrUndefined(node.parent.statements)); - case 223 /* CaseBlock */: + case 227 /* CaseBlock */: // breakpoint in last statement of the last clause var caseBlock = node.parent; var lastClause = ts.lastOrUndefined(caseBlock.clauses); @@ -54002,7 +60760,7 @@ var ts; return spanInNode(ts.lastOrUndefined(lastClause.statements)); } return undefined; - case 164 /* ObjectBindingPattern */: + case 167 /* ObjectBindingPattern */: // Breakpoint in last binding element or binding pattern if it contains no elements var bindingPattern = node.parent; return spanInNode(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); @@ -54018,7 +60776,7 @@ var ts; } function spanInCloseBracketToken(node) { switch (node.parent.kind) { - case 165 /* ArrayBindingPattern */: + case 168 /* ArrayBindingPattern */: // Breakpoint in last binding element or binding pattern if it contains no elements var bindingPattern = node.parent; return textSpan(ts.lastOrUndefined(bindingPattern.elements) || bindingPattern); @@ -54033,12 +60791,12 @@ var ts; } } function spanInOpenParenToken(node) { - if (node.parent.kind === 200 /* DoStatement */ || - node.parent.kind === 171 /* CallExpression */ || - node.parent.kind === 172 /* NewExpression */) { + if (node.parent.kind === 204 /* DoStatement */ || + node.parent.kind === 174 /* CallExpression */ || + node.parent.kind === 175 /* NewExpression */) { return spanInPreviousNode(node); } - if (node.parent.kind === 175 /* ParenthesizedExpression */) { + if (node.parent.kind === 178 /* ParenthesizedExpression */) { return spanInNextNode(node); } // Default to parent node @@ -54047,21 +60805,21 @@ var ts; function spanInCloseParenToken(node) { // Is this close paren token of parameter list, set span in previous token switch (node.parent.kind) { - case 176 /* FunctionExpression */: - case 216 /* FunctionDeclaration */: - case 177 /* ArrowFunction */: - case 144 /* MethodDeclaration */: - case 143 /* MethodSignature */: - case 146 /* GetAccessor */: - case 147 /* SetAccessor */: - case 145 /* Constructor */: - case 201 /* WhileStatement */: - case 200 /* DoStatement */: - case 202 /* ForStatement */: - case 204 /* ForOfStatement */: - case 171 /* CallExpression */: - case 172 /* NewExpression */: - case 175 /* ParenthesizedExpression */: + case 179 /* FunctionExpression */: + case 220 /* FunctionDeclaration */: + case 180 /* ArrowFunction */: + case 147 /* MethodDeclaration */: + case 146 /* MethodSignature */: + case 149 /* GetAccessor */: + case 150 /* SetAccessor */: + case 148 /* Constructor */: + case 205 /* WhileStatement */: + case 204 /* DoStatement */: + case 206 /* ForStatement */: + case 208 /* ForOfStatement */: + case 174 /* CallExpression */: + case 175 /* NewExpression */: + case 178 /* ParenthesizedExpression */: return spanInPreviousNode(node); // Default to parent node default: @@ -54071,20 +60829,20 @@ var ts; function spanInColonToken(node) { // Is this : specifying return annotation of the function declaration if (ts.isFunctionLike(node.parent) || - node.parent.kind === 248 /* PropertyAssignment */ || - node.parent.kind === 139 /* Parameter */) { + node.parent.kind === 253 /* PropertyAssignment */ || + node.parent.kind === 142 /* Parameter */) { return spanInPreviousNode(node); } return spanInNode(node.parent); } function spanInGreaterThanOrLessThanToken(node) { - if (node.parent.kind === 174 /* TypeAssertionExpression */) { + if (node.parent.kind === 177 /* TypeAssertionExpression */) { return spanInNextNode(node); } return spanInNode(node.parent); } function spanInWhileKeyword(node) { - if (node.parent.kind === 200 /* DoStatement */) { + if (node.parent.kind === 204 /* DoStatement */) { // Set span on while expression return textSpanEndingAtNextToken(node, node.parent.expression); } @@ -54092,8 +60850,8 @@ var ts; return spanInNode(node.parent); } function spanInOfKeyword(node) { - if (node.parent.kind === 204 /* ForOfStatement */) { - // set using next token + if (node.parent.kind === 208 /* ForOfStatement */) { + // Set using next token return spanInNextNode(node); } // Default to parent node @@ -54120,9 +60878,9 @@ var ts; // /// /* @internal */ -var debugObjectHost = this; +var debugObjectHost = new Function("return this")(); // We need to use 'null' to interface with the managed side. -/* tslint:disable:no-null */ +/* tslint:disable:no-null-keyword */ /* tslint:disable:no-in-operator */ /* @internal */ var ts; @@ -54168,12 +60926,12 @@ var ts; this.loggingEnabled = false; this.tracingEnabled = false; // if shimHost is a COM object then property check will become method call with no arguments. - // 'in' does not have this effect. + // 'in' does not have this effect. if ("getModuleResolutionsForFile" in this.shimHost) { this.resolveModuleNames = function (moduleNames, containingFile) { var resolutionsInFile = JSON.parse(_this.shimHost.getModuleResolutionsForFile(containingFile)); return ts.map(moduleNames, function (name) { - var result = ts.lookUp(resolutionsInFile, name); + var result = ts.getProperty(resolutionsInFile, name); return result ? { resolvedFileName: result } : undefined; }); }; @@ -54181,6 +60939,12 @@ var ts; if ("directoryExists" in this.shimHost) { this.directoryExists = function (directoryName) { return _this.shimHost.directoryExists(directoryName); }; } + if ("getTypeReferenceDirectiveResolutionsForFile" in this.shimHost) { + this.resolveTypeReferenceDirectives = function (typeDirectiveNames, containingFile) { + var typeDirectivesForFile = JSON.parse(_this.shimHost.getTypeReferenceDirectiveResolutionsForFile(containingFile)); + return ts.map(typeDirectiveNames, function (name) { return ts.getProperty(typeDirectivesForFile, name); }); + }; + } } LanguageServiceShimHostAdapter.prototype.log = function (s) { if (this.loggingEnabled) { @@ -54252,6 +61016,9 @@ var ts; LanguageServiceShimHostAdapter.prototype.getCurrentDirectory = function () { return this.shimHost.getCurrentDirectory(); }; + LanguageServiceShimHostAdapter.prototype.getDirectories = function (path) { + return JSON.parse(this.shimHost.getDirectories(path)); + }; LanguageServiceShimHostAdapter.prototype.getDefaultLibFileName = function (options) { return this.shimHost.getDefaultLibFileName(JSON.stringify(options)); }; @@ -54268,7 +61035,7 @@ var ts; this.lastCancellationCheckTime = 0; } ThrottledCancellationToken.prototype.isCancellationRequested = function () { - var time = Date.now(); + var time = ts.timestamp(); var duration = Math.abs(time - this.lastCancellationCheckTime); if (duration > 10) { // Check no more than once every 10 ms. @@ -54283,21 +61050,34 @@ var ts; function CoreServicesShimHostAdapter(shimHost) { var _this = this; this.shimHost = shimHost; + this.useCaseSensitiveFileNames = this.shimHost.useCaseSensitiveFileNames ? this.shimHost.useCaseSensitiveFileNames() : false; if ("directoryExists" in this.shimHost) { this.directoryExists = function (directoryName) { return _this.shimHost.directoryExists(directoryName); }; } + if ("realpath" in this.shimHost) { + this.realpath = function (path) { return _this.shimHost.realpath(path); }; + } } - CoreServicesShimHostAdapter.prototype.readDirectory = function (rootDir, extension, exclude, depth) { + CoreServicesShimHostAdapter.prototype.readDirectory = function (rootDir, extensions, exclude, include, depth) { // Wrap the API changes for 2.0 release. This try/catch // should be removed once TypeScript 2.0 has shipped. - var encoded; try { - encoded = this.shimHost.readDirectory(rootDir, extension, JSON.stringify(exclude), depth); + var pattern = ts.getFileMatcherPatterns(rootDir, extensions, exclude, include, this.shimHost.useCaseSensitiveFileNames(), this.shimHost.getCurrentDirectory()); + return JSON.parse(this.shimHost.readDirectory(rootDir, JSON.stringify(extensions), JSON.stringify(pattern.basePaths), pattern.excludePattern, pattern.includeFilePattern, pattern.includeDirectoryPattern, depth)); } catch (e) { - encoded = this.shimHost.readDirectory(rootDir, extension, JSON.stringify(exclude)); + var results = []; + for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) { + var extension = extensions_2[_i]; + for (var _a = 0, _b = this.readDirectoryFallback(rootDir, extension, exclude); _a < _b.length; _a++) { + var file = _b[_a]; + if (!ts.contains(results, file)) { + results.push(file); + } + } + } + return results; } - return JSON.parse(encoded); }; CoreServicesShimHostAdapter.prototype.fileExists = function (fileName) { return this.shimHost.fileExists(fileName); @@ -54305,6 +61085,12 @@ var ts; CoreServicesShimHostAdapter.prototype.readFile = function (fileName) { return this.shimHost.readFile(fileName); }; + CoreServicesShimHostAdapter.prototype.readDirectoryFallback = function (rootDir, extension, exclude) { + return JSON.parse(this.shimHost.readDirectory(rootDir, extension, JSON.stringify(exclude))); + }; + CoreServicesShimHostAdapter.prototype.getDirectories = function (path) { + return JSON.parse(this.shimHost.getDirectories(path)); + }; return CoreServicesShimHostAdapter; }()); ts.CoreServicesShimHostAdapter = CoreServicesShimHostAdapter; @@ -54312,11 +61098,11 @@ var ts; var start; if (logPerformance) { logger.log(actionDescription); - start = Date.now(); + start = ts.timestamp(); } var result = action(); if (logPerformance) { - var end = Date.now(); + var end = ts.timestamp(); logger.log(actionDescription + " completed in " + (end - start) + " msec"); if (typeof result === "string") { var str = result; @@ -54329,9 +61115,12 @@ var ts; return result; } function forwardJSONCall(logger, actionDescription, action, logPerformance) { + return forwardCall(logger, actionDescription, /*returnJson*/ true, action, logPerformance); + } + function forwardCall(logger, actionDescription, returnJson, action, logPerformance) { try { var result = simpleForwardCall(logger, actionDescription, action, logPerformance); - return JSON.stringify({ result: result }); + return returnJson ? JSON.stringify({ result: result }) : result; } catch (err) { if (err instanceof ts.OperationCanceledException) { @@ -54518,6 +61307,10 @@ var ts; var _this = this; return this.forwardJSONCall("getBraceMatchingAtPosition('" + fileName + "', " + position + ")", function () { return _this.languageService.getBraceMatchingAtPosition(fileName, position); }); }; + LanguageServiceShimObject.prototype.isValidBraceCompletionAtPosition = function (fileName, position, openingBrace) { + var _this = this; + return this.forwardJSONCall("isValidBraceCompletionAtPosition('" + fileName + "', " + position + ", " + openingBrace + ")", function () { return _this.languageService.isValidBraceCompletionAtPosition(fileName, position, openingBrace); }); + }; /// GET SMART INDENT LanguageServiceShimObject.prototype.getIndentationAtPosition = function (fileName, position, options /*Services.EditorOptions*/) { var _this = this; @@ -54543,7 +61336,7 @@ var ts; var _this = this; return this.forwardJSONCall("getDocumentHighlights('" + fileName + "', " + position + ")", function () { var results = _this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch)); - // workaround for VS document higlighting issue - keep only items from the initial file + // workaround for VS document highlighting issue - keep only items from the initial file var normalizedName = ts.normalizeSlashes(fileName).toLowerCase(); return ts.filter(results, function (r) { return ts.normalizeSlashes(r.fileName).toLowerCase() === normalizedName; }); }); @@ -54611,6 +61404,11 @@ var ts; var _this = this; return this.forwardJSONCall("getEmitOutput('" + fileName + "')", function () { return _this.languageService.getEmitOutput(fileName); }); }; + LanguageServiceShimObject.prototype.getEmitOutputObject = function (fileName) { + var _this = this; + return forwardCall(this.logger, "getEmitOutput('" + fileName + "')", + /*returnJson*/ false, function () { return _this.languageService.getEmitOutput(fileName); }, this.logPerformance); + }; return LanguageServiceShimObject; }(ShimBase)); function convertClassifications(classifications) { @@ -54664,33 +61462,54 @@ var ts; }; }); }; - CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) { - return this.forwardJSONCall("getPreProcessedFileInfo('" + fileName + "')", function () { - // for now treat files as JavaScript - var result = ts.preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength()), /* readImportFiles */ true, /* detectJavaScriptImports */ true); - var convertResult = { - referencedFiles: [], - importedFiles: [], - ambientExternalModules: result.ambientExternalModules, - isLibFile: result.isLibFile + CoreServicesShimObject.prototype.resolveTypeReferenceDirective = function (fileName, typeReferenceDirective, compilerOptionsJson) { + var _this = this; + return this.forwardJSONCall("resolveTypeReferenceDirective(" + fileName + ")", function () { + var compilerOptions = JSON.parse(compilerOptionsJson); + var result = ts.resolveTypeReferenceDirective(typeReferenceDirective, ts.normalizeSlashes(fileName), compilerOptions, _this.host); + return { + resolvedFileName: result.resolvedTypeReferenceDirective ? result.resolvedTypeReferenceDirective.resolvedFileName : undefined, + primary: result.resolvedTypeReferenceDirective ? result.resolvedTypeReferenceDirective.primary : true, + failedLookupLocations: result.failedLookupLocations }; - ts.forEach(result.referencedFiles, function (refFile) { - convertResult.referencedFiles.push({ - path: ts.normalizePath(refFile.fileName), - position: refFile.pos, - length: refFile.end - refFile.pos - }); - }); - ts.forEach(result.importedFiles, function (importedFile) { - convertResult.importedFiles.push({ - path: ts.normalizeSlashes(importedFile.fileName), - position: importedFile.pos, - length: importedFile.end - importedFile.pos - }); - }); - return convertResult; }); }; + CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) { + var _this = this; + return this.forwardJSONCall("getPreProcessedFileInfo('" + fileName + "')", function () { + // for now treat files as JavaScript + var result = ts.preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength()), /* readImportFiles */ true, /* detectJavaScriptImports */ true); + return { + referencedFiles: _this.convertFileReferences(result.referencedFiles), + importedFiles: _this.convertFileReferences(result.importedFiles), + ambientExternalModules: result.ambientExternalModules, + isLibFile: result.isLibFile, + typeReferenceDirectives: _this.convertFileReferences(result.typeReferenceDirectives) + }; + }); + }; + CoreServicesShimObject.prototype.getAutomaticTypeDirectiveNames = function (compilerOptionsJson) { + var _this = this; + return this.forwardJSONCall("getAutomaticTypeDirectiveNames('" + compilerOptionsJson + "')", function () { + var compilerOptions = JSON.parse(compilerOptionsJson); + return ts.getAutomaticTypeDirectiveNames(compilerOptions, _this.host); + }); + }; + CoreServicesShimObject.prototype.convertFileReferences = function (refs) { + if (!refs) { + return undefined; + } + var result = []; + for (var _i = 0, refs_2 = refs; _i < refs_2.length; _i++) { + var ref = refs_2[_i]; + result.push({ + path: ts.normalizeSlashes(ref.fileName), + position: ref.pos, + length: ref.end - ref.pos + }); + } + return result; + }; CoreServicesShimObject.prototype.getTSConfigFileInfo = function (fileName, sourceTextSnapshot) { var _this = this; return this.forwardJSONCall("getTSConfigFileInfo('" + fileName + "')", function () { @@ -54701,6 +61520,7 @@ var ts; options: {}, typingOptions: {}, files: [], + raw: {}, errors: [realizeDiagnostic(result.error, "\r\n")] }; } @@ -54710,6 +61530,7 @@ var ts; options: configFile.options, typingOptions: configFile.typingOptions, files: configFile.fileNames, + raw: configFile.raw, errors: realizeDiagnostics(configFile.errors, "\r\n") }; }); @@ -54809,8 +61630,8 @@ var TypeScript; // 'toolsVersion' gets consumed by the managed side, so it's not unused. // TODO: it should be moved into a namespace though. /* @internal */ -var toolsVersion = "1.8"; -/* tslint:enable:no-unused-variable */ +var toolsVersion = "2.0"; +/* tslint:enable:no-unused-variable */ // MONACOCHANGE define([], function() { return ts; });