typescript-src 1.4.1.3 → 1.6.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +7 -0
  3. data/lib/typescript-src.rb +6 -1
  4. data/lib/typescript-src/support/typescript/.editorconfig +10 -0
  5. data/lib/typescript-src/support/typescript/.gitattributes +2 -0
  6. data/lib/typescript-src/support/typescript/.npmignore +8 -7
  7. data/lib/typescript-src/support/typescript/AUTHORS.md +70 -0
  8. data/lib/typescript-src/support/typescript/CONTRIBUTING.md +49 -18
  9. data/lib/typescript-src/support/typescript/Jakefile.js +795 -0
  10. data/lib/typescript-src/support/typescript/README.md +20 -4
  11. data/lib/typescript-src/support/typescript/bin/tsc +2 -2
  12. data/lib/typescript-src/support/typescript/bin/tsserver +2 -0
  13. data/lib/typescript-src/support/typescript/lib/lib.core.d.ts +3840 -0
  14. data/lib/typescript-src/support/typescript/{bin → lib}/lib.core.es6.d.ts +1747 -1420
  15. data/lib/typescript-src/support/typescript/{bin/lib.es6.d.ts → lib/lib.d.ts} +12054 -11947
  16. data/lib/typescript-src/support/typescript/{bin → lib}/lib.dom.d.ts +11167 -11015
  17. data/lib/typescript-src/support/typescript/{bin/lib.d.ts → lib/lib.es6.d.ts} +15023 -10641
  18. data/lib/typescript-src/support/typescript/lib/lib.scriptHost.d.ts +294 -0
  19. data/lib/typescript-src/support/typescript/lib/lib.webworker.d.ts +1202 -0
  20. data/lib/typescript-src/support/typescript/lib/tsc.js +31079 -0
  21. data/lib/typescript-src/support/typescript/lib/tsserver.js +44390 -0
  22. data/lib/typescript-src/support/typescript/lib/typescript.d.ts +2145 -0
  23. data/lib/typescript-src/support/typescript/lib/typescript.js +49349 -0
  24. data/lib/typescript-src/support/typescript/lib/typescriptServices.d.ts +2143 -0
  25. data/lib/typescript-src/support/typescript/lib/typescriptServices.js +49349 -0
  26. data/lib/typescript-src/support/typescript/package.json +77 -69
  27. data/lib/typescript-src/support/typescript/tslint.json +34 -0
  28. data/lib/typescript-src/version.rb +1 -1
  29. metadata +21 -15
  30. data/lib/typescript-src/support/typescript/bin/lib.core.d.ts +0 -1164
  31. data/lib/typescript-src/support/typescript/bin/lib.scriptHost.d.ts +0 -38
  32. data/lib/typescript-src/support/typescript/bin/lib.webworker.d.ts +0 -1652
  33. data/lib/typescript-src/support/typescript/bin/tsc.js +0 -18289
  34. data/lib/typescript-src/support/typescript/bin/typescript.d.ts +0 -1849
  35. data/lib/typescript-src/support/typescript/bin/typescriptServices.d.ts +0 -1849
  36. data/lib/typescript-src/support/typescript/bin/typescriptServices.js +0 -26273
  37. data/lib/typescript-src/support/typescript/bin/typescriptServices_internal.d.ts +0 -258
  38. data/lib/typescript-src/support/typescript/bin/typescript_internal.d.ts +0 -258
