@@ -154,3 +154,105 @@ interface ObjectConstructor {
154
154
*/
155
155
keys ( o : object ) : string [ ] ;
156
156
}
157
+
158
+ interface CallableFunction extends Function {
159
+ /**
160
+ * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
161
+ * @param thisArg The object to be used as the this object.
162
+ * @param args An array of argument values to be passed to the function.
163
+ */
164
+ apply < T , R > ( this : ( this : T ) => R , thisArg : T ) : R ;
165
+ apply < T , A extends any [ ] , R > (
166
+ this : ( this : T , ...args : A ) => R ,
167
+ thisArg : T ,
168
+ args : A
169
+ ) : R ;
170
+
171
+ /**
172
+ * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
173
+ * @param thisArg The object to be used as the this object.
174
+ * @param args Argument values to be passed to the function.
175
+ */
176
+ call < T , A extends any [ ] , R > (
177
+ this : ( this : T , ...args : A ) => R ,
178
+ thisArg : T ,
179
+ ...args : A
180
+ ) : R ;
181
+
182
+ /**
183
+ * For a given function, creates a bound function that has the same body as the original function.
184
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
185
+ * @param thisArg The object to be used as the this object.
186
+ * @param args Arguments to bind to the parameters of the function.
187
+ */
188
+ bind < T , A extends readonly any [ ] , B extends readonly any [ ] , R > (
189
+ this : ( this : T , ...args : [ ...A , ...B ] ) => R ,
190
+ thisArg : T ,
191
+ ...args : A
192
+ ) : ( ...args : B ) => R ;
193
+ }
194
+
195
+ interface IArguments {
196
+ [ index : number ] : unknown ;
197
+ length : number ;
198
+ callee : Function ;
199
+ }
200
+
201
+ type JSONValue =
202
+ | null
203
+ | string
204
+ | number
205
+ | boolean
206
+ | {
207
+ [ K in string ] ?: JSONValue ;
208
+ }
209
+ | JSONValue [ ] ;
210
+
211
+ interface JSON {
212
+ /**
213
+ * Converts a JavaScript Object Notation (JSON) string into an object.
214
+ * @param text A valid JSON string.
215
+ * @param reviver A function that transforms the results. This function is called for each member of the object.
216
+ * If a member contains nested objects, the nested objects are transformed before the parent object is.
217
+ */
218
+ parse (
219
+ text : string ,
220
+ reviver ?: ( this : JSONValue , key : string , value : JSONValue ) => any
221
+ ) : JSONValue ;
222
+ /**
223
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
224
+ * @param value A JavaScript value, usually an object or array, to be converted.
225
+ * @param replacer A function that transforms the results.
226
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
227
+ */
228
+ stringify (
229
+ value : JSONValue ,
230
+ replacer ?: ( this : JSONValue , key : string , value : JSONValue ) => any ,
231
+ space ?: string | number
232
+ ) : string ;
233
+ /**
234
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
235
+ * @param value A JavaScript value, usually an object or array, to be converted.
236
+ * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified.
237
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
238
+ */
239
+ stringify (
240
+ value : JSONValue ,
241
+ replacer ?: ( number | string ) [ ] | null ,
242
+ space ?: string | number
243
+ ) : string ;
244
+ }
245
+
246
+ /**
247
+ * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
248
+ */
249
+ declare var JSON : JSON ;
250
+
251
+ interface ArrayConstructor {
252
+ new < T > ( arrayLength : number ) : T [ ] ;
253
+ new < T > ( ...items : T [ ] ) : T [ ] ;
254
+ < T > ( arrayLength : number ) : T [ ] ;
255
+ < T > ( ...items : T [ ] ) : T [ ] ;
256
+ isArray ( arg : any ) : arg is unknown [ ] ;
257
+ readonly prototype : unknown [ ] ;
258
+ }
0 commit comments