@dcloudio/uni-app-x 0.7.19 → 0.7.21

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 (335) hide show
  1. package/.prettierrc +5 -5
  2. package/README.md +1 -1
  3. package/index.d.ts +1 -1
  4. package/options.d.ts +9 -9
  5. package/package.json +27 -27
  6. package/types/app.d.ts +1002 -842
  7. package/types/index.d.ts +7 -7
  8. package/types/native/AsyncApiResult.d.ts +7 -7
  9. package/types/native/CSSStyleDeclaration.d.ts +25 -25
  10. package/types/native/CanvasRenderingContext2D.d.ts +2048 -2047
  11. package/types/native/DOMRect.d.ts +56 -56
  12. package/types/native/DrawableContext.d.ts +162 -162
  13. package/types/native/INavigationBar.d.ts +22 -22
  14. package/types/native/IUniElement.d.ts +2859 -2859
  15. package/types/native/IUniError.d.ts +20 -20
  16. package/types/native/IUniForm.d.ts +9 -9
  17. package/types/native/IUniObjectElement.d.ts +124 -124
  18. package/types/native/NativeLoadFontFaceOptions.d.ts +11 -11
  19. package/types/native/NodeData.d.ts +22 -22
  20. package/types/native/PageNode.d.ts +6 -6
  21. package/types/native/Path2D.d.ts +240 -240
  22. package/types/native/SnapshotOptions.d.ts +63 -63
  23. package/types/native/SourceError.d.ts +46 -46
  24. package/types/native/UTSAndroidHookProxy.d.ts +14 -14
  25. package/types/native/UniAggregateError.d.ts +19 -19
  26. package/types/native/UniApp.d.ts +205 -205
  27. package/types/native/UniCallbackWrapper.d.ts +7 -7
  28. package/types/native/UniCanvasElement.d.ts +9 -9
  29. package/types/native/UniCustomEvent.d.ts +24 -24
  30. package/types/native/UniDocument.d.ts +83 -83
  31. package/types/native/UniElement.d.ts +79 -79
  32. package/types/native/UniError.d.ts +70 -70
  33. package/types/native/UniEvent.d.ts +92 -92
  34. package/types/native/UniFormControl.d.ts +8 -8
  35. package/types/native/UniFormControlElement.d.ts +14 -14
  36. package/types/native/UniImageErrorEvent.d.ts +33 -33
  37. package/types/native/UniImageLoadEvent.d.ts +37 -37
  38. package/types/native/UniInputBlurEvent.d.ts +36 -36
  39. package/types/native/UniInputConfirmEvent.d.ts +30 -30
  40. package/types/native/UniInputEvent.d.ts +38 -38
  41. package/types/native/UniInputFocusEvent.d.ts +53 -53
  42. package/types/native/UniNativePage.d.ts +270 -270
  43. package/types/native/UniNestedPreScrollEvent.d.ts +45 -45
  44. package/types/native/UniPageEvent.d.ts +10 -10
  45. package/types/native/UniPageManager.d.ts +27 -20
  46. package/types/native/UniPageScrollEvent.d.ts +13 -13
  47. package/types/native/UniPointerEvent.d.ts +74 -74
  48. package/types/native/UniProvider.d.ts +15 -15
  49. package/types/native/UniRefresherEvent.d.ts +18 -18
  50. package/types/native/UniResizeEvent.d.ts +34 -34
  51. package/types/native/UniResizeObserver.d.ts +184 -184
  52. package/types/native/UniRichTextItemClickEvent.d.ts +41 -41
  53. package/types/native/UniScrollEvent.d.ts +42 -42
  54. package/types/native/UniScrollToLowerEvent.d.ts +23 -23
  55. package/types/native/UniScrollToUpperEvent.d.ts +23 -23
  56. package/types/native/UniStartNestedScrollEvent.d.ts +33 -33
  57. package/types/native/UniStopNestedScrollEvent.d.ts +28 -28
  58. package/types/native/UniSwiperAnimationFinishEvent.d.ts +44 -44
  59. package/types/native/UniSwiperChangeEvent.d.ts +44 -44
  60. package/types/native/UniSwiperTransitionEvent.d.ts +24 -24
  61. package/types/native/UniTabTapEvent.d.ts +18 -18
  62. package/types/native/UniTabsElement.d.ts +59 -59
  63. package/types/native/UniTextElement.d.ts +34 -34
  64. package/types/native/UniTextareaFocusEvent.d.ts +54 -54
  65. package/types/native/UniTouchEvent.d.ts +64 -64
  66. package/types/native/UniVideoElement.d.ts +75 -75
  67. package/types/native/UniWebViewDownloadEvent.d.ts +52 -52
  68. package/types/native/UniWebViewElement.d.ts +10 -10
  69. package/types/native/UniWebViewErrorEvent.d.ts +59 -59
  70. package/types/native/UniWebViewLoadEvent.d.ts +41 -41
  71. package/types/native/UniWebViewLoadingEvent.d.ts +41 -41
  72. package/types/native/UniWebViewMessageEvent.d.ts +36 -36
  73. package/types/native/UniWebViewServiceMessageEvent.d.ts +8 -8
  74. package/types/native/ViewToTempFilePathOptions.d.ts +47 -47
  75. package/types/native/WebViewStyles.d.ts +20 -20
  76. package/types/native/global.d.ts +598 -598
  77. package/types/native/index.d.ts +71 -71
  78. package/types/native-global/index.d.ts +1 -1
  79. package/types/page.d.ts +1682 -1682
  80. package/types/process.d.ts +5 -5
  81. package/types/uni/base/index.d.ts +3 -3
  82. package/types/uni/env/index.d.ts +103 -103
  83. package/types/uni/global.d.ts +6 -6
  84. package/types/uni/index.d.ts +4 -4
  85. package/types/uni/uts-plugin-api/global.d.ts +58 -57
  86. package/types/uni/uts-plugin-api/index.d.ts +58 -57
  87. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/global.d.ts +26 -26
  88. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/index.d.ts +12 -12
  89. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/interface.d.ts +231 -231
  90. package/types/uni/uts-plugin-api/lib/uni-animationFrame/utssdk/global.d.ts +12 -12
  91. package/types/uni/uts-plugin-api/lib/uni-animationFrame/utssdk/index.d.ts +5 -5
  92. package/types/uni/uts-plugin-api/lib/uni-animationFrame/utssdk/interface.d.ts +50 -50
  93. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/global.d.ts +10 -10
  94. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/index.d.ts +4 -4
  95. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/interface.d.ts +77 -77
  96. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/global.d.ts +60 -0
  97. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/index.d.ts +29 -0
  98. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/interface.d.ts +161 -0
  99. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/global.d.ts +10 -10
  100. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/index.d.ts +4 -4
  101. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/interface.d.ts +77 -77
  102. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/global.d.ts +20 -20
  103. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/index.d.ts +9 -9
  104. package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/interface.d.ts +264 -242
  105. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/global.d.ts +40 -40
  106. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/index.d.ts +19 -19
  107. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/interface.d.ts +203 -203
  108. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/global.d.ts +12 -12
  109. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/index.d.ts +5 -5
  110. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +1733 -1733
  111. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/global.d.ts +20 -20
  112. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/index.d.ts +9 -9
  113. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/interface.d.ts +152 -152
  114. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/global.d.ts +18 -18
  115. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/index.d.ts +8 -8
  116. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +61 -61
  117. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/global.d.ts +20 -20
  118. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/index.d.ts +9 -9
  119. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +464 -427
  120. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/global.d.ts +12 -12
  121. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +5 -5
  122. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +137 -137
  123. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/global.d.ts +28 -28
  124. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/index.d.ts +13 -13
  125. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +1336 -1336
  126. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/global.d.ts +16 -16
  127. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/index.d.ts +7 -7
  128. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +305 -305
  129. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/global.d.ts +26 -26
  130. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/index.d.ts +12 -12
  131. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +91 -91
  132. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/global.d.ts +80 -80
  133. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/index.d.ts +39 -39
  134. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/interface.d.ts +174 -174
  135. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/global.d.ts +142 -142
  136. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/index.d.ts +70 -70
  137. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +1840 -1840
  138. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/global.d.ts +10 -10
  139. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +4 -4
  140. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/global.d.ts +12 -12
  141. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +5 -5
  142. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +329 -329
  143. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/global.d.ts +14 -14
  144. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/index.d.ts +6 -6
  145. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +818 -818
  146. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/global.d.ts +12 -12
  147. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/index.d.ts +5 -5
  148. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +297 -297
  149. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/global.d.ts +14 -14
  150. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/index.d.ts +6 -6
  151. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +657 -657
  152. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/global.d.ts +10 -10
  153. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/index.d.ts +4 -4
  154. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +81 -81
  155. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/global.d.ts +12 -12
  156. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/index.d.ts +5 -5
  157. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +155 -155
  158. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/global.d.ts +12 -12
  159. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/index.d.ts +5 -5
  160. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +159 -159
  161. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/global.d.ts +24 -24
  162. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/index.d.ts +11 -11
  163. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/interface.d.ts +563 -564
  164. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/global.d.ts +8 -8
  165. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/index.d.ts +4 -4
  166. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +1 -1
  167. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/global.d.ts +8 -8
  168. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent/utssdk/index.d.ts +4 -4
  169. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/global.d.ts +32 -32
  170. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/index.d.ts +15 -15
  171. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/global.d.ts +22 -22
  172. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/index.d.ts +10 -10
  173. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +163 -163
  174. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/global.d.ts +30 -32
  175. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/index.d.ts +14 -15
  176. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +375 -375
  177. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/global.d.ts +16 -16
  178. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/index.d.ts +7 -7
  179. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/interface.d.ts +980 -980
  180. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/global.d.ts +30 -30
  181. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/index.d.ts +14 -14
  182. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +2131 -2131
  183. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/global.d.ts +12 -12
  184. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/index.d.ts +5 -5
  185. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +169 -169
  186. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/global.d.ts +24 -24
  187. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/index.d.ts +11 -11
  188. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/global.d.ts +16 -16
  189. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/index.d.ts +7 -7
  190. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/interface.d.ts +169 -169
  191. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/global.d.ts +22 -22
  192. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/index.d.ts +10 -10
  193. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +60 -60
  194. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/global.d.ts +26 -26
  195. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/index.d.ts +12 -12
  196. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +564 -564
  197. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/global.d.ts +24 -24
  198. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/index.d.ts +11 -11
  199. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/interface.d.ts +100 -100
  200. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +160 -160
  201. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +79 -79
  202. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +1339 -1339
  203. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/global.d.ts +68 -68
  204. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/index.d.ts +33 -33
  205. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +1002 -1002
  206. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/global.d.ts +72 -72
  207. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/index.d.ts +35 -35
  208. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +1493 -1493
  209. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/global.d.ts +24 -24
  210. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +11 -11
  211. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/global.d.ts +24 -24
  212. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/index.d.ts +11 -11
  213. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +70 -70
  214. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/global.d.ts +26 -26
  215. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/index.d.ts +12 -12
  216. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +153 -153
  217. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/global.d.ts +32 -32
  218. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/index.d.ts +15 -15
  219. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +240 -240
  220. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/global.d.ts +8 -8
  221. package/types/uni/uts-plugin-api/lib/uni-payment-alipay/utssdk/index.d.ts +4 -4
  222. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/global.d.ts +8 -8
  223. package/types/uni/uts-plugin-api/lib/uni-payment-wxpay/utssdk/index.d.ts +4 -4
  224. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/global.d.ts +78 -74
  225. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/index.d.ts +38 -36
  226. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +193 -8
  227. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/global.d.ts +28 -28
  228. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/index.d.ts +13 -13
  229. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +189 -189
  230. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/global.d.ts +58 -58
  231. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/index.d.ts +28 -28
  232. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +2165 -2165
  233. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/global.d.ts +10 -10
  234. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/index.d.ts +4 -4
  235. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +38 -38
  236. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/global.d.ts +24 -24
  237. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/index.d.ts +11 -11
  238. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +73 -73
  239. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/global.d.ts +78 -78
  240. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/index.d.ts +38 -38
  241. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +600 -600
  242. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/global.d.ts +148 -148
  243. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/index.d.ts +73 -73
  244. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +1086 -1086
  245. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/global.d.ts +42 -42
  246. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/index.d.ts +20 -20
  247. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/global.d.ts +112 -112
  248. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/index.d.ts +55 -55
  249. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/global.d.ts +58 -58
  250. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/index.d.ts +28 -28
  251. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +844 -844
  252. package/types/uni/uts-plugin-biz/global.d.ts +4 -4
  253. package/types/uni/uts-plugin-biz/index.d.ts +4 -4
  254. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/global.d.ts +36 -36
  255. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/index.d.ts +17 -17
  256. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +141 -141
  257. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/global.d.ts +28 -28
  258. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/index.d.ts +13 -13
  259. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +160 -160
  260. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/global.d.ts +60 -60
  261. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/index.d.ts +29 -29
  262. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +808 -778
  263. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/global.d.ts +46 -46
  264. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/index.d.ts +22 -22
  265. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +207 -207
  266. package/types/uni/uts-plugin-component/global.d.ts +1 -1
  267. package/types/uni/uts-plugin-component/index.d.ts +1 -1
  268. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/global.d.ts +64 -64
  269. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +31 -31
  270. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +522 -522
  271. package/types/uni/uts-plugin-extend/README.md +3 -3
  272. package/types/uni/uts-plugin-extend/global.d.ts +14 -14
  273. package/types/uni/uts-plugin-extend/index.d.ts +14 -14
  274. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/global.d.ts +12 -12
  275. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/index.d.ts +1 -1
  276. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/interface.d.ts +365 -365
  277. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/global.d.ts +23 -23
  278. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/index.d.ts +10 -10
  279. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/interface.d.ts +710 -710
  280. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/global.d.ts +21 -21
  281. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/index.d.ts +9 -9
  282. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/interface.d.ts +151 -151
  283. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/global.d.ts +25 -25
  284. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/index.d.ts +11 -11
  285. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/interface.d.ts +363 -363
  286. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/global.d.ts +11 -11
  287. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/index.d.ts +4 -4
  288. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +224 -224
  289. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/global.d.ts +53 -53
  290. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/index.d.ts +25 -25
  291. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/interface.d.ts +487 -487
  292. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/global.d.ts +13 -13
  293. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/index.d.ts +5 -5
  294. package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/interface.d.ts +126 -126
  295. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/global.d.ts +7 -7
  296. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/index.d.ts +1 -1
  297. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +296 -296
  298. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/global.d.ts +15 -15
  299. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/index.d.ts +1 -1
  300. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/interface.d.ts +229 -229
  301. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/global.d.ts +14 -14
  302. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/index.d.ts +1 -1
  303. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/interface.d.ts +559 -559
  304. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/global.d.ts +9 -9
  305. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/index.d.ts +1 -1
  306. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/interface.d.ts +163 -163
  307. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/global.d.ts +21 -21
  308. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/index.d.ts +9 -9
  309. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/interface.d.ts +143 -143
  310. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/global.d.ts +7 -7
  311. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/index.d.ts +1 -1
  312. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/interface.d.ts +106 -106
  313. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/global.d.ts +9 -9
  314. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/index.d.ts +1 -1
  315. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/interface.d.ts +165 -165
  316. package/types/uni-cloud/index.d.ts +67 -63
  317. package/types/uni-cloud/interface.d.ts +987 -991
  318. package/types/uni-cloud/unicloud-db/index.ts +314 -314
  319. package/types/uni-global/index.d.ts +1 -1
  320. package/types/vue/CheckboxGroupChangeEvent.d.ts +41 -41
  321. package/types/vue/LifeCycle.d.ts +55 -55
  322. package/types/vue/PickerViewChangeEvent.d.ts +41 -41
  323. package/types/vue/ProgressActiveendEvent.d.ts +32 -32
  324. package/types/vue/RadioGroupChangeEvent.d.ts +41 -41
  325. package/types/vue/SliderChangeEvent.d.ts +35 -35
  326. package/types/vue/SwitchChangeEvent.d.ts +32 -32
  327. package/types/vue/UniCanvasElement.d.ts +275 -275
  328. package/types/vue/UniCloudDBElement.d.ts +217 -217
  329. package/types/vue/UniFormElement.d.ts +54 -54
  330. package/types/vue/UniNavigatorElement.d.ts +11 -11
  331. package/types/vue/global.d.ts +191 -191
  332. package/types/vue/index.d.ts +10 -10
  333. package/types/vue-global/index.d.ts +1 -1
  334. package/uts-plugin.d.ts +27 -27
  335. package/types/shim-uts-basic.d.ts +0 -4495
