@pinuts/bsr-uikit-relaunch 0.2.39 → 0.2.40

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 (186) hide show
  1. package/dist/hooks/withFieldGroup.d.ts.map +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.LICENSE.txt +2 -2
  4. package/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +2 -2
  5. package/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +1 -1
  6. package/node_modules/@babel/runtime/helpers/esm/superPropGet.js +4 -4
  7. package/node_modules/@babel/runtime/helpers/esm/superPropSet.js +2 -2
  8. package/node_modules/@babel/runtime/helpers/esm/tsRewriteRelativeImportExtensions.js +6 -0
  9. package/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +4 -3
  10. package/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +2 -2
  11. package/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +1 -1
  12. package/node_modules/@babel/runtime/helpers/superPropGet.js +4 -4
  13. package/node_modules/@babel/runtime/helpers/superPropSet.js +2 -2
  14. package/node_modules/@babel/runtime/helpers/tsRewriteRelativeImportExtensions.js +6 -0
  15. package/node_modules/@babel/runtime/helpers/wrapRegExp.js +4 -3
  16. package/node_modules/@babel/runtime/package.json +10 -1
  17. package/node_modules/@types/hoist-non-react-statics/README.md +13 -13
  18. package/node_modules/@types/hoist-non-react-statics/index.d.ts +12 -12
  19. package/node_modules/@types/hoist-non-react-statics/package.json +4 -3
  20. package/node_modules/@types/react/README.md +3 -3
  21. package/node_modules/@types/react/canary.d.ts +0 -122
  22. package/node_modules/@types/react/compiler-runtime.d.ts +4 -0
  23. package/node_modules/@types/react/experimental.d.ts +118 -4
  24. package/node_modules/@types/react/global.d.ts +4 -0
  25. package/node_modules/@types/react/index.d.ts +468 -770
  26. package/node_modules/@types/react/package.json +9 -9
  27. package/node_modules/@types/react/ts5.0/canary.d.ts +0 -122
  28. package/node_modules/@types/react/ts5.0/experimental.d.ts +118 -4
  29. package/node_modules/@types/react/ts5.0/global.d.ts +4 -0
  30. package/node_modules/@types/react/ts5.0/index.d.ts +464 -766
  31. package/node_modules/@types/react/ts5.0/v18/global.d.ts +160 -0
  32. package/node_modules/@types/react/ts5.0/v18/index.d.ts +4543 -0
  33. package/node_modules/@types/react/ts5.0/v18/jsx-dev-runtime.d.ts +45 -0
  34. package/node_modules/@types/react/ts5.0/v18/jsx-runtime.d.ts +36 -0
  35. package/node_modules/@types/react/ts5.0/v18/ts5.0/global.d.ts +160 -0
  36. package/node_modules/@types/react/ts5.0/v18/ts5.0/index.d.ts +4530 -0
  37. package/node_modules/@types/react/ts5.0/v18/ts5.0/jsx-dev-runtime.d.ts +44 -0
  38. package/node_modules/@types/react/ts5.0/v18/ts5.0/jsx-runtime.d.ts +35 -0
  39. package/node_modules/tslib/modules/index.d.ts +1 -0
  40. package/node_modules/tslib/modules/index.js +2 -0
  41. package/node_modules/tslib/package.json +1 -1
  42. package/node_modules/tslib/tslib.d.ts +7 -0
  43. package/node_modules/tslib/tslib.es6.js +24 -1
  44. package/node_modules/tslib/tslib.es6.mjs +24 -1
  45. package/node_modules/tslib/tslib.js +56 -1
  46. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/README.md +1 -1
  47. package/node_modules/{@pinuts/form-builder/node_modules/typescript/lib/tsc.js → typescript/lib/_tsc.js} +4349 -2310
  48. package/node_modules/{@pinuts/form-builder/node_modules/typescript/lib/tsserver.js → typescript/lib/_tsserver.js} +44 -8
  49. package/node_modules/{@pinuts/form-builder/node_modules/typescript/lib/typingsInstaller.js → typescript/lib/_typingsInstaller.js} +2 -16
  50. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/cs/diagnosticMessages.generated.json +30 -12
  51. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/de/diagnosticMessages.generated.json +30 -12
  52. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/es/diagnosticMessages.generated.json +30 -12
  53. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/fr/diagnosticMessages.generated.json +30 -12
  54. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/it/diagnosticMessages.generated.json +30 -12
  55. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/ja/diagnosticMessages.generated.json +30 -12
  56. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/ko/diagnosticMessages.generated.json +30 -12
  57. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.decorators.d.ts +13 -15
  58. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.dom.d.ts +1884 -361
  59. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.dom.iterable.d.ts +9 -7
  60. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2015.core.d.ts +9 -9
  61. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2015.iterable.d.ts +114 -36
  62. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2015.symbol.wellknown.d.ts +10 -10
  63. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2016.array.include.d.ts +9 -9
  64. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2016.intl.d.ts +1 -1
  65. package/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
  66. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2017.d.ts +3 -2
  67. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2017.sharedmemory.d.ts +14 -14
  68. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2017.typedarrays.d.ts +9 -9
  69. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2020.bigint.d.ts +92 -54
  70. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2020.intl.d.ts +36 -36
  71. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2020.sharedmemory.d.ts +13 -11
  72. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2020.string.d.ts +2 -0
  73. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2021.intl.d.ts +17 -17
  74. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2021.weakref.d.ts +2 -0
  75. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2022.array.d.ts +11 -11
  76. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2022.d.ts +1 -2
  77. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2022.error.d.ts +2 -0
  78. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2022.intl.d.ts +9 -9
  79. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2023.array.d.ts +79 -79
  80. package/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
  81. package/node_modules/typescript/lib/lib.es2024.collection.d.ts +29 -0
  82. package/node_modules/typescript/lib/lib.es2024.d.ts +26 -0
  83. package/node_modules/typescript/lib/lib.es2024.full.d.ts +24 -0
  84. package/node_modules/{@pinuts/form-builder/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts → typescript/lib/lib.es2024.sharedmemory.d.ts} +29 -0
  85. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es5.d.ts +312 -303
  86. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.esnext.array.d.ts +1 -1
  87. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.esnext.collection.d.ts +1 -11
  88. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.esnext.d.ts +3 -5
  89. package/node_modules/typescript/lib/lib.esnext.float16.d.ts +443 -0
  90. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.esnext.iterator.d.ts +1 -1
  91. package/node_modules/typescript/lib/lib.esnext.promise.d.ts +34 -0
  92. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.webworker.d.ts +571 -87
  93. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.webworker.iterable.d.ts +6 -7
  94. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/pl/diagnosticMessages.generated.json +30 -12
  95. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/pt-br/diagnosticMessages.generated.json +30 -12
  96. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/ru/diagnosticMessages.generated.json +30 -12
  97. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/tr/diagnosticMessages.generated.json +30 -12
  98. package/node_modules/typescript/lib/tsc.js +8 -0
  99. package/node_modules/typescript/lib/tsserver.js +8 -0
  100. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/typesMap.json +497 -497
  101. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/typescript.d.ts +95 -24
  102. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/typescript.js +6556 -3509
  103. package/node_modules/typescript/lib/typingsInstaller.js +8 -0
  104. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/zh-cn/diagnosticMessages.generated.json +31 -13
  105. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/zh-tw/diagnosticMessages.generated.json +30 -12
  106. package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/package.json +27 -28
  107. package/package.json +3 -3
  108. package/node_modules/@pinuts/form-builder/node_modules/typescript/lib/cancellationToken.js +0 -90
  109. package/node_modules/@types/prop-types/LICENSE +0 -21
  110. package/node_modules/@types/prop-types/README.md +0 -15
  111. package/node_modules/@types/prop-types/index.d.ts +0 -114
  112. package/node_modules/@types/prop-types/package.json +0 -35
  113. /package/node_modules/{regenerator-runtime → @babel/runtime/node_modules/regenerator-runtime}/LICENSE +0 -0
  114. /package/node_modules/{regenerator-runtime → @babel/runtime/node_modules/regenerator-runtime}/README.md +0 -0
  115. /package/node_modules/{regenerator-runtime → @babel/runtime/node_modules/regenerator-runtime}/package.json +0 -0
  116. /package/node_modules/{regenerator-runtime → @babel/runtime/node_modules/regenerator-runtime}/path.js +0 -0
  117. /package/node_modules/{regenerator-runtime → @babel/runtime/node_modules/regenerator-runtime}/runtime.js +0 -0
  118. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/LICENSE.txt +0 -0
  119. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/SECURITY.md +0 -0
  120. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/ThirdPartyNoticeText.txt +0 -0
  121. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/bin/tsc +0 -0
  122. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/bin/tsserver +0 -0
  123. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.d.ts +0 -0
  124. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.decorators.legacy.d.ts +0 -0
  125. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.dom.asynciterable.d.ts +0 -0
  126. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2015.collection.d.ts +0 -0
  127. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2015.d.ts +0 -0
  128. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2015.generator.d.ts +0 -0
  129. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2015.promise.d.ts +0 -0
  130. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2015.proxy.d.ts +0 -0
  131. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2015.reflect.d.ts +0 -0
  132. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2015.symbol.d.ts +0 -0
  133. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2016.d.ts +0 -0
  134. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2016.full.d.ts +0 -0
  135. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2017.date.d.ts +0 -0
  136. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2017.full.d.ts +0 -0
  137. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2017.intl.d.ts +0 -0
  138. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2017.object.d.ts +0 -0
  139. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2017.string.d.ts +0 -0
  140. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2018.asyncgenerator.d.ts +0 -0
  141. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2018.asynciterable.d.ts +0 -0
  142. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2018.d.ts +0 -0
  143. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2018.full.d.ts +0 -0
  144. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2018.intl.d.ts +0 -0
  145. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2018.promise.d.ts +0 -0
  146. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2018.regexp.d.ts +0 -0
  147. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2019.array.d.ts +0 -0
  148. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2019.d.ts +0 -0
  149. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2019.full.d.ts +0 -0
  150. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2019.intl.d.ts +0 -0
  151. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2019.object.d.ts +0 -0
  152. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2019.string.d.ts +0 -0
  153. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2019.symbol.d.ts +0 -0
  154. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2020.d.ts +0 -0
  155. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2020.date.d.ts +0 -0
  156. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2020.full.d.ts +0 -0
  157. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2020.number.d.ts +0 -0
  158. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2020.promise.d.ts +0 -0
  159. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2020.symbol.wellknown.d.ts +0 -0
  160. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2021.d.ts +0 -0
  161. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2021.full.d.ts +0 -0
  162. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2021.promise.d.ts +0 -0
  163. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2021.string.d.ts +0 -0
  164. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2022.full.d.ts +0 -0
  165. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2022.object.d.ts +0 -0
  166. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2022.regexp.d.ts +0 -0
  167. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2022.string.d.ts +0 -0
  168. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2023.collection.d.ts +0 -0
  169. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2023.d.ts +0 -0
  170. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2023.full.d.ts +0 -0
  171. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es2023.intl.d.ts +0 -0
  172. /package/node_modules/{@pinuts/form-builder/node_modules/typescript/lib/lib.esnext.object.d.ts → typescript/lib/lib.es2024.object.d.ts} +0 -0
  173. /package/node_modules/{@pinuts/form-builder/node_modules/typescript/lib/lib.esnext.promise.d.ts → typescript/lib/lib.es2024.promise.d.ts} +0 -0
  174. /package/node_modules/{@pinuts/form-builder/node_modules/typescript/lib/lib.esnext.regexp.d.ts → typescript/lib/lib.es2024.regexp.d.ts} +0 -0
  175. /package/node_modules/{@pinuts/form-builder/node_modules/typescript/lib/lib.esnext.string.d.ts → typescript/lib/lib.es2024.string.d.ts} +0 -0
  176. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.es6.d.ts +0 -0
  177. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.esnext.decorators.d.ts +0 -0
  178. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.esnext.disposable.d.ts +0 -0
  179. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.esnext.full.d.ts +0 -0
  180. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.esnext.intl.d.ts +0 -0
  181. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.scripthost.d.ts +0 -0
  182. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.webworker.asynciterable.d.ts +0 -0
  183. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/lib.webworker.importscripts.d.ts +0 -0
  184. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/tsserverlibrary.d.ts +0 -0
  185. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/tsserverlibrary.js +0 -0
  186. /package/node_modules/{@pinuts/form-builder/node_modules/typescript → typescript}/lib/watchGuard.js +0 -0
