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
@@ -0,0 +1,294 @@
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 path="lib.core.d.ts" />
17
+
18
+
19
+ /////////////////////////////
20
+ /// Windows Script Host APIS
21
+ /////////////////////////////
22
+
23
+
24
+ interface ActiveXObject {
25
+ new (s: string): any;
26
+ }
27
+ declare var ActiveXObject: ActiveXObject;
28
+
29
+ interface ITextWriter {
30
+ Write(s: string): void;
31
+ WriteLine(s: string): void;
32
+ Close(): void;
33
+ }
34
+
35
+ interface TextStreamBase {
36
+ /**
37
+ * The column number of the current character position in an input stream.
38
+ */
39
+ Column: number;
40
+
41
+ /**
42
+ * The current line number in an input stream.
43
+ */
44
+ Line: number;
45
+
46
+ /**
47
+ * Closes a text stream.
48
+ * It is not necessary to close standard streams; they close automatically when the process ends. If
49
+ * you close a standard stream, be aware that any other pointers to that standard stream become invalid.
50
+ */
51
+ Close(): void;
52
+ }
53
+
54
+ interface TextStreamWriter extends TextStreamBase {
55
+ /**
56
+ * Sends a string to an output stream.
57
+ */
58
+ Write(s: string): void;
59
+
60
+ /**
61
+ * Sends a specified number of blank lines (newline characters) to an output stream.
62
+ */
63
+ WriteBlankLines(intLines: number): void;
64
+
65
+ /**
66
+ * Sends a string followed by a newline character to an output stream.
67
+ */
68
+ WriteLine(s: string): void;
69
+ }
70
+
71
+ interface TextStreamReader extends TextStreamBase {
72
+ /**
73
+ * Returns a specified number of characters from an input stream, starting at the current pointer position.
74
+ * Does not return until the ENTER key is pressed.
75
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
76
+ */
77
+ Read(characters: number): string;
78
+
79
+ /**
80
+ * Returns all characters from an input stream.
81
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
82
+ */
83
+ ReadAll(): string;
84
+
85
+ /**
86
+ * Returns an entire line from an input stream.
87
+ * Although this method extracts the newline character, it does not add it to the returned string.
88
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
89
+ */
90
+ ReadLine(): string;
91
+
92
+ /**
93
+ * Skips a specified number of characters when reading from an input text stream.
94
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
95
+ * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)
96
+ */
97
+ Skip(characters: number): void;
98
+
99
+ /**
100
+ * Skips the next line when reading from an input text stream.
101
+ * Can only be used on a stream in reading mode, not writing or appending mode.
102
+ */
103
+ SkipLine(): void;
104
+
105
+ /**
106
+ * Indicates whether the stream pointer position is at the end of a line.
107
+ */
108
+ AtEndOfLine: boolean;
109
+
110
+ /**
111
+ * Indicates whether the stream pointer position is at the end of a stream.
112
+ */
113
+ AtEndOfStream: boolean;
114
+ }
115
+
116
+ declare var WScript: {
117
+ /**
118
+ * Outputs text to either a message box (under WScript.exe) or the command console window followed by
119
+ * a newline (under CScript.exe).
120
+ */
121
+ Echo(s: any): void;
122
+
123
+ /**
124
+ * Exposes the write-only error output stream for the current script.
125
+ * Can be accessed only while using CScript.exe.
126
+ */
127
+ StdErr: TextStreamWriter;
128
+
129
+ /**
130
+ * Exposes the write-only output stream for the current script.
131
+ * Can be accessed only while using CScript.exe.
132
+ */
133
+ StdOut: TextStreamWriter;
134
+ Arguments: { length: number; Item(n: number): string; };
135
+
136
+ /**
137
+ * The full path of the currently running script.
138
+ */
139
+ ScriptFullName: string;
140
+
141
+ /**
142
+ * Forces the script to stop immediately, with an optional exit code.
143
+ */
144
+ Quit(exitCode?: number): number;
145
+
146
+ /**
147
+ * The Windows Script Host build version number.
148
+ */
149
+ BuildVersion: number;
150
+
151
+ /**
152
+ * Fully qualified path of the host executable.
153
+ */
154
+ FullName: string;
155
+
156
+ /**
157
+ * Gets/sets the script mode - interactive(true) or batch(false).
158
+ */
159
+ Interactive: boolean;
160
+
161
+ /**
162
+ * The name of the host executable (WScript.exe or CScript.exe).
163
+ */
164
+ Name: string;
165
+
166
+ /**
167
+ * Path of the directory containing the host executable.
168
+ */
169
+ Path: string;
170
+
171
+ /**
172
+ * The filename of the currently running script.
173
+ */
174
+ ScriptName: string;
175
+
176
+ /**
177
+ * Exposes the read-only input stream for the current script.
178
+ * Can be accessed only while using CScript.exe.
179
+ */
180
+ StdIn: TextStreamReader;
181
+
182
+ /**
183
+ * Windows Script Host version
184
+ */
185
+ Version: string;
186
+
187
+ /**
188
+ * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.
189
+ */
190
+ ConnectObject(objEventSource: any, strPrefix: string): void;
191
+
192
+ /**
193
+ * Creates a COM object.
194
+ * @param strProgiID
195
+ * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
196
+ */
197
+ CreateObject(strProgID: string, strPrefix?: string): any;
198
+
199
+ /**
200
+ * Disconnects a COM object from its event sources.
201
+ */
202
+ DisconnectObject(obj: any): void;
203
+
204
+ /**
205
+ * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
206
+ * @param strPathname Fully qualified path to the file containing the object persisted to disk.
207
+ * For objects in memory, pass a zero-length string.
208
+ * @param strProgID
209
+ * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
210
+ */
211
+ GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;
212
+
213
+ /**
214
+ * Suspends script execution for a specified length of time, then continues execution.
215
+ * @param intTime Interval (in milliseconds) to suspend script execution.
216
+ */
217
+ Sleep(intTime: number): void;
218
+ };
219
+
220
+ /**
221
+ * Allows enumerating over a COM collection, which may not have indexed item access.
222
+ */
223
+ interface Enumerator<T> {
224
+ /**
225
+ * Returns true if the current item is the last one in the collection, or the collection is empty,
226
+ * or the current item is undefined.
227
+ */
228
+ atEnd(): boolean;
229
+
230
+ /**
231
+ * Returns the current item in the collection
232
+ */
233
+ item(): T;
234
+
235
+ /**
236
+ * Resets the current item in the collection to the first item. If there are no items in the collection,
237
+ * the current item is set to undefined.
238
+ */
239
+ moveFirst(): void;
240
+
241
+ /**
242
+ * Moves the current item to the next item in the collection. If the enumerator is at the end of
243
+ * the collection or the collection is empty, the current item is set to undefined.
244
+ */
245
+ moveNext(): void;
246
+ }
247
+
248
+ interface EnumeratorConstructor {
249
+ new <T>(collection: any): Enumerator<T>;
250
+ new (collection: any): Enumerator<any>;
251
+ }
252
+
253
+ declare var Enumerator: EnumeratorConstructor;
254
+
255
+ /**
256
+ * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.
257
+ */
258
+ interface VBArray<T> {
259
+ /**
260
+ * Returns the number of dimensions (1-based).
261
+ */
262
+ dimensions(): number;
263
+
264
+ /**
265
+ * Takes an index for each dimension in the array, and returns the item at the corresponding location.
266
+ */
267
+ getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;
268
+
269
+ /**
270
+ * Returns the smallest available index for a given dimension.
271
+ * @param dimension 1-based dimension (defaults to 1)
272
+ */
273
+ lbound(dimension?: number): number;
274
+
275
+ /**
276
+ * Returns the largest available index for a given dimension.
277
+ * @param dimension 1-based dimension (defaults to 1)
278
+ */
279
+ ubound(dimension?: number): number;
280
+
281
+ /**
282
+ * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,
283
+ * each successive dimension is appended to the end of the array.
284
+ * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]
285
+ */
286
+ toArray(): T[];
287
+ }
288
+
289
+ interface VBArrayConstructor {
290
+ new <T>(safeArray: any): VBArray<T>;
291
+ new (safeArray: any): VBArray<any>;
292
+ }
293
+
294
+ declare var VBArray: VBArrayConstructor;
@@ -0,0 +1,1202 @@
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 path="lib.core.d.ts" />
17
+ /////////////////////////////
18
+ /// ECMAScript Internationalization API
19
+ /////////////////////////////
20
+
21
+ declare module Intl {
22
+ interface CollatorOptions {
23
+ usage?: string;
24
+ localeMatcher?: string;
25
+ numeric?: boolean;
26
+ caseFirst?: string;
27
+ sensitivity?: string;
28
+ ignorePunctuation?: boolean;
29
+ }
30
+
31
+ interface ResolvedCollatorOptions {
32
+ locale: string;
33
+ usage: string;
34
+ sensitivity: string;
35
+ ignorePunctuation: boolean;
36
+ collation: string;
37
+ caseFirst: string;
38
+ numeric: boolean;
39
+ }
40
+
41
+ interface Collator {
42
+ compare(x: string, y: string): number;
43
+ resolvedOptions(): ResolvedCollatorOptions;
44
+ }
45
+ var Collator: {
46
+ new (locales?: string[], options?: CollatorOptions): Collator;
47
+ new (locale?: string, options?: CollatorOptions): Collator;
48
+ (locales?: string[], options?: CollatorOptions): Collator;
49
+ (locale?: string, options?: CollatorOptions): Collator;
50
+ supportedLocalesOf(locales: string[], options?: CollatorOptions): string[];
51
+ supportedLocalesOf(locale: string, options?: CollatorOptions): string[];
52
+ }
53
+
54
+ interface NumberFormatOptions {
55
+ localeMatcher?: string;
56
+ style?: string;
57
+ currency?: string;
58
+ currencyDisplay?: string;
59
+ useGrouping?: boolean;
60
+ minimumintegerDigits?: number;
61
+ minimumFractionDigits?: number;
62
+ maximumFractionDigits?: number;
63
+ minimumSignificantDigits?: number;
64
+ maximumSignificantDigits?: number;
65
+ }
66
+
67
+ interface ResolvedNumberFormatOptions {
68
+ locale: string;
69
+ numberingSystem: string;
70
+ style: string;
71
+ currency?: string;
72
+ currencyDisplay?: string;
73
+ minimumintegerDigits: number;
74
+ minimumFractionDigits: number;
75
+ maximumFractionDigits: number;
76
+ minimumSignificantDigits?: number;
77
+ maximumSignificantDigits?: number;
78
+ useGrouping: boolean;
79
+ }
80
+
81
+ interface NumberFormat {
82
+ format(value: number): string;
83
+ resolvedOptions(): ResolvedNumberFormatOptions;
84
+ }
85
+ var NumberFormat: {
86
+ new (locales?: string[], options?: NumberFormatOptions): NumberFormat;
87
+ new (locale?: string, options?: NumberFormatOptions): NumberFormat;
88
+ (locales?: string[], options?: NumberFormatOptions): NumberFormat;
89
+ (locale?: string, options?: NumberFormatOptions): NumberFormat;
90
+ supportedLocalesOf(locales: string[], options?: NumberFormatOptions): string[];
91
+ supportedLocalesOf(locale: string, options?: NumberFormatOptions): string[];
92
+ }
93
+
94
+ interface DateTimeFormatOptions {
95
+ localeMatcher?: string;
96
+ weekday?: string;
97
+ era?: string;
98
+ year?: string;
99
+ month?: string;
100
+ day?: string;
101
+ hour?: string;
102
+ minute?: string;
103
+ second?: string;
104
+ timeZoneName?: string;
105
+ formatMatcher?: string;
106
+ hour12?: boolean;
107
+ timeZone?: string;
108
+ }
109
+
110
+ interface ResolvedDateTimeFormatOptions {
111
+ locale: string;
112
+ calendar: string;
113
+ numberingSystem: string;
114
+ timeZone: string;
115
+ hour12?: boolean;
116
+ weekday?: string;
117
+ era?: string;
118
+ year?: string;
119
+ month?: string;
120
+ day?: string;
121
+ hour?: string;
122
+ minute?: string;
123
+ second?: string;
124
+ timeZoneName?: string;
125
+ }
126
+
127
+ interface DateTimeFormat {
128
+ format(date?: Date | number): string;
129
+ resolvedOptions(): ResolvedDateTimeFormatOptions;
130
+ }
131
+ var DateTimeFormat: {
132
+ new (locales?: string[], options?: DateTimeFormatOptions): DateTimeFormat;
133
+ new (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat;
134
+ (locales?: string[], options?: DateTimeFormatOptions): DateTimeFormat;
135
+ (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat;
136
+ supportedLocalesOf(locales: string[], options?: DateTimeFormatOptions): string[];
137
+ supportedLocalesOf(locale: string, options?: DateTimeFormatOptions): string[];
138
+ }
139
+ }
140
+
141
+ interface String {
142
+ /**
143
+ * Determines whether two strings are equivalent in the current locale.
144
+ * @param that String to compare to target string
145
+ * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
146
+ * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
147
+ */
148
+ localeCompare(that: string, locales: string[], options?: Intl.CollatorOptions): number;
149
+
150
+ /**
151
+ * Determines whether two strings are equivalent in the current locale.
152
+ * @param that String to compare to target string
153
+ * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
154
+ * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
155
+ */
156
+ localeCompare(that: string, locale: string, options?: Intl.CollatorOptions): number;
157
+ }
158
+
159
+ interface Number {
160
+ /**
161
+ * Converts a number to a string by using the current or specified locale.
162
+ * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
163
+ * @param options An object that contains one or more properties that specify comparison options.
164
+ */
165
+ toLocaleString(locales?: string[], options?: Intl.NumberFormatOptions): string;
166
+
167
+ /**
168
+ * Converts a number to a string by using the current or specified locale.
169
+ * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
170
+ * @param options An object that contains one or more properties that specify comparison options.
171
+ */
172
+ toLocaleString(locale?: string, options?: Intl.NumberFormatOptions): string;
173
+ }
174
+
175
+ interface Date {
176
+ /**
177
+ * Converts a date and time to a string by using the current or specified locale.
178
+ * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
179
+ * @param options An object that contains one or more properties that specify comparison options.
180
+ */
181
+ toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
182
+ /**
183
+ * Converts a date to a string by using the current or specified locale.
184
+ * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
185
+ * @param options An object that contains one or more properties that specify comparison options.
186
+ */
187
+ toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
188
+
189
+ /**
190
+ * Converts a time to a string by using the current or specified locale.
191
+ * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
192
+ * @param options An object that contains one or more properties that specify comparison options.
193
+ */
194
+ toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;
195
+
196
+ /**
197
+ * Converts a date and time to a string by using the current or specified locale.
198
+ * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
199
+ * @param options An object that contains one or more properties that specify comparison options.
200
+ */
201
+ toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
202
+
203
+ /**
204
+ * Converts a date to a string by using the current or specified locale.
205
+ * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
206
+ * @param options An object that contains one or more properties that specify comparison options.
207
+ */
208
+ toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
209
+
210
+ /**
211
+ * Converts a time to a string by using the current or specified locale.
212
+ * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
213
+ * @param options An object that contains one or more properties that specify comparison options.
214
+ */
215
+ toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
216
+ }
217
+
218
+
219
+ /////////////////////////////
220
+ /// IE Worker APIs
221
+ /////////////////////////////
222
+
223
+ interface EventInit {
224
+ bubbles?: boolean;
225
+ cancelable?: boolean;
226
+ }
227
+
228
+ interface EventListener {
229
+ (evt: Event): void;
230
+ }
231
+
232
+ interface AudioBuffer {
233
+ duration: number;
234
+ length: number;
235
+ numberOfChannels: number;
236
+ sampleRate: number;
237
+ getChannelData(channel: number): any;
238
+ }
239
+
240
+ declare var AudioBuffer: {
241
+ prototype: AudioBuffer;
242
+ new(): AudioBuffer;
243
+ }
244
+
245
+ interface Blob {
246
+ size: number;
247
+ type: string;
248
+ msClose(): void;
249
+ msDetachStream(): any;
250
+ slice(start?: number, end?: number, contentType?: string): Blob;
251
+ }
252
+
253
+ declare var Blob: {
254
+ prototype: Blob;
255
+ new (blobParts?: any[], options?: BlobPropertyBag): Blob;
256
+ }
257
+
258
+ interface CloseEvent extends Event {
259
+ code: number;
260
+ reason: string;
261
+ wasClean: boolean;
262
+ initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;
263
+ }
264
+
265
+ declare var CloseEvent: {
266
+ prototype: CloseEvent;
267
+ new(): CloseEvent;
268
+ }
269
+
270
+ interface Console {
271
+ assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
272
+ clear(): void;
273
+ count(countTitle?: string): void;
274
+ debug(message?: string, ...optionalParams: any[]): void;
275
+ dir(value?: any, ...optionalParams: any[]): void;
276
+ dirxml(value: any): void;
277
+ error(message?: any, ...optionalParams: any[]): void;
278
+ group(groupTitle?: string): void;
279
+ groupCollapsed(groupTitle?: string): void;
280
+ groupEnd(): void;
281
+ info(message?: any, ...optionalParams: any[]): void;
282
+ log(message?: any, ...optionalParams: any[]): void;
283
+ msIsIndependentlyComposed(element: any): boolean;
284
+ profile(reportName?: string): void;
285
+ profileEnd(): void;
286
+ select(element: any): void;
287
+ time(timerName?: string): void;
288
+ timeEnd(timerName?: string): void;
289
+ trace(): void;
290
+ warn(message?: any, ...optionalParams: any[]): void;
291
+ }
292
+
293
+ declare var Console: {
294
+ prototype: Console;
295
+ new(): Console;
296
+ }
297
+
298
+ interface Coordinates {
299
+ accuracy: number;
300
+ altitude: number;
301
+ altitudeAccuracy: number;
302
+ heading: number;
303
+ latitude: number;
304
+ longitude: number;
305
+ speed: number;
306
+ }
307
+
308
+ declare var Coordinates: {
309
+ prototype: Coordinates;
310
+ new(): Coordinates;
311
+ }
312
+
313
+ interface DOMError {
314
+ name: string;
315
+ toString(): string;
316
+ }
317
+
318
+ declare var DOMError: {
319
+ prototype: DOMError;
320
+ new(): DOMError;
321
+ }
322
+
323
+ interface DOMException {
324
+ code: number;
325
+ message: string;
326
+ name: string;
327
+ toString(): string;
328
+ ABORT_ERR: number;
329
+ DATA_CLONE_ERR: number;
330
+ DOMSTRING_SIZE_ERR: number;
331
+ HIERARCHY_REQUEST_ERR: number;
332
+ INDEX_SIZE_ERR: number;
333
+ INUSE_ATTRIBUTE_ERR: number;
334
+ INVALID_ACCESS_ERR: number;
335
+ INVALID_CHARACTER_ERR: number;
336
+ INVALID_MODIFICATION_ERR: number;
337
+ INVALID_NODE_TYPE_ERR: number;
338
+ INVALID_STATE_ERR: number;
339
+ NAMESPACE_ERR: number;
340
+ NETWORK_ERR: number;
341
+ NOT_FOUND_ERR: number;
342
+ NOT_SUPPORTED_ERR: number;
343
+ NO_DATA_ALLOWED_ERR: number;
344
+ NO_MODIFICATION_ALLOWED_ERR: number;
345
+ PARSE_ERR: number;
346
+ QUOTA_EXCEEDED_ERR: number;
347
+ SECURITY_ERR: number;
348
+ SERIALIZE_ERR: number;
349
+ SYNTAX_ERR: number;
350
+ TIMEOUT_ERR: number;
351
+ TYPE_MISMATCH_ERR: number;
352
+ URL_MISMATCH_ERR: number;
353
+ VALIDATION_ERR: number;
354
+ WRONG_DOCUMENT_ERR: number;
355
+ }
356
+
357
+ declare var DOMException: {
358
+ prototype: DOMException;
359
+ new(): DOMException;
360
+ ABORT_ERR: number;
361
+ DATA_CLONE_ERR: number;
362
+ DOMSTRING_SIZE_ERR: number;
363
+ HIERARCHY_REQUEST_ERR: number;
364
+ INDEX_SIZE_ERR: number;
365
+ INUSE_ATTRIBUTE_ERR: number;
366
+ INVALID_ACCESS_ERR: number;
367
+ INVALID_CHARACTER_ERR: number;
368
+ INVALID_MODIFICATION_ERR: number;
369
+ INVALID_NODE_TYPE_ERR: number;
370
+ INVALID_STATE_ERR: number;
371
+ NAMESPACE_ERR: number;
372
+ NETWORK_ERR: number;
373
+ NOT_FOUND_ERR: number;
374
+ NOT_SUPPORTED_ERR: number;
375
+ NO_DATA_ALLOWED_ERR: number;
376
+ NO_MODIFICATION_ALLOWED_ERR: number;
377
+ PARSE_ERR: number;
378
+ QUOTA_EXCEEDED_ERR: number;
379
+ SECURITY_ERR: number;
380
+ SERIALIZE_ERR: number;
381
+ SYNTAX_ERR: number;
382
+ TIMEOUT_ERR: number;
383
+ TYPE_MISMATCH_ERR: number;
384
+ URL_MISMATCH_ERR: number;
385
+ VALIDATION_ERR: number;
386
+ WRONG_DOCUMENT_ERR: number;
387
+ }
388
+
389
+ interface DOMStringList {
390
+ length: number;
391
+ contains(str: string): boolean;
392
+ item(index: number): string;
393
+ [index: number]: string;
394
+ }
395
+
396
+ declare var DOMStringList: {
397
+ prototype: DOMStringList;
398
+ new(): DOMStringList;
399
+ }
400
+
401
+ interface ErrorEvent extends Event {
402
+ colno: number;
403
+ error: any;
404
+ filename: string;
405
+ lineno: number;
406
+ message: string;
407
+ initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;
408
+ }
409
+
410
+ declare var ErrorEvent: {
411
+ prototype: ErrorEvent;
412
+ new(): ErrorEvent;
413
+ }
414
+
415
+ interface Event {
416
+ bubbles: boolean;
417
+ cancelBubble: boolean;
418
+ cancelable: boolean;
419
+ currentTarget: EventTarget;
420
+ defaultPrevented: boolean;
421
+ eventPhase: number;
422
+ isTrusted: boolean;
423
+ returnValue: boolean;
424
+ srcElement: any;
425
+ target: EventTarget;
426
+ timeStamp: number;
427
+ type: string;
428
+ initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;
429
+ preventDefault(): void;
430
+ stopImmediatePropagation(): void;
431
+ stopPropagation(): void;
432
+ AT_TARGET: number;
433
+ BUBBLING_PHASE: number;
434
+ CAPTURING_PHASE: number;
435
+ }
436
+
437
+ declare var Event: {
438
+ prototype: Event;
439
+ new(type: string, eventInitDict?: EventInit): Event;
440
+ AT_TARGET: number;
441
+ BUBBLING_PHASE: number;
442
+ CAPTURING_PHASE: number;
443
+ }
444
+
445
+ interface EventTarget {
446
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
447
+ dispatchEvent(evt: Event): boolean;
448
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
449
+ }
450
+
451
+ declare var EventTarget: {
452
+ prototype: EventTarget;
453
+ new(): EventTarget;
454
+ }
455
+
456
+ interface File extends Blob {
457
+ lastModifiedDate: any;
458
+ name: string;
459
+ }
460
+
461
+ declare var File: {
462
+ prototype: File;
463
+ new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
464
+ }
465
+
466
+ interface FileList {
467
+ length: number;
468
+ item(index: number): File;
469
+ [index: number]: File;
470
+ }
471
+
472
+ declare var FileList: {
473
+ prototype: FileList;
474
+ new(): FileList;
475
+ }
476
+
477
+ interface FileReader extends EventTarget, MSBaseReader {
478
+ error: DOMError;
479
+ readAsArrayBuffer(blob: Blob): void;
480
+ readAsBinaryString(blob: Blob): void;
481
+ readAsDataURL(blob: Blob): void;
482
+ readAsText(blob: Blob, encoding?: string): void;
483
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
484
+ }
485
+
486
+ declare var FileReader: {
487
+ prototype: FileReader;
488
+ new(): FileReader;
489
+ }
490
+
491
+ interface IDBCursor {
492
+ direction: string;
493
+ key: any;
494
+ primaryKey: any;
495
+ source: any;
496
+ advance(count: number): void;
497
+ continue(key?: any): void;
498
+ delete(): IDBRequest;
499
+ update(value: any): IDBRequest;
500
+ NEXT: string;
501
+ NEXT_NO_DUPLICATE: string;
502
+ PREV: string;
503
+ PREV_NO_DUPLICATE: string;
504
+ }
505
+
506
+ declare var IDBCursor: {
507
+ prototype: IDBCursor;
508
+ new(): IDBCursor;
509
+ NEXT: string;
510
+ NEXT_NO_DUPLICATE: string;
511
+ PREV: string;
512
+ PREV_NO_DUPLICATE: string;
513
+ }
514
+
515
+ interface IDBCursorWithValue extends IDBCursor {
516
+ value: any;
517
+ }
518
+
519
+ declare var IDBCursorWithValue: {
520
+ prototype: IDBCursorWithValue;
521
+ new(): IDBCursorWithValue;
522
+ }
523
+
524
+ interface IDBDatabase extends EventTarget {
525
+ name: string;
526
+ objectStoreNames: DOMStringList;
527
+ onabort: (ev: Event) => any;
528
+ onerror: (ev: Event) => any;
529
+ version: string;
530
+ close(): void;
531
+ createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;
532
+ deleteObjectStore(name: string): void;
533
+ transaction(storeNames: any, mode?: string): IDBTransaction;
534
+ addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
535
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
536
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
537
+ }
538
+
539
+ declare var IDBDatabase: {
540
+ prototype: IDBDatabase;
541
+ new(): IDBDatabase;
542
+ }
543
+
544
+ interface IDBFactory {
545
+ cmp(first: any, second: any): number;
546
+ deleteDatabase(name: string): IDBOpenDBRequest;
547
+ open(name: string, version?: number): IDBOpenDBRequest;
548
+ }
549
+
550
+ declare var IDBFactory: {
551
+ prototype: IDBFactory;
552
+ new(): IDBFactory;
553
+ }
554
+
555
+ interface IDBIndex {
556
+ keyPath: string;
557
+ name: string;
558
+ objectStore: IDBObjectStore;
559
+ unique: boolean;
560
+ count(key?: any): IDBRequest;
561
+ get(key: any): IDBRequest;
562
+ getKey(key: any): IDBRequest;
563
+ openCursor(range?: IDBKeyRange, direction?: string): IDBRequest;
564
+ openKeyCursor(range?: IDBKeyRange, direction?: string): IDBRequest;
565
+ }
566
+
567
+ declare var IDBIndex: {
568
+ prototype: IDBIndex;
569
+ new(): IDBIndex;
570
+ }
571
+
572
+ interface IDBKeyRange {
573
+ lower: any;
574
+ lowerOpen: boolean;
575
+ upper: any;
576
+ upperOpen: boolean;
577
+ }
578
+
579
+ declare var IDBKeyRange: {
580
+ prototype: IDBKeyRange;
581
+ new(): IDBKeyRange;
582
+ bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
583
+ lowerBound(bound: any, open?: boolean): IDBKeyRange;
584
+ only(value: any): IDBKeyRange;
585
+ upperBound(bound: any, open?: boolean): IDBKeyRange;
586
+ }
587
+
588
+ interface IDBObjectStore {
589
+ indexNames: DOMStringList;
590
+ keyPath: string;
591
+ name: string;
592
+ transaction: IDBTransaction;
593
+ add(value: any, key?: any): IDBRequest;
594
+ clear(): IDBRequest;
595
+ count(key?: any): IDBRequest;
596
+ createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex;
597
+ delete(key: any): IDBRequest;
598
+ deleteIndex(indexName: string): void;
599
+ get(key: any): IDBRequest;
600
+ index(name: string): IDBIndex;
601
+ openCursor(range?: any, direction?: string): IDBRequest;
602
+ put(value: any, key?: any): IDBRequest;
603
+ }
604
+
605
+ declare var IDBObjectStore: {
606
+ prototype: IDBObjectStore;
607
+ new(): IDBObjectStore;
608
+ }
609
+
610
+ interface IDBOpenDBRequest extends IDBRequest {
611
+ onblocked: (ev: Event) => any;
612
+ onupgradeneeded: (ev: IDBVersionChangeEvent) => any;
613
+ addEventListener(type: "blocked", listener: (ev: Event) => any, useCapture?: boolean): void;
614
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
615
+ addEventListener(type: "success", listener: (ev: Event) => any, useCapture?: boolean): void;
616
+ addEventListener(type: "upgradeneeded", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
617
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
618
+ }
619
+
620
+ declare var IDBOpenDBRequest: {
621
+ prototype: IDBOpenDBRequest;
622
+ new(): IDBOpenDBRequest;
623
+ }
624
+
625
+ interface IDBRequest extends EventTarget {
626
+ error: DOMError;
627
+ onerror: (ev: Event) => any;
628
+ onsuccess: (ev: Event) => any;
629
+ readyState: string;
630
+ result: any;
631
+ source: any;
632
+ transaction: IDBTransaction;
633
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
634
+ addEventListener(type: "success", listener: (ev: Event) => any, useCapture?: boolean): void;
635
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
636
+ }
637
+
638
+ declare var IDBRequest: {
639
+ prototype: IDBRequest;
640
+ new(): IDBRequest;
641
+ }
642
+
643
+ interface IDBTransaction extends EventTarget {
644
+ db: IDBDatabase;
645
+ error: DOMError;
646
+ mode: string;
647
+ onabort: (ev: Event) => any;
648
+ oncomplete: (ev: Event) => any;
649
+ onerror: (ev: Event) => any;
650
+ abort(): void;
651
+ objectStore(name: string): IDBObjectStore;
652
+ READ_ONLY: string;
653
+ READ_WRITE: string;
654
+ VERSION_CHANGE: string;
655
+ addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
656
+ addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;
657
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
658
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
659
+ }
660
+
661
+ declare var IDBTransaction: {
662
+ prototype: IDBTransaction;
663
+ new(): IDBTransaction;
664
+ READ_ONLY: string;
665
+ READ_WRITE: string;
666
+ VERSION_CHANGE: string;
667
+ }
668
+
669
+ interface IDBVersionChangeEvent extends Event {
670
+ newVersion: number;
671
+ oldVersion: number;
672
+ }
673
+
674
+ declare var IDBVersionChangeEvent: {
675
+ prototype: IDBVersionChangeEvent;
676
+ new(): IDBVersionChangeEvent;
677
+ }
678
+
679
+ interface ImageData {
680
+ data: number[];
681
+ height: number;
682
+ width: number;
683
+ }
684
+
685
+ interface ImageDataConstructor {
686
+ prototype: ImageData;
687
+ new(width: number, height: number): ImageData;
688
+ new(array: Uint8ClampedArray, width: number, height: number): ImageData;
689
+ }
690
+
691
+ declare var ImageData: ImageDataConstructor;
692
+
693
+ interface MSApp {
694
+ clearTemporaryWebDataAsync(): MSAppAsyncOperation;
695
+ createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
696
+ createDataPackage(object: any): any;
697
+ createDataPackageFromSelection(): any;
698
+ createFileFromStorageFile(storageFile: any): File;
699
+ createStreamFromInputStream(type: string, inputStream: any): MSStream;
700
+ execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;
701
+ execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;
702
+ getCurrentPriority(): string;
703
+ getHtmlPrintDocumentSourceAsync(htmlDoc: any): any;
704
+ getViewId(view: any): any;
705
+ isTaskScheduledAtPriorityOrHigher(priority: string): boolean;
706
+ pageHandlesAllApplicationActivations(enabled: boolean): void;
707
+ suppressSubdownloadCredentialPrompts(suppress: boolean): void;
708
+ terminateApp(exceptionObject: any): void;
709
+ CURRENT: string;
710
+ HIGH: string;
711
+ IDLE: string;
712
+ NORMAL: string;
713
+ }
714
+ declare var MSApp: MSApp;
715
+
716
+ interface MSAppAsyncOperation extends EventTarget {
717
+ error: DOMError;
718
+ oncomplete: (ev: Event) => any;
719
+ onerror: (ev: Event) => any;
720
+ readyState: number;
721
+ result: any;
722
+ start(): void;
723
+ COMPLETED: number;
724
+ ERROR: number;
725
+ STARTED: number;
726
+ addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;
727
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
728
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
729
+ }
730
+
731
+ declare var MSAppAsyncOperation: {
732
+ prototype: MSAppAsyncOperation;
733
+ new(): MSAppAsyncOperation;
734
+ COMPLETED: number;
735
+ ERROR: number;
736
+ STARTED: number;
737
+ }
738
+
739
+ interface MSBlobBuilder {
740
+ append(data: any, endings?: string): void;
741
+ getBlob(contentType?: string): Blob;
742
+ }
743
+
744
+ declare var MSBlobBuilder: {
745
+ prototype: MSBlobBuilder;
746
+ new(): MSBlobBuilder;
747
+ }
748
+
749
+ interface MSStream {
750
+ type: string;
751
+ msClose(): void;
752
+ msDetachStream(): any;
753
+ }
754
+
755
+ declare var MSStream: {
756
+ prototype: MSStream;
757
+ new(): MSStream;
758
+ }
759
+
760
+ interface MSStreamReader extends EventTarget, MSBaseReader {
761
+ error: DOMError;
762
+ readAsArrayBuffer(stream: MSStream, size?: number): void;
763
+ readAsBinaryString(stream: MSStream, size?: number): void;
764
+ readAsBlob(stream: MSStream, size?: number): void;
765
+ readAsDataURL(stream: MSStream, size?: number): void;
766
+ readAsText(stream: MSStream, encoding?: string, size?: number): void;
767
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
768
+ }
769
+
770
+ declare var MSStreamReader: {
771
+ prototype: MSStreamReader;
772
+ new(): MSStreamReader;
773
+ }
774
+
775
+ interface MediaQueryList {
776
+ matches: boolean;
777
+ media: string;
778
+ addListener(listener: MediaQueryListListener): void;
779
+ removeListener(listener: MediaQueryListListener): void;
780
+ }
781
+
782
+ declare var MediaQueryList: {
783
+ prototype: MediaQueryList;
784
+ new(): MediaQueryList;
785
+ }
786
+
787
+ interface MessageChannel {
788
+ port1: MessagePort;
789
+ port2: MessagePort;
790
+ }
791
+
792
+ declare var MessageChannel: {
793
+ prototype: MessageChannel;
794
+ new(): MessageChannel;
795
+ }
796
+
797
+ interface MessageEvent extends Event {
798
+ data: any;
799
+ origin: string;
800
+ ports: any;
801
+ source: any;
802
+ initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: any): void;
803
+ }
804
+
805
+ declare var MessageEvent: {
806
+ prototype: MessageEvent;
807
+ new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
808
+ }
809
+
810
+ interface MessagePort extends EventTarget {
811
+ onmessage: (ev: MessageEvent) => any;
812
+ close(): void;
813
+ postMessage(message?: any, ports?: any): void;
814
+ start(): void;
815
+ addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
816
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
817
+ }
818
+
819
+ declare var MessagePort: {
820
+ prototype: MessagePort;
821
+ new(): MessagePort;
822
+ }
823
+
824
+ interface Position {
825
+ coords: Coordinates;
826
+ timestamp: number;
827
+ }
828
+
829
+ declare var Position: {
830
+ prototype: Position;
831
+ new(): Position;
832
+ }
833
+
834
+ interface PositionError {
835
+ code: number;
836
+ message: string;
837
+ toString(): string;
838
+ PERMISSION_DENIED: number;
839
+ POSITION_UNAVAILABLE: number;
840
+ TIMEOUT: number;
841
+ }
842
+
843
+ declare var PositionError: {
844
+ prototype: PositionError;
845
+ new(): PositionError;
846
+ PERMISSION_DENIED: number;
847
+ POSITION_UNAVAILABLE: number;
848
+ TIMEOUT: number;
849
+ }
850
+
851
+ interface ProgressEvent extends Event {
852
+ lengthComputable: boolean;
853
+ loaded: number;
854
+ total: number;
855
+ initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;
856
+ }
857
+
858
+ declare var ProgressEvent: {
859
+ prototype: ProgressEvent;
860
+ new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
861
+ }
862
+
863
+ interface WebSocket extends EventTarget {
864
+ binaryType: string;
865
+ bufferedAmount: number;
866
+ extensions: string;
867
+ onclose: (ev: CloseEvent) => any;
868
+ onerror: (ev: Event) => any;
869
+ onmessage: (ev: MessageEvent) => any;
870
+ onopen: (ev: Event) => any;
871
+ protocol: string;
872
+ readyState: number;
873
+ url: string;
874
+ close(code?: number, reason?: string): void;
875
+ send(data: any): void;
876
+ CLOSED: number;
877
+ CLOSING: number;
878
+ CONNECTING: number;
879
+ OPEN: number;
880
+ addEventListener(type: "close", listener: (ev: CloseEvent) => any, useCapture?: boolean): void;
881
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
882
+ addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
883
+ addEventListener(type: "open", listener: (ev: Event) => any, useCapture?: boolean): void;
884
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
885
+ }
886
+
887
+ declare var WebSocket: {
888
+ prototype: WebSocket;
889
+ new(url: string, protocols?: string | string[]): WebSocket;
890
+ CLOSED: number;
891
+ CLOSING: number;
892
+ CONNECTING: number;
893
+ OPEN: number;
894
+ }
895
+
896
+ interface Worker extends EventTarget, AbstractWorker {
897
+ onmessage: (ev: MessageEvent) => any;
898
+ postMessage(message: any, ports?: any): void;
899
+ terminate(): void;
900
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
901
+ addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
902
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
903
+ }
904
+
905
+ declare var Worker: {
906
+ prototype: Worker;
907
+ new(stringUrl: string): Worker;
908
+ }
909
+
910
+ interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
911
+ msCaching: string;
912
+ onreadystatechange: (ev: ProgressEvent) => any;
913
+ readyState: number;
914
+ response: any;
915
+ responseBody: any;
916
+ responseText: string;
917
+ responseType: string;
918
+ responseXML: any;
919
+ status: number;
920
+ statusText: string;
921
+ timeout: number;
922
+ upload: XMLHttpRequestUpload;
923
+ withCredentials: boolean;
924
+ abort(): void;
925
+ getAllResponseHeaders(): string;
926
+ getResponseHeader(header: string): string;
927
+ msCachingEnabled(): boolean;
928
+ open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
929
+ overrideMimeType(mime: string): void;
930
+ send(data?: string): void;
931
+ send(data?: any): void;
932
+ setRequestHeader(header: string, value: string): void;
933
+ DONE: number;
934
+ HEADERS_RECEIVED: number;
935
+ LOADING: number;
936
+ OPENED: number;
937
+ UNSENT: number;
938
+ addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
939
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
940
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
941
+ addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
942
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
943
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
944
+ addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
945
+ addEventListener(type: "timeout", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
946
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
947
+ }
948
+
949
+ declare var XMLHttpRequest: {
950
+ prototype: XMLHttpRequest;
951
+ new(): XMLHttpRequest;
952
+ DONE: number;
953
+ HEADERS_RECEIVED: number;
954
+ LOADING: number;
955
+ OPENED: number;
956
+ UNSENT: number;
957
+ create(): XMLHttpRequest;
958
+ }
959
+
960
+ interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
961
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
962
+ }
963
+
964
+ declare var XMLHttpRequestUpload: {
965
+ prototype: XMLHttpRequestUpload;
966
+ new(): XMLHttpRequestUpload;
967
+ }
968
+
969
+ interface AbstractWorker {
970
+ onerror: (ev: Event) => any;
971
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
972
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
973
+ }
974
+
975
+ interface MSBaseReader {
976
+ onabort: (ev: Event) => any;
977
+ onerror: (ev: Event) => any;
978
+ onload: (ev: Event) => any;
979
+ onloadend: (ev: ProgressEvent) => any;
980
+ onloadstart: (ev: Event) => any;
981
+ onprogress: (ev: ProgressEvent) => any;
982
+ readyState: number;
983
+ result: any;
984
+ abort(): void;
985
+ DONE: number;
986
+ EMPTY: number;
987
+ LOADING: number;
988
+ addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
989
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
990
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
991
+ addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
992
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
993
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
994
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
995
+ }
996
+
997
+ interface NavigatorID {
998
+ appName: string;
999
+ appVersion: string;
1000
+ platform: string;
1001
+ product: string;
1002
+ productSub: string;
1003
+ userAgent: string;
1004
+ vendor: string;
1005
+ vendorSub: string;
1006
+ }
1007
+
1008
+ interface NavigatorOnLine {
1009
+ onLine: boolean;
1010
+ }
1011
+
1012
+ interface WindowBase64 {
1013
+ atob(encodedString: string): string;
1014
+ btoa(rawString: string): string;
1015
+ }
1016
+
1017
+ interface WindowConsole {
1018
+ console: Console;
1019
+ }
1020
+
1021
+ interface XMLHttpRequestEventTarget {
1022
+ onabort: (ev: Event) => any;
1023
+ onerror: (ev: Event) => any;
1024
+ onload: (ev: Event) => any;
1025
+ onloadend: (ev: ProgressEvent) => any;
1026
+ onloadstart: (ev: Event) => any;
1027
+ onprogress: (ev: ProgressEvent) => any;
1028
+ ontimeout: (ev: ProgressEvent) => any;
1029
+ addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
1030
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
1031
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
1032
+ addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
1033
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
1034
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
1035
+ addEventListener(type: "timeout", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
1036
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
1037
+ }
1038
+
1039
+ interface FileReaderSync {
1040
+ readAsArrayBuffer(blob: Blob): any;
1041
+ readAsBinaryString(blob: Blob): void;
1042
+ readAsDataURL(blob: Blob): string;
1043
+ readAsText(blob: Blob, encoding?: string): string;
1044
+ }
1045
+
1046
+ declare var FileReaderSync: {
1047
+ prototype: FileReaderSync;
1048
+ new(): FileReaderSync;
1049
+ }
1050
+
1051
+ interface WorkerGlobalScope extends EventTarget, WorkerUtils, DedicatedWorkerGlobalScope, WindowConsole {
1052
+ location: WorkerLocation;
1053
+ onerror: (ev: Event) => any;
1054
+ self: WorkerGlobalScope;
1055
+ close(): void;
1056
+ msWriteProfilerMark(profilerMarkName: string): void;
1057
+ toString(): string;
1058
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
1059
+ addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
1060
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
1061
+ }
1062
+
1063
+ declare var WorkerGlobalScope: {
1064
+ prototype: WorkerGlobalScope;
1065
+ new(): WorkerGlobalScope;
1066
+ }
1067
+
1068
+ interface WorkerLocation {
1069
+ hash: string;
1070
+ host: string;
1071
+ hostname: string;
1072
+ href: string;
1073
+ pathname: string;
1074
+ port: string;
1075
+ protocol: string;
1076
+ search: string;
1077
+ toString(): string;
1078
+ }
1079
+
1080
+ declare var WorkerLocation: {
1081
+ prototype: WorkerLocation;
1082
+ new(): WorkerLocation;
1083
+ }
1084
+
1085
+ interface WorkerNavigator extends Object, NavigatorID, NavigatorOnLine {
1086
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
1087
+ }
1088
+
1089
+ declare var WorkerNavigator: {
1090
+ prototype: WorkerNavigator;
1091
+ new(): WorkerNavigator;
1092
+ }
1093
+
1094
+ interface DedicatedWorkerGlobalScope {
1095
+ onmessage: (ev: MessageEvent) => any;
1096
+ postMessage(data: any): void;
1097
+ addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
1098
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
1099
+ }
1100
+
1101
+ interface WorkerUtils extends Object, WindowBase64 {
1102
+ indexedDB: IDBFactory;
1103
+ msIndexedDB: IDBFactory;
1104
+ navigator: WorkerNavigator;
1105
+ clearImmediate(handle: number): void;
1106
+ clearInterval(handle: number): void;
1107
+ clearTimeout(handle: number): void;
1108
+ importScripts(...urls: string[]): void;
1109
+ setImmediate(handler: any, ...args: any[]): number;
1110
+ setInterval(handler: any, timeout?: any, ...args: any[]): number;
1111
+ setTimeout(handler: any, timeout?: any, ...args: any[]): number;
1112
+ }
1113
+
1114
+
1115
+ interface BlobPropertyBag {
1116
+ type?: string;
1117
+ endings?: string;
1118
+ }
1119
+
1120
+ interface FilePropertyBag {
1121
+ type?: string;
1122
+ lastModified?: number;
1123
+ }
1124
+
1125
+ interface EventListenerObject {
1126
+ handleEvent(evt: Event): void;
1127
+ }
1128
+
1129
+ declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
1130
+
1131
+ interface MessageEventInit extends EventInit {
1132
+ data?: any;
1133
+ origin?: string;
1134
+ lastEventId?: string;
1135
+ channel?: string;
1136
+ source?: any;
1137
+ ports?: MessagePort[];
1138
+ }
1139
+
1140
+ interface ProgressEventInit extends EventInit {
1141
+ lengthComputable?: boolean;
1142
+ loaded?: number;
1143
+ total?: number;
1144
+ }
1145
+
1146
+ interface ErrorEventHandler {
1147
+ (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
1148
+ }
1149
+ interface PositionCallback {
1150
+ (position: Position): void;
1151
+ }
1152
+ interface PositionErrorCallback {
1153
+ (error: PositionError): void;
1154
+ }
1155
+ interface MediaQueryListListener {
1156
+ (mql: MediaQueryList): void;
1157
+ }
1158
+ interface MSLaunchUriCallback {
1159
+ (): void;
1160
+ }
1161
+ interface MSUnsafeFunctionCallback {
1162
+ (): any;
1163
+ }
1164
+ interface MSExecAtPriorityFunctionCallback {
1165
+ (...args: any[]): any;
1166
+ }
1167
+ interface DecodeSuccessCallback {
1168
+ (decodedData: AudioBuffer): void;
1169
+ }
1170
+ interface DecodeErrorCallback {
1171
+ (): void;
1172
+ }
1173
+ interface FunctionStringCallback {
1174
+ (data: string): void;
1175
+ }
1176
+ declare var location: WorkerLocation;
1177
+ declare var onerror: (ev: Event) => any;
1178
+ declare var self: WorkerGlobalScope;
1179
+ declare function close(): void;
1180
+ declare function msWriteProfilerMark(profilerMarkName: string): void;
1181
+ declare function toString(): string;
1182
+ declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
1183
+ declare function dispatchEvent(evt: Event): boolean;
1184
+ declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
1185
+ declare var indexedDB: IDBFactory;
1186
+ declare var msIndexedDB: IDBFactory;
1187
+ declare var navigator: WorkerNavigator;
1188
+ declare function clearImmediate(handle: number): void;
1189
+ declare function clearInterval(handle: number): void;
1190
+ declare function clearTimeout(handle: number): void;
1191
+ declare function importScripts(...urls: string[]): void;
1192
+ declare function setImmediate(handler: any, ...args: any[]): number;
1193
+ declare function setInterval(handler: any, timeout?: any, ...args: any[]): number;
1194
+ declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;
1195
+ declare function atob(encodedString: string): string;
1196
+ declare function btoa(rawString: string): string;
1197
+ declare var onmessage: (ev: MessageEvent) => any;
1198
+ declare function postMessage(data: any): void;
1199
+ declare var console: Console;
1200
+ declare function addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
1201
+ declare function addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
1202
+ declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;