@operated/typescript 6.0.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 (140) hide show
  1. package/LICENSE.txt +55 -0
  2. package/README.md +83 -0
  3. package/SECURITY.md +39 -0
  4. package/ThirdPartyNoticeText.txt +193 -0
  5. package/bin/tsc +2 -0
  6. package/bin/tsserver +2 -0
  7. package/lib/_tsc.js +134762 -0
  8. package/lib/_tsserver.js +659 -0
  9. package/lib/_typingsInstaller.js +222 -0
  10. package/lib/cs/diagnosticMessages.generated.json +2129 -0
  11. package/lib/de/diagnosticMessages.generated.json +2125 -0
  12. package/lib/es/diagnosticMessages.generated.json +2129 -0
  13. package/lib/fr/diagnosticMessages.generated.json +2129 -0
  14. package/lib/it/diagnosticMessages.generated.json +2125 -0
  15. package/lib/ja/diagnosticMessages.generated.json +2129 -0
  16. package/lib/ko/diagnosticMessages.generated.json +2129 -0
  17. package/lib/lib.d.ts +20 -0
  18. package/lib/lib.decorators.d.ts +382 -0
  19. package/lib/lib.decorators.legacy.d.ts +20 -0
  20. package/lib/lib.dom.asynciterable.d.ts +18 -0
  21. package/lib/lib.dom.d.ts +45125 -0
  22. package/lib/lib.dom.iterable.d.ts +18 -0
  23. package/lib/lib.es2015.collection.d.ts +150 -0
  24. package/lib/lib.es2015.core.d.ts +595 -0
  25. package/lib/lib.es2015.d.ts +26 -0
  26. package/lib/lib.es2015.generator.d.ts +75 -0
  27. package/lib/lib.es2015.iterable.d.ts +603 -0
  28. package/lib/lib.es2015.promise.d.ts +79 -0
  29. package/lib/lib.es2015.proxy.d.ts +126 -0
  30. package/lib/lib.es2015.reflect.d.ts +142 -0
  31. package/lib/lib.es2015.symbol.d.ts +44 -0
  32. package/lib/lib.es2015.symbol.wellknown.d.ts +324 -0
  33. package/lib/lib.es2016.array.include.d.ts +114 -0
  34. package/lib/lib.es2016.d.ts +19 -0
  35. package/lib/lib.es2016.full.d.ts +21 -0
  36. package/lib/lib.es2016.intl.d.ts +29 -0
  37. package/lib/lib.es2017.arraybuffer.d.ts +19 -0
  38. package/lib/lib.es2017.d.ts +24 -0
  39. package/lib/lib.es2017.date.d.ts +29 -0
  40. package/lib/lib.es2017.full.d.ts +21 -0
  41. package/lib/lib.es2017.intl.d.ts +42 -0
  42. package/lib/lib.es2017.object.d.ts +47 -0
  43. package/lib/lib.es2017.sharedmemory.d.ts +133 -0
  44. package/lib/lib.es2017.string.d.ts +43 -0
  45. package/lib/lib.es2017.typedarrays.d.ts +51 -0
  46. package/lib/lib.es2018.asyncgenerator.d.ts +75 -0
  47. package/lib/lib.es2018.asynciterable.d.ts +51 -0
  48. package/lib/lib.es2018.d.ts +22 -0
  49. package/lib/lib.es2018.full.d.ts +22 -0
  50. package/lib/lib.es2018.intl.d.ts +81 -0
  51. package/lib/lib.es2018.promise.d.ts +28 -0
  52. package/lib/lib.es2018.regexp.d.ts +35 -0
  53. package/lib/lib.es2019.array.d.ts +77 -0
  54. package/lib/lib.es2019.d.ts +22 -0
  55. package/lib/lib.es2019.full.d.ts +22 -0
  56. package/lib/lib.es2019.intl.d.ts +21 -0
  57. package/lib/lib.es2019.object.d.ts +31 -0
  58. package/lib/lib.es2019.string.d.ts +35 -0
  59. package/lib/lib.es2019.symbol.d.ts +22 -0
  60. package/lib/lib.es2020.bigint.d.ts +763 -0
  61. package/lib/lib.es2020.d.ts +25 -0
  62. package/lib/lib.es2020.date.d.ts +40 -0
  63. package/lib/lib.es2020.full.d.ts +22 -0
  64. package/lib/lib.es2020.intl.d.ts +472 -0
  65. package/lib/lib.es2020.number.d.ts +26 -0
  66. package/lib/lib.es2020.promise.d.ts +45 -0
  67. package/lib/lib.es2020.sharedmemory.d.ts +97 -0
  68. package/lib/lib.es2020.string.d.ts +42 -0
  69. package/lib/lib.es2020.symbol.wellknown.d.ts +39 -0
  70. package/lib/lib.es2021.d.ts +21 -0
  71. package/lib/lib.es2021.full.d.ts +22 -0
  72. package/lib/lib.es2021.intl.d.ts +164 -0
  73. package/lib/lib.es2021.promise.d.ts +46 -0
  74. package/lib/lib.es2021.string.d.ts +31 -0
  75. package/lib/lib.es2021.weakref.d.ts +76 -0
  76. package/lib/lib.es2022.array.d.ts +119 -0
  77. package/lib/lib.es2022.d.ts +23 -0
  78. package/lib/lib.es2022.error.d.ts +73 -0
  79. package/lib/lib.es2022.full.d.ts +22 -0
  80. package/lib/lib.es2022.intl.d.ts +143 -0
  81. package/lib/lib.es2022.object.d.ts +24 -0
  82. package/lib/lib.es2022.regexp.d.ts +37 -0
  83. package/lib/lib.es2022.string.d.ts +23 -0
  84. package/lib/lib.es2023.array.d.ts +922 -0
  85. package/lib/lib.es2023.collection.d.ts +19 -0
  86. package/lib/lib.es2023.d.ts +20 -0
  87. package/lib/lib.es2023.full.d.ts +22 -0
  88. package/lib/lib.es2023.intl.d.ts +62 -0
  89. package/lib/lib.es2024.arraybuffer.d.ts +63 -0
  90. package/lib/lib.es2024.collection.d.ts +27 -0
  91. package/lib/lib.es2024.d.ts +24 -0
  92. package/lib/lib.es2024.full.d.ts +22 -0
  93. package/lib/lib.es2024.object.d.ts +27 -0
  94. package/lib/lib.es2024.promise.d.ts +33 -0
  95. package/lib/lib.es2024.regexp.d.ts +23 -0
  96. package/lib/lib.es2024.sharedmemory.d.ts +66 -0
  97. package/lib/lib.es2024.string.d.ts +27 -0
  98. package/lib/lib.es2025.collection.d.ts +94 -0
  99. package/lib/lib.es2025.d.ts +23 -0
  100. package/lib/lib.es2025.float16.d.ts +443 -0
  101. package/lib/lib.es2025.full.d.ts +22 -0
  102. package/lib/lib.es2025.intl.d.ts +200 -0
  103. package/lib/lib.es2025.iterator.d.ts +146 -0
  104. package/lib/lib.es2025.promise.d.ts +32 -0
  105. package/lib/lib.es2025.regexp.d.ts +30 -0
  106. package/lib/lib.es5.d.ts +4599 -0
  107. package/lib/lib.es6.d.ts +21 -0
  108. package/lib/lib.esnext.array.d.ts +33 -0
  109. package/lib/lib.esnext.collection.d.ts +47 -0
  110. package/lib/lib.esnext.d.ts +27 -0
  111. package/lib/lib.esnext.date.d.ts +21 -0
  112. package/lib/lib.esnext.decorators.d.ts +26 -0
  113. package/lib/lib.esnext.disposable.d.ts +191 -0
  114. package/lib/lib.esnext.error.d.ts +22 -0
  115. package/lib/lib.esnext.full.d.ts +22 -0
  116. package/lib/lib.esnext.intl.d.ts +107 -0
  117. package/lib/lib.esnext.sharedmemory.d.ts +23 -0
  118. package/lib/lib.esnext.temporal.d.ts +485 -0
  119. package/lib/lib.esnext.typedarrays.d.ts +90 -0
  120. package/lib/lib.scripthost.d.ts +320 -0
  121. package/lib/lib.webworker.asynciterable.d.ts +18 -0
  122. package/lib/lib.webworker.d.ts +15606 -0
  123. package/lib/lib.webworker.importscripts.d.ts +21 -0
  124. package/lib/lib.webworker.iterable.d.ts +18 -0
  125. package/lib/pl/diagnosticMessages.generated.json +2129 -0
  126. package/lib/pt-br/diagnosticMessages.generated.json +2129 -0
  127. package/lib/ru/diagnosticMessages.generated.json +2125 -0
  128. package/lib/tr/diagnosticMessages.generated.json +2129 -0
  129. package/lib/tsc.js +8 -0
  130. package/lib/tsserver.js +8 -0
  131. package/lib/tsserverlibrary.d.ts +17 -0
  132. package/lib/tsserverlibrary.js +21 -0
  133. package/lib/typesMap.json +497 -0
  134. package/lib/typescript.d.ts +11450 -0
  135. package/lib/typescript.js +201429 -0
  136. package/lib/typingsInstaller.js +8 -0
  137. package/lib/watchGuard.js +53 -0
  138. package/lib/zh-cn/diagnosticMessages.generated.json +2129 -0
  139. package/lib/zh-tw/diagnosticMessages.generated.json +2125 -0
  140. package/package.json +117 -0