@@ -696,7 +696,7 @@ interface Math {
696
696
  */
697
697
  atan(x: number): number;
698
698
  /**
699
- * Returns the angle (in radians) from the X axis to a point.
699
+ * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point.
700
700
  * @param y A numeric expression representing the cartesian y-coordinate.
701
701
  * @param x A numeric expression representing the cartesian x-coordinate.
702
702
  */
@@ -1260,8 +1260,8 @@ interface ReadonlyArray<T> {
1260
1260
  some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean;
1261
1261
  /**
1262
1262
  * Performs the specified action for each element in an array.
1263
- * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
1264
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1263
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
1264
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1265
1265
  */
1266
1266
  forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void;
1267
1267
  /**
@@ -1384,7 +1384,7 @@ interface Array<T> {
1384
1384
  * This method mutates the array and returns a reference to the same array.
1385
1385
  * @param compareFn Function used to determine the order of the elements. It is expected to return
1386
1386
  * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
1387
- * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
1387
+ * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order.
1388
1388
  * ```ts
1389
1389
  * [11,2,22,1].sort((a, b) => a - b)
1390
1390
  * ```
@@ -1451,8 +1451,8 @@ interface Array<T> {
1451
1451
  some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean;
1452
1452
  /**
1453
1453
  * Performs the specified action for each element in an array.
1454
- * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
1455
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1454
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
1455
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1456
1456
  */
1457
1457
  forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
1458
1458
  /**
@@ -1701,7 +1701,7 @@ interface ArrayBuffer {
1701
1701
  /**
1702
1702
  * Returns a section of an ArrayBuffer.
1703
1703
  */
1704
- slice(begin: number, end?: number): ArrayBuffer;
1704
+ slice(begin?: number, end?: number): ArrayBuffer;
1705
1705
  }
1706
1706
 
1707
1707
  /**
@@ -1719,25 +1719,25 @@ interface ArrayBufferConstructor {
1719
1719
  }
1720
1720
  declare var ArrayBuffer: ArrayBufferConstructor;
1721
1721
 
1722
- interface ArrayBufferView {
1722
+ interface ArrayBufferView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
1723
1723
  /**
1724
1724
  * The ArrayBuffer instance referenced by the array.
1725
1725
  */
1726
- buffer: ArrayBufferLike;
1726
+ readonly buffer: TArrayBuffer;
1727
1727
 
1728
1728
  /**
1729
1729
  * The length in bytes of the array.
1730
1730
  */
1731
- byteLength: number;
1731
+ readonly byteLength: number;
1732
1732
 
1733
1733
  /**
1734
1734
  * The offset in bytes of the array.
1735
1735
  */
1736
- byteOffset: number;
1736
+ readonly byteOffset: number;
1737
1737
  }
1738
1738
 
1739
- interface DataView {
1740
- readonly buffer: ArrayBuffer;
1739
+ interface DataView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
1740
+ readonly buffer: TArrayBuffer;
1741
1741
  readonly byteLength: number;
1742
1742
  readonly byteOffset: number;
1743
1743
  /**
@@ -1863,10 +1863,9 @@ interface DataView {
1863
1863
  */
1864
1864
  setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
1865
1865
  }
1866
-
1867
1866
  interface DataViewConstructor {
1868
- readonly prototype: DataView;
1869
- new (buffer: ArrayBufferLike & { BYTES_PER_ELEMENT?: never; }, byteOffset?: number, byteLength?: number): DataView;
1867
+ readonly prototype: DataView<ArrayBufferLike>;
1868
+ new <TArrayBuffer extends ArrayBufferLike & { BYTES_PER_ELEMENT?: never; }>(buffer: TArrayBuffer, byteOffset?: number, byteLength?: number): DataView<TArrayBuffer>;
1870
1869
  }
1871
1870
  declare var DataView: DataViewConstructor;
1872
1871
 
@@ -1874,7 +1873,7 @@ declare var DataView: DataViewConstructor;
1874
1873
  * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
1875
1874
  * number of bytes could not be allocated an exception is raised.
1876
1875
  */
