CoolFace
Apppublic

Pinsave/counterstrike

sourceHugging Faceupdated 3mo agoView on Hugging Face
1likes
lib.es5.d.ts4602 linesDownload Raw Back to lib
1/*! *****************************************************************************2Copyright (c) Microsoft Corporation. All rights reserved.3Licensed under the Apache License, Version 2.0 (the "License"); you may not use4this file except in compliance with the License. You may obtain a copy of the5License at http://www.apache.org/licenses/LICENSE-2.06 7THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY8KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED9WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,10MERCHANTABLITY OR NON-INFRINGEMENT.11 12See the Apache Version 2.0 License for specific language governing permissions13and limitations under the License.14***************************************************************************** */15 16 17/// <reference no-default-lib="true"/>18 19/// <reference lib="decorators" />20/// <reference lib="decorators.legacy" />21 22/////////////////////////////23/// ECMAScript APIs24/////////////////////////////25 26declare var NaN: number;27declare var Infinity: number;28 29/**30 * Evaluates JavaScript code and executes it.31 * @param x A String value that contains valid JavaScript code.32 */33declare function eval(x: string): any;34 35/**36 * Converts a string to an integer.37 * @param string A string to convert into a number.38 * @param radix A value between 2 and 36 that specifies the base of the number in `string`.39 * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.40 * All other strings are considered decimal.41 */42declare function parseInt(string: string, radix?: number): number;43 44/**45 * Converts a string to a floating-point number.46 * @param string A string that contains a floating-point number.47 */48declare function parseFloat(string: string): number;49 50/**51 * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).52 * @param number A numeric value.53 */54declare function isNaN(number: number): boolean;55 56/**57 * Determines whether a supplied number is finite.58 * @param number Any numeric value.59 */60declare function isFinite(number: number): boolean;61 62/**63 * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).64 * @param encodedURI A value representing an encoded URI.65 */66declare function decodeURI(encodedURI: string): string;67 68/**69 * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).70 * @param encodedURIComponent A value representing an encoded URI component.71 */72declare function decodeURIComponent(encodedURIComponent: string): string;73 74/**75 * Encodes a text string as a valid Uniform Resource Identifier (URI)76 * @param uri A value representing an unencoded URI.77 */78declare function encodeURI(uri: string): string;79 80/**81 * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).82 * @param uriComponent A value representing an unencoded URI component.83 */84declare function encodeURIComponent(uriComponent: string | number | boolean): string;85 86/**87 * Computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.88 * @deprecated A legacy feature for browser compatibility89 * @param string A string value90 */91declare function escape(string: string): string;92 93/**94 * Computes a new string in which hexadecimal escape sequences are replaced with the character that it represents.95 * @deprecated A legacy feature for browser compatibility96 * @param string A string value97 */98declare function unescape(string: string): string;99 100interface Symbol {101    /** Returns a string representation of an object. */102    toString(): string;103 104    /** Returns the primitive value of the specified object. */105    valueOf(): symbol;106}107 108declare type PropertyKey = string | number | symbol;109 110interface PropertyDescriptor {111    configurable?: boolean;112    enumerable?: boolean;113    value?: any;114    writable?: boolean;115    get?(): any;116    set?(v: any): void;117}118 119interface PropertyDescriptorMap {120    [key: PropertyKey]: PropertyDescriptor;121}122 123interface Object {124    /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */125    constructor: Function;126 127    /** Returns a string representation of an object. */128    toString(): string;129 130    /** Returns a date converted to a string using the current locale. */131    toLocaleString(): string;132 133    /** Returns the primitive value of the specified object. */134    valueOf(): Object;135 136    /**137     * Determines whether an object has a property with the specified name.138     * @param v A property name.139     */140    hasOwnProperty(v: PropertyKey): boolean;141 142    /**143     * Determines whether an object exists in another object's prototype chain.144     * @param v Another object whose prototype chain is to be checked.145     */146    isPrototypeOf(v: Object): boolean;147 148    /**149     * Determines whether a specified property is enumerable.150     * @param v A property name.151     */152    propertyIsEnumerable(v: PropertyKey): boolean;153}154 155interface ObjectConstructor {156    new (value?: any): Object;157    (): any;158    (value: any): any;159 160    /** A reference to the prototype for a class of objects. */161    readonly prototype: Object;162 163    /**164     * Returns the prototype of an object.165     * @param o The object that references the prototype.166     */167    getPrototypeOf(o: any): any;168 169    /**170     * Gets the own property descriptor of the specified object.171     * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.172     * @param o Object that contains the property.173     * @param p Name of the property.174     */175    getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined;176 177    /**178     * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly179     * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.180     * @param o Object that contains the own properties.181     */182    getOwnPropertyNames(o: any): string[];183 184    /**185     * Creates an object that has the specified prototype or that has null prototype.186     * @param o Object to use as a prototype. May be null.187     */188    create(o: object | null): any;189 190    /**191     * Creates an object that has the specified prototype, and that optionally contains specified properties.192     * @param o Object to use as a prototype. May be null193     * @param properties JavaScript object that contains one or more property descriptors.194     */195    create(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;196 197    /**198     * Adds a property to an object, or modifies attributes of an existing property.199     * @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.200     * @param p The property name.201     * @param attributes Descriptor for the property. It can be for a data property or an accessor property.202     */203    defineProperty<T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): T;204 205    /**206     * Adds one or more properties to an object, and/or modifies attributes of existing properties.207     * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.208     * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.209     */210    defineProperties<T>(o: T, properties: PropertyDescriptorMap & ThisType<any>): T;211 212    /**213     * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.214     * @param o Object on which to lock the attributes.215     */216    seal<T>(o: T): T;217 218    /**219     * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.220     * @param f Object on which to lock the attributes.221     */222    freeze<T extends Function>(f: T): T;223 224    /**225     * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.226     * @param o Object on which to lock the attributes.227     */228    freeze<T extends { [idx: string]: U | null | undefined | object; }, U extends string | bigint | number | boolean | symbol>(o: T): Readonly<T>;229 230    /**231     * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.232     * @param o Object on which to lock the attributes.233     */234    freeze<T>(o: T): Readonly<T>;235 236    /**237     * Prevents the addition of new properties to an object.238     * @param o Object to make non-extensible.239     */240    preventExtensions<T>(o: T): T;241 242    /**243     * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.244     * @param o Object to test.245     */246    isSealed(o: any): boolean;247 248    /**249     * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.250     * @param o Object to test.251     */252    isFrozen(o: any): boolean;253 254    /**255     * Returns a value that indicates whether new properties can be added to an object.256     * @param o Object to test.257     */258    isExtensible(o: any): boolean;259 260    /**261     * Returns the names of the enumerable string properties and methods of an object.262     * @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.263     */264    keys(o: object): string[];265}266 267/**268 * Provides functionality common to all JavaScript objects.269 */270declare var Object: ObjectConstructor;271 272/**273 * Creates a new function.274 */275interface Function {276    /**277     * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.278     * @param thisArg The object to be used as the this object.279     * @param argArray A set of arguments to be passed to the function.280     */281    apply(this: Function, thisArg: any, argArray?: any): any;282 283    /**284     * Calls a method of an object, substituting another object for the current object.285     * @param thisArg The object to be used as the current object.286     * @param argArray A list of arguments to be passed to the method.287     */288    call(this: Function, thisArg: any, ...argArray: any[]): any;289 290    /**291     * For a given function, creates a bound function that has the same body as the original function.292     * The this object of the bound function is associated with the specified object, and has the specified initial parameters.293     * @param thisArg An object to which the this keyword can refer inside the new function.294     * @param argArray A list of arguments to be passed to the new function.295     */296    bind(this: Function, thisArg: any, ...argArray: any[]): any;297 298    /** Returns a string representation of a function. */299    toString(): string;300 301    prototype: any;302    readonly length: number;303 304    // Non-standard extensions305    arguments: any;306    caller: Function;307}308 309interface FunctionConstructor {310    /**311     * Creates a new function.312     * @param args A list of arguments the function accepts.313     */314    new (...args: string[]): Function;315    (...args: string[]): Function;316    readonly prototype: Function;317}318 319declare var Function: FunctionConstructor;320 321/**322 * Extracts the type of the 'this' parameter of a function type, or 'unknown' if the function type has no 'this' parameter.323 */324type ThisParameterType<T> = T extends (this: infer U, ...args: never) => any ? U : unknown;325 326/**327 * Removes the 'this' parameter from a function type.328 */329type OmitThisParameter<T> = unknown extends ThisParameterType<T> ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T;330 331interface CallableFunction extends Function {332    /**333     * Calls the function with the specified object as the this value and the elements of specified array as the arguments.334     * @param thisArg The object to be used as the this object.335     */336    apply<T, R>(this: (this: T) => R, thisArg: T): R;337 338    /**339     * Calls the function with the specified object as the this value and the elements of specified array as the arguments.340     * @param thisArg The object to be used as the this object.341     * @param args An array of argument values to be passed to the function.342     */343    apply<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R;344 345    /**346     * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.347     * @param thisArg The object to be used as the this object.348     * @param args Argument values to be passed to the function.349     */350    call<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R;351 352    /**353     * For a given function, creates a bound function that has the same body as the original function.354     * The this object of the bound function is associated with the specified object, and has the specified initial parameters.355     * @param thisArg The object to be used as the this object.356     */357    bind<T>(this: T, thisArg: ThisParameterType<T>): OmitThisParameter<T>;358 359    /**360     * For a given function, creates a bound function that has the same body as the original function.361     * The this object of the bound function is associated with the specified object, and has the specified initial parameters.362     * @param thisArg The object to be used as the this object.363     * @param args Arguments to bind to the parameters of the function.364     */365    bind<T, A extends any[], B extends any[], R>(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R;366}367 368interface NewableFunction extends Function {369    /**370     * Calls the function with the specified object as the this value and the elements of specified array as the arguments.371     * @param thisArg The object to be used as the this object.372     */373    apply<T>(this: new () => T, thisArg: T): void;374    /**375     * Calls the function with the specified object as the this value and the elements of specified array as the arguments.376     * @param thisArg The object to be used as the this object.377     * @param args An array of argument values to be passed to the function.378     */379    apply<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void;380 381    /**382     * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.383     * @param thisArg The object to be used as the this object.384     * @param args Argument values to be passed to the function.385     */386    call<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A): void;387 388    /**389     * For a given function, creates a bound function that has the same body as the original function.390     * The this object of the bound function is associated with the specified object, and has the specified initial parameters.391     * @param thisArg The object to be used as the this object.392     */393    bind<T>(this: T, thisArg: any): T;394 395    /**396     * For a given function, creates a bound function that has the same body as the original function.397     * The this object of the bound function is associated with the specified object, and has the specified initial parameters.398     * @param thisArg The object to be used as the this object.399     * @param args Arguments to bind to the parameters of the function.400     */401    bind<A extends any[], B extends any[], R>(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R;402}403 404interface IArguments {405    [index: number]: any;406    length: number;407    callee: Function;408}409 410interface String {411    /** Returns a string representation of a string. */412    toString(): string;413 414    /**415     * Returns the character at the specified index.416     * @param pos The zero-based index of the desired character.417     */418    charAt(pos: number): string;419 420    /**421     * Returns the Unicode value of the character at the specified location.422     * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.423     */424    charCodeAt(index: number): number;425 426    /**427     * Returns a string that contains the concatenation of two or more strings.428     * @param strings The strings to append to the end of the string.429     */430    concat(...strings: string[]): string;431 432    /**433     * Returns the position of the first occurrence of a substring.434     * @param searchString The substring to search for in the string435     * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.436     */437    indexOf(searchString: string, position?: number): number;438 439    /**440     * Returns the last occurrence of a substring in the string.441     * @param searchString The substring to search for.442     * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.443     */444    lastIndexOf(searchString: string, position?: number): number;445 446    /**447     * Determines whether two strings are equivalent in the current locale.448     * @param that String to compare to target string449     */450    localeCompare(that: string): number;451 452    /**453     * Matches a string with a regular expression, and returns an array containing the results of that search.454     * @param regexp A variable name or string literal containing the regular expression pattern and flags.455     */456    match(regexp: string | RegExp): RegExpMatchArray | null;457 458    /**459     * Replaces text in a string, using a regular expression or search string.460     * @param searchValue A string or regular expression to search for.461     * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced.462     */463    replace(searchValue: string | RegExp, replaceValue: string): string;464 465    /**466     * Replaces text in a string, using a regular expression or search string.467     * @param searchValue A string to search for.468     * @param replacer A function that returns the replacement text.469     */470    replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;471 472    /**473     * Finds the first substring match in a regular expression search.474     * @param regexp The regular expression pattern and applicable flags.475     */476    search(regexp: string | RegExp): number;477 478    /**479     * Returns a section of a string.480     * @param start The index to the beginning of the specified portion of stringObj.481     * @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.482     * If this value is not specified, the substring continues to the end of stringObj.483     */484    slice(start?: number, end?: number): string;485 486    /**487     * Split a string into substrings using the specified separator and return them as an array.488     * @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.489     * @param limit A value used to limit the number of elements returned in the array.490     */491    split(separator: string | RegExp, limit?: number): string[];492 493    /**494     * Returns the substring at the specified location within a String object.495     * @param start The zero-based index number indicating the beginning of the substring.496     * @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.497     * If end is omitted, the characters from start through the end of the original string are returned.498     */499    substring(start: number, end?: number): string;500 501    /** Converts all the alphabetic characters in a string to lowercase. */502    toLowerCase(): string;503 504    /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */505    toLocaleLowerCase(locales?: string | string[]): string;506 507    /** Converts all the alphabetic characters in a string to uppercase. */508    toUpperCase(): string;509 510    /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */511    toLocaleUpperCase(locales?: string | string[]): string;512 513    /** Removes the leading and trailing white space and line terminator characters from a string. */514    trim(): string;515 516    /** Returns the length of a String object. */517    readonly length: number;518 519    // IE extensions520    /**521     * Gets a substring beginning at the specified location and having the specified length.522     * @deprecated A legacy feature for browser compatibility523     * @param from The starting position of the desired substring. The index of the first character in the string is zero.524     * @param length The number of characters to include in the returned substring.525     */526    substr(from: number, length?: number): string;527 528    /** Returns the primitive value of the specified object. */529    valueOf(): string;530 531    readonly [index: number]: string;532}533 534interface StringConstructor {535    new (value?: any): String;536    (value?: any): string;537    readonly prototype: String;538    fromCharCode(...codes: number[]): string;539}540 541/**542 * Allows manipulation and formatting of text strings and determination and location of substrings within strings.543 */544declare var String: StringConstructor;545 546interface Boolean {547    /** Returns the primitive value of the specified object. */548    valueOf(): boolean;549}550 551interface BooleanConstructor {552    new (value?: any): Boolean;553    <T>(value?: T): boolean;554    readonly prototype: Boolean;555}556 557declare var Boolean: BooleanConstructor;558 559interface Number {560    /**561     * Returns a string representation of an object.562     * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.563     */564    toString(radix?: number): string;565 566    /**567     * Returns a string representing a number in fixed-point notation.568     * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.569     */570    toFixed(fractionDigits?: number): string;571 572    /**573     * Returns a string containing a number represented in exponential notation.574     * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.575     */576    toExponential(fractionDigits?: number): string;577 578    /**579     * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.580     * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.581     */582    toPrecision(precision?: number): string;583 584    /** Returns the primitive value of the specified object. */585    valueOf(): number;586}587 588interface NumberConstructor {589    new (value?: any): Number;590    (value?: any): number;591    readonly prototype: Number;592 593    /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */594    readonly MAX_VALUE: number;595 596    /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */597    readonly MIN_VALUE: number;598 599    /**600     * A value that is not a number.601     * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.602     */603    readonly NaN: number;604 605    /**606     * A value that is less than the largest negative number that can be represented in JavaScript.607     * JavaScript displays NEGATIVE_INFINITY values as -infinity.608     */609    readonly NEGATIVE_INFINITY: number;610 611    /**612     * A value greater than the largest number that can be represented in JavaScript.613     * JavaScript displays POSITIVE_INFINITY values as infinity.614     */615    readonly POSITIVE_INFINITY: number;616}617 618/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */619declare var Number: NumberConstructor;620 621interface TemplateStringsArray extends ReadonlyArray<string> {622    readonly raw: readonly string[];623}624 625/**626 * The type of `import.meta`.627 *628 * If you need to declare that a given property exists on `import.meta`,629 * this type may be augmented via interface merging.630 */631interface ImportMeta {632}633 634/**635 * The type for the optional second argument to `import()`.636 *637 * If your host environment supports additional options, this type may be638 * augmented via interface merging.639 */640interface ImportCallOptions {641    /** @deprecated*/ assert?: ImportAssertions;642    with?: ImportAttributes;643}644 645/**646 * The type for the `assert` property of the optional second argument to `import()`.647 * @deprecated648 */649interface ImportAssertions {650    [key: string]: string;651}652 653/**654 * The type for the `with` property of the optional second argument to `import()`.655 */656interface ImportAttributes {657    [key: string]: string;658}659 660interface Math {661    /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */662    readonly E: number;663    /** The natural logarithm of 10. */664    readonly LN10: number;665    /** The natural logarithm of 2. */666    readonly LN2: number;667    /** The base-2 logarithm of e. */668    readonly LOG2E: number;669    /** The base-10 logarithm of e. */670    readonly LOG10E: number;671    /** Pi. This is the ratio of the circumference of a circle to its diameter. */672    readonly PI: number;673    /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */674    readonly SQRT1_2: number;675    /** The square root of 2. */676    readonly SQRT2: number;677    /**678     * Returns the absolute value of a number (the value without regard to whether it is positive or negative).679     * For example, the absolute value of -5 is the same as the absolute value of 5.680     * @param x A numeric expression for which the absolute value is needed.681     */682    abs(x: number): number;683    /**684     * Returns the arc cosine (or inverse cosine) of a number.685     * @param x A numeric expression.686     */687    acos(x: number): number;688    /**689     * Returns the arcsine of a number.690     * @param x A numeric expression.691     */692    asin(x: number): number;693    /**694     * Returns the arctangent of a number.695     * @param x A numeric expression for which the arctangent is needed.696     */697    atan(x: number): number;698    /**699     * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point.700     * @param y A numeric expression representing the cartesian y-coordinate.701     * @param x A numeric expression representing the cartesian x-coordinate.702     */703    atan2(y: number, x: number): number;704    /**705     * Returns the smallest integer greater than or equal to its numeric argument.706     * @param x A numeric expression.707     */708    ceil(x: number): number;709    /**710     * Returns the cosine of a number.711     * @param x A numeric expression that contains an angle measured in radians.712     */713    cos(x: number): number;714    /**715     * Returns e (the base of natural logarithms) raised to a power.716     * @param x A numeric expression representing the power of e.717     */718    exp(x: number): number;719    /**720     * Returns the greatest integer less than or equal to its numeric argument.721     * @param x A numeric expression.722     */723    floor(x: number): number;724    /**725     * Returns the natural logarithm (base e) of a number.726     * @param x A numeric expression.727     */728    log(x: number): number;729    /**730     * Returns the larger of a set of supplied numeric expressions.731     * @param values Numeric expressions to be evaluated.732     */733    max(...values: number[]): number;734    /**735     * Returns the smaller of a set of supplied numeric expressions.736     * @param values Numeric expressions to be evaluated.737     */738    min(...values: number[]): number;739    /**740     * Returns the value of a base expression taken to a specified power.741     * @param x The base value of the expression.742     * @param y The exponent value of the expression.743     */744    pow(x: number, y: number): number;745    /** Returns a pseudorandom number between 0 and 1. */746    random(): number;747    /**748     * Returns a supplied numeric expression rounded to the nearest integer.749     * @param x The value to be rounded to the nearest integer.750     */751    round(x: number): number;752    /**753     * Returns the sine of a number.754     * @param x A numeric expression that contains an angle measured in radians.755     */756    sin(x: number): number;757    /**758     * Returns the square root of a number.759     * @param x A numeric expression.760     */761    sqrt(x: number): number;762    /**763     * Returns the tangent of a number.764     * @param x A numeric expression that contains an angle measured in radians.765     */766    tan(x: number): number;767}768/** An intrinsic object that provides basic mathematics functionality and constants. */769declare var Math: Math;770 771/** Enables basic storage and retrieval of dates and times. */772interface Date {773    /** Returns a string representation of a date. The format of the string depends on the locale. */774    toString(): string;775    /** Returns a date as a string value. */776    toDateString(): string;777    /** Returns a time as a string value. */778    toTimeString(): string;779    /** Returns a value as a string value appropriate to the host environment's current locale. */780    toLocaleString(): string;781    /** Returns a date as a string value appropriate to the host environment's current locale. */782    toLocaleDateString(): string;783    /** Returns a time as a string value appropriate to the host environment's current locale. */784    toLocaleTimeString(): string;785    /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */786    valueOf(): number;787    /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */788    getTime(): number;789    /** Gets the year, using local time. */790    getFullYear(): number;791    /** Gets the year using Universal Coordinated Time (UTC). */792    getUTCFullYear(): number;793    /** Gets the month, using local time. */794    getMonth(): number;795    /** Gets the month of a Date object using Universal Coordinated Time (UTC). */796    getUTCMonth(): number;797    /** Gets the day-of-the-month, using local time. */798    getDate(): number;799    /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */800    getUTCDate(): number;801    /** Gets the day of the week, using local time. */802    getDay(): number;803    /** Gets the day of the week using Universal Coordinated Time (UTC). */804    getUTCDay(): number;805    /** Gets the hours in a date, using local time. */806    getHours(): number;807    /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */808    getUTCHours(): number;809    /** Gets the minutes of a Date object, using local time. */810    getMinutes(): number;811    /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */812    getUTCMinutes(): number;813    /** Gets the seconds of a Date object, using local time. */814    getSeconds(): number;815    /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */816    getUTCSeconds(): number;817    /** Gets the milliseconds of a Date, using local time. */818    getMilliseconds(): number;819    /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */820    getUTCMilliseconds(): number;821    /** Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer. */822    getTimezoneOffset(): number;823    /**824     * Sets the date and time value in the Date object.825     * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.826     */827    setTime(time: number): number;828    /**829     * Sets the milliseconds value in the Date object using local time.830     * @param ms A numeric value equal to the millisecond value.831     */832    setMilliseconds(ms: number): number;833    /**834     * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).835     * @param ms A numeric value equal to the millisecond value.836     */837    setUTCMilliseconds(ms: number): number;838 839    /**840     * Sets the seconds value in the Date object using local time.841     * @param sec A numeric value equal to the seconds value.842     * @param ms A numeric value equal to the milliseconds value.843     */844    setSeconds(sec: number, ms?: number): number;845    /**846     * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).847     * @param sec A numeric value equal to the seconds value.848     * @param ms A numeric value equal to the milliseconds value.849     */850    setUTCSeconds(sec: number, ms?: number): number;851    /**852     * Sets the minutes value in the Date object using local time.853     * @param min A numeric value equal to the minutes value.854     * @param sec A numeric value equal to the seconds value.855     * @param ms A numeric value equal to the milliseconds value.856     */857    setMinutes(min: number, sec?: number, ms?: number): number;858    /**859     * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).860     * @param min A numeric value equal to the minutes value.861     * @param sec A numeric value equal to the seconds value.862     * @param ms A numeric value equal to the milliseconds value.863     */864    setUTCMinutes(min: number, sec?: number, ms?: number): number;865    /**866     * Sets the hour value in the Date object using local time.867     * @param hours A numeric value equal to the hours value.868     * @param min A numeric value equal to the minutes value.869     * @param sec A numeric value equal to the seconds value.870     * @param ms A numeric value equal to the milliseconds value.871     */872    setHours(hours: number, min?: number, sec?: number, ms?: number): number;873    /**874     * Sets the hours value in the Date object using Universal Coordinated Time (UTC).875     * @param hours A numeric value equal to the hours value.876     * @param min A numeric value equal to the minutes value.877     * @param sec A numeric value equal to the seconds value.878     * @param ms A numeric value equal to the milliseconds value.879     */880    setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;881    /**882     * Sets the numeric day-of-the-month value of the Date object using local time.883     * @param date A numeric value equal to the day of the month.884     */885    setDate(date: number): number;886    /**887     * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).888     * @param date A numeric value equal to the day of the month.889     */890    setUTCDate(date: number): number;891    /**892     * Sets the month value in the Date object using local time.893     * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.894     * @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.895     */896    setMonth(month: number, date?: number): number;897    /**898     * Sets the month value in the Date object using Universal Coordinated Time (UTC).899     * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.900     * @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.901     */902    setUTCMonth(month: number, date?: number): number;903    /**904     * Sets the year of the Date object using local time.905     * @param year A numeric value for the year.906     * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.907     * @param date A numeric value equal for the day of the month.908     */909    setFullYear(year: number, month?: number, date?: number): number;910    /**911     * Sets the year value in the Date object using Universal Coordinated Time (UTC).912     * @param year A numeric value equal to the year.913     * @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.914     * @param date A numeric value equal to the day of the month.915     */916    setUTCFullYear(year: number, month?: number, date?: number): number;917    /** Returns a date converted to a string using Universal Coordinated Time (UTC). */918    toUTCString(): string;919    /** Returns a date as a string value in ISO format. */920    toISOString(): string;921    /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */922    toJSON(key?: any): string;923}924 925interface DateConstructor {926    new (): Date;927    new (value: number | string): Date;928    /**929     * Creates a new Date.930     * @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.931     * @param monthIndex The month as a number between 0 and 11 (January to December).932     * @param date The date as a number between 1 and 31.933     * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.934     * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.935     * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.936     * @param ms A number from 0 to 999 that specifies the milliseconds.937     */938    new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;939    (): string;940    readonly prototype: Date;941    /**942     * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.943     * @param s A date string944     */945    parse(s: string): number;946    /**947     * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.948     * @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.949     * @param monthIndex The month as a number between 0 and 11 (January to December).950     * @param date The date as a number between 1 and 31.951     * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.952     * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.953     * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.954     * @param ms A number from 0 to 999 that specifies the milliseconds.955     */956    UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;957    /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */958    now(): number;959}960 961declare var Date: DateConstructor;962 963interface RegExpMatchArray extends Array<string> {964    /**965     * The index of the search at which the result was found.966     */967    index?: number;968    /**969     * A copy of the search string.970     */971    input?: string;972    /**973     * The first match. This will always be present because `null` will be returned if there are no matches.974     */975    0: string;976}977 978interface RegExpExecArray extends Array<string> {979    /**980     * The index of the search at which the result was found.981     */982    index: number;983    /**984     * A copy of the search string.985     */986    input: string;987    /**988     * The first match. This will always be present because `null` will be returned if there are no matches.989     */990    0: string;991}992 993interface RegExp {994    /**995     * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.996     * @param string The String object or string literal on which to perform the search.997     */998    exec(string: string): RegExpExecArray | null;999 1000    /**1001     * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.1002     * @param string String on which to perform the search.1003     */1004    test(string: string): boolean;1005 1006    /** 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. */1007    readonly source: string;1008 1009    /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */1010    readonly global: boolean;1011 1012    /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */1013    readonly ignoreCase: boolean;1014 1015    /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */1016    readonly multiline: boolean;1017 1018    lastIndex: number;1019 1020    // Non-standard extensions1021    /** @deprecated A legacy feature for browser compatibility */1022    compile(pattern: string, flags?: string): this;1023}1024 1025interface RegExpConstructor {1026    new (pattern: RegExp | string): RegExp;1027    new (pattern: string, flags?: string): RegExp;1028    (pattern: RegExp | string): RegExp;1029    (pattern: string, flags?: string): RegExp;1030    readonly "prototype": RegExp;1031 1032    // Non-standard extensions1033    /** @deprecated A legacy feature for browser compatibility */1034    "$1": string;1035    /** @deprecated A legacy feature for browser compatibility */1036    "$2": string;1037    /** @deprecated A legacy feature for browser compatibility */1038    "$3": string;1039    /** @deprecated A legacy feature for browser compatibility */1040    "$4": string;1041    /** @deprecated A legacy feature for browser compatibility */1042    "$5": string;1043    /** @deprecated A legacy feature for browser compatibility */1044    "$6": string;1045    /** @deprecated A legacy feature for browser compatibility */1046    "$7": string;1047    /** @deprecated A legacy feature for browser compatibility */1048    "$8": string;1049    /** @deprecated A legacy feature for browser compatibility */1050    "$9": string;1051    /** @deprecated A legacy feature for browser compatibility */1052    "input": string;1053    /** @deprecated A legacy feature for browser compatibility */1054    "$_": string;1055    /** @deprecated A legacy feature for browser compatibility */1056    "lastMatch": string;1057    /** @deprecated A legacy feature for browser compatibility */1058    "$&": string;1059    /** @deprecated A legacy feature for browser compatibility */1060    "lastParen": string;1061    /** @deprecated A legacy feature for browser compatibility */1062    "$+": string;1063    /** @deprecated A legacy feature for browser compatibility */1064    "leftContext": string;1065    /** @deprecated A legacy feature for browser compatibility */1066    "$`": string;1067    /** @deprecated A legacy feature for browser compatibility */1068    "rightContext": string;1069    /** @deprecated A legacy feature for browser compatibility */1070    "$'": string;1071}1072 1073declare var RegExp: RegExpConstructor;1074 1075interface Error {1076    name: string;1077    message: string;1078    stack?: string;1079}1080 1081interface ErrorConstructor {1082    new (message?: string): Error;1083    (message?: string): Error;1084    readonly prototype: Error;1085}1086 1087declare var Error: ErrorConstructor;1088 1089interface EvalError extends Error {1090}1091 1092interface EvalErrorConstructor extends ErrorConstructor {1093    new (message?: string): EvalError;1094    (message?: string): EvalError;1095    readonly prototype: EvalError;1096}1097 1098declare var EvalError: EvalErrorConstructor;1099 1100interface RangeError extends Error {1101}1102 1103interface RangeErrorConstructor extends ErrorConstructor {1104    new (message?: string): RangeError;1105    (message?: string): RangeError;1106    readonly prototype: RangeError;1107}1108 1109declare var RangeError: RangeErrorConstructor;1110 1111interface ReferenceError extends Error {1112}1113 1114interface ReferenceErrorConstructor extends ErrorConstructor {1115    new (message?: string): ReferenceError;1116    (message?: string): ReferenceError;1117    readonly prototype: ReferenceError;1118}1119 1120declare var ReferenceError: ReferenceErrorConstructor;1121 1122interface SyntaxError extends Error {1123}1124 1125interface SyntaxErrorConstructor extends ErrorConstructor {1126    new (message?: string): SyntaxError;1127    (message?: string): SyntaxError;1128    readonly prototype: SyntaxError;1129}1130 1131declare var SyntaxError: SyntaxErrorConstructor;1132 1133interface TypeError extends Error {1134}1135 1136interface TypeErrorConstructor extends ErrorConstructor {1137    new (message?: string): TypeError;1138    (message?: string): TypeError;1139    readonly prototype: TypeError;1140}1141 1142declare var TypeError: TypeErrorConstructor;1143 1144interface URIError extends Error {1145}1146 1147interface URIErrorConstructor extends ErrorConstructor {1148    new (message?: string): URIError;1149    (message?: string): URIError;1150    readonly prototype: URIError;1151}1152 1153declare var URIError: URIErrorConstructor;1154 1155interface JSON {1156    /**1157     * Converts a JavaScript Object Notation (JSON) string into an object.1158     * @param text A valid JSON string.1159     * @param reviver A function that transforms the results. This function is called for each member of the object.1160     * If a member contains nested objects, the nested objects are transformed before the parent object is.1161     * @throws {SyntaxError} If `text` is not valid JSON.1162     */1163    parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;1164    /**1165     * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.1166     * @param value A JavaScript value, usually an object or array, to be converted.1167     * @param replacer A function that transforms the results.1168     * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.1169     * @throws {TypeError} If a circular reference or a BigInt value is found.1170     */1171    stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;1172    /**1173     * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.1174     * @param value A JavaScript value, usually an object or array, to be converted.1175     * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.1176     * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.1177     * @throws {TypeError} If a circular reference or a BigInt value is found.1178     */1179    stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;1180}1181 1182/**1183 * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.1184 */1185declare var JSON: JSON;1186 1187/////////////////////////////1188/// ECMAScript Array API (specially handled by compiler)1189/////////////////////////////1190 1191interface ReadonlyArray<T> {1192    /**1193     * Gets the length of the array. This is a number one higher than the highest element defined in an array.1194     */1195    readonly length: number;1196    /**1197     * Returns a string representation of an array.1198     */1199    toString(): string;1200    /**

Showing the first 1,200 of 4602 lines. Download the file for the rest.