@@ -1,69 +1,77 @@
1
- {
2
- "name": "typescript",
3
- "author": {
4
- "name": "Microsoft Corp."
5
- },
6
- "homepage": "http://typescriptlang.org/",
7
- "version": "1.4.1",
8
- "licenses": [
9
- {
10
- "type": "Apache License 2.0",
11
- "url": "https://github.com/Microsoft/TypeScript/blob/master/LICENSE.txt"
12
- }
13
- ],
14
- "description": "TypeScript is a language for application scale JavaScript development",
15
- "keywords": [
16
- "TypeScript",
17
- "Microsoft",
18
- "compiler",
19
- "language",
20
- "javascript"
21
- ],
22
- "bugs": {
23
- "url": "https://github.com/Microsoft/TypeScript/issues"
24
- },
25
- "repository": {
26
- "type": "git",
27
- "url": "https://github.com/Microsoft/TypeScript.git"
28
- },
29
- "preferGlobal": true,
30
- "main": "./bin/typescriptServices.js",
31
- "bin": {
32
- "tsc": "./bin/tsc"
33
- },
34
- "engines": {
35
- "node": ">=0.8.0"
36
- },
37
- "devDependencies": {
38
- "jake": "latest",
39
- "mocha": "latest",
40
- "chai": "latest",
41
- "browserify": "latest",
42
- "istanbul": "latest",
43
- "codeclimate-test-reporter": "latest"
44
- },
45
- "scripts": {
46
- "test": "jake generate-code-coverage"
47
- },
48
- "gitHead": "3ab3f916c00755a1d9937f7116d1e9a80ddf2ef3",
49
- "_id": "typescript@1.4.1",
50
- "_shasum": "eb4da986d1b7f01452eafb57559e0cc8f516cd48",
51
- "_from": "typescript@1.4.1",
52
- "_npmVersion": "1.4.28",
53
- "_npmUser": {
54
- "name": "typescript",
55
- "email": "typescript@microsoft.com"
56
- },
57
- "maintainers": [
58
- {
59
- "name": "typescript",
60
- "email": "typescript@microsoft.com"
61
- }
62
- ],
63
- "dist": {
64
- "shasum": "eb4da986d1b7f01452eafb57559e0cc8f516cd48",
65
- "tarball": "http://registry.npmjs.org/typescript/-/typescript-1.4.1.tgz"
66
- },
67
- "directories": {},
68
- "_resolved": "https://registry.npmjs.org/typescript/-/typescript-1.4.1.tgz"
69
- }
1
+ {
2
+ "name": "typescript",
3
+ "author": {
4
+ "name": "Microsoft Corp."
5
+ },
6
+ "homepage": "http://typescriptlang.org/",
7
+ "version": "1.6.2",
8
+ "license": "Apache-2.0",
9
+ "description": "TypeScript is a language for application scale JavaScript development",
10
+ "keywords": [
11
+ "TypeScript",
12
+ "Microsoft",
13
+ "compiler",
14
+ "language",
15
+ "javascript"
16
+ ],
17
+ "bugs": {
18
+ "url": "https://github.com/Microsoft/TypeScript/issues"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/Microsoft/TypeScript.git"
23
+ },
24
+ "main": "./lib/typescript.js",
25
+ "typings": "./lib/typescript.d.ts",
26
+ "bin": {
27
+ "tsc": "./bin/tsc",
28
+ "tsserver": "./bin/tsserver"
29
+ },
30
+ "engines": {
31
+ "node": ">=0.8.0"
32
+ },
33
+ "devDependencies": {
34
+ "jake": "latest",
35
+ "mocha": "latest",
36
+ "chai": "latest",
37
+ "browserify": "latest",
38
+ "istanbul": "latest",
39
+ "mocha-fivemat-progress-reporter": "latest",
40
+ "tslint": "latest"
41
+ },
42
+ "scripts": {
43
+ "pretest": "jake tests",
44
+ "test": "jake runtests",
45
+ "build": "npm run build:compiler && npm run build:tests",
46
+ "build:compiler": "jake local",
47
+ "build:tests": "jake tests",
48
+ "clean": "jake clean"
49
+ },
50
+ "browser": {
51
+ "buffer": false,
52
+ "fs": false,
53
+ "os": false,
54
+ "path": false
55
+ },
56
+ "gitHead": "a44d8e76c68e7c685cef3d34943158021acd04e5",
57
+ "_id": "typescript@1.6.2",
58
+ "_shasum": "5b27254abeb111027cbf9450d3431bc5843191dd",
59
+ "_from": "typescript@1.6.2",
60
+ "_npmVersion": "2.0.0",
61
+ "_npmUser": {
62
+ "name": "typescript",
63
+ "email": "typescript@microsoft.com"
64
+ },
65
+ "maintainers": [
66
+ {
67
+ "name": "typescript",
68
+ "email": "typescript@microsoft.com"
69
+ }
70
+ ],
71
+ "dist": {
72
+ "shasum": "5b27254abeb111027cbf9450d3431bc5843191dd",
73
+ "tarball": "http://registry.npmjs.org/typescript/-/typescript-1.6.2.tgz"
74
+ },
75
+ "directories": {},
76
+ "_resolved": "https://registry.npmjs.org/typescript/-/typescript-1.6.2.tgz"
77
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "rules": {
3
+ "class-name": true,
4
+ "comment-format": [true,
5
+ "check-space"
6
+ ],
7
+ "indent": [true,
8
+ "spaces"
9
+ ],
10
+ "one-line": [true,
11
+ "check-open-brace"
12
+ ],
13
+ "no-unreachable": true,
14
+ "no-use-before-declare": true,
15
+ "no-var-keyword": true,
16
+ "quotemark": [true,
17
+ "double"
18
+ ],
19
+ "semicolon": true,
20
+ "whitespace": [true,
21
+ "check-branch",
22
+ "check-operator",
23
+ "check-separator",
24
+ "check-type"
25
+ ],
26
+ "typedef-whitespace": [true, {
27
+ "call-signature": "nospace",
28
+ "index-signature": "nospace",
29
+ "parameter": "nospace",
30
+ "property-declaration": "nospace",
31
+ "variable-declaration": "nospace"
32
+ }]
33
+ }
34
+ }
@@ -1,5 +1,5 @@
1
1
  module TypeScript
2
2
  module Src
3
- VERSION = '1.4.1.3' # TypeScript compiler version + gem's revision
3
+ VERSION = '1.6.2.0' # TypeScript compiler version + gem's revision
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typescript-src
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1.3
4
+ version: 1.6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - KAWACHI Takashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-07 00:00:00.000000000 Z
11
+ date: 2015-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -38,27 +38,33 @@ files:
38
38
  - README.md
39
39
  - Rakefile
40
40
  - lib/typescript-src.rb
41
+ - lib/typescript-src/support/typescript/.editorconfig
42
+ - lib/typescript-src/support/typescript/.gitattributes
41
43
  - lib/typescript-src/support/typescript/.npmignore
44
+ - lib/typescript-src/support/typescript/AUTHORS.md
42
45
  - lib/typescript-src/support/typescript/CONTRIBUTING.md
43
46
  - lib/typescript-src/support/typescript/CopyrightNotice.txt
47
+ - lib/typescript-src/support/typescript/Jakefile.js
44
48
  - lib/typescript-src/support/typescript/LICENSE.txt
45
49
  - lib/typescript-src/support/typescript/README.md
46
50
  - lib/typescript-src/support/typescript/ThirdPartyNoticeText.txt
47
- - lib/typescript-src/support/typescript/bin/lib.core.d.ts
48
- - lib/typescript-src/support/typescript/bin/lib.core.es6.d.ts
49
- - lib/typescript-src/support/typescript/bin/lib.d.ts
50
- - lib/typescript-src/support/typescript/bin/lib.dom.d.ts
51
- - lib/typescript-src/support/typescript/bin/lib.es6.d.ts
52
- - lib/typescript-src/support/typescript/bin/lib.scriptHost.d.ts
53
- - lib/typescript-src/support/typescript/bin/lib.webworker.d.ts
54
51
  - lib/typescript-src/support/typescript/bin/tsc
