typescript-src 0.8.1.1 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/support/lib.d.ts +596 -9
- data/lib/support/tsc +0 -0
- data/lib/support/tsc.js +4001 -3929
- data/lib/support/typescript.js +3623 -3676
- data/typescript-src.gemspec +1 -1
- metadata +4 -4
data/lib/support/lib.d.ts
CHANGED
@@ -4,7 +4,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
4
|
this file except in compliance with the License. You may obtain a copy of the
|
5
5
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
6
6
|
|
7
|
-
THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
8
8
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
9
9
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
10
10
|
MERCHANTABLITY OR NON-INFRINGEMENT.
|
@@ -21,14 +21,62 @@ and limitations under the License.
|
|
21
21
|
|
22
22
|
declare var NaN: number;
|
23
23
|
declare var Infinity: number;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* Evaluates JavaScript code and executes it.
|
27
|
+
* @param x A String value that contains valid JavaScript code.
|
28
|
+
*/
|
24
29
|
declare function eval(x: string): any;
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Converts A string to an integer.
|
33
|
+
* @param s A string to convert into a number.
|
34
|
+
* @param radix A value between 2 and 36 that specifies the base of the number in numString.
|
35
|
+
* If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
|
36
|
+
* All other strings are considered decimal.
|
37
|
+
*/
|
25
38
|
declare function parseInt(s: string, radix?: number): number;
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Converts a string to a floating-point number.
|
42
|
+
* @param string A string that contains a floating-point number.
|
43
|
+
*/
|
26
44
|
declare function parseFloat(string: string): number;
|
45
|
+
|
46
|
+
/**
|
47
|
+
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
|
48
|
+
* @param number A numeric value.
|
49
|
+
*/
|
27
50
|
declare function isNaN(number: number): bool;
|
51
|
+
|
52
|
+
/**
|
53
|
+
* Determines whether a supplied number is finite.
|
54
|
+
* @param number Any numeric value.
|
55
|
+
*/
|
28
56
|
declare function isFinite(number: number): bool;
|
57
|
+
|
58
|
+
/**
|
59
|
+
* Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
|
60
|
+
* @param encodedURI A value representing an encoded URI.
|
61
|
+
*/
|
29
62
|
declare function decodeURI(encodedURI: string): string;
|
63
|
+
|
64
|
+
/**
|
65
|
+
* Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
|
66
|
+
* @param encodedURIComponent A value representing an encoded URI component.
|
67
|
+
*/
|
30
68
|
declare function decodeURIComponent(encodedURIComponent: string): string;
|
69
|
+
|
70
|
+
/**
|
71
|
+
* Encodes a text string as a valid Uniform Resource Identifier (URI)
|
72
|
+
* @param uri A value representing an encoded URI.
|
73
|
+
*/
|
31
74
|
declare function encodeURI(uri: string): string;
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
|
78
|
+
* @param uriComponent A value representing an encoded URI component.
|
79
|
+
*/
|
32
80
|
declare function encodeURIComponent(uriComponent: string): string;
|
33
81
|
|
34
82
|
interface PropertyDescriptor {
|
@@ -45,42 +93,172 @@ interface PropertyDescriptorMap {
|
|
45
93
|
}
|
46
94
|
|
47
95
|
interface Object {
|
96
|
+
/** Returns a string representation of an object. */
|
48
97
|
toString(): string;
|
98
|
+
|
99
|
+
/** Returns a date converted to a string using the current locale. */
|
49
100
|
toLocaleString(): string;
|
101
|
+
|
102
|
+
/** Returns the primitive value of the specified object. */
|
50
103
|
valueOf(): Object;
|
104
|
+
|
105
|
+
/**
|
106
|
+
* Determines whether an object has a property with the specified name.
|
107
|
+
* @param v A property name.
|
108
|
+
*/
|
51
109
|
hasOwnProperty(v: string): bool;
|
110
|
+
|
111
|
+
/**
|
112
|
+
* Determines whether an object exists in another object's prototype chain.
|
113
|
+
* @param v Another object whose prototype chain is to be checked.
|
114
|
+
*/
|
52
115
|
isPrototypeOf(v: Object): bool;
|
116
|
+
|
117
|
+
/**
|
118
|
+
* Determines whether a specified property is enumerable.
|
119
|
+
* @param v A property name.
|
120
|
+
*/
|
53
121
|
propertyIsEnumerable(v: string): bool;
|
122
|
+
|
54
123
|
[s: string]: any;
|
55
124
|
}
|
125
|
+
|
126
|
+
/**
|
127
|
+
* Provides functionality common to all JavaScript objects.
|
128
|
+
*/
|
56
129
|
declare var Object: {
|
57
130
|
new (value?: any): Object;
|
58
131
|
(): any;
|
59
132
|
(value: any): any;
|
133
|
+
|
134
|
+
/** A reference to the prototype for a class of objects. */
|
60
135
|
prototype: Object;
|
136
|
+
|
137
|
+
/**
|
138
|
+
* Returns the prototype of an object.
|
139
|
+
* @param o The object that references the prototype.
|
140
|
+
*/
|
61
141
|
getPrototypeOf(o: any): any;
|
142
|
+
|
143
|
+
/**
|
144
|
+
* Gets the own property descriptor of the specified object.
|
145
|
+
* An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
|
146
|
+
* @param o Object that contains the property.
|
147
|
+
* @param p Name of the property.
|
148
|
+
*/
|
62
149
|
getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;
|
150
|
+
|
151
|
+
/**
|
152
|
+
* Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
|
153
|
+
* on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
|
154
|
+
* @param o Object that contains the own properties.
|
155
|
+
*/
|
63
156
|
getOwnPropertyNames(o: any): string[];
|
157
|
+
|
158
|
+
/**
|
159
|
+
* Creates an object that has the specified prototype, and that optionally contains specified properties.
|
160
|
+
* @param o Object to use as a prototype. May be null
|
161
|
+
* @param properties JavaScript object that contains one or more property descriptors.
|
162
|
+
*/
|
64
163
|
create(o: any, properties?: PropertyDescriptorMap): any;
|
164
|
+
|
165
|
+
/**
|
166
|
+
* Adds a property to an object, or modifies attributes of an existing property.
|
167
|
+
* @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.
|
168
|
+
* @param p The property name.
|
169
|
+
* @param attributes Descriptor for the property. It can be for a data property or an accessor property.
|
170
|
+
*/
|
65
171
|
defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;
|
172
|
+
|
173
|
+
/**
|
174
|
+
* Adds one or more properties to an object, and/or modifies attributes of existing properties.
|
175
|
+
* @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
|
176
|
+
* @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
|
177
|
+
*/
|
66
178
|
defineProperties(o: any, properties: PropertyDescriptorMap): any;
|
179
|
+
|
180
|
+
/**
|
181
|
+
* Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
|
182
|
+
* @param o Object on which to lock the attributes.
|
183
|
+
*/
|
67
184
|
seal(o: any): any;
|
185
|
+
|
186
|
+
/**
|
187
|
+
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
|
188
|
+
* @param o Object on which to lock the attributes.
|
189
|
+
*/
|
68
190
|
freeze(o: any): any;
|
191
|
+
|
192
|
+
/**
|
193
|
+
* Prevents the addition of new properties to an object.
|
194
|
+
* @param o Object to make non-extensible.
|
195
|
+
*/
|
69
196
|
preventExtensions(o: any): any;
|
197
|
+
|
198
|
+
/**
|
199
|
+
* Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
|
200
|
+
* @param o Object to test.
|
201
|
+
*/
|
70
202
|
isSealed(o: any): bool;
|
203
|
+
|
204
|
+
/**
|
205
|
+
* Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
|
206
|
+
* @param o Object to test.
|
207
|
+
*/
|
71
208
|
isFrozen(o: any): bool;
|
209
|
+
|
210
|
+
/**
|
211
|
+
* Returns a value that indicates whether new properties can be added to an object.
|
212
|
+
* @param o Object to test.
|
213
|
+
*/
|
72
214
|
isExtensible(o: any): bool;
|
215
|
+
|
216
|
+
/**
|
217
|
+
* Returns the names of the enumerable properties and methods of an object.
|
218
|
+
* @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.
|
219
|
+
*/
|
73
220
|
keys(o: any): string[];
|
74
221
|
}
|
75
222
|
|
223
|
+
/**
|
224
|
+
* Creates a new function.
|
225
|
+
*/
|
76
226
|
interface Function {
|
77
|
-
|
227
|
+
/**
|
228
|
+
* Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
|
229
|
+
* @param thisArg The object to be used as the this object.
|
230
|
+
* @param argArray A set of arguments to be passed to the function.
|
231
|
+
*/
|
232
|
+
apply(thisArg: any, argArray?: any): any;
|
233
|
+
|
234
|
+
/**
|
235
|
+
* Calls a method of an object, substituting another object for the current object.
|
236
|
+
* @param thisArg The object to be used as the current object.
|
237
|
+
* @param argArray A list of arguments to be passed to the method.
|
238
|
+
*/
|
78
239
|
call(thisArg: any, ...argArray: any[]): any;
|
79
|
-
|
240
|
+
|
241
|
+
/**
|
242
|
+
* For a given function, creates a bound function that has the same body as the original function.
|
243
|
+
* The this object of the bound function is associated with the specified object, and has the specified initial parameters.
|
244
|
+
* @param thisArg An object to which the this keyword can refer inside the new function.
|
245
|
+
* @param argArray A list of arguments to be passed to the new function.
|
246
|
+
*/
|
247
|
+
bind(thisArg: any, ...argArray: any[]): any;
|
248
|
+
|
80
249
|
prototype: any;
|
81
250
|
length: number;
|
251
|
+
|
252
|
+
// Non-standard extensions
|
253
|
+
arguments: any;
|
254
|
+
caller: Function;
|
82
255
|
}
|
256
|
+
|
83
257
|
declare var Function: {
|
258
|
+
/**
|
259
|
+
* Creates a new function.
|
260
|
+
* @param args A list of arguments the function accepts.
|
261
|
+
*/
|
84
262
|
new (...args: string[]): Function;
|
85
263
|
(...args: string[]): Function;
|
86
264
|
prototype: Function;
|
@@ -93,36 +271,153 @@ interface IArguments {
|
|
93
271
|
}
|
94
272
|
|
95
273
|
interface String {
|
274
|
+
/** Returns a string representation of a string. */
|
96
275
|
toString(): string;
|
276
|
+
|
277
|
+
/**
|
278
|
+
* Returns the character at the specified index.
|
279
|
+
* @param pos The zero-based index of the desired character.
|
280
|
+
*/
|
97
281
|
charAt(pos: number): string;
|
282
|
+
|
283
|
+
/**
|
284
|
+
* Returns the Unicode value of the character at the specified location.
|
285
|
+
* @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
|
286
|
+
*/
|
98
287
|
charCodeAt(index: number): number;
|
288
|
+
|
289
|
+
/**
|
290
|
+
* Returns a string that contains the concatenation of two or more strings.
|
291
|
+
* @param strings The strings to append to the end of the string.
|
292
|
+
*/
|
99
293
|
concat(...strings: string[]): string;
|
294
|
+
|
295
|
+
/**
|
296
|
+
* Returns the position of the first occurrence of a substring.
|
297
|
+
* @param searchString The substring to search for in the string
|
298
|
+
* @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
|
299
|
+
*/
|
100
300
|
indexOf(searchString: string, position?: number): number;
|
301
|
+
|
302
|
+
/**
|
303
|
+
* Returns the last occurrence of a substring in the string.
|
304
|
+
* @param searchString The substring to search for.
|
305
|
+
* @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
|
306
|
+
*/
|
101
307
|
lastIndexOf(searchString: string, position?: number): number;
|
308
|
+
|
309
|
+
/**
|
310
|
+
* Determines whether two strings are equivalent in the current locale.
|
311
|
+
* @param that String to compare to target string
|
312
|
+
*/
|
102
313
|
localeCompare(that: string): number;
|
314
|
+
|
315
|
+
/**
|
316
|
+
* Matches a string with a regular expression, and returns an array containing the results of that search.
|
317
|
+
* @param regexp A variable name or string literal containing the regular expression pattern and flags.
|
318
|
+
*/
|
103
319
|
match(regexp: string): string[];
|
320
|
+
/**
|
321
|
+
* Matches a string with a regular expression, and returns an array containing the results of that search.
|
322
|
+
* @param regexp A regular expression object that contains the regular expression pattern and applicable flags.
|
323
|
+
*/
|
104
324
|
match(regexp: RegExp): string[];
|
325
|
+
|
326
|
+
/**
|
327
|
+
* Replaces text in a string, using a regular expression or search string.
|
328
|
+
* @param searchValue A String object or string literal that represents the regular expression
|
329
|
+
* @param replaceValue A String object or string literal containing the text to replace for every successful match of rgExp in stringObj.
|
330
|
+
*/
|
105
331
|
replace(searchValue: string, replaceValue: string): string;
|
332
|
+
/**
|
333
|
+
* Replaces text in a string, using a regular expression or search string.
|
334
|
+
* @param searchValue A String object or string literal that represents the regular expression
|
335
|
+
* @param replaceValue A function that returns the replacement text.
|
336
|
+
*/
|
106
337
|
replace(searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string;
|
338
|
+
/**
|
339
|
+
* Replaces text in a string, using a regular expression or search string.
|
340
|
+
* @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags
|
341
|
+
* @param replaceValue A String object or string literal containing the text to replace for every successful match of rgExp in stringObj.
|
342
|
+
*/
|
107
343
|
replace(searchValue: RegExp, replaceValue: string): string;
|
344
|
+
/**
|
345
|
+
* Replaces text in a string, using a regular expression or search string.
|
346
|
+
* @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags
|
347
|
+
* @param replaceValue A function that returns the replacement text.
|
348
|
+
*/
|
108
349
|
replace(searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string;
|
350
|
+
|
351
|
+
/**
|
352
|
+
* Finds the first substring match in a regular expression search.
|
353
|
+
* @param regexp The regular expression pattern and applicable flags.
|
354
|
+
*/
|
109
355
|
search(regexp: string): number;
|
356
|
+
/**
|
357
|
+
* Finds the first substring match in a regular expression search.
|
358
|
+
* @param regexp The regular expression pattern and applicable flags.
|
359
|
+
*/
|
110
360
|
search(regexp: RegExp): number;
|
361
|
+
|
362
|
+
/**
|
363
|
+
* Returns a section of a string.
|
364
|
+
* @param start The index to the beginning of the specified portion of stringObj.
|
365
|
+
* @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.
|
366
|
+
* If this value is not specified, the substring continues to the end of stringObj.
|
367
|
+
*/
|
111
368
|
slice(start: number, end?: number): string;
|
112
|
-
|
113
|
-
|
369
|
+
|
370
|
+
/**
|
371
|
+
* Split a string into substrings using the specified separator and return them as an array.
|
372
|
+
* @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.
|
373
|
+
* @param limit A value used to limit the number of elements returned in the array.
|
374
|
+
*/
|
375
|
+
split(separator: string, limit?: number): string[];
|
376
|
+
/**
|
377
|
+
* Split a string into substrings using the specified separator and return them as an array.
|
378
|
+
* @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.
|
379
|
+
* @param limit A value used to limit the number of elements returned in the array.
|
380
|
+
*/
|
381
|
+
split(separator: RegExp, limit?: number): string[];
|
382
|
+
|
383
|
+
/**
|
384
|
+
* Returns the substring at the specified location within a String object.
|
385
|
+
* @param start The zero-based index integer indicating the beginning of the substring.
|
386
|
+
* @param end Zero-based index integer indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
|
387
|
+
* If end is omitted, the characters from start through the end of the original string are returned.
|
388
|
+
*/
|
114
389
|
substring(start: number, end?: number): string;
|
390
|
+
|
391
|
+
/** Converts all the alphabetic characters in a string to lowercase. */
|
115
392
|
toLowerCase(): string;
|
393
|
+
|
394
|
+
/** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
|
116
395
|
toLocaleLowerCase(): string;
|
396
|
+
|
397
|
+
/** Converts all the alphabetic characters in a string to uppercase. */
|
117
398
|
toUpperCase(): string;
|
399
|
+
|
400
|
+
/** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
|
118
401
|
toLocaleUpperCase(): string;
|
402
|
+
|
403
|
+
/** Removes the leading and trailing white space and line terminator characters from a string. */
|
119
404
|
trim(): string;
|
120
405
|
|
406
|
+
/** Returns the length of a String object. */
|
121
407
|
length: number;
|
122
408
|
|
123
409
|
// IE extensions
|
410
|
+
/**
|
411
|
+
* Gets a substring beginning at the specified location and having the specified length.
|
412
|
+
* @param from The starting position of the desired substring. The index of the first character in the string is zero.
|
413
|
+
* @param length The number of characters to include in the returned substring.
|
414
|
+
*/
|
124
415
|
substr(from: number, length?: number): string;
|
125
416
|
}
|
417
|
+
|
418
|
+
/**
|
419
|
+
* Allows manipulation and formatting of text strings and determination and location of substrings within strings.
|
420
|
+
*/
|
126
421
|
declare var String: {
|
127
422
|
new (value?: any): String;
|
128
423
|
(value?: any): string;
|
@@ -144,92 +439,298 @@ interface Number {
|
|
144
439
|
toExponential(fractionDigits?: number): string;
|
145
440
|
toPrecision(precision: number): string;
|
146
441
|
}
|
442
|
+
/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
|
147
443
|
declare var Number: {
|
148
444
|
new (value?: any): Number;
|
149
445
|
(value?: any): number;
|
150
446
|
prototype: Number;
|
447
|
+
/** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
|
151
448
|
MAX_VALUE: number;
|
449
|
+
/** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
|
152
450
|
MIN_VALUE: number;
|
451
|
+
/**
|
452
|
+
* A value that is not a number.
|
453
|
+
* In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
|
454
|
+
*/
|
153
455
|
NaN: number;
|
456
|
+
/**
|
457
|
+
* A value that is less than the largest negative number that can be represented in JavaScript.
|
458
|
+
* JavaScript displays NEGATIVE_INFINITY values as -infinity.
|
459
|
+
*/
|
154
460
|
NEGATIVE_INFINITY: number;
|
461
|
+
/**
|
462
|
+
* A value greater than the largest number that can be represented in JavaScript.
|
463
|
+
* JavaScript displays POSITIVE_INFINITY values as infinity.
|
464
|
+
*/
|
155
465
|
POSITIVE_INFINITY: number;
|
156
466
|
}
|
157
467
|
|
158
468
|
interface Math {
|
469
|
+
/** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
|
159
470
|
E: number;
|
471
|
+
/** The natural logarithm of 10. */
|
160
472
|
LN10: number;
|
473
|
+
/** The natural logarithm of 2. */
|
161
474
|
LN2: number;
|
475
|
+
/** The base-2 logarithm of e. */
|
162
476
|
LOG2E: number;
|
477
|
+
/** The base-10 logarithm of e. */
|
163
478
|
LOG10E: number;
|
479
|
+
/** Pi. This is the ratio of the circumference of a circle to its diameter. */
|
164
480
|
PI: number;
|
481
|
+
/** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
|
165
482
|
SQRT1_2: number;
|
483
|
+
/** The square root of 2. */
|
166
484
|
SQRT2: number;
|
485
|
+
/**
|
486
|
+
* Returns the absolute value of a number (the value without regard to whether it is positive or negative).
|
487
|
+
* For example, the absolute value of -5 is the same as the absolute value of 5.
|
488
|
+
* @param x A numeric expression for which the absolute value is needed.
|
489
|
+
*/
|
167
490
|
abs(x: number): number;
|
491
|
+
/**
|
492
|
+
* Returns the arc cosine (or inverse cosine) of a number.
|
493
|
+
* @param x A numeric expression.
|
494
|
+
*/
|
168
495
|
acos(x: number): number;
|
496
|
+
/**
|
497
|
+
* Returns the arcsine of a number.
|
498
|
+
* @param x A numeric expression.
|
499
|
+
*/
|
169
500
|
asin(x: number): number;
|
501
|
+
/**
|
502
|
+
* Returns the arctangent of a number.
|
503
|
+
* @param x A numeric expression for which the arctangent is needed.
|
504
|
+
*/
|
170
505
|
atan(x: number): number;
|
506
|
+
/**
|
507
|
+
* Returns the angle (in radians) from the X axis to a point (y,x).
|
508
|
+
* @param y A numeric expression representing the cartesian y-coordinate.
|
509
|
+
* @param x A numeric expression representing the cartesian x-coordinate.
|
510
|
+
*/
|
171
511
|
atan2(y: number, x: number): number;
|
512
|
+
/**
|
513
|
+
* Returns the smallest integer greater than or equal to its numeric argument.
|
514
|
+
* @param x A numeric expression.
|
515
|
+
*/
|
172
516
|
ceil(x: number): number;
|
517
|
+
/**
|
518
|
+
* Returns the cosine of a number.
|
519
|
+
* @param x A numeric expression that contains an angle measured in radians.
|
520
|
+
*/
|
173
521
|
cos(x: number): number;
|
522
|
+
/**
|
523
|
+
* Returns e (the base of natural logarithms) raised to a power.
|
524
|
+
* @param x A numeric expression representing the power of e.
|
525
|
+
*/
|
174
526
|
exp(x: number): number;
|
527
|
+
/**
|
528
|
+
* Returns the greatest integer less than or equal to its numeric argument.
|
529
|
+
* @param x A numeric expression.
|
530
|
+
*/
|
175
531
|
floor(x: number): number;
|
532
|
+
/**
|
533
|
+
* Returns the natural logarithm (base e) of a number.
|
534
|
+
* @param x A numeric expression.
|
535
|
+
*/
|
176
536
|
log(x: number): number;
|
537
|
+
/**
|
538
|
+
* Returns the larger of a set of supplied numeric expressions.
|
539
|
+
* @param values Numeric expressions to be evaluated.
|
540
|
+
*/
|
177
541
|
max(...values: number[]): number;
|
542
|
+
/**
|
543
|
+
* Returns the smaller of a set of supplied numeric expressions.
|
544
|
+
* @param values Numeric expressions to be evaluated.
|
545
|
+
*/
|
178
546
|
min(...values: number[]): number;
|
547
|
+
/**
|
548
|
+
* Returns the value of a base expression taken to a specified power.
|
549
|
+
* @param x The base value of the expression.
|
550
|
+
* @param y The exponent value of the expression.
|
551
|
+
*/
|
179
552
|
pow(x: number, y: number): number;
|
553
|
+
/** Returns a pseudorandom number between 0 and 1. */
|
180
554
|
random(): number;
|
555
|
+
/**
|
556
|
+
* Returns a supplied numeric expression rounded to the nearest integer.
|
557
|
+
* @param x The value to be rounded to the nearest integer.
|
558
|
+
*/
|
181
559
|
round(x: number): number;
|
560
|
+
/**
|
561
|
+
* Returns the sine of a number.
|
562
|
+
* @param x A numeric expression that contains an angle measured in radians.
|
563
|
+
*/
|
182
564
|
sin(x: number): number;
|
565
|
+
/**
|
566
|
+
* Returns the square root of a number.
|
567
|
+
* @param x A numeric expression.
|
568
|
+
*/
|
183
569
|
sqrt(x: number): number;
|
570
|
+
/**
|
571
|
+
* Returns the tangent of a number.
|
572
|
+
* @param x A numeric expression that contains an angle measured in radians.
|
573
|
+
*/
|
184
574
|
tan(x: number): number;
|
185
575
|
}
|
576
|
+
/** An intrinsic object that provides basic mathematics functionality and constants. */
|
186
577
|
declare var Math: Math;
|
187
578
|
|
579
|
+
/** Enables basic storage and retrieval of dates and times. */
|
188
580
|
interface Date {
|
581
|
+
/** Returns a string representation of a date. The format of the string depends on the locale. */
|
189
582
|
toString(): string;
|
583
|
+
/** Returns a date as a string value. */
|
190
584
|
toDateString(): string;
|
585
|
+
/** Returns a time as a string value. */
|
191
586
|
toTimeString(): string;
|
192
587
|
toLocaleString(): string;
|
588
|
+
/** Returns a date as a string value appropriate to the host environment's current locale. */
|
193
589
|
toLocaleDateString(): string;
|
590
|
+
/** Returns a time as a string value appropriate to the host environment's current locale. */
|
194
591
|
toLocaleTimeString(): string;
|
592
|
+
/** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
|
195
593
|
valueOf(): number;
|
594
|
+
/** Gets the time value in milliseconds. */
|
196
595
|
getTime(): number;
|
596
|
+
/** Gets the year, using local time. */
|
197
597
|
getFullYear(): number;
|
598
|
+
/** Gets the year using Universal Coordinated Time (UTC). */
|
198
599
|
getUTCFullYear(): number;
|
600
|
+
/** Gets the month, using local time. */
|
199
601
|
getMonth(): number;
|
602
|
+
/** Gets the month of a Date object using Universal Coordinated Time (UTC). */
|
200
603
|
getUTCMonth(): number;
|
604
|
+
/** Gets the day-of-the-month, using local time. */
|
201
605
|
getDate(): number;
|
606
|
+
/** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
|
202
607
|
getUTCDate(): number;
|
608
|
+
/** Gets the day of the week, using local time. */
|
203
609
|
getDay(): number;
|
610
|
+
/** Gets the day of the week using Universal Coordinated Time (UTC). */
|
204
611
|
getUTCDay(): number;
|
612
|
+
/** Gets the hours in a date, using local time. */
|
205
613
|
getHours(): number;
|
614
|
+
/** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
|
206
615
|
getUTCHours(): number;
|
616
|
+
/** Gets the minutes of a Date object, using local time. */
|
207
617
|
getMinutes(): number;
|
618
|
+
/** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
|
208
619
|
getUTCMinutes(): number;
|
620
|
+
/** Gets the seconds of a Date object, using local time. */
|
209
621
|
getSeconds(): number;
|
622
|
+
/** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
|
210
623
|
getUTCSeconds(): number;
|
624
|
+
/** Gets the milliseconds of a Date, using local time. */
|
211
625
|
getMilliseconds(): number;
|
626
|
+
/** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
|
212
627
|
getUTCMilliseconds(): number;
|
628
|
+
/** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
|
213
629
|
getTimezoneOffset(): number;
|
630
|
+
/**
|
631
|
+
* Sets the date and time value in the Date object.
|
632
|
+
* @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
|
633
|
+
*/
|
214
634
|
setTime(time: number): void;
|
635
|
+
/**
|
636
|
+
* Sets the milliseconds value in the Date object using local time.
|
637
|
+
* @param ms A numeric value equal to the millisecond value.
|
638
|
+
*/
|
215
639
|
setMilliseconds(ms: number): void;
|
640
|
+
/**
|
641
|
+
* Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
|
642
|
+
* @param ms A numeric value equal to the millisecond value.
|
643
|
+
*/
|
216
644
|
setUTCMilliseconds(ms: number): void;
|
645
|
+
|
646
|
+
/**
|
647
|
+
* Sets the seconds value in the Date object using local time.
|
648
|
+
* @param sec A numeric value equal to the seconds value.
|
649
|
+
* @param ms A numeric value equal to the milliseconds value.
|
650
|
+
*/
|
217
651
|
setSeconds(sec: number, ms?: number): void;
|
652
|
+
/**
|
653
|
+
* Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
|
654
|
+
* @param sec A numeric value equal to the seconds value.
|
655
|
+
* @param ms A numeric value equal to the milliseconds value.
|
656
|
+
*/
|
218
657
|
setUTCSeconds(sec: number, ms?: number): void;
|
658
|
+
/**
|
659
|
+
* Sets the minutes value in the Date object using local time.
|
660
|
+
* @param min A numeric value equal to the minutes value.
|
661
|
+
* @param sec A numeric value equal to the seconds value.
|
662
|
+
* @param ms A numeric value equal to the milliseconds value.
|
663
|
+
*/
|
219
664
|
setMinutes(min: number, sec?: number, ms?: number): void;
|
665
|
+
/**
|
666
|
+
* Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
|
667
|
+
* @param min A numeric value equal to the minutes value.
|
668
|
+
* @param sec A numeric value equal to the seconds value.
|
669
|
+
* @param ms A numeric value equal to the milliseconds value.
|
670
|
+
*/
|
220
671
|
setUTCMinutes(min: number, sec?: number, ms?: number): void;
|
672
|
+
/**
|
673
|
+
* Sets the hour value in the Date object using local time.
|
674
|
+
* @param hours A numeric value equal to the hours value.
|
675
|
+
* @param min A numeric value equal to the minutes value.
|
676
|
+
* @param sec A numeric value equal to the seconds value.
|
677
|
+
* @param ms A numeric value equal to the milliseconds value.
|
678
|
+
*/
|
221
679
|
setHours(hours: number, min?: number, sec?: number, ms?: number): void;
|
680
|
+
/**
|
681
|
+
* Sets the hours value in the Date object using Universal Coordinated Time (UTC).
|
682
|
+
* @param hours A numeric value equal to the hours value.
|
683
|
+
* @param min A numeric value equal to the minutes value.
|
684
|
+
* @param sec A numeric value equal to the seconds value.
|
685
|
+
* @param ms A numeric value equal to the milliseconds value.
|
686
|
+
*/
|
222
687
|
setUTCHours(hours: number, min?: number, sec?: number, ms?: number): void;
|
688
|
+
/**
|
689
|
+
* Sets the numeric day-of-the-month value of the Date object using local time.
|
690
|
+
* @param date A numeric value equal to the day of the month.
|
691
|
+
*/
|
223
692
|
setDate(date: number): void;
|
693
|
+
/**
|
694
|
+
* Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
|
695
|
+
* @param date A numeric value equal to the day of the month.
|
696
|
+
*/
|
224
697
|
setUTCDate(date: number): void;
|
698
|
+
/**
|
699
|
+
* Sets the month value in the Date object using local time.
|
700
|
+
* @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
|
701
|
+
* @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.
|
702
|
+
*/
|
225
703
|
setMonth(month: number, date?: number): void;
|
704
|
+
/**
|
705
|
+
* Sets the month value in the Date object using Universal Coordinated Time (UTC).
|
706
|
+
* @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
|
707
|
+
* @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.
|
708
|
+
*/
|
226
709
|
setUTCMonth(month: number, date?: number): void;
|
710
|
+
/**
|
711
|
+
* Sets the year of the Date object using local time.
|
712
|
+
* @param year A numeric value for the year.
|
713
|
+
* @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
|
714
|
+
* @param date A numeric value equal for the day of the month.
|
715
|
+
*/
|
227
716
|
setFullYear(year: number, month?: number, date?: number): void;
|
717
|
+
/**
|
718
|
+
* Sets the year value in the Date object using Universal Coordinated Time (UTC).
|
719
|
+
* @param year A numeric value equal to the year.
|
720
|
+
* @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.
|
721
|
+
* @param date A numeric value equal to the day of the month.
|
722
|
+
*/
|
228
723
|
setUTCFullYear(year: number, month?: number, date?: number): void;
|
724
|
+
/** Returns a date converted to a string using Universal Coordinated Time (UTC). */
|
229
725
|
toUTCString(): string;
|
726
|
+
/** Returns a date as a string value in ISO format. */
|
230
727
|
toISOString(): string;
|
728
|
+
/** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
|
231
729
|
toJSON(key?: any): string;
|
232
730
|
}
|
731
|
+
/**
|
732
|
+
* Enables basic storage and retrieval of dates and times.
|
733
|
+
*/
|
233
734
|
declare var Date: {
|
234
735
|
new (): Date;
|
235
736
|
new (value: number): Date;
|
@@ -237,7 +738,21 @@ declare var Date: {
|
|
237
738
|
new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
|
238
739
|
(): string;
|
239
740
|
prototype: Date;
|
741
|
+
/**
|
742
|
+
* Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
|
743
|
+
* @param s A date string
|
744
|
+
*/
|
240
745
|
parse(s: string): number;
|
746
|
+
/**
|
747
|
+
* Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
|
748
|
+
* @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.
|
749
|
+
* @param month The month as an integer between 0 and 11 (January to December).
|
750
|
+
* @param date The date as an integer between 1 and 31.
|
751
|
+
* @param hours Must be supplied if minutes is supplied. An integer from 0 to 23 (midnight to 11pm) that specifies the hour.
|
752
|
+
* @param minutes Must be supplied if seconds is supplied. An integer from 0 to 59 that specifies the minutes.
|
753
|
+
* @param seconds Must be supplied if milliseconds is supplied. An integer from 0 to 59 that specifies the seconds.
|
754
|
+
* @param ms An integer from 0 to 999 that specifies the milliseconds.
|
755
|
+
*/
|
241
756
|
UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
|
242
757
|
now(): number;
|
243
758
|
}
|
@@ -276,17 +791,45 @@ interface RegExpExecArray {
|
|
276
791
|
|
277
792
|
|
278
793
|
interface RegExp {
|
794
|
+
/**
|
795
|
+
* Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
|
796
|
+
* @param string The String object or string literal on which to perform the search.
|
797
|
+
*/
|
279
798
|
exec(string: string): RegExpExecArray;
|
799
|
+
/**
|
800
|
+
* Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
|
801
|
+
* @param string String on which to perform the search.
|
802
|
+
*/
|
280
803
|
test(string: string): bool;
|
804
|
+
/** Returns a copy of the text of the regular expression pattern. Read-only. The rgExp argument is a Regular expression object. It can be a variable name or a literal. */
|
281
805
|
source: string;
|
806
|
+
/** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
|
282
807
|
global: bool;
|
808
|
+
/** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
|
283
809
|
ignoreCase: bool;
|
810
|
+
/** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
|
284
811
|
multiline: bool;
|
812
|
+
|
285
813
|
lastIndex: number;
|
814
|
+
|
815
|
+
// Non-standard extensions
|
816
|
+
compile(): RegExp;
|
286
817
|
}
|
287
818
|
declare var RegExp: {
|
288
819
|
new (pattern: string, flags?: string): RegExp;
|
289
820
|
(pattern: string, flags?: string): RegExp;
|
821
|
+
|
822
|
+
// Non-standard extensions
|
823
|
+
$1: string;
|
824
|
+
$2: string;
|
825
|
+
$3: string;
|
826
|
+
$4: string;
|
827
|
+
$5: string;
|
828
|
+
$6: string;
|
829
|
+
$7: string;
|
830
|
+
$8: string;
|
831
|
+
$9: string;
|
832
|
+
lastMatch: string;
|
290
833
|
}
|
291
834
|
|
292
835
|
interface Error {
|
@@ -348,13 +891,48 @@ declare var URIError: {
|
|
348
891
|
}
|
349
892
|
|
350
893
|
interface JSON {
|
894
|
+
/**
|
895
|
+
* Converts a JavaScript Object Notation (JSON) string into an object.
|
896
|
+
* @param text A valid JSON string.
|
897
|
+
* @param reviver A function that transforms the results. This function is called for each member of the object.
|
898
|
+
* If a member contains nested objects, the nested objects are transformed before the parent object is.
|
899
|
+
*/
|
351
900
|
parse(text: string, reviver?: (key: any, value: any) => any): any;
|
901
|
+
/**
|
902
|
+
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
|
903
|
+
* @param value A JavaScript value, usually an object or array, to be converted.
|
904
|
+
*/
|
352
905
|
stringify(value: any): string;
|
906
|
+
/**
|
907
|
+
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
|
908
|
+
* @param value A JavaScript value, usually an object or array, to be converted.
|
909
|
+
* @param replacer A function that transforms the results.
|
910
|
+
*/
|
353
911
|
stringify(value: any, replacer: (key: string, value: any) => any): string;
|
912
|
+
/**
|
913
|
+
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
|
914
|
+
* @param value A JavaScript value, usually an object or array, to be converted.
|
915
|
+
* @param replacer Array that transforms the results.
|
916
|
+
*/
|
354
917
|
stringify(value: any, replacer: any[]): string;
|
918
|
+
/**
|
919
|
+
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
|
920
|
+
* @param value A JavaScript value, usually an object or array, to be converted.
|
921
|
+
* @param replacer A function that transforms the results.
|
922
|
+
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
|
923
|
+
*/
|
355
924
|
stringify(value: any, replacer: (key: string, value: any) => any, space: any): string;
|
925
|
+
/**
|
926
|
+
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
|
927
|
+
* @param value A JavaScript value, usually an object or array, to be converted.
|
928
|
+
* @param replacer Array that transforms the results.
|
929
|
+
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
|
930
|
+
*/
|
356
931
|
stringify(value: any, replacer: any[], space: any): string;
|
357
932
|
}
|
933
|
+
/**
|
934
|
+
* An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
|
935
|
+
*/
|
358
936
|
declare var JSON: JSON;
|
359
937
|
|
360
938
|
////////////////
|
@@ -365,6 +943,7 @@ interface Array {
|
|
365
943
|
toString(): string;
|
366
944
|
toLocaleString(): string;
|
367
945
|
concat(...items: _element[][]): _element[];
|
946
|
+
concat(...items: _element[]): _element[];
|
368
947
|
join(seperator?: string): string;
|
369
948
|
pop(): _element;
|
370
949
|
push(...items: _element[]): number;
|
@@ -6252,7 +6831,7 @@ interface IDBObjectStore {
|
|
6252
6831
|
deleteIndex(indexName: string): void;
|
6253
6832
|
index(name: string): IDBIndex;
|
6254
6833
|
get(key: any): IDBRequest;
|
6255
|
-
|
6834
|
+
delet(key: any): IDBRequest;
|
6256
6835
|
}
|
6257
6836
|
declare var IDBObjectStore: {
|
6258
6837
|
prototype: IDBObjectStore;
|
@@ -6350,8 +6929,8 @@ interface IDBCursor {
|
|
6350
6929
|
key: any;
|
6351
6930
|
primaryKey: any;
|
6352
6931
|
advance(count: number): void;
|
6353
|
-
|
6354
|
-
|
6932
|
+
delet(): IDBRequest;
|
6933
|
+
continu(key?: any): void;
|
6355
6934
|
update(value: any): IDBRequest;
|
6356
6935
|
}
|
6357
6936
|
declare var IDBCursor: {
|
@@ -7151,11 +7730,18 @@ interface Blob {
|
|
7151
7730
|
size: number;
|
7152
7731
|
msDetachStream(): any;
|
7153
7732
|
slice(start?: number, end?: number, contentType?: string): Blob;
|
7733
|
+
close(): void;
|
7154
7734
|
msClose(): void;
|
7155
7735
|
}
|
7736
|
+
interface BlobPropertyBag {
|
7737
|
+
/** Corresponds to the 'type' property of the Blob object */
|
7738
|
+
type?: string;
|
7739
|
+
/** Either 'transparent' or 'native' */
|
7740
|
+
endings?: string;
|
7741
|
+
}
|
7156
7742
|
declare var Blob: {
|
7157
7743
|
prototype: Blob;
|
7158
|
-
new (): Blob;
|
7744
|
+
new (blobParts?: any[], options?: BlobPropertyBag): Blob;
|
7159
7745
|
}
|
7160
7746
|
|
7161
7747
|
interface ApplicationCache extends EventTarget {
|
@@ -7411,6 +7997,7 @@ interface FormData {
|
|
7411
7997
|
declare var FormData: {
|
7412
7998
|
prototype: FormData;
|
7413
7999
|
new (): FormData;
|
8000
|
+
new (form: HTMLFormElement): FormData;
|
7414
8001
|
}
|
7415
8002
|
|
7416
8003
|
interface MSHTMLImageElementExtensions {
|