1877
- interface Int8Array {
1876
+ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
1878
1877
  /**
1879
1878
  * The size in bytes of each element in the array.
1880
1879
  */
@@ -1883,7 +1882,7 @@ interface Int8Array {
1883
1882
  /**
1884
1883
  * The ArrayBuffer instance referenced by the array.
1885
1884
  */
1886
- readonly buffer: ArrayBufferLike;
1885
+ readonly buffer: TArrayBuffer;
1887
1886
 
1888
1887
  /**
1889
1888
  * The length in bytes of the array.
@@ -1914,7 +1913,7 @@ interface Int8Array {
1914
1913
  * @param thisArg An object to which the this keyword can refer in the predicate function.
1915
1914
  * If thisArg is omitted, undefined is used as the this value.
1916
1915
  */
1917
- every(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean;
1916
+ every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
1918
1917
 
1919
1918
  /**
1920
1919
  * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
@@ -1933,7 +1932,7 @@ interface Int8Array {
1933
1932
  * @param thisArg An object to which the this keyword can refer in the predicate function.
1934
1933
  * If thisArg is omitted, undefined is used as the this value.
1935
1934
  */
1936
- filter(predicate: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array;
1935
+ filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array<ArrayBuffer>;
1937
1936
 
1938
1937
  /**
1939
1938
  * Returns the value of the first element in the array where predicate is true, and undefined
@@ -1944,7 +1943,7 @@ interface Int8Array {
1944
1943
  * @param thisArg If provided, it will be used as the this value for each invocation of
1945
1944
  * predicate. If it is not provided, undefined is used instead.
1946
1945
  */
1947
- find(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number | undefined;
1946
+ find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined;
1948
1947
 
1949
1948
  /**
1950
1949
  * Returns the index of the first element in the array where predicate is true, and -1
@@ -1955,22 +1954,22 @@ interface Int8Array {
1955
1954
  * @param thisArg If provided, it will be used as the this value for each invocation of
1956
1955
  * predicate. If it is not provided, undefined is used instead.
1957
1956
  */
1958
- findIndex(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number;
1957
+ findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number;
1959
1958
 
1960
1959
  /**
1961
1960
  * Performs the specified action for each element in an array.
1962
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
1961
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
1963
1962
  * callbackfn function one time for each element in the array.
1964
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
1963
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
1965
1964
  * If thisArg is omitted, undefined is used as the this value.
1966
1965
  */
1967
- forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;
1966
+ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;
1968
1967
 
1969
1968
  /**
1970
1969
  * Returns the index of the first occurrence of a value in an array.
1971
1970
  * @param searchElement The value to locate in the array.
1972
1971
  * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
1973
- * search starts at index 0.
1972
+ * search starts at index 0.
1974
1973
  */
1975
1974
  indexOf(searchElement: number, fromIndex?: number): number;
1976
1975
 
@@ -2002,7 +2001,7 @@ interface Int8Array {
2002
2001
  * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2003
2002
  * If thisArg is omitted, undefined is used as the this value.
2004
2003
  */
2005
- map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;
2004
+ map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array<ArrayBuffer>;
2006
2005
 
2007
2006
  /**
2008
2007
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -2014,8 +2013,8 @@ interface Int8Array {
2014
2013
  * the accumulation. The first call to the callbackfn function provides this value as an argument
2015
2014
  * instead of an array value.
2016
2015
  */
2017
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number;
2018
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number;
2016
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
2017
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
2019
2018
 
2020
2019
  /**
2021
2020
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -2027,7 +2026,7 @@ interface Int8Array {
2027
2026
  * the accumulation. The first call to the callbackfn function provides this value as an argument
2028
2027
  * instead of an array value.
2029
2028
  */
2030
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
2029
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
2031
2030
 
2032
2031
  /**
2033
2032
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -2039,8 +2038,8 @@ interface Int8Array {
2039
2038
  * the accumulation. The first call to the callbackfn function provides this value as an
2040
2039
  * argument instead of an array value.
2041
2040
  */
2042
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number;
2043
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number;
2041
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
2042
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
2044
2043
 
2045
2044
  /**
2046
2045
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -2052,12 +2051,12 @@ interface Int8Array {
2052
2051
  * the accumulation. The first call to the callbackfn function provides this value as an argument
2053
2052
  * instead of an array value.
2054
2053
  */
2055
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
2054
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
2056
2055
 
2057
2056
  /**
2058
2057
  * Reverses the elements in an Array.
2059
2058
  */
2060
- reverse(): Int8Array;
2059
+ reverse(): this;
2061
2060
 
2062
2061
  /**
2063
2062
  * Sets a value or an array of values.
@@ -2071,7 +2070,7 @@ interface Int8Array {
2071
2070
  * @param start The beginning of the specified portion of the array.
2072
2071
  * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
2073
2072
  */
2074
- slice(start?: number, end?: number): Int8Array;
2073
+ slice(start?: number, end?: number): Int8Array<ArrayBuffer>;
2075
2074
 
2076
2075
  /**
2077
2076
  * Determines whether the specified callback function returns true for any element of an array.
@@ -2081,7 +2080,7 @@ interface Int8Array {
2081
2080
  * @param thisArg An object to which the this keyword can refer in the predicate function.
2082
2081
  * If thisArg is omitted, undefined is used as the this value.
2083
2082
  */
2084
- some(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean;
2083
+ some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
2085
2084
 
2086
2085
  /**
2087
2086
  * Sorts an array.
@@ -2100,7 +2099,7 @@ interface Int8Array {
2100
2099
  * @param begin The index of the beginning of the array.
2101
2100
  * @param end The index of the end of the array.
2102
2101
  */
2103
- subarray(begin?: number, end?: number): Int8Array;
2102
+ subarray(begin?: number, end?: number): Int8Array<TArrayBuffer>;
2104
2103
 
2105
2104
  /**
2106
2105
  * Converts a number to a string by using the current locale.
@@ -2113,15 +2112,17 @@ interface Int8Array {
2113
2112
  toString(): string;
2114
2113
 
2115
2114
  /** Returns the primitive value of the specified object. */
2116
- valueOf(): Int8Array;
2115
+ valueOf(): this;
2117
2116
 
2118
2117
  [index: number]: number;
2119
2118
  }
2120
2119
  interface Int8ArrayConstructor {
2121
- readonly prototype: Int8Array;
2122
- new (length: number): Int8Array;
2123
- new (array: ArrayLike<number> | ArrayBufferLike): Int8Array;
2124
- new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array;
2120
+ readonly prototype: Int8Array<ArrayBufferLike>;
2121
+ new (length: number): Int8Array<ArrayBuffer>;
2122
+ new (array: ArrayLike<number>): Int8Array<ArrayBuffer>;
2123
+ new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array<TArrayBuffer>;
2124
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array<ArrayBuffer>;
2125
+ new (array: ArrayLike<number> | ArrayBuffer): Int8Array<ArrayBuffer>;
2125
2126
 
2126
2127
  /**
2127
2128
  * The size in bytes of each element in the array.
@@ -2132,21 +2133,21 @@ interface Int8ArrayConstructor {
2132
2133
  * Returns a new array from a set of elements.
2133
2134
  * @param items A set of elements to include in the new array object.
2134
2135
  */
2135
- of(...items: number[]): Int8Array;
2136
+ of(...items: number[]): Int8Array<ArrayBuffer>;
2136
2137
 
2137
2138
  /**
2138
2139
  * Creates an array from an array-like or iterable object.
2139
- * @param arrayLike An array-like or iterable object to convert to an array.
2140
+ * @param arrayLike An array-like object to convert to an array.
2140
2141
  */
2141
- from(arrayLike: ArrayLike<number>): Int8Array;
2142
+ from(arrayLike: ArrayLike<number>): Int8Array<ArrayBuffer>;
2142
2143
 
2143
2144
  /**
2144
2145
  * Creates an array from an array-like or iterable object.
2145
- * @param arrayLike An array-like or iterable object to convert to an array.
2146
+ * @param arrayLike An array-like object to convert to an array.
2146
2147
  * @param mapfn A mapping function to call on every element of the array.
2147
2148
  * @param thisArg Value of 'this' used to invoke the mapfn.
2148
2149
  */
2149
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array;
2150
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array<ArrayBuffer>;
2150
2151
  }
2151
2152
  declare var Int8Array: Int8ArrayConstructor;
2152
2153
 
@@ -2154,7 +2155,7 @@ declare var Int8Array: Int8ArrayConstructor;
2154
2155
  * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
2155
2156
  * requested number of bytes could not be allocated an exception is raised.
2156
2157
  */
2157
- interface Uint8Array {
2158
+ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
2158
2159
  /**
2159
2160
  * The size in bytes of each element in the array.
2160
2161
  */
@@ -2163,7 +2164,7 @@ interface Uint8Array {
2163
2164
  /**
2164
2165
  * The ArrayBuffer instance referenced by the array.
2165
2166
  */
2166
- readonly buffer: ArrayBufferLike;
2167
+ readonly buffer: TArrayBuffer;
2167
2168
 
2168
2169
  /**
2169
2170
  * The length in bytes of the array.
@@ -2194,7 +2195,7 @@ interface Uint8Array {
2194
2195
  * @param thisArg An object to which the this keyword can refer in the predicate function.
2195
2196
  * If thisArg is omitted, undefined is used as the this value.
2196
2197
  */
2197
- every(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean;
2198
+ every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
2198
2199
 
2199
2200
  /**
2200
2201
  * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
@@ -2213,7 +2214,7 @@ interface Uint8Array {
2213
2214
  * @param thisArg An object to which the this keyword can refer in the predicate function.
2214
2215
  * If thisArg is omitted, undefined is used as the this value.
2215
2216
  */
2216
- filter(predicate: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array;
2217
+ filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array<ArrayBuffer>;
2217
2218
 
2218
2219
  /**
2219
2220
  * Returns the value of the first element in the array where predicate is true, and undefined
@@ -2224,7 +2225,7 @@ interface Uint8Array {
2224
2225
  * @param thisArg If provided, it will be used as the this value for each invocation of
2225
2226
  * predicate. If it is not provided, undefined is used instead.
2226
2227
  */
2227
- find(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number | undefined;
2228
+ find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined;
2228
2229
 
2229
2230
  /**
2230
2231
  * Returns the index of the first element in the array where predicate is true, and -1
@@ -2235,22 +2236,22 @@ interface Uint8Array {
2235
2236
  * @param thisArg If provided, it will be used as the this value for each invocation of
2236
2237
  * predicate. If it is not provided, undefined is used instead.
2237
2238
  */
2238
- findIndex(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number;
2239
+ findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number;
2239
2240
 
2240
2241
  /**
2241
2242
  * Performs the specified action for each element in an array.
2242
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
2243
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
2243
2244
  * callbackfn function one time for each element in the array.
2244
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2245
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2245
2246
  * If thisArg is omitted, undefined is used as the this value.
2246
2247
  */
2247
- forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;
2248
+ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;
2248
2249
 
2249
2250
  /**
2250
2251
  * Returns the index of the first occurrence of a value in an array.
2251
2252
  * @param searchElement The value to locate in the array.
2252
2253
  * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2253
- * search starts at index 0.
2254
+ * search starts at index 0.
2254
2255
  */
2255
2256
  indexOf(searchElement: number, fromIndex?: number): number;
2256
2257
 
@@ -2282,7 +2283,7 @@ interface Uint8Array {
2282
2283
  * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2283
2284
  * If thisArg is omitted, undefined is used as the this value.
2284
2285
  */
2285
- map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;
2286
+ map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array<ArrayBuffer>;
2286
2287
 
2287
2288
  /**
2288
2289
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -2294,8 +2295,8 @@ interface Uint8Array {
2294
2295
  * the accumulation. The first call to the callbackfn function provides this value as an argument
2295
2296
  * instead of an array value.
2296
2297
  */
2297
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number;
2298
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number;
2298
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
2299
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
2299
2300
 
2300
2301
  /**
2301
2302
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -2307,7 +2308,7 @@ interface Uint8Array {
2307
2308
  * the accumulation. The first call to the callbackfn function provides this value as an argument
2308
2309
  * instead of an array value.
2309
2310
  */
2310
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
2311
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
2311
2312
 
2312
2313
  /**
2313
2314
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -2319,8 +2320,8 @@ interface Uint8Array {
2319
2320
  * the accumulation. The first call to the callbackfn function provides this value as an
2320
2321
  * argument instead of an array value.
2321
2322
  */
2322
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number;
2323
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number;
2323
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
2324
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
2324
2325
 
2325
2326
  /**
2326
2327
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -2332,12 +2333,12 @@ interface Uint8Array {
2332
2333
  * the accumulation. The first call to the callbackfn function provides this value as an argument
2333
2334
  * instead of an array value.
2334
2335
  */
2335
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
2336
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
2336
2337
 
2337
2338
  /**
2338
2339
  * Reverses the elements in an Array.
2339
2340
  */
2340
- reverse(): Uint8Array;
2341
+ reverse(): this;
2341
2342
 
2342
2343
  /**
2343
2344
  * Sets a value or an array of values.
@@ -2351,7 +2352,7 @@ interface Uint8Array {
2351
2352
  * @param start The beginning of the specified portion of the array.
2352
2353
  * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
2353
2354
  */
2354
- slice(start?: number, end?: number): Uint8Array;
2355
+ slice(start?: number, end?: number): Uint8Array<ArrayBuffer>;
2355
2356
 
2356
2357
  /**
2357
2358
  * Determines whether the specified callback function returns true for any element of an array.
@@ -2361,7 +2362,7 @@ interface Uint8Array {
2361
2362
  * @param thisArg An object to which the this keyword can refer in the predicate function.
2362
2363
  * If thisArg is omitted, undefined is used as the this value.
2363
2364
  */
2364
- some(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean;
2365
+ some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
2365
2366
 
2366
2367
  /**
2367
2368
  * Sorts an array.
@@ -2380,7 +2381,7 @@ interface Uint8Array {
2380
2381
  * @param begin The index of the beginning of the array.
2381
2382
  * @param end The index of the end of the array.
2382
2383
  */
2383
- subarray(begin?: number, end?: number): Uint8Array;
2384
+ subarray(begin?: number, end?: number): Uint8Array<TArrayBuffer>;
2384
2385
 
2385
2386
  /**
2386
2387
  * Converts a number to a string by using the current locale.
@@ -2393,16 +2394,17 @@ interface Uint8Array {
2393
2394
  toString(): string;
2394
2395
 
2395
2396
  /** Returns the primitive value of the specified object. */
2396
- valueOf(): Uint8Array;
2397
+ valueOf(): this;
2397
2398
 
2398
2399
  [index: number]: number;
2399
2400
  }
2400
-
2401
2401
  interface Uint8ArrayConstructor {
2402
- readonly prototype: Uint8Array;
2403
- new (length: number): Uint8Array;
2404
- new (array: ArrayLike<number> | ArrayBufferLike): Uint8Array;
2405
- new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array;
2402
+ readonly prototype: Uint8Array<ArrayBufferLike>;
2403
+ new (length: number): Uint8Array<ArrayBuffer>;
2404
+ new (array: ArrayLike<number>): Uint8Array<ArrayBuffer>;
2405
+ new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array<TArrayBuffer>;
2406
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array<ArrayBuffer>;
2407
+ new (array: ArrayLike<number> | ArrayBuffer): Uint8Array<ArrayBuffer>;
2406
2408
 
2407
2409
  /**
2408
2410
  * The size in bytes of each element in the array.
@@ -2413,21 +2415,21 @@ interface Uint8ArrayConstructor {
2413
2415
  * Returns a new array from a set of elements.
2414
2416
  * @param items A set of elements to include in the new array object.
2415
2417
  */
2416
- of(...items: number[]): Uint8Array;
2418
+ of(...items: number[]): Uint8Array<ArrayBuffer>;
2417
2419
 
2418
2420
  /**
2419
2421
  * Creates an array from an array-like or iterable object.
2420
- * @param arrayLike An array-like or iterable object to convert to an array.
2422
+ * @param arrayLike An array-like object to convert to an array.
2421
2423
  */
2422
- from(arrayLike: ArrayLike<number>): Uint8Array;
2424
+ from(arrayLike: ArrayLike<number>): Uint8Array<ArrayBuffer>;
2423
2425
 
2424
2426
  /**
2425
2427
  * Creates an array from an array-like or iterable object.
2426
- * @param arrayLike An array-like or iterable object to convert to an array.
2428
+ * @param arrayLike An array-like object to convert to an array.
2427
2429
  * @param mapfn A mapping function to call on every element of the array.
2428
2430
  * @param thisArg Value of 'this' used to invoke the mapfn.
2429
2431
  */
2430
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array;
2432
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array<ArrayBuffer>;
2431
2433
  }
2432
2434
  declare var Uint8Array: Uint8ArrayConstructor;
2433
2435
 
@@ -2435,7 +2437,7 @@ declare var Uint8Array: Uint8ArrayConstructor;
2435
2437
  * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
2436
2438
  * If the requested number of bytes could not be allocated an exception is raised.
2437
2439
  */
2438
- interface Uint8ClampedArray {
2440
+ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
2439
2441
  /**
2440
2442
  * The size in bytes of each element in the array.
2441
2443
  */
@@ -2444,7 +2446,7 @@ interface Uint8ClampedArray {
2444
2446
  /**
2445
2447
  * The ArrayBuffer instance referenced by the array.
2446
2448
  */
2447
- readonly buffer: ArrayBufferLike;
2449
+ readonly buffer: TArrayBuffer;
2448
2450
 
2449
2451
  /**
2450
2452
  * The length in bytes of the array.
@@ -2475,7 +2477,7 @@ interface Uint8ClampedArray {
2475
2477
  * @param thisArg An object to which the this keyword can refer in the predicate function.
2476
2478
  * If thisArg is omitted, undefined is used as the this value.
2477
2479
  */
2478
- every(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean;
2480
+ every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
2479
2481
 
2480
2482
  /**
2481
2483
  * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
@@ -2494,7 +2496,7 @@ interface Uint8ClampedArray {
2494
2496
  * @param thisArg An object to which the this keyword can refer in the predicate function.
2495
2497
  * If thisArg is omitted, undefined is used as the this value.
2496
2498
  */
2497
- filter(predicate: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray;
2499
+ filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray<ArrayBuffer>;
2498
2500
 
2499
2501
  /**
2500
2502
  * Returns the value of the first element in the array where predicate is true, and undefined
@@ -2505,7 +2507,7 @@ interface Uint8ClampedArray {
2505
2507
  * @param thisArg If provided, it will be used as the this value for each invocation of
2506
2508
  * predicate. If it is not provided, undefined is used instead.
2507
2509
  */
2508
- find(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number | undefined;
2510
+ find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined;
2509
2511
 
2510
2512
  /**
2511
2513
  * Returns the index of the first element in the array where predicate is true, and -1
@@ -2516,22 +2518,22 @@ interface Uint8ClampedArray {
2516
2518
  * @param thisArg If provided, it will be used as the this value for each invocation of
2517
2519
  * predicate. If it is not provided, undefined is used instead.
2518
2520
  */
2519
- findIndex(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number;
2521
+ findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number;
2520
2522
 
2521
2523
  /**
2522
2524
  * Performs the specified action for each element in an array.
2523
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
2525
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
2524
2526
  * callbackfn function one time for each element in the array.
2525
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2527
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2526
2528
  * If thisArg is omitted, undefined is used as the this value.
2527
2529
  */
2528
- forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;
2530
+ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;
2529
2531
 
2530
2532
  /**
2531
2533
  * Returns the index of the first occurrence of a value in an array.
2532
2534
  * @param searchElement The value to locate in the array.
2533
2535
  * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2534
- * search starts at index 0.
2536
+ * search starts at index 0.
2535
2537
  */
2536
2538
  indexOf(searchElement: number, fromIndex?: number): number;
2537
2539
 
@@ -2563,7 +2565,7 @@ interface Uint8ClampedArray {
2563
2565
  * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2564
2566
  * If thisArg is omitted, undefined is used as the this value.
2565
2567
  */
2566
- map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;
2568
+ map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray<ArrayBuffer>;
2567
2569
 
2568
2570
  /**
2569
2571
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -2575,8 +2577,8 @@ interface Uint8ClampedArray {
2575
2577
  * the accumulation. The first call to the callbackfn function provides this value as an argument
2576
2578
  * instead of an array value.
2577
2579
  */
2578
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number;
2579
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number;
2580
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
2581
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
2580
2582
 
2581
2583
  /**
2582
2584
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -2588,7 +2590,7 @@ interface Uint8ClampedArray {
2588
2590
  * the accumulation. The first call to the callbackfn function provides this value as an argument
2589
2591
  * instead of an array value.
2590
2592
  */
2591
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
2593
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
2592
2594
 
2593
2595
  /**
2594
2596
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -2600,8 +2602,8 @@ interface Uint8ClampedArray {
2600
2602
  * the accumulation. The first call to the callbackfn function provides this value as an
2601
2603
  * argument instead of an array value.
2602
2604
  */
2603
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number;
2604
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number;
2605
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
2606
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
2605
2607
 
2606
2608
  /**
2607
2609
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -2613,12 +2615,12 @@ interface Uint8ClampedArray {
2613
2615
  * the accumulation. The first call to the callbackfn function provides this value as an argument
2614
2616
  * instead of an array value.
2615
2617
  */
2616
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
2618
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
2617
2619
 
2618
2620
  /**
2619
2621
  * Reverses the elements in an Array.
2620
2622
  */
2621
- reverse(): Uint8ClampedArray;
2623
+ reverse(): this;
2622
2624
 
2623
2625
  /**
2624
2626
  * Sets a value or an array of values.
@@ -2632,7 +2634,7 @@ interface Uint8ClampedArray {
2632
2634
  * @param start The beginning of the specified portion of the array.
2633
2635
  * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
2634
2636
  */
2635
- slice(start?: number, end?: number): Uint8ClampedArray;
2637
+ slice(start?: number, end?: number): Uint8ClampedArray<ArrayBuffer>;
2636
2638
 
2637
2639
  /**
2638
2640
  * Determines whether the specified callback function returns true for any element of an array.
@@ -2642,7 +2644,7 @@ interface Uint8ClampedArray {
2642
2644
  * @param thisArg An object to which the this keyword can refer in the predicate function.
2643
2645
  * If thisArg is omitted, undefined is used as the this value.
2644
2646
  */
2645
- some(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean;
2647
+ some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
2646
2648
 
2647
2649
  /**
2648
2650
  * Sorts an array.
@@ -2661,7 +2663,7 @@ interface Uint8ClampedArray {
2661
2663
  * @param begin The index of the beginning of the array.
2662
2664
  * @param end The index of the end of the array.
2663
2665
  */
2664
- subarray(begin?: number, end?: number): Uint8ClampedArray;
2666
+ subarray(begin?: number, end?: number): Uint8ClampedArray<TArrayBuffer>;
2665
2667
 
2666
2668
  /**
2667
2669
  * Converts a number to a string by using the current locale.
@@ -2674,16 +2676,17 @@ interface Uint8ClampedArray {
2674
2676
  toString(): string;
2675
2677
 
2676
2678
  /** Returns the primitive value of the specified object. */
2677
- valueOf(): Uint8ClampedArray;
2679
+ valueOf(): this;
2678
2680
 
2679
2681
  [index: number]: number;
2680
2682
  }
2681
-
2682
2683
  interface Uint8ClampedArrayConstructor {
2683
- readonly prototype: Uint8ClampedArray;
2684
- new (length: number): Uint8ClampedArray;
2685
- new (array: ArrayLike<number> | ArrayBufferLike): Uint8ClampedArray;
2686
- new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray;
2684
+ readonly prototype: Uint8ClampedArray<ArrayBufferLike>;
2685
+ new (length: number): Uint8ClampedArray<ArrayBuffer>;
2686
+ new (array: ArrayLike<number>): Uint8ClampedArray<ArrayBuffer>;
2687
+ new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray<TArrayBuffer>;
2688
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray<ArrayBuffer>;
2689
+ new (array: ArrayLike<number> | ArrayBuffer): Uint8ClampedArray<ArrayBuffer>;
2687
2690
 
2688
2691
  /**
2689
2692
  * The size in bytes of each element in the array.
@@ -2694,21 +2697,21 @@ interface Uint8ClampedArrayConstructor {
2694
2697
  * Returns a new array from a set of elements.
2695
2698
  * @param items A set of elements to include in the new array object.
2696
2699
  */
2697
- of(...items: number[]): Uint8ClampedArray;
2700
+ of(...items: number[]): Uint8ClampedArray<ArrayBuffer>;
2698
2701
 
2699
2702
  /**
2700
2703
  * Creates an array from an array-like or iterable object.
2701
- * @param arrayLike An array-like or iterable object to convert to an array.
2704
+ * @param arrayLike An array-like object to convert to an array.
2702
2705
  */
2703
- from(arrayLike: ArrayLike<number>): Uint8ClampedArray;
2706
+ from(arrayLike: ArrayLike<number>): Uint8ClampedArray<ArrayBuffer>;
2704
2707
 
2705
2708
  /**
2706
2709
  * Creates an array from an array-like or iterable object.
2707
- * @param arrayLike An array-like or iterable object to convert to an array.
2710
+ * @param arrayLike An array-like object to convert to an array.
2708
2711
  * @param mapfn A mapping function to call on every element of the array.
2709
2712
  * @param thisArg Value of 'this' used to invoke the mapfn.
2710
2713
  */
2711
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray;
2714
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray<ArrayBuffer>;
2712
2715
  }
2713
2716
  declare var Uint8ClampedArray: Uint8ClampedArrayConstructor;
2714
2717
 
@@ -2716,7 +2719,7 @@ declare var Uint8ClampedArray: Uint8ClampedArrayConstructor;
2716
2719
  * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
2717
2720
  * requested number of bytes could not be allocated an exception is raised.
2718
2721
  */
2719
- interface Int16Array {
2722
+ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
2720
2723
  /**
2721
2724
  * The size in bytes of each element in the array.
2722
2725
  */
@@ -2725,7 +2728,7 @@ interface Int16Array {
2725
2728
  /**
2726
2729
  * The ArrayBuffer instance referenced by the array.
2727
2730
  */
2728
- readonly buffer: ArrayBufferLike;
2731
+ readonly buffer: TArrayBuffer;
2729
2732
 
2730
2733
  /**
2731
2734
  * The length in bytes of the array.
@@ -2756,7 +2759,7 @@ interface Int16Array {
2756
2759
  * @param thisArg An object to which the this keyword can refer in the predicate function.
2757
2760
  * If thisArg is omitted, undefined is used as the this value.
2758
2761
  */
2759
- every(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean;
2762
+ every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
2760
2763
 
2761
2764
  /**
2762
2765
  * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
@@ -2775,7 +2778,7 @@ interface Int16Array {
2775
2778
  * @param thisArg An object to which the this keyword can refer in the predicate function.
2776
2779
  * If thisArg is omitted, undefined is used as the this value.
2777
2780
  */
2778
- filter(predicate: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array;
2781
+ filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array<ArrayBuffer>;
2779
2782
 
2780
2783
  /**
2781
2784
  * Returns the value of the first element in the array where predicate is true, and undefined
@@ -2786,7 +2789,7 @@ interface Int16Array {
2786
2789
  * @param thisArg If provided, it will be used as the this value for each invocation of
2787
2790
  * predicate. If it is not provided, undefined is used instead.
2788
2791
  */
2789
- find(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number | undefined;
2792
+ find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined;
2790
2793
 
2791
2794
  /**
2792
2795
  * Returns the index of the first element in the array where predicate is true, and -1
@@ -2797,21 +2800,21 @@ interface Int16Array {
2797
2800
  * @param thisArg If provided, it will be used as the this value for each invocation of
2798
2801
  * predicate. If it is not provided, undefined is used instead.
2799
2802
  */
2800
- findIndex(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number;
2803
+ findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number;
2801
2804
 
2802
2805
  /**
2803
2806
  * Performs the specified action for each element in an array.
2804
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
2807
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
2805
2808
  * callbackfn function one time for each element in the array.
2806
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2809
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2807
2810
  * If thisArg is omitted, undefined is used as the this value.
2808
2811
  */
2809
- forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;
2812
+ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;
2810
2813
  /**
2811
2814
  * Returns the index of the first occurrence of a value in an array.
2812
2815
  * @param searchElement The value to locate in the array.
2813
2816
  * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2814
- * search starts at index 0.
2817
+ * search starts at index 0.
2815
2818
  */
2816
2819
  indexOf(searchElement: number, fromIndex?: number): number;
2817
2820
 
@@ -2843,7 +2846,7 @@ interface Int16Array {
2843
2846
  * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2844
2847
  * If thisArg is omitted, undefined is used as the this value.
2845
2848
  */
2846
- map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;
2849
+ map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array<ArrayBuffer>;
2847
2850
 
2848
2851
  /**
2849
2852
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -2855,8 +2858,8 @@ interface Int16Array {
2855
2858
  * the accumulation. The first call to the callbackfn function provides this value as an argument
2856
2859
  * instead of an array value.
2857
2860
  */
2858
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number;
2859
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number;
2861
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
2862
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
2860
2863
 
2861
2864
  /**
2862
2865
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -2868,7 +2871,7 @@ interface Int16Array {
2868
2871
  * the accumulation. The first call to the callbackfn function provides this value as an argument
2869
2872
  * instead of an array value.
2870
2873
  */
2871
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
2874
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
2872
2875
 
2873
2876
  /**
2874
2877
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -2880,8 +2883,8 @@ interface Int16Array {
2880
2883
  * the accumulation. The first call to the callbackfn function provides this value as an
2881
2884
  * argument instead of an array value.
2882
2885
  */
2883
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number;
2884
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number;
2886
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
2887
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
2885
2888
 
2886
2889
  /**
2887
2890
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -2893,12 +2896,12 @@ interface Int16Array {
2893
2896
  * the accumulation. The first call to the callbackfn function provides this value as an argument
2894
2897
  * instead of an array value.
2895
2898
  */
2896
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
2899
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
2897
2900
 
2898
2901
  /**
2899
2902
  * Reverses the elements in an Array.
2900
2903
  */
2901
- reverse(): Int16Array;
2904
+ reverse(): this;
2902
2905
 
2903
2906
  /**
2904
2907
  * Sets a value or an array of values.
@@ -2912,7 +2915,7 @@ interface Int16Array {
2912
2915
  * @param start The beginning of the specified portion of the array.
2913
2916
  * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
2914
2917
  */
2915
- slice(start?: number, end?: number): Int16Array;
2918
+ slice(start?: number, end?: number): Int16Array<ArrayBuffer>;
2916
2919
 
2917
2920
  /**
2918
2921
  * Determines whether the specified callback function returns true for any element of an array.
@@ -2922,7 +2925,7 @@ interface Int16Array {
2922
2925
  * @param thisArg An object to which the this keyword can refer in the predicate function.
2923
2926
  * If thisArg is omitted, undefined is used as the this value.
2924
2927
  */
2925
- some(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean;
2928
+ some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
2926
2929
 
2927
2930
  /**
2928
2931
  * Sorts an array.
@@ -2941,7 +2944,7 @@ interface Int16Array {
2941
2944
  * @param begin The index of the beginning of the array.
2942
2945
  * @param end The index of the end of the array.
2943
2946
  */
2944
- subarray(begin?: number, end?: number): Int16Array;
2947
+ subarray(begin?: number, end?: number): Int16Array<TArrayBuffer>;
2945
2948
 
2946
2949
  /**
2947
2950
  * Converts a number to a string by using the current locale.
@@ -2954,16 +2957,17 @@ interface Int16Array {
2954
2957
  toString(): string;
2955
2958
 
2956
2959
  /** Returns the primitive value of the specified object. */
2957
- valueOf(): Int16Array;
2960
+ valueOf(): this;
2958
2961
 
2959
2962
  [index: number]: number;
2960
2963
  }
2961
-
2962
2964
  interface Int16ArrayConstructor {
2963
- readonly prototype: Int16Array;
2964
- new (length: number): Int16Array;
2965
- new (array: ArrayLike<number> | ArrayBufferLike): Int16Array;
2966
- new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array;
2965
+ readonly prototype: Int16Array<ArrayBufferLike>;
2966
+ new (length: number): Int16Array<ArrayBuffer>;
2967
+ new (array: ArrayLike<number>): Int16Array<ArrayBuffer>;
2968
+ new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array<TArrayBuffer>;
2969
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array<ArrayBuffer>;
2970
+ new (array: ArrayLike<number> | ArrayBuffer): Int16Array<ArrayBuffer>;
2967
2971
 
2968
2972
  /**
2969
2973
  * The size in bytes of each element in the array.
@@ -2974,21 +2978,21 @@ interface Int16ArrayConstructor {
2974
2978
  * Returns a new array from a set of elements.
2975
2979
  * @param items A set of elements to include in the new array object.
2976
2980
  */
2977
- of(...items: number[]): Int16Array;
2981
+ of(...items: number[]): Int16Array<ArrayBuffer>;
2978
2982
 
2979
2983
  /**
2980
2984
  * Creates an array from an array-like or iterable object.
2981
- * @param arrayLike An array-like or iterable object to convert to an array.
2985
+ * @param arrayLike An array-like object to convert to an array.
2982
2986
  */
2983
- from(arrayLike: ArrayLike<number>): Int16Array;
2987
+ from(arrayLike: ArrayLike<number>): Int16Array<ArrayBuffer>;
2984
2988
 
2985
2989
  /**
2986
2990
  * Creates an array from an array-like or iterable object.
2987
- * @param arrayLike An array-like or iterable object to convert to an array.
2991
+ * @param arrayLike An array-like object to convert to an array.
2988
2992
  * @param mapfn A mapping function to call on every element of the array.
2989
2993
  * @param thisArg Value of 'this' used to invoke the mapfn.
2990
2994
  */
2991
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array;
2995
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array<ArrayBuffer>;
2992
2996
  }
2993
2997
  declare var Int16Array: Int16ArrayConstructor;
2994
2998
 
@@ -2996,7 +3000,7 @@ declare var Int16Array: Int16ArrayConstructor;
2996
3000
  * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
2997
3001
  * requested number of bytes could not be allocated an exception is raised.
2998
3002
  */
2999
- interface Uint16Array {
3003
+ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
3000
3004
  /**
3001
3005
  * The size in bytes of each element in the array.
3002
3006
  */
@@ -3005,7 +3009,7 @@ interface Uint16Array {
3005
3009
  /**
3006
3010
  * The ArrayBuffer instance referenced by the array.
3007
3011
  */
3008
- readonly buffer: ArrayBufferLike;
3012
+ readonly buffer: TArrayBuffer;
3009
3013
 
3010
3014
  /**
3011
3015
  * The length in bytes of the array.
@@ -3036,7 +3040,7 @@ interface Uint16Array {
3036
3040
  * @param thisArg An object to which the this keyword can refer in the predicate function.
3037
3041
  * If thisArg is omitted, undefined is used as the this value.
3038
3042
  */
3039
- every(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean;
3043
+ every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
3040
3044
 
3041
3045
  /**
3042
3046
  * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
@@ -3055,7 +3059,7 @@ interface Uint16Array {
3055
3059
  * @param thisArg An object to which the this keyword can refer in the predicate function.
3056
3060
  * If thisArg is omitted, undefined is used as the this value.
3057
3061
  */
3058
- filter(predicate: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array;
3062
+ filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array<ArrayBuffer>;
3059
3063
 
3060
3064
  /**
3061
3065
  * Returns the value of the first element in the array where predicate is true, and undefined
@@ -3066,7 +3070,7 @@ interface Uint16Array {
3066
3070
  * @param thisArg If provided, it will be used as the this value for each invocation of
3067
3071
  * predicate. If it is not provided, undefined is used instead.
3068
3072
  */
3069
- find(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number | undefined;
3073
+ find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined;
3070
3074
 
3071
3075
  /**
3072
3076
  * Returns the index of the first element in the array where predicate is true, and -1
@@ -3077,22 +3081,22 @@ interface Uint16Array {
3077
3081
  * @param thisArg If provided, it will be used as the this value for each invocation of
3078
3082
  * predicate. If it is not provided, undefined is used instead.
3079
3083
  */
3080
- findIndex(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number;
3084
+ findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number;
3081
3085
 
3082
3086
  /**
3083
3087
  * Performs the specified action for each element in an array.
3084
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
3088
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
3085
3089
  * callbackfn function one time for each element in the array.
3086
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3090
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3087
3091
  * If thisArg is omitted, undefined is used as the this value.
3088
3092
  */
3089
- forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;
3093
+ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;
3090
3094
 
3091
3095
  /**
3092
3096
  * Returns the index of the first occurrence of a value in an array.
3093
3097
  * @param searchElement The value to locate in the array.
3094
3098
  * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3095
- * search starts at index 0.
3099
+ * search starts at index 0.
3096
3100
  */
3097
3101
  indexOf(searchElement: number, fromIndex?: number): number;
3098
3102
 
@@ -3124,7 +3128,7 @@ interface Uint16Array {
3124
3128
  * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3125
3129
  * If thisArg is omitted, undefined is used as the this value.
3126
3130
  */
3127
- map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;
3131
+ map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array<ArrayBuffer>;
3128
3132
 
3129
3133
  /**
3130
3134
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -3136,8 +3140,8 @@ interface Uint16Array {
3136
3140
  * the accumulation. The first call to the callbackfn function provides this value as an argument
3137
3141
  * instead of an array value.
3138
3142
  */
3139
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number;
3140
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number;
3143
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
3144
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
3141
3145
 
3142
3146
  /**
3143
3147
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -3149,7 +3153,7 @@ interface Uint16Array {
3149
3153
  * the accumulation. The first call to the callbackfn function provides this value as an argument
3150
3154
  * instead of an array value.
3151
3155
  */
3152
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
3156
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
3153
3157
 
3154
3158
  /**
3155
3159
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -3161,8 +3165,8 @@ interface Uint16Array {
3161
3165
  * the accumulation. The first call to the callbackfn function provides this value as an
3162
3166
  * argument instead of an array value.
3163
3167
  */
3164
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number;
3165
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number;
3168
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
3169
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
3166
3170
 
3167
3171
  /**
3168
3172
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -3174,12 +3178,12 @@ interface Uint16Array {
3174
3178
  * the accumulation. The first call to the callbackfn function provides this value as an argument
3175
3179
  * instead of an array value.
3176
3180
  */
3177
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
3181
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
3178
3182
 
3179
3183
  /**
3180
3184
  * Reverses the elements in an Array.
3181
3185
  */
3182
- reverse(): Uint16Array;
3186
+ reverse(): this;
3183
3187
 
3184
3188
  /**
3185
3189
  * Sets a value or an array of values.
@@ -3193,7 +3197,7 @@ interface Uint16Array {
3193
3197
  * @param start The beginning of the specified portion of the array.
3194
3198
  * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
3195
3199
  */
3196
- slice(start?: number, end?: number): Uint16Array;
3200
+ slice(start?: number, end?: number): Uint16Array<ArrayBuffer>;
3197
3201
 
3198
3202
  /**
3199
3203
  * Determines whether the specified callback function returns true for any element of an array.
@@ -3203,7 +3207,7 @@ interface Uint16Array {
3203
3207
  * @param thisArg An object to which the this keyword can refer in the predicate function.
3204
3208
  * If thisArg is omitted, undefined is used as the this value.
3205
3209
  */
3206
- some(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean;
3210
+ some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
3207
3211
 
3208
3212
  /**
3209
3213
  * Sorts an array.
@@ -3222,7 +3226,7 @@ interface Uint16Array {
3222
3226
  * @param begin The index of the beginning of the array.
3223
3227
  * @param end The index of the end of the array.
3224
3228
  */
3225
- subarray(begin?: number, end?: number): Uint16Array;
3229
+ subarray(begin?: number, end?: number): Uint16Array<TArrayBuffer>;
3226
3230
 
3227
3231
  /**
3228
3232
  * Converts a number to a string by using the current locale.
@@ -3235,16 +3239,17 @@ interface Uint16Array {
3235
3239
  toString(): string;
3236
3240
 
3237
3241
  /** Returns the primitive value of the specified object. */
3238
- valueOf(): Uint16Array;
3242
+ valueOf(): this;
3239
3243
 
3240
3244
  [index: number]: number;
3241
3245
  }
3242
-
3243
3246
  interface Uint16ArrayConstructor {
3244
- readonly prototype: Uint16Array;
3245
- new (length: number): Uint16Array;
3246
- new (array: ArrayLike<number> | ArrayBufferLike): Uint16Array;
3247
- new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array;
3247
+ readonly prototype: Uint16Array<ArrayBufferLike>;
3248
+ new (length: number): Uint16Array<ArrayBuffer>;
3249
+ new (array: ArrayLike<number>): Uint16Array<ArrayBuffer>;
3250
+ new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array<TArrayBuffer>;
3251
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array<ArrayBuffer>;
3252
+ new (array: ArrayLike<number> | ArrayBuffer): Uint16Array<ArrayBuffer>;
3248
3253
 
3249
3254
  /**
3250
3255
  * The size in bytes of each element in the array.
@@ -3255,28 +3260,28 @@ interface Uint16ArrayConstructor {
3255
3260
  * Returns a new array from a set of elements.
3256
3261
  * @param items A set of elements to include in the new array object.
3257
3262
  */
3258
- of(...items: number[]): Uint16Array;
3263
+ of(...items: number[]): Uint16Array<ArrayBuffer>;
3259
3264
 
3260
3265
  /**
3261
3266
  * Creates an array from an array-like or iterable object.
3262
- * @param arrayLike An array-like or iterable object to convert to an array.
3267
+ * @param arrayLike An array-like object to convert to an array.
3263
3268
  */
3264
- from(arrayLike: ArrayLike<number>): Uint16Array;
3269
+ from(arrayLike: ArrayLike<number>): Uint16Array<ArrayBuffer>;
3265
3270
 
3266
3271
  /**
3267
3272
  * Creates an array from an array-like or iterable object.
3268
- * @param arrayLike An array-like or iterable object to convert to an array.
3273
+ * @param arrayLike An array-like object to convert to an array.
3269
3274
  * @param mapfn A mapping function to call on every element of the array.
3270
3275
  * @param thisArg Value of 'this' used to invoke the mapfn.
3271
3276
  */
3272
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array;
3277
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array<ArrayBuffer>;
3273
3278
  }
3274
3279
  declare var Uint16Array: Uint16ArrayConstructor;
3275
3280
  /**
3276
3281
  * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
3277
3282
  * requested number of bytes could not be allocated an exception is raised.
3278
3283
  */
3279
- interface Int32Array {
3284
+ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
3280
3285
  /**
3281
3286
  * The size in bytes of each element in the array.
3282
3287
  */
@@ -3285,7 +3290,7 @@ interface Int32Array {
3285
3290
  /**
3286
3291
  * The ArrayBuffer instance referenced by the array.
3287
3292
  */
3288
- readonly buffer: ArrayBufferLike;
3293
+ readonly buffer: TArrayBuffer;
3289
3294
 
3290
3295
  /**
3291
3296
  * The length in bytes of the array.
@@ -3316,7 +3321,7 @@ interface Int32Array {
3316
3321
  * @param thisArg An object to which the this keyword can refer in the predicate function.
3317
3322
  * If thisArg is omitted, undefined is used as the this value.
3318
3323
  */
3319
- every(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean;
3324
+ every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
3320
3325
 
3321
3326
  /**
3322
3327
  * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
@@ -3335,7 +3340,7 @@ interface Int32Array {
3335
3340
  * @param thisArg An object to which the this keyword can refer in the predicate function.
3336
3341
  * If thisArg is omitted, undefined is used as the this value.
3337
3342
  */
3338
- filter(predicate: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array;
3343
+ filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array<ArrayBuffer>;
3339
3344
 
3340
3345
  /**
3341
3346
  * Returns the value of the first element in the array where predicate is true, and undefined
@@ -3346,7 +3351,7 @@ interface Int32Array {
3346
3351
  * @param thisArg If provided, it will be used as the this value for each invocation of
3347
3352
  * predicate. If it is not provided, undefined is used instead.
3348
3353
  */
3349
- find(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number | undefined;
3354
+ find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined;
3350
3355
 
3351
3356
  /**
3352
3357
  * Returns the index of the first element in the array where predicate is true, and -1
@@ -3357,22 +3362,22 @@ interface Int32Array {
3357
3362
  * @param thisArg If provided, it will be used as the this value for each invocation of
3358
3363
  * predicate. If it is not provided, undefined is used instead.
3359
3364
  */
3360
- findIndex(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number;
3365
+ findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number;
3361
3366
 
3362
3367
  /**
3363
3368
  * Performs the specified action for each element in an array.
3364
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
3369
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
3365
3370
  * callbackfn function one time for each element in the array.
3366
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3371
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3367
3372
  * If thisArg is omitted, undefined is used as the this value.
3368
3373
  */
3369
- forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;
3374
+ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;
3370
3375
 
3371
3376
  /**
3372
3377
  * Returns the index of the first occurrence of a value in an array.
3373
3378
  * @param searchElement The value to locate in the array.
3374
3379
  * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3375
- * search starts at index 0.
3380
+ * search starts at index 0.
3376
3381
  */
3377
3382
  indexOf(searchElement: number, fromIndex?: number): number;
3378
3383
 
@@ -3404,7 +3409,7 @@ interface Int32Array {
3404
3409
  * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3405
3410
  * If thisArg is omitted, undefined is used as the this value.
3406
3411
  */
3407
- map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;
3412
+ map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array<ArrayBuffer>;
3408
3413
 
3409
3414
  /**
3410
3415
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -3416,8 +3421,8 @@ interface Int32Array {
3416
3421
  * the accumulation. The first call to the callbackfn function provides this value as an argument
3417
3422
  * instead of an array value.
3418
3423
  */
3419
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number;
3420
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number;
3424
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
3425
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
3421
3426
 
3422
3427
  /**
3423
3428
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -3429,7 +3434,7 @@ interface Int32Array {
3429
3434
  * the accumulation. The first call to the callbackfn function provides this value as an argument
3430
3435
  * instead of an array value.
3431
3436
  */
3432
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
3437
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
3433
3438
 
3434
3439
  /**
3435
3440
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -3441,8 +3446,8 @@ interface Int32Array {
3441
3446
  * the accumulation. The first call to the callbackfn function provides this value as an
3442
3447
  * argument instead of an array value.
3443
3448
  */
3444
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number;
3445
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number;
3449
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
3450
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
3446
3451
 
3447
3452
  /**
3448
3453
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -3454,12 +3459,12 @@ interface Int32Array {
3454
3459
  * the accumulation. The first call to the callbackfn function provides this value as an argument
3455
3460
  * instead of an array value.
3456
3461
  */
3457
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
3462
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
3458
3463
 
3459
3464
  /**
3460
3465
  * Reverses the elements in an Array.
3461
3466
  */
3462
- reverse(): Int32Array;
3467
+ reverse(): this;
3463
3468
 
3464
3469
  /**
3465
3470
  * Sets a value or an array of values.
@@ -3473,7 +3478,7 @@ interface Int32Array {
3473
3478
  * @param start The beginning of the specified portion of the array.
3474
3479
  * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
3475
3480
  */
3476
- slice(start?: number, end?: number): Int32Array;
3481
+ slice(start?: number, end?: number): Int32Array<ArrayBuffer>;
3477
3482
 
3478
3483
  /**
3479
3484
  * Determines whether the specified callback function returns true for any element of an array.
@@ -3483,7 +3488,7 @@ interface Int32Array {
3483
3488
  * @param thisArg An object to which the this keyword can refer in the predicate function.
3484
3489
  * If thisArg is omitted, undefined is used as the this value.
3485
3490
  */
3486
- some(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean;
3491
+ some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
3487
3492
 
3488
3493
  /**
3489
3494
  * Sorts an array.
@@ -3502,7 +3507,7 @@ interface Int32Array {
3502
3507
  * @param begin The index of the beginning of the array.
3503
3508
  * @param end The index of the end of the array.
3504
3509
  */
3505
- subarray(begin?: number, end?: number): Int32Array;
3510
+ subarray(begin?: number, end?: number): Int32Array<TArrayBuffer>;
3506
3511
 
3507
3512
  /**
3508
3513
  * Converts a number to a string by using the current locale.
@@ -3515,16 +3520,17 @@ interface Int32Array {
3515
3520
  toString(): string;
3516
3521
 
3517
3522
  /** Returns the primitive value of the specified object. */
3518
- valueOf(): Int32Array;
3523
+ valueOf(): this;
3519
3524
 
3520
3525
  [index: number]: number;
3521
3526
  }
3522
-
3523
3527
  interface Int32ArrayConstructor {
3524
- readonly prototype: Int32Array;
3525
- new (length: number): Int32Array;
3526
- new (array: ArrayLike<number> | ArrayBufferLike): Int32Array;
3527
- new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array;
3528
+ readonly prototype: Int32Array<ArrayBufferLike>;
3529
+ new (length: number): Int32Array<ArrayBuffer>;
3530
+ new (array: ArrayLike<number>): Int32Array<ArrayBuffer>;
3531
+ new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array<TArrayBuffer>;
3532
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array<ArrayBuffer>;
3533
+ new (array: ArrayLike<number> | ArrayBuffer): Int32Array<ArrayBuffer>;
3528
3534
 
3529
3535
  /**
3530
3536
  * The size in bytes of each element in the array.
@@ -3535,21 +3541,21 @@ interface Int32ArrayConstructor {
3535
3541
  * Returns a new array from a set of elements.
3536
3542
  * @param items A set of elements to include in the new array object.
3537
3543
  */
3538
- of(...items: number[]): Int32Array;
3544
+ of(...items: number[]): Int32Array<ArrayBuffer>;
3539
3545
 
3540
3546
  /**
3541
3547
  * Creates an array from an array-like or iterable object.
3542
- * @param arrayLike An array-like or iterable object to convert to an array.
3548
+ * @param arrayLike An array-like object to convert to an array.
3543
3549
  */
3544
- from(arrayLike: ArrayLike<number>): Int32Array;
3550
+ from(arrayLike: ArrayLike<number>): Int32Array<ArrayBuffer>;
3545
3551
 
3546
3552
  /**
3547
3553
  * Creates an array from an array-like or iterable object.
3548
- * @param arrayLike An array-like or iterable object to convert to an array.
3554
+ * @param arrayLike An array-like object to convert to an array.
3549
3555
  * @param mapfn A mapping function to call on every element of the array.
3550
3556
  * @param thisArg Value of 'this' used to invoke the mapfn.
3551
3557
  */
3552
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array;
3558
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array<ArrayBuffer>;
3553
3559
  }
3554
3560
  declare var Int32Array: Int32ArrayConstructor;
3555
3561
 
@@ -3557,7 +3563,7 @@ declare var Int32Array: Int32ArrayConstructor;
3557
3563
  * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
3558
3564
  * requested number of bytes could not be allocated an exception is raised.
3559
3565
  */
3560
- interface Uint32Array {
3566
+ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
3561
3567
  /**
3562
3568
  * The size in bytes of each element in the array.
3563
3569
  */
@@ -3566,7 +3572,7 @@ interface Uint32Array {
3566
3572
  /**
3567
3573
  * The ArrayBuffer instance referenced by the array.
3568
3574
  */
3569
- readonly buffer: ArrayBufferLike;
3575
+ readonly buffer: TArrayBuffer;
3570
3576
 
3571
3577
  /**
3572
3578
  * The length in bytes of the array.
@@ -3597,7 +3603,7 @@ interface Uint32Array {
3597
3603
  * @param thisArg An object to which the this keyword can refer in the predicate function.
3598
3604
  * If thisArg is omitted, undefined is used as the this value.
3599
3605
  */
3600
- every(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean;
3606
+ every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
3601
3607
 
3602
3608
  /**
3603
3609
  * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
@@ -3616,7 +3622,7 @@ interface Uint32Array {
3616
3622
  * @param thisArg An object to which the this keyword can refer in the predicate function.
3617
3623
  * If thisArg is omitted, undefined is used as the this value.
3618
3624
  */
3619
- filter(predicate: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array;
3625
+ filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array<ArrayBuffer>;
3620
3626
 
3621
3627
  /**
3622
3628
  * Returns the value of the first element in the array where predicate is true, and undefined
@@ -3627,7 +3633,7 @@ interface Uint32Array {
3627
3633
  * @param thisArg If provided, it will be used as the this value for each invocation of
3628
3634
  * predicate. If it is not provided, undefined is used instead.
3629
3635
  */
3630
- find(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number | undefined;
3636
+ find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined;
3631
3637
 
3632
3638
  /**
3633
3639
  * Returns the index of the first element in the array where predicate is true, and -1
@@ -3638,21 +3644,21 @@ interface Uint32Array {
3638
3644
  * @param thisArg If provided, it will be used as the this value for each invocation of
3639
3645
  * predicate. If it is not provided, undefined is used instead.
3640
3646
  */
3641
- findIndex(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number;
3647
+ findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number;
3642
3648
 
3643
3649
  /**
3644
3650
  * Performs the specified action for each element in an array.
3645
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
3651
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
3646
3652
  * callbackfn function one time for each element in the array.
3647
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3653
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3648
3654
  * If thisArg is omitted, undefined is used as the this value.
3649
3655
  */
3650
- forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;
3656
+ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;
3651
3657
  /**
3652
3658
  * Returns the index of the first occurrence of a value in an array.
3653
3659
  * @param searchElement The value to locate in the array.
3654
3660
  * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3655
- * search starts at index 0.
3661
+ * search starts at index 0.
3656
3662
  */
3657
3663
  indexOf(searchElement: number, fromIndex?: number): number;
3658
3664
 
@@ -3684,7 +3690,7 @@ interface Uint32Array {
3684
3690
  * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3685
3691
  * If thisArg is omitted, undefined is used as the this value.
3686
3692
  */
3687
- map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;
3693
+ map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array<ArrayBuffer>;
3688
3694
 
3689
3695
  /**
3690
3696
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -3696,8 +3702,8 @@ interface Uint32Array {
3696
3702
  * the accumulation. The first call to the callbackfn function provides this value as an argument
3697
3703
  * instead of an array value.
3698
3704
  */
3699
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number;
3700
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number;
3705
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
3706
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
3701
3707
 
3702
3708
  /**
3703
3709
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -3709,7 +3715,7 @@ interface Uint32Array {
3709
3715
  * the accumulation. The first call to the callbackfn function provides this value as an argument
3710
3716
  * instead of an array value.
3711
3717
  */
3712
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
3718
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
3713
3719
 
3714
3720
  /**
3715
3721
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -3721,8 +3727,8 @@ interface Uint32Array {
3721
3727
  * the accumulation. The first call to the callbackfn function provides this value as an
3722
3728
  * argument instead of an array value.
3723
3729
  */
3724
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number;
3725
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number;
3730
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
3731
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
3726
3732
 
3727
3733
  /**
3728
3734
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -3734,12 +3740,12 @@ interface Uint32Array {
3734
3740
  * the accumulation. The first call to the callbackfn function provides this value as an argument
3735
3741
  * instead of an array value.
3736
3742
  */
3737
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
3743
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
3738
3744
 
3739
3745
  /**
3740
3746
  * Reverses the elements in an Array.
3741
3747
  */
3742
- reverse(): Uint32Array;
3748
+ reverse(): this;
3743
3749
 
3744
3750
  /**
3745
3751
  * Sets a value or an array of values.
@@ -3753,7 +3759,7 @@ interface Uint32Array {
3753
3759
  * @param start The beginning of the specified portion of the array.
3754
3760
  * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
3755
3761
  */
3756
- slice(start?: number, end?: number): Uint32Array;
3762
+ slice(start?: number, end?: number): Uint32Array<ArrayBuffer>;
3757
3763
 
3758
3764
  /**
3759
3765
  * Determines whether the specified callback function returns true for any element of an array.
@@ -3763,7 +3769,7 @@ interface Uint32Array {
3763
3769
  * @param thisArg An object to which the this keyword can refer in the predicate function.
3764
3770
  * If thisArg is omitted, undefined is used as the this value.
3765
3771
  */
3766
- some(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean;
3772
+ some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
3767
3773
 
3768
3774
  /**
3769
3775
  * Sorts an array.
@@ -3782,7 +3788,7 @@ interface Uint32Array {
3782
3788
  * @param begin The index of the beginning of the array.
3783
3789
  * @param end The index of the end of the array.
3784
3790
  */
3785
- subarray(begin?: number, end?: number): Uint32Array;
3791
+ subarray(begin?: number, end?: number): Uint32Array<TArrayBuffer>;
3786
3792
 
3787
3793
  /**
3788
3794
  * Converts a number to a string by using the current locale.
@@ -3795,16 +3801,17 @@ interface Uint32Array {
3795
3801
  toString(): string;
3796
3802
 
3797
3803
  /** Returns the primitive value of the specified object. */
3798
- valueOf(): Uint32Array;
3804
+ valueOf(): this;
3799
3805
 
3800
3806
  [index: number]: number;
3801
3807
  }
3802
-
3803
3808
  interface Uint32ArrayConstructor {
3804
- readonly prototype: Uint32Array;
3805
- new (length: number): Uint32Array;
3806
- new (array: ArrayLike<number> | ArrayBufferLike): Uint32Array;
3807
- new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array;
3809
+ readonly prototype: Uint32Array<ArrayBufferLike>;
3810
+ new (length: number): Uint32Array<ArrayBuffer>;
3811
+ new (array: ArrayLike<number>): Uint32Array<ArrayBuffer>;
3812
+ new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array<TArrayBuffer>;
3813
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array<ArrayBuffer>;
3814
+ new (array: ArrayLike<number> | ArrayBuffer): Uint32Array<ArrayBuffer>;
3808
3815
 
3809
3816
  /**
3810
3817
  * The size in bytes of each element in the array.
@@ -3815,21 +3822,21 @@ interface Uint32ArrayConstructor {
3815
3822
  * Returns a new array from a set of elements.
3816
3823
  * @param items A set of elements to include in the new array object.
3817
3824
  */
3818
- of(...items: number[]): Uint32Array;
3825
+ of(...items: number[]): Uint32Array<ArrayBuffer>;
3819
3826
 
3820
3827
  /**
3821
3828
  * Creates an array from an array-like or iterable object.
3822
- * @param arrayLike An array-like or iterable object to convert to an array.
3829
+ * @param arrayLike An array-like object to convert to an array.
3823
3830
  */
3824
- from(arrayLike: ArrayLike<number>): Uint32Array;
3831
+ from(arrayLike: ArrayLike<number>): Uint32Array<ArrayBuffer>;
3825
3832
 
3826
3833
  /**
3827
3834
  * Creates an array from an array-like or iterable object.
3828
- * @param arrayLike An array-like or iterable object to convert to an array.
3835
+ * @param arrayLike An array-like object to convert to an array.
3829
3836
  * @param mapfn A mapping function to call on every element of the array.
3830
3837
  * @param thisArg Value of 'this' used to invoke the mapfn.
3831
3838
  */
3832
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array;
3839
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array<ArrayBuffer>;
3833
3840
  }
3834
3841
  declare var Uint32Array: Uint32ArrayConstructor;
3835
3842
 
@@ -3837,7 +3844,7 @@ declare var Uint32Array: Uint32ArrayConstructor;
3837
3844
  * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
3838
3845
  * of bytes could not be allocated an exception is raised.
3839
3846
  */
3840
- interface Float32Array {
3847
+ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
3841
3848
  /**
3842
3849
  * The size in bytes of each element in the array.
3843
3850
  */
@@ -3846,7 +3853,7 @@ interface Float32Array {
3846
3853
  /**
3847
3854
  * The ArrayBuffer instance referenced by the array.
3848
3855
  */
3849
- readonly buffer: ArrayBufferLike;
3856
+ readonly buffer: TArrayBuffer;
3850
3857
 
3851
3858
  /**
3852
3859
  * The length in bytes of the array.
@@ -3877,7 +3884,7 @@ interface Float32Array {
3877
3884
  * @param thisArg An object to which the this keyword can refer in the predicate function.
3878
3885
  * If thisArg is omitted, undefined is used as the this value.
3879
3886
  */
3880
- every(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean;
3887
+ every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
3881
3888
 
3882
3889
  /**
3883
3890
  * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
@@ -3896,7 +3903,7 @@ interface Float32Array {
3896
3903
  * @param thisArg An object to which the this keyword can refer in the predicate function.
3897
3904
  * If thisArg is omitted, undefined is used as the this value.
3898
3905
  */
3899
- filter(predicate: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array;
3906
+ filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array<ArrayBuffer>;
3900
3907
 
3901
3908
  /**
3902
3909
  * Returns the value of the first element in the array where predicate is true, and undefined
@@ -3907,7 +3914,7 @@ interface Float32Array {
3907
3914
  * @param thisArg If provided, it will be used as the this value for each invocation of
3908
3915
  * predicate. If it is not provided, undefined is used instead.
3909
3916
  */
3910
- find(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number | undefined;
3917
+ find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined;
3911
3918
 
3912
3919
  /**
3913
3920
  * Returns the index of the first element in the array where predicate is true, and -1
@@ -3918,22 +3925,22 @@ interface Float32Array {
3918
3925
  * @param thisArg If provided, it will be used as the this value for each invocation of
3919
3926
  * predicate. If it is not provided, undefined is used instead.
3920
3927
  */
3921
- findIndex(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number;
3928
+ findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number;
3922
3929
 
3923
3930
  /**
3924
3931
  * Performs the specified action for each element in an array.
3925
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
3932
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
3926
3933
  * callbackfn function one time for each element in the array.
3927
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3934
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3928
3935
  * If thisArg is omitted, undefined is used as the this value.
3929
3936
  */
3930
- forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;
3937
+ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;
3931
3938
 
3932
3939
  /**
3933
3940
  * Returns the index of the first occurrence of a value in an array.
3934
3941
  * @param searchElement The value to locate in the array.
3935
3942
  * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3936
- * search starts at index 0.
3943
+ * search starts at index 0.
3937
3944
  */
3938
3945
  indexOf(searchElement: number, fromIndex?: number): number;
3939
3946
 
@@ -3965,7 +3972,7 @@ interface Float32Array {
3965
3972
  * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3966
3973
  * If thisArg is omitted, undefined is used as the this value.
3967
3974
  */
3968
- map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;
3975
+ map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array<ArrayBuffer>;
3969
3976
 
3970
3977
  /**
3971
3978
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -3977,8 +3984,8 @@ interface Float32Array {
3977
3984
  * the accumulation. The first call to the callbackfn function provides this value as an argument
3978
3985
  * instead of an array value.
3979
3986
  */
3980
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number;
3981
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number;
3987
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
3988
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
3982
3989
 
3983
3990
  /**
3984
3991
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -3990,7 +3997,7 @@ interface Float32Array {
3990
3997
  * the accumulation. The first call to the callbackfn function provides this value as an argument
3991
3998
  * instead of an array value.
3992
3999
  */
3993
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
4000
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
3994
4001
 
3995
4002
  /**
3996
4003
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -4002,8 +4009,8 @@ interface Float32Array {
4002
4009
  * the accumulation. The first call to the callbackfn function provides this value as an
4003
4010
  * argument instead of an array value.
4004
4011
  */
4005
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number;
4006
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number;
4012
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
4013
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
4007
4014
 
4008
4015
  /**
4009
4016
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -4015,12 +4022,12 @@ interface Float32Array {
4015
4022
  * the accumulation. The first call to the callbackfn function provides this value as an argument
4016
4023
  * instead of an array value.
4017
4024
  */
4018
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
4025
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
4019
4026
 
4020
4027
  /**
4021
4028
  * Reverses the elements in an Array.
4022
4029
  */
4023
- reverse(): Float32Array;
4030
+ reverse(): this;
4024
4031
 
4025
4032
  /**
4026
4033
  * Sets a value or an array of values.
@@ -4034,7 +4041,7 @@ interface Float32Array {
4034
4041
  * @param start The beginning of the specified portion of the array.
4035
4042
  * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
4036
4043
  */
4037
- slice(start?: number, end?: number): Float32Array;
4044
+ slice(start?: number, end?: number): Float32Array<ArrayBuffer>;
4038
4045
 
4039
4046
  /**
4040
4047
  * Determines whether the specified callback function returns true for any element of an array.
@@ -4044,7 +4051,7 @@ interface Float32Array {
4044
4051
  * @param thisArg An object to which the this keyword can refer in the predicate function.
4045
4052
  * If thisArg is omitted, undefined is used as the this value.
4046
4053
  */
4047
- some(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean;
4054
+ some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
4048
4055
 
4049
4056
  /**
4050
4057
  * Sorts an array.
@@ -4063,7 +4070,7 @@ interface Float32Array {
4063
4070
  * @param begin The index of the beginning of the array.
4064
4071
  * @param end The index of the end of the array.
4065
4072
  */
4066
- subarray(begin?: number, end?: number): Float32Array;
4073
+ subarray(begin?: number, end?: number): Float32Array<TArrayBuffer>;
4067
4074
 
4068
4075
  /**
4069
4076
  * Converts a number to a string by using the current locale.
@@ -4076,16 +4083,17 @@ interface Float32Array {
4076
4083
  toString(): string;
4077
4084
 
4078
4085
  /** Returns the primitive value of the specified object. */
4079
- valueOf(): Float32Array;
4086
+ valueOf(): this;
4080
4087
 
4081
4088
  [index: number]: number;
4082
4089
  }
4083
-
4084
4090
  interface Float32ArrayConstructor {
4085
- readonly prototype: Float32Array;
4086
- new (length: number): Float32Array;
4087
- new (array: ArrayLike<number> | ArrayBufferLike): Float32Array;
4088
- new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array;
4091
+ readonly prototype: Float32Array<ArrayBufferLike>;
4092
+ new (length: number): Float32Array<ArrayBuffer>;
4093
+ new (array: ArrayLike<number>): Float32Array<ArrayBuffer>;
4094
+ new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array<TArrayBuffer>;
4095
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array<ArrayBuffer>;
4096
+ new (array: ArrayLike<number> | ArrayBuffer): Float32Array<ArrayBuffer>;
4089
4097
 
4090
4098
  /**
4091
4099
  * The size in bytes of each element in the array.
@@ -4096,21 +4104,21 @@ interface Float32ArrayConstructor {
4096
4104
  * Returns a new array from a set of elements.
4097
4105
  * @param items A set of elements to include in the new array object.
4098
4106
  */
4099
- of(...items: number[]): Float32Array;
4107
+ of(...items: number[]): Float32Array<ArrayBuffer>;
4100
4108
 
4101
4109
  /**
4102
4110
  * Creates an array from an array-like or iterable object.
4103
- * @param arrayLike An array-like or iterable object to convert to an array.
4111
+ * @param arrayLike An array-like object to convert to an array.
4104
4112
  */
4105
- from(arrayLike: ArrayLike<number>): Float32Array;
4113
+ from(arrayLike: ArrayLike<number>): Float32Array<ArrayBuffer>;
4106
4114
 
4107
4115
  /**
4108
4116
  * Creates an array from an array-like or iterable object.
4109
- * @param arrayLike An array-like or iterable object to convert to an array.
4117
+ * @param arrayLike An array-like object to convert to an array.
4110
4118
  * @param mapfn A mapping function to call on every element of the array.
4111
4119
  * @param thisArg Value of 'this' used to invoke the mapfn.
4112
4120
  */
4113
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array;
4121
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array<ArrayBuffer>;
4114
4122
  }
4115
4123
  declare var Float32Array: Float32ArrayConstructor;
4116
4124
 
@@ -4118,7 +4126,7 @@ declare var Float32Array: Float32ArrayConstructor;
4118
4126
  * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
4119
4127
  * number of bytes could not be allocated an exception is raised.
4120
4128
  */
4121
- interface Float64Array {
4129
+ interface Float64Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
4122
4130
  /**
4123
4131
  * The size in bytes of each element in the array.
4124
4132
  */
@@ -4127,7 +4135,7 @@ interface Float64Array {
4127
4135
  /**
4128
4136
  * The ArrayBuffer instance referenced by the array.
4129
4137
  */
4130
- readonly buffer: ArrayBufferLike;
4138
+ readonly buffer: TArrayBuffer;
4131
4139
 
4132
4140
  /**
4133
4141
  * The length in bytes of the array.
@@ -4158,7 +4166,7 @@ interface Float64Array {
4158
4166
  * @param thisArg An object to which the this keyword can refer in the predicate function.
4159
4167
  * If thisArg is omitted, undefined is used as the this value.
4160
4168
  */
4161
- every(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean;
4169
+ every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
4162
4170
 
4163
4171
  /**
4164
4172
  * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
@@ -4177,7 +4185,7 @@ interface Float64Array {
4177
4185
  * @param thisArg An object to which the this keyword can refer in the predicate function.
4178
4186
  * If thisArg is omitted, undefined is used as the this value.
4179
4187
  */
4180
- filter(predicate: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array;
4188
+ filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array<ArrayBuffer>;
4181
4189
 
4182
4190
  /**
4183
4191
  * Returns the value of the first element in the array where predicate is true, and undefined
@@ -4188,7 +4196,7 @@ interface Float64Array {
4188
4196
  * @param thisArg If provided, it will be used as the this value for each invocation of
4189
4197
  * predicate. If it is not provided, undefined is used instead.
4190
4198
  */
4191
- find(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number | undefined;
4199
+ find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined;
4192
4200
 
4193
4201
  /**
4194
4202
  * Returns the index of the first element in the array where predicate is true, and -1
@@ -4199,22 +4207,22 @@ interface Float64Array {
4199
4207
  * @param thisArg If provided, it will be used as the this value for each invocation of
4200
4208
  * predicate. If it is not provided, undefined is used instead.
4201
4209
  */
4202
- findIndex(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number;
4210
+ findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number;
4203
4211
 
4204
4212
  /**
4205
4213
  * Performs the specified action for each element in an array.
4206
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
4214
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
4207
4215
  * callbackfn function one time for each element in the array.
4208
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4216
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4209
4217
  * If thisArg is omitted, undefined is used as the this value.
4210
4218
  */
4211
- forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;
4219
+ forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;
4212
4220
 
4213
4221
  /**
4214
4222
  * Returns the index of the first occurrence of a value in an array.
4215
4223
  * @param searchElement The value to locate in the array.
4216
4224
  * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
4217
- * search starts at index 0.
4225
+ * search starts at index 0.
4218
4226
  */
4219
4227
  indexOf(searchElement: number, fromIndex?: number): number;
4220
4228
 
@@ -4246,7 +4254,7 @@ interface Float64Array {
4246
4254
  * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4247
4255
  * If thisArg is omitted, undefined is used as the this value.
4248
4256
  */
4249
- map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;
4257
+ map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array<ArrayBuffer>;
4250
4258
 
4251
4259
  /**
4252
4260
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -4258,8 +4266,8 @@ interface Float64Array {
4258
4266
  * the accumulation. The first call to the callbackfn function provides this value as an argument
4259
4267
  * instead of an array value.
4260
4268
  */
4261
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number;
4262
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number;
4269
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
4270
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
4263
4271
 
4264
4272
  /**
4265
4273
  * Calls the specified callback function for all the elements in an array. The return value of
@@ -4271,7 +4279,7 @@ interface Float64Array {
4271
4279
  * the accumulation. The first call to the callbackfn function provides this value as an argument
4272
4280
  * instead of an array value.
4273
4281
  */
4274
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
4282
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
4275
4283
 
4276
4284
  /**
4277
4285
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -4283,8 +4291,8 @@ interface Float64Array {
4283
4291
  * the accumulation. The first call to the callbackfn function provides this value as an
4284
4292
  * argument instead of an array value.
4285
4293
  */
4286
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number;
4287
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number;
4294
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
4295
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
4288
4296
 
4289
4297
  /**
4290
4298
  * Calls the specified callback function for all the elements in an array, in descending order.
@@ -4296,12 +4304,12 @@ interface Float64Array {
4296
4304
  * the accumulation. The first call to the callbackfn function provides this value as an argument
4297
4305
  * instead of an array value.
4298
4306
  */
4299
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
4307
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
4300
4308
 
4301
4309
  /**
4302
4310
  * Reverses the elements in an Array.
4303
4311
  */
4304
- reverse(): Float64Array;
4312
+ reverse(): this;
4305
4313
 
4306
4314
  /**
4307
4315
  * Sets a value or an array of values.
@@ -4315,7 +4323,7 @@ interface Float64Array {
4315
4323
  * @param start The beginning of the specified portion of the array.
4316
4324
  * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
4317
4325
  */
4318
- slice(start?: number, end?: number): Float64Array;
4326
+ slice(start?: number, end?: number): Float64Array<ArrayBuffer>;
4319
4327
 
4320
4328
  /**
4321
4329
  * Determines whether the specified callback function returns true for any element of an array.
@@ -4325,7 +4333,7 @@ interface Float64Array {
4325
4333
  * @param thisArg An object to which the this keyword can refer in the predicate function.
4326
4334
  * If thisArg is omitted, undefined is used as the this value.
4327
4335
  */
4328
- some(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean;
4336
+ some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
4329
4337
 
4330
4338
  /**
4331
4339
  * Sorts an array.
@@ -4344,7 +4352,7 @@ interface Float64Array {
4344
4352
  * @param begin The index of the beginning of the array.
4345
4353
  * @param end The index of the end of the array.
4346
4354
  */
4347
- subarray(begin?: number, end?: number): Float64Array;
4355
+ subarray(begin?: number, end?: number): Float64Array<TArrayBuffer>;
4348
4356
 
4349
4357
  /**
4350
4358
  * Converts a number to a string by using the current locale.
@@ -4357,16 +4365,17 @@ interface Float64Array {
4357
4365
  toString(): string;
4358
4366
 
4359
4367
  /** Returns the primitive value of the specified object. */
4360
- valueOf(): Float64Array;
4368
+ valueOf(): this;
4361
4369
 
4362
4370
  [index: number]: number;
4363
4371
  }
4364
-
4365
4372
  interface Float64ArrayConstructor {
4366
- readonly prototype: Float64Array;
4367
- new (length: number): Float64Array;
4368
- new (array: ArrayLike<number> | ArrayBufferLike): Float64Array;
4369
- new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array;
4373
+ readonly prototype: Float64Array<ArrayBufferLike>;
4374
+ new (length: number): Float64Array<ArrayBuffer>;
4375
+ new (array: ArrayLike<number>): Float64Array<ArrayBuffer>;
4376
+ new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Float64Array<TArrayBuffer>;
4377
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array<ArrayBuffer>;
4378
+ new (array: ArrayLike<number> | ArrayBuffer): Float64Array<ArrayBuffer>;
4370
4379
 
4371
4380
  /**
4372
4381
  * The size in bytes of each element in the array.
@@ -4377,21 +4386,21 @@ interface Float64ArrayConstructor {
4377
4386
  * Returns a new array from a set of elements.
4378
4387
  * @param items A set of elements to include in the new array object.
4379
4388
  */
4380
- of(...items: number[]): Float64Array;
4389
+ of(...items: number[]): Float64Array<ArrayBuffer>;
4381
4390
 
4382
4391
  /**
4383
4392
  * Creates an array from an array-like or iterable object.
4384
- * @param arrayLike An array-like or iterable object to convert to an array.
4393
+ * @param arrayLike An array-like object to convert to an array.
4385
4394
  */
4386
- from(arrayLike: ArrayLike<number>): Float64Array;
4395
+ from(arrayLike: ArrayLike<number>): Float64Array<ArrayBuffer>;
4387
4396
 
4388
4397
  /**
4389
4398
  * Creates an array from an array-like or iterable object.
4390
- * @param arrayLike An array-like or iterable object to convert to an array.
4399
+ * @param arrayLike An array-like object to convert to an array.
4391
4400
  * @param mapfn A mapping function to call on every element of the array.
4392
4401
  * @param thisArg Value of 'this' used to invoke the mapfn.
4393
4402
  */
4394
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array;
4403
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array<ArrayBuffer>;
4395
4404
  }
4396
4405
  declare var Float64Array: Float64ArrayConstructor;
4397
4406