55
- - lib/typescript-src/support/typescript/bin/tsc.js
56
- - lib/typescript-src/support/typescript/bin/typescript.d.ts
57
- - lib/typescript-src/support/typescript/bin/typescriptServices.d.ts
58
- - lib/typescript-src/support/typescript/bin/typescriptServices.js
59
- - lib/typescript-src/support/typescript/bin/typescriptServices_internal.d.ts
60
- - lib/typescript-src/support/typescript/bin/typescript_internal.d.ts
52
+ - lib/typescript-src/support/typescript/bin/tsserver
53
+ - lib/typescript-src/support/typescript/lib/lib.core.d.ts
54
+ - lib/typescript-src/support/typescript/lib/lib.core.es6.d.ts
55
+ - lib/typescript-src/support/typescript/lib/lib.d.ts
56
+ - lib/typescript-src/support/typescript/lib/lib.dom.d.ts
57
+ - lib/typescript-src/support/typescript/lib/lib.es6.d.ts
58
+ - lib/typescript-src/support/typescript/lib/lib.scriptHost.d.ts
59
+ - lib/typescript-src/support/typescript/lib/lib.webworker.d.ts
60
+ - lib/typescript-src/support/typescript/lib/tsc.js
61
+ - lib/typescript-src/support/typescript/lib/tsserver.js
62
+ - lib/typescript-src/support/typescript/lib/typescript.d.ts
63
+ - lib/typescript-src/support/typescript/lib/typescript.js
64
+ - lib/typescript-src/support/typescript/lib/typescriptServices.d.ts
65
+ - lib/typescript-src/support/typescript/lib/typescriptServices.js
61
66
  - lib/typescript-src/support/typescript/package.json
67
+ - lib/typescript-src/support/typescript/tslint.json
62
68
  - lib/typescript-src/version.rb
63
69
  - test/test_type_script_src.rb
64
70
  - typescript-src.gemspec