@@ -0,0 +1,146 @@
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
+ MERCHANTABILITY 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
+ /// <reference lib="es2015.iterable" />
18
+
19
+ // NOTE: This is specified as what is essentially an unreachable module. All actual global declarations can be found
20
+ // in the `declare global` section, below. This is necessary as there is currently no way to declare an `abstract`
21
+ // member without declaring a `class`, but declaring `class Iterator<T>` globally would conflict with TypeScript's
22
+ // general purpose `Iterator<T>` interface.
23
+ export {};
24
+
25
+ // Abstract type that allows us to mark `next` as `abstract`
26
+ declare abstract class Iterator<T, TResult = undefined, TNext = unknown> { // eslint-disable-line @typescript-eslint/no-unsafe-declaration-merging
27
+ abstract next(value?: TNext): IteratorResult<T, TResult>;
28
+ }
29
+
30
+ // Merge all members of `IteratorObject<T>` into `Iterator<T>`
31
+ interface Iterator<T, TResult, TNext> extends globalThis.IteratorObject<T, TResult, TNext> {}
32
+
33
+ // Capture the `Iterator` constructor in a type we can use in the `extends` clause of `IteratorConstructor`.
34
+ type IteratorObjectConstructor = typeof Iterator;
35
+
36
+ declare global {
37
+ // Global `IteratorObject<T, TReturn, TNext>` interface that can be augmented by polyfills
38
+ interface IteratorObject<T, TReturn, TNext> {
39
+ /**
40
+ * Returns this iterator.
41
+ */
42
+ [Symbol.iterator](): IteratorObject<T, TReturn, TNext>;
43
+
44
+ /**
45
+ * Creates an iterator whose values are the result of applying the callback to the values from this iterator.
46
+ * @param callbackfn A function that accepts up to two arguments to be used to transform values from the underlying iterator.
47
+ */
48
+ map<U>(callbackfn: (value: T, index: number) => U): IteratorObject<U, undefined, unknown>;
49
+
50
+ /**
51
+ * Creates an iterator whose values are those from this iterator for which the provided predicate returns true.
52
+ * @param predicate A function that accepts up to two arguments to be used to test values from the underlying iterator.
53
+ */
54
+ filter<S extends T>(predicate: (value: T, index: number) => value is S): IteratorObject<S, undefined, unknown>;
55
+
56
+ /**
57
+ * Creates an iterator whose values are those from this iterator for which the provided predicate returns true.
58
+ * @param predicate A function that accepts up to two arguments to be used to test values from the underlying iterator.
59
+ */
60
+ filter(predicate: (value: T, index: number) => unknown): IteratorObject<T, undefined, unknown>;
61
+
62
+ /**
63
+ * Creates an iterator whose values are the values from this iterator, stopping once the provided limit is reached.
64
+ * @param limit The maximum number of values to yield.
65
+ */
66
+ take(limit: number): IteratorObject<T, undefined, unknown>;
67
+
68
+ /**
69
+ * Creates an iterator whose values are the values from this iterator after skipping the provided count.
70
+ * @param count The number of values to drop.
71
+ */
72
+ drop(count: number): IteratorObject<T, undefined, unknown>;
73
+
74
+ /**
75
+ * Creates an iterator whose values are the result of applying the callback to the values from this iterator and then flattening the resulting iterators or iterables.
76
+ * @param callback A function that accepts up to two arguments to be used to transform values from the underlying iterator into new iterators or iterables to be flattened into the result.
77
+ */
78
+ flatMap<U>(callback: (value: T, index: number) => Iterator<U, unknown, undefined> | Iterable<U, unknown, undefined>): IteratorObject<U, undefined, unknown>;
79
+
80
+ /**
81
+ * Calls the specified callback function for all the elements in this iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
82
+ * @param callbackfn A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the iterator.
83
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of a value from the iterator.
84
+ */
85
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T): T;
86
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T, initialValue: T): T;
87
+
88
+ /**
89
+ * Calls the specified callback function for all the elements in this iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
90
+ * @param callbackfn A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the iterator.
91
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of a value from the iterator.
92
+ */
93
+ reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U, initialValue: U): U;
94
+
95
+ /**
96
+ * Creates a new array from the values yielded by this iterator.
97
+ */
98
+ toArray(): T[];
99
+
100
+ /**
101
+ * Performs the specified action for each element in the iterator.
102
+ * @param callbackfn A function that accepts up to two arguments. forEach calls the callbackfn function one time for each element in the iterator.
103
+ */
104
+ forEach(callbackfn: (value: T, index: number) => void): void;
105
+
106
+ /**
107
+ * Determines whether the specified callback function returns true for any element of this iterator.
108
+ * @param predicate A function that accepts up to two arguments. The some method calls
109
+ * the predicate function for each element in this iterator until the predicate returns a value
110
+ * true, or until the end of the iterator.
111
+ */
112
+ some(predicate: (value: T, index: number) => unknown): boolean;
113
+
114
+ /**
115
+ * Determines whether all the members of this iterator satisfy the specified test.
116
+ * @param predicate A function that accepts up to two arguments. The every method calls
117
+ * the predicate function for each element in this iterator until the predicate returns
118
+ * false, or until the end of this iterator.
119
+ */
120
+ every(predicate: (value: T, index: number) => unknown): boolean;
121
+
122
+ /**
123
+ * Returns the value of the first element in this iterator where predicate is true, and undefined
124
+ * otherwise.
125
+ * @param predicate find calls predicate once for each element of this iterator, in
126
+ * order, until it finds one where predicate returns true. If such an element is found, find
127
+ * immediately returns that element value. Otherwise, find returns undefined.
128
+ */
129
+ find<S extends T>(predicate: (value: T, index: number) => value is S): S | undefined;
130
+ find(predicate: (value: T, index: number) => unknown): T | undefined;
131
+
132
+ readonly [Symbol.toStringTag]: string;
133
+ }
134
+
135
+ // Global `IteratorConstructor` interface that can be augmented by polyfills
136
+ interface IteratorConstructor extends IteratorObjectConstructor {
137
+ /**
138
+ * Creates a native iterator from an iterator or iterable object.
139
+ * Returns its input if the input already inherits from the built-in Iterator class.
140
+ * @param value An iterator or iterable object to convert a native iterator.
141
+ */
142
+ from<T>(value: Iterator<T, unknown, undefined> | Iterable<T, unknown, undefined>): IteratorObject<T, undefined, unknown>;
143
+ }
144
+
145
+ var Iterator: IteratorConstructor;
146
+ }
@@ -0,0 +1,32 @@
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
+ MERCHANTABILITY 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
+ interface PromiseConstructor {
18
+ /**
19
+ * Takes a callback of any kind (returns or throws, synchronously or asynchronously) and wraps its result
20
+ * in a Promise.
21
+ *
22
+ * @param callbackFn A function that is called synchronously. It can do anything: either return
23
+ * a value, throw an error, or return a promise.
24
+ * @param args Additional arguments, that will be passed to the callback.
25
+ *
26
+ * @returns A Promise that is:
27
+ * - Already fulfilled, if the callback synchronously returns a value.
28
+ * - Already rejected, if the callback synchronously throws an error.
29
+ * - Asynchronously fulfilled or rejected, if the callback returns a promise.
30
+ */
31
+ try<T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U): Promise<Awaited<T>>;
32
+ }
@@ -0,0 +1,30 @@
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
+ MERCHANTABILITY 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
+ interface RegExpConstructor {
18
+ /**
19
+ * Escapes any RegExp syntax characters in the input string, returning a
20
+ * new string that can be safely interpolated into a RegExp as a literal
21
+ * string to match.
22
+ * @example
23
+ * ```ts
24
+ * const regExp = new RegExp(RegExp.escape("foo.bar"));
25
+ * regExp.test("foo.bar"); // true
26
+ * regExp.test("foo!bar"); // false
27
+ * ```
28
+ */
29
+ escape(string: string): string;
30
+ }