|
| 1 | +interface NumberConstructor { |
| 2 | + /** |
| 3 | + * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 |
| 4 | + * that is representable as a Number value, which is approximately: |
| 5 | + * 2.2204460492503130808472633361816 x 10−16. |
| 6 | + */ |
| 7 | + readonly EPSILON: number; |
| 8 | + |
| 9 | + /** |
| 10 | + * Returns true if passed value is finite. |
| 11 | + * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a |
| 12 | + * number. Only finite values of the type number, result in true. |
| 13 | + * @param number A numeric value. |
| 14 | + */ |
| 15 | + isFinite(number: unknown): number is number; |
| 16 | + |
| 17 | + /** |
| 18 | + * Returns true if the value passed is an integer, false otherwise. |
| 19 | + * @param number A numeric value. |
| 20 | + */ |
| 21 | + isInteger(number: unknown): number is number; |
| 22 | + |
| 23 | + /** |
| 24 | + * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a |
| 25 | + * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter |
| 26 | + * to a number. Only values of the type number, that are also NaN, result in true. |
| 27 | + * @param number A numeric value. |
| 28 | + */ |
| 29 | + isNaN(number: unknown): number is number; |
| 30 | + |
| 31 | + /** |
| 32 | + * Returns true if the value passed is a safe integer. |
| 33 | + * @param number A numeric value. |
| 34 | + */ |
| 35 | + isSafeInteger(number: unknown): number is number; |
| 36 | + |
| 37 | + /** |
| 38 | + * The value of the largest integer n such that n and n + 1 are both exactly representable as |
| 39 | + * a Number value. |
| 40 | + * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1. |
| 41 | + */ |
| 42 | + readonly MAX_SAFE_INTEGER: number; |
| 43 | + |
| 44 | + /** |
| 45 | + * The value of the smallest integer n such that n and n − 1 are both exactly representable as |
| 46 | + * a Number value. |
| 47 | + * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). |
| 48 | + */ |
| 49 | + readonly MIN_SAFE_INTEGER: number; |
| 50 | + |
| 51 | + /** |
| 52 | + * Converts a string to a floating-point number. |
| 53 | + * @param string A string that contains a floating-point number. |
| 54 | + */ |
| 55 | + parseFloat(string: string): number; |
| 56 | + |
| 57 | + /** |
| 58 | + * Converts A string to an integer. |
| 59 | + * @param s A string to convert into a number. |
| 60 | + * @param radix A value between 2 and 36 that specifies the base of the number in numString. |
| 61 | + * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. |
| 62 | + * All other strings are considered decimal. |
| 63 | + */ |
| 64 | + parseInt(string: string, radix?: number): number; |
| 65 | +} |
| 66 | + |
| 67 | +interface ObjectConstructor { |
| 68 | + /** |
| 69 | + * Copy the values of all of the enumerable own properties from one or more source objects to a |
| 70 | + * target object. Returns the target object. |
| 71 | + * @param target The target object to copy to. |
| 72 | + * @param sources One or more source objects from which to copy properties |
| 73 | + */ |
| 74 | + assign<T, Ts extends readonly any[]>( |
| 75 | + target: T, |
| 76 | + ...sources: Ts |
| 77 | + ): UnionToIntersection<T | Ts[number]>; |
| 78 | + |
| 79 | + /** |
| 80 | + * Returns an array of all symbol properties found directly on object o. |
| 81 | + * @param o Object to retrieve the symbols from. |
| 82 | + */ |
| 83 | + getOwnPropertySymbols(o: any): symbol[]; |
| 84 | + |
| 85 | + /** |
| 86 | + * Returns the names of the enumerable string properties and methods of an object. |
| 87 | + * @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. |
| 88 | + */ |
| 89 | + keys(o: {}): string[]; |
| 90 | + |
| 91 | + /** |
| 92 | + * Returns true if the values are the same value, false otherwise. |
| 93 | + * @param value1 The first value. |
| 94 | + * @param value2 The second value. |
| 95 | + */ |
| 96 | + is(value1: any, value2: any): boolean; |
| 97 | + |
| 98 | + /** |
| 99 | + * Sets the prototype of a specified object o to object proto or null. Returns the object o. |
| 100 | + * @param o The object to change its prototype. |
| 101 | + * @param proto The value of the new prototype or null. |
| 102 | + */ |
| 103 | + setPrototypeOf<T>(o: T, proto: object | null): T; |
| 104 | +} |
| 105 | + |
| 106 | +interface String { |
| 107 | + /** |
| 108 | + * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point |
| 109 | + * value of the UTF-16 encoded code point starting at the string element at position pos in |
| 110 | + * the String resulting from converting this object to a String. |
| 111 | + * If there is no element at that position, the result is undefined. |
| 112 | + * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. |
| 113 | + */ |
| 114 | + codePointAt(pos: number): number | undefined; |
| 115 | + |
| 116 | + /** |
| 117 | + * Returns true if searchString appears as a substring of the result of converting this |
| 118 | + * object to a String, at one or more positions that are |
| 119 | + * greater than or equal to position; otherwise, returns false. |
| 120 | + * @param searchString search string |
| 121 | + * @param position If position is undefined, 0 is assumed, so as to search all of the String. |
| 122 | + */ |
| 123 | + includes(searchString: string, position?: number): boolean; |
| 124 | + |
| 125 | + /** |
| 126 | + * Returns true if the sequence of elements of searchString converted to a String is the |
| 127 | + * same as the corresponding elements of this object (converted to a String) starting at |
| 128 | + * endPosition – length(this). Otherwise returns false. |
| 129 | + */ |
| 130 | + endsWith(searchString: string, endPosition?: number): boolean; |
| 131 | + |
| 132 | + /** |
| 133 | + * Returns the String value result of normalizing the string into the normalization form |
| 134 | + * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms. |
| 135 | + * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default |
| 136 | + * is "NFC" |
| 137 | + */ |
| 138 | + normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD"): string; |
| 139 | + |
| 140 | + /** |
| 141 | + * Returns a String value that is made from count copies appended together. If count is 0, |
| 142 | + * the empty string is returned. |
| 143 | + * @param count number of copies to append |
| 144 | + */ |
| 145 | + repeat(count: number): string; |
| 146 | + |
| 147 | + /** |
| 148 | + * Returns true if the sequence of elements of searchString converted to a String is the |
| 149 | + * same as the corresponding elements of this object (converted to a String) starting at |
| 150 | + * position. Otherwise returns false. |
| 151 | + */ |
| 152 | + startsWith(searchString: string, position?: number): boolean; |
| 153 | + |
| 154 | + /** |
| 155 | + * Returns an `<a>` HTML anchor element and sets the name attribute to the text value |
| 156 | + * @param name |
| 157 | + */ |
| 158 | + anchor(name: string): string; |
| 159 | + |
| 160 | + /** Returns a `<big>` HTML element */ |
| 161 | + big(): string; |
| 162 | + |
| 163 | + /** Returns a `<blink>` HTML element */ |
| 164 | + blink(): string; |
| 165 | + |
| 166 | + /** Returns a `<b>` HTML element */ |
| 167 | + bold(): string; |
| 168 | + |
| 169 | + /** Returns a `<tt>` HTML element */ |
| 170 | + fixed(): string; |
| 171 | + |
| 172 | + /** Returns a `<font>` HTML element and sets the color attribute value */ |
| 173 | + fontcolor(color: string): string; |
| 174 | + |
| 175 | + /** Returns a `<font>` HTML element and sets the size attribute value */ |
| 176 | + fontsize(size: number): string; |
| 177 | + |
| 178 | + /** Returns a `<font>` HTML element and sets the size attribute value */ |
| 179 | + fontsize(size: string): string; |
| 180 | + |
| 181 | + /** Returns an `<i>` HTML element */ |
| 182 | + italics(): string; |
| 183 | + |
| 184 | + /** Returns an `<a>` HTML element and sets the href attribute value */ |
| 185 | + link(url: string): string; |
| 186 | + |
| 187 | + /** Returns a `<small>` HTML element */ |
| 188 | + small(): string; |
| 189 | + |
| 190 | + /** Returns a `<strike>` HTML element */ |
| 191 | + strike(): string; |
| 192 | + |
| 193 | + /** Returns a `<sub>` HTML element */ |
| 194 | + sub(): string; |
| 195 | + |
| 196 | + /** Returns a `<sup>` HTML element */ |
| 197 | + sup(): string; |
| 198 | +} |
0 commit comments