tsrc 2.1.5.0

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