@@ -1,1164 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation. All rights reserved.
3
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
- this file except in compliance with the License. You may obtain a copy of the
5
- License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
- MERCHANTABLITY OR NON-INFRINGEMENT.
11
-
12
- See the Apache Version 2.0 License for specific language governing permissions
13
- and limitations under the License.
14
- ***************************************************************************** */
15
-
16
- /// <reference no-default-lib="true"/>
17
-
18
- /////////////////////////////
19
- /// ECMAScript APIs
20
- /////////////////////////////
21
-
22
- declare var NaN: number;
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
- */
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
- */
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
- */
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
- */
50
- declare function isNaN(number: number): boolean;
51
-
52
- /**
53
- * Determines whether a supplied number is finite.
54
- * @param number Any numeric value.
55
- */
56
- declare function isFinite(number: number): boolean;
57
-
58
- /**
59
- * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
60
- * @param encodedURI A value representing an encoded URI.
61
- */
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
- */
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
- */
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
- */
80
- declare function encodeURIComponent(uriComponent: string): string;
81
-
82
- interface PropertyDescriptor {
83
- configurable?: boolean;
84
- enumerable?: boolean;
85
- value?: any;
86
- writable?: boolean;
87
- get? (): any;
88
- set? (v: any): void;
89
- }
90
-
91
- interface PropertyDescriptorMap {
92
- [s: string]: PropertyDescriptor;
93
- }
94
-
95
- interface Object {
96
- /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
97
- constructor: Function;
98
-
99
- /** Returns a string representation of an object. */
100
- toString(): string;
101
-
102
- /** Returns a date converted to a string using the current locale. */
103
- toLocaleString(): string;
104
-
105
- /** Returns the primitive value of the specified object. */
106
- valueOf(): Object;
107
-
108
- /**
109
- * Determines whether an object has a property with the specified name.
110
- * @param v A property name.
111
- */
112
- hasOwnProperty(v: string): boolean;
113
-
114
- /**
115
- * Determines whether an object exists in another object's prototype chain.
116
- * @param v Another object whose prototype chain is to be checked.
117
- */
118
- isPrototypeOf(v: Object): boolean;
119
-
120
- /**
121
- * Determines whether a specified property is enumerable.
122
- * @param v A property name.
123
- */
124
- propertyIsEnumerable(v: string): boolean;
125
- }
126
-
127
- interface ObjectConstructor {
128
- new (value?: any): Object;
129
- (): any;
130
- (value: any): any;
131
-
132
- /** A reference to the prototype for a class of objects. */
133
- prototype: Object;
134
-
135
- /**
136
- * Returns the prototype of an object.
137
- * @param o The object that references the prototype.
138
- */
139
- getPrototypeOf(o: any): any;
140
-
141
- /**
142
- * Gets the own property descriptor of the specified object.
143
- * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
144
- * @param o Object that contains the property.
145
- * @param p Name of the property.
146
- */
147
- getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;
148
-
149
- /**
150
- * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
151
- * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
152
- * @param o Object that contains the own properties.
153
- */
154
- getOwnPropertyNames(o: any): string[];
155
-
156
- /**
157
- * Creates an object that has the specified prototype, and that optionally contains specified properties.
158
- * @param o Object to use as a prototype. May be null
159
- * @param properties JavaScript object that contains one or more property descriptors.
160
- */
161
- create(o: any, properties?: PropertyDescriptorMap): any;
162
-
163
- /**
164
- * Adds a property to an object, or modifies attributes of an existing property.
165
- * @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.
166
- * @param p The property name.
167
- * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
168
- */
169
- defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;
170
-
171
- /**
172
- * Adds one or more properties to an object, and/or modifies attributes of existing properties.
173
- * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
174
- * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
175
- */
176
- defineProperties(o: any, properties: PropertyDescriptorMap): any;
177
-
178
- /**
179
- * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
180
- * @param o Object on which to lock the attributes.
181
- */
182
- seal(o: any): any;
183
-
184
- /**
185
- * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
186
- * @param o Object on which to lock the attributes.
187
- */
188
- freeze(o: any): any;
189
-
190
- /**
191
- * Prevents the addition of new properties to an object.
192
- * @param o Object to make non-extensible.
193
- */
194
- preventExtensions(o: any): any;
195
-
196
- /**
197
- * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
198
- * @param o Object to test.
199
- */
200
- isSealed(o: any): boolean;
201
-
202
- /**
203
- * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
204
- * @param o Object to test.
205
- */
206
- isFrozen(o: any): boolean;
207
-
208
- /**
209
- * Returns a value that indicates whether new properties can be added to an object.
210
- * @param o Object to test.
211
- */
212
- isExtensible(o: any): boolean;
213
-
214
- /**
215
- * Returns the names of the enumerable properties and methods of an object.
216
- * @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.
217
- */
218
- keys(o: any): string[];
219
- }
220
-
221
- /**
222
- * Provides functionality common to all JavaScript objects.
223
- */
224
- declare var Object: ObjectConstructor;
225
-
226
- /**
227
- * Creates a new function.
228
- */
229
- interface Function {
230
- /**
231
- * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
232
- * @param thisArg The object to be used as the this object.
233
- * @param argArray A set of arguments to be passed to the function.
234
- */
235
- apply(thisArg: any, argArray?: any): any;
236
-
237
- /**
238
- * Calls a method of an object, substituting another object for the current object.
239
- * @param thisArg The object to be used as the current object.
240
- * @param argArray A list of arguments to be passed to the method.
241
- */
242
- call(thisArg: any, ...argArray: any[]): any;
243
-
244
- /**
245
- * For a given function, creates a bound function that has the same body as the original function.
246
- * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
247
- * @param thisArg An object to which the this keyword can refer inside the new function.
248
- * @param argArray A list of arguments to be passed to the new function.
249
- */
250
- bind(thisArg: any, ...argArray: any[]): any;
251
-
252
- prototype: any;
253
- length: number;
254
-
255
- // Non-standard extensions
256
- arguments: any;
257
- caller: Function;
258
- }
259
-
260
- interface FunctionConstructor {
261
- /**
262
- * Creates a new function.
263
- * @param args A list of arguments the function accepts.
264
- */
265
- new (...args: string[]): Function;
266
- (...args: string[]): Function;
267
- prototype: Function;
268
- }
269
-
270
- declare var Function: FunctionConstructor;
271
-
272
- interface IArguments {
273
- [index: number]: any;
274
- length: number;
275
- callee: Function;
276
- }
277
-
278
- interface String {
279
- /** Returns a string representation of a string. */
280
- toString(): string;
281
-
282
- /**
283
- * Returns the character at the specified index.
284
- * @param pos The zero-based index of the desired character.
285
- */
286
- charAt(pos: number): string;
287
-
288
- /**
289
- * Returns the Unicode value of the character at the specified location.
290
- * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
291
- */
292
- charCodeAt(index: number): number;
293
-
294
- /**
295
- * Returns a string that contains the concatenation of two or more strings.
296
- * @param strings The strings to append to the end of the string.
297
- */
298
- concat(...strings: string[]): string;
299
-
300
- /**
301
- * Returns the position of the first occurrence of a substring.
302
- * @param searchString The substring to search for in the string
303
- * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
304
- */
305
- indexOf(searchString: string, position?: number): number;
306
-
307
- /**
308
- * Returns the last occurrence of a substring in the string.
309
- * @param searchString The substring to search for.
310
- * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
311
- */
312
- lastIndexOf(searchString: string, position?: number): number;
313
-
314
- /**
315
- * Determines whether two strings are equivalent in the current locale.
316
- * @param that String to compare to target string
317
- */
318
- localeCompare(that: string): number;
319
-
320
- /**
321
- * Matches a string with a regular expression, and returns an array containing the results of that search.
322
- * @param regexp A variable name or string literal containing the regular expression pattern and flags.
323
- */
324
- match(regexp: string): RegExpMatchArray;
325
-
326
- /**
327
- * Matches a string with a regular expression, and returns an array containing the results of that search.
328
- * @param regexp A regular expression object that contains the regular expression pattern and applicable flags.
329
- */
330
- match(regexp: RegExp): RegExpMatchArray;
331
-
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 String object or string literal containing the text to replace for every successful match of rgExp in stringObj.
336
- */
337
- replace(searchValue: string, replaceValue: string): string;
338
-
339
- /**
340
- * Replaces text in a string, using a regular expression or search string.
341
- * @param searchValue A String object or string literal that represents the regular expression
342
- * @param replaceValue A function that returns the replacement text.
343
- */
344
- replace(searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string;
345
-
346
- /**
347
- * Replaces text in a string, using a regular expression or search string.
348
- * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags
349
- * @param replaceValue A String object or string literal containing the text to replace for every successful match of rgExp in stringObj.
350
- */
351
- replace(searchValue: RegExp, replaceValue: string): string;
352
-
353
- /**
354
- * Replaces text in a string, using a regular expression or search string.
355
- * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags
356
- * @param replaceValue A function that returns the replacement text.
357
- */
358
- replace(searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string;
359
-
360
- /**
361
- * Finds the first substring match in a regular expression search.
362
- * @param regexp The regular expression pattern and applicable flags.
363
- */
364
- search(regexp: string): number;
365
-
366
- /**
367
- * Finds the first substring match in a regular expression search.
368
- * @param regexp The regular expression pattern and applicable flags.
369
- */
370
- search(regexp: RegExp): number;
371
-
372
- /**
373
- * Returns a section of a string.
374
- * @param start The index to the beginning of the specified portion of stringObj.
375
- * @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.
376
- * If this value is not specified, the substring continues to the end of stringObj.
377
- */
378
- slice(start?: number, end?: number): string;
379
-
380
- /**
381
- * Split a string into substrings using the specified separator and return them as an array.
382
- * @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.
383
- * @param limit A value used to limit the number of elements returned in the array.
384
- */
385
- split(separator: string, limit?: number): string[];
386
-
387
- /**
388
- * Split a string into substrings using the specified separator and return them as an array.
389
- * @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.
390
- * @param limit A value used to limit the number of elements returned in the array.
391
- */
392
- split(separator: RegExp, limit?: number): string[];
393
-
394
- /**
395
- * Returns the substring at the specified location within a String object.
396
- * @param start The zero-based index number indicating the beginning of the substring.
397
- * @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.
398
- * If end is omitted, the characters from start through the end of the original string are returned.
399
- */
400
- substring(start: number, end?: number): string;
401
-
402
- /** Converts all the alphabetic characters in a string to lowercase. */
403
- toLowerCase(): string;
404
-
405
- /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
406
- toLocaleLowerCase(): string;
407
-
408
- /** Converts all the alphabetic characters in a string to uppercase. */
409
- toUpperCase(): string;
410
-
411
- /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
412
- toLocaleUpperCase(): string;
413
-
414
- /** Removes the leading and trailing white space and line terminator characters from a string. */
415
- trim(): string;
416
-
417
- /** Returns the length of a String object. */
418
- length: number;
419
-
420
- // IE extensions
421
- /**
422
- * Gets a substring beginning at the specified location and having the specified length.
423
- * @param from The starting position of the desired substring. The index of the first character in the string is zero.
424
- * @param length The number of characters to include in the returned substring.
425
- */
426
- substr(from: number, length?: number): string;
427
-
428
- [index: number]: string;
429
- }
430
-
431
- interface StringConstructor {
432
- new (value?: any): String;
433
- (value?: any): string;
434
- prototype: String;
435
- fromCharCode(...codes: number[]): string;
436
- }
437
-
438
- /**
439
- * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
440
- */
441
- declare var String: StringConstructor;
442
-
443
- interface Boolean {
444
- }
445
-
446
- interface BooleanConstructor {
447
- new (value?: any): Boolean;
448
- (value?: any): boolean;
449
- prototype: Boolean;
450
- }
451
-
452
- declare var Boolean: BooleanConstructor;
453
-
454
- interface Number {
455
- /**
456
- * Returns a string representation of an object.
457
- * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
458
- */
459
- toString(radix?: number): string;
460
-
461
- /**
462
- * Returns a string representing a number in fixed-point notation.
463
- * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
464
- */
465
- toFixed(fractionDigits?: number): string;
466
-
467
- /**
468
- * Returns a string containing a number represented in exponential notation.
469
- * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
470
- */
471
- toExponential(fractionDigits?: number): string;
472
-
473
- /**
474
- * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
475
- * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
476
- */
477
- toPrecision(precision?: number): string;
478
- }
479
-
480
- interface NumberConstructor {
481
- new (value?: any): Number;
482
- (value?: any): number;
483
- prototype: Number;
484
-
485
- /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
486
- MAX_VALUE: number;
487
-
488
- /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
489
- MIN_VALUE: number;
490
-
491
- /**
492
- * A value that is not a number.
493
- * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
494
- */
495
- NaN: number;
496
-
497
- /**
498
- * A value that is less than the largest negative number that can be represented in JavaScript.
499
- * JavaScript displays NEGATIVE_INFINITY values as -infinity.
500
- */
501
- NEGATIVE_INFINITY: number;
502
-
503
- /**
504
- * A value greater than the largest number that can be represented in JavaScript.
505
- * JavaScript displays POSITIVE_INFINITY values as infinity.
506
- */
507
- POSITIVE_INFINITY: number;
508
- }
509
-
510
- /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
511
- declare var Number: NumberConstructor;
512
-
513
- interface TemplateStringsArray extends Array<string> {
514
- raw: string[];
515
- }
516
-
517
- interface Math {
518
- /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
519
- E: number;
520
- /** The natural logarithm of 10. */
521
- LN10: number;
522
- /** The natural logarithm of 2. */
523
- LN2: number;
524
- /** The base-2 logarithm of e. */
525
- LOG2E: number;
526
- /** The base-10 logarithm of e. */
527
- LOG10E: number;
528
- /** Pi. This is the ratio of the circumference of a circle to its diameter. */
529
- PI: number;
530
- /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
531
- SQRT1_2: number;
532
- /** The square root of 2. */
533
- SQRT2: number;
534
- /**
535
- * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
536
- * For example, the absolute value of -5 is the same as the absolute value of 5.
537
- * @param x A numeric expression for which the absolute value is needed.
538
- */
539
- abs(x: number): number;
540
- /**
541
- * Returns the arc cosine (or inverse cosine) of a number.
542
- * @param x A numeric expression.
543
- */
544
- acos(x: number): number;
545
- /**
546
- * Returns the arcsine of a number.
547
- * @param x A numeric expression.
548
- */
549
- asin(x: number): number;
550
- /**
551
- * Returns the arctangent of a number.
552
- * @param x A numeric expression for which the arctangent is needed.
553
- */
554
- atan(x: number): number;
555
- /**
556
- * Returns the angle (in radians) from the X axis to a point (y,x).
557
- * @param y A numeric expression representing the cartesian y-coordinate.
558
- * @param x A numeric expression representing the cartesian x-coordinate.
559
- */
560
- atan2(y: number, x: number): number;
561
- /**
562
- * Returns the smallest number greater than or equal to its numeric argument.
563
- * @param x A numeric expression.
564
- */
565
- ceil(x: number): number;
566
- /**
567
- * Returns the cosine of a number.
568
- * @param x A numeric expression that contains an angle measured in radians.
569
- */
570
- cos(x: number): number;
571
- /**
572
- * Returns e (the base of natural logarithms) raised to a power.
573
- * @param x A numeric expression representing the power of e.
574
- */
575
- exp(x: number): number;
576
- /**
577
- * Returns the greatest number less than or equal to its numeric argument.
578
- * @param x A numeric expression.
579
- */
580
- floor(x: number): number;
581
- /**
582
- * Returns the natural logarithm (base e) of a number.
583
- * @param x A numeric expression.
584
- */
585
- log(x: number): number;
586
- /**
587
- * Returns the larger of a set of supplied numeric expressions.
588
- * @param values Numeric expressions to be evaluated.
589
- */
590
- max(...values: number[]): number;
591
- /**
592
- * Returns the smaller of a set of supplied numeric expressions.
593
- * @param values Numeric expressions to be evaluated.
594
- */
595
- min(...values: number[]): number;
596
- /**
597
- * Returns the value of a base expression taken to a specified power.
598
- * @param x The base value of the expression.
599
- * @param y The exponent value of the expression.
600
- */
601
- pow(x: number, y: number): number;
602
- /** Returns a pseudorandom number between 0 and 1. */
603
- random(): number;
604
- /**
605
- * Returns a supplied numeric expression rounded to the nearest number.
606
- * @param x The value to be rounded to the nearest number.
607
- */
608
- round(x: number): number;
609
- /**
610
- * Returns the sine of a number.
611
- * @param x A numeric expression that contains an angle measured in radians.
612
- */
613
- sin(x: number): number;
614
- /**
615
- * Returns the square root of a number.
616
- * @param x A numeric expression.
617
- */
618
- sqrt(x: number): number;
619
- /**
620
- * Returns the tangent of a number.
621
- * @param x A numeric expression that contains an angle measured in radians.
622
- */
623
- tan(x: number): number;
624
- }
625
- /** An intrinsic object that provides basic mathematics functionality and constants. */
626
- declare var Math: Math;
627
-
628
- /** Enables basic storage and retrieval of dates and times. */
629
- interface Date {
630
- /** Returns a string representation of a date. The format of the string depends on the locale. */
631
- toString(): string;
632
- /** Returns a date as a string value. */
633
- toDateString(): string;
634
- /** Returns a time as a string value. */
635
- toTimeString(): string;
636
- /** Returns a value as a string value appropriate to the host environment's current locale. */
637
- toLocaleString(): string;
638
- /** Returns a date as a string value appropriate to the host environment's current locale. */
639
- toLocaleDateString(): string;
640
- /** Returns a time as a string value appropriate to the host environment's current locale. */
641
- toLocaleTimeString(): string;
642
- /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
643
- valueOf(): number;
644
- /** Gets the time value in milliseconds. */
645
- getTime(): number;
646
- /** Gets the year, using local time. */
647
- getFullYear(): number;
648
- /** Gets the year using Universal Coordinated Time (UTC). */
649
- getUTCFullYear(): number;
650
- /** Gets the month, using local time. */
651
- getMonth(): number;
652
- /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
653
- getUTCMonth(): number;
654
- /** Gets the day-of-the-month, using local time. */
655
- getDate(): number;
656
- /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
657
- getUTCDate(): number;
658
- /** Gets the day of the week, using local time. */
659
- getDay(): number;
660
- /** Gets the day of the week using Universal Coordinated Time (UTC). */
661
- getUTCDay(): number;
662
- /** Gets the hours in a date, using local time. */
663
- getHours(): number;
664
- /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
665
- getUTCHours(): number;
666
- /** Gets the minutes of a Date object, using local time. */
667
- getMinutes(): number;
668
- /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
669
- getUTCMinutes(): number;
670
- /** Gets the seconds of a Date object, using local time. */
671
- getSeconds(): number;
672
- /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
673
- getUTCSeconds(): number;
674
- /** Gets the milliseconds of a Date, using local time. */
675
- getMilliseconds(): number;
676
- /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
677
- getUTCMilliseconds(): number;
678
- /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
679
- getTimezoneOffset(): number;
680
- /**
681
- * Sets the date and time value in the Date object.
682
- * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
683
- */
684
- setTime(time: number): number;
685
- /**
686
- * Sets the milliseconds value in the Date object using local time.
687
- * @param ms A numeric value equal to the millisecond value.
688
- */
689
- setMilliseconds(ms: number): number;
690
- /**
691
- * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
692
- * @param ms A numeric value equal to the millisecond value.
693
- */
694
- setUTCMilliseconds(ms: number): number;
695
-
696
- /**
697
- * Sets the seconds value in the Date object using local time.
698
- * @param sec A numeric value equal to the seconds value.
699
- * @param ms A numeric value equal to the milliseconds value.
700
- */
701
- setSeconds(sec: number, ms?: number): number;
702
- /**
703
- * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
704
- * @param sec A numeric value equal to the seconds value.
705
- * @param ms A numeric value equal to the milliseconds value.
706
- */
707
- setUTCSeconds(sec: number, ms?: number): number;
708
- /**
709
- * Sets the minutes value in the Date object using local time.
710
- * @param min A numeric value equal to the minutes value.
711
- * @param sec A numeric value equal to the seconds value.
712
- * @param ms A numeric value equal to the milliseconds value.
713
- */
714
- setMinutes(min: number, sec?: number, ms?: number): number;
715
- /**
716
- * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
717
- * @param min A numeric value equal to the minutes value.
718
- * @param sec A numeric value equal to the seconds value.
719
- * @param ms A numeric value equal to the milliseconds value.
720
- */
721
- setUTCMinutes(min: number, sec?: number, ms?: number): number;
722
- /**
723
- * Sets the hour value in the Date object using local time.
724
- * @param hours A numeric value equal to the hours value.
725
- * @param min A numeric value equal to the minutes value.
726
- * @param sec A numeric value equal to the seconds value.
727
- * @param ms A numeric value equal to the milliseconds value.
728
- */
729
- setHours(hours: number, min?: number, sec?: number, ms?: number): number;
730
- /**
731
- * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
732
- * @param hours A numeric value equal to the hours value.
733
- * @param min A numeric value equal to the minutes value.
734
- * @param sec A numeric value equal to the seconds value.
735
- * @param ms A numeric value equal to the milliseconds value.
736
- */
737
- setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
738
- /**
739
- * Sets the numeric day-of-the-month value of the Date object using local time.
740
- * @param date A numeric value equal to the day of the month.
741
- */
742
- setDate(date: number): number;
743
- /**
744
- * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
745
- * @param date A numeric value equal to the day of the month.
746
- */
747
- setUTCDate(date: number): number;
748
- /**
749
- * Sets the month value in the Date object using local time.
750
- * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
751
- * @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.
752
- */
753
- setMonth(month: number, date?: number): number;
754
- /**
755
- * Sets the month value in the Date object using Universal Coordinated Time (UTC).
756
- * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
757
- * @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.
758
- */
759
- setUTCMonth(month: number, date?: number): number;
760
- /**
761
- * Sets the year of the Date object using local time.
762
- * @param year A numeric value for the year.
763
- * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
764
- * @param date A numeric value equal for the day of the month.
765
- */
766
- setFullYear(year: number, month?: number, date?: number): number;
767
- /**
768
- * Sets the year value in the Date object using Universal Coordinated Time (UTC).
769
- * @param year A numeric value equal to the year.
770
- * @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.
771
- * @param date A numeric value equal to the day of the month.
772
- */
773
- setUTCFullYear(year: number, month?: number, date?: number): number;
774
- /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
775
- toUTCString(): string;
776
- /** Returns a date as a string value in ISO format. */
777
- toISOString(): string;
778
- /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
779
- toJSON(key?: any): string;
780
- }
781
-
782
- interface DateConstructor {
783
- new (): Date;
784
- new (value: number): Date;
785
- new (value: string): Date;
786
- new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
787
- (): string;
788
- prototype: Date;
789
- /**
790
- * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
791
- * @param s A date string
792
- */
793
- parse(s: string): number;
794
- /**
795
- * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
796
- * @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.
797
- * @param month The month as an number between 0 and 11 (January to December).
798
- * @param date The date as an number between 1 and 31.
799
- * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.
800
- * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.
801
- * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.
802
- * @param ms An number from 0 to 999 that specifies the milliseconds.
803
- */
804
- UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
805
- now(): number;
806
- }
807
-
808
- declare var Date: DateConstructor;
809
-
810
- interface RegExpMatchArray extends Array<string> {
811
- index?: number;
812
- input?: string;
813
- }
814
-
815
- interface RegExpExecArray extends Array<string> {
816
- index: number;
817
- input: string;
818
- }
819
-
820
- interface RegExp {
821
- /**
822
- * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
823
- * @param string The String object or string literal on which to perform the search.
824
- */
825
- exec(string: string): RegExpExecArray;
826
-
827
- /**
828
- * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
829
- * @param string String on which to perform the search.
830
- */
831
- test(string: string): boolean;
832
-
833
- /** 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. */
834
- source: string;
835
-
836
- /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
837
- global: boolean;
838
-
839
- /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
840
- ignoreCase: boolean;
841
-
842
- /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
843
- multiline: boolean;
844
-
845
- lastIndex: number;
846
-
847
- // Non-standard extensions
848
- compile(): RegExp;
849
- }
850
-
851
- interface RegExpConstructor {
852
- new (pattern: string, flags?: string): RegExp;
853
- (pattern: string, flags?: string): RegExp;
854
- prototype: RegExp;
855
-
856
- // Non-standard extensions
857
- $1: string;
858
- $2: string;
859
- $3: string;
860
- $4: string;
861
- $5: string;
862
- $6: string;
863
- $7: string;
864
- $8: string;
865
- $9: string;
866
- lastMatch: string;
867
- }
868
-
869
- declare var RegExp: RegExpConstructor;
870
-
871
- interface Error {
872
- name: string;
873
- message: string;
874
- }
875
-
876
- interface ErrorConstructor {
877
- new (message?: string): Error;
878
- (message?: string): Error;
879
- prototype: Error;
880
- }
881
-
882
- declare var Error: ErrorConstructor;
883
-
884
- interface EvalError extends Error {
885
- }
886
-
887
- interface EvalErrorConstructor {
888
- new (message?: string): EvalError;
889
- (message?: string): EvalError;
890
- prototype: EvalError;
891
- }
892
-
893
- declare var EvalError: EvalErrorConstructor;
894
-
895
- interface RangeError extends Error {
896
- }
897
-
898
- interface RangeErrorConstructor {
899
- new (message?: string): RangeError;
900
- (message?: string): RangeError;
901
- prototype: RangeError;
902
- }
903
-
904
- declare var RangeError: RangeErrorConstructor;
905
-
906
- interface ReferenceError extends Error {
907
- }
908
-
909
- interface ReferenceErrorConstructor {
910
- new (message?: string): ReferenceError;
911
- (message?: string): ReferenceError;
912
- prototype: ReferenceError;
913
- }
914
-
915
- declare var ReferenceError: ReferenceErrorConstructor;
916
-
917
- interface SyntaxError extends Error {
918
- }
919
-
920
- interface SyntaxErrorConstructor {
921
- new (message?: string): SyntaxError;
922
- (message?: string): SyntaxError;
923
- prototype: SyntaxError;
924
- }
925
-
926
- declare var SyntaxError: SyntaxErrorConstructor;
927
-
928
- interface TypeError extends Error {
929
- }
930
-
931
- interface TypeErrorConstructor {
932
- new (message?: string): TypeError;
933
- (message?: string): TypeError;
934
- prototype: TypeError;
935
- }
936
-
937
- declare var TypeError: TypeErrorConstructor;
938
-
939
- interface URIError extends Error {
940
- }
941
-
942
- interface URIErrorConstructor {
943
- new (message?: string): URIError;
944
- (message?: string): URIError;
945
- prototype: URIError;
946
- }
947
-
948
- declare var URIError: URIErrorConstructor;
949
-
950
- interface JSON {
951
- /**
952
- * Converts a JavaScript Object Notation (JSON) string into an object.
953
- * @param text A valid JSON string.
954
- * @param reviver A function that transforms the results. This function is called for each member of the object.
955
- * If a member contains nested objects, the nested objects are transformed before the parent object is.
956
- */
957
- parse(text: string, reviver?: (key: any, value: any) => any): any;
958
- /**
959
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
960
- * @param value A JavaScript value, usually an object or array, to be converted.
961
- */
962
- stringify(value: any): string;
963
- /**
964
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
965
- * @param value A JavaScript value, usually an object or array, to be converted.
966
- * @param replacer A function that transforms the results.
967
- */
968
- stringify(value: any, replacer: (key: string, value: any) => any): string;
969
- /**
970
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
971
- * @param value A JavaScript value, usually an object or array, to be converted.
972
- * @param replacer Array that transforms the results.
973
- */
974
- stringify(value: any, replacer: any[]): string;
975
- /**
976
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
977
- * @param value A JavaScript value, usually an object or array, to be converted.
978
- * @param replacer A function that transforms the results.
979
- * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
980
- */
981
- stringify(value: any, replacer: (key: string, value: any) => any, space: any): string;
982
- /**
983
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
984
- * @param value A JavaScript value, usually an object or array, to be converted.
985
- * @param replacer Array that transforms the results.
986
- * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
987
- */
988
- stringify(value: any, replacer: any[], space: any): string;
989
- }
990
- /**
991
- * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
992
- */
993
- declare var JSON: JSON;
994
-
995
-
996
- /////////////////////////////
997
- /// ECMAScript Array API (specially handled by compiler)
998
- /////////////////////////////
999
-
1000
- interface Array<T> {
1001
- /**
1002
- * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
1003
- */
1004
- length: number;
1005
- /**
1006
- * Returns a string representation of an array.
1007
- */
1008
- toString(): string;
1009
- toLocaleString(): string;
1010
- /**
1011
- * Appends new elements to an array, and returns the new length of the array.
1012
- * @param items New elements of the Array.
1013
- */
1014
- push(...items: T[]): number;
1015
- /**
1016
- * Removes the last element from an array and returns it.
1017
- */
1018
- pop(): T;
1019
- /**
1020
- * Combines two or more arrays.
1021
- * @param items Additional items to add to the end of array1.
1022
- */
1023
- concat<U extends T[]>(...items: U[]): T[];
1024
- /**
1025
- * Combines two or more arrays.
1026
- * @param items Additional items to add to the end of array1.
1027
- */
1028
- concat(...items: T[]): T[];
1029
- /**
1030
- * Adds all the elements of an array separated by the specified separator string.
1031
- * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
1032
- */
1033
- join(separator?: string): string;
1034
- /**
1035
- * Reverses the elements in an Array.
1036
- */
1037
- reverse(): T[];
1038
- /**
1039
- * Removes the first element from an array and returns it.
1040
- */
1041
- shift(): T;
1042
- /**
1043
- * Returns a section of an array.
1044
- * @param start The beginning of the specified portion of the array.
1045
- * @param end The end of the specified portion of the array.
1046
- */
1047
- slice(start?: number, end?: number): T[];
1048
-
1049
- /**
1050
- * Sorts an array.
1051
- * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.
1052
- */
1053
- sort(compareFn?: (a: T, b: T) => number): T[];
1054
-
1055
- /**
1056
- * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
1057
- * @param start The zero-based location in the array from which to start removing elements.
1058
- */
1059
- splice(start: number): T[];
1060
-
1061
- /**
1062
- * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
1063
- * @param start The zero-based location in the array from which to start removing elements.
1064
- * @param deleteCount The number of elements to remove.
1065
- * @param items Elements to insert into the array in place of the deleted elements.
1066
- */
1067
- splice(start: number, deleteCount: number, ...items: T[]): T[];
1068
-
1069
- /**
1070
- * Inserts new elements at the start of an array.
1071
- * @param items Elements to insert at the start of the Array.
1072
- */
1073
- unshift(...items: T[]): number;
1074
-
1075
- /**
1076
- * Returns the index of the first occurrence of a value in an array.
1077
- * @param searchElement The value to locate in the array.
1078
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
1079
- */
1080
- indexOf(searchElement: T, fromIndex?: number): number;
1081
-
1082
- /**
1083
- * Returns the index of the last occurrence of a specified value in an array.
1084
- * @param searchElement The value to locate in the array.
1085
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
1086
- */
1087
- lastIndexOf(searchElement: T, fromIndex?: number): number;
1088
-
1089
- /**
1090
- * Determines whether all the members of an array satisfy the specified test.
1091
- * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
1092
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1093
- */
1094
- every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
1095
-
1096
- /**
1097
- * Determines whether the specified callback function returns true for any element of an array.
1098
- * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
1099
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1100
- */
1101
- some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
1102
-
1103
- /**
1104
- * Performs the specified action for each element in an array.
1105
- * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
1106
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1107
- */
1108
- forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
1109
-
1110
- /**
1111
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
1112
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
1113
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1114
- */
1115
- map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
1116
-
1117
- /**
1118
- * Returns the elements of an array that meet the condition specified in a callback function.
1119
- * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
1120
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1121
- */
1122
- filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[];
1123
-
1124
- /**
1125
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1126
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
1127
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1128
- */
1129
- reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
1130
- /**
1131
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1132
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
1133
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1134
- */
1135
- reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
1136
-
1137
- /**
1138
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1139
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
1140
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1141
- */
1142
- reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
1143
- /**
1144
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1145
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
1146
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1147
- */
1148
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
1149
-
1150
- [n: number]: T;
1151
- }
1152
-
1153
- interface ArrayConstructor {
1154
- new (arrayLength?: number): any[];
1155
- new <T>(arrayLength: number): T[];
1156
- new <T>(...items: T[]): T[];
1157
- (arrayLength?: number): any[];
1158
- <T>(arrayLength: number): T[];
1159
- <T>(...items: T[]): T[];
1160
- isArray(arg: any): boolean;
1161
- prototype: Array<any>;
1162
- }
1163
-
1164
- declare var Array: ArrayConstructor;