| | |
| | |
|
| | | /**
|
| | | * Converts a string to an integer.
|
| | | * @param s A string to convert into a number.
|
| | | * @param radix A value between 2 and 36 that specifies the base of the number in numString.
|
| | | * @param string A string to convert into a number.
|
| | | * @param radix A value between 2 and 36 that specifies the base of the number in `string`.
|
| | | * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
|
| | | * All other strings are considered decimal.
|
| | | */
|
| | | declare function parseInt(s: string, radix?: number): number;
|
| | | declare function parseInt(string: string, radix?: number): number;
|
| | |
|
| | | /**
|
| | | * Converts a string to a floating-point number.
|
| | |
| | |
|
| | | /**
|
| | | * Computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.
|
| | | * @deprecated A legacy feature for browser compatibility
|
| | | * @param string A string value
|
| | | */
|
| | | declare function escape(string: string): string;
|
| | |
|
| | | /**
|
| | | * Computes a new string in which hexadecimal escape sequences are replaced with the character that it represents.
|
| | | * @deprecated A legacy feature for browser compatibility
|
| | | * @param string A string value
|
| | | */
|
| | | declare function unescape(string: string): string;
|
| | |
| | | }
|
| | |
|
| | | interface PropertyDescriptorMap {
|
| | | [s: string]: PropertyDescriptor;
|
| | | [key: PropertyKey]: PropertyDescriptor;
|
| | | }
|
| | |
|
| | | interface Object {
|
| | |
| | | * @param p The property name.
|
| | | * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
|
| | | */
|
| | | defineProperty(o: any, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): any;
|
| | | defineProperty<T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): T;
|
| | |
|
| | | /**
|
| | | * Adds one or more properties to an object, and/or modifies attributes of existing properties.
|
| | | * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
|
| | | * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
|
| | | */
|
| | | defineProperties(o: any, properties: PropertyDescriptorMap & ThisType<any>): any;
|
| | | defineProperties<T>(o: T, properties: PropertyDescriptorMap & ThisType<any>): T;
|
| | |
|
| | | /**
|
| | | * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
|
| | |
| | |
|
| | | /**
|
| | | * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
| | | * @param o Object on which to lock the attributes.
|
| | | * @param a Object on which to lock the attributes.
|
| | | */
|
| | | freeze<T>(a: T[]): readonly T[];
|
| | |
|
| | | /**
|
| | | * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
| | | * @param o Object on which to lock the attributes.
|
| | | * @param f Object on which to lock the attributes.
|
| | | */
|
| | | freeze<T extends Function>(f: T): T;
|
| | |
|
| | |
| | | // IE extensions
|
| | | /**
|
| | | * Gets a substring beginning at the specified location and having the specified length.
|
| | | * @deprecated A legacy feature for browser compatibility
|
| | | * @param from The starting position of the desired substring. The index of the first character in the string is zero.
|
| | | * @param length The number of characters to include in the returned substring.
|
| | | */
|
| | |
| | | * this type may be augmented via interface merging.
|
| | | */
|
| | | interface ImportMeta {
|
| | | }
|
| | |
|
| | | /**
|
| | | * The type for the optional second argument to `import()`.
|
| | | *
|
| | | * If your host environment supports additional options, this type may be
|
| | | * augmented via interface merging.
|
| | | */
|
| | | interface ImportCallOptions {
|
| | | assert?: ImportAssertions;
|
| | | }
|
| | |
|
| | | /**
|
| | | * The type for the `assert` property of the optional second argument to `import()`.
|
| | | */
|
| | | interface ImportAssertions {
|
| | | [key: string]: string;
|
| | | }
|
| | |
|
| | | interface Math {
|
| | |
| | | lastIndex: number;
|
| | |
|
| | | // Non-standard extensions
|
| | | compile(): this;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | compile(pattern: string, flags?: string): this;
|
| | | }
|
| | |
|
| | | interface RegExpConstructor {
|
| | |
| | | readonly prototype: RegExp;
|
| | |
|
| | | // Non-standard extensions
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | $1: string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | $2: string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | $3: string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | $4: string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | $5: string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | $6: string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | $7: string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | $8: string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | $9: string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | input: string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | $_: string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | lastMatch: string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | "$&": string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | lastParen: string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | "$+": string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | leftContext: string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | "$`": string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | rightContext: string;
|
| | | /** @deprecated A legacy feature for browser compatibility */
|
| | | "$'": string;
|
| | | }
|
| | |
|
| | | declare var RegExp: RegExpConstructor;
|
| | |
| | | */
|
| | | toString(): string;
|
| | | /**
|
| | | * Returns a string representation of an array. The elements are converted to string using their toLocalString methods.
|
| | | * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
|
| | | */
|
| | | toLocaleString(): string;
|
| | | /**
|
| | |
| | | */
|
| | | toString(): string;
|
| | | /**
|
| | | * Returns a string representation of an array. The elements are converted to string using their toLocalString methods.
|
| | | * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
|
| | | */
|
| | | toLocaleString(): string;
|
| | | /**
|
| | |
| | | * Sorts an array in place.
|
| | | * This method mutates the array and returns a reference to the same array.
|
| | | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
| | | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
| | | * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
| | | * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
| | | * ```ts
|
| | | * [11,2,22,1].sort((a, b) => a - b)
|
| | |
| | | catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
|
| | | }
|
| | |
|
| | | /**
|
| | | * Recursively unwraps the "awaited type" of a type. Non-promise "thenables" should resolve to `never`. This emulates the behavior of `await`.
|
| | | */
|
| | | type Awaited<T> =
|
| | | T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode
|
| | | T extends object & { then(onfulfilled: infer F): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
|
| | | F extends ((value: infer V, ...args: any) => any) ? // if the argument to `then` is callable, extracts the first argument
|
| | | Awaited<V> : // recursively unwrap the value
|
| | | never : // the argument to `then` was not callable
|
| | | T; // non-object or non-thenable
|
| | |
|
| | | interface ArrayLike<T> {
|
| | | readonly length: number;
|
| | | readonly [n: number]: T;
|
| | |
| | | /**
|
| | | * Obtain the parameters of a constructor function type in a tuple
|
| | | */
|
| | | type ConstructorParameters<T extends new (...args: any) => any> = T extends new (...args: infer P) => any ? P : never;
|
| | | type ConstructorParameters<T extends abstract new (...args: any) => any> = T extends abstract new (...args: infer P) => any ? P : never;
|
| | |
|
| | | /**
|
| | | * Obtain the return type of a function type
|
| | |
| | | /**
|
| | | * Obtain the return type of a constructor function type
|
| | | */
|
| | | type InstanceType<T extends new (...args: any) => any> = T extends new (...args: any) => infer R ? R : any;
|
| | | type InstanceType<T extends abstract new (...args: any) => any> = T extends abstract new (...args: any) => infer R ? R : any;
|
| | |
|
| | | /**
|
| | | * Convert string literal type to uppercase
|
| | |
| | | every(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean;
|
| | |
|
| | | /**
|
| | | * Returns the this object after filling the section identified by start and end with value
|
| | | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
| | | * @param value value to fill array section with
|
| | | * @param start index to start filling the array at. If start is negative, it is treated as
|
| | | * length+start where length is the length of the array.
|
| | |
| | | * Sorts an array.
|
| | | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
| | | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
| | | * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
| | | * value otherwise. If omitted, the elements are sorted in ascending order.
|
| | | * ```ts
|
| | | * [11,2,22,1].sort((a, b) => a - b)
|
| | | * ```
|
| | |
| | | every(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean;
|
| | |
|
| | | /**
|
| | | * Returns the this object after filling the section identified by start and end with value
|
| | | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
| | | * @param value value to fill array section with
|
| | | * @param start index to start filling the array at. If start is negative, it is treated as
|
| | | * length+start where length is the length of the array.
|
| | |
| | | * Sorts an array.
|
| | | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
| | | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
| | | * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
| | | * value otherwise. If omitted, the elements are sorted in ascending order.
|
| | | * ```ts
|
| | | * [11,2,22,1].sort((a, b) => a - b)
|
| | | * ```
|
| | |
| | | every(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean;
|
| | |
|
| | | /**
|
| | | * Returns the this object after filling the section identified by start and end with value
|
| | | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
| | | * @param value value to fill array section with
|
| | | * @param start index to start filling the array at. If start is negative, it is treated as
|
| | | * length+start where length is the length of the array.
|
| | |
| | | * Sorts an array.
|
| | | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
| | | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
| | | * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
| | | * value otherwise. If omitted, the elements are sorted in ascending order.
|
| | | * ```ts
|
| | | * [11,2,22,1].sort((a, b) => a - b)
|
| | | * ```
|
| | |
| | | every(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean;
|
| | |
|
| | | /**
|
| | | * Returns the this object after filling the section identified by start and end with value
|
| | | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
| | | * @param value value to fill array section with
|
| | | * @param start index to start filling the array at. If start is negative, it is treated as
|
| | | * length+start where length is the length of the array.
|
| | |
| | | * Sorts an array.
|
| | | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
| | | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
| | | * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
| | | * value otherwise. If omitted, the elements are sorted in ascending order.
|
| | | * ```ts
|
| | | * [11,2,22,1].sort((a, b) => a - b)
|
| | | * ```
|
| | |
| | | every(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean;
|
| | |
|
| | | /**
|
| | | * Returns the this object after filling the section identified by start and end with value
|
| | | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
| | | * @param value value to fill array section with
|
| | | * @param start index to start filling the array at. If start is negative, it is treated as
|
| | | * length+start where length is the length of the array.
|
| | |
| | | * Sorts an array.
|
| | | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
| | | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
| | | * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
| | | * value otherwise. If omitted, the elements are sorted in ascending order.
|
| | | * ```ts
|
| | | * [11,2,22,1].sort((a, b) => a - b)
|
| | | * ```
|
| | |
| | | every(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean;
|
| | |
|
| | | /**
|
| | | * Returns the this object after filling the section identified by start and end with value
|
| | | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
| | | * @param value value to fill array section with
|
| | | * @param start index to start filling the array at. If start is negative, it is treated as
|
| | | * length+start where length is the length of the array.
|
| | |
| | | * Sorts an array.
|
| | | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
| | | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
| | | * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
| | | * value otherwise. If omitted, the elements are sorted in ascending order.
|
| | | * ```ts
|
| | | * [11,2,22,1].sort((a, b) => a - b)
|
| | | * ```
|
| | |
| | | every(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean;
|
| | |
|
| | | /**
|
| | | * Returns the this object after filling the section identified by start and end with value
|
| | | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
| | | * @param value value to fill array section with
|
| | | * @param start index to start filling the array at. If start is negative, it is treated as
|
| | | * length+start where length is the length of the array.
|
| | |
| | | * Sorts an array.
|
| | | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
| | | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
| | | * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
| | | * value otherwise. If omitted, the elements are sorted in ascending order.
|
| | | * ```ts
|
| | | * [11,2,22,1].sort((a, b) => a - b)
|
| | | * ```
|
| | |
| | | every(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean;
|
| | |
|
| | | /**
|
| | | * Returns the this object after filling the section identified by start and end with value
|
| | | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
| | | * @param value value to fill array section with
|
| | | * @param start index to start filling the array at. If start is negative, it is treated as
|
| | | * length+start where length is the length of the array.
|
| | |
| | | * Sorts an array.
|
| | | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
| | | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
| | | * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
| | | * value otherwise. If omitted, the elements are sorted in ascending order.
|
| | | * ```ts
|
| | | * [11,2,22,1].sort((a, b) => a - b)
|
| | | * ```
|
| | |
| | | every(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean;
|
| | |
|
| | | /**
|
| | | * Returns the this object after filling the section identified by start and end with value
|
| | | * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
| | | * @param value value to fill array section with
|
| | | * @param start index to start filling the array at. If start is negative, it is treated as
|
| | | * length+start where length is the length of the array.
|
| | |
| | | * Sorts an array.
|
| | | * @param compareFn Function used to determine the order of the elements. It is expected to return
|
| | | * a negative value if first argument is less than second argument, zero if they're equal and a positive
|
| | | * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
|
| | | * value otherwise. If omitted, the elements are sorted in ascending order.
|
| | | * ```ts
|
| | | * [11,2,22,1].sort((a, b) => a - b)
|
| | | * ```
|
| | |
| | |
|
| | | declare namespace Intl {
|
| | | interface CollatorOptions {
|
| | | usage?: string;
|
| | | localeMatcher?: string;
|
| | | numeric?: boolean;
|
| | | caseFirst?: string;
|
| | | sensitivity?: string;
|
| | | ignorePunctuation?: boolean;
|
| | | usage?: string | undefined;
|
| | | localeMatcher?: string | undefined;
|
| | | numeric?: boolean | undefined;
|
| | | caseFirst?: string | undefined;
|
| | | sensitivity?: string | undefined;
|
| | | ignorePunctuation?: boolean | undefined;
|
| | | }
|
| | |
|
| | | interface ResolvedCollatorOptions {
|
| | |
| | | };
|
| | |
|
| | | interface NumberFormatOptions {
|
| | | localeMatcher?: string;
|
| | | style?: string;
|
| | | currency?: string;
|
| | | currencyDisplay?: string;
|
| | | currencySign?: string;
|
| | | useGrouping?: boolean;
|
| | | minimumIntegerDigits?: number;
|
| | | minimumFractionDigits?: number;
|
| | | maximumFractionDigits?: number;
|
| | | minimumSignificantDigits?: number;
|
| | | maximumSignificantDigits?: number;
|
| | | localeMatcher?: string | undefined;
|
| | | style?: string | undefined;
|
| | | currency?: string | undefined;
|
| | | currencySign?: string | undefined;
|
| | | useGrouping?: boolean | undefined;
|
| | | minimumIntegerDigits?: number | undefined;
|
| | | minimumFractionDigits?: number | undefined;
|
| | | maximumFractionDigits?: number | undefined;
|
| | | minimumSignificantDigits?: number | undefined;
|
| | | maximumSignificantDigits?: number | undefined;
|
| | | }
|
| | |
|
| | | interface ResolvedNumberFormatOptions {
|
| | |
| | | numberingSystem: string;
|
| | | style: string;
|
| | | currency?: string;
|
| | | currencyDisplay?: string;
|
| | | minimumIntegerDigits: number;
|
| | | minimumFractionDigits: number;
|
| | | maximumFractionDigits: number;
|
| | |
| | | };
|
| | |
|
| | | interface DateTimeFormatOptions {
|
| | | localeMatcher?: "best fit" | "lookup";
|
| | | weekday?: "long" | "short" | "narrow";
|
| | | era?: "long" | "short" | "narrow";
|
| | | year?: "numeric" | "2-digit";
|
| | | month?: "numeric" | "2-digit" | "long" | "short" | "narrow";
|
| | | day?: "numeric" | "2-digit";
|
| | | hour?: "numeric" | "2-digit";
|
| | | minute?: "numeric" | "2-digit";
|
| | | second?: "numeric" | "2-digit";
|
| | | timeZoneName?: "long" | "short";
|
| | | formatMatcher?: "best fit" | "basic";
|
| | | hour12?: boolean;
|
| | | timeZone?: string;
|
| | | localeMatcher?: "best fit" | "lookup" | undefined;
|
| | | weekday?: "long" | "short" | "narrow" | undefined;
|
| | | era?: "long" | "short" | "narrow" | undefined;
|
| | | year?: "numeric" | "2-digit" | undefined;
|
| | | month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined;
|
| | | day?: "numeric" | "2-digit" | undefined;
|
| | | hour?: "numeric" | "2-digit" | undefined;
|
| | | minute?: "numeric" | "2-digit" | undefined;
|
| | | second?: "numeric" | "2-digit" | undefined;
|
| | | timeZoneName?: "long" | "short" | undefined;
|
| | | formatMatcher?: "best fit" | "basic" | undefined;
|
| | | hour12?: boolean | undefined;
|
| | | timeZone?: string | undefined;
|
| | | }
|
| | |
|
| | | interface ResolvedDateTimeFormatOptions {
|