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.
- checksums.yaml +7 -0
- data/.gitignore +21 -0
- data/Gemfile +7 -0
- data/LICENSE +55 -0
- data/README.md +33 -0
- data/Rakefile +16 -0
- data/lib/tsrc.rb +57 -0
- data/lib/tsrc/support/typescript/.mailmap +216 -0
- data/lib/tsrc/support/typescript/.npmignore +19 -0
- data/lib/tsrc/support/typescript/AUTHORS.md +204 -0
- data/lib/tsrc/support/typescript/CONTRIBUTING.md +185 -0
- data/lib/tsrc/support/typescript/CopyrightNotice.txt +15 -0
- data/lib/tsrc/support/typescript/LICENSE.txt +55 -0
- data/lib/tsrc/support/typescript/README.md +98 -0
- data/lib/tsrc/support/typescript/ThirdPartyNoticeText.txt +35 -0
- data/lib/tsrc/support/typescript/bin/tsc +2 -0
- data/lib/tsrc/support/typescript/bin/tsserver +2 -0
- data/lib/tsrc/support/typescript/lib/README.md +5 -0
- data/lib/tsrc/support/typescript/lib/cancellationToken.js +41 -0
- data/lib/tsrc/support/typescript/lib/lib.d.ts +18215 -0
- data/lib/tsrc/support/typescript/lib/lib.dom.d.ts +13738 -0
- data/lib/tsrc/support/typescript/lib/lib.dom.iterable.d.ts +33 -0
- data/lib/tsrc/support/typescript/lib/lib.es2015.collection.d.ts +92 -0
- data/lib/tsrc/support/typescript/lib/lib.es2015.core.d.ts +544 -0
- data/lib/tsrc/support/typescript/lib/lib.es2015.d.ts +30 -0
- data/lib/tsrc/support/typescript/lib/lib.es2015.generator.d.ts +32 -0
- data/lib/tsrc/support/typescript/lib/lib.es2015.iterable.d.ts +465 -0
- data/lib/tsrc/support/typescript/lib/lib.es2015.promise.d.ts +274 -0
- data/lib/tsrc/support/typescript/lib/lib.es2015.proxy.d.ts +42 -0
- data/lib/tsrc/support/typescript/lib/lib.es2015.reflect.d.ts +35 -0
- data/lib/tsrc/support/typescript/lib/lib.es2015.symbol.d.ts +56 -0
- data/lib/tsrc/support/typescript/lib/lib.es2015.symbol.wellknown.d.ts +347 -0
- data/lib/tsrc/support/typescript/lib/lib.es2016.array.include.d.ts +118 -0
- data/lib/tsrc/support/typescript/lib/lib.es2016.d.ts +22 -0
- data/lib/tsrc/support/typescript/lib/lib.es2017.d.ts +24 -0
- data/lib/tsrc/support/typescript/lib/lib.es2017.object.d.ts +45 -0
- data/lib/tsrc/support/typescript/lib/lib.es2017.sharedmemory.d.ts +47 -0
- data/lib/tsrc/support/typescript/lib/lib.es2017.string.d.ts +47 -0
- data/lib/tsrc/support/typescript/lib/lib.es5.d.ts +4195 -0
- data/lib/tsrc/support/typescript/lib/lib.es6.d.ts +19950 -0
- data/lib/tsrc/support/typescript/lib/lib.scripthost.d.ts +311 -0
- data/lib/tsrc/support/typescript/lib/lib.webworker.d.ts +1274 -0
- data/lib/tsrc/support/typescript/lib/protocol.d.ts +1900 -0
- data/lib/tsrc/support/typescript/lib/tsc.js +52470 -0
- data/lib/tsrc/support/typescript/lib/tsserver.js +70720 -0
- data/lib/tsrc/support/typescript/lib/tsserverlibrary.d.ts +11939 -0
- data/lib/tsrc/support/typescript/lib/tsserverlibrary.js +70256 -0
- data/lib/tsrc/support/typescript/lib/typescript.d.ts +3166 -0
- data/lib/tsrc/support/typescript/lib/typescript.js +81536 -0
- data/lib/tsrc/support/typescript/lib/typescriptServices.d.ts +3164 -0
- data/lib/tsrc/support/typescript/lib/typescriptServices.js +81536 -0
- data/lib/tsrc/support/typescript/lib/typingsInstaller.js +7314 -0
- data/lib/tsrc/support/typescript/package.json +129 -0
- data/lib/tsrc/support/typescript/test.config +1 -0
- data/lib/tsrc/version.rb +5 -0
- data/tsrc.gemspec +20 -0
- metadata +113 -0
@@ -0,0 +1,274 @@
|
|
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
|
+
* Represents the completion of an asynchronous operation
|
23
|
+
*/
|
24
|
+
interface Promise<T> {
|
25
|
+
/**
|
26
|
+
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
27
|
+
* @param onfulfilled The callback to execute when the Promise is resolved.
|
28
|
+
* @param onrejected The callback to execute when the Promise is rejected.
|
29
|
+
* @returns A Promise for the completion of which ever callback is executed.
|
30
|
+
*/
|
31
|
+
then(onfulfilled?: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
|
32
|
+
|
33
|
+
/**
|
34
|
+
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
35
|
+
* @param onfulfilled The callback to execute when the Promise is resolved.
|
36
|
+
* @param onrejected The callback to execute when the Promise is rejected.
|
37
|
+
* @returns A Promise for the completion of which ever callback is executed.
|
38
|
+
*/
|
39
|
+
then<TResult>(onfulfilled: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
|
40
|
+
|
41
|
+
/**
|
42
|
+
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
43
|
+
* @param onfulfilled The callback to execute when the Promise is resolved.
|
44
|
+
* @param onrejected The callback to execute when the Promise is rejected.
|
45
|
+
* @returns A Promise for the completion of which ever callback is executed.
|
46
|
+
*/
|
47
|
+
then<TResult>(onfulfilled: (value: T) => TResult | PromiseLike<TResult>, onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<TResult>;
|
48
|
+
|
49
|
+
/**
|
50
|
+
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
51
|
+
* @param onfulfilled The callback to execute when the Promise is resolved.
|
52
|
+
* @param onrejected The callback to execute when the Promise is rejected.
|
53
|
+
* @returns A Promise for the completion of which ever callback is executed.
|
54
|
+
*/
|
55
|
+
then<TResult1, TResult2>(onfulfilled: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Attaches a callback for only the rejection of the Promise.
|
59
|
+
* @param onrejected The callback to execute when the Promise is rejected.
|
60
|
+
* @returns A Promise for the completion of the callback.
|
61
|
+
*/
|
62
|
+
catch(onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
|
63
|
+
|
64
|
+
/**
|
65
|
+
* Attaches a callback for only the rejection of the Promise.
|
66
|
+
* @param onrejected The callback to execute when the Promise is rejected.
|
67
|
+
* @returns A Promise for the completion of the callback.
|
68
|
+
*/
|
69
|
+
catch<TResult>(onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
|
70
|
+
}
|
71
|
+
|
72
|
+
interface PromiseConstructor {
|
73
|
+
/**
|
74
|
+
* A reference to the prototype.
|
75
|
+
*/
|
76
|
+
readonly prototype: Promise<any>;
|
77
|
+
|
78
|
+
/**
|
79
|
+
* Creates a new Promise.
|
80
|
+
* @param executor A callback used to initialize the promise. This callback is passed two arguments:
|
81
|
+
* a resolve callback used resolve the promise with a value or the result of another promise,
|
82
|
+
* and a reject callback used to reject the promise with a provided reason or error.
|
83
|
+
*/
|
84
|
+
new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
|
85
|
+
|
86
|
+
/**
|
87
|
+
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
88
|
+
* resolve, or rejected when any Promise is rejected.
|
89
|
+
* @param values An array of Promises.
|
90
|
+
* @returns A new Promise.
|
91
|
+
*/
|
92
|
+
all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
|
93
|
+
|
94
|
+
/**
|
95
|
+
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
96
|
+
* resolve, or rejected when any Promise is rejected.
|
97
|
+
* @param values An array of Promises.
|
98
|
+
* @returns A new Promise.
|
99
|
+
*/
|
100
|
+
all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
|
101
|
+
|
102
|
+
/**
|
103
|
+
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
104
|
+
* resolve, or rejected when any Promise is rejected.
|
105
|
+
* @param values An array of Promises.
|
106
|
+
* @returns A new Promise.
|
107
|
+
*/
|
108
|
+
all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
|
109
|
+
|
110
|
+
/**
|
111
|
+
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
112
|
+
* resolve, or rejected when any Promise is rejected.
|
113
|
+
* @param values An array of Promises.
|
114
|
+
* @returns A new Promise.
|
115
|
+
*/
|
116
|
+
all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
|
117
|
+
|
118
|
+
/**
|
119
|
+
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
120
|
+
* resolve, or rejected when any Promise is rejected.
|
121
|
+
* @param values An array of Promises.
|
122
|
+
* @returns A new Promise.
|
123
|
+
*/
|
124
|
+
all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
|
125
|
+
|
126
|
+
/**
|
127
|
+
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
128
|
+
* resolve, or rejected when any Promise is rejected.
|
129
|
+
* @param values An array of Promises.
|
130
|
+
* @returns A new Promise.
|
131
|
+
*/
|
132
|
+
all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
|
133
|
+
|
134
|
+
/**
|
135
|
+
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
136
|
+
* resolve, or rejected when any Promise is rejected.
|
137
|
+
* @param values An array of Promises.
|
138
|
+
* @returns A new Promise.
|
139
|
+
*/
|
140
|
+
all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
|
141
|
+
|
142
|
+
/**
|
143
|
+
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
144
|
+
* resolve, or rejected when any Promise is rejected.
|
145
|
+
* @param values An array of Promises.
|
146
|
+
* @returns A new Promise.
|
147
|
+
*/
|
148
|
+
all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
|
149
|
+
|
150
|
+
/**
|
151
|
+
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
152
|
+
* resolve, or rejected when any Promise is rejected.
|
153
|
+
* @param values An array of Promises.
|
154
|
+
* @returns A new Promise.
|
155
|
+
*/
|
156
|
+
all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
|
157
|
+
|
158
|
+
/**
|
159
|
+
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
160
|
+
* resolve, or rejected when any Promise is rejected.
|
161
|
+
* @param values An array of Promises.
|
162
|
+
* @returns A new Promise.
|
163
|
+
*/
|
164
|
+
all<T>(values: (T | PromiseLike<T>)[]): Promise<T[]>;
|
165
|
+
|
166
|
+
/**
|
167
|
+
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
168
|
+
* or rejected.
|
169
|
+
* @param values An array of Promises.
|
170
|
+
* @returns A new Promise.
|
171
|
+
*/
|
172
|
+
race<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9 | T10>;
|
173
|
+
|
174
|
+
/**
|
175
|
+
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
176
|
+
* or rejected.
|
177
|
+
* @param values An array of Promises.
|
178
|
+
* @returns A new Promise.
|
179
|
+
*/
|
180
|
+
race<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9>;
|
181
|
+
|
182
|
+
/**
|
183
|
+
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
184
|
+
* or rejected.
|
185
|
+
* @param values An array of Promises.
|
186
|
+
* @returns A new Promise.
|
187
|
+
*/
|
188
|
+
race<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8>;
|
189
|
+
|
190
|
+
/**
|
191
|
+
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
192
|
+
* or rejected.
|
193
|
+
* @param values An array of Promises.
|
194
|
+
* @returns A new Promise.
|
195
|
+
*/
|
196
|
+
race<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7>;
|
197
|
+
|
198
|
+
/**
|
199
|
+
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
200
|
+
* or rejected.
|
201
|
+
* @param values An array of Promises.
|
202
|
+
* @returns A new Promise.
|
203
|
+
*/
|
204
|
+
race<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<T1 | T2 | T3 | T4 | T5 | T6>;
|
205
|
+
|
206
|
+
/**
|
207
|
+
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
208
|
+
* or rejected.
|
209
|
+
* @param values An array of Promises.
|
210
|
+
* @returns A new Promise.
|
211
|
+
*/
|
212
|
+
race<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>]): Promise<T1 | T2 | T3 | T4 | T5>;
|
213
|
+
|
214
|
+
/**
|
215
|
+
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
216
|
+
* or rejected.
|
217
|
+
* @param values An array of Promises.
|
218
|
+
* @returns A new Promise.
|
219
|
+
*/
|
220
|
+
race<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]): Promise<T1 | T2 | T3 | T4>;
|
221
|
+
|
222
|
+
/**
|
223
|
+
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
224
|
+
* or rejected.
|
225
|
+
* @param values An array of Promises.
|
226
|
+
* @returns A new Promise.
|
227
|
+
*/
|
228
|
+
race<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<T1 | T2 | T3>;
|
229
|
+
|
230
|
+
/**
|
231
|
+
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
232
|
+
* or rejected.
|
233
|
+
* @param values An array of Promises.
|
234
|
+
* @returns A new Promise.
|
235
|
+
*/
|
236
|
+
race<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<T1 | T2>;
|
237
|
+
|
238
|
+
/**
|
239
|
+
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
240
|
+
* or rejected.
|
241
|
+
* @param values An array of Promises.
|
242
|
+
* @returns A new Promise.
|
243
|
+
*/
|
244
|
+
race<T>(values: (T | PromiseLike<T>)[]): Promise<T>;
|
245
|
+
|
246
|
+
/**
|
247
|
+
* Creates a new rejected promise for the provided reason.
|
248
|
+
* @param reason The reason the promise was rejected.
|
249
|
+
* @returns A new rejected Promise.
|
250
|
+
*/
|
251
|
+
reject(reason: any): Promise<never>;
|
252
|
+
|
253
|
+
/**
|
254
|
+
* Creates a new rejected promise for the provided reason.
|
255
|
+
* @param reason The reason the promise was rejected.
|
256
|
+
* @returns A new rejected Promise.
|
257
|
+
*/
|
258
|
+
reject<T>(reason: any): Promise<T>;
|
259
|
+
|
260
|
+
/**
|
261
|
+
* Creates a new resolved promise for the provided value.
|
262
|
+
* @param value A promise.
|
263
|
+
* @returns A promise whose internal state matches the provided promise.
|
264
|
+
*/
|
265
|
+
resolve<T>(value: T | PromiseLike<T>): Promise<T>;
|
266
|
+
|
267
|
+
/**
|
268
|
+
* Creates a new resolved promise .
|
269
|
+
* @returns A resolved promise.
|
270
|
+
*/
|
271
|
+
resolve(): Promise<void>;
|
272
|
+
}
|
273
|
+
|
274
|
+
declare var Promise: PromiseConstructor;
|
@@ -0,0 +1,42 @@
|
|
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
|
+
interface ProxyHandler<T> {
|
22
|
+
getPrototypeOf? (target: T): {} | null;
|
23
|
+
setPrototypeOf? (target: T, v: any): boolean;
|
24
|
+
isExtensible? (target: T): boolean;
|
25
|
+
preventExtensions? (target: T): boolean;
|
26
|
+
getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor;
|
27
|
+
has? (target: T, p: PropertyKey): boolean;
|
28
|
+
get? (target: T, p: PropertyKey, receiver: any): any;
|
29
|
+
set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
|
30
|
+
deleteProperty? (target: T, p: PropertyKey): boolean;
|
31
|
+
defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean;
|
32
|
+
enumerate? (target: T): PropertyKey[];
|
33
|
+
ownKeys? (target: T): PropertyKey[];
|
34
|
+
apply? (target: T, thisArg: any, argArray?: any): any;
|
35
|
+
construct? (target: T, argArray: any, newTarget?: any): {};
|
36
|
+
}
|
37
|
+
|
38
|
+
interface ProxyConstructor {
|
39
|
+
revocable<T>(target: T, handler: ProxyHandler<T>): { proxy: T; revoke: () => void; };
|
40
|
+
new <T>(target: T, handler: ProxyHandler<T>): T
|
41
|
+
}
|
42
|
+
declare var Proxy: ProxyConstructor;
|
@@ -0,0 +1,35 @@
|
|
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
|
+
declare namespace Reflect {
|
22
|
+
function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
|
23
|
+
function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: any): any;
|
24
|
+
function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
|
25
|
+
function deleteProperty(target: any, propertyKey: PropertyKey): boolean;
|
26
|
+
function get(target: any, propertyKey: PropertyKey, receiver?: any): any;
|
27
|
+
function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;
|
28
|
+
function getPrototypeOf(target: any): any;
|
29
|
+
function has(target: any, propertyKey: PropertyKey): boolean;
|
30
|
+
function isExtensible(target: any): boolean;
|
31
|
+
function ownKeys(target: any): Array<PropertyKey>;
|
32
|
+
function preventExtensions(target: any): boolean;
|
33
|
+
function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
|
34
|
+
function setPrototypeOf(target: any, proto: any): boolean;
|
35
|
+
}
|
@@ -0,0 +1,56 @@
|
|
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
|
+
interface Symbol {
|
22
|
+
/** Returns a string representation of an object. */
|
23
|
+
toString(): string;
|
24
|
+
|
25
|
+
/** Returns the primitive value of the specified object. */
|
26
|
+
valueOf(): Object;
|
27
|
+
}
|
28
|
+
|
29
|
+
interface SymbolConstructor {
|
30
|
+
/**
|
31
|
+
* A reference to the prototype.
|
32
|
+
*/
|
33
|
+
readonly prototype: Symbol;
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Returns a new unique Symbol value.
|
37
|
+
* @param description Description of the new Symbol object.
|
38
|
+
*/
|
39
|
+
(description?: string|number): symbol;
|
40
|
+
|
41
|
+
/**
|
42
|
+
* Returns a Symbol object from the global symbol registry matching the given key if found.
|
43
|
+
* Otherwise, returns a new symbol with this key.
|
44
|
+
* @param key key to search for.
|
45
|
+
*/
|
46
|
+
for(key: string): symbol;
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Returns a key from the global symbol registry matching the given Symbol if found.
|
50
|
+
* Otherwise, returns a undefined.
|
51
|
+
* @param sym Symbol to find the key for.
|
52
|
+
*/
|
53
|
+
keyFor(sym: symbol): string | undefined;
|
54
|
+
}
|
55
|
+
|
56
|
+
declare var Symbol: SymbolConstructor;
|
@@ -0,0 +1,347 @@
|
|
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
|
+
/// <reference path="lib.es2015.symbol.d.ts" />
|
22
|
+
|
23
|
+
interface SymbolConstructor {
|
24
|
+
/**
|
25
|
+
* A method that determines if a constructor object recognizes an object as one of the
|
26
|
+
* constructor’s instances. Called by the semantics of the instanceof operator.
|
27
|
+
*/
|
28
|
+
readonly hasInstance: symbol;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* A Boolean value that if true indicates that an object should flatten to its array elements
|
32
|
+
* by Array.prototype.concat.
|
33
|
+
*/
|
34
|
+
readonly isConcatSpreadable: symbol;
|
35
|
+
|
36
|
+
/**
|
37
|
+
* A regular expression method that matches the regular expression against a string. Called
|
38
|
+
* by the String.prototype.match method.
|
39
|
+
*/
|
40
|
+
readonly match: symbol;
|
41
|
+
|
42
|
+
/**
|
43
|
+
* A regular expression method that replaces matched substrings of a string. Called by the
|
44
|
+
* String.prototype.replace method.
|
45
|
+
*/
|
46
|
+
readonly replace: symbol;
|
47
|
+
|
48
|
+
/**
|
49
|
+
* A regular expression method that returns the index within a string that matches the
|
50
|
+
* regular expression. Called by the String.prototype.search method.
|
51
|
+
*/
|
52
|
+
readonly search: symbol;
|
53
|
+
|
54
|
+
/**
|
55
|
+
* A function valued property that is the constructor function that is used to create
|
56
|
+
* derived objects.
|
57
|
+
*/
|
58
|
+
readonly species: symbol;
|
59
|
+
|
60
|
+
/**
|
61
|
+
* A regular expression method that splits a string at the indices that match the regular
|
62
|
+
* expression. Called by the String.prototype.split method.
|
63
|
+
*/
|
64
|
+
readonly split: symbol;
|
65
|
+
|
66
|
+
/**
|
67
|
+
* A method that converts an object to a corresponding primitive value.
|
68
|
+
* Called by the ToPrimitive abstract operation.
|
69
|
+
*/
|
70
|
+
readonly toPrimitive: symbol;
|
71
|
+
|
72
|
+
/**
|
73
|
+
* A String value that is used in the creation of the default string description of an object.
|
74
|
+
* Called by the built-in method Object.prototype.toString.
|
75
|
+
*/
|
76
|
+
readonly toStringTag: symbol;
|
77
|
+
|
78
|
+
/**
|
79
|
+
* An Object whose own property names are property names that are excluded from the 'with'
|
80
|
+
* environment bindings of the associated objects.
|
81
|
+
*/
|
82
|
+
readonly unscopables: symbol;
|
83
|
+
}
|
84
|
+
|
85
|
+
interface Symbol {
|
86
|
+
readonly [Symbol.toStringTag]: "Symbol";
|
87
|
+
}
|
88
|
+
|
89
|
+
interface Array<T> {
|
90
|
+
/**
|
91
|
+
* Returns an object whose properties have the value 'true'
|
92
|
+
* when they will be absent when used in a 'with' statement.
|
93
|
+
*/
|
94
|
+
[Symbol.unscopables](): {
|
95
|
+
copyWithin: boolean;
|
96
|
+
entries: boolean;
|
97
|
+
fill: boolean;
|
98
|
+
find: boolean;
|
99
|
+
findIndex: boolean;
|
100
|
+
keys: boolean;
|
101
|
+
values: boolean;
|
102
|
+
};
|
103
|
+
}
|
104
|
+
|
105
|
+
interface Date {
|
106
|
+
/**
|
107
|
+
* Converts a Date object to a string.
|
108
|
+
*/
|
109
|
+
[Symbol.toPrimitive](hint: "default"): string;
|
110
|
+
/**
|
111
|
+
* Converts a Date object to a string.
|
112
|
+
*/
|
113
|
+
[Symbol.toPrimitive](hint: "string"): string;
|
114
|
+
/**
|
115
|
+
* Converts a Date object to a number.
|
116
|
+
*/
|
117
|
+
[Symbol.toPrimitive](hint: "number"): number;
|
118
|
+
/**
|
119
|
+
* Converts a Date object to a string or number.
|
120
|
+
*
|
121
|
+
* @param hint The strings "number", "string", or "default" to specify what primitive to return.
|
122
|
+
*
|
123
|
+
* @throws {TypeError} If 'hint' was given something other than "number", "string", or "default".
|
124
|
+
* @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default".
|
125
|
+
*/
|
126
|
+
[Symbol.toPrimitive](hint: string): string | number;
|
127
|
+
}
|
128
|
+
|
129
|
+
interface Map<K, V> {
|
130
|
+
readonly [Symbol.toStringTag]: "Map";
|
131
|
+
}
|
132
|
+
|
133
|
+
interface WeakMap<K, V>{
|
134
|
+
readonly [Symbol.toStringTag]: "WeakMap";
|
135
|
+
}
|
136
|
+
|
137
|
+
interface Set<T> {
|
138
|
+
readonly [Symbol.toStringTag]: "Set";
|
139
|
+
}
|
140
|
+
|
141
|
+
interface WeakSet<T> {
|
142
|
+
readonly [Symbol.toStringTag]: "WeakSet";
|
143
|
+
}
|
144
|
+
|
145
|
+
interface JSON {
|
146
|
+
readonly [Symbol.toStringTag]: "JSON";
|
147
|
+
}
|
148
|
+
|
149
|
+
interface Function {
|
150
|
+
/**
|
151
|
+
* Determines whether the given value inherits from this function if this function was used
|
152
|
+
* as a constructor function.
|
153
|
+
*
|
154
|
+
* A constructor function can control which objects are recognized as its instances by
|
155
|
+
* 'instanceof' by overriding this method.
|
156
|
+
*/
|
157
|
+
[Symbol.hasInstance](value: any): boolean;
|
158
|
+
}
|
159
|
+
|
160
|
+
interface GeneratorFunction extends Function {
|
161
|
+
readonly [Symbol.toStringTag]: "GeneratorFunction";
|
162
|
+
}
|
163
|
+
|
164
|
+
interface Math {
|
165
|
+
readonly [Symbol.toStringTag]: "Math";
|
166
|
+
}
|
167
|
+
|
168
|
+
interface Promise<T> {
|
169
|
+
readonly [Symbol.toStringTag]: "Promise";
|
170
|
+
}
|
171
|
+
|
172
|
+
interface PromiseConstructor {
|
173
|
+
readonly [Symbol.species]: Function;
|
174
|
+
}
|
175
|
+
|
176
|
+
interface RegExp {
|
177
|
+
/**
|
178
|
+
* Matches a string with this regular expression, and returns an array containing the results of
|
179
|
+
* that search.
|
180
|
+
* @param string A string to search within.
|
181
|
+
*/
|
182
|
+
[Symbol.match](string: string): RegExpMatchArray | null;
|
183
|
+
|
184
|
+
/**
|
185
|
+
* Replaces text in a string, using this regular expression.
|
186
|
+
* @param string A String object or string literal whose contents matching against
|
187
|
+
* this regular expression will be replaced
|
188
|
+
* @param replaceValue A String object or string literal containing the text to replace for every
|
189
|
+
* successful match of this regular expression.
|
190
|
+
*/
|
191
|
+
[Symbol.replace](string: string, replaceValue: string): string;
|
192
|
+
|
193
|
+
/**
|
194
|
+
* Replaces text in a string, using this regular expression.
|
195
|
+
* @param string A String object or string literal whose contents matching against
|
196
|
+
* this regular expression will be replaced
|
197
|
+
* @param replacer A function that returns the replacement text.
|
198
|
+
*/
|
199
|
+
[Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
|
200
|
+
|
201
|
+
/**
|
202
|
+
* Finds the position beginning first substring match in a regular expression search
|
203
|
+
* using this regular expression.
|
204
|
+
*
|
205
|
+
* @param string The string to search within.
|
206
|
+
*/
|
207
|
+
[Symbol.search](string: string): number;
|
208
|
+
|
209
|
+
/**
|
210
|
+
* Returns an array of substrings that were delimited by strings in the original input that
|
211
|
+
* match against this regular expression.
|
212
|
+
*
|
213
|
+
* If the regular expression contains capturing parentheses, then each time this
|
214
|
+
* regular expression matches, the results (including any undefined results) of the
|
215
|
+
* capturing parentheses are spliced.
|
216
|
+
*
|
217
|
+
* @param string string value to split
|
218
|
+
* @param limit if not undefined, the output array is truncated so that it contains no more
|
219
|
+
* than 'limit' elements.
|
220
|
+
*/
|
221
|
+
[Symbol.split](string: string, limit?: number): string[];
|
222
|
+
}
|
223
|
+
|
224
|
+
interface RegExpConstructor {
|
225
|
+
[Symbol.species](): RegExpConstructor;
|
226
|
+
}
|
227
|
+
|
228
|
+
interface String {
|
229
|
+
/**
|
230
|
+
* Matches a string an object that supports being matched against, and returns an array containing the results of that search.
|
231
|
+
* @param matcher An object that supports being matched against.
|
232
|
+
*/
|
233
|
+
match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null;
|
234
|
+
|
235
|
+
/**
|
236
|
+
* Replaces text in a string, using an object that supports replacement within a string.
|
237
|
+
* @param searchValue A object can search for and replace matches within a string.
|
238
|
+
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
|
239
|
+
*/
|
240
|
+
replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;
|
241
|
+
|
242
|
+
/**
|
243
|
+
* Replaces text in a string, using an object that supports replacement within a string.
|
244
|
+
* @param searchValue A object can search for and replace matches within a string.
|
245
|
+
* @param replacer A function that returns the replacement text.
|
246
|
+
*/
|
247
|
+
replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;
|
248
|
+
|
249
|
+
/**
|
250
|
+
* Finds the first substring match in a regular expression search.
|
251
|
+
* @param searcher An object which supports searching within a string.
|
252
|
+
*/
|
253
|
+
search(searcher: { [Symbol.search](string: string): number; }): number;
|
254
|
+
|
255
|
+
/**
|
256
|
+
* Split a string into substrings using the specified separator and return them as an array.
|
257
|
+
* @param splitter An object that can split a string.
|
258
|
+
* @param limit A value used to limit the number of elements returned in the array.
|
259
|
+
*/
|
260
|
+
split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[];
|
261
|
+
}
|
262
|
+
|
263
|
+
/**
|
264
|
+
* Represents a raw buffer of binary data, which is used to store data for the
|
265
|
+
* different typed arrays. ArrayBuffers cannot be read from or written to directly,
|
266
|
+
* but can be passed to a typed array or DataView Object to interpret the raw
|
267
|
+
* buffer as needed.
|
268
|
+
*/
|
269
|
+
interface ArrayBuffer {
|
270
|
+
readonly [Symbol.toStringTag]: "ArrayBuffer";
|
271
|
+
}
|
272
|
+
|
273
|
+
interface DataView {
|
274
|
+
readonly [Symbol.toStringTag]: "DataView";
|
275
|
+
}
|
276
|
+
|
277
|
+
/**
|
278
|
+
* A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
|
279
|
+
* number of bytes could not be allocated an exception is raised.
|
280
|
+
*/
|
281
|
+
interface Int8Array {
|
282
|
+
readonly [Symbol.toStringTag]: "Int8Array";
|
283
|
+
}
|
284
|
+
|
285
|
+
/**
|
286
|
+
* A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
|
287
|
+
* requested number of bytes could not be allocated an exception is raised.
|
288
|
+
*/
|
289
|
+
interface Uint8Array {
|
290
|
+
readonly [Symbol.toStringTag]: "UInt8Array";
|
291
|
+
}
|
292
|
+
|
293
|
+
/**
|
294
|
+
* A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
|
295
|
+
* If the requested number of bytes could not be allocated an exception is raised.
|
296
|
+
*/
|
297
|
+
interface Uint8ClampedArray {
|
298
|
+
readonly [Symbol.toStringTag]: "Uint8ClampedArray";
|
299
|
+
}
|
300
|
+
|
301
|
+
/**
|
302
|
+
* A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
|
303
|
+
* requested number of bytes could not be allocated an exception is raised.
|
304
|
+
*/
|
305
|
+
interface Int16Array {
|
306
|
+
readonly [Symbol.toStringTag]: "Int16Array";
|
307
|
+
}
|
308
|
+
|
309
|
+
/**
|
310
|
+
* A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
|
311
|
+
* requested number of bytes could not be allocated an exception is raised.
|
312
|
+
*/
|
313
|
+
interface Uint16Array {
|
314
|
+
readonly [Symbol.toStringTag]: "Uint16Array";
|
315
|
+
}
|
316
|
+
|
317
|
+
/**
|
318
|
+
* A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
|
319
|
+
* requested number of bytes could not be allocated an exception is raised.
|
320
|
+
*/
|
321
|
+
interface Int32Array {
|
322
|
+
readonly [Symbol.toStringTag]: "Int32Array";
|
323
|
+
}
|
324
|
+
|
325
|
+
/**
|
326
|
+
* A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
|
327
|
+
* requested number of bytes could not be allocated an exception is raised.
|
328
|
+
*/
|
329
|
+
interface Uint32Array {
|
330
|
+
readonly [Symbol.toStringTag]: "Uint32Array";
|
331
|
+
}
|
332
|
+
|
333
|
+
/**
|
334
|
+
* A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
|
335
|
+
* of bytes could not be allocated an exception is raised.
|
336
|
+
*/
|
337
|
+
interface Float32Array {
|
338
|
+
readonly [Symbol.toStringTag]: "Float32Array";
|
339
|
+
}
|
340
|
+
|
341
|
+
/**
|
342
|
+
* A typed array of 64-bit float values. The contents are initialized to 0. If the requested
|
343
|
+
* number of bytes could not be allocated an exception is raised.
|
344
|
+
*/
|
345
|
+
interface Float64Array {
|
346
|
+
readonly [Symbol.toStringTag]: "Float64Array";
|
347
|
+
}
|