@@ -1,4495 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation. All rights reserved.
3
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
- this file except in compliance with the License. You may obtain a copy of the
5
- License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
- MERCHANTABLITY OR NON-INFRINGEMENT.
11
-
12
- See the Apache Version 2.0 License for specific language governing permissions
13
- and limitations under the License.
14
- ***************************************************************************** */
15
-
16
-
17
- /// <reference no-default-lib="true"/>
18
-
19
- /// <reference lib="decorators" />
20
- /// <reference lib="decorators.legacy" />
21
-
22
- /////////////////////////////
23
- /// ECMAScript APIs
24
- /////////////////////////////
25
-
26
- declare var NaN: number;
27
- declare var Infinity: number;
28
-
29
- /**
30
- * Evaluates JavaScript code and executes it.
31
- * @param x A String value that contains valid JavaScript code.
32
- */
33
- declare function eval(x: string): any;
34
-
35
- /**
36
- * Converts a string to an integer.
37
- * @param string A string to convert into a number.
38
- * @param radix A value between 2 and 36 that specifies the base of the number in `string`.
39
- * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
40
- * All other strings are considered decimal.
41
- */
42
- declare function parseInt(string: string, radix?: number): number;
43
-
44
- /**
45
- * Converts a string to a floating-point number.
46
- * @param string A string that contains a floating-point number.
47
- */
48
- declare function parseFloat(string: string): number;
49
-
50
- /**
51
- * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
52
- * @param number A numeric value.
53
- */
54
- declare function isNaN(number: number): boolean;
55
-
56
- /**
57
- * Determines whether a supplied number is finite.
58
- * @param number Any numeric value.
59
- */
60
- declare function isFinite(number: number): boolean;
61
-
62
- /**
63
- * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
64
- * @param encodedURI A value representing an encoded URI.
65
- */
66
- declare function decodeURI(encodedURI: string): string;
67
-
68
- /**
69
- * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
70
- * @param encodedURIComponent A value representing an encoded URI component.
71
- */
72
- declare function decodeURIComponent(encodedURIComponent: string): string;
73
-
74
- /**
75
- * Encodes a text string as a valid Uniform Resource Identifier (URI)
76
- * @param uri A value representing an unencoded URI.
77
- */
78
- declare function encodeURI(uri: string): string;
79
-
80
- /**
81
- * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
82
- * @param uriComponent A value representing an unencoded URI component.
83
- */
84
- declare function encodeURIComponent(uriComponent: string | number | boolean): string;
85
-
86
- /**
87
- * Computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.
88
- * @deprecated A legacy feature for browser compatibility
89
- * @param string A string value
90
- */
91
- declare function escape(string: string): string;
92
-
93
- /**
94
- * Computes a new string in which hexadecimal escape sequences are replaced with the character that it represents.
95
- * @deprecated A legacy feature for browser compatibility
96
- * @param string A string value
97
- */
98
- declare function unescape(string: string): string;
99
-
100
- interface Symbol {
101
- /** Returns a string representation of an object. */
102
- toString(): string;
103
-
104
- /** Returns the primitive value of the specified object. */
105
- valueOf(): symbol;
106
- }
107
-
108
- declare type PropertyKey = string | number | symbol;
109
-
110
- interface PropertyDescriptor {
111
- configurable?: boolean;
112
- enumerable?: boolean;
113
- value?: any;
114
- writable?: boolean;
115
- get?(): any;
116
- set?(v: any): void;
117
- }
118
-
119
- interface PropertyDescriptorMap {
120
- [key: PropertyKey]: PropertyDescriptor;
121
- }
122
-
123
- interface Object {
124
- /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
125
- constructor: Function;
126
-
127
- /** Returns a string representation of an object. */
128
- toString(): string;
129
-
130
- /** Returns a date converted to a string using the current locale. */
131
- toLocaleString(): string;
132
-
133
- /** Returns the primitive value of the specified object. */
134
- valueOf(): Object;
135
-
136
- /**
137
- * Determines whether an object has a property with the specified name.
138
- * @param v A property name.
139
- */
140
- hasOwnProperty(v: PropertyKey): boolean;
141
-
142
- /**
143
- * Determines whether an object exists in another object's prototype chain.
144
- * @param v Another object whose prototype chain is to be checked.
145
- */
146
- isPrototypeOf(v: Object): boolean;
147
-
148
- /**
149
- * Determines whether a specified property is enumerable.
150
- * @param v A property name.
151
- */
152
- propertyIsEnumerable(v: PropertyKey): boolean;
153
- }
154
-
155
- interface ObjectConstructor {
156
- new(value?: any): Object;
157
- (): any;
158
- (value: any): any;
159
-
160
- /** A reference to the prototype for a class of objects. */
161
- readonly prototype: Object;
162
-
163
- /**
164
- * Returns the prototype of an object.
165
- * @param o The object that references the prototype.
166
- */
167
- getPrototypeOf(o: any): any;
168
-
169
- /**
170
- * Gets the own property descriptor of the specified object.
171
- * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
172
- * @param o Object that contains the property.
173
- * @param p Name of the property.
174
- */
175
- getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined;
176
-
177
- /**
178
- * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
179
- * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
180
- * @param o Object that contains the own properties.
181
- */
182
- getOwnPropertyNames(o: any): string[];
183
-
184
- /**
185
- * Creates an object that has the specified prototype or that has null prototype.
186
- * @param o Object to use as a prototype. May be null.
187
- */
188
- create(o: object | null): any;
189
-
190
- /**
191
- * Creates an object that has the specified prototype, and that optionally contains specified properties.
192
- * @param o Object to use as a prototype. May be null
193
- * @param properties JavaScript object that contains one or more property descriptors.
194
- */
195
- create(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
196
-
197
- /**
198
- * Adds a property to an object, or modifies attributes of an existing property.
199
- * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
200
- * @param p The property name.
201
- * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
202
- */
203
- defineProperty<T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): T;
204
-
205
- /**
206
- * Adds one or more properties to an object, and/or modifies attributes of existing properties.
207
- * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
208
- * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
209
- */
210
- defineProperties<T>(o: T, properties: PropertyDescriptorMap & ThisType<any>): T;
211
-
212
- /**
213
- * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
214
- * @param o Object on which to lock the attributes.
215
- */
216
- seal<T>(o: T): T;
217
-
218
- /**
219
- * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
220
- * @param f Object on which to lock the attributes.
221
- */
222
- freeze<T extends Function>(f: T): T;
223
-
224
- /**
225
- * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
226
- * @param o Object on which to lock the attributes.
227
- */
228
- freeze<T extends {[idx: string]: U | null | undefined | object}, U extends string | bigint | number | boolean | symbol>(o: T): Readonly<T>;
229
-
230
- /**
231
- * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
232
- * @param o Object on which to lock the attributes.
233
- */
234
- freeze<T>(o: T): Readonly<T>;
235
-
236
- /**
237
- * Prevents the addition of new properties to an object.
238
- * @param o Object to make non-extensible.
239
- */
240
- preventExtensions<T>(o: T): T;
241
-
242
- /**
243
- * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
244
- * @param o Object to test.
245
- */
246
- isSealed(o: any): boolean;
247
-
248
- /**
249
- * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
250
- * @param o Object to test.
251
- */
252
- isFrozen(o: any): boolean;
253
-
254
- /**
255
- * Returns a value that indicates whether new properties can be added to an object.
256
- * @param o Object to test.
257
- */
258
- isExtensible(o: any): boolean;
259
-
260
- /**
261
- * Returns the names of the enumerable string properties and methods of an object.
262
- * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
263
- */
264
- keys(o: object): string[];
265
- }
266
-
267
- /**
268
- * Provides functionality common to all JavaScript objects.
269
- */
270
- declare var Object: ObjectConstructor;
271
-
272
- /**
273
- * Creates a new function.
274
- */
275
- interface Function {
276
- /**
277
- * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
278
- * @param thisArg The object to be used as the this object.
279
- * @param argArray A set of arguments to be passed to the function.
280
- */
281
- apply(this: Function, thisArg: any, argArray?: any): any;
282
-
283
- /**
284
- * Calls a method of an object, substituting another object for the current object.
285
- * @param thisArg The object to be used as the current object.
286
- * @param argArray A list of arguments to be passed to the method.
287
- */
288
- call(this: Function, thisArg: any, ...argArray: any[]): any;
289
-
290
- /**
291
- * For a given function, creates a bound function that has the same body as the original function.
292
- * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
293
- * @param thisArg An object to which the this keyword can refer inside the new function.
294
- * @param argArray A list of arguments to be passed to the new function.
295
- */
296
- bind(this: Function, thisArg: any, ...argArray: any[]): any;
297
-
298
- /** Returns a string representation of a function. */
299
- toString(): string;
300
-
301
- prototype: any;
302
- readonly length: number;
303
-
304
- // Non-standard extensions
305
- arguments: any;
306
- caller: Function;
307
- }
308
-
309
- interface FunctionConstructor {
310
- /**
311
- * Creates a new function.
312
- * @param args A list of arguments the function accepts.
313
- */
314
- new(...args: string[]): Function;
315
- (...args: string[]): Function;
316
- readonly prototype: Function;
317
- }
318
-
319
- declare var Function: FunctionConstructor;
320
-
321
- /**
322
- * Extracts the type of the 'this' parameter of a function type, or 'unknown' if the function type has no 'this' parameter.
323
- */
324
- type ThisParameterType<T> = T extends (this: infer U, ...args: never) => any ? U : unknown;
325
-
326
- /**
327
- * Removes the 'this' parameter from a function type.
328
- */
329
- type OmitThisParameter<T> = unknown extends ThisParameterType<T> ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T;
330
-
331
- interface CallableFunction extends Function {
332
- /**
333
- * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
334
- * @param thisArg The object to be used as the this object.
335
- */
336
- apply<T, R>(this: (this: T) => R, thisArg: T): R;
337
-
338
- /**
339
- * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
340
- * @param thisArg The object to be used as the this object.
341
- * @param args An array of argument values to be passed to the function.
342
- */
343
- apply<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R;
344
-
345
- /**
346
- * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
347
- * @param thisArg The object to be used as the this object.
348
- * @param args Argument values to be passed to the function.
349
- */
350
- call<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R;
351
-
352
- /**
353
- * For a given function, creates a bound function that has the same body as the original function.
354
- * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
355
- * @param thisArg The object to be used as the this object.
356
- */
357
- bind<T>(this: T, thisArg: ThisParameterType<T>): OmitThisParameter<T>;
358
-
359
- /**
360
- * For a given function, creates a bound function that has the same body as the original function.
361
- * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
362
- * @param thisArg The object to be used as the this object.
363
- * @param args Arguments to bind to the parameters of the function.
364
- */
365
- bind<T, A extends any[], B extends any[], R>(this: (this: T, ...args: [...A, ...B]) => R, thisArg: T, ...args: A): (...args: B) => R;
366
- }
367
-
368
- interface NewableFunction extends Function {
369
- /**
370
- * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
371
- * @param thisArg The object to be used as the this object.
372
- */
373
- apply<T>(this: new () => T, thisArg: T): void;
374
- /**
375
- * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
376
- * @param thisArg The object to be used as the this object.
377
- * @param args An array of argument values to be passed to the function.
378
- */
379
- apply<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void;
380
-
381
- /**
382
- * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
383
- * @param thisArg The object to be used as the this object.
384
- * @param args Argument values to be passed to the function.
385
- */
386
- call<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A): void;
387
-
388
- /**
389
- * For a given function, creates a bound function that has the same body as the original function.
390
- * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
391
- * @param thisArg The object to be used as the this object.
392
- */
393
- bind<T>(this: T, thisArg: any): T;
394
-
395
- /**
396
- * For a given function, creates a bound function that has the same body as the original function.
397
- * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
398
- * @param thisArg The object to be used as the this object.
399
- * @param args Arguments to bind to the parameters of the function.
400
- */
401
- bind<A extends any[], B extends any[], R>(this: new (...args: [...A, ...B]) => R, thisArg: any, ...args: A): new (...args: B) => R;
402
- }
403
-
404
- interface IArguments {
405
- [index: number]: any;
406
- length: number;
407
- callee: Function;
408
- }
409
-
410
- interface String {
411
- /** Returns a string representation of a string. */
412
- toString(): string;
413
-
414
- /**
415
- * Returns the character at the specified index.
416
- * @param pos The zero-based index of the desired character.
417
- */
418
- charAt(pos: number): string;
419
-
420
- /**
421
- * Returns the Unicode value of the character at the specified location.
422
- * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
423
- */
424
- charCodeAt(index: number): number;
425
-
426
- /**
427
- * Returns a string that contains the concatenation of two or more strings.
428
- * @param strings The strings to append to the end of the string.
429
- */
430
- concat(...strings: string[]): string;
431
-
432
- /**
433
- * Returns the position of the first occurrence of a substring.
434
- * @param searchString The substring to search for in the string
435
- * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
436
- */
437
- indexOf(searchString: string, position?: number): number;
438
-
439
- /**
440
- * Returns the last occurrence of a substring in the string.
441
- * @param searchString The substring to search for.
442
- * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
443
- */
444
- lastIndexOf(searchString: string, position?: number): number;
445
-
446
- /**
447
- * Determines whether two strings are equivalent in the current locale.
448
- * @param that String to compare to target string
449
- */
450
- localeCompare(that: string): number;
451
-
452
- /**
453
- * Matches a string with a regular expression, and returns an array containing the results of that search.
454
- * @param regexp A variable name or string literal containing the regular expression pattern and flags.
455
- */
456
- match(regexp: string | RegExp): RegExpMatchArray | null;
457
-
458
- /**
459
- * Replaces text in a string, using a regular expression or search string.
460
- * @param searchValue A string or regular expression to search for.
461
- * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced.
462
- */
463
- replace(searchValue: string | RegExp, replaceValue: string): string;
464
-
465
- /**
466
- * Replaces text in a string, using a regular expression or search string.
467
- * @param searchValue A string to search for.
468
- * @param replacer A function that returns the replacement text.
469
- */
470
- replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
471
-
472
- /**
473
- * Finds the first substring match in a regular expression search.
474
- * @param regexp The regular expression pattern and applicable flags.
475
- */
476
- search(regexp: string | RegExp): number;
477
-
478
- /**
479
- * Returns a section of a string.
480
- * @param start The index to the beginning of the specified portion of stringObj.
481
- * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
482
- * If this value is not specified, the substring continues to the end of stringObj.
483
- */
484
- slice(start?: number, end?: number): string;
485
-
486
- /**
487
- * Split a string into substrings using the specified separator and return them as an array.
488
- * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
489
- * @param limit A value used to limit the number of elements returned in the array.
490
- */
491
- split(separator: string | RegExp, limit?: number): string[];
492
-
493
- /**
494
- * Returns the substring at the specified location within a String object.
495
- * @param start The zero-based index number indicating the beginning of the substring.
496
- * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
497
- * If end is omitted, the characters from start through the end of the original string are returned.
498
- */
499
- substring(start: number, end?: number): string;
500
-
501
- /** Converts all the alphabetic characters in a string to lowercase. */
502
- toLowerCase(): string;
503
-
504
- /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
505
- toLocaleLowerCase(locales?: string | string[]): string;
506
-
507
- /** Converts all the alphabetic characters in a string to uppercase. */
508
- toUpperCase(): string;
509
-
510
- /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
511
- toLocaleUpperCase(locales?: string | string[]): string;
512
-
513
- /** Removes the leading and trailing white space and line terminator characters from a string. */
514
- trim(): string;
515
-
516
- /** Returns the length of a String object. */
517
- readonly length: number;
518
-
519
- // IE extensions
520
- /**
521
- * Gets a substring beginning at the specified location and having the specified length.
522
- * @deprecated A legacy feature for browser compatibility
523
- * @param from The starting position of the desired substring. The index of the first character in the string is zero.
524
- * @param length The number of characters to include in the returned substring.
525
- */
526
- substr(from: number, length?: number): string;
527
-
528
- /** Returns the primitive value of the specified object. */
529
- valueOf(): string;
530
-
531
- }
532
-
533
- interface StringConstructor {
534
- new(value?: any): String;
535
- (value?: any): string;
536
- readonly prototype: String;
537
- fromCharCode(...codes: number[]): string;
538
- }
539
-
540
- /**
541
- * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
542
- */
543
- declare var String: StringConstructor;
544
-
545
- interface Boolean {
546
- /** Returns the primitive value of the specified object. */
547
- valueOf(): boolean;
548
- }
549
-
550
- interface BooleanConstructor {
551
- new(value?: any): Boolean;
552
- <T>(value?: T): boolean;
553
- readonly prototype: Boolean;
554
- }
555
-
556
- declare var Boolean: BooleanConstructor;
557
-
558
- interface Number {
559
- /**
560
- * Returns a string representation of an object.
561
- * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
562
- */
563
- toString(radix?: number): string;
564
-
565
- /**
566
- * Returns a string representing a number in fixed-point notation.
567
- * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
568
- */
569
- toFixed(fractionDigits?: number): string;
570
-
571
- /**
572
- * Returns a string containing a number represented in exponential notation.
573
- * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
574
- */
575
- toExponential(fractionDigits?: number): string;
576
-
577
- /**
578
- * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
579
- * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
580
- */
581
- toPrecision(precision?: number): string;
582
-
583
- /** Returns the primitive value of the specified object. */
584
- valueOf(): number;
585
- }
586
-
587
- interface NumberConstructor {
588
- new(value?: any): Number;
589
- (value?: any): number;
590
- readonly prototype: Number;
591
-
592
- /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
593
- readonly MAX_VALUE: number;
594
-
595
- /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
596
- readonly MIN_VALUE: number;
597
-
598
- /**
599
- * A value that is not a number.
600
- * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
601
- */
602
- readonly NaN: number;
603
-
604
- /**
605
- * A value that is less than the largest negative number that can be represented in JavaScript.
606
- * JavaScript displays NEGATIVE_INFINITY values as -infinity.
607
- */
608
- readonly NEGATIVE_INFINITY: number;
609
-
610
- /**
611
- * A value greater than the largest number that can be represented in JavaScript.
612
- * JavaScript displays POSITIVE_INFINITY values as infinity.
613
- */
614
- readonly POSITIVE_INFINITY: number;
615
- }
616
-
617
- /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
618
- declare var Number: NumberConstructor;
619
-
620
- interface TemplateStringsArray extends ReadonlyArray<string> {
621
- readonly raw: readonly string[];
622
- }
623
-
624
- /**
625
- * The type of `import.meta`.
626
- *
627
- * If you need to declare that a given property exists on `import.meta`,
628
- * this type may be augmented via interface merging.
629
- */
630
- interface ImportMeta {
631
- }
632
-
633
- /**
634
- * The type for the optional second argument to `import()`.
635
- *
636
- * If your host environment supports additional options, this type may be
637
- * augmented via interface merging.
638
- */
639
- interface ImportCallOptions {
640
- assert?: ImportAssertions;
641
- }
642
-
643
- /**
644
- * The type for the `assert` property of the optional second argument to `import()`.
645
- */
646
- interface ImportAssertions {
647
- [key: string]: string;
648
- }
649
-
650
- interface Math {
651
- /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
652
- readonly E: number;
653
- /** The natural logarithm of 10. */
654
- readonly LN10: number;
655
- /** The natural logarithm of 2. */
656
- readonly LN2: number;
657
- /** The base-2 logarithm of e. */
658
- readonly LOG2E: number;
659
- /** The base-10 logarithm of e. */
660
- readonly LOG10E: number;
661
- /** Pi. This is the ratio of the circumference of a circle to its diameter. */
662
- readonly PI: number;
663
- /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
664
- readonly SQRT1_2: number;
665
- /** The square root of 2. */
666
- readonly SQRT2: number;
667
- /**
668
- * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
669
- * For example, the absolute value of -5 is the same as the absolute value of 5.
670
- * @param x A numeric expression for which the absolute value is needed.
671
- */
672
- abs(x: number): number;
673
- /**
674
- * Returns the arc cosine (or inverse cosine) of a number.
675
- * @param x A numeric expression.
676
- */
677
- acos(x: number): number;
678
- /**
679
- * Returns the arcsine of a number.
680
- * @param x A numeric expression.
681
- */
682
- asin(x: number): number;
683
- /**
684
- * Returns the arctangent of a number.
685
- * @param x A numeric expression for which the arctangent is needed.
686
- */
687
- atan(x: number): number;
688
- /**
689
- * Returns the angle (in radians) from the X axis to a point.
690
- * @param y A numeric expression representing the cartesian y-coordinate.
691
- * @param x A numeric expression representing the cartesian x-coordinate.
692
- */
693
- atan2(y: number, x: number): number;
694
- /**
695
- * Returns the smallest integer greater than or equal to its numeric argument.
696
- * @param x A numeric expression.
697
- */
698
- ceil(x: number): number;
699
- /**
700
- * Returns the cosine of a number.
701
- * @param x A numeric expression that contains an angle measured in radians.
702
- */
703
- cos(x: number): number;
704
- /**
705
- * Returns e (the base of natural logarithms) raised to a power.
706
- * @param x A numeric expression representing the power of e.
707
- */
708
- exp(x: number): number;
709
- /**
710
- * Returns the greatest integer less than or equal to its numeric argument.
711
- * @param x A numeric expression.
712
- */
713
- floor(x: number): number;
714
- /**
715
- * Returns the natural logarithm (base e) of a number.
716
- * @param x A numeric expression.
717
- */
718
- log(x: number): number;
719
- /**
720
- * Returns the larger of a set of supplied numeric expressions.
721
- * @param values Numeric expressions to be evaluated.
722
- */
723
- max(...values: number[]): number;
724
- /**
725
- * Returns the smaller of a set of supplied numeric expressions.
726
- * @param values Numeric expressions to be evaluated.
727
- */
728
- min(...values: number[]): number;
729
- /**
730
- * Returns the value of a base expression taken to a specified power.
731
- * @param x The base value of the expression.
732
- * @param y The exponent value of the expression.
733
- */
734
- pow(x: number, y: number): number;
735
- /** Returns a pseudorandom number between 0 and 1. */
736
- random(): number;
737
- /**
738
- * Returns a supplied numeric expression rounded to the nearest integer.
739
- * @param x The value to be rounded to the nearest integer.
740
- */
741
- round(x: number): number;
742
- /**
743
- * Returns the sine of a number.
744
- * @param x A numeric expression that contains an angle measured in radians.
745
- */
746
- sin(x: number): number;
747
- /**
748
- * Returns the square root of a number.
749
- * @param x A numeric expression.
750
- */
751
- sqrt(x: number): number;
752
- /**
753
- * Returns the tangent of a number.
754
- * @param x A numeric expression that contains an angle measured in radians.
755
- */
756
- tan(x: number): number;
757
- }
758
- /** An intrinsic object that provides basic mathematics functionality and constants. */
759
- declare var Math: Math;
760
-
761
- /** Enables basic storage and retrieval of dates and times. */
762
- interface Date {
763
- /** Returns a string representation of a date. The format of the string depends on the locale. */
764
- toString(): string;
765
- /** Returns a date as a string value. */
766
- toDateString(): string;
767
- /** Returns a time as a string value. */
768
- toTimeString(): string;
769
- /** Returns a value as a string value appropriate to the host environment's current locale. */
770
- toLocaleString(): string;
771
- /** Returns a date as a string value appropriate to the host environment's current locale. */
772
- toLocaleDateString(): string;
773
- /** Returns a time as a string value appropriate to the host environment's current locale. */
774
- toLocaleTimeString(): string;
775
- /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
776
- valueOf(): number;
777
- /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
778
- getTime(): number;
779
- /** Gets the year, using local time. */
780
- getFullYear(): number;
781
- /** Gets the year using Universal Coordinated Time (UTC). */
782
- getUTCFullYear(): number;
783
- /** Gets the month, using local time. */
784
- getMonth(): number;
785
- /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
786
- getUTCMonth(): number;
787
- /** Gets the day-of-the-month, using local time. */
788
- getDate(): number;
789
- /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
790
- getUTCDate(): number;
791
- /** Gets the day of the week, using local time. */
792
- getDay(): number;
793
- /** Gets the day of the week using Universal Coordinated Time (UTC). */
794
- getUTCDay(): number;
795
- /** Gets the hours in a date, using local time. */
796
- getHours(): number;
797
- /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
798
- getUTCHours(): number;
799
- /** Gets the minutes of a Date object, using local time. */
800
- getMinutes(): number;
801
- /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
802
- getUTCMinutes(): number;
803
- /** Gets the seconds of a Date object, using local time. */
804
- getSeconds(): number;
805
- /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
806
- getUTCSeconds(): number;
807
- /** Gets the milliseconds of a Date, using local time. */
808
- getMilliseconds(): number;
809
- /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
810
- getUTCMilliseconds(): number;
811
- /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
812
- getTimezoneOffset(): number;
813
- /**
814
- * Sets the date and time value in the Date object.
815
- * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
816
- */
817
- setTime(time: number): number;
818
- /**
819
- * Sets the milliseconds value in the Date object using local time.
820
- * @param ms A numeric value equal to the millisecond value.
821
- */
822
- setMilliseconds(ms: number): number;
823
- /**
824
- * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
825
- * @param ms A numeric value equal to the millisecond value.
826
- */
827
- setUTCMilliseconds(ms: number): number;
828
-
829
- /**
830
- * Sets the seconds value in the Date object using local time.
831
- * @param sec A numeric value equal to the seconds value.
832
- * @param ms A numeric value equal to the milliseconds value.
833
- */
834
- setSeconds(sec: number, ms?: number): number;
835
- /**
836
- * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
837
- * @param sec A numeric value equal to the seconds value.
838
- * @param ms A numeric value equal to the milliseconds value.
839
- */
840
- setUTCSeconds(sec: number, ms?: number): number;
841
- /**
842
- * Sets the minutes value in the Date object using local time.
843
- * @param min A numeric value equal to the minutes value.
844
- * @param sec A numeric value equal to the seconds value.
845
- * @param ms A numeric value equal to the milliseconds value.
846
- */
847
- setMinutes(min: number, sec?: number, ms?: number): number;
848
- /**
849
- * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
850
- * @param min A numeric value equal to the minutes value.
851
- * @param sec A numeric value equal to the seconds value.
852
- * @param ms A numeric value equal to the milliseconds value.
853
- */
854
- setUTCMinutes(min: number, sec?: number, ms?: number): number;
855
- /**
856
- * Sets the hour value in the Date object using local time.
857
- * @param hours A numeric value equal to the hours value.
858
- * @param min A numeric value equal to the minutes value.
859
- * @param sec A numeric value equal to the seconds value.
860
- * @param ms A numeric value equal to the milliseconds value.
861
- */
862
- setHours(hours: number, min?: number, sec?: number, ms?: number): number;
863
- /**
864
- * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
865
- * @param hours A numeric value equal to the hours value.
866
- * @param min A numeric value equal to the minutes value.
867
- * @param sec A numeric value equal to the seconds value.
868
- * @param ms A numeric value equal to the milliseconds value.
869
- */
870
- setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
871
- /**
872
- * Sets the numeric day-of-the-month value of the Date object using local time.
873
- * @param date A numeric value equal to the day of the month.
874
- */
875
- setDate(date: number): number;
876
- /**
877
- * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
878
- * @param date A numeric value equal to the day of the month.
879
- */
880
- setUTCDate(date: number): number;
881
- /**
882
- * Sets the month value in the Date object using local time.
883
- * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
884
- * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
885
- */
886
- setMonth(month: number, date?: number): number;
887
- /**
888
- * Sets the month value in the Date object using Universal Coordinated Time (UTC).
889
- * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
890
- * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
891
- */
892
- setUTCMonth(month: number, date?: number): number;
893
- /**
894
- * Sets the year of the Date object using local time.
895
- * @param year A numeric value for the year.
896
- * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
897
- * @param date A numeric value equal for the day of the month.
898
- */
899
- setFullYear(year: number, month?: number, date?: number): number;
900
- /**
901
- * Sets the year value in the Date object using Universal Coordinated Time (UTC).
902
- * @param year A numeric value equal to the year.
903
- * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
904
- * @param date A numeric value equal to the day of the month.
905
- */
906
- setUTCFullYear(year: number, month?: number, date?: number): number;
907
- /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
908
- toUTCString(): string;
909
- /** Returns a date as a string value in ISO format. */
910
- toISOString(): string;
911
- /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
912
- toJSON(key?: any): string;
913
- }
914
-
915
- interface DateConstructor {
916
- new(): Date;
917
- new(value: number | string): Date;
918
- /**
919
- * Creates a new Date.
920
- * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
921
- * @param monthIndex The month as a number between 0 and 11 (January to December).
922
- * @param date The date as a number between 1 and 31.
923
- * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
924
- * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
925
- * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
926
- * @param ms A number from 0 to 999 that specifies the milliseconds.
927
- */
928
- new(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
929
- (): string;
930
- readonly prototype: Date;
931
- /**
932
- * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
933
- * @param s A date string
934
- */
935
- parse(s: string): number;
936
- /**
937
- * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
938
- * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
939
- * @param monthIndex The month as a number between 0 and 11 (January to December).
940
- * @param date The date as a number between 1 and 31.
941
- * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
942
- * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
943
- * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
944
- * @param ms A number from 0 to 999 that specifies the milliseconds.
945
- */
946
- UTC(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
947
- /** Returns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC). */
948
- now(): number;
949
- }
950
-
951
- declare var Date: DateConstructor;
952
-
953
- interface RegExpMatchArray extends Array<string> {
954
- /**
955
- * The index of the search at which the result was found.
956
- */
957
- index?: number;
958
- /**
959
- * A copy of the search string.
960
- */
961
- input?: string;
962
- /**
963
- * The first match. This will always be present because `null` will be returned if there are no matches.
964
- */
965
- 0: string;
966
- }
967
-
968
- interface RegExpExecArray extends Array<string> {
969
- /**
970
- * The index of the search at which the result was found.
971
- */
972
- index: number;
973
- /**
974
- * A copy of the search string.
975
- */
976
- input: string;
977
- /**
978
- * The first match. This will always be present because `null` will be returned if there are no matches.
979
- */
980
- 0: string;
981
- }
982
-
983
- interface RegExp {
984
- /**
985
- * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
986
- * @param string The String object or string literal on which to perform the search.
987
- */
988
- exec(string: string): RegExpExecArray | null;
989
-
990
- /**
991
- * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
992
- * @param string String on which to perform the search.
993
- */
994
- test(string: string): boolean;
995
-
996
- /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
997
- readonly source: string;
998
-
999
- /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
1000
- readonly global: boolean;
1001
-
1002
- /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
1003
- readonly ignoreCase: boolean;
1004
-
1005
- /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
1006
- readonly multiline: boolean;
1007
-
1008
- lastIndex: number;
1009
-
1010
- // Non-standard extensions
1011
- /** @deprecated A legacy feature for browser compatibility */
1012
- compile(pattern: string, flags?: string): this;
1013
- }
1014
-
1015
- interface RegExpConstructor {
1016
- new(pattern: RegExp | string): RegExp;
1017
- new(pattern: string, flags?: string): RegExp;
1018
- (pattern: RegExp | string): RegExp;
1019
- (pattern: string, flags?: string): RegExp;
1020
- readonly prototype: RegExp;
1021
-
1022
- // Non-standard extensions
1023
- /** @deprecated A legacy feature for browser compatibility */
1024
- $1: string;
1025
- /** @deprecated A legacy feature for browser compatibility */
1026
- $2: string;
1027
- /** @deprecated A legacy feature for browser compatibility */
1028
- $3: string;
1029
- /** @deprecated A legacy feature for browser compatibility */
1030
- $4: string;
1031
- /** @deprecated A legacy feature for browser compatibility */
1032
- $5: string;
1033
- /** @deprecated A legacy feature for browser compatibility */
1034
- $6: string;
1035
- /** @deprecated A legacy feature for browser compatibility */
1036
- $7: string;
1037
- /** @deprecated A legacy feature for browser compatibility */
1038
- $8: string;
1039
- /** @deprecated A legacy feature for browser compatibility */
1040
- $9: string;
1041
- /** @deprecated A legacy feature for browser compatibility */
1042
- input: string;
1043
- /** @deprecated A legacy feature for browser compatibility */
1044
- $_: string;
1045
- /** @deprecated A legacy feature for browser compatibility */
1046
- lastMatch: string;
1047
- /** @deprecated A legacy feature for browser compatibility */
1048
- "$&": string;
1049
- /** @deprecated A legacy feature for browser compatibility */
1050
- lastParen: string;
1051
- /** @deprecated A legacy feature for browser compatibility */
1052
- "$+": string;
1053
- /** @deprecated A legacy feature for browser compatibility */
1054
- leftContext: string;
1055
- /** @deprecated A legacy feature for browser compatibility */
1056
- "$`": string;
1057
- /** @deprecated A legacy feature for browser compatibility */
1058
- rightContext: string;
1059
- /** @deprecated A legacy feature for browser compatibility */
1060
- "$'": string;
1061
- }
1062
-
1063
- declare var RegExp: RegExpConstructor;
1064
-
1065
- interface ErrorConstructor {
1066
- new(message?: string): Error;
1067
- (message?: string): Error;
1068
- readonly prototype: Error;
1069
- }
1070
-
1071
- interface EvalError extends Error {
1072
- }
1073
-
1074
- interface EvalErrorConstructor extends ErrorConstructor {
1075
- new(message?: string): EvalError;
1076
- (message?: string): EvalError;
1077
- readonly prototype: EvalError;
1078
- }
1079
-
1080
- declare var EvalError: EvalErrorConstructor;
1081
-
1082
- interface RangeError extends Error {
1083
- }
1084
-
1085
- interface RangeErrorConstructor extends ErrorConstructor {
1086
- new(message?: string): RangeError;
1087
- (message?: string): RangeError;
1088
- readonly prototype: RangeError;
1089
- }
1090
-
1091
- declare var RangeError: RangeErrorConstructor;
1092
-
1093
- interface ReferenceError extends Error {
1094
- }
1095
-
1096
- interface ReferenceErrorConstructor extends ErrorConstructor {
1097
- new(message?: string): ReferenceError;
1098
- (message?: string): ReferenceError;
1099
- readonly prototype: ReferenceError;
1100
- }
1101
-
1102
- declare var ReferenceError: ReferenceErrorConstructor;
1103
-
1104
- interface SyntaxError extends Error {
1105
- }
1106
-
1107
- interface SyntaxErrorConstructor extends ErrorConstructor {
1108
- new(message?: string): SyntaxError;
1109
- (message?: string): SyntaxError;
1110
- readonly prototype: SyntaxError;
1111
- }
1112
-
1113
- declare var SyntaxError: SyntaxErrorConstructor;
1114
-
1115
- interface TypeError extends Error {
1116
- }
1117
-
1118
- interface TypeErrorConstructor extends ErrorConstructor {
1119
- new(message?: string): TypeError;
1120
- (message?: string): TypeError;
1121
- readonly prototype: TypeError;
1122
- }
1123
-
1124
- declare var TypeError: TypeErrorConstructor;
1125
-
1126
- interface URIError extends Error {
1127
- }
1128
-
1129
- interface URIErrorConstructor extends ErrorConstructor {
1130
- new(message?: string): URIError;
1131
- (message?: string): URIError;
1132
- readonly prototype: URIError;
1133
- }
1134
-
1135
- declare var URIError: URIErrorConstructor;
1136
-
1137
- interface JSON {
1138
- /**
1139
- * Converts a JavaScript Object Notation (JSON) string into an object.
1140
- * @param text A valid JSON string.
1141
- * @param reviver A function that transforms the results. This function is called for each member of the object.
1142
- * If a member contains nested objects, the nested objects are transformed before the parent object is.
1143
- */
1144
- parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
1145
- /**
1146
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
1147
- * @param value A JavaScript value, usually an object or array, to be converted.
1148
- * @param replacer A function that transforms the results.
1149
- * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
1150
- */
1151
- stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
1152
- /**
1153
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
1154
- * @param value A JavaScript value, usually an object or array, to be converted.
1155
- * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.
1156
- * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
1157
- */
1158
- stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
1159
- }
1160
-
1161
- /**
1162
- * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
1163
- */
1164
- declare var JSON: JSON;
1165
-
1166
-
1167
- /////////////////////////////
1168
- /// ECMAScript Array API (specially handled by compiler)
1169
- /////////////////////////////
1170
-
1171
- interface ReadonlyArray<T> {
1172
- /**
1173
- * Gets the length of the array. This is a number one higher than the highest element defined in an array.
1174
- */
1175
- readonly length: number;
1176
- /**
1177
- * Returns a string representation of an array.
1178
- */
1179
- toString(): string;
1180
- /**
1181
- * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
1182
- */
1183
- toLocaleString(): string;
1184
- /**
1185
- * Combines two or more arrays.
1186
- * @param items Additional items to add to the end of array1.
1187
- */
1188
- concat(...items: ConcatArray<T>[]): T[];
1189
- /**
1190
- * Combines two or more arrays.
1191
- * @param items Additional items to add to the end of array1.
1192
- */
1193
- concat(...items: (T | ConcatArray<T>)[]): T[];
1194
- /**
1195
- * Adds all the elements of an array separated by the specified separator string.
1196
- * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
1197
- */
1198
- join(separator?: string): string;
1199
- /**
1200
- * Returns a section of an array.
1201
- * @param start The beginning of the specified portion of the array.
1202
- * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
1203
- */
1204
- slice(start?: number, end?: number): T[];
1205
- /**
1206
- * Returns the index of the first occurrence of a value in an array.
1207
- * @param searchElement The value to locate in the array.
1208
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
1209
- */
1210
- indexOf(searchElement: T, fromIndex?: number): number;
1211
- /**
1212
- * Returns the index of the last occurrence of a specified value in an array.
1213
- * @param searchElement The value to locate in the array.
1214
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
1215
- */
1216
- lastIndexOf(searchElement: T, fromIndex?: number): number;
1217
- /**
1218
- * Determines whether all the members of an array satisfy the specified test.
1219
- * @param predicate A function that accepts up to three arguments. The every method calls
1220
- * the predicate function for each element in the array until the predicate returns a value
1221
- * which is coercible to the Boolean value false, or until the end of the array.
1222
- * @param thisArg An object to which the this keyword can refer in the predicate function.
1223
- * If thisArg is omitted, undefined is used as the this value.
1224
- */
1225
- every<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[];
1226
- /**
1227
- * Determines whether all the members of an array satisfy the specified test.
1228
- * @param predicate A function that accepts up to three arguments. The every method calls
1229
- * the predicate function for each element in the array until the predicate returns a value
1230
- * which is coercible to the Boolean value false, or until the end of the array.
1231
- * @param thisArg An object to which the this keyword can refer in the predicate function.
1232
- * If thisArg is omitted, undefined is used as the this value.
1233
- */
1234
- every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean;
1235
- /**
1236
- * Determines whether the specified callback function returns true for any element of an array.
1237
- * @param predicate A function that accepts up to three arguments. The some method calls
1238
- * the predicate function for each element in the array until the predicate returns a value
1239
- * which is coercible to the Boolean value true, or until the end of the array.
1240
- * @param thisArg An object to which the this keyword can refer in the predicate function.
1241
- * If thisArg is omitted, undefined is used as the this value.
1242
- */
1243
- some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean;
1244
- /**
1245
- * Performs the specified action for each element in an array.
1246
- * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
1247
- * @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.
1248
- */
1249
- forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void;
1250
- /**
1251
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
1252
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
1253
- * @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.
1254
- */
1255
- map<U>(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[];
1256
- /**
1257
- * Returns the elements of an array that meet the condition specified in a callback function.
1258
- * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
1259
- * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
1260
- */
1261
- filter<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[];
1262
- /**
1263
- * Returns the elements of an array that meet the condition specified in a callback function.
1264
- * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
1265
- * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
1266
- */
1267
- filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[];
1268
- /**
1269
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1270
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
1271
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1272
- */
1273
- reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T;
1274
- reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T;
1275
- /**
1276
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1277
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
1278
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1279
- */
1280
- reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U;
1281
- /**
1282
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1283
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
1284
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1285
- */
1286
- reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T;
1287
- reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T;
1288
- /**
1289
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1290
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
1291
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1292
- */
1293
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U;
1294
-
1295
- readonly [n: number]: T;
1296
- }
1297
-
1298
- interface ConcatArray<T> {
1299
- readonly length: number;
1300
- readonly [n: number]: T;
1301
- join(separator?: string): string;
1302
- slice(start?: number, end?: number): T[];
1303
- }
1304
-
1305
- interface Array<T> {
1306
- /**
1307
- * Gets or sets the length of the array. This is a number one higher than the highest index in the array.
1308
- */
1309
- length: number;
1310
- /**
1311
- * Returns a string representation of an array.
1312
- */
1313
- toString(): string;
1314
- /**
1315
- * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
1316
- */
1317
- toLocaleString(): string;
1318
- /**
1319
- * Removes the last element from an array and returns it.
1320
- * If the array is empty, undefined is returned and the array is not modified.
1321
- */
1322
- pop(): T | undefined;
1323
- /**
1324
- * Appends new elements to the end of an array, and returns the new length of the array.
1325
- * @param items New elements to add to the array.
1326
- */
1327
- push(...items: T[]): number;
1328
- /**
1329
- * Combines two or more arrays.
1330
- * This method returns a new array without modifying any existing arrays.
1331
- * @param items Additional arrays and/or items to add to the end of the array.
1332
- */
1333
- concat(...items: ConcatArray<T>[]): T[];
1334
- /**
1335
- * Combines two or more arrays.
1336
- * This method returns a new array without modifying any existing arrays.
1337
- * @param items Additional arrays and/or items to add to the end of the array.
1338
- */
1339
- concat(...items: (T | ConcatArray<T>)[]): T[];
1340
- /**
1341
- * Adds all the elements of an array into a string, separated by the specified separator string.
1342
- * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma.
1343
- */
1344
- join(separator?: string): string;
1345
- /**
1346
- * Reverses the elements in an array in place.
1347
- * This method mutates the array and returns a reference to the same array.
1348
- */
1349
- reverse(): T[];
1350
- /**
1351
- * Removes the first element from an array and returns it.
1352
- * If the array is empty, undefined is returned and the array is not modified.
1353
- */
1354
- shift(): T | undefined;
1355
- /**
1356
- * Returns a copy of a section of an array.
1357
- * For both start and end, a negative index can be used to indicate an offset from the end of the array.
1358
- * For example, -2 refers to the second to last element of the array.
1359
- * @param start The beginning index of the specified portion of the array.
1360
- * If start is undefined, then the slice begins at index 0.
1361
- * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'.
1362
- * If end is undefined, then the slice extends to the end of the array.
1363
- */
1364
- slice(start?: number, end?: number): T[];
1365
- /**
1366
- * Sorts an array in place.
1367
- * This method mutates the array and returns a reference to the same array.
1368
- * @param compareFn Function used to determine the order of the elements. It is expected to return
1369
- * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
1370
- * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
1371
- * ```ts
1372
- * [11,2,22,1].sort((a, b) => a - b)
1373
- * ```
1374
- */
1375
- sort(compareFn?: (a: T, b: T) => number): this;
1376
- /**
1377
- * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
1378
- * @param start The zero-based location in the array from which to start removing elements.
1379
- * @param deleteCount The number of elements to remove.
1380
- * @returns An array containing the elements that were deleted.
1381
- */
1382
- splice(start: number, deleteCount?: number): T[];
1383
- /**
1384
- * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
1385
- * @param start The zero-based location in the array from which to start removing elements.
1386
- * @param deleteCount The number of elements to remove.
1387
- * @param items Elements to insert into the array in place of the deleted elements.
1388
- * @returns An array containing the elements that were deleted.
1389
- */
1390
- splice(start: number, deleteCount: number, ...items: T[]): T[];
1391
- /**
1392
- * Inserts new elements at the start of an array, and returns the new length of the array.
1393
- * @param items Elements to insert at the start of the array.
1394
- */
1395
- unshift(...items: T[]): number;
1396
- /**
1397
- * Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
1398
- * @param searchElement The value to locate in the array.
1399
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
1400
- */
1401
- indexOf(searchElement: T, fromIndex?: number): number;
1402
- /**
1403
- * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.
1404
- * @param searchElement The value to locate in the array.
1405
- * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array.
1406
- */
1407
- lastIndexOf(searchElement: T, fromIndex?: number): number;
1408
- /**
1409
- * Determines whether all the members of an array satisfy the specified test.
1410
- * @param predicate A function that accepts up to three arguments. The every method calls
1411
- * the predicate function for each element in the array until the predicate returns a value
1412
- * which is coercible to the Boolean value false, or until the end of the array.
1413
- * @param thisArg An object to which the this keyword can refer in the predicate function.
1414
- * If thisArg is omitted, undefined is used as the this value.
1415
- */
1416
- every<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[];
1417
- /**
1418
- * Determines whether all the members of an array satisfy the specified test.
1419
- * @param predicate A function that accepts up to three arguments. The every method calls
1420
- * the predicate function for each element in the array until the predicate returns a value
1421
- * which is coercible to the Boolean value false, or until the end of the array.
1422
- * @param thisArg An object to which the this keyword can refer in the predicate function.
1423
- * If thisArg is omitted, undefined is used as the this value.
1424
- */
1425
- every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean;
1426
- /**
1427
- * Determines whether the specified callback function returns true for any element of an array.
1428
- * @param predicate A function that accepts up to three arguments. The some method calls
1429
- * the predicate function for each element in the array until the predicate returns a value
1430
- * which is coercible to the Boolean value true, or until the end of the array.
1431
- * @param thisArg An object to which the this keyword can refer in the predicate function.
1432
- * If thisArg is omitted, undefined is used as the this value.
1433
- */
1434
- some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean;
1435
- /**
1436
- * Performs the specified action for each element in an array.
1437
- * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
1438
- * @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.
1439
- */
1440
- forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
1441
- /**
1442
- * Calls a defined callback function on each element of an array, and returns an array that contains the results.
1443
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
1444
- * @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.
1445
- */
1446
- map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
1447
- /**
1448
- * Returns the elements of an array that meet the condition specified in a callback function.
1449
- * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
1450
- * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
1451
- */
1452
- filter<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[];
1453
- /**
1454
- * Returns the elements of an array that meet the condition specified in a callback function.
1455
- * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
1456
- * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
1457
- */
1458
- filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[];
1459
- /**
1460
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1461
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
1462
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1463
- */
1464
- reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T;
1465
- reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T;
1466
- /**
1467
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1468
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
1469
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1470
- */
1471
- reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
1472
- /**
1473
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1474
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
1475
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1476
- */
1477
- reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T;
1478
- reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T;
1479
- /**
1480
- * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1481
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
1482
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1483
- */
1484
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
1485
- }
1486
-
1487
- interface ArrayConstructor {
1488
- new(arrayLength?: number): any[];
1489
- new <T>(arrayLength: number): T[];
1490
- new <T>(...items: T[]): T[];
1491
- (arrayLength?: number): any[];
1492
- <T>(arrayLength: number): T[];
1493
- <T>(...items: T[]): T[];
1494
- isArray(arg: any): arg is any[];
1495
- readonly prototype: any[];
1496
- }
1497
-
1498
- declare var Array: ArrayConstructor;
1499
-
1500
- interface TypedPropertyDescriptor<T> {
1501
- enumerable?: boolean;
1502
- configurable?: boolean;
1503
- writable?: boolean;
1504
- value?: T;
1505
- get?: () => T;
1506
- set?: (value: T) => void;
1507
- }
1508
-
1509
- /**
1510
- * Recursively unwraps the "awaited type" of a type. Non-promise "thenables" should resolve to `never`. This emulates the behavior of `await`.
1511
- */
1512
- type Awaited<T> =
1513
- T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode
1514
- T extends object & { then(onfulfilled: infer F, ...args: infer _): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
1515
- F extends ((value: infer V, ...args: infer _) => any) ? // if the argument to `then` is callable, extracts the first argument
1516
- Awaited<V> : // recursively unwrap the value
1517
- never : // the argument to `then` was not callable
1518
- T; // non-object or non-thenable
1519
-
1520
- interface ArrayLike<T> {
1521
- readonly length: number;
1522
- readonly [n: number]: T;
1523
- }
1524
-
1525
- /**
1526
- * Make all properties in T optional
1527
- */
1528
- type Partial<T> = {
1529
- [P in keyof T]?: T[P];
1530
- };
1531
-
1532
- /**
1533
- * Make all properties in T required
1534
- */
1535
- type Required<T> = {
1536
- [P in keyof T]-?: T[P];
1537
- };
1538
-
1539
- /**
1540
- * Make all properties in T readonly
1541
- */
1542
- type Readonly<T> = {
1543
- readonly [P in keyof T]: T[P];
1544
- };
1545
-
1546
- /**
1547
- * From T, pick a set of properties whose keys are in the union K
1548
- */
1549
- type Pick<T, K extends keyof T> = {
1550
- [P in K]: T[P];
1551
- };
1552
-
1553
- /**
1554
- * Construct a type with a set of properties K of type T
1555
- */
1556
- type Record<K extends keyof any, T> = {
1557
- [P in K]: T;
1558
- };
1559
-
1560
- /**
1561
- * Exclude from T those types that are assignable to U
1562
- */
1563
- type Exclude<T, U> = T extends U ? never : T;
1564
-
1565
- /**
1566
- * Extract from T those types that are assignable to U
1567
- */
1568
- type Extract<T, U> = T extends U ? T : never;
1569
-
1570
- /**
1571
- * Construct a type with the properties of T except for those in type K.
1572
- */
1573
- type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
1574
-
1575
- /**
1576
- * Exclude null and undefined from T
1577
- */
1578
- type NonNullable<T> = T & {};
1579
-
1580
- /**
1581
- * Obtain the parameters of a function type in a tuple
1582
- */
1583
- type Parameters<T extends (...args: any) => any> = T extends (...args: infer P) => any ? P : never;
1584
-
1585
- /**
1586
- * Obtain the parameters of a constructor function type in a tuple
1587
- */
1588
- type ConstructorParameters<T extends abstract new (...args: any) => any> = T extends abstract new (...args: infer P) => any ? P : never;
1589
-
1590
- /**
1591
- * Obtain the return type of a function type
1592
- */
1593
- type ReturnType<T extends (...args: any) => any> = T extends (...args: any) => infer R ? R : any;
1594
-
1595
- /**
1596
- * Obtain the return type of a constructor function type
1597
- */
1598
- type InstanceType<T extends abstract new (...args: any) => any> = T extends abstract new (...args: any) => infer R ? R : any;
1599
-
1600
- /**
1601
- * Convert string literal type to uppercase
1602
- */
1603
- type Uppercase<S extends string> = intrinsic;
1604
-
1605
- /**
1606
- * Convert string literal type to lowercase
1607
- */
1608
- type Lowercase<S extends string> = intrinsic;
1609
-
1610
- /**
1611
- * Convert first character of string literal type to uppercase
1612
- */
1613
- type Capitalize<S extends string> = intrinsic;
1614
-
1615
- /**
1616
- * Convert first character of string literal type to lowercase
1617
- */
1618
- type Uncapitalize<S extends string> = intrinsic;
1619
-
1620
- /**
1621
- * Marker for contextual 'this' type
1622
- */
1623
- interface ThisType<T> { }
1624
-
1625
- /**
1626
- * Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry
1627
- */
1628
- interface WeakKeyTypes {
1629
- object: object;
1630
- }
1631
-
1632
- type WeakKey = WeakKeyTypes[keyof WeakKeyTypes];
1633
-
1634
- /**
1635
- * Represents a raw buffer of binary data, which is used to store data for the
1636
- * different typed arrays. ArrayBuffers cannot be read from or written to directly,
1637
- * but can be passed to a typed array or DataView Object to interpret the raw
1638
- * buffer as needed.
1639
- */
1640
- interface ArrayBuffer {
1641
- /**
1642
- * Read-only. The length of the ArrayBuffer (in bytes).
1643
- */
1644
- readonly byteLength: number;
1645
-
1646
- /**
1647
- * Returns a section of an ArrayBuffer.
1648
- */
1649
- slice(begin: number, end?: number): ArrayBuffer;
1650
- }
1651
-
1652
- /**
1653
- * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays.
1654
- */
1655
- interface ArrayBufferTypes {
1656
- ArrayBuffer: ArrayBuffer;
1657
- }
1658
- type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes];
1659
-
1660
- interface ArrayBufferConstructor {
1661
- readonly prototype: ArrayBuffer;
1662
- new(byteLength: number): ArrayBuffer;
1663
- isView(arg: any): arg is ArrayBufferView;
1664
- }
1665
- declare var ArrayBuffer: ArrayBufferConstructor;
1666
-
1667
- interface ArrayBufferView {
1668
- /**
1669
- * The ArrayBuffer instance referenced by the array.
1670
- */
1671
- buffer: ArrayBufferLike;
1672
-
1673
- /**
1674
- * The length in bytes of the array.
1675
- */
1676
- byteLength: number;
1677
-
1678
- /**
1679
- * The offset in bytes of the array.
1680
- */
1681
- byteOffset: number;
1682
- }
1683
-
1684
- interface DataView {
1685
- readonly buffer: ArrayBuffer;
1686
- readonly byteLength: number;
1687
- readonly byteOffset: number;
1688
- /**
1689
- * Gets the Float32 value at the specified byte offset from the start of the view. There is
1690
- * no alignment constraint; multi-byte values may be fetched from any offset.
1691
- * @param byteOffset The place in the buffer at which the value should be retrieved.
1692
- * @param littleEndian If false or undefined, a big-endian value should be read.
1693
- */
1694
- getFloat32(byteOffset: number, littleEndian?: boolean): number;
1695
-
1696
- /**
1697
- * Gets the Float64 value at the specified byte offset from the start of the view. There is
1698
- * no alignment constraint; multi-byte values may be fetched from any offset.
1699
- * @param byteOffset The place in the buffer at which the value should be retrieved.
1700
- * @param littleEndian If false or undefined, a big-endian value should be read.
1701
- */
1702
- getFloat64(byteOffset: number, littleEndian?: boolean): number;
1703
-
1704
- /**
1705
- * Gets the Int8 value at the specified byte offset from the start of the view. There is
1706
- * no alignment constraint; multi-byte values may be fetched from any offset.
1707
- * @param byteOffset The place in the buffer at which the value should be retrieved.
1708
- */
1709
- getInt8(byteOffset: number): number;
1710
-
1711
- /**
1712
- * Gets the Int16 value at the specified byte offset from the start of the view. There is
1713
- * no alignment constraint; multi-byte values may be fetched from any offset.
1714
- * @param byteOffset The place in the buffer at which the value should be retrieved.
1715
- * @param littleEndian If false or undefined, a big-endian value should be read.
1716
- */
1717
- getInt16(byteOffset: number, littleEndian?: boolean): number;
1718
- /**
1719
- * Gets the Int32 value at the specified byte offset from the start of the view. There is
1720
- * no alignment constraint; multi-byte values may be fetched from any offset.
1721
- * @param byteOffset The place in the buffer at which the value should be retrieved.
1722
- * @param littleEndian If false or undefined, a big-endian value should be read.
1723
- */
1724
- getInt32(byteOffset: number, littleEndian?: boolean): number;
1725
-
1726
- /**
1727
- * Gets the Uint8 value at the specified byte offset from the start of the view. There is
1728
- * no alignment constraint; multi-byte values may be fetched from any offset.
1729
- * @param byteOffset The place in the buffer at which the value should be retrieved.
1730
- */
1731
- getUint8(byteOffset: number): number;
1732
-
1733
- /**
1734
- * Gets the Uint16 value at the specified byte offset from the start of the view. There is
1735
- * no alignment constraint; multi-byte values may be fetched from any offset.
1736
- * @param byteOffset The place in the buffer at which the value should be retrieved.
1737
- * @param littleEndian If false or undefined, a big-endian value should be read.
1738
- */
1739
- getUint16(byteOffset: number, littleEndian?: boolean): number;
1740
-
1741
- /**
1742
- * Gets the Uint32 value at the specified byte offset from the start of the view. There is
1743
- * no alignment constraint; multi-byte values may be fetched from any offset.
1744
- * @param byteOffset The place in the buffer at which the value should be retrieved.
1745
- * @param littleEndian If false or undefined, a big-endian value should be read.
1746
- */
1747
- getUint32(byteOffset: number, littleEndian?: boolean): number;
1748
-
1749
- /**
1750
- * Stores an Float32 value at the specified byte offset from the start of the view.
1751
- * @param byteOffset The place in the buffer at which the value should be set.
1752
- * @param value The value to set.
1753
- * @param littleEndian If false or undefined, a big-endian value should be written.
1754
- */
1755
- setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
1756
-
1757
- /**
1758
- * Stores an Float64 value at the specified byte offset from the start of the view.
1759
- * @param byteOffset The place in the buffer at which the value should be set.
1760
- * @param value The value to set.
1761
- * @param littleEndian If false or undefined, a big-endian value should be written.
1762
- */
1763
- setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
1764
-
1765
- /**
1766
- * Stores an Int8 value at the specified byte offset from the start of the view.
1767
- * @param byteOffset The place in the buffer at which the value should be set.
1768
- * @param value The value to set.
1769
- */
1770
- setInt8(byteOffset: number, value: number): void;
1771
-
1772
- /**
1773
- * Stores an Int16 value at the specified byte offset from the start of the view.
1774
- * @param byteOffset The place in the buffer at which the value should be set.
1775
- * @param value The value to set.
1776
- * @param littleEndian If false or undefined, a big-endian value should be written.
1777
- */
1778
- setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
1779
-
1780
- /**
1781
- * Stores an Int32 value at the specified byte offset from the start of the view.
1782
- * @param byteOffset The place in the buffer at which the value should be set.
1783
- * @param value The value to set.
1784
- * @param littleEndian If false or undefined, a big-endian value should be written.
1785
- */
1786
- setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
1787
-
1788
- /**
1789
- * Stores an Uint8 value at the specified byte offset from the start of the view.
1790
- * @param byteOffset The place in the buffer at which the value should be set.
1791
- * @param value The value to set.
1792
- */
1793
- setUint8(byteOffset: number, value: number): void;
1794
-
1795
- /**
1796
- * Stores an Uint16 value at the specified byte offset from the start of the view.
1797
- * @param byteOffset The place in the buffer at which the value should be set.
1798
- * @param value The value to set.
1799
- * @param littleEndian If false or undefined, a big-endian value should be written.
1800
- */
1801
- setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
1802
-
1803
- /**
1804
- * Stores an Uint32 value at the specified byte offset from the start of the view.
1805
- * @param byteOffset The place in the buffer at which the value should be set.
1806
- * @param value The value to set.
1807
- * @param littleEndian If false or undefined, a big-endian value should be written.
1808
- */
1809
- setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
1810
- }
1811
-
1812
- interface DataViewConstructor {
1813
- readonly prototype: DataView;
1814
- new(buffer: ArrayBufferLike & { BYTES_PER_ELEMENT?: never }, byteOffset?: number, byteLength?: number): DataView;
1815
- }
1816
- declare var DataView: DataViewConstructor;
1817
-
1818
- /**
1819
- * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
1820
- * number of bytes could not be allocated an exception is raised.
1821
- */
1822
- interface Int8Array {
1823
- /**
1824
- * The size in bytes of each element in the array.
1825
- */
1826
- readonly BYTES_PER_ELEMENT: number;
1827
-
1828
- /**
1829
- * The ArrayBuffer instance referenced by the array.
1830
- */
1831
- readonly buffer: ArrayBufferLike;
1832
-
1833
- /**
1834
- * The length in bytes of the array.
1835
- */
1836
- readonly byteLength: number;
1837
-
1838
- /**
1839
- * The offset in bytes of the array.
1840
- */
1841
- readonly byteOffset: number;
1842
-
1843
- /**
1844
- * Returns the this object after copying a section of the array identified by start and end
1845
- * to the same array starting at position target
1846
- * @param target If target is negative, it is treated as length+target where length is the
1847
- * length of the array.
1848
- * @param start If start is negative, it is treated as length+start. If end is negative, it
1849
- * is treated as length+end.
1850
- * @param end If not specified, length of the this object is used as its default value.
1851
- */
1852
- copyWithin(target: number, start: number, end?: number): this;
1853
-
1854
- /**
1855
- * Determines whether all the members of an array satisfy the specified test.
1856
- * @param predicate A function that accepts up to three arguments. The every method calls
1857
- * the predicate function for each element in the array until the predicate returns a value
1858
- * which is coercible to the Boolean value false, or until the end of the array.
1859
- * @param thisArg An object to which the this keyword can refer in the predicate function.
1860
- * If thisArg is omitted, undefined is used as the this value.
1861
- */
1862
- every(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean;
1863
-
1864
- /**
1865
- * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
1866
- * @param value value to fill array section with
1867
- * @param start index to start filling the array at. If start is negative, it is treated as
1868
- * length+start where length is the length of the array.
1869
- * @param end index to stop filling the array at. If end is negative, it is treated as
1870
- * length+end.
1871
- */
1872
- fill(value: number, start?: number, end?: number): this;
1873
-
1874
- /**
1875
- * Returns the elements of an array that meet the condition specified in a callback function.
1876
- * @param predicate A function that accepts up to three arguments. The filter method calls
1877
- * the predicate function one time for each element in the array.
1878
- * @param thisArg An object to which the this keyword can refer in the predicate function.
1879
- * If thisArg is omitted, undefined is used as the this value.
1880
- */
1881
- filter(predicate: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array;
1882
-
1883
- /**
1884
- * Returns the value of the first element in the array where predicate is true, and undefined
1885
- * otherwise.
1886
- * @param predicate find calls predicate once for each element of the array, in ascending
1887
- * order, until it finds one where predicate returns true. If such an element is found, find
1888
- * immediately returns that element value. Otherwise, find returns undefined.
1889
- * @param thisArg If provided, it will be used as the this value for each invocation of
1890
- * predicate. If it is not provided, undefined is used instead.
1891
- */
1892
- find(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number | undefined;
1893
-
1894
- /**
1895
- * Returns the index of the first element in the array where predicate is true, and -1
1896
- * otherwise.
1897
- * @param predicate find calls predicate once for each element of the array, in ascending
1898
- * order, until it finds one where predicate returns true. If such an element is found,
1899
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
1900
- * @param thisArg If provided, it will be used as the this value for each invocation of
1901
- * predicate. If it is not provided, undefined is used instead.
1902
- */
1903
- findIndex(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number;
1904
-
1905
- /**
1906
- * Performs the specified action for each element in an array.
1907
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
1908
- * callbackfn function one time for each element in the array.
1909
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
1910
- * If thisArg is omitted, undefined is used as the this value.
1911
- */
1912
- forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;
1913
-
1914
- /**
1915
- * Returns the index of the first occurrence of a value in an array.
1916
- * @param searchElement The value to locate in the array.
1917
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
1918
- * search starts at index 0.
1919
- */
1920
- indexOf(searchElement: number, fromIndex?: number): number;
1921
-
1922
- /**
1923
- * Adds all the elements of an array separated by the specified separator string.
1924
- * @param separator A string used to separate one element of an array from the next in the
1925
- * resulting String. If omitted, the array elements are separated with a comma.
1926
- */
1927
- join(separator?: string): string;
1928
-
1929
- /**
1930
- * Returns the index of the last occurrence of a value in an array.
1931
- * @param searchElement The value to locate in the array.
1932
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
1933
- * search starts at index 0.
1934
- */
1935
- lastIndexOf(searchElement: number, fromIndex?: number): number;
1936
-
1937
- /**
1938
- * The length of the array.
1939
- */
1940
- readonly length: number;
1941
-
1942
- /**
1943
- * Calls a defined callback function on each element of an array, and returns an array that
1944
- * contains the results.
1945
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
1946
- * callbackfn function one time for each element in the array.
1947
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
1948
- * If thisArg is omitted, undefined is used as the this value.
1949
- */
1950
- map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;
1951
-
1952
- /**
1953
- * Calls the specified callback function for all the elements in an array. The return value of
1954
- * the callback function is the accumulated result, and is provided as an argument in the next
1955
- * call to the callback function.
1956
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
1957
- * callbackfn function one time for each element in the array.
1958
- * @param initialValue If initialValue is specified, it is used as the initial value to start
1959
- * the accumulation. The first call to the callbackfn function provides this value as an argument
1960
- * instead of an array value.
1961
- */
1962
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number;
1963
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number;
1964
-
1965
- /**
1966
- * Calls the specified callback function for all the elements in an array. The return value of
1967
- * the callback function is the accumulated result, and is provided as an argument in the next
1968
- * call to the callback function.
1969
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
1970
- * callbackfn function one time for each element in the array.
1971
- * @param initialValue If initialValue is specified, it is used as the initial value to start
1972
- * the accumulation. The first call to the callbackfn function provides this value as an argument
1973
- * instead of an array value.
1974
- */
1975
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
1976
-
1977
- /**
1978
- * Calls the specified callback function for all the elements in an array, in descending order.
1979
- * The return value of the callback function is the accumulated result, and is provided as an
1980
- * argument in the next call to the callback function.
1981
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
1982
- * the callbackfn function one time for each element in the array.
1983
- * @param initialValue If initialValue is specified, it is used as the initial value to start
1984
- * the accumulation. The first call to the callbackfn function provides this value as an
1985
- * argument instead of an array value.
1986
- */
1987
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number;
1988
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number;
1989
-
1990
- /**
1991
- * Calls the specified callback function for all the elements in an array, in descending order.
1992
- * The return value of the callback function is the accumulated result, and is provided as an
1993
- * argument in the next call to the callback function.
1994
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
1995
- * the callbackfn function one time for each element in the array.
1996
- * @param initialValue If initialValue is specified, it is used as the initial value to start
1997
- * the accumulation. The first call to the callbackfn function provides this value as an argument
1998
- * instead of an array value.
1999
- */
2000
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
2001
-
2002
- /**
2003
- * Reverses the elements in an Array.
2004
- */
2005
- reverse(): Int8Array;
2006
-
2007
- /**
2008
- * Sets a value or an array of values.
2009
- * @param array A typed or untyped array of values to set.
2010
- * @param offset The index in the current array at which the values are to be written.
2011
- */
2012
- set(array: ArrayLike<number>, offset?: number): void;
2013
-
2014
- /**
2015
- * Returns a section of an array.
2016
- * @param start The beginning of the specified portion of the array.
2017
- * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
2018
- */
2019
- slice(start?: number, end?: number): Int8Array;
2020
-
2021
- /**
2022
- * Determines whether the specified callback function returns true for any element of an array.
2023
- * @param predicate A function that accepts up to three arguments. The some method calls
2024
- * the predicate function for each element in the array until the predicate returns a value
2025
- * which is coercible to the Boolean value true, or until the end of the array.
2026
- * @param thisArg An object to which the this keyword can refer in the predicate function.
2027
- * If thisArg is omitted, undefined is used as the this value.
2028
- */
2029
- some(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean;
2030
-
2031
- /**
2032
- * Sorts an array.
2033
- * @param compareFn Function used to determine the order of the elements. It is expected to return
2034
- * a negative value if first argument is less than second argument, zero if they're equal and a positive
2035
- * value otherwise. If omitted, the elements are sorted in ascending order.
2036
- * ```ts
2037
- * [11,2,22,1].sort((a, b) => a - b)
2038
- * ```
2039
- */
2040
- sort(compareFn?: (a: number, b: number) => number): this;
2041
-
2042
- /**
2043
- * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
2044
- * at begin, inclusive, up to end, exclusive.
2045
- * @param begin The index of the beginning of the array.
2046
- * @param end The index of the end of the array.
2047
- */
2048
- subarray(begin?: number, end?: number): Int8Array;
2049
-
2050
- /**
2051
- * Converts a number to a string by using the current locale.
2052
- */
2053
- toLocaleString(): string;
2054
-
2055
- /**
2056
- * Returns a string representation of an array.
2057
- */
2058
- toString(): string;
2059
-
2060
- /** Returns the primitive value of the specified object. */
2061
- valueOf(): Int8Array;
2062
-
2063
- }
2064
- interface Int8ArrayConstructor {
2065
- readonly prototype: Int8Array;
2066
- new(length: number): Int8Array;
2067
- new(array: ArrayLike<number> | ArrayBufferLike): Int8Array;
2068
- new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array;
2069
-
2070
- /**
2071
- * The size in bytes of each element in the array.
2072
- */
2073
- readonly BYTES_PER_ELEMENT: number;
2074
-
2075
- /**
2076
- * Returns a new array from a set of elements.
2077
- * @param items A set of elements to include in the new array object.
2078
- */
2079
- of(...items: number[]): Int8Array;
2080
-
2081
- /**
2082
- * Creates an array from an array-like or iterable object.
2083
- * @param arrayLike An array-like or iterable object to convert to an array.
2084
- */
2085
- from(arrayLike: ArrayLike<number>): Int8Array;
2086
-
2087
- /**
2088
- * Creates an array from an array-like or iterable object.
2089
- * @param arrayLike An array-like or iterable object to convert to an array.
2090
- * @param mapfn A mapping function to call on every element of the array.
2091
- * @param thisArg Value of 'this' used to invoke the mapfn.
2092
- */
2093
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array;
2094
-
2095
-
2096
- }
2097
- declare var Int8Array: Int8ArrayConstructor;
2098
-
2099
- /**
2100
- * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
2101
- * requested number of bytes could not be allocated an exception is raised.
2102
- */
2103
- interface Uint8Array {
2104
- /**
2105
- * The size in bytes of each element in the array.
2106
- */
2107
- readonly BYTES_PER_ELEMENT: number;
2108
-
2109
- /**
2110
- * The ArrayBuffer instance referenced by the array.
2111
- */
2112
- readonly buffer: ArrayBufferLike;
2113
-
2114
- /**
2115
- * The length in bytes of the array.
2116
- */
2117
- readonly byteLength: number;
2118
-
2119
- /**
2120
- * The offset in bytes of the array.
2121
- */
2122
- readonly byteOffset: number;
2123
-
2124
- /**
2125
- * Returns the this object after copying a section of the array identified by start and end
2126
- * to the same array starting at position target
2127
- * @param target If target is negative, it is treated as length+target where length is the
2128
- * length of the array.
2129
- * @param start If start is negative, it is treated as length+start. If end is negative, it
2130
- * is treated as length+end.
2131
- * @param end If not specified, length of the this object is used as its default value.
2132
- */
2133
- copyWithin(target: number, start: number, end?: number): this;
2134
-
2135
- /**
2136
- * Determines whether all the members of an array satisfy the specified test.
2137
- * @param predicate A function that accepts up to three arguments. The every method calls
2138
- * the predicate function for each element in the array until the predicate returns a value
2139
- * which is coercible to the Boolean value false, or until the end of the array.
2140
- * @param thisArg An object to which the this keyword can refer in the predicate function.
2141
- * If thisArg is omitted, undefined is used as the this value.
2142
- */
2143
- every(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean;
2144
-
2145
- /**
2146
- * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
2147
- * @param value value to fill array section with
2148
- * @param start index to start filling the array at. If start is negative, it is treated as
2149
- * length+start where length is the length of the array.
2150
- * @param end index to stop filling the array at. If end is negative, it is treated as
2151
- * length+end.
2152
- */
2153
- fill(value: number, start?: number, end?: number): this;
2154
-
2155
- /**
2156
- * Returns the elements of an array that meet the condition specified in a callback function.
2157
- * @param predicate A function that accepts up to three arguments. The filter method calls
2158
- * the predicate function one time for each element in the array.
2159
- * @param thisArg An object to which the this keyword can refer in the predicate function.
2160
- * If thisArg is omitted, undefined is used as the this value.
2161
- */
2162
- filter(predicate: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array;
2163
-
2164
- /**
2165
- * Returns the value of the first element in the array where predicate is true, and undefined
2166
- * otherwise.
2167
- * @param predicate find calls predicate once for each element of the array, in ascending
2168
- * order, until it finds one where predicate returns true. If such an element is found, find
2169
- * immediately returns that element value. Otherwise, find returns undefined.
2170
- * @param thisArg If provided, it will be used as the this value for each invocation of
2171
- * predicate. If it is not provided, undefined is used instead.
2172
- */
2173
- find(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number | undefined;
2174
-
2175
- /**
2176
- * Returns the index of the first element in the array where predicate is true, and -1
2177
- * otherwise.
2178
- * @param predicate find calls predicate once for each element of the array, in ascending
2179
- * order, until it finds one where predicate returns true. If such an element is found,
2180
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
2181
- * @param thisArg If provided, it will be used as the this value for each invocation of
2182
- * predicate. If it is not provided, undefined is used instead.
2183
- */
2184
- findIndex(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number;
2185
-
2186
- /**
2187
- * Performs the specified action for each element in an array.
2188
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
2189
- * callbackfn function one time for each element in the array.
2190
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2191
- * If thisArg is omitted, undefined is used as the this value.
2192
- */
2193
- forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;
2194
-
2195
- /**
2196
- * Returns the index of the first occurrence of a value in an array.
2197
- * @param searchElement The value to locate in the array.
2198
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2199
- * search starts at index 0.
2200
- */
2201
- indexOf(searchElement: number, fromIndex?: number): number;
2202
-
2203
- /**
2204
- * Adds all the elements of an array separated by the specified separator string.
2205
- * @param separator A string used to separate one element of an array from the next in the
2206
- * resulting String. If omitted, the array elements are separated with a comma.
2207
- */
2208
- join(separator?: string): string;
2209
-
2210
- /**
2211
- * Returns the index of the last occurrence of a value in an array.
2212
- * @param searchElement The value to locate in the array.
2213
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2214
- * search starts at index 0.
2215
- */
2216
- lastIndexOf(searchElement: number, fromIndex?: number): number;
2217
-
2218
- /**
2219
- * The length of the array.
2220
- */
2221
- readonly length: number;
2222
-
2223
- /**
2224
- * Calls a defined callback function on each element of an array, and returns an array that
2225
- * contains the results.
2226
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
2227
- * callbackfn function one time for each element in the array.
2228
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2229
- * If thisArg is omitted, undefined is used as the this value.
2230
- */
2231
- map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;
2232
-
2233
- /**
2234
- * Calls the specified callback function for all the elements in an array. The return value of
2235
- * the callback function is the accumulated result, and is provided as an argument in the next
2236
- * call to the callback function.
2237
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2238
- * callbackfn function one time for each element in the array.
2239
- * @param initialValue If initialValue is specified, it is used as the initial value to start
2240
- * the accumulation. The first call to the callbackfn function provides this value as an argument
2241
- * instead of an array value.
2242
- */
2243
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number;
2244
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number;
2245
-
2246
- /**
2247
- * Calls the specified callback function for all the elements in an array. The return value of
2248
- * the callback function is the accumulated result, and is provided as an argument in the next
2249
- * call to the callback function.
2250
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2251
- * callbackfn function one time for each element in the array.
2252
- * @param initialValue If initialValue is specified, it is used as the initial value to start
2253
- * the accumulation. The first call to the callbackfn function provides this value as an argument
2254
- * instead of an array value.
2255
- */
2256
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
2257
-
2258
- /**
2259
- * Calls the specified callback function for all the elements in an array, in descending order.
2260
- * The return value of the callback function is the accumulated result, and is provided as an
2261
- * argument in the next call to the callback function.
2262
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2263
- * the callbackfn function one time for each element in the array.
2264
- * @param initialValue If initialValue is specified, it is used as the initial value to start
2265
- * the accumulation. The first call to the callbackfn function provides this value as an
2266
- * argument instead of an array value.
2267
- */
2268
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number;
2269
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number;
2270
-
2271
- /**
2272
- * Calls the specified callback function for all the elements in an array, in descending order.
2273
- * The return value of the callback function is the accumulated result, and is provided as an
2274
- * argument in the next call to the callback function.
2275
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2276
- * the callbackfn function one time for each element in the array.
2277
- * @param initialValue If initialValue is specified, it is used as the initial value to start
2278
- * the accumulation. The first call to the callbackfn function provides this value as an argument
2279
- * instead of an array value.
2280
- */
2281
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
2282
-
2283
- /**
2284
- * Reverses the elements in an Array.
2285
- */
2286
- reverse(): Uint8Array;
2287
-
2288
- /**
2289
- * Sets a value or an array of values.
2290
- * @param array A typed or untyped array of values to set.
2291
- * @param offset The index in the current array at which the values are to be written.
2292
- */
2293
- set(array: ArrayLike<number>, offset?: number): void;
2294
-
2295
- /**
2296
- * Returns a section of an array.
2297
- * @param start The beginning of the specified portion of the array.
2298
- * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
2299
- */
2300
- slice(start?: number, end?: number): Uint8Array;
2301
-
2302
- /**
2303
- * Determines whether the specified callback function returns true for any element of an array.
2304
- * @param predicate A function that accepts up to three arguments. The some method calls
2305
- * the predicate function for each element in the array until the predicate returns a value
2306
- * which is coercible to the Boolean value true, or until the end of the array.
2307
- * @param thisArg An object to which the this keyword can refer in the predicate function.
2308
- * If thisArg is omitted, undefined is used as the this value.
2309
- */
2310
- some(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean;
2311
-
2312
- /**
2313
- * Sorts an array.
2314
- * @param compareFn Function used to determine the order of the elements. It is expected to return
2315
- * a negative value if first argument is less than second argument, zero if they're equal and a positive
2316
- * value otherwise. If omitted, the elements are sorted in ascending order.
2317
- * ```ts
2318
- * [11,2,22,1].sort((a, b) => a - b)
2319
- * ```
2320
- */
2321
- sort(compareFn?: (a: number, b: number) => number): this;
2322
-
2323
- /**
2324
- * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
2325
- * at begin, inclusive, up to end, exclusive.
2326
- * @param begin The index of the beginning of the array.
2327
- * @param end The index of the end of the array.
2328
- */
2329
- subarray(begin?: number, end?: number): Uint8Array;
2330
-
2331
- /**
2332
- * Converts a number to a string by using the current locale.
2333
- */
2334
- toLocaleString(): string;
2335
-
2336
- /**
2337
- * Returns a string representation of an array.
2338
- */
2339
- toString(): string;
2340
-
2341
- /** Returns the primitive value of the specified object. */
2342
- valueOf(): Uint8Array;
2343
-
2344
- }
2345
-
2346
- interface Uint8ArrayConstructor {
2347
- readonly prototype: Uint8Array;
2348
- new(length: number): Uint8Array;
2349
- new(array: ArrayLike<number> | ArrayBufferLike): Uint8Array;
2350
- new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array;
2351
-
2352
- /**
2353
- * The size in bytes of each element in the array.
2354
- */
2355
- readonly BYTES_PER_ELEMENT: number;
2356
-
2357
- /**
2358
- * Returns a new array from a set of elements.
2359
- * @param items A set of elements to include in the new array object.
2360
- */
2361
- of(...items: number[]): Uint8Array;
2362
-
2363
- /**
2364
- * Creates an array from an array-like or iterable object.
2365
- * @param arrayLike An array-like or iterable object to convert to an array.
2366
- */
2367
- from(arrayLike: ArrayLike<number>): Uint8Array;
2368
-
2369
- /**
2370
- * Creates an array from an array-like or iterable object.
2371
- * @param arrayLike An array-like or iterable object to convert to an array.
2372
- * @param mapfn A mapping function to call on every element of the array.
2373
- * @param thisArg Value of 'this' used to invoke the mapfn.
2374
- */
2375
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array;
2376
-
2377
- }
2378
- declare var Uint8Array: Uint8ArrayConstructor;
2379
-
2380
- /**
2381
- * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
2382
- * If the requested number of bytes could not be allocated an exception is raised.
2383
- */
2384
- interface Uint8ClampedArray {
2385
- /**
2386
- * The size in bytes of each element in the array.
2387
- */
2388
- readonly BYTES_PER_ELEMENT: number;
2389
-
2390
- /**
2391
- * The ArrayBuffer instance referenced by the array.
2392
- */
2393
- readonly buffer: ArrayBufferLike;
2394
-
2395
- /**
2396
- * The length in bytes of the array.
2397
- */
2398
- readonly byteLength: number;
2399
-
2400
- /**
2401
- * The offset in bytes of the array.
2402
- */
2403
- readonly byteOffset: number;
2404
-
2405
- /**
2406
- * Returns the this object after copying a section of the array identified by start and end
2407
- * to the same array starting at position target
2408
- * @param target If target is negative, it is treated as length+target where length is the
2409
- * length of the array.
2410
- * @param start If start is negative, it is treated as length+start. If end is negative, it
2411
- * is treated as length+end.
2412
- * @param end If not specified, length of the this object is used as its default value.
2413
- */
2414
- copyWithin(target: number, start: number, end?: number): this;
2415
-
2416
- /**
2417
- * Determines whether all the members of an array satisfy the specified test.
2418
- * @param predicate A function that accepts up to three arguments. The every method calls
2419
- * the predicate function for each element in the array until the predicate returns a value
2420
- * which is coercible to the Boolean value false, or until the end of the array.
2421
- * @param thisArg An object to which the this keyword can refer in the predicate function.
2422
- * If thisArg is omitted, undefined is used as the this value.
2423
- */
2424
- every(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean;
2425
-
2426
- /**
2427
- * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
2428
- * @param value value to fill array section with
2429
- * @param start index to start filling the array at. If start is negative, it is treated as
2430
- * length+start where length is the length of the array.
2431
- * @param end index to stop filling the array at. If end is negative, it is treated as
2432
- * length+end.
2433
- */
2434
- fill(value: number, start?: number, end?: number): this;
2435
-
2436
- /**
2437
- * Returns the elements of an array that meet the condition specified in a callback function.
2438
- * @param predicate A function that accepts up to three arguments. The filter method calls
2439
- * the predicate function one time for each element in the array.
2440
- * @param thisArg An object to which the this keyword can refer in the predicate function.
2441
- * If thisArg is omitted, undefined is used as the this value.
2442
- */
2443
- filter(predicate: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray;
2444
-
2445
- /**
2446
- * Returns the value of the first element in the array where predicate is true, and undefined
2447
- * otherwise.
2448
- * @param predicate find calls predicate once for each element of the array, in ascending
2449
- * order, until it finds one where predicate returns true. If such an element is found, find
2450
- * immediately returns that element value. Otherwise, find returns undefined.
2451
- * @param thisArg If provided, it will be used as the this value for each invocation of
2452
- * predicate. If it is not provided, undefined is used instead.
2453
- */
2454
- find(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number | undefined;
2455
-
2456
- /**
2457
- * Returns the index of the first element in the array where predicate is true, and -1
2458
- * otherwise.
2459
- * @param predicate find calls predicate once for each element of the array, in ascending
2460
- * order, until it finds one where predicate returns true. If such an element is found,
2461
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
2462
- * @param thisArg If provided, it will be used as the this value for each invocation of
2463
- * predicate. If it is not provided, undefined is used instead.
2464
- */
2465
- findIndex(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number;
2466
-
2467
- /**
2468
- * Performs the specified action for each element in an array.
2469
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
2470
- * callbackfn function one time for each element in the array.
2471
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2472
- * If thisArg is omitted, undefined is used as the this value.
2473
- */
2474
- forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;
2475
-
2476
- /**
2477
- * Returns the index of the first occurrence of a value in an array.
2478
- * @param searchElement The value to locate in the array.
2479
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2480
- * search starts at index 0.
2481
- */
2482
- indexOf(searchElement: number, fromIndex?: number): number;
2483
-
2484
- /**
2485
- * Adds all the elements of an array separated by the specified separator string.
2486
- * @param separator A string used to separate one element of an array from the next in the
2487
- * resulting String. If omitted, the array elements are separated with a comma.
2488
- */
2489
- join(separator?: string): string;
2490
-
2491
- /**
2492
- * Returns the index of the last occurrence of a value in an array.
2493
- * @param searchElement The value to locate in the array.
2494
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2495
- * search starts at index 0.
2496
- */
2497
- lastIndexOf(searchElement: number, fromIndex?: number): number;
2498
-
2499
- /**
2500
- * The length of the array.
2501
- */
2502
- readonly length: number;
2503
-
2504
- /**
2505
- * Calls a defined callback function on each element of an array, and returns an array that
2506
- * contains the results.
2507
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
2508
- * callbackfn function one time for each element in the array.
2509
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2510
- * If thisArg is omitted, undefined is used as the this value.
2511
- */
2512
- map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;
2513
-
2514
- /**
2515
- * Calls the specified callback function for all the elements in an array. The return value of
2516
- * the callback function is the accumulated result, and is provided as an argument in the next
2517
- * call to the callback function.
2518
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2519
- * callbackfn function one time for each element in the array.
2520
- * @param initialValue If initialValue is specified, it is used as the initial value to start
2521
- * the accumulation. The first call to the callbackfn function provides this value as an argument
2522
- * instead of an array value.
2523
- */
2524
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number;
2525
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number;
2526
-
2527
- /**
2528
- * Calls the specified callback function for all the elements in an array. The return value of
2529
- * the callback function is the accumulated result, and is provided as an argument in the next
2530
- * call to the callback function.
2531
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2532
- * callbackfn function one time for each element in the array.
2533
- * @param initialValue If initialValue is specified, it is used as the initial value to start
2534
- * the accumulation. The first call to the callbackfn function provides this value as an argument
2535
- * instead of an array value.
2536
- */
2537
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
2538
-
2539
- /**
2540
- * Calls the specified callback function for all the elements in an array, in descending order.
2541
- * The return value of the callback function is the accumulated result, and is provided as an
2542
- * argument in the next call to the callback function.
2543
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2544
- * the callbackfn function one time for each element in the array.
2545
- * @param initialValue If initialValue is specified, it is used as the initial value to start
2546
- * the accumulation. The first call to the callbackfn function provides this value as an
2547
- * argument instead of an array value.
2548
- */
2549
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number;
2550
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number;
2551
-
2552
- /**
2553
- * Calls the specified callback function for all the elements in an array, in descending order.
2554
- * The return value of the callback function is the accumulated result, and is provided as an
2555
- * argument in the next call to the callback function.
2556
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2557
- * the callbackfn function one time for each element in the array.
2558
- * @param initialValue If initialValue is specified, it is used as the initial value to start
2559
- * the accumulation. The first call to the callbackfn function provides this value as an argument
2560
- * instead of an array value.
2561
- */
2562
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
2563
-
2564
- /**
2565
- * Reverses the elements in an Array.
2566
- */
2567
- reverse(): Uint8ClampedArray;
2568
-
2569
- /**
2570
- * Sets a value or an array of values.
2571
- * @param array A typed or untyped array of values to set.
2572
- * @param offset The index in the current array at which the values are to be written.
2573
- */
2574
- set(array: ArrayLike<number>, offset?: number): void;
2575
-
2576
- /**
2577
- * Returns a section of an array.
2578
- * @param start The beginning of the specified portion of the array.
2579
- * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
2580
- */
2581
- slice(start?: number, end?: number): Uint8ClampedArray;
2582
-
2583
- /**
2584
- * Determines whether the specified callback function returns true for any element of an array.
2585
- * @param predicate A function that accepts up to three arguments. The some method calls
2586
- * the predicate function for each element in the array until the predicate returns a value
2587
- * which is coercible to the Boolean value true, or until the end of the array.
2588
- * @param thisArg An object to which the this keyword can refer in the predicate function.
2589
- * If thisArg is omitted, undefined is used as the this value.
2590
- */
2591
- some(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean;
2592
-
2593
- /**
2594
- * Sorts an array.
2595
- * @param compareFn Function used to determine the order of the elements. It is expected to return
2596
- * a negative value if first argument is less than second argument, zero if they're equal and a positive
2597
- * value otherwise. If omitted, the elements are sorted in ascending order.
2598
- * ```ts
2599
- * [11,2,22,1].sort((a, b) => a - b)
2600
- * ```
2601
- */
2602
- sort(compareFn?: (a: number, b: number) => number): this;
2603
-
2604
- /**
2605
- * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
2606
- * at begin, inclusive, up to end, exclusive.
2607
- * @param begin The index of the beginning of the array.
2608
- * @param end The index of the end of the array.
2609
- */
2610
- subarray(begin?: number, end?: number): Uint8ClampedArray;
2611
-
2612
- /**
2613
- * Converts a number to a string by using the current locale.
2614
- */
2615
- toLocaleString(): string;
2616
-
2617
- /**
2618
- * Returns a string representation of an array.
2619
- */
2620
- toString(): string;
2621
-
2622
- /** Returns the primitive value of the specified object. */
2623
- valueOf(): Uint8ClampedArray;
2624
- }
2625
-
2626
- interface Uint8ClampedArrayConstructor {
2627
- readonly prototype: Uint8ClampedArray;
2628
- new(length: number): Uint8ClampedArray;
2629
- new(array: ArrayLike<number> | ArrayBufferLike): Uint8ClampedArray;
2630
- new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray;
2631
-
2632
- /**
2633
- * The size in bytes of each element in the array.
2634
- */
2635
- readonly BYTES_PER_ELEMENT: number;
2636
-
2637
- /**
2638
- * Returns a new array from a set of elements.
2639
- * @param items A set of elements to include in the new array object.
2640
- */
2641
- of(...items: number[]): Uint8ClampedArray;
2642
-
2643
- /**
2644
- * Creates an array from an array-like or iterable object.
2645
- * @param arrayLike An array-like or iterable object to convert to an array.
2646
- */
2647
- from(arrayLike: ArrayLike<number>): Uint8ClampedArray;
2648
-
2649
- /**
2650
- * Creates an array from an array-like or iterable object.
2651
- * @param arrayLike An array-like or iterable object to convert to an array.
2652
- * @param mapfn A mapping function to call on every element of the array.
2653
- * @param thisArg Value of 'this' used to invoke the mapfn.
2654
- */
2655
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray;
2656
- }
2657
- declare var Uint8ClampedArray: Uint8ClampedArrayConstructor;
2658
-
2659
- /**
2660
- * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
2661
- * requested number of bytes could not be allocated an exception is raised.
2662
- */
2663
- interface Int16Array {
2664
- /**
2665
- * The size in bytes of each element in the array.
2666
- */
2667
- readonly BYTES_PER_ELEMENT: number;
2668
-
2669
- /**
2670
- * The ArrayBuffer instance referenced by the array.
2671
- */
2672
- readonly buffer: ArrayBufferLike;
2673
-
2674
- /**
2675
- * The length in bytes of the array.
2676
- */
2677
- readonly byteLength: number;
2678
-
2679
- /**
2680
- * The offset in bytes of the array.
2681
- */
2682
- readonly byteOffset: number;
2683
-
2684
- /**
2685
- * Returns the this object after copying a section of the array identified by start and end
2686
- * to the same array starting at position target
2687
- * @param target If target is negative, it is treated as length+target where length is the
2688
- * length of the array.
2689
- * @param start If start is negative, it is treated as length+start. If end is negative, it
2690
- * is treated as length+end.
2691
- * @param end If not specified, length of the this object is used as its default value.
2692
- */
2693
- copyWithin(target: number, start: number, end?: number): this;
2694
-
2695
- /**
2696
- * Determines whether all the members of an array satisfy the specified test.
2697
- * @param predicate A function that accepts up to three arguments. The every method calls
2698
- * the predicate function for each element in the array until the predicate returns a value
2699
- * which is coercible to the Boolean value false, or until the end of the array.
2700
- * @param thisArg An object to which the this keyword can refer in the predicate function.
2701
- * If thisArg is omitted, undefined is used as the this value.
2702
- */
2703
- every(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean;
2704
-
2705
- /**
2706
- * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
2707
- * @param value value to fill array section with
2708
- * @param start index to start filling the array at. If start is negative, it is treated as
2709
- * length+start where length is the length of the array.
2710
- * @param end index to stop filling the array at. If end is negative, it is treated as
2711
- * length+end.
2712
- */
2713
- fill(value: number, start?: number, end?: number): this;
2714
-
2715
- /**
2716
- * Returns the elements of an array that meet the condition specified in a callback function.
2717
- * @param predicate A function that accepts up to three arguments. The filter method calls
2718
- * the predicate function one time for each element in the array.
2719
- * @param thisArg An object to which the this keyword can refer in the predicate function.
2720
- * If thisArg is omitted, undefined is used as the this value.
2721
- */
2722
- filter(predicate: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array;
2723
-
2724
- /**
2725
- * Returns the value of the first element in the array where predicate is true, and undefined
2726
- * otherwise.
2727
- * @param predicate find calls predicate once for each element of the array, in ascending
2728
- * order, until it finds one where predicate returns true. If such an element is found, find
2729
- * immediately returns that element value. Otherwise, find returns undefined.
2730
- * @param thisArg If provided, it will be used as the this value for each invocation of
2731
- * predicate. If it is not provided, undefined is used instead.
2732
- */
2733
- find(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number | undefined;
2734
-
2735
- /**
2736
- * Returns the index of the first element in the array where predicate is true, and -1
2737
- * otherwise.
2738
- * @param predicate find calls predicate once for each element of the array, in ascending
2739
- * order, until it finds one where predicate returns true. If such an element is found,
2740
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
2741
- * @param thisArg If provided, it will be used as the this value for each invocation of
2742
- * predicate. If it is not provided, undefined is used instead.
2743
- */
2744
- findIndex(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number;
2745
-
2746
- /**
2747
- * Performs the specified action for each element in an array.
2748
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
2749
- * callbackfn function one time for each element in the array.
2750
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2751
- * If thisArg is omitted, undefined is used as the this value.
2752
- */
2753
- forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;
2754
- /**
2755
- * Returns the index of the first occurrence of a value in an array.
2756
- * @param searchElement The value to locate in the array.
2757
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2758
- * search starts at index 0.
2759
- */
2760
- indexOf(searchElement: number, fromIndex?: number): number;
2761
-
2762
- /**
2763
- * Adds all the elements of an array separated by the specified separator string.
2764
- * @param separator A string used to separate one element of an array from the next in the
2765
- * resulting String. If omitted, the array elements are separated with a comma.
2766
- */
2767
- join(separator?: string): string;
2768
-
2769
- /**
2770
- * Returns the index of the last occurrence of a value in an array.
2771
- * @param searchElement The value to locate in the array.
2772
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2773
- * search starts at index 0.
2774
- */
2775
- lastIndexOf(searchElement: number, fromIndex?: number): number;
2776
-
2777
- /**
2778
- * The length of the array.
2779
- */
2780
- readonly length: number;
2781
-
2782
- /**
2783
- * Calls a defined callback function on each element of an array, and returns an array that
2784
- * contains the results.
2785
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
2786
- * callbackfn function one time for each element in the array.
2787
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2788
- * If thisArg is omitted, undefined is used as the this value.
2789
- */
2790
- map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;
2791
-
2792
- /**
2793
- * Calls the specified callback function for all the elements in an array. The return value of
2794
- * the callback function is the accumulated result, and is provided as an argument in the next
2795
- * call to the callback function.
2796
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2797
- * callbackfn function one time for each element in the array.
2798
- * @param initialValue If initialValue is specified, it is used as the initial value to start
2799
- * the accumulation. The first call to the callbackfn function provides this value as an argument
2800
- * instead of an array value.
2801
- */
2802
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number;
2803
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number;
2804
-
2805
- /**
2806
- * Calls the specified callback function for all the elements in an array. The return value of
2807
- * the callback function is the accumulated result, and is provided as an argument in the next
2808
- * call to the callback function.
2809
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2810
- * callbackfn function one time for each element in the array.
2811
- * @param initialValue If initialValue is specified, it is used as the initial value to start
2812
- * the accumulation. The first call to the callbackfn function provides this value as an argument
2813
- * instead of an array value.
2814
- */
2815
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
2816
-
2817
- /**
2818
- * Calls the specified callback function for all the elements in an array, in descending order.
2819
- * The return value of the callback function is the accumulated result, and is provided as an
2820
- * argument in the next call to the callback function.
2821
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2822
- * the callbackfn function one time for each element in the array.
2823
- * @param initialValue If initialValue is specified, it is used as the initial value to start
2824
- * the accumulation. The first call to the callbackfn function provides this value as an
2825
- * argument instead of an array value.
2826
- */
2827
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number;
2828
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number;
2829
-
2830
- /**
2831
- * Calls the specified callback function for all the elements in an array, in descending order.
2832
- * The return value of the callback function is the accumulated result, and is provided as an
2833
- * argument in the next call to the callback function.
2834
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2835
- * the callbackfn function one time for each element in the array.
2836
- * @param initialValue If initialValue is specified, it is used as the initial value to start
2837
- * the accumulation. The first call to the callbackfn function provides this value as an argument
2838
- * instead of an array value.
2839
- */
2840
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
2841
-
2842
- /**
2843
- * Reverses the elements in an Array.
2844
- */
2845
- reverse(): Int16Array;
2846
-
2847
- /**
2848
- * Sets a value or an array of values.
2849
- * @param array A typed or untyped array of values to set.
2850
- * @param offset The index in the current array at which the values are to be written.
2851
- */
2852
- set(array: ArrayLike<number>, offset?: number): void;
2853
-
2854
- /**
2855
- * Returns a section of an array.
2856
- * @param start The beginning of the specified portion of the array.
2857
- * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
2858
- */
2859
- slice(start?: number, end?: number): Int16Array;
2860
-
2861
- /**
2862
- * Determines whether the specified callback function returns true for any element of an array.
2863
- * @param predicate A function that accepts up to three arguments. The some method calls
2864
- * the predicate function for each element in the array until the predicate returns a value
2865
- * which is coercible to the Boolean value true, or until the end of the array.
2866
- * @param thisArg An object to which the this keyword can refer in the predicate function.
2867
- * If thisArg is omitted, undefined is used as the this value.
2868
- */
2869
- some(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean;
2870
-
2871
- /**
2872
- * Sorts an array.
2873
- * @param compareFn Function used to determine the order of the elements. It is expected to return
2874
- * a negative value if first argument is less than second argument, zero if they're equal and a positive
2875
- * value otherwise. If omitted, the elements are sorted in ascending order.
2876
- * ```ts
2877
- * [11,2,22,1].sort((a, b) => a - b)
2878
- * ```
2879
- */
2880
- sort(compareFn?: (a: number, b: number) => number): this;
2881
-
2882
- /**
2883
- * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
2884
- * at begin, inclusive, up to end, exclusive.
2885
- * @param begin The index of the beginning of the array.
2886
- * @param end The index of the end of the array.
2887
- */
2888
- subarray(begin?: number, end?: number): Int16Array;
2889
-
2890
- /**
2891
- * Converts a number to a string by using the current locale.
2892
- */
2893
- toLocaleString(): string;
2894
-
2895
- /**
2896
- * Returns a string representation of an array.
2897
- */
2898
- toString(): string;
2899
-
2900
- /** Returns the primitive value of the specified object. */
2901
- valueOf(): Int16Array;
2902
- }
2903
-
2904
- interface Int16ArrayConstructor {
2905
- readonly prototype: Int16Array;
2906
- new(length: number): Int16Array;
2907
- new(array: ArrayLike<number> | ArrayBufferLike): Int16Array;
2908
- new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array;
2909
-
2910
- /**
2911
- * The size in bytes of each element in the array.
2912
- */
2913
- readonly BYTES_PER_ELEMENT: number;
2914
-
2915
- /**
2916
- * Returns a new array from a set of elements.
2917
- * @param items A set of elements to include in the new array object.
2918
- */
2919
- of(...items: number[]): Int16Array;
2920
-
2921
- /**
2922
- * Creates an array from an array-like or iterable object.
2923
- * @param arrayLike An array-like or iterable object to convert to an array.
2924
- */
2925
- from(arrayLike: ArrayLike<number>): Int16Array;
2926
-
2927
- /**
2928
- * Creates an array from an array-like or iterable object.
2929
- * @param arrayLike An array-like or iterable object to convert to an array.
2930
- * @param mapfn A mapping function to call on every element of the array.
2931
- * @param thisArg Value of 'this' used to invoke the mapfn.
2932
- */
2933
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array;
2934
-
2935
-
2936
- }
2937
- declare var Int16Array: Int16ArrayConstructor;
2938
-
2939
- /**
2940
- * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
2941
- * requested number of bytes could not be allocated an exception is raised.
2942
- */
2943
- interface Uint16Array {
2944
- /**
2945
- * The size in bytes of each element in the array.
2946
- */
2947
- readonly BYTES_PER_ELEMENT: number;
2948
-
2949
- /**
2950
- * The ArrayBuffer instance referenced by the array.
2951
- */
2952
- readonly buffer: ArrayBufferLike;
2953
-
2954
- /**
2955
- * The length in bytes of the array.
2956
- */
2957
- readonly byteLength: number;
2958
-
2959
- /**
2960
- * The offset in bytes of the array.
2961
- */
2962
- readonly byteOffset: number;
2963
-
2964
- /**
2965
- * Returns the this object after copying a section of the array identified by start and end
2966
- * to the same array starting at position target
2967
- * @param target If target is negative, it is treated as length+target where length is the
2968
- * length of the array.
2969
- * @param start If start is negative, it is treated as length+start. If end is negative, it
2970
- * is treated as length+end.
2971
- * @param end If not specified, length of the this object is used as its default value.
2972
- */
2973
- copyWithin(target: number, start: number, end?: number): this;
2974
-
2975
- /**
2976
- * Determines whether all the members of an array satisfy the specified test.
2977
- * @param predicate A function that accepts up to three arguments. The every method calls
2978
- * the predicate function for each element in the array until the predicate returns a value
2979
- * which is coercible to the Boolean value false, or until the end of the array.
2980
- * @param thisArg An object to which the this keyword can refer in the predicate function.
2981
- * If thisArg is omitted, undefined is used as the this value.
2982
- */
2983
- every(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean;
2984
-
2985
- /**
2986
- * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
2987
- * @param value value to fill array section with
2988
- * @param start index to start filling the array at. If start is negative, it is treated as
2989
- * length+start where length is the length of the array.
2990
- * @param end index to stop filling the array at. If end is negative, it is treated as
2991
- * length+end.
2992
- */
2993
- fill(value: number, start?: number, end?: number): this;
2994
-
2995
- /**
2996
- * Returns the elements of an array that meet the condition specified in a callback function.
2997
- * @param predicate A function that accepts up to three arguments. The filter method calls
2998
- * the predicate function one time for each element in the array.
2999
- * @param thisArg An object to which the this keyword can refer in the predicate function.
3000
- * If thisArg is omitted, undefined is used as the this value.
3001
- */
3002
- filter(predicate: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array;
3003
-
3004
- /**
3005
- * Returns the value of the first element in the array where predicate is true, and undefined
3006
- * otherwise.
3007
- * @param predicate find calls predicate once for each element of the array, in ascending
3008
- * order, until it finds one where predicate returns true. If such an element is found, find
3009
- * immediately returns that element value. Otherwise, find returns undefined.
3010
- * @param thisArg If provided, it will be used as the this value for each invocation of
3011
- * predicate. If it is not provided, undefined is used instead.
3012
- */
3013
- find(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number | undefined;
3014
-
3015
- /**
3016
- * Returns the index of the first element in the array where predicate is true, and -1
3017
- * otherwise.
3018
- * @param predicate find calls predicate once for each element of the array, in ascending
3019
- * order, until it finds one where predicate returns true. If such an element is found,
3020
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
3021
- * @param thisArg If provided, it will be used as the this value for each invocation of
3022
- * predicate. If it is not provided, undefined is used instead.
3023
- */
3024
- findIndex(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number;
3025
-
3026
- /**
3027
- * Performs the specified action for each element in an array.
3028
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
3029
- * callbackfn function one time for each element in the array.
3030
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3031
- * If thisArg is omitted, undefined is used as the this value.
3032
- */
3033
- forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;
3034
-
3035
- /**
3036
- * Returns the index of the first occurrence of a value in an array.
3037
- * @param searchElement The value to locate in the array.
3038
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3039
- * search starts at index 0.
3040
- */
3041
- indexOf(searchElement: number, fromIndex?: number): number;
3042
-
3043
- /**
3044
- * Adds all the elements of an array separated by the specified separator string.
3045
- * @param separator A string used to separate one element of an array from the next in the
3046
- * resulting String. If omitted, the array elements are separated with a comma.
3047
- */
3048
- join(separator?: string): string;
3049
-
3050
- /**
3051
- * Returns the index of the last occurrence of a value in an array.
3052
- * @param searchElement The value to locate in the array.
3053
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3054
- * search starts at index 0.
3055
- */
3056
- lastIndexOf(searchElement: number, fromIndex?: number): number;
3057
-
3058
- /**
3059
- * The length of the array.
3060
- */
3061
- readonly length: number;
3062
-
3063
- /**
3064
- * Calls a defined callback function on each element of an array, and returns an array that
3065
- * contains the results.
3066
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
3067
- * callbackfn function one time for each element in the array.
3068
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3069
- * If thisArg is omitted, undefined is used as the this value.
3070
- */
3071
- map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;
3072
-
3073
- /**
3074
- * Calls the specified callback function for all the elements in an array. The return value of
3075
- * the callback function is the accumulated result, and is provided as an argument in the next
3076
- * call to the callback function.
3077
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3078
- * callbackfn function one time for each element in the array.
3079
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3080
- * the accumulation. The first call to the callbackfn function provides this value as an argument
3081
- * instead of an array value.
3082
- */
3083
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number;
3084
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number;
3085
-
3086
- /**
3087
- * Calls the specified callback function for all the elements in an array. The return value of
3088
- * the callback function is the accumulated result, and is provided as an argument in the next
3089
- * call to the callback function.
3090
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3091
- * callbackfn function one time for each element in the array.
3092
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3093
- * the accumulation. The first call to the callbackfn function provides this value as an argument
3094
- * instead of an array value.
3095
- */
3096
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
3097
-
3098
- /**
3099
- * Calls the specified callback function for all the elements in an array, in descending order.
3100
- * The return value of the callback function is the accumulated result, and is provided as an
3101
- * argument in the next call to the callback function.
3102
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3103
- * the callbackfn function one time for each element in the array.
3104
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3105
- * the accumulation. The first call to the callbackfn function provides this value as an
3106
- * argument instead of an array value.
3107
- */
3108
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number;
3109
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number;
3110
-
3111
- /**
3112
- * Calls the specified callback function for all the elements in an array, in descending order.
3113
- * The return value of the callback function is the accumulated result, and is provided as an
3114
- * argument in the next call to the callback function.
3115
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3116
- * the callbackfn function one time for each element in the array.
3117
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3118
- * the accumulation. The first call to the callbackfn function provides this value as an argument
3119
- * instead of an array value.
3120
- */
3121
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
3122
-
3123
- /**
3124
- * Reverses the elements in an Array.
3125
- */
3126
- reverse(): Uint16Array;
3127
-
3128
- /**
3129
- * Sets a value or an array of values.
3130
- * @param array A typed or untyped array of values to set.
3131
- * @param offset The index in the current array at which the values are to be written.
3132
- */
3133
- set(array: ArrayLike<number>, offset?: number): void;
3134
-
3135
- /**
3136
- * Returns a section of an array.
3137
- * @param start The beginning of the specified portion of the array.
3138
- * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
3139
- */
3140
- slice(start?: number, end?: number): Uint16Array;
3141
-
3142
- /**
3143
- * Determines whether the specified callback function returns true for any element of an array.
3144
- * @param predicate A function that accepts up to three arguments. The some method calls
3145
- * the predicate function for each element in the array until the predicate returns a value
3146
- * which is coercible to the Boolean value true, or until the end of the array.
3147
- * @param thisArg An object to which the this keyword can refer in the predicate function.
3148
- * If thisArg is omitted, undefined is used as the this value.
3149
- */
3150
- some(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean;
3151
-
3152
- /**
3153
- * Sorts an array.
3154
- * @param compareFn Function used to determine the order of the elements. It is expected to return
3155
- * a negative value if first argument is less than second argument, zero if they're equal and a positive
3156
- * value otherwise. If omitted, the elements are sorted in ascending order.
3157
- * ```ts
3158
- * [11,2,22,1].sort((a, b) => a - b)
3159
- * ```
3160
- */
3161
- sort(compareFn?: (a: number, b: number) => number): this;
3162
-
3163
- /**
3164
- * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
3165
- * at begin, inclusive, up to end, exclusive.
3166
- * @param begin The index of the beginning of the array.
3167
- * @param end The index of the end of the array.
3168
- */
3169
- subarray(begin?: number, end?: number): Uint16Array;
3170
-
3171
- /**
3172
- * Converts a number to a string by using the current locale.
3173
- */
3174
- toLocaleString(): string;
3175
-
3176
- /**
3177
- * Returns a string representation of an array.
3178
- */
3179
- toString(): string;
3180
-
3181
- /** Returns the primitive value of the specified object. */
3182
- valueOf(): Uint16Array;
3183
- }
3184
-
3185
- interface Uint16ArrayConstructor {
3186
- readonly prototype: Uint16Array;
3187
- new(length: number): Uint16Array;
3188
- new(array: ArrayLike<number> | ArrayBufferLike): Uint16Array;
3189
- new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array;
3190
-
3191
- /**
3192
- * The size in bytes of each element in the array.
3193
- */
3194
- readonly BYTES_PER_ELEMENT: number;
3195
-
3196
- /**
3197
- * Returns a new array from a set of elements.
3198
- * @param items A set of elements to include in the new array object.
3199
- */
3200
- of(...items: number[]): Uint16Array;
3201
-
3202
- /**
3203
- * Creates an array from an array-like or iterable object.
3204
- * @param arrayLike An array-like or iterable object to convert to an array.
3205
- */
3206
- from(arrayLike: ArrayLike<number>): Uint16Array;
3207
-
3208
- /**
3209
- * Creates an array from an array-like or iterable object.
3210
- * @param arrayLike An array-like or iterable object to convert to an array.
3211
- * @param mapfn A mapping function to call on every element of the array.
3212
- * @param thisArg Value of 'this' used to invoke the mapfn.
3213
- */
3214
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array;
3215
-
3216
-
3217
- }
3218
- declare var Uint16Array: Uint16ArrayConstructor;
3219
- /**
3220
- * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
3221
- * requested number of bytes could not be allocated an exception is raised.
3222
- */
3223
- interface Int32Array {
3224
- /**
3225
- * The size in bytes of each element in the array.
3226
- */
3227
- readonly BYTES_PER_ELEMENT: number;
3228
-
3229
- /**
3230
- * The ArrayBuffer instance referenced by the array.
3231
- */
3232
- readonly buffer: ArrayBufferLike;
3233
-
3234
- /**
3235
- * The length in bytes of the array.
3236
- */
3237
- readonly byteLength: number;
3238
-
3239
- /**
3240
- * The offset in bytes of the array.
3241
- */
3242
- readonly byteOffset: number;
3243
-
3244
- /**
3245
- * Returns the this object after copying a section of the array identified by start and end
3246
- * to the same array starting at position target
3247
- * @param target If target is negative, it is treated as length+target where length is the
3248
- * length of the array.
3249
- * @param start If start is negative, it is treated as length+start. If end is negative, it
3250
- * is treated as length+end.
3251
- * @param end If not specified, length of the this object is used as its default value.
3252
- */
3253
- copyWithin(target: number, start: number, end?: number): this;
3254
-
3255
- /**
3256
- * Determines whether all the members of an array satisfy the specified test.
3257
- * @param predicate A function that accepts up to three arguments. The every method calls
3258
- * the predicate function for each element in the array until the predicate returns a value
3259
- * which is coercible to the Boolean value false, or until the end of the array.
3260
- * @param thisArg An object to which the this keyword can refer in the predicate function.
3261
- * If thisArg is omitted, undefined is used as the this value.
3262
- */
3263
- every(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean;
3264
-
3265
- /**
3266
- * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
3267
- * @param value value to fill array section with
3268
- * @param start index to start filling the array at. If start is negative, it is treated as
3269
- * length+start where length is the length of the array.
3270
- * @param end index to stop filling the array at. If end is negative, it is treated as
3271
- * length+end.
3272
- */
3273
- fill(value: number, start?: number, end?: number): this;
3274
-
3275
- /**
3276
- * Returns the elements of an array that meet the condition specified in a callback function.
3277
- * @param predicate A function that accepts up to three arguments. The filter method calls
3278
- * the predicate function one time for each element in the array.
3279
- * @param thisArg An object to which the this keyword can refer in the predicate function.
3280
- * If thisArg is omitted, undefined is used as the this value.
3281
- */
3282
- filter(predicate: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array;
3283
-
3284
- /**
3285
- * Returns the value of the first element in the array where predicate is true, and undefined
3286
- * otherwise.
3287
- * @param predicate find calls predicate once for each element of the array, in ascending
3288
- * order, until it finds one where predicate returns true. If such an element is found, find
3289
- * immediately returns that element value. Otherwise, find returns undefined.
3290
- * @param thisArg If provided, it will be used as the this value for each invocation of
3291
- * predicate. If it is not provided, undefined is used instead.
3292
- */
3293
- find(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number | undefined;
3294
-
3295
- /**
3296
- * Returns the index of the first element in the array where predicate is true, and -1
3297
- * otherwise.
3298
- * @param predicate find calls predicate once for each element of the array, in ascending
3299
- * order, until it finds one where predicate returns true. If such an element is found,
3300
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
3301
- * @param thisArg If provided, it will be used as the this value for each invocation of
3302
- * predicate. If it is not provided, undefined is used instead.
3303
- */
3304
- findIndex(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number;
3305
-
3306
- /**
3307
- * Performs the specified action for each element in an array.
3308
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
3309
- * callbackfn function one time for each element in the array.
3310
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3311
- * If thisArg is omitted, undefined is used as the this value.
3312
- */
3313
- forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;
3314
-
3315
- /**
3316
- * Returns the index of the first occurrence of a value in an array.
3317
- * @param searchElement The value to locate in the array.
3318
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3319
- * search starts at index 0.
3320
- */
3321
- indexOf(searchElement: number, fromIndex?: number): number;
3322
-
3323
- /**
3324
- * Adds all the elements of an array separated by the specified separator string.
3325
- * @param separator A string used to separate one element of an array from the next in the
3326
- * resulting String. If omitted, the array elements are separated with a comma.
3327
- */
3328
- join(separator?: string): string;
3329
-
3330
- /**
3331
- * Returns the index of the last occurrence of a value in an array.
3332
- * @param searchElement The value to locate in the array.
3333
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3334
- * search starts at index 0.
3335
- */
3336
- lastIndexOf(searchElement: number, fromIndex?: number): number;
3337
-
3338
- /**
3339
- * The length of the array.
3340
- */
3341
- readonly length: number;
3342
-
3343
- /**
3344
- * Calls a defined callback function on each element of an array, and returns an array that
3345
- * contains the results.
3346
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
3347
- * callbackfn function one time for each element in the array.
3348
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3349
- * If thisArg is omitted, undefined is used as the this value.
3350
- */
3351
- map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;
3352
-
3353
- /**
3354
- * Calls the specified callback function for all the elements in an array. The return value of
3355
- * the callback function is the accumulated result, and is provided as an argument in the next
3356
- * call to the callback function.
3357
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3358
- * callbackfn function one time for each element in the array.
3359
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3360
- * the accumulation. The first call to the callbackfn function provides this value as an argument
3361
- * instead of an array value.
3362
- */
3363
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number;
3364
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number;
3365
-
3366
- /**
3367
- * Calls the specified callback function for all the elements in an array. The return value of
3368
- * the callback function is the accumulated result, and is provided as an argument in the next
3369
- * call to the callback function.
3370
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3371
- * callbackfn function one time for each element in the array.
3372
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3373
- * the accumulation. The first call to the callbackfn function provides this value as an argument
3374
- * instead of an array value.
3375
- */
3376
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
3377
-
3378
- /**
3379
- * Calls the specified callback function for all the elements in an array, in descending order.
3380
- * The return value of the callback function is the accumulated result, and is provided as an
3381
- * argument in the next call to the callback function.
3382
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3383
- * the callbackfn function one time for each element in the array.
3384
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3385
- * the accumulation. The first call to the callbackfn function provides this value as an
3386
- * argument instead of an array value.
3387
- */
3388
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number;
3389
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number;
3390
-
3391
- /**
3392
- * Calls the specified callback function for all the elements in an array, in descending order.
3393
- * The return value of the callback function is the accumulated result, and is provided as an
3394
- * argument in the next call to the callback function.
3395
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3396
- * the callbackfn function one time for each element in the array.
3397
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3398
- * the accumulation. The first call to the callbackfn function provides this value as an argument
3399
- * instead of an array value.
3400
- */
3401
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
3402
-
3403
- /**
3404
- * Reverses the elements in an Array.
3405
- */
3406
- reverse(): Int32Array;
3407
-
3408
- /**
3409
- * Sets a value or an array of values.
3410
- * @param array A typed or untyped array of values to set.
3411
- * @param offset The index in the current array at which the values are to be written.
3412
- */
3413
- set(array: ArrayLike<number>, offset?: number): void;
3414
-
3415
- /**
3416
- * Returns a section of an array.
3417
- * @param start The beginning of the specified portion of the array.
3418
- * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
3419
- */
3420
- slice(start?: number, end?: number): Int32Array;
3421
-
3422
- /**
3423
- * Determines whether the specified callback function returns true for any element of an array.
3424
- * @param predicate A function that accepts up to three arguments. The some method calls
3425
- * the predicate function for each element in the array until the predicate returns a value
3426
- * which is coercible to the Boolean value true, or until the end of the array.
3427
- * @param thisArg An object to which the this keyword can refer in the predicate function.
3428
- * If thisArg is omitted, undefined is used as the this value.
3429
- */
3430
- some(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean;
3431
-
3432
- /**
3433
- * Sorts an array.
3434
- * @param compareFn Function used to determine the order of the elements. It is expected to return
3435
- * a negative value if first argument is less than second argument, zero if they're equal and a positive
3436
- * value otherwise. If omitted, the elements are sorted in ascending order.
3437
- * ```ts
3438
- * [11,2,22,1].sort((a, b) => a - b)
3439
- * ```
3440
- */
3441
- sort(compareFn?: (a: number, b: number) => number): this;
3442
-
3443
- /**
3444
- * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
3445
- * at begin, inclusive, up to end, exclusive.
3446
- * @param begin The index of the beginning of the array.
3447
- * @param end The index of the end of the array.
3448
- */
3449
- subarray(begin?: number, end?: number): Int32Array;
3450
-
3451
- /**
3452
- * Converts a number to a string by using the current locale.
3453
- */
3454
- toLocaleString(): string;
3455
-
3456
- /**
3457
- * Returns a string representation of an array.
3458
- */
3459
- toString(): string;
3460
-
3461
- /** Returns the primitive value of the specified object. */
3462
- valueOf(): Int32Array;
3463
- }
3464
-
3465
- interface Int32ArrayConstructor {
3466
- readonly prototype: Int32Array;
3467
- new(length: number): Int32Array;
3468
- new(array: ArrayLike<number> | ArrayBufferLike): Int32Array;
3469
- new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array;
3470
-
3471
- /**
3472
- * The size in bytes of each element in the array.
3473
- */
3474
- readonly BYTES_PER_ELEMENT: number;
3475
-
3476
- /**
3477
- * Returns a new array from a set of elements.
3478
- * @param items A set of elements to include in the new array object.
3479
- */
3480
- of(...items: number[]): Int32Array;
3481
-
3482
- /**
3483
- * Creates an array from an array-like or iterable object.
3484
- * @param arrayLike An array-like or iterable object to convert to an array.
3485
- */
3486
- from(arrayLike: ArrayLike<number>): Int32Array;
3487
-
3488
- /**
3489
- * Creates an array from an array-like or iterable object.
3490
- * @param arrayLike An array-like or iterable object to convert to an array.
3491
- * @param mapfn A mapping function to call on every element of the array.
3492
- * @param thisArg Value of 'this' used to invoke the mapfn.
3493
- */
3494
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array;
3495
-
3496
- }
3497
- declare var Int32Array: Int32ArrayConstructor;
3498
-
3499
- /**
3500
- * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
3501
- * requested number of bytes could not be allocated an exception is raised.
3502
- */
3503
- interface Uint32Array {
3504
- /**
3505
- * The size in bytes of each element in the array.
3506
- */
3507
- readonly BYTES_PER_ELEMENT: number;
3508
-
3509
- /**
3510
- * The ArrayBuffer instance referenced by the array.
3511
- */
3512
- readonly buffer: ArrayBufferLike;
3513
-
3514
- /**
3515
- * The length in bytes of the array.
3516
- */
3517
- readonly byteLength: number;
3518
-
3519
- /**
3520
- * The offset in bytes of the array.
3521
- */
3522
- readonly byteOffset: number;
3523
-
3524
- /**
3525
- * Returns the this object after copying a section of the array identified by start and end
3526
- * to the same array starting at position target
3527
- * @param target If target is negative, it is treated as length+target where length is the
3528
- * length of the array.
3529
- * @param start If start is negative, it is treated as length+start. If end is negative, it
3530
- * is treated as length+end.
3531
- * @param end If not specified, length of the this object is used as its default value.
3532
- */
3533
- copyWithin(target: number, start: number, end?: number): this;
3534
-
3535
- /**
3536
- * Determines whether all the members of an array satisfy the specified test.
3537
- * @param predicate A function that accepts up to three arguments. The every method calls
3538
- * the predicate function for each element in the array until the predicate returns a value
3539
- * which is coercible to the Boolean value false, or until the end of the array.
3540
- * @param thisArg An object to which the this keyword can refer in the predicate function.
3541
- * If thisArg is omitted, undefined is used as the this value.
3542
- */
3543
- every(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean;
3544
-
3545
- /**
3546
- * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
3547
- * @param value value to fill array section with
3548
- * @param start index to start filling the array at. If start is negative, it is treated as
3549
- * length+start where length is the length of the array.
3550
- * @param end index to stop filling the array at. If end is negative, it is treated as
3551
- * length+end.
3552
- */
3553
- fill(value: number, start?: number, end?: number): this;
3554
-
3555
- /**
3556
- * Returns the elements of an array that meet the condition specified in a callback function.
3557
- * @param predicate A function that accepts up to three arguments. The filter method calls
3558
- * the predicate function one time for each element in the array.
3559
- * @param thisArg An object to which the this keyword can refer in the predicate function.
3560
- * If thisArg is omitted, undefined is used as the this value.
3561
- */
3562
- filter(predicate: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array;
3563
-
3564
- /**
3565
- * Returns the value of the first element in the array where predicate is true, and undefined
3566
- * otherwise.
3567
- * @param predicate find calls predicate once for each element of the array, in ascending
3568
- * order, until it finds one where predicate returns true. If such an element is found, find
3569
- * immediately returns that element value. Otherwise, find returns undefined.
3570
- * @param thisArg If provided, it will be used as the this value for each invocation of
3571
- * predicate. If it is not provided, undefined is used instead.
3572
- */
3573
- find(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number | undefined;
3574
-
3575
- /**
3576
- * Returns the index of the first element in the array where predicate is true, and -1
3577
- * otherwise.
3578
- * @param predicate find calls predicate once for each element of the array, in ascending
3579
- * order, until it finds one where predicate returns true. If such an element is found,
3580
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
3581
- * @param thisArg If provided, it will be used as the this value for each invocation of
3582
- * predicate. If it is not provided, undefined is used instead.
3583
- */
3584
- findIndex(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number;
3585
-
3586
- /**
3587
- * Performs the specified action for each element in an array.
3588
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
3589
- * callbackfn function one time for each element in the array.
3590
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3591
- * If thisArg is omitted, undefined is used as the this value.
3592
- */
3593
- forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;
3594
- /**
3595
- * Returns the index of the first occurrence of a value in an array.
3596
- * @param searchElement The value to locate in the array.
3597
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3598
- * search starts at index 0.
3599
- */
3600
- indexOf(searchElement: number, fromIndex?: number): number;
3601
-
3602
- /**
3603
- * Adds all the elements of an array separated by the specified separator string.
3604
- * @param separator A string used to separate one element of an array from the next in the
3605
- * resulting String. If omitted, the array elements are separated with a comma.
3606
- */
3607
- join(separator?: string): string;
3608
-
3609
- /**
3610
- * Returns the index of the last occurrence of a value in an array.
3611
- * @param searchElement The value to locate in the array.
3612
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3613
- * search starts at index 0.
3614
- */
3615
- lastIndexOf(searchElement: number, fromIndex?: number): number;
3616
-
3617
- /**
3618
- * The length of the array.
3619
- */
3620
- readonly length: number;
3621
-
3622
- /**
3623
- * Calls a defined callback function on each element of an array, and returns an array that
3624
- * contains the results.
3625
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
3626
- * callbackfn function one time for each element in the array.
3627
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3628
- * If thisArg is omitted, undefined is used as the this value.
3629
- */
3630
- map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;
3631
-
3632
- /**
3633
- * Calls the specified callback function for all the elements in an array. The return value of
3634
- * the callback function is the accumulated result, and is provided as an argument in the next
3635
- * call to the callback function.
3636
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3637
- * callbackfn function one time for each element in the array.
3638
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3639
- * the accumulation. The first call to the callbackfn function provides this value as an argument
3640
- * instead of an array value.
3641
- */
3642
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number;
3643
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number;
3644
-
3645
- /**
3646
- * Calls the specified callback function for all the elements in an array. The return value of
3647
- * the callback function is the accumulated result, and is provided as an argument in the next
3648
- * call to the callback function.
3649
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3650
- * callbackfn function one time for each element in the array.
3651
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3652
- * the accumulation. The first call to the callbackfn function provides this value as an argument
3653
- * instead of an array value.
3654
- */
3655
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
3656
-
3657
- /**
3658
- * Calls the specified callback function for all the elements in an array, in descending order.
3659
- * The return value of the callback function is the accumulated result, and is provided as an
3660
- * argument in the next call to the callback function.
3661
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3662
- * the callbackfn function one time for each element in the array.
3663
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3664
- * the accumulation. The first call to the callbackfn function provides this value as an
3665
- * argument instead of an array value.
3666
- */
3667
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number;
3668
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number;
3669
-
3670
- /**
3671
- * Calls the specified callback function for all the elements in an array, in descending order.
3672
- * The return value of the callback function is the accumulated result, and is provided as an
3673
- * argument in the next call to the callback function.
3674
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3675
- * the callbackfn function one time for each element in the array.
3676
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3677
- * the accumulation. The first call to the callbackfn function provides this value as an argument
3678
- * instead of an array value.
3679
- */
3680
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
3681
-
3682
- /**
3683
- * Reverses the elements in an Array.
3684
- */
3685
- reverse(): Uint32Array;
3686
-
3687
- /**
3688
- * Sets a value or an array of values.
3689
- * @param array A typed or untyped array of values to set.
3690
- * @param offset The index in the current array at which the values are to be written.
3691
- */
3692
- set(array: ArrayLike<number>, offset?: number): void;
3693
-
3694
- /**
3695
- * Returns a section of an array.
3696
- * @param start The beginning of the specified portion of the array.
3697
- * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
3698
- */
3699
- slice(start?: number, end?: number): Uint32Array;
3700
-
3701
- /**
3702
- * Determines whether the specified callback function returns true for any element of an array.
3703
- * @param predicate A function that accepts up to three arguments. The some method calls
3704
- * the predicate function for each element in the array until the predicate returns a value
3705
- * which is coercible to the Boolean value true, or until the end of the array.
3706
- * @param thisArg An object to which the this keyword can refer in the predicate function.
3707
- * If thisArg is omitted, undefined is used as the this value.
3708
- */
3709
- some(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean;
3710
-
3711
- /**
3712
- * Sorts an array.
3713
- * @param compareFn Function used to determine the order of the elements. It is expected to return
3714
- * a negative value if first argument is less than second argument, zero if they're equal and a positive
3715
- * value otherwise. If omitted, the elements are sorted in ascending order.
3716
- * ```ts
3717
- * [11,2,22,1].sort((a, b) => a - b)
3718
- * ```
3719
- */
3720
- sort(compareFn?: (a: number, b: number) => number): this;
3721
-
3722
- /**
3723
- * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
3724
- * at begin, inclusive, up to end, exclusive.
3725
- * @param begin The index of the beginning of the array.
3726
- * @param end The index of the end of the array.
3727
- */
3728
- subarray(begin?: number, end?: number): Uint32Array;
3729
-
3730
- /**
3731
- * Converts a number to a string by using the current locale.
3732
- */
3733
- toLocaleString(): string;
3734
-
3735
- /**
3736
- * Returns a string representation of an array.
3737
- */
3738
- toString(): string;
3739
-
3740
- /** Returns the primitive value of the specified object. */
3741
- valueOf(): Uint32Array;
3742
- }
3743
-
3744
- interface Uint32ArrayConstructor {
3745
- readonly prototype: Uint32Array;
3746
- new(length: number): Uint32Array;
3747
- new(array: ArrayLike<number> | ArrayBufferLike): Uint32Array;
3748
- new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array;
3749
-
3750
- /**
3751
- * The size in bytes of each element in the array.
3752
- */
3753
- readonly BYTES_PER_ELEMENT: number;
3754
-
3755
- /**
3756
- * Returns a new array from a set of elements.
3757
- * @param items A set of elements to include in the new array object.
3758
- */
3759
- of(...items: number[]): Uint32Array;
3760
-
3761
- /**
3762
- * Creates an array from an array-like or iterable object.
3763
- * @param arrayLike An array-like or iterable object to convert to an array.
3764
- */
3765
- from(arrayLike: ArrayLike<number>): Uint32Array;
3766
-
3767
- /**
3768
- * Creates an array from an array-like or iterable object.
3769
- * @param arrayLike An array-like or iterable object to convert to an array.
3770
- * @param mapfn A mapping function to call on every element of the array.
3771
- * @param thisArg Value of 'this' used to invoke the mapfn.
3772
- */
3773
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array;
3774
-
3775
- }
3776
- declare var Uint32Array: Uint32ArrayConstructor;
3777
-
3778
- /**
3779
- * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
3780
- * of bytes could not be allocated an exception is raised.
3781
- */
3782
- interface Float32Array {
3783
- /**
3784
- * The size in bytes of each element in the array.
3785
- */
3786
- readonly BYTES_PER_ELEMENT: number;
3787
-
3788
- /**
3789
- * The ArrayBuffer instance referenced by the array.
3790
- */
3791
- readonly buffer: ArrayBufferLike;
3792
-
3793
- /**
3794
- * The length in bytes of the array.
3795
- */
3796
- readonly byteLength: number;
3797
-
3798
- /**
3799
- * The offset in bytes of the array.
3800
- */
3801
- readonly byteOffset: number;
3802
-
3803
- /**
3804
- * Returns the this object after copying a section of the array identified by start and end
3805
- * to the same array starting at position target
3806
- * @param target If target is negative, it is treated as length+target where length is the
3807
- * length of the array.
3808
- * @param start If start is negative, it is treated as length+start. If end is negative, it
3809
- * is treated as length+end.
3810
- * @param end If not specified, length of the this object is used as its default value.
3811
- */
3812
- copyWithin(target: number, start: number, end?: number): this;
3813
-
3814
- /**
3815
- * Determines whether all the members of an array satisfy the specified test.
3816
- * @param predicate A function that accepts up to three arguments. The every method calls
3817
- * the predicate function for each element in the array until the predicate returns a value
3818
- * which is coercible to the Boolean value false, or until the end of the array.
3819
- * @param thisArg An object to which the this keyword can refer in the predicate function.
3820
- * If thisArg is omitted, undefined is used as the this value.
3821
- */
3822
- every(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean;
3823
-
3824
- /**
3825
- * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
3826
- * @param value value to fill array section with
3827
- * @param start index to start filling the array at. If start is negative, it is treated as
3828
- * length+start where length is the length of the array.
3829
- * @param end index to stop filling the array at. If end is negative, it is treated as
3830
- * length+end.
3831
- */
3832
- fill(value: number, start?: number, end?: number): this;
3833
-
3834
- /**
3835
- * Returns the elements of an array that meet the condition specified in a callback function.
3836
- * @param predicate A function that accepts up to three arguments. The filter method calls
3837
- * the predicate function one time for each element in the array.
3838
- * @param thisArg An object to which the this keyword can refer in the predicate function.
3839
- * If thisArg is omitted, undefined is used as the this value.
3840
- */
3841
- filter(predicate: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array;
3842
-
3843
- /**
3844
- * Returns the value of the first element in the array where predicate is true, and undefined
3845
- * otherwise.
3846
- * @param predicate find calls predicate once for each element of the array, in ascending
3847
- * order, until it finds one where predicate returns true. If such an element is found, find
3848
- * immediately returns that element value. Otherwise, find returns undefined.
3849
- * @param thisArg If provided, it will be used as the this value for each invocation of
3850
- * predicate. If it is not provided, undefined is used instead.
3851
- */
3852
- find(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number | undefined;
3853
-
3854
- /**
3855
- * Returns the index of the first element in the array where predicate is true, and -1
3856
- * otherwise.
3857
- * @param predicate find calls predicate once for each element of the array, in ascending
3858
- * order, until it finds one where predicate returns true. If such an element is found,
3859
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
3860
- * @param thisArg If provided, it will be used as the this value for each invocation of
3861
- * predicate. If it is not provided, undefined is used instead.
3862
- */
3863
- findIndex(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number;
3864
-
3865
- /**
3866
- * Performs the specified action for each element in an array.
3867
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
3868
- * callbackfn function one time for each element in the array.
3869
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3870
- * If thisArg is omitted, undefined is used as the this value.
3871
- */
3872
- forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;
3873
-
3874
- /**
3875
- * Returns the index of the first occurrence of a value in an array.
3876
- * @param searchElement The value to locate in the array.
3877
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3878
- * search starts at index 0.
3879
- */
3880
- indexOf(searchElement: number, fromIndex?: number): number;
3881
-
3882
- /**
3883
- * Adds all the elements of an array separated by the specified separator string.
3884
- * @param separator A string used to separate one element of an array from the next in the
3885
- * resulting String. If omitted, the array elements are separated with a comma.
3886
- */
3887
- join(separator?: string): string;
3888
-
3889
- /**
3890
- * Returns the index of the last occurrence of a value in an array.
3891
- * @param searchElement The value to locate in the array.
3892
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3893
- * search starts at index 0.
3894
- */
3895
- lastIndexOf(searchElement: number, fromIndex?: number): number;
3896
-
3897
- /**
3898
- * The length of the array.
3899
- */
3900
- readonly length: number;
3901
-
3902
- /**
3903
- * Calls a defined callback function on each element of an array, and returns an array that
3904
- * contains the results.
3905
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
3906
- * callbackfn function one time for each element in the array.
3907
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3908
- * If thisArg is omitted, undefined is used as the this value.
3909
- */
3910
- map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;
3911
-
3912
- /**
3913
- * Calls the specified callback function for all the elements in an array. The return value of
3914
- * the callback function is the accumulated result, and is provided as an argument in the next
3915
- * call to the callback function.
3916
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3917
- * callbackfn function one time for each element in the array.
3918
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3919
- * the accumulation. The first call to the callbackfn function provides this value as an argument
3920
- * instead of an array value.
3921
- */
3922
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number;
3923
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number;
3924
-
3925
- /**
3926
- * Calls the specified callback function for all the elements in an array. The return value of
3927
- * the callback function is the accumulated result, and is provided as an argument in the next
3928
- * call to the callback function.
3929
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3930
- * callbackfn function one time for each element in the array.
3931
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3932
- * the accumulation. The first call to the callbackfn function provides this value as an argument
3933
- * instead of an array value.
3934
- */
3935
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
3936
-
3937
- /**
3938
- * Calls the specified callback function for all the elements in an array, in descending order.
3939
- * The return value of the callback function is the accumulated result, and is provided as an
3940
- * argument in the next call to the callback function.
3941
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3942
- * the callbackfn function one time for each element in the array.
3943
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3944
- * the accumulation. The first call to the callbackfn function provides this value as an
3945
- * argument instead of an array value.
3946
- */
3947
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number;
3948
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number;
3949
-
3950
- /**
3951
- * Calls the specified callback function for all the elements in an array, in descending order.
3952
- * The return value of the callback function is the accumulated result, and is provided as an
3953
- * argument in the next call to the callback function.
3954
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3955
- * the callbackfn function one time for each element in the array.
3956
- * @param initialValue If initialValue is specified, it is used as the initial value to start
3957
- * the accumulation. The first call to the callbackfn function provides this value as an argument
3958
- * instead of an array value.
3959
- */
3960
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
3961
-
3962
- /**
3963
- * Reverses the elements in an Array.
3964
- */
3965
- reverse(): Float32Array;
3966
-
3967
- /**
3968
- * Sets a value or an array of values.
3969
- * @param array A typed or untyped array of values to set.
3970
- * @param offset The index in the current array at which the values are to be written.
3971
- */
3972
- set(array: ArrayLike<number>, offset?: number): void;
3973
-
3974
- /**
3975
- * Returns a section of an array.
3976
- * @param start The beginning of the specified portion of the array.
3977
- * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
3978
- */
3979
- slice(start?: number, end?: number): Float32Array;
3980
-
3981
- /**
3982
- * Determines whether the specified callback function returns true for any element of an array.
3983
- * @param predicate A function that accepts up to three arguments. The some method calls
3984
- * the predicate function for each element in the array until the predicate returns a value
3985
- * which is coercible to the Boolean value true, or until the end of the array.
3986
- * @param thisArg An object to which the this keyword can refer in the predicate function.
3987
- * If thisArg is omitted, undefined is used as the this value.
3988
- */
3989
- some(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean;
3990
-
3991
- /**
3992
- * Sorts an array.
3993
- * @param compareFn Function used to determine the order of the elements. It is expected to return
3994
- * a negative value if first argument is less than second argument, zero if they're equal and a positive
3995
- * value otherwise. If omitted, the elements are sorted in ascending order.
3996
- * ```ts
3997
- * [11,2,22,1].sort((a, b) => a - b)
3998
- * ```
3999
- */
4000
- sort(compareFn?: (a: number, b: number) => number): this;
4001
-
4002
- /**
4003
- * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
4004
- * at begin, inclusive, up to end, exclusive.
4005
- * @param begin The index of the beginning of the array.
4006
- * @param end The index of the end of the array.
4007
- */
4008
- subarray(begin?: number, end?: number): Float32Array;
4009
-
4010
- /**
4011
- * Converts a number to a string by using the current locale.
4012
- */
4013
- toLocaleString(): string;
4014
-
4015
- /**
4016
- * Returns a string representation of an array.
4017
- */
4018
- toString(): string;
4019
-
4020
- /** Returns the primitive value of the specified object. */
4021
- valueOf(): Float32Array;
4022
- }
4023
-
4024
- interface Float32ArrayConstructor {
4025
- readonly prototype: Float32Array;
4026
- new(length: number): Float32Array;
4027
- new(array: ArrayLike<number> | ArrayBufferLike): Float32Array;
4028
- new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array;
4029
-
4030
- /**
4031
- * The size in bytes of each element in the array.
4032
- */
4033
- readonly BYTES_PER_ELEMENT: number;
4034
-
4035
- /**
4036
- * Returns a new array from a set of elements.
4037
- * @param items A set of elements to include in the new array object.
4038
- */
4039
- of(...items: number[]): Float32Array;
4040
-
4041
- /**
4042
- * Creates an array from an array-like or iterable object.
4043
- * @param arrayLike An array-like or iterable object to convert to an array.
4044
- */
4045
- from(arrayLike: ArrayLike<number>): Float32Array;
4046
-
4047
- /**
4048
- * Creates an array from an array-like or iterable object.
4049
- * @param arrayLike An array-like or iterable object to convert to an array.
4050
- * @param mapfn A mapping function to call on every element of the array.
4051
- * @param thisArg Value of 'this' used to invoke the mapfn.
4052
- */
4053
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array;
4054
-
4055
-
4056
- }
4057
- declare var Float32Array: Float32ArrayConstructor;
4058
-
4059
- /**
4060
- * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
4061
- * number of bytes could not be allocated an exception is raised.
4062
- */
4063
- interface Float64Array {
4064
- /**
4065
- * The size in bytes of each element in the array.
4066
- */
4067
- readonly BYTES_PER_ELEMENT: number;
4068
-
4069
- /**
4070
- * The ArrayBuffer instance referenced by the array.
4071
- */
4072
- readonly buffer: ArrayBufferLike;
4073
-
4074
- /**
4075
- * The length in bytes of the array.
4076
- */
4077
- readonly byteLength: number;
4078
-
4079
- /**
4080
- * The offset in bytes of the array.
4081
- */
4082
- readonly byteOffset: number;
4083
-
4084
- /**
4085
- * Returns the this object after copying a section of the array identified by start and end
4086
- * to the same array starting at position target
4087
- * @param target If target is negative, it is treated as length+target where length is the
4088
- * length of the array.
4089
- * @param start If start is negative, it is treated as length+start. If end is negative, it
4090
- * is treated as length+end.
4091
- * @param end If not specified, length of the this object is used as its default value.
4092
- */
4093
- copyWithin(target: number, start: number, end?: number): this;
4094
-
4095
- /**
4096
- * Determines whether all the members of an array satisfy the specified test.
4097
- * @param predicate A function that accepts up to three arguments. The every method calls
4098
- * the predicate function for each element in the array until the predicate returns a value
4099
- * which is coercible to the Boolean value false, or until the end of the array.
4100
- * @param thisArg An object to which the this keyword can refer in the predicate function.
4101
- * If thisArg is omitted, undefined is used as the this value.
4102
- */
4103
- every(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean;
4104
-
4105
- /**
4106
- * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
4107
- * @param value value to fill array section with
4108
- * @param start index to start filling the array at. If start is negative, it is treated as
4109
- * length+start where length is the length of the array.
4110
- * @param end index to stop filling the array at. If end is negative, it is treated as
4111
- * length+end.
4112
- */
4113
- fill(value: number, start?: number, end?: number): this;
4114
-
4115
- /**
4116
- * Returns the elements of an array that meet the condition specified in a callback function.
4117
- * @param predicate A function that accepts up to three arguments. The filter method calls
4118
- * the predicate function one time for each element in the array.
4119
- * @param thisArg An object to which the this keyword can refer in the predicate function.
4120
- * If thisArg is omitted, undefined is used as the this value.
4121
- */
4122
- filter(predicate: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array;
4123
-
4124
- /**
4125
- * Returns the value of the first element in the array where predicate is true, and undefined
4126
- * otherwise.
4127
- * @param predicate find calls predicate once for each element of the array, in ascending
4128
- * order, until it finds one where predicate returns true. If such an element is found, find
4129
- * immediately returns that element value. Otherwise, find returns undefined.
4130
- * @param thisArg If provided, it will be used as the this value for each invocation of
4131
- * predicate. If it is not provided, undefined is used instead.
4132
- */
4133
- find(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number | undefined;
4134
-
4135
- /**
4136
- * Returns the index of the first element in the array where predicate is true, and -1
4137
- * otherwise.
4138
- * @param predicate find calls predicate once for each element of the array, in ascending
4139
- * order, until it finds one where predicate returns true. If such an element is found,
4140
- * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
4141
- * @param thisArg If provided, it will be used as the this value for each invocation of
4142
- * predicate. If it is not provided, undefined is used instead.
4143
- */
4144
- findIndex(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number;
4145
-
4146
- /**
4147
- * Performs the specified action for each element in an array.
4148
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
4149
- * callbackfn function one time for each element in the array.
4150
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4151
- * If thisArg is omitted, undefined is used as the this value.
4152
- */
4153
- forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;
4154
-
4155
- /**
4156
- * Returns the index of the first occurrence of a value in an array.
4157
- * @param searchElement The value to locate in the array.
4158
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
4159
- * search starts at index 0.
4160
- */
4161
- indexOf(searchElement: number, fromIndex?: number): number;
4162
-
4163
- /**
4164
- * Adds all the elements of an array separated by the specified separator string.
4165
- * @param separator A string used to separate one element of an array from the next in the
4166
- * resulting String. If omitted, the array elements are separated with a comma.
4167
- */
4168
- join(separator?: string): string;
4169
-
4170
- /**
4171
- * Returns the index of the last occurrence of a value in an array.
4172
- * @param searchElement The value to locate in the array.
4173
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
4174
- * search starts at index 0.
4175
- */
4176
- lastIndexOf(searchElement: number, fromIndex?: number): number;
4177
-
4178
- /**
4179
- * The length of the array.
4180
- */
4181
- readonly length: number;
4182
-
4183
- /**
4184
- * Calls a defined callback function on each element of an array, and returns an array that
4185
- * contains the results.
4186
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
4187
- * callbackfn function one time for each element in the array.
4188
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4189
- * If thisArg is omitted, undefined is used as the this value.
4190
- */
4191
- map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;
4192
-
4193
- /**
4194
- * Calls the specified callback function for all the elements in an array. The return value of
4195
- * the callback function is the accumulated result, and is provided as an argument in the next
4196
- * call to the callback function.
4197
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
4198
- * callbackfn function one time for each element in the array.
4199
- * @param initialValue If initialValue is specified, it is used as the initial value to start
4200
- * the accumulation. The first call to the callbackfn function provides this value as an argument
4201
- * instead of an array value.
4202
- */
4203
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number;
4204
- reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number;
4205
-
4206
- /**
4207
- * Calls the specified callback function for all the elements in an array. The return value of
4208
- * the callback function is the accumulated result, and is provided as an argument in the next
4209
- * call to the callback function.
4210
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
4211
- * callbackfn function one time for each element in the array.
4212
- * @param initialValue If initialValue is specified, it is used as the initial value to start
4213
- * the accumulation. The first call to the callbackfn function provides this value as an argument
4214
- * instead of an array value.
4215
- */
4216
- reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
4217
-
4218
- /**
4219
- * Calls the specified callback function for all the elements in an array, in descending order.
4220
- * The return value of the callback function is the accumulated result, and is provided as an
4221
- * argument in the next call to the callback function.
4222
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
4223
- * the callbackfn function one time for each element in the array.
4224
- * @param initialValue If initialValue is specified, it is used as the initial value to start
4225
- * the accumulation. The first call to the callbackfn function provides this value as an
4226
- * argument instead of an array value.
4227
- */
4228
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number;
4229
- reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number;
4230
-
4231
- /**
4232
- * Calls the specified callback function for all the elements in an array, in descending order.
4233
- * The return value of the callback function is the accumulated result, and is provided as an
4234
- * argument in the next call to the callback function.
4235
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
4236
- * the callbackfn function one time for each element in the array.
4237
- * @param initialValue If initialValue is specified, it is used as the initial value to start
4238
- * the accumulation. The first call to the callbackfn function provides this value as an argument
4239
- * instead of an array value.
4240
- */
4241
- reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
4242
-
4243
- /**
4244
- * Reverses the elements in an Array.
4245
- */
4246
- reverse(): Float64Array;
4247
-
4248
- /**
4249
- * Sets a value or an array of values.
4250
- * @param array A typed or untyped array of values to set.
4251
- * @param offset The index in the current array at which the values are to be written.
4252
- */
4253
- set(array: ArrayLike<number>, offset?: number): void;
4254
-
4255
- /**
4256
- * Returns a section of an array.
4257
- * @param start The beginning of the specified portion of the array.
4258
- * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
4259
- */
4260
- slice(start?: number, end?: number): Float64Array;
4261
-
4262
- /**
4263
- * Determines whether the specified callback function returns true for any element of an array.
4264
- * @param predicate A function that accepts up to three arguments. The some method calls
4265
- * the predicate function for each element in the array until the predicate returns a value
4266
- * which is coercible to the Boolean value true, or until the end of the array.
4267
- * @param thisArg An object to which the this keyword can refer in the predicate function.
4268
- * If thisArg is omitted, undefined is used as the this value.
4269
- */
4270
- some(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean;
4271
-
4272
- /**
4273
- * Sorts an array.
4274
- * @param compareFn Function used to determine the order of the elements. It is expected to return
4275
- * a negative value if first argument is less than second argument, zero if they're equal and a positive
4276
- * value otherwise. If omitted, the elements are sorted in ascending order.
4277
- * ```ts
4278
- * [11,2,22,1].sort((a, b) => a - b)
4279
- * ```
4280
- */
4281
- sort(compareFn?: (a: number, b: number) => number): this;
4282
-
4283
- /**
4284
- * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements
4285
- * at begin, inclusive, up to end, exclusive.
4286
- * @param begin The index of the beginning of the array.
4287
- * @param end The index of the end of the array.
4288
- */
4289
- subarray(begin?: number, end?: number): Float64Array;
4290
-
4291
- /**
4292
- * Converts a number to a string by using the current locale.
4293
- */
4294
- toLocaleString(): string;
4295
-
4296
- /**
4297
- * Returns a string representation of an array.
4298
- */
4299
- toString(): string;
4300
-
4301
- /** Returns the primitive value of the specified object. */
4302
- valueOf(): Float64Array;
4303
- }
4304
-
4305
- interface Float64ArrayConstructor {
4306
- readonly prototype: Float64Array;
4307
- new(length: number): Float64Array;
4308
- new(array: ArrayLike<number> | ArrayBufferLike): Float64Array;
4309
- new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array;
4310
-
4311
- /**
4312
- * The size in bytes of each element in the array.
4313
- */
4314
- readonly BYTES_PER_ELEMENT: number;
4315
-
4316
- /**
4317
- * Returns a new array from a set of elements.
4318
- * @param items A set of elements to include in the new array object.
4319
- */
4320
- of(...items: number[]): Float64Array;
4321
-
4322
- /**
4323
- * Creates an array from an array-like or iterable object.
4324
- * @param arrayLike An array-like or iterable object to convert to an array.
4325
- */
4326
- from(arrayLike: ArrayLike<number>): Float64Array;
4327
-
4328
- /**
4329
- * Creates an array from an array-like or iterable object.
4330
- * @param arrayLike An array-like or iterable object to convert to an array.
4331
- * @param mapfn A mapping function to call on every element of the array.
4332
- * @param thisArg Value of 'this' used to invoke the mapfn.
4333
- */
4334
- from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array;
4335
-
4336
- }
4337
- declare var Float64Array: Float64ArrayConstructor;
4338
-
4339
- /////////////////////////////
4340
- /// ECMAScript Internationalization API
4341
- /////////////////////////////
4342
-
4343
- declare namespace Intl {
4344
- interface CollatorOptions {
4345
- usage?: "sort" | "search" | undefined;
4346
- localeMatcher?: "lookup" | "best fit" | undefined;
4347
- numeric?: boolean | undefined;
4348
- caseFirst?: "upper" | "lower" | "false" | undefined;
4349
- sensitivity?: "base" | "accent" | "case" | "variant" | undefined;
4350
- collation?: "big5han" | "compat" | "dict" | "direct" | "ducet" | "emoji" | "eor" | "gb2312" | "phonebk" | "phonetic" | "pinyin" | "reformed" | "searchjl" | "stroke" | "trad" | "unihan" | "zhuyin" | undefined;
4351
- ignorePunctuation?: boolean | undefined;
4352
- }
4353
-
4354
- interface ResolvedCollatorOptions {
4355
- locale: string;
4356
- usage: string;
4357
- sensitivity: string;
4358
- ignorePunctuation: boolean;
4359
- collation: string;
4360
- caseFirst: string;
4361
- numeric: boolean;
4362
- }
4363
-
4364
- interface Collator {
4365
- compare(x: string, y: string): number;
4366
- resolvedOptions(): ResolvedCollatorOptions;
4367
- }
4368
- var Collator: {
4369
- new(locales?: string | string[], options?: CollatorOptions): Collator;
4370
- (locales?: string | string[], options?: CollatorOptions): Collator;
4371
- supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
4372
- };
4373
-
4374
- interface NumberFormatOptions {
4375
- localeMatcher?: string | undefined;
4376
- style?: string | undefined;
4377
- currency?: string | undefined;
4378
- currencySign?: string | undefined;
4379
- useGrouping?: boolean | undefined;
4380
- minimumIntegerDigits?: number | undefined;
4381
- minimumFractionDigits?: number | undefined;
4382
- maximumFractionDigits?: number | undefined;
4383
- minimumSignificantDigits?: number | undefined;
4384
- maximumSignificantDigits?: number | undefined;
4385
- }
4386
-
4387
- interface ResolvedNumberFormatOptions {
4388
- locale: string;
4389
- numberingSystem: string;
4390
- style: string;
4391
- currency?: string;
4392
- minimumIntegerDigits: number;
4393
- minimumFractionDigits: number;
4394
- maximumFractionDigits: number;
4395
- minimumSignificantDigits?: number;
4396
- maximumSignificantDigits?: number;
4397
- useGrouping: boolean;
4398
- }
4399
-
4400
- interface NumberFormat {
4401
- format(value: number): string;
4402
- resolvedOptions(): ResolvedNumberFormatOptions;
4403
- }
4404
- var NumberFormat: {
4405
- new(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
4406
- (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
4407
- supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
4408
- readonly prototype: NumberFormat;
4409
- };
4410
-
4411
- interface DateTimeFormatOptions {
4412
- localeMatcher?: "best fit" | "lookup" | undefined;
4413
- weekday?: "long" | "short" | "narrow" | undefined;
4414
- era?: "long" | "short" | "narrow" | undefined;
4415
- year?: "numeric" | "2-digit" | undefined;
4416
- month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined;
4417
- day?: "numeric" | "2-digit" | undefined;
4418
- hour?: "numeric" | "2-digit" | undefined;
4419
- minute?: "numeric" | "2-digit" | undefined;
4420
- second?: "numeric" | "2-digit" | undefined;
4421
- timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined;
4422
- formatMatcher?: "best fit" | "basic" | undefined;
4423
- hour12?: boolean | undefined;
4424
- timeZone?: string | undefined;
4425
- }
4426
-
4427
- interface ResolvedDateTimeFormatOptions {
4428
- locale: string;
4429
- calendar: string;
4430
- numberingSystem: string;
4431
- timeZone: string;
4432
- hour12?: boolean;
4433
- weekday?: string;
4434
- era?: string;
4435
- year?: string;
4436
- month?: string;
4437
- day?: string;
4438
- hour?: string;
4439
- minute?: string;
4440
- second?: string;
4441
- timeZoneName?: string;
4442
- }
4443
-
4444
- interface DateTimeFormat {
4445
- format(date?: Date | number): string;
4446
- resolvedOptions(): ResolvedDateTimeFormatOptions;
4447
- }
4448
- var DateTimeFormat: {
4449
- new(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
4450
- (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
4451
- supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
4452
- readonly prototype: DateTimeFormat;
4453
- };
4454
- }
4455
-
4456
- interface String {
4457
- /**
4458
- * Determines whether two strings are equivalent in the current or specified locale.
4459
- * @param that String to compare to target string
4460
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
4461
- * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
4462
- */
4463
- localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
4464
- }
4465
-
4466
- interface Number {
4467
- /**
4468
- * Converts a number to a string by using the current or specified locale.
4469
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
4470
- * @param options An object that contains one or more properties that specify comparison options.
4471
- */
4472
- toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
4473
- }
4474
-
4475
- interface Date {
4476
- /**
4477
- * Converts a date and time to a string by using the current or specified locale.
4478
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
4479
- * @param options An object that contains one or more properties that specify comparison options.
4480
- */
4481
- toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
4482
- /**
4483
- * Converts a date to a string by using the current or specified locale.
4484
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
4485
- * @param options An object that contains one or more properties that specify comparison options.
4486
- */
4487
- toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
4488
-
4489
- /**
4490
- * Converts a time to a string by using the current or specified locale.
4491
- * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
4492
- * @param options An object that contains one or more properties that specify comparison options.
4493
- */
4494
- toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
4495
- }