isaacscript-common 2.3.0 → 2.3.1

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 (1035) hide show
  1. package/cachedClasses.d.ts +37 -0
  2. package/cachedClasses.lua +6 -0
  3. package/callbacks/customRevive.d.ts +1 -0
  4. package/callbacks/customRevive.lua +145 -0
  5. package/callbacks/itemPickup.d.ts +1 -0
  6. package/callbacks/itemPickup.lua +64 -0
  7. package/callbacks/postBombInitLate.d.ts +1 -0
  8. package/callbacks/postBombInitLate.lua +31 -0
  9. package/callbacks/postBoneSwing.d.ts +1 -0
  10. package/callbacks/postBoneSwing.lua +48 -0
  11. package/callbacks/postCollectibleInitFirst.d.ts +1 -0
  12. package/callbacks/postCollectibleInitFirst.lua +32 -0
  13. package/callbacks/postCursedTeleport.d.ts +1 -0
  14. package/callbacks/postCursedTeleport.lua +119 -0
  15. package/callbacks/postCustomDoorEnter.d.ts +50 -0
  16. package/callbacks/postCustomDoorEnter.lua +203 -0
  17. package/callbacks/postDoorRender.d.ts +1 -0
  18. package/callbacks/postDoorRender.lua +24 -0
  19. package/callbacks/postDoorUpdate.d.ts +1 -0
  20. package/callbacks/postDoorUpdate.lua +24 -0
  21. package/callbacks/postEffectInitLate.d.ts +1 -0
  22. package/callbacks/postEffectInitLate.lua +31 -0
  23. package/callbacks/postEffectStateChanged.d.ts +1 -0
  24. package/callbacks/postEffectStateChanged.lua +37 -0
  25. package/callbacks/postEsauJr.d.ts +1 -0
  26. package/callbacks/postEsauJr.lua +67 -0
  27. package/callbacks/postFamiliarInitLate.d.ts +1 -0
  28. package/callbacks/postFamiliarInitLate.lua +31 -0
  29. package/callbacks/postFamiliarStateChanged.d.ts +1 -0
  30. package/callbacks/postFamiliarStateChanged.lua +37 -0
  31. package/callbacks/postFlip.d.ts +1 -0
  32. package/callbacks/postFlip.lua +61 -0
  33. package/callbacks/postGreedModeWave.d.ts +1 -0
  34. package/callbacks/postGreedModeWave.lua +32 -0
  35. package/callbacks/postGridEntity.d.ts +1 -0
  36. package/callbacks/postGridEntity.lua +105 -0
  37. package/callbacks/postGridEntityCollision.d.ts +1 -0
  38. package/callbacks/postGridEntityCollision.lua +65 -0
  39. package/callbacks/postGridEntityRender.d.ts +1 -0
  40. package/callbacks/postGridEntityRender.lua +24 -0
  41. package/callbacks/postHolyMantleRemoved.d.ts +1 -0
  42. package/callbacks/postHolyMantleRemoved.lua +39 -0
  43. package/callbacks/postItemDischarged.d.ts +2 -0
  44. package/callbacks/postItemDischarged.lua +104 -0
  45. package/callbacks/postKnifeInitLate.d.ts +1 -0
  46. package/callbacks/postKnifeInitLate.lua +31 -0
  47. package/callbacks/postLaserInitLate.d.ts +1 -0
  48. package/callbacks/postLaserInitLate.lua +31 -0
  49. package/callbacks/postNPCInitLate.d.ts +1 -0
  50. package/callbacks/postNPCInitLate.lua +31 -0
  51. package/callbacks/postNPCStateChanged.d.ts +1 -0
  52. package/callbacks/postNPCStateChanged.lua +37 -0
  53. package/callbacks/postNewRoomEarly.d.ts +1 -0
  54. package/callbacks/postNewRoomEarly.lua +65 -0
  55. package/callbacks/postPickupCollect.d.ts +1 -0
  56. package/callbacks/postPickupCollect.lua +39 -0
  57. package/callbacks/postPickupInitLate.d.ts +1 -0
  58. package/callbacks/postPickupInitLate.lua +31 -0
  59. package/callbacks/postPickupStateChanged.d.ts +1 -0
  60. package/callbacks/postPickupStateChanged.lua +37 -0
  61. package/callbacks/postPitRender.d.ts +1 -0
  62. package/callbacks/postPitRender.lua +24 -0
  63. package/callbacks/postPitUpdate.d.ts +1 -0
  64. package/callbacks/postPitUpdate.lua +24 -0
  65. package/callbacks/postPlayerChangeHealth.d.ts +1 -0
  66. package/callbacks/postPlayerChangeHealth.lua +50 -0
  67. package/callbacks/postPlayerChangeType.d.ts +1 -0
  68. package/callbacks/postPlayerChangeType.lua +39 -0
  69. package/callbacks/postPlayerFatalDamage.d.ts +1 -0
  70. package/callbacks/postPlayerFatalDamage.lua +71 -0
  71. package/callbacks/postPlayerInitLate.d.ts +1 -0
  72. package/callbacks/postPlayerInitLate.lua +33 -0
  73. package/callbacks/postPlayerReordered.d.ts +1 -0
  74. package/callbacks/postPlayerReordered.lua +112 -0
  75. package/callbacks/postPoopRender.d.ts +1 -0
  76. package/callbacks/postPoopRender.lua +24 -0
  77. package/callbacks/postPoopUpdate.d.ts +1 -0
  78. package/callbacks/postPoopUpdate.lua +24 -0
  79. package/callbacks/postPressurePlateRender.d.ts +1 -0
  80. package/callbacks/postPressurePlateRender.lua +24 -0
  81. package/callbacks/postPressurePlateUpdate.d.ts +1 -0
  82. package/callbacks/postPressurePlateUpdate.lua +24 -0
  83. package/callbacks/postProjectileInitLate.d.ts +1 -0
  84. package/callbacks/postProjectileInitLate.lua +31 -0
  85. package/callbacks/postPurchase.d.ts +1 -0
  86. package/callbacks/postPurchase.lua +49 -0
  87. package/callbacks/postRockRender.d.ts +1 -0
  88. package/callbacks/postRockRender.lua +24 -0
  89. package/callbacks/postRockUpdate.d.ts +1 -0
  90. package/callbacks/postRockUpdate.lua +24 -0
  91. package/callbacks/postRoomClearChanged.d.ts +1 -0
  92. package/callbacks/postRoomClearChanged.lua +40 -0
  93. package/callbacks/postSacrifice.d.ts +1 -0
  94. package/callbacks/postSacrifice.lua +42 -0
  95. package/callbacks/postSlotInitUpdate.d.ts +1 -0
  96. package/callbacks/postSlotInitUpdate.lua +51 -0
  97. package/callbacks/postSlotRender.d.ts +1 -0
  98. package/callbacks/postSlotRender.lua +74 -0
  99. package/callbacks/postSpikesRender.d.ts +1 -0
  100. package/callbacks/postSpikesRender.lua +24 -0
  101. package/callbacks/postSpikesUpdate.d.ts +1 -0
  102. package/callbacks/postSpikesUpdate.lua +24 -0
  103. package/callbacks/postTNTRender.d.ts +1 -0
  104. package/callbacks/postTNTRender.lua +24 -0
  105. package/callbacks/postTNTUpdate.d.ts +1 -0
  106. package/callbacks/postTNTUpdate.lua +24 -0
  107. package/callbacks/postTearInitLate.d.ts +1 -0
  108. package/callbacks/postTearInitLate.lua +31 -0
  109. package/callbacks/postTearInitVeryLate.d.ts +1 -0
  110. package/callbacks/postTearInitVeryLate.lua +34 -0
  111. package/callbacks/postTransformation.d.ts +1 -0
  112. package/callbacks/postTransformation.lua +46 -0
  113. package/callbacks/postTrinketBreak.d.ts +1 -0
  114. package/callbacks/postTrinketBreak.lua +70 -0
  115. package/callbacks/preBerserkDeath.d.ts +1 -0
  116. package/callbacks/preBerserkDeath.lua +36 -0
  117. package/callbacks/preNewLevel.d.ts +1 -0
  118. package/callbacks/preNewLevel.lua +43 -0
  119. package/callbacks/reorderedCallbacks.d.ts +20 -0
  120. package/callbacks/reorderedCallbacks.lua +92 -0
  121. package/callbacks/subscriptions/postBombInitLate.d.ts +5 -0
  122. package/callbacks/subscriptions/postBombInitLate.lua +23 -0
  123. package/callbacks/subscriptions/postBoneSwing.d.ts +4 -0
  124. package/callbacks/subscriptions/postBoneSwing.lua +16 -0
  125. package/callbacks/subscriptions/postCollectibleInitFirst.d.ts +5 -0
  126. package/callbacks/subscriptions/postCollectibleInitFirst.lua +23 -0
  127. package/callbacks/subscriptions/postCursedTeleport.d.ts +4 -0
  128. package/callbacks/subscriptions/postCursedTeleport.lua +16 -0
  129. package/callbacks/subscriptions/postCustomDoorEnter.d.ts +5 -0
  130. package/callbacks/subscriptions/postCustomDoorEnter.lua +29 -0
  131. package/callbacks/subscriptions/postCustomRevive.d.ts +5 -0
  132. package/callbacks/subscriptions/postCustomRevive.lua +23 -0
  133. package/callbacks/subscriptions/postDoorRender.d.ts +5 -0
  134. package/callbacks/subscriptions/postDoorRender.lua +24 -0
  135. package/callbacks/subscriptions/postDoorUpdate.d.ts +5 -0
  136. package/callbacks/subscriptions/postDoorUpdate.lua +24 -0
  137. package/callbacks/subscriptions/postEffectInitLate.d.ts +5 -0
  138. package/callbacks/subscriptions/postEffectInitLate.lua +23 -0
  139. package/callbacks/subscriptions/postEffectStateChanged.d.ts +5 -0
  140. package/callbacks/subscriptions/postEffectStateChanged.lua +23 -0
  141. package/callbacks/subscriptions/postEsauJr.d.ts +4 -0
  142. package/callbacks/subscriptions/postEsauJr.lua +16 -0
  143. package/callbacks/subscriptions/postFamiliarInitLate.d.ts +5 -0
  144. package/callbacks/subscriptions/postFamiliarInitLate.lua +23 -0
  145. package/callbacks/subscriptions/postFamiliarStateChanged.d.ts +5 -0
  146. package/callbacks/subscriptions/postFamiliarStateChanged.lua +23 -0
  147. package/callbacks/subscriptions/postFirstEsauJr.d.ts +4 -0
  148. package/callbacks/subscriptions/postFirstEsauJr.lua +16 -0
  149. package/callbacks/subscriptions/postFirstFlip.d.ts +4 -0
  150. package/callbacks/subscriptions/postFirstFlip.lua +16 -0
  151. package/callbacks/subscriptions/postFlip.d.ts +4 -0
  152. package/callbacks/subscriptions/postFlip.lua +16 -0
  153. package/callbacks/subscriptions/postGameStartedReordered.d.ts +3 -0
  154. package/callbacks/subscriptions/postGameStartedReordered.lua +16 -0
  155. package/callbacks/subscriptions/postGreedModeWave.d.ts +4 -0
  156. package/callbacks/subscriptions/postGreedModeWave.lua +16 -0
  157. package/callbacks/subscriptions/postGridEntityBroken.d.ts +6 -0
  158. package/callbacks/subscriptions/postGridEntityBroken.lua +29 -0
  159. package/callbacks/subscriptions/postGridEntityCollision.d.ts +6 -0
  160. package/callbacks/subscriptions/postGridEntityCollision.lua +29 -0
  161. package/callbacks/subscriptions/postGridEntityInit.d.ts +6 -0
  162. package/callbacks/subscriptions/postGridEntityInit.lua +29 -0
  163. package/callbacks/subscriptions/postGridEntityRemove.d.ts +6 -0
  164. package/callbacks/subscriptions/postGridEntityRemove.lua +27 -0
  165. package/callbacks/subscriptions/postGridEntityRender.d.ts +6 -0
  166. package/callbacks/subscriptions/postGridEntityRender.lua +29 -0
  167. package/callbacks/subscriptions/postGridEntityStateChanged.d.ts +6 -0
  168. package/callbacks/subscriptions/postGridEntityStateChanged.lua +29 -0
  169. package/callbacks/subscriptions/postGridEntityUpdate.d.ts +6 -0
  170. package/callbacks/subscriptions/postGridEntityUpdate.lua +29 -0
  171. package/callbacks/subscriptions/postHolyMantleRemoved.d.ts +6 -0
  172. package/callbacks/subscriptions/postHolyMantleRemoved.lua +28 -0
  173. package/callbacks/subscriptions/postItemDischarged.d.ts +5 -0
  174. package/callbacks/subscriptions/postItemDischarged.lua +23 -0
  175. package/callbacks/subscriptions/postItemPickup.d.ts +11 -0
  176. package/callbacks/subscriptions/postItemPickup.lua +27 -0
  177. package/callbacks/subscriptions/postKnifeInitLate.d.ts +5 -0
  178. package/callbacks/subscriptions/postKnifeInitLate.lua +23 -0
  179. package/callbacks/subscriptions/postLaserInitLate.d.ts +5 -0
  180. package/callbacks/subscriptions/postLaserInitLate.lua +23 -0
  181. package/callbacks/subscriptions/postNPCInitLate.d.ts +5 -0
  182. package/callbacks/subscriptions/postNPCInitLate.lua +23 -0
  183. package/callbacks/subscriptions/postNPCStateChanged.d.ts +6 -0
  184. package/callbacks/subscriptions/postNPCStateChanged.lua +27 -0
  185. package/callbacks/subscriptions/postNewLevelReordered.d.ts +1 -0
  186. package/callbacks/subscriptions/postNewLevelReordered.lua +16 -0
  187. package/callbacks/subscriptions/postNewRoomEarly.d.ts +1 -0
  188. package/callbacks/subscriptions/postNewRoomEarly.lua +16 -0
  189. package/callbacks/subscriptions/postNewRoomReordered.d.ts +1 -0
  190. package/callbacks/subscriptions/postNewRoomReordered.lua +16 -0
  191. package/callbacks/subscriptions/postPEffectUpdateReordered.d.ts +6 -0
  192. package/callbacks/subscriptions/postPEffectUpdateReordered.lua +28 -0
  193. package/callbacks/subscriptions/postPickupCollect.d.ts +4 -0
  194. package/callbacks/subscriptions/postPickupCollect.lua +23 -0
  195. package/callbacks/subscriptions/postPickupInitLate.d.ts +3 -0
  196. package/callbacks/subscriptions/postPickupInitLate.lua +23 -0
  197. package/callbacks/subscriptions/postPickupStateChanged.d.ts +5 -0
  198. package/callbacks/subscriptions/postPickupStateChanged.lua +23 -0
  199. package/callbacks/subscriptions/postPitRender.d.ts +5 -0
  200. package/callbacks/subscriptions/postPitRender.lua +24 -0
  201. package/callbacks/subscriptions/postPitUpdate.d.ts +5 -0
  202. package/callbacks/subscriptions/postPitUpdate.lua +24 -0
  203. package/callbacks/subscriptions/postPlayerChangeHealth.d.ts +7 -0
  204. package/callbacks/subscriptions/postPlayerChangeHealth.lua +28 -0
  205. package/callbacks/subscriptions/postPlayerChangeType.d.ts +5 -0
  206. package/callbacks/subscriptions/postPlayerChangeType.lua +23 -0
  207. package/callbacks/subscriptions/postPlayerFatalDamage.d.ts +6 -0
  208. package/callbacks/subscriptions/postPlayerFatalDamage.lua +39 -0
  209. package/callbacks/subscriptions/postPlayerInitLate.d.ts +6 -0
  210. package/callbacks/subscriptions/postPlayerInitLate.lua +28 -0
  211. package/callbacks/subscriptions/postPlayerInitReordered.d.ts +6 -0
  212. package/callbacks/subscriptions/postPlayerInitReordered.lua +28 -0
  213. package/callbacks/subscriptions/postPlayerRenderReordered.d.ts +6 -0
  214. package/callbacks/subscriptions/postPlayerRenderReordered.lua +28 -0
  215. package/callbacks/subscriptions/postPlayerUpdateReordered.d.ts +6 -0
  216. package/callbacks/subscriptions/postPlayerUpdateReordered.lua +28 -0
  217. package/callbacks/subscriptions/postPoopRender.d.ts +5 -0
  218. package/callbacks/subscriptions/postPoopRender.lua +24 -0
  219. package/callbacks/subscriptions/postPoopUpdate.d.ts +5 -0
  220. package/callbacks/subscriptions/postPoopUpdate.lua +24 -0
  221. package/callbacks/subscriptions/postPressurePlateRender.d.ts +5 -0
  222. package/callbacks/subscriptions/postPressurePlateRender.lua +24 -0
  223. package/callbacks/subscriptions/postPressurePlateUpdate.d.ts +5 -0
  224. package/callbacks/subscriptions/postPressurePlateUpdate.lua +24 -0
  225. package/callbacks/subscriptions/postProjectileInitLate.d.ts +5 -0
  226. package/callbacks/subscriptions/postProjectileInitLate.lua +23 -0
  227. package/callbacks/subscriptions/postPurchase.d.ts +6 -0
  228. package/callbacks/subscriptions/postPurchase.lua +16 -0
  229. package/callbacks/subscriptions/postRockRender.d.ts +5 -0
  230. package/callbacks/subscriptions/postRockRender.lua +24 -0
  231. package/callbacks/subscriptions/postRockUpdate.d.ts +5 -0
  232. package/callbacks/subscriptions/postRockUpdate.lua +24 -0
  233. package/callbacks/subscriptions/postRoomClearChanged.d.ts +3 -0
  234. package/callbacks/subscriptions/postRoomClearChanged.lua +16 -0
  235. package/callbacks/subscriptions/postSacrifice.d.ts +6 -0
  236. package/callbacks/subscriptions/postSacrifice.lua +28 -0
  237. package/callbacks/subscriptions/postSlotAnimationChanged.d.ts +5 -0
  238. package/callbacks/subscriptions/postSlotAnimationChanged.lua +23 -0
  239. package/callbacks/subscriptions/postSlotDestroyed.d.ts +5 -0
  240. package/callbacks/subscriptions/postSlotDestroyed.lua +23 -0
  241. package/callbacks/subscriptions/postSlotInit.d.ts +5 -0
  242. package/callbacks/subscriptions/postSlotInit.lua +23 -0
  243. package/callbacks/subscriptions/postSlotRender.d.ts +5 -0
  244. package/callbacks/subscriptions/postSlotRender.lua +23 -0
  245. package/callbacks/subscriptions/postSlotUpdate.d.ts +5 -0
  246. package/callbacks/subscriptions/postSlotUpdate.lua +23 -0
  247. package/callbacks/subscriptions/postSpikesRender.d.ts +5 -0
  248. package/callbacks/subscriptions/postSpikesRender.lua +24 -0
  249. package/callbacks/subscriptions/postSpikesUpdate.d.ts +5 -0
  250. package/callbacks/subscriptions/postSpikesUpdate.lua +24 -0
  251. package/callbacks/subscriptions/postTNTRender.d.ts +5 -0
  252. package/callbacks/subscriptions/postTNTRender.lua +24 -0
  253. package/callbacks/subscriptions/postTNTUpdate.d.ts +5 -0
  254. package/callbacks/subscriptions/postTNTUpdate.lua +24 -0
  255. package/callbacks/subscriptions/postTearInitLate.d.ts +5 -0
  256. package/callbacks/subscriptions/postTearInitLate.lua +23 -0
  257. package/callbacks/subscriptions/postTearInitVeryLate.d.ts +5 -0
  258. package/callbacks/subscriptions/postTearInitVeryLate.lua +23 -0
  259. package/callbacks/subscriptions/postTransformation.d.ts +5 -0
  260. package/callbacks/subscriptions/postTransformation.lua +23 -0
  261. package/callbacks/subscriptions/postTrinketBreak.d.ts +5 -0
  262. package/callbacks/subscriptions/postTrinketBreak.lua +23 -0
  263. package/callbacks/subscriptions/preBerserkDeath.d.ts +6 -0
  264. package/callbacks/subscriptions/preBerserkDeath.lua +29 -0
  265. package/callbacks/subscriptions/preCustomRevive.d.ts +6 -0
  266. package/callbacks/subscriptions/preCustomRevive.lua +32 -0
  267. package/callbacks/subscriptions/preItemPickup.d.ts +11 -0
  268. package/callbacks/subscriptions/preItemPickup.lua +27 -0
  269. package/callbacks/subscriptions/preNewLevel.d.ts +4 -0
  270. package/callbacks/subscriptions/preNewLevel.lua +16 -0
  271. package/classes/DefaultMap.d.ts +79 -0
  272. package/classes/DefaultMap.lua +84 -0
  273. package/classes/ModUpgraded.d.ts +23 -0
  274. package/classes/ModUpgraded.lua +38 -0
  275. package/constants.d.ts +104 -0
  276. package/constants.lua +45 -0
  277. package/constantsFirstLast.d.ts +130 -0
  278. package/constantsFirstLast.lua +50 -0
  279. package/enums/HealthType.d.ts +16 -0
  280. package/enums/HealthType.lua +21 -0
  281. package/enums/ModCallbackCustom.d.ts +860 -0
  282. package/enums/ModCallbackCustom.lua +153 -0
  283. package/enums/PocketItemType.d.ts +8 -0
  284. package/enums/PocketItemType.lua +15 -0
  285. package/enums/SerializationType.d.ts +5 -0
  286. package/enums/SerializationType.lua +9 -0
  287. package/enums/private/CopyableIsaacAPIClassType.d.ts +7 -0
  288. package/enums/private/CopyableIsaacAPIClassType.lua +7 -0
  289. package/enums/private/SaveDataKey.d.ts +7 -0
  290. package/enums/private/SaveDataKey.lua +11 -0
  291. package/enums/private/SerializationBrand.d.ts +37 -0
  292. package/enums/private/SerializationBrand.lua +12 -0
  293. package/features/characterHealthConversion.d.ts +9 -0
  294. package/features/characterHealthConversion.lua +85 -0
  295. package/features/characterStats.d.ts +19 -0
  296. package/features/characterStats.lua +37 -0
  297. package/features/debugDisplay/debugDisplay.d.ts +2 -0
  298. package/features/debugDisplay/debugDisplay.lua +181 -0
  299. package/features/debugDisplay/exports.d.ts +199 -0
  300. package/features/debugDisplay/exports.lua +133 -0
  301. package/features/debugDisplay/v.d.ts +44 -0
  302. package/features/debugDisplay/v.lua +54 -0
  303. package/features/deployJSONRoom.d.ts +65 -0
  304. package/features/deployJSONRoom.lua +463 -0
  305. package/features/disableInputs.d.ts +62 -0
  306. package/features/disableInputs.lua +89 -0
  307. package/features/disableSound.d.ts +18 -0
  308. package/features/disableSound.lua +48 -0
  309. package/features/extraConsoleCommands/commandsDisplay.d.ts +162 -0
  310. package/features/extraConsoleCommands/commandsDisplay.lua +129 -0
  311. package/features/extraConsoleCommands/commandsSubroutines.d.ts +9 -0
  312. package/features/extraConsoleCommands/commandsSubroutines.lua +129 -0
  313. package/features/extraConsoleCommands/init.d.ts +26 -0
  314. package/features/extraConsoleCommands/init.lua +249 -0
  315. package/features/extraConsoleCommands/listCommands.d.ts +349 -0
  316. package/features/extraConsoleCommands/listCommands.lua +922 -0
  317. package/features/extraConsoleCommands/v.d.ts +13 -0
  318. package/features/extraConsoleCommands/v.lua +10 -0
  319. package/features/fadeInRemover.d.ts +14 -0
  320. package/features/fadeInRemover.lua +45 -0
  321. package/features/fastReset.d.ts +14 -0
  322. package/features/fastReset.lua +49 -0
  323. package/features/forgottenSwitch.d.ts +5 -0
  324. package/features/forgottenSwitch.lua +28 -0
  325. package/features/getCollectibleItemPoolType.d.ts +7 -0
  326. package/features/getCollectibleItemPoolType.lua +43 -0
  327. package/features/playerInventory.d.ts +23 -0
  328. package/features/playerInventory.lua +129 -0
  329. package/features/ponyDetection.d.ts +6 -0
  330. package/features/ponyDetection.lua +49 -0
  331. package/features/preventCollectibleRotation.d.ts +11 -0
  332. package/features/preventCollectibleRotation.lua +58 -0
  333. package/features/runInNFrames.d.ts +61 -0
  334. package/features/runInNFrames.lua +78 -0
  335. package/features/saveDataManager/constants.d.ts +3 -0
  336. package/features/saveDataManager/constants.lua +4 -0
  337. package/features/saveDataManager/exports.d.ts +131 -0
  338. package/features/saveDataManager/exports.lua +66 -0
  339. package/features/saveDataManager/load.d.ts +4 -0
  340. package/features/saveDataManager/load.lua +66 -0
  341. package/features/saveDataManager/main.d.ts +3 -0
  342. package/features/saveDataManager/main.lua +119 -0
  343. package/features/saveDataManager/maps.d.ts +10 -0
  344. package/features/saveDataManager/maps.lua +8 -0
  345. package/features/saveDataManager/merge.d.ts +24 -0
  346. package/features/saveDataManager/merge.lua +124 -0
  347. package/features/saveDataManager/save.d.ts +4 -0
  348. package/features/saveDataManager/save.lua +44 -0
  349. package/features/saveDataManager/serializationBrand.d.ts +1 -0
  350. package/features/saveDataManager/serializationBrand.lua +17 -0
  351. package/features/sirenHelpers.d.ts +18 -0
  352. package/features/sirenHelpers.lua +69 -0
  353. package/features/taintedLazarusPlayers.d.ts +13 -0
  354. package/features/taintedLazarusPlayers.lua +74 -0
  355. package/featuresInitialized.d.ts +1 -0
  356. package/featuresInitialized.lua +14 -0
  357. package/functions/array.d.ts +141 -0
  358. package/functions/array.lua +269 -0
  359. package/functions/benchmark.d.ts +10 -0
  360. package/functions/benchmark.lua +32 -0
  361. package/functions/bitwise.d.ts +4 -0
  362. package/functions/bitwise.lua +21 -0
  363. package/functions/boss.d.ts +56 -0
  364. package/functions/boss.lua +183 -0
  365. package/functions/cacheFlag.d.ts +8 -0
  366. package/functions/cacheFlag.lua +7 -0
  367. package/functions/cards.d.ts +95 -0
  368. package/functions/cards.lua +174 -0
  369. package/functions/challenges.d.ts +3 -0
  370. package/functions/challenges.lua +9 -0
  371. package/functions/character.d.ts +48 -0
  372. package/functions/character.lua +73 -0
  373. package/functions/charge.d.ts +54 -0
  374. package/functions/charge.lua +123 -0
  375. package/functions/chargeBar.d.ts +12 -0
  376. package/functions/chargeBar.lua +43 -0
  377. package/functions/collectibleCacheFlag.d.ts +23 -0
  378. package/functions/collectibleCacheFlag.lua +65 -0
  379. package/functions/collectibleSet.d.ts +9 -0
  380. package/functions/collectibleSet.lua +51 -0
  381. package/functions/collectibleTag.d.ts +16 -0
  382. package/functions/collectibleTag.lua +74 -0
  383. package/functions/collectibles.d.ts +211 -0
  384. package/functions/collectibles.lua +281 -0
  385. package/functions/color.d.ts +45 -0
  386. package/functions/color.lua +122 -0
  387. package/functions/debug.d.ts +27 -0
  388. package/functions/debug.lua +31 -0
  389. package/functions/deepCopy.d.ts +29 -0
  390. package/functions/deepCopy.lua +357 -0
  391. package/functions/deepCopyTests.d.ts +1 -0
  392. package/functions/deepCopyTests.lua +316 -0
  393. package/functions/direction.d.ts +4 -0
  394. package/functions/direction.lua +17 -0
  395. package/functions/doors.d.ts +117 -0
  396. package/functions/doors.lua +231 -0
  397. package/functions/easing.d.ts +30 -0
  398. package/functions/easing.lua +115 -0
  399. package/functions/eden.d.ts +3 -0
  400. package/functions/eden.lua +47 -0
  401. package/functions/entity.d.ts +131 -0
  402. package/functions/entity.lua +233 -0
  403. package/functions/entitySpecific.d.ts +264 -0
  404. package/functions/entitySpecific.lua +650 -0
  405. package/functions/entityTypes.d.ts +3 -0
  406. package/functions/entityTypes.lua +7 -0
  407. package/functions/enums.d.ts +80 -0
  408. package/functions/enums.lua +85 -0
  409. package/functions/familiars.d.ts +60 -0
  410. package/functions/familiars.lua +33 -0
  411. package/functions/flag.d.ts +99 -0
  412. package/functions/flag.lua +47 -0
  413. package/functions/flying.d.ts +19 -0
  414. package/functions/flying.lua +67 -0
  415. package/functions/globals.d.ts +14 -0
  416. package/functions/globals.lua +230 -0
  417. package/functions/gridEntity.d.ts +155 -0
  418. package/functions/gridEntity.lua +263 -0
  419. package/functions/gridEntitySpecific.d.ts +18 -0
  420. package/functions/gridEntitySpecific.lua +88 -0
  421. package/functions/input.d.ts +32 -0
  422. package/functions/input.lua +106 -0
  423. package/functions/isaacAPIClass.d.ts +23 -0
  424. package/functions/isaacAPIClass.lua +35 -0
  425. package/functions/jsonHelpers.d.ts +18 -0
  426. package/functions/jsonHelpers.lua +26 -0
  427. package/functions/jsonRoom.d.ts +12 -0
  428. package/functions/jsonRoom.lua +86 -0
  429. package/functions/kColor.d.ts +31 -0
  430. package/functions/kColor.lua +101 -0
  431. package/functions/language.d.ts +8 -0
  432. package/functions/language.lua +8 -0
  433. package/functions/level.d.ts +1 -0
  434. package/functions/level.lua +29 -0
  435. package/functions/log.d.ts +78 -0
  436. package/functions/log.lua +519 -0
  437. package/functions/map.d.ts +22 -0
  438. package/functions/map.lua +43 -0
  439. package/functions/math.d.ts +50 -0
  440. package/functions/math.lua +92 -0
  441. package/functions/mergeTests.d.ts +1 -0
  442. package/functions/mergeTests.lua +182 -0
  443. package/functions/npc.d.ts +40 -0
  444. package/functions/npc.lua +104 -0
  445. package/functions/pickupVariants.d.ts +23 -0
  446. package/functions/pickupVariants.lua +37 -0
  447. package/functions/pickups.d.ts +132 -0
  448. package/functions/pickups.lua +407 -0
  449. package/functions/pills.d.ts +69 -0
  450. package/functions/pills.lua +83 -0
  451. package/functions/player.d.ts +296 -0
  452. package/functions/player.lua +611 -0
  453. package/functions/playerDataStructures.d.ts +92 -0
  454. package/functions/playerDataStructures.lua +38 -0
  455. package/functions/playerHealth.d.ts +22 -0
  456. package/functions/playerHealth.lua +286 -0
  457. package/functions/playerIndex.d.ts +68 -0
  458. package/functions/playerIndex.lua +127 -0
  459. package/functions/pocketItems.d.ts +33 -0
  460. package/functions/pocketItems.lua +86 -0
  461. package/functions/positionVelocity.d.ts +64 -0
  462. package/functions/positionVelocity.lua +108 -0
  463. package/functions/random.d.ts +42 -0
  464. package/functions/random.lua +38 -0
  465. package/functions/revive.d.ts +31 -0
  466. package/functions/revive.lua +102 -0
  467. package/functions/rng.d.ts +53 -0
  468. package/functions/rng.lua +129 -0
  469. package/functions/roomData.d.ts +108 -0
  470. package/functions/roomData.lua +92 -0
  471. package/functions/roomGrid.d.ts +40 -0
  472. package/functions/roomGrid.lua +59 -0
  473. package/functions/roomShape.d.ts +43 -0
  474. package/functions/roomShape.lua +45 -0
  475. package/functions/rooms.d.ts +194 -0
  476. package/functions/rooms.lua +382 -0
  477. package/functions/run.d.ts +12 -0
  478. package/functions/run.lua +28 -0
  479. package/functions/seeds.d.ts +9 -0
  480. package/functions/seeds.lua +15 -0
  481. package/functions/serialization.d.ts +11 -0
  482. package/functions/serialization.lua +65 -0
  483. package/functions/set.d.ts +39 -0
  484. package/functions/set.lua +61 -0
  485. package/functions/sound.d.ts +1 -0
  486. package/functions/sound.lua +13 -0
  487. package/functions/spawnCollectible.d.ts +31 -0
  488. package/functions/spawnCollectible.lua +70 -0
  489. package/functions/sprite.d.ts +36 -0
  490. package/functions/sprite.lua +64 -0
  491. package/functions/stage.d.ts +35 -0
  492. package/functions/stage.lua +70 -0
  493. package/functions/string.d.ts +13 -0
  494. package/functions/string.lua +36 -0
  495. package/functions/table.d.ts +36 -0
  496. package/functions/table.lua +79 -0
  497. package/functions/tears.d.ts +22 -0
  498. package/functions/tears.lua +14 -0
  499. package/functions/transformations.d.ts +30 -0
  500. package/functions/transformations.lua +96 -0
  501. package/functions/trinketCacheFlag.d.ts +10 -0
  502. package/functions/trinketCacheFlag.lua +50 -0
  503. package/functions/trinketGive.d.ts +38 -0
  504. package/functions/trinketGive.lua +90 -0
  505. package/functions/trinkets.d.ts +73 -0
  506. package/functions/trinkets.lua +115 -0
  507. package/functions/tstlClass.d.ts +20 -0
  508. package/functions/tstlClass.lua +56 -0
  509. package/functions/ui.d.ts +34 -0
  510. package/functions/ui.lua +95 -0
  511. package/functions/utils.d.ts +112 -0
  512. package/functions/utils.lua +94 -0
  513. package/functions/vector.d.ts +32 -0
  514. package/functions/vector.lua +118 -0
  515. package/index.d.ts +128 -0
  516. package/index.lua +900 -0
  517. package/initCustomCallbacks.d.ts +2 -0
  518. package/initCustomCallbacks.lua +178 -0
  519. package/initFeatures.d.ts +3 -0
  520. package/initFeatures.lua +51 -0
  521. package/interfaces/AddCallbackParameterCustom.d.ts +153 -0
  522. package/interfaces/AddCallbackParameterCustom.lua +4 -0
  523. package/interfaces/ChargeBarSprites.d.ts +13 -0
  524. package/interfaces/ChargeBarSprites.lua +2 -0
  525. package/interfaces/JSONDoor.d.ts +11 -0
  526. package/interfaces/JSONDoor.lua +2 -0
  527. package/interfaces/JSONEntity.d.ts +13 -0
  528. package/interfaces/JSONEntity.lua +2 -0
  529. package/interfaces/JSONRoom.d.ts +26 -0
  530. package/interfaces/JSONRoom.lua +2 -0
  531. package/interfaces/JSONRooms.d.ts +11 -0
  532. package/interfaces/JSONRooms.lua +2 -0
  533. package/interfaces/JSONSpawn.d.ts +11 -0
  534. package/interfaces/JSONSpawn.lua +2 -0
  535. package/interfaces/PlayerHealth.d.ts +15 -0
  536. package/interfaces/PlayerHealth.lua +2 -0
  537. package/interfaces/PocketItemDescription.d.ts +8 -0
  538. package/interfaces/PocketItemDescription.lua +2 -0
  539. package/interfaces/SaveData.d.ts +29 -0
  540. package/interfaces/SaveData.lua +2 -0
  541. package/interfaces/TrinketSituation.d.ts +8 -0
  542. package/interfaces/TrinketSituation.lua +2 -0
  543. package/interfaces/private/TSTLClassMetatable.d.ts +10 -0
  544. package/interfaces/private/TSTLClassMetatable.lua +2 -0
  545. package/lualib_bundle.lua +2488 -0
  546. package/maps/cardMap.d.ts +3 -0
  547. package/maps/cardMap.lua +211 -0
  548. package/maps/characterMap.d.ts +3 -0
  549. package/maps/characterMap.lua +89 -0
  550. package/maps/collectibleDescriptionMap.d.ts +3 -0
  551. package/maps/collectibleDescriptionMap.lua +728 -0
  552. package/maps/collectibleNameMap.d.ts +3 -0
  553. package/maps/collectibleNameMap.lua +728 -0
  554. package/maps/defaultPlayerStatMap.d.ts +3 -0
  555. package/maps/defaultPlayerStatMap.lua +24 -0
  556. package/maps/gridEntityTypeToBrokenStateMap.d.ts +2 -0
  557. package/maps/gridEntityTypeToBrokenStateMap.lua +26 -0
  558. package/maps/gridEntityXMLMap.d.ts +9 -0
  559. package/maps/gridEntityXMLMap.lua +51 -0
  560. package/maps/pillEffectMap.d.ts +3 -0
  561. package/maps/pillEffectMap.lua +89 -0
  562. package/maps/roomShapeToTopLeftWallGridIndexMap.d.ts +7 -0
  563. package/maps/roomShapeToTopLeftWallGridIndexMap.lua +15 -0
  564. package/maps/roomTypeMap.d.ts +3 -0
  565. package/maps/roomTypeMap.lua +44 -0
  566. package/maps/trinketDescriptionMap.d.ts +3 -0
  567. package/maps/trinketDescriptionMap.lua +196 -0
  568. package/maps/trinketNameMap.d.ts +3 -0
  569. package/maps/trinketNameMap.lua +196 -0
  570. package/objects/LRoomShapeToRectangles.d.ts +13 -0
  571. package/objects/LRoomShapeToRectangles.lua +33 -0
  572. package/objects/callbackRegisterFunctions.d.ts +5 -0
  573. package/objects/callbackRegisterFunctions.lua +231 -0
  574. package/objects/cardDescriptions.d.ts +5 -0
  575. package/objects/cardDescriptions.lua +105 -0
  576. package/objects/cardNames.d.ts +5 -0
  577. package/objects/cardNames.lua +105 -0
  578. package/objects/cardTypes.d.ts +5 -0
  579. package/objects/cardTypes.lua +106 -0
  580. package/objects/challengeNames.d.ts +5 -0
  581. package/objects/challengeNames.lua +53 -0
  582. package/objects/characterNames.d.ts +5 -0
  583. package/objects/characterNames.lua +49 -0
  584. package/objects/coinSubTypeToValue.d.ts +5 -0
  585. package/objects/coinSubTypeToValue.lua +15 -0
  586. package/objects/colors.d.ts +17 -0
  587. package/objects/colors.lua +12 -0
  588. package/objects/directionNames.d.ts +4 -0
  589. package/objects/directionNames.lua +11 -0
  590. package/objects/directionToDegrees.d.ts +4 -0
  591. package/objects/directionToDegrees.lua +11 -0
  592. package/objects/directionToVector.d.ts +4 -0
  593. package/objects/directionToVector.lua +13 -0
  594. package/objects/doorSlotFlagToDoorSlot.d.ts +5 -0
  595. package/objects/doorSlotFlagToDoorSlot.lua +16 -0
  596. package/objects/doorSlotToDirection.d.ts +4 -0
  597. package/objects/doorSlotToDirection.lua +16 -0
  598. package/objects/isaacAPIClassTypeToBrand.d.ts +5 -0
  599. package/objects/isaacAPIClassTypeToBrand.lua +7 -0
  600. package/objects/isaacAPIClassTypeToCopyFunction.d.ts +5 -0
  601. package/objects/isaacAPIClassTypeToCopyFunction.lua +13 -0
  602. package/objects/languageNames.d.ts +4 -0
  603. package/objects/languageNames.lua +13 -0
  604. package/objects/pillEffectClasses.d.ts +5 -0
  605. package/objects/pillEffectClasses.lua +59 -0
  606. package/objects/pillEffectNames.d.ts +5 -0
  607. package/objects/pillEffectNames.lua +57 -0
  608. package/objects/pillEffectTypes.d.ts +5 -0
  609. package/objects/pillEffectTypes.lua +58 -0
  610. package/objects/roomShapeBounds.d.ts +8 -0
  611. package/objects/roomShapeBounds.lua +24 -0
  612. package/objects/roomShapeLayoutSizes.d.ts +10 -0
  613. package/objects/roomShapeLayoutSizes.lua +25 -0
  614. package/objects/roomShapeToBottomRightPosition.d.ts +8 -0
  615. package/objects/roomShapeToBottomRightPosition.lua +20 -0
  616. package/objects/roomShapeToDoorSlots.d.ts +4 -0
  617. package/objects/roomShapeToDoorSlots.lua +46 -0
  618. package/objects/roomShapeToDoorSlotsToGridIndexDelta.d.ts +8 -0
  619. package/objects/roomShapeToDoorSlotsToGridIndexDelta.lua +87 -0
  620. package/objects/roomShapeToGridWidth.d.ts +4 -0
  621. package/objects/roomShapeToGridWidth.lua +20 -0
  622. package/objects/roomShapeToTopLeftPosition.d.ts +8 -0
  623. package/objects/roomShapeToTopLeftPosition.lua +22 -0
  624. package/objects/roomShapeVolumes.d.ts +13 -0
  625. package/objects/roomShapeVolumes.lua +27 -0
  626. package/objects/roomTypeNames.d.ts +5 -0
  627. package/objects/roomTypeNames.lua +37 -0
  628. package/objects/serializedIsaacAPIClassTypeToIdentityFunction.d.ts +4 -0
  629. package/objects/serializedIsaacAPIClassTypeToIdentityFunction.lua +13 -0
  630. package/objects/stageTypeToLetter.d.ts +4 -0
  631. package/objects/stageTypeToLetter.lua +12 -0
  632. package/objects/transformationNames.d.ts +5 -0
  633. package/objects/transformationNames.lua +21 -0
  634. package/package.json +2 -3
  635. package/patchErrorFunctions.d.ts +1 -0
  636. package/patchErrorFunctions.lua +50 -0
  637. package/sets/LRoomShapesSet.d.ts +2 -0
  638. package/sets/LRoomShapesSet.lua +8 -0
  639. package/sets/bossSets.d.ts +4 -0
  640. package/sets/bossSets.lua +531 -0
  641. package/sets/charactersThatStartWithAnActiveItemSet.d.ts +2 -0
  642. package/sets/charactersThatStartWithAnActiveItemSet.lua +20 -0
  643. package/sets/charactersWithBlackHeartFromEternalHeartSet.d.ts +2 -0
  644. package/sets/charactersWithBlackHeartFromEternalHeartSet.lua +8 -0
  645. package/sets/charactersWithFreeDevilDealsSet.d.ts +2 -0
  646. package/sets/charactersWithFreeDevilDealsSet.lua +8 -0
  647. package/sets/charactersWithNoRedHeartsSet.d.ts +6 -0
  648. package/sets/charactersWithNoRedHeartsSet.lua +17 -0
  649. package/sets/charactersWithNoSoulHeartsSet.d.ts +6 -0
  650. package/sets/charactersWithNoSoulHeartsSet.lua +14 -0
  651. package/sets/chestPickupVariantsSet.d.ts +2 -0
  652. package/sets/chestPickupVariantsSet.lua +21 -0
  653. package/sets/familiarsThatShootPlayerTearsSet.d.ts +2 -0
  654. package/sets/familiarsThatShootPlayerTearsSet.lua +17 -0
  655. package/sets/lostStyleCharactersSet.d.ts +6 -0
  656. package/sets/lostStyleCharactersSet.lua +14 -0
  657. package/sets/mineShaftRoomSubTypesSet.d.ts +2 -0
  658. package/sets/mineShaftRoomSubTypesSet.lua +14 -0
  659. package/sets/redHeartSubTypesSet.d.ts +2 -0
  660. package/sets/redHeartSubTypesSet.lua +8 -0
  661. package/sets/sinEntityTypesSet.d.ts +2 -0
  662. package/sets/sinEntityTypesSet.lua +16 -0
  663. package/sets/singleUseActiveCollectibleTypesSet.d.ts +2 -0
  664. package/sets/singleUseActiveCollectibleTypesSet.lua +17 -0
  665. package/sets/storyBossesSet.d.ts +2 -0
  666. package/sets/storyBossesSet.lua +22 -0
  667. package/types/AnyEntity.d.ts +2 -0
  668. package/types/AnyEntity.lua +2 -0
  669. package/types/CollectibleIndex.d.ts +16 -0
  670. package/types/CollectibleIndex.lua +2 -0
  671. package/types/PickingUpItem.d.ts +34 -0
  672. package/types/PickingUpItem.lua +27 -0
  673. package/types/PlayerIndex.d.ts +16 -0
  674. package/types/PlayerIndex.lua +2 -0
  675. package/types/private/IsaacAPIClass.d.ts +4 -0
  676. package/types/private/IsaacAPIClass.lua +2 -0
  677. package/types/private/SerializedIsaacAPIClass.d.ts +4 -0
  678. package/types/private/SerializedIsaacAPIClass.lua +2 -0
  679. package/types/private/TSTLClass.d.ts +4 -0
  680. package/types/private/TSTLClass.lua +2 -0
  681. package/upgradeMod.d.ts +23 -0
  682. package/upgradeMod.lua +33 -0
  683. package/.eslintrc.js +0 -70
  684. package/build.sh +0 -27
  685. package/docs.sh +0 -21
  686. package/lint.sh +0 -34
  687. package/project.json +0 -37
  688. package/release.sh +0 -16
  689. package/scripts/.eslintrc.js +0 -21
  690. package/scripts/docsEntryPointLint.ts +0 -135
  691. package/scripts/tsconfig.json +0 -5
  692. package/src/cachedClasses.ts +0 -39
  693. package/src/callbacks/customRevive.ts +0 -206
  694. package/src/callbacks/itemPickup.ts +0 -101
  695. package/src/callbacks/postBombInitLate.ts +0 -36
  696. package/src/callbacks/postBoneSwing.ts +0 -64
  697. package/src/callbacks/postCollectibleInitFirst.ts +0 -39
  698. package/src/callbacks/postCursedTeleport.ts +0 -183
  699. package/src/callbacks/postCustomDoorEnter.ts +0 -297
  700. package/src/callbacks/postDoorRender.ts +0 -26
  701. package/src/callbacks/postDoorUpdate.ts +0 -26
  702. package/src/callbacks/postEffectInitLate.ts +0 -36
  703. package/src/callbacks/postEffectStateChanged.ts +0 -43
  704. package/src/callbacks/postEsauJr.ts +0 -107
  705. package/src/callbacks/postFamiliarInitLate.ts +0 -36
  706. package/src/callbacks/postFamiliarStateChanged.ts +0 -43
  707. package/src/callbacks/postFlip.ts +0 -88
  708. package/src/callbacks/postGreedModeWave.ts +0 -41
  709. package/src/callbacks/postGridEntity.ts +0 -159
  710. package/src/callbacks/postGridEntityCollision.ts +0 -69
  711. package/src/callbacks/postGridEntityRender.ts +0 -26
  712. package/src/callbacks/postHolyMantleRemoved.ts +0 -55
  713. package/src/callbacks/postItemDischarged.ts +0 -149
  714. package/src/callbacks/postKnifeInitLate.ts +0 -36
  715. package/src/callbacks/postLaserInitLate.ts +0 -36
  716. package/src/callbacks/postNPCInitLate.ts +0 -36
  717. package/src/callbacks/postNPCStateChanged.ts +0 -42
  718. package/src/callbacks/postNewRoomEarly.ts +0 -90
  719. package/src/callbacks/postPickupCollect.ts +0 -48
  720. package/src/callbacks/postPickupInitLate.ts +0 -36
  721. package/src/callbacks/postPickupStateChanged.ts +0 -43
  722. package/src/callbacks/postPitRender.ts +0 -26
  723. package/src/callbacks/postPitUpdate.ts +0 -26
  724. package/src/callbacks/postPlayerChangeHealth.ts +0 -62
  725. package/src/callbacks/postPlayerChangeType.ts +0 -56
  726. package/src/callbacks/postPlayerFatalDamage.ts +0 -98
  727. package/src/callbacks/postPlayerInitLate.ts +0 -37
  728. package/src/callbacks/postPlayerReordered.ts +0 -142
  729. package/src/callbacks/postPoopRender.ts +0 -26
  730. package/src/callbacks/postPoopUpdate.ts +0 -26
  731. package/src/callbacks/postPressurePlateRender.ts +0 -26
  732. package/src/callbacks/postPressurePlateUpdate.ts +0 -26
  733. package/src/callbacks/postProjectileInitLate.ts +0 -36
  734. package/src/callbacks/postPurchase.ts +0 -64
  735. package/src/callbacks/postRockRender.ts +0 -26
  736. package/src/callbacks/postRockUpdate.ts +0 -26
  737. package/src/callbacks/postRoomClearChanged.ts +0 -52
  738. package/src/callbacks/postSacrifice.ts +0 -62
  739. package/src/callbacks/postSlotInitUpdate.ts +0 -63
  740. package/src/callbacks/postSlotRender.ts +0 -96
  741. package/src/callbacks/postSpikesRender.ts +0 -26
  742. package/src/callbacks/postSpikesUpdate.ts +0 -26
  743. package/src/callbacks/postTNTRender.ts +0 -26
  744. package/src/callbacks/postTNTUpdate.ts +0 -26
  745. package/src/callbacks/postTearInitLate.ts +0 -36
  746. package/src/callbacks/postTearInitVeryLate.ts +0 -41
  747. package/src/callbacks/postTransformation.ts +0 -59
  748. package/src/callbacks/postTrinketBreak.ts +0 -110
  749. package/src/callbacks/preBerserkDeath.ts +0 -49
  750. package/src/callbacks/preNewLevel.ts +0 -55
  751. package/src/callbacks/reorderedCallbacks.ts +0 -166
  752. package/src/callbacks/subscriptions/postBombInitLate.ts +0 -32
  753. package/src/callbacks/subscriptions/postBoneSwing.ts +0 -24
  754. package/src/callbacks/subscriptions/postCollectibleInitFirst.ts +0 -37
  755. package/src/callbacks/subscriptions/postCursedTeleport.ts +0 -24
  756. package/src/callbacks/subscriptions/postCustomDoorEnter.ts +0 -45
  757. package/src/callbacks/subscriptions/postCustomRevive.ts +0 -36
  758. package/src/callbacks/subscriptions/postDoorRender.ts +0 -35
  759. package/src/callbacks/subscriptions/postDoorUpdate.ts +0 -35
  760. package/src/callbacks/subscriptions/postEffectInitLate.ts +0 -32
  761. package/src/callbacks/subscriptions/postEffectStateChanged.ts +0 -40
  762. package/src/callbacks/subscriptions/postEsauJr.ts +0 -24
  763. package/src/callbacks/subscriptions/postFamiliarInitLate.ts +0 -32
  764. package/src/callbacks/subscriptions/postFamiliarStateChanged.ts +0 -40
  765. package/src/callbacks/subscriptions/postFirstEsauJr.ts +0 -24
  766. package/src/callbacks/subscriptions/postFirstFlip.ts +0 -24
  767. package/src/callbacks/subscriptions/postFlip.ts +0 -22
  768. package/src/callbacks/subscriptions/postGameStartedReordered.ts +0 -24
  769. package/src/callbacks/subscriptions/postGreedModeWave.ts +0 -24
  770. package/src/callbacks/subscriptions/postGridEntityBroken.ts +0 -51
  771. package/src/callbacks/subscriptions/postGridEntityCollision.ts +0 -54
  772. package/src/callbacks/subscriptions/postGridEntityInit.ts +0 -51
  773. package/src/callbacks/subscriptions/postGridEntityRemove.ts +0 -52
  774. package/src/callbacks/subscriptions/postGridEntityRender.ts +0 -51
  775. package/src/callbacks/subscriptions/postGridEntityStateChanged.ts +0 -55
  776. package/src/callbacks/subscriptions/postGridEntityUpdate.ts +0 -51
  777. package/src/callbacks/subscriptions/postHolyMantleRemoved.ts +0 -48
  778. package/src/callbacks/subscriptions/postItemDischarged.ts +0 -43
  779. package/src/callbacks/subscriptions/postItemPickup.ts +0 -64
  780. package/src/callbacks/subscriptions/postKnifeInitLate.ts +0 -32
  781. package/src/callbacks/subscriptions/postLaserInitLate.ts +0 -32
  782. package/src/callbacks/subscriptions/postNPCInitLate.ts +0 -32
  783. package/src/callbacks/subscriptions/postNPCStateChanged.ts +0 -42
  784. package/src/callbacks/subscriptions/postNewLevelReordered.ts +0 -22
  785. package/src/callbacks/subscriptions/postNewRoomEarly.ts +0 -22
  786. package/src/callbacks/subscriptions/postNewRoomReordered.ts +0 -22
  787. package/src/callbacks/subscriptions/postPEffectUpdateReordered.ts +0 -40
  788. package/src/callbacks/subscriptions/postPickupCollect.ts +0 -34
  789. package/src/callbacks/subscriptions/postPickupInitLate.ts +0 -31
  790. package/src/callbacks/subscriptions/postPickupStateChanged.ts +0 -35
  791. package/src/callbacks/subscriptions/postPitRender.ts +0 -35
  792. package/src/callbacks/subscriptions/postPitUpdate.ts +0 -35
  793. package/src/callbacks/subscriptions/postPlayerChangeHealth.ts +0 -45
  794. package/src/callbacks/subscriptions/postPlayerChangeType.ts +0 -40
  795. package/src/callbacks/subscriptions/postPlayerFatalDamage.ts +0 -67
  796. package/src/callbacks/subscriptions/postPlayerInitLate.ts +0 -40
  797. package/src/callbacks/subscriptions/postPlayerInitReordered.ts +0 -40
  798. package/src/callbacks/subscriptions/postPlayerRenderReordered.ts +0 -40
  799. package/src/callbacks/subscriptions/postPlayerUpdateReordered.ts +0 -40
  800. package/src/callbacks/subscriptions/postPoopRender.ts +0 -35
  801. package/src/callbacks/subscriptions/postPoopUpdate.ts +0 -35
  802. package/src/callbacks/subscriptions/postPressurePlateRender.ts +0 -37
  803. package/src/callbacks/subscriptions/postPressurePlateUpdate.ts +0 -37
  804. package/src/callbacks/subscriptions/postProjectileInitLate.ts +0 -35
  805. package/src/callbacks/subscriptions/postPurchase.ts +0 -31
  806. package/src/callbacks/subscriptions/postRockRender.ts +0 -35
  807. package/src/callbacks/subscriptions/postRockUpdate.ts +0 -35
  808. package/src/callbacks/subscriptions/postRoomClearChanged.ts +0 -24
  809. package/src/callbacks/subscriptions/postSacrifice.ts +0 -43
  810. package/src/callbacks/subscriptions/postSlotAnimationChanged.ts +0 -40
  811. package/src/callbacks/subscriptions/postSlotDestroyed.ts +0 -32
  812. package/src/callbacks/subscriptions/postSlotInit.ts +0 -32
  813. package/src/callbacks/subscriptions/postSlotRender.ts +0 -32
  814. package/src/callbacks/subscriptions/postSlotUpdate.ts +0 -32
  815. package/src/callbacks/subscriptions/postSpikesRender.ts +0 -35
  816. package/src/callbacks/subscriptions/postSpikesUpdate.ts +0 -35
  817. package/src/callbacks/subscriptions/postTNTRender.ts +0 -35
  818. package/src/callbacks/subscriptions/postTNTUpdate.ts +0 -35
  819. package/src/callbacks/subscriptions/postTearInitLate.ts +0 -32
  820. package/src/callbacks/subscriptions/postTearInitVeryLate.ts +0 -32
  821. package/src/callbacks/subscriptions/postTransformation.ts +0 -40
  822. package/src/callbacks/subscriptions/postTrinketBreak.ts +0 -38
  823. package/src/callbacks/subscriptions/preBerserkDeath.ts +0 -42
  824. package/src/callbacks/subscriptions/preCustomRevive.ts +0 -45
  825. package/src/callbacks/subscriptions/preItemPickup.ts +0 -64
  826. package/src/callbacks/subscriptions/preNewLevel.ts +0 -24
  827. package/src/classes/DefaultMap.ts +0 -220
  828. package/src/classes/ModUpgraded.ts +0 -83
  829. package/src/constants.ts +0 -140
  830. package/src/constantsFirstLast.ts +0 -212
  831. package/src/enums/HealthType.ts +0 -16
  832. package/src/enums/ModCallbackCustom.ts +0 -943
  833. package/src/enums/PocketItemType.ts +0 -8
  834. package/src/enums/SerializationType.ts +0 -5
  835. package/src/enums/private/CopyableIsaacAPIClassType.ts +0 -7
  836. package/src/enums/private/SaveDataKey.ts +0 -14
  837. package/src/enums/private/SerializationBrand.ts +0 -42
  838. package/src/features/characterHealthConversion.ts +0 -116
  839. package/src/features/characterStats.ts +0 -61
  840. package/src/features/debugDisplay/debugDisplay.ts +0 -221
  841. package/src/features/debugDisplay/exports.ts +0 -368
  842. package/src/features/debugDisplay/v.ts +0 -65
  843. package/src/features/deployJSONRoom.ts +0 -672
  844. package/src/features/disableInputs.ts +0 -193
  845. package/src/features/disableSound.ts +0 -77
  846. package/src/features/extraConsoleCommands/commandsDisplay.ts +0 -290
  847. package/src/features/extraConsoleCommands/commandsSubroutines.ts +0 -139
  848. package/src/features/extraConsoleCommands/init.ts +0 -334
  849. package/src/features/extraConsoleCommands/listCommands.ts +0 -1298
  850. package/src/features/extraConsoleCommands/v.ts +0 -14
  851. package/src/features/fadeInRemover.ts +0 -60
  852. package/src/features/fastReset.ts +0 -75
  853. package/src/features/forgottenSwitch.ts +0 -50
  854. package/src/features/getCollectibleItemPoolType.ts +0 -66
  855. package/src/features/playerInventory.ts +0 -187
  856. package/src/features/ponyDetection.ts +0 -74
  857. package/src/features/preventCollectibleRotation.ts +0 -113
  858. package/src/features/runInNFrames.ts +0 -148
  859. package/src/features/saveDataManager/constants.ts +0 -4
  860. package/src/features/saveDataManager/exports.ts +0 -230
  861. package/src/features/saveDataManager/load.ts +0 -90
  862. package/src/features/saveDataManager/main.ts +0 -187
  863. package/src/features/saveDataManager/maps.ts +0 -13
  864. package/src/features/saveDataManager/merge.ts +0 -182
  865. package/src/features/saveDataManager/save.ts +0 -66
  866. package/src/features/saveDataManager/serializationBrand.ts +0 -15
  867. package/src/features/sirenHelpers.ts +0 -129
  868. package/src/features/taintedLazarusPlayers.ts +0 -113
  869. package/src/featuresInitialized.ts +0 -20
  870. package/src/functions/array.ts +0 -412
  871. package/src/functions/benchmark.ts +0 -36
  872. package/src/functions/bitwise.ts +0 -24
  873. package/src/functions/boss.ts +0 -227
  874. package/src/functions/cacheFlag.ts +0 -12
  875. package/src/functions/cards.ts +0 -267
  876. package/src/functions/challenges.ts +0 -11
  877. package/src/functions/character.ts +0 -124
  878. package/src/functions/charge.ts +0 -237
  879. package/src/functions/chargeBar.ts +0 -67
  880. package/src/functions/collectibleCacheFlag.ts +0 -90
  881. package/src/functions/collectibleSet.ts +0 -57
  882. package/src/functions/collectibleTag.ts +0 -89
  883. package/src/functions/collectibles.ts +0 -610
  884. package/src/functions/color.ts +0 -149
  885. package/src/functions/debug.ts +0 -65
  886. package/src/functions/deepCopy.ts +0 -508
  887. package/src/functions/deepCopyTests.ts +0 -390
  888. package/src/functions/direction.ts +0 -16
  889. package/src/functions/doors.ts +0 -343
  890. package/src/functions/easing.ts +0 -182
  891. package/src/functions/eden.ts +0 -47
  892. package/src/functions/entity.ts +0 -352
  893. package/src/functions/entitySpecific.ts +0 -889
  894. package/src/functions/entityTypes.ts +0 -6
  895. package/src/functions/enums.ts +0 -145
  896. package/src/functions/familiars.ts +0 -106
  897. package/src/functions/flag.ts +0 -165
  898. package/src/functions/flying.ts +0 -117
  899. package/src/functions/globals.ts +0 -249
  900. package/src/functions/gridEntity.ts +0 -511
  901. package/src/functions/gridEntitySpecific.ts +0 -112
  902. package/src/functions/input.ts +0 -139
  903. package/src/functions/isaacAPIClass.ts +0 -65
  904. package/src/functions/jsonHelpers.ts +0 -45
  905. package/src/functions/jsonRoom.ts +0 -100
  906. package/src/functions/kColor.ts +0 -130
  907. package/src/functions/language.ts +0 -13
  908. package/src/functions/level.ts +0 -31
  909. package/src/functions/log.ts +0 -660
  910. package/src/functions/map.ts +0 -56
  911. package/src/functions/math.ts +0 -149
  912. package/src/functions/mergeTests.ts +0 -288
  913. package/src/functions/npc.ts +0 -148
  914. package/src/functions/pickupVariants.ts +0 -60
  915. package/src/functions/pickups.ts +0 -449
  916. package/src/functions/pills.ts +0 -182
  917. package/src/functions/player.ts +0 -975
  918. package/src/functions/playerDataStructures.ts +0 -150
  919. package/src/functions/playerHealth.ts +0 -318
  920. package/src/functions/playerIndex.ts +0 -195
  921. package/src/functions/pocketItems.ts +0 -149
  922. package/src/functions/positionVelocity.ts +0 -188
  923. package/src/functions/random.ts +0 -77
  924. package/src/functions/revive.ts +0 -201
  925. package/src/functions/rng.ts +0 -177
  926. package/src/functions/roomData.ts +0 -199
  927. package/src/functions/roomGrid.ts +0 -109
  928. package/src/functions/roomShape.ts +0 -80
  929. package/src/functions/rooms.ts +0 -667
  930. package/src/functions/run.ts +0 -36
  931. package/src/functions/seeds.ts +0 -19
  932. package/src/functions/serialization.ts +0 -97
  933. package/src/functions/set.ts +0 -95
  934. package/src/functions/sound.ts +0 -9
  935. package/src/functions/spawnCollectible.ts +0 -104
  936. package/src/functions/sprite.ts +0 -107
  937. package/src/functions/stage.ts +0 -125
  938. package/src/functions/string.ts +0 -47
  939. package/src/functions/table.ts +0 -139
  940. package/src/functions/tears.ts +0 -32
  941. package/src/functions/transformations.ts +0 -137
  942. package/src/functions/trinketCacheFlag.ts +0 -60
  943. package/src/functions/trinketGive.ts +0 -157
  944. package/src/functions/trinkets.ts +0 -215
  945. package/src/functions/tstlClass.ts +0 -91
  946. package/src/functions/ui.ts +0 -138
  947. package/src/functions/utils.ts +0 -200
  948. package/src/functions/vector.ts +0 -145
  949. package/src/index.ts +0 -162
  950. package/src/initCustomCallbacks.ts +0 -120
  951. package/src/initFeatures.ts +0 -37
  952. package/src/interfaces/AddCallbackParameterCustom.ts +0 -174
  953. package/src/interfaces/ChargeBarSprites.ts +0 -12
  954. package/src/interfaces/JSONDoor.ts +0 -13
  955. package/src/interfaces/JSONEntity.ts +0 -16
  956. package/src/interfaces/JSONRoom.ts +0 -36
  957. package/src/interfaces/JSONRooms.ts +0 -12
  958. package/src/interfaces/JSONSpawn.ts +0 -14
  959. package/src/interfaces/PlayerHealth.ts +0 -16
  960. package/src/interfaces/PocketItemDescription.ts +0 -9
  961. package/src/interfaces/SaveData.ts +0 -29
  962. package/src/interfaces/TrinketSituation.ts +0 -9
  963. package/src/interfaces/private/TSTLClassMetatable.ts +0 -8
  964. package/src/maps/cardMap.ts +0 -209
  965. package/src/maps/characterMap.ts +0 -87
  966. package/src/maps/collectibleDescriptionMap.ts +0 -732
  967. package/src/maps/collectibleNameMap.ts +0 -731
  968. package/src/maps/defaultPlayerStatMap.ts +0 -17
  969. package/src/maps/gridEntityTypeToBrokenStateMap.ts +0 -50
  970. package/src/maps/gridEntityXMLMap.ts +0 -176
  971. package/src/maps/pillEffectMap.ts +0 -88
  972. package/src/maps/roomShapeToTopLeftWallGridIndexMap.ts +0 -18
  973. package/src/maps/roomTypeMap.ts +0 -40
  974. package/src/maps/trinketDescriptionMap.ts +0 -200
  975. package/src/maps/trinketNameMap.ts +0 -198
  976. package/src/objects/LRoomShapeToRectangles.ts +0 -44
  977. package/src/objects/callbackRegisterFunctions.ts +0 -171
  978. package/src/objects/cardDescriptions.ts +0 -105
  979. package/src/objects/cardNames.ts +0 -105
  980. package/src/objects/cardTypes.ts +0 -104
  981. package/src/objects/challengeNames.ts +0 -52
  982. package/src/objects/characterNames.ts +0 -48
  983. package/src/objects/coinSubTypeToValue.ts +0 -14
  984. package/src/objects/colors.ts +0 -16
  985. package/src/objects/directionNames.ts +0 -11
  986. package/src/objects/directionToDegrees.ts +0 -11
  987. package/src/objects/directionToVector.ts +0 -12
  988. package/src/objects/doorSlotFlagToDoorSlot.ts +0 -16
  989. package/src/objects/doorSlotToDirection.ts +0 -14
  990. package/src/objects/isaacAPIClassTypeToBrand.ts +0 -11
  991. package/src/objects/isaacAPIClassTypeToCopyFunction.ts +0 -18
  992. package/src/objects/languageNames.ts +0 -13
  993. package/src/objects/pillEffectClasses.ts +0 -63
  994. package/src/objects/pillEffectNames.ts +0 -57
  995. package/src/objects/pillEffectTypes.ts +0 -62
  996. package/src/objects/roomShapeBounds.ts +0 -71
  997. package/src/objects/roomShapeLayoutSizes.ts +0 -45
  998. package/src/objects/roomShapeToBottomRightPosition.ts +0 -25
  999. package/src/objects/roomShapeToDoorSlots.ts +0 -83
  1000. package/src/objects/roomShapeToDoorSlotsToGridIndexDelta.ts +0 -127
  1001. package/src/objects/roomShapeToGridWidth.ts +0 -21
  1002. package/src/objects/roomShapeToTopLeftPosition.ts +0 -26
  1003. package/src/objects/roomShapeVolumes.ts +0 -38
  1004. package/src/objects/roomTypeNames.ts +0 -36
  1005. package/src/objects/serializedIsaacAPIClassTypeToIdentityFunction.ts +0 -14
  1006. package/src/objects/stageTypeToLetter.ts +0 -15
  1007. package/src/objects/transformationNames.ts +0 -20
  1008. package/src/patchErrorFunctions.ts +0 -92
  1009. package/src/sets/LRoomShapesSet.ts +0 -8
  1010. package/src/sets/bossSets.ts +0 -470
  1011. package/src/sets/charactersThatStartWithAnActiveItemSet.ts +0 -16
  1012. package/src/sets/charactersWithBlackHeartFromEternalHeartSet.ts +0 -7
  1013. package/src/sets/charactersWithFreeDevilDealsSet.ts +0 -4
  1014. package/src/sets/charactersWithNoRedHeartsSet.ts +0 -17
  1015. package/src/sets/charactersWithNoSoulHeartsSet.ts +0 -14
  1016. package/src/sets/chestPickupVariantsSet.ts +0 -16
  1017. package/src/sets/familiarsThatShootPlayerTearsSet.ts +0 -13
  1018. package/src/sets/lostStyleCharactersSet.ts +0 -13
  1019. package/src/sets/mineShaftRoomSubTypesSet.ts +0 -10
  1020. package/src/sets/redHeartSubTypesSet.ts +0 -7
  1021. package/src/sets/sinEntityTypesSet.ts +0 -11
  1022. package/src/sets/singleUseActiveCollectibleTypesSet.ts +0 -13
  1023. package/src/sets/storyBossesSet.ts +0 -17
  1024. package/src/types/AnyEntity.ts +0 -12
  1025. package/src/types/AwaitingTextInput.d.ts +0 -2
  1026. package/src/types/CollectibleIndex.ts +0 -14
  1027. package/src/types/PickingUpItem.ts +0 -89
  1028. package/src/types/PlayerIndex.ts +0 -13
  1029. package/src/types/private/IsaacAPIClass.ts +0 -3
  1030. package/src/types/private/SerializedIsaacAPIClass.ts +0 -3
  1031. package/src/types/private/TSTLClass.ts +0 -3
  1032. package/src/upgradeMod.ts +0 -55
  1033. package/tsconfig.json +0 -42
  1034. package/typedoc.json +0 -158
  1035. package/website-root.md +0 -11
@@ -0,0 +1,2488 @@
1
+ local function __TS__ArrayIsArray(value)
2
+ return type(value) == "table" and (value[1] ~= nil or next(value) == nil)
3
+ end
4
+
5
+ local function __TS__ArrayConcat(self, ...)
6
+ local items = {...}
7
+ local result = {}
8
+ local len = 0
9
+ for i = 1, #self do
10
+ len = len + 1
11
+ result[len] = self[i]
12
+ end
13
+ for i = 1, #items do
14
+ local item = items[i]
15
+ if __TS__ArrayIsArray(item) then
16
+ for j = 1, #item do
17
+ len = len + 1
18
+ result[len] = item[j]
19
+ end
20
+ else
21
+ len = len + 1
22
+ result[len] = item
23
+ end
24
+ end
25
+ return result
26
+ end
27
+
28
+ local __TS__Symbol, Symbol
29
+ do
30
+ local symbolMetatable = {__tostring = function(self)
31
+ return ("Symbol(" .. (self.description or "")) .. ")"
32
+ end}
33
+ function __TS__Symbol(description)
34
+ return setmetatable({description = description}, symbolMetatable)
35
+ end
36
+ Symbol = {
37
+ iterator = __TS__Symbol("Symbol.iterator"),
38
+ hasInstance = __TS__Symbol("Symbol.hasInstance"),
39
+ species = __TS__Symbol("Symbol.species"),
40
+ toStringTag = __TS__Symbol("Symbol.toStringTag")
41
+ }
42
+ end
43
+
44
+ local function __TS__ArrayEntries(array)
45
+ local key = 0
46
+ return {
47
+ [Symbol.iterator] = function(self)
48
+ return self
49
+ end,
50
+ next = function(self)
51
+ local result = {done = array[key + 1] == nil, value = {key, array[key + 1]}}
52
+ key = key + 1
53
+ return result
54
+ end
55
+ }
56
+ end
57
+
58
+ local function __TS__ArrayEvery(self, callbackfn, thisArg)
59
+ for i = 1, #self do
60
+ if not callbackfn(thisArg, self[i], i - 1, self) then
61
+ return false
62
+ end
63
+ end
64
+ return true
65
+ end
66
+
67
+ local function __TS__ArrayFilter(self, callbackfn, thisArg)
68
+ local result = {}
69
+ local len = 0
70
+ for i = 1, #self do
71
+ if callbackfn(thisArg, self[i], i - 1, self) then
72
+ len = len + 1
73
+ result[len] = self[i]
74
+ end
75
+ end
76
+ return result
77
+ end
78
+
79
+ local function __TS__ArrayForEach(self, callbackFn, thisArg)
80
+ for i = 1, #self do
81
+ callbackFn(thisArg, self[i], i - 1, self)
82
+ end
83
+ end
84
+
85
+ local function __TS__ArrayFind(self, predicate, thisArg)
86
+ for i = 1, #self do
87
+ local elem = self[i]
88
+ if predicate(thisArg, elem, i - 1, self) then
89
+ return elem
90
+ end
91
+ end
92
+ return nil
93
+ end
94
+
95
+ local function __TS__ArrayFindIndex(self, callbackFn, thisArg)
96
+ for i = 1, #self do
97
+ if callbackFn(thisArg, self[i], i - 1, self) then
98
+ return i - 1
99
+ end
100
+ end
101
+ return -1
102
+ end
103
+
104
+ local __TS__Iterator
105
+ do
106
+ local function iteratorGeneratorStep(self)
107
+ local co = self.____coroutine
108
+ local status, value = coroutine.resume(co)
109
+ if not status then
110
+ error(value, 0)
111
+ end
112
+ if coroutine.status(co) == "dead" then
113
+ return
114
+ end
115
+ return true, value
116
+ end
117
+ local function iteratorIteratorStep(self)
118
+ local result = self:next()
119
+ if result.done then
120
+ return
121
+ end
122
+ return true, result.value
123
+ end
124
+ local function iteratorStringStep(self, index)
125
+ index = index + 1
126
+ if index > #self then
127
+ return
128
+ end
129
+ return index, string.sub(self, index, index)
130
+ end
131
+ function __TS__Iterator(iterable)
132
+ if type(iterable) == "string" then
133
+ return iteratorStringStep, iterable, 0
134
+ elseif iterable.____coroutine ~= nil then
135
+ return iteratorGeneratorStep, iterable
136
+ elseif iterable[Symbol.iterator] then
137
+ local iterator = iterable[Symbol.iterator](iterable)
138
+ return iteratorIteratorStep, iterator
139
+ else
140
+ return ipairs(iterable)
141
+ end
142
+ end
143
+ end
144
+
145
+ local __TS__ArrayFrom
146
+ do
147
+ local function arrayLikeStep(self, index)
148
+ index = index + 1
149
+ if index > self.length then
150
+ return
151
+ end
152
+ return index, self[index]
153
+ end
154
+ local function arrayLikeIterator(arr)
155
+ if type(arr.length) == "number" then
156
+ return arrayLikeStep, arr, 0
157
+ end
158
+ return __TS__Iterator(arr)
159
+ end
160
+ function __TS__ArrayFrom(arrayLike, mapFn, thisArg)
161
+ local result = {}
162
+ if mapFn == nil then
163
+ for ____, v in arrayLikeIterator(arrayLike) do
164
+ result[#result + 1] = v
165
+ end
166
+ else
167
+ for i, v in arrayLikeIterator(arrayLike) do
168
+ result[#result + 1] = mapFn(thisArg, v, i - 1)
169
+ end
170
+ end
171
+ return result
172
+ end
173
+ end
174
+
175
+ local function __TS__ArrayIncludes(self, searchElement, fromIndex)
176
+ if fromIndex == nil then
177
+ fromIndex = 0
178
+ end
179
+ local len = #self
180
+ local k = fromIndex
181
+ if fromIndex < 0 then
182
+ k = len + fromIndex
183
+ end
184
+ if k < 0 then
185
+ k = 0
186
+ end
187
+ for i = k + 1, len do
188
+ if self[i] == searchElement then
189
+ return true
190
+ end
191
+ end
192
+ return false
193
+ end
194
+
195
+ local function __TS__ArrayIndexOf(self, searchElement, fromIndex)
196
+ if fromIndex == nil then
197
+ fromIndex = 0
198
+ end
199
+ local len = #self
200
+ if len == 0 then
201
+ return -1
202
+ end
203
+ if fromIndex >= len then
204
+ return -1
205
+ end
206
+ if fromIndex < 0 then
207
+ fromIndex = len + fromIndex
208
+ if fromIndex < 0 then
209
+ fromIndex = 0
210
+ end
211
+ end
212
+ for i = fromIndex + 1, len do
213
+ if self[i] == searchElement then
214
+ return i - 1
215
+ end
216
+ end
217
+ return -1
218
+ end
219
+
220
+ local function __TS__ArrayJoin(self, separator)
221
+ if separator == nil then
222
+ separator = ","
223
+ end
224
+ local parts = {}
225
+ for i = 1, #self do
226
+ parts[i] = tostring(self[i])
227
+ end
228
+ return table.concat(parts, separator)
229
+ end
230
+
231
+ local function __TS__ArrayMap(self, callbackfn, thisArg)
232
+ local result = {}
233
+ for i = 1, #self do
234
+ result[i] = callbackfn(thisArg, self[i], i - 1, self)
235
+ end
236
+ return result
237
+ end
238
+
239
+ local function __TS__ArrayPush(self, ...)
240
+ local items = {...}
241
+ local len = #self
242
+ for i = 1, #items do
243
+ len = len + 1
244
+ self[len] = items[i]
245
+ end
246
+ return len
247
+ end
248
+
249
+ local function __TS__ArrayPushArray(self, items)
250
+ local len = #self
251
+ for i = 1, #items do
252
+ len = len + 1
253
+ self[len] = items[i]
254
+ end
255
+ return len
256
+ end
257
+
258
+ local function __TS__ArrayReduce(self, callbackFn, ...)
259
+ local len = #self
260
+ local k = 0
261
+ local accumulator = nil
262
+ if select("#", ...) ~= 0 then
263
+ accumulator = ...
264
+ elseif len > 0 then
265
+ accumulator = self[1]
266
+ k = 1
267
+ else
268
+ error("Reduce of empty array with no initial value", 0)
269
+ end
270
+ for i = k + 1, len do
271
+ accumulator = callbackFn(
272
+ nil,
273
+ accumulator,
274
+ self[i],
275
+ i - 1,
276
+ self
277
+ )
278
+ end
279
+ return accumulator
280
+ end
281
+
282
+ local function __TS__ArrayReduceRight(self, callbackFn, ...)
283
+ local len = #self
284
+ local k = len - 1
285
+ local accumulator = nil
286
+ if select("#", ...) ~= 0 then
287
+ accumulator = ...
288
+ elseif len > 0 then
289
+ accumulator = self[k + 1]
290
+ k = k - 1
291
+ else
292
+ error("Reduce of empty array with no initial value", 0)
293
+ end
294
+ for i = k + 1, 1, -1 do
295
+ accumulator = callbackFn(
296
+ nil,
297
+ accumulator,
298
+ self[i],
299
+ i - 1,
300
+ self
301
+ )
302
+ end
303
+ return accumulator
304
+ end
305
+
306
+ local function __TS__ArrayReverse(self)
307
+ local i = 1
308
+ local j = #self
309
+ while i < j do
310
+ local temp = self[j]
311
+ self[j] = self[i]
312
+ self[i] = temp
313
+ i = i + 1
314
+ j = j - 1
315
+ end
316
+ return self
317
+ end
318
+
319
+ local function __TS__ArrayUnshift(self, ...)
320
+ local items = {...}
321
+ local numItemsToInsert = #items
322
+ if numItemsToInsert == 0 then
323
+ return #self
324
+ end
325
+ for i = #self, 1, -1 do
326
+ self[i + numItemsToInsert] = self[i]
327
+ end
328
+ for i = 1, numItemsToInsert do
329
+ self[i] = items[i]
330
+ end
331
+ return #self
332
+ end
333
+
334
+ local function __TS__ArraySort(self, compareFn)
335
+ if compareFn ~= nil then
336
+ table.sort(
337
+ self,
338
+ function(a, b) return compareFn(nil, a, b) < 0 end
339
+ )
340
+ else
341
+ table.sort(self)
342
+ end
343
+ return self
344
+ end
345
+
346
+ local function __TS__ArraySlice(self, first, last)
347
+ local len = #self
348
+ first = first or 0
349
+ if first < 0 then
350
+ first = len + first
351
+ if first < 0 then
352
+ first = 0
353
+ end
354
+ else
355
+ if first > len then
356
+ first = len
357
+ end
358
+ end
359
+ last = last or len
360
+ if last < 0 then
361
+ last = len + last
362
+ if last < 0 then
363
+ last = 0
364
+ end
365
+ else
366
+ if last > len then
367
+ last = len
368
+ end
369
+ end
370
+ local out = {}
371
+ first = first + 1
372
+ last = last + 1
373
+ local n = 1
374
+ while first < last do
375
+ out[n] = self[first]
376
+ first = first + 1
377
+ n = n + 1
378
+ end
379
+ return out
380
+ end
381
+
382
+ local function __TS__ArraySome(self, callbackfn, thisArg)
383
+ for i = 1, #self do
384
+ if callbackfn(thisArg, self[i], i - 1, self) then
385
+ return true
386
+ end
387
+ end
388
+ return false
389
+ end
390
+
391
+ local function __TS__ArraySplice(self, ...)
392
+ local args = {...}
393
+ local len = #self
394
+ local actualArgumentCount = select("#", ...)
395
+ local start = args[1]
396
+ local deleteCount = args[2]
397
+ if start < 0 then
398
+ start = len + start
399
+ if start < 0 then
400
+ start = 0
401
+ end
402
+ elseif start > len then
403
+ start = len
404
+ end
405
+ local itemCount = actualArgumentCount - 2
406
+ if itemCount < 0 then
407
+ itemCount = 0
408
+ end
409
+ local actualDeleteCount
410
+ if actualArgumentCount == 0 then
411
+ actualDeleteCount = 0
412
+ elseif actualArgumentCount == 1 then
413
+ actualDeleteCount = len - start
414
+ else
415
+ actualDeleteCount = deleteCount or 0
416
+ if actualDeleteCount < 0 then
417
+ actualDeleteCount = 0
418
+ end
419
+ if actualDeleteCount > len - start then
420
+ actualDeleteCount = len - start
421
+ end
422
+ end
423
+ local out = {}
424
+ for k = 1, actualDeleteCount do
425
+ local from = start + k
426
+ if self[from] ~= nil then
427
+ out[k] = self[from]
428
+ end
429
+ end
430
+ if itemCount < actualDeleteCount then
431
+ for k = start + 1, len - actualDeleteCount do
432
+ local from = k + actualDeleteCount
433
+ local to = k + itemCount
434
+ if self[from] then
435
+ self[to] = self[from]
436
+ else
437
+ self[to] = nil
438
+ end
439
+ end
440
+ for k = len - actualDeleteCount + itemCount + 1, len do
441
+ self[k] = nil
442
+ end
443
+ elseif itemCount > actualDeleteCount then
444
+ for k = len - actualDeleteCount, start + 1, -1 do
445
+ local from = k + actualDeleteCount
446
+ local to = k + itemCount
447
+ if self[from] then
448
+ self[to] = self[from]
449
+ else
450
+ self[to] = nil
451
+ end
452
+ end
453
+ end
454
+ local j = start + 1
455
+ for i = 3, actualArgumentCount do
456
+ self[j] = args[i]
457
+ j = j + 1
458
+ end
459
+ for k = #self, len - actualDeleteCount + itemCount + 1, -1 do
460
+ self[k] = nil
461
+ end
462
+ return out
463
+ end
464
+
465
+ local function __TS__ArrayToObject(self)
466
+ local object = {}
467
+ for i = 1, #self do
468
+ object[i - 1] = self[i]
469
+ end
470
+ return object
471
+ end
472
+
473
+ local function __TS__ArrayFlat(self, depth)
474
+ if depth == nil then
475
+ depth = 1
476
+ end
477
+ local result = {}
478
+ local len = 0
479
+ for i = 1, #self do
480
+ local value = self[i]
481
+ if depth > 0 and __TS__ArrayIsArray(value) then
482
+ local toAdd
483
+ if depth == 1 then
484
+ toAdd = value
485
+ else
486
+ toAdd = __TS__ArrayFlat(value, depth - 1)
487
+ end
488
+ for j = 1, #toAdd do
489
+ local val = toAdd[j]
490
+ len = len + 1
491
+ result[len] = val
492
+ end
493
+ else
494
+ len = len + 1
495
+ result[len] = value
496
+ end
497
+ end
498
+ return result
499
+ end
500
+
501
+ local function __TS__ArrayFlatMap(self, callback, thisArg)
502
+ local result = {}
503
+ local len = 0
504
+ for i = 1, #self do
505
+ local value = callback(thisArg, self[i], i - 1, self)
506
+ if __TS__ArrayIsArray(value) then
507
+ for j = 1, #value do
508
+ len = len + 1
509
+ result[len] = value[j]
510
+ end
511
+ else
512
+ len = len + 1
513
+ result[len] = value
514
+ end
515
+ end
516
+ return result
517
+ end
518
+
519
+ local function __TS__ArraySetLength(self, length)
520
+ if length < 0 or length ~= length or length == math.huge or math.floor(length) ~= length then
521
+ error(
522
+ "invalid array length: " .. tostring(length),
523
+ 0
524
+ )
525
+ end
526
+ for i = length + 1, #self do
527
+ self[i] = nil
528
+ end
529
+ return length
530
+ end
531
+
532
+ local function __TS__InstanceOf(obj, classTbl)
533
+ if type(classTbl) ~= "table" then
534
+ error("Right-hand side of 'instanceof' is not an object", 0)
535
+ end
536
+ if classTbl[Symbol.hasInstance] ~= nil then
537
+ return not not classTbl[Symbol.hasInstance](classTbl, obj)
538
+ end
539
+ if type(obj) == "table" then
540
+ local luaClass = obj.constructor
541
+ while luaClass ~= nil do
542
+ if luaClass == classTbl then
543
+ return true
544
+ end
545
+ luaClass = luaClass.____super
546
+ end
547
+ end
548
+ return false
549
+ end
550
+
551
+ local function __TS__New(target, ...)
552
+ local instance = setmetatable({}, target.prototype)
553
+ instance:____constructor(...)
554
+ return instance
555
+ end
556
+
557
+ local function __TS__Class(self)
558
+ local c = {prototype = {}}
559
+ c.prototype.__index = c.prototype
560
+ c.prototype.constructor = c
561
+ return c
562
+ end
563
+
564
+ local __TS__Unpack = table.unpack or unpack
565
+
566
+ local function __TS__FunctionBind(fn, ...)
567
+ local boundArgs = {...}
568
+ return function(____, ...)
569
+ local args = {...}
570
+ __TS__ArrayUnshift(
571
+ args,
572
+ __TS__Unpack(boundArgs)
573
+ )
574
+ return fn(__TS__Unpack(args))
575
+ end
576
+ end
577
+
578
+ local __TS__Promise
579
+ do
580
+ local function promiseDeferred(self)
581
+ local resolve
582
+ local reject
583
+ local promise = __TS__New(
584
+ __TS__Promise,
585
+ function(____, res, rej)
586
+ resolve = res
587
+ reject = rej
588
+ end
589
+ )
590
+ return {promise = promise, resolve = resolve, reject = reject}
591
+ end
592
+ local function isPromiseLike(self, thing)
593
+ return __TS__InstanceOf(thing, __TS__Promise)
594
+ end
595
+ __TS__Promise = __TS__Class()
596
+ __TS__Promise.name = "__TS__Promise"
597
+ function __TS__Promise.prototype.____constructor(self, executor)
598
+ self.state = 0
599
+ self.fulfilledCallbacks = {}
600
+ self.rejectedCallbacks = {}
601
+ self.finallyCallbacks = {}
602
+ do
603
+ local function ____catch(e)
604
+ self:reject(e)
605
+ end
606
+ local ____try, ____hasReturned = pcall(function()
607
+ executor(
608
+ nil,
609
+ __TS__FunctionBind(self.resolve, self),
610
+ __TS__FunctionBind(self.reject, self)
611
+ )
612
+ end)
613
+ if not ____try then
614
+ ____catch(____hasReturned)
615
+ end
616
+ end
617
+ end
618
+ function __TS__Promise.resolve(data)
619
+ local promise = __TS__New(
620
+ __TS__Promise,
621
+ function()
622
+ end
623
+ )
624
+ promise.state = 1
625
+ promise.value = data
626
+ return promise
627
+ end
628
+ function __TS__Promise.reject(reason)
629
+ local promise = __TS__New(
630
+ __TS__Promise,
631
+ function()
632
+ end
633
+ )
634
+ promise.state = 2
635
+ promise.rejectionReason = reason
636
+ return promise
637
+ end
638
+ __TS__Promise.prototype["then"] = function(self, onFulfilled, onRejected)
639
+ local ____promiseDeferred_result_0 = promiseDeferred(nil)
640
+ local promise = ____promiseDeferred_result_0.promise
641
+ local resolve = ____promiseDeferred_result_0.resolve
642
+ local reject = ____promiseDeferred_result_0.reject
643
+ local isFulfilled = self.state == 1
644
+ local isRejected = self.state == 2
645
+ if onFulfilled then
646
+ local internalCallback = self:createPromiseResolvingCallback(onFulfilled, resolve, reject)
647
+ local ____self_fulfilledCallbacks_1 = self.fulfilledCallbacks
648
+ ____self_fulfilledCallbacks_1[#____self_fulfilledCallbacks_1 + 1] = internalCallback
649
+ if isFulfilled then
650
+ internalCallback(nil, self.value)
651
+ end
652
+ else
653
+ local ____self_fulfilledCallbacks_2 = self.fulfilledCallbacks
654
+ ____self_fulfilledCallbacks_2[#____self_fulfilledCallbacks_2 + 1] = function() return resolve(nil, nil) end
655
+ end
656
+ if onRejected then
657
+ local internalCallback = self:createPromiseResolvingCallback(onRejected, resolve, reject)
658
+ local ____self_rejectedCallbacks_3 = self.rejectedCallbacks
659
+ ____self_rejectedCallbacks_3[#____self_rejectedCallbacks_3 + 1] = internalCallback
660
+ if isRejected then
661
+ internalCallback(nil, self.rejectionReason)
662
+ end
663
+ end
664
+ if isFulfilled then
665
+ resolve(nil, self.value)
666
+ end
667
+ if isRejected then
668
+ reject(nil, self.rejectionReason)
669
+ end
670
+ return promise
671
+ end
672
+ function __TS__Promise.prototype.catch(self, onRejected)
673
+ return self["then"](self, nil, onRejected)
674
+ end
675
+ function __TS__Promise.prototype.finally(self, onFinally)
676
+ if onFinally then
677
+ local ____self_finallyCallbacks_4 = self.finallyCallbacks
678
+ ____self_finallyCallbacks_4[#____self_finallyCallbacks_4 + 1] = onFinally
679
+ if self.state ~= 0 then
680
+ onFinally(nil)
681
+ end
682
+ end
683
+ return self
684
+ end
685
+ function __TS__Promise.prototype.resolve(self, data)
686
+ if __TS__InstanceOf(data, __TS__Promise) then
687
+ data["then"](
688
+ data,
689
+ function(____, v) return self:resolve(v) end,
690
+ function(____, err) return self:reject(err) end
691
+ )
692
+ return
693
+ end
694
+ if self.state == 0 then
695
+ self.state = 1
696
+ self.value = data
697
+ for ____, callback in ipairs(self.fulfilledCallbacks) do
698
+ callback(nil, data)
699
+ end
700
+ for ____, callback in ipairs(self.finallyCallbacks) do
701
+ callback(nil)
702
+ end
703
+ end
704
+ end
705
+ function __TS__Promise.prototype.reject(self, reason)
706
+ if self.state == 0 then
707
+ self.state = 2
708
+ self.rejectionReason = reason
709
+ for ____, callback in ipairs(self.rejectedCallbacks) do
710
+ callback(nil, reason)
711
+ end
712
+ for ____, callback in ipairs(self.finallyCallbacks) do
713
+ callback(nil)
714
+ end
715
+ end
716
+ end
717
+ function __TS__Promise.prototype.createPromiseResolvingCallback(self, f, resolve, reject)
718
+ return function(____, value)
719
+ do
720
+ local function ____catch(e)
721
+ reject(nil, e)
722
+ end
723
+ local ____try, ____hasReturned = pcall(function()
724
+ self:handleCallbackData(
725
+ f(nil, value),
726
+ resolve,
727
+ reject
728
+ )
729
+ end)
730
+ if not ____try then
731
+ ____catch(____hasReturned)
732
+ end
733
+ end
734
+ end
735
+ end
736
+ function __TS__Promise.prototype.handleCallbackData(self, data, resolve, reject)
737
+ if isPromiseLike(nil, data) then
738
+ local nextpromise = data
739
+ if nextpromise.state == 1 then
740
+ resolve(nil, nextpromise.value)
741
+ elseif nextpromise.state == 2 then
742
+ reject(nil, nextpromise.rejectionReason)
743
+ else
744
+ data["then"](data, resolve, reject)
745
+ end
746
+ else
747
+ resolve(nil, data)
748
+ end
749
+ end
750
+ end
751
+
752
+ local function __TS__AsyncAwaiter(generator)
753
+ return __TS__New(
754
+ __TS__Promise,
755
+ function(____, resolve, reject)
756
+ local adopt, fulfilled, rejected, step, asyncCoroutine
757
+ function adopt(self, value)
758
+ local ____temp_0
759
+ if __TS__InstanceOf(value, __TS__Promise) then
760
+ ____temp_0 = value
761
+ else
762
+ ____temp_0 = __TS__Promise.resolve(value)
763
+ end
764
+ return ____temp_0
765
+ end
766
+ function fulfilled(self, value)
767
+ local success, errorOrErrorHandler, resultOrError = coroutine.resume(asyncCoroutine, value)
768
+ if success then
769
+ step(nil, resultOrError, errorOrErrorHandler)
770
+ else
771
+ reject(nil, errorOrErrorHandler)
772
+ end
773
+ end
774
+ function rejected(self, handler)
775
+ if handler then
776
+ return function(____, value)
777
+ local success, hasReturnedOrError, returnedValue = pcall(handler, value)
778
+ if success then
779
+ if hasReturnedOrError then
780
+ resolve(nil, returnedValue)
781
+ else
782
+ step(nil, hasReturnedOrError, handler)
783
+ end
784
+ else
785
+ reject(nil, hasReturnedOrError)
786
+ end
787
+ end
788
+ else
789
+ return function(____, value)
790
+ reject(nil, value)
791
+ end
792
+ end
793
+ end
794
+ function step(self, result, errorHandler)
795
+ if coroutine.status(asyncCoroutine) == "dead" then
796
+ resolve(nil, result)
797
+ else
798
+ local ____self_1 = adopt(nil, result)
799
+ ____self_1["then"](
800
+ ____self_1,
801
+ fulfilled,
802
+ rejected(nil, errorHandler)
803
+ )
804
+ end
805
+ end
806
+ asyncCoroutine = coroutine.create(generator)
807
+ local success, errorOrErrorHandler, resultOrError = coroutine.resume(asyncCoroutine)
808
+ if success then
809
+ step(nil, resultOrError, errorOrErrorHandler)
810
+ else
811
+ reject(nil, errorOrErrorHandler)
812
+ end
813
+ end
814
+ )
815
+ end
816
+ local function __TS__Await(errorHandler, thing)
817
+ return coroutine.yield(errorHandler, thing)
818
+ end
819
+
820
+ local function __TS__ClassExtends(target, base)
821
+ target.____super = base
822
+ local staticMetatable = setmetatable({__index = base}, base)
823
+ setmetatable(target, staticMetatable)
824
+ local baseMetatable = getmetatable(base)
825
+ if baseMetatable then
826
+ if type(baseMetatable.__index) == "function" then
827
+ staticMetatable.__index = baseMetatable.__index
828
+ end
829
+ if type(baseMetatable.__newindex) == "function" then
830
+ staticMetatable.__newindex = baseMetatable.__newindex
831
+ end
832
+ end
833
+ setmetatable(target.prototype, base.prototype)
834
+ if type(base.prototype.__index) == "function" then
835
+ target.prototype.__index = base.prototype.__index
836
+ end
837
+ if type(base.prototype.__newindex) == "function" then
838
+ target.prototype.__newindex = base.prototype.__newindex
839
+ end
840
+ if type(base.prototype.__tostring) == "function" then
841
+ target.prototype.__tostring = base.prototype.__tostring
842
+ end
843
+ end
844
+
845
+ local function __TS__CloneDescriptor(____bindingPattern0)
846
+ local value
847
+ local writable
848
+ local set
849
+ local get
850
+ local configurable
851
+ local enumerable
852
+ enumerable = ____bindingPattern0.enumerable
853
+ configurable = ____bindingPattern0.configurable
854
+ get = ____bindingPattern0.get
855
+ set = ____bindingPattern0.set
856
+ writable = ____bindingPattern0.writable
857
+ value = ____bindingPattern0.value
858
+ local descriptor = {enumerable = enumerable == true, configurable = configurable == true}
859
+ local hasGetterOrSetter = get ~= nil or set ~= nil
860
+ local hasValueOrWritableAttribute = writable ~= nil or value ~= nil
861
+ if hasGetterOrSetter and hasValueOrWritableAttribute then
862
+ error("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute.", 0)
863
+ end
864
+ if get or set then
865
+ descriptor.get = get
866
+ descriptor.set = set
867
+ else
868
+ descriptor.value = value
869
+ descriptor.writable = writable == true
870
+ end
871
+ return descriptor
872
+ end
873
+
874
+ local function __TS__ObjectAssign(target, ...)
875
+ local sources = {...}
876
+ for i = 1, #sources do
877
+ local source = sources[i]
878
+ for key in pairs(source) do
879
+ target[key] = source[key]
880
+ end
881
+ end
882
+ return target
883
+ end
884
+
885
+ local function __TS__ObjectGetOwnPropertyDescriptor(object, key)
886
+ local metatable = getmetatable(object)
887
+ if not metatable then
888
+ return
889
+ end
890
+ if not rawget(metatable, "_descriptors") then
891
+ return
892
+ end
893
+ return rawget(metatable, "_descriptors")[key]
894
+ end
895
+
896
+ local __TS__SetDescriptor
897
+ do
898
+ local function descriptorIndex(self, key)
899
+ local value = rawget(self, key)
900
+ if value ~= nil then
901
+ return value
902
+ end
903
+ local metatable = getmetatable(self)
904
+ while metatable do
905
+ local rawResult = rawget(metatable, key)
906
+ if rawResult ~= nil then
907
+ return rawResult
908
+ end
909
+ local descriptors = rawget(metatable, "_descriptors")
910
+ if descriptors then
911
+ local descriptor = descriptors[key]
912
+ if descriptor then
913
+ if descriptor.get then
914
+ return descriptor.get(self)
915
+ end
916
+ return descriptor.value
917
+ end
918
+ end
919
+ metatable = getmetatable(metatable)
920
+ end
921
+ end
922
+ local function descriptorNewIndex(self, key, value)
923
+ local metatable = getmetatable(self)
924
+ while metatable do
925
+ local descriptors = rawget(metatable, "_descriptors")
926
+ if descriptors then
927
+ local descriptor = descriptors[key]
928
+ if descriptor then
929
+ if descriptor.set then
930
+ descriptor.set(self, value)
931
+ else
932
+ if descriptor.writable == false then
933
+ error(
934
+ ((("Cannot assign to read only property '" .. key) .. "' of object '") .. tostring(self)) .. "'",
935
+ 0
936
+ )
937
+ end
938
+ descriptor.value = value
939
+ end
940
+ return
941
+ end
942
+ end
943
+ metatable = getmetatable(metatable)
944
+ end
945
+ rawset(self, key, value)
946
+ end
947
+ function __TS__SetDescriptor(target, key, desc, isPrototype)
948
+ if isPrototype == nil then
949
+ isPrototype = false
950
+ end
951
+ local ____isPrototype_0
952
+ if isPrototype then
953
+ ____isPrototype_0 = target
954
+ else
955
+ ____isPrototype_0 = getmetatable(target)
956
+ end
957
+ local metatable = ____isPrototype_0
958
+ if not metatable then
959
+ metatable = {}
960
+ setmetatable(target, metatable)
961
+ end
962
+ local value = rawget(target, key)
963
+ if value ~= nil then
964
+ rawset(target, key, nil)
965
+ end
966
+ if not rawget(metatable, "_descriptors") then
967
+ metatable._descriptors = {}
968
+ end
969
+ local descriptor = __TS__CloneDescriptor(desc)
970
+ metatable._descriptors[key] = descriptor
971
+ metatable.__index = descriptorIndex
972
+ metatable.__newindex = descriptorNewIndex
973
+ end
974
+ end
975
+
976
+ local function __TS__Decorate(decorators, target, key, desc)
977
+ local result = target
978
+ do
979
+ local i = #decorators
980
+ while i >= 0 do
981
+ local decorator = decorators[i + 1]
982
+ if decorator then
983
+ local oldResult = result
984
+ if key == nil then
985
+ result = decorator(nil, result)
986
+ elseif desc == true then
987
+ local value = rawget(target, key)
988
+ local descriptor = __TS__ObjectGetOwnPropertyDescriptor(target, key) or ({configurable = true, writable = true, value = value})
989
+ local desc = decorator(nil, target, key, descriptor) or descriptor
990
+ local isSimpleValue = desc.configurable == true and desc.writable == true and not desc.get and not desc.set
991
+ if isSimpleValue then
992
+ rawset(target, key, desc.value)
993
+ else
994
+ __TS__SetDescriptor(
995
+ target,
996
+ key,
997
+ __TS__ObjectAssign({}, descriptor, desc)
998
+ )
999
+ end
1000
+ elseif desc == false then
1001
+ result = decorator(nil, target, key, desc)
1002
+ else
1003
+ result = decorator(nil, target, key)
1004
+ end
1005
+ result = result or oldResult
1006
+ end
1007
+ i = i - 1
1008
+ end
1009
+ end
1010
+ return result
1011
+ end
1012
+
1013
+ local function __TS__DecorateParam(paramIndex, decorator)
1014
+ return function(____, target, key) return decorator(nil, target, key, paramIndex) end
1015
+ end
1016
+
1017
+ local Error, RangeError, ReferenceError, SyntaxError, TypeError, URIError
1018
+ do
1019
+ local function getErrorStack(self, constructor)
1020
+ local level = 1
1021
+ while true do
1022
+ local info = debug.getinfo(level, "f")
1023
+ level = level + 1
1024
+ if not info then
1025
+ level = 1
1026
+ break
1027
+ elseif info.func == constructor then
1028
+ break
1029
+ end
1030
+ end
1031
+ return debug.traceback(nil, level)
1032
+ end
1033
+ local function wrapErrorToString(self, getDescription)
1034
+ return function(self)
1035
+ local description = getDescription(self)
1036
+ local caller = debug.getinfo(3, "f")
1037
+ if _VERSION == "Lua 5.1" or caller and caller.func ~= error then
1038
+ return description
1039
+ else
1040
+ return (tostring(description) .. "\n") .. self.stack
1041
+ end
1042
+ end
1043
+ end
1044
+ local function initErrorClass(self, Type, name)
1045
+ Type.name = name
1046
+ return setmetatable(
1047
+ Type,
1048
+ {__call = function(____, _self, message) return __TS__New(Type, message) end}
1049
+ )
1050
+ end
1051
+ local ____initErrorClass_2 = initErrorClass
1052
+ local ____class_0 = __TS__Class()
1053
+ ____class_0.name = ""
1054
+ function ____class_0.prototype.____constructor(self, message)
1055
+ if message == nil then
1056
+ message = ""
1057
+ end
1058
+ self.message = message
1059
+ self.name = "Error"
1060
+ self.stack = getErrorStack(nil, self.constructor.new)
1061
+ local metatable = getmetatable(self)
1062
+ if not metatable.__errorToStringPatched then
1063
+ metatable.__errorToStringPatched = true
1064
+ metatable.__tostring = wrapErrorToString(nil, metatable.__tostring)
1065
+ end
1066
+ end
1067
+ function ____class_0.prototype.__tostring(self)
1068
+ local ____temp_1
1069
+ if self.message ~= "" then
1070
+ ____temp_1 = (self.name .. ": ") .. self.message
1071
+ else
1072
+ ____temp_1 = self.name
1073
+ end
1074
+ return ____temp_1
1075
+ end
1076
+ Error = ____initErrorClass_2(nil, ____class_0, "Error")
1077
+ local function createErrorClass(self, name)
1078
+ local ____initErrorClass_4 = initErrorClass
1079
+ local ____class_3 = __TS__Class()
1080
+ ____class_3.name = ____class_3.name
1081
+ __TS__ClassExtends(____class_3, Error)
1082
+ function ____class_3.prototype.____constructor(self, ...)
1083
+ ____class_3.____super.prototype.____constructor(self, ...)
1084
+ self.name = name
1085
+ end
1086
+ return ____initErrorClass_4(nil, ____class_3, name)
1087
+ end
1088
+ RangeError = createErrorClass(nil, "RangeError")
1089
+ ReferenceError = createErrorClass(nil, "ReferenceError")
1090
+ SyntaxError = createErrorClass(nil, "SyntaxError")
1091
+ TypeError = createErrorClass(nil, "TypeError")
1092
+ URIError = createErrorClass(nil, "URIError")
1093
+ end
1094
+
1095
+ local function __TS__ObjectGetOwnPropertyDescriptors(object)
1096
+ local metatable = getmetatable(object)
1097
+ if not metatable then
1098
+ return {}
1099
+ end
1100
+ return rawget(metatable, "_descriptors") or ({})
1101
+ end
1102
+
1103
+ local function __TS__Delete(target, key)
1104
+ local descriptors = __TS__ObjectGetOwnPropertyDescriptors(target)
1105
+ local descriptor = descriptors[key]
1106
+ if descriptor then
1107
+ if not descriptor.configurable then
1108
+ error(
1109
+ __TS__New(
1110
+ TypeError,
1111
+ ((("Cannot delete property " .. tostring(key)) .. " of ") .. tostring(target)) .. "."
1112
+ ),
1113
+ 0
1114
+ )
1115
+ end
1116
+ descriptors[key] = nil
1117
+ return true
1118
+ end
1119
+ target[key] = nil
1120
+ return true
1121
+ end
1122
+
1123
+ local function __TS__StringAccess(self, index)
1124
+ if index >= 0 and index < #self then
1125
+ return string.sub(self, index + 1, index + 1)
1126
+ end
1127
+ end
1128
+
1129
+ local function __TS__DelegatedYield(iterable)
1130
+ if type(iterable) == "string" then
1131
+ for index = 0, #iterable - 1 do
1132
+ coroutine.yield(__TS__StringAccess(iterable, index))
1133
+ end
1134
+ elseif iterable.____coroutine ~= nil then
1135
+ local co = iterable.____coroutine
1136
+ while true do
1137
+ local status, value = coroutine.resume(co)
1138
+ if not status then
1139
+ error(value, 0)
1140
+ end
1141
+ if coroutine.status(co) == "dead" then
1142
+ return value
1143
+ else
1144
+ coroutine.yield(value)
1145
+ end
1146
+ end
1147
+ elseif iterable[Symbol.iterator] then
1148
+ local iterator = iterable[Symbol.iterator](iterable)
1149
+ while true do
1150
+ local result = iterator:next()
1151
+ if result.done then
1152
+ return result.value
1153
+ else
1154
+ coroutine.yield(result.value)
1155
+ end
1156
+ end
1157
+ else
1158
+ for ____, value in ipairs(iterable) do
1159
+ coroutine.yield(value)
1160
+ end
1161
+ end
1162
+ end
1163
+
1164
+ local __TS__Generator
1165
+ do
1166
+ local function generatorIterator(self)
1167
+ return self
1168
+ end
1169
+ local function generatorNext(self, ...)
1170
+ local co = self.____coroutine
1171
+ if coroutine.status(co) == "dead" then
1172
+ return {done = true}
1173
+ end
1174
+ local status, value = coroutine.resume(co, ...)
1175
+ if not status then
1176
+ error(value, 0)
1177
+ end
1178
+ return {
1179
+ value = value,
1180
+ done = coroutine.status(co) == "dead"
1181
+ }
1182
+ end
1183
+ function __TS__Generator(fn)
1184
+ return function(...)
1185
+ local args = {...}
1186
+ local argsLength = select("#", ...)
1187
+ return {
1188
+ ____coroutine = coroutine.create(function() return fn((unpack or table.unpack)(args, 1, argsLength)) end),
1189
+ [Symbol.iterator] = generatorIterator,
1190
+ next = generatorNext
1191
+ }
1192
+ end
1193
+ end
1194
+ end
1195
+
1196
+ local function __TS__InstanceOfObject(value)
1197
+ local valueType = type(value)
1198
+ return valueType == "table" or valueType == "function"
1199
+ end
1200
+
1201
+ local Map
1202
+ do
1203
+ Map = __TS__Class()
1204
+ Map.name = "Map"
1205
+ function Map.prototype.____constructor(self, entries)
1206
+ self[Symbol.toStringTag] = "Map"
1207
+ self.items = {}
1208
+ self.size = 0
1209
+ self.nextKey = {}
1210
+ self.previousKey = {}
1211
+ if entries == nil then
1212
+ return
1213
+ end
1214
+ local iterable = entries
1215
+ if iterable[Symbol.iterator] then
1216
+ local iterator = iterable[Symbol.iterator](iterable)
1217
+ while true do
1218
+ local result = iterator:next()
1219
+ if result.done then
1220
+ break
1221
+ end
1222
+ local value = result.value
1223
+ self:set(value[1], value[2])
1224
+ end
1225
+ else
1226
+ local array = entries
1227
+ for ____, kvp in ipairs(array) do
1228
+ self:set(kvp[1], kvp[2])
1229
+ end
1230
+ end
1231
+ end
1232
+ function Map.prototype.clear(self)
1233
+ self.items = {}
1234
+ self.nextKey = {}
1235
+ self.previousKey = {}
1236
+ self.firstKey = nil
1237
+ self.lastKey = nil
1238
+ self.size = 0
1239
+ end
1240
+ function Map.prototype.delete(self, key)
1241
+ local contains = self:has(key)
1242
+ if contains then
1243
+ self.size = self.size - 1
1244
+ local next = self.nextKey[key]
1245
+ local previous = self.previousKey[key]
1246
+ if next and previous then
1247
+ self.nextKey[previous] = next
1248
+ self.previousKey[next] = previous
1249
+ elseif next then
1250
+ self.firstKey = next
1251
+ self.previousKey[next] = nil
1252
+ elseif previous then
1253
+ self.lastKey = previous
1254
+ self.nextKey[previous] = nil
1255
+ else
1256
+ self.firstKey = nil
1257
+ self.lastKey = nil
1258
+ end
1259
+ self.nextKey[key] = nil
1260
+ self.previousKey[key] = nil
1261
+ end
1262
+ self.items[key] = nil
1263
+ return contains
1264
+ end
1265
+ function Map.prototype.forEach(self, callback)
1266
+ for ____, key in __TS__Iterator(self:keys()) do
1267
+ callback(nil, self.items[key], key, self)
1268
+ end
1269
+ end
1270
+ function Map.prototype.get(self, key)
1271
+ return self.items[key]
1272
+ end
1273
+ function Map.prototype.has(self, key)
1274
+ return self.nextKey[key] ~= nil or self.lastKey == key
1275
+ end
1276
+ function Map.prototype.set(self, key, value)
1277
+ local isNewValue = not self:has(key)
1278
+ if isNewValue then
1279
+ self.size = self.size + 1
1280
+ end
1281
+ self.items[key] = value
1282
+ if self.firstKey == nil then
1283
+ self.firstKey = key
1284
+ self.lastKey = key
1285
+ elseif isNewValue then
1286
+ self.nextKey[self.lastKey] = key
1287
+ self.previousKey[key] = self.lastKey
1288
+ self.lastKey = key
1289
+ end
1290
+ return self
1291
+ end
1292
+ Map.prototype[Symbol.iterator] = function(self)
1293
+ return self:entries()
1294
+ end
1295
+ function Map.prototype.entries(self)
1296
+ local ____temp_0 = self
1297
+ local items = ____temp_0.items
1298
+ local nextKey = ____temp_0.nextKey
1299
+ local key = self.firstKey
1300
+ return {
1301
+ [Symbol.iterator] = function(self)
1302
+ return self
1303
+ end,
1304
+ next = function(self)
1305
+ local result = {done = not key, value = {key, items[key]}}
1306
+ key = nextKey[key]
1307
+ return result
1308
+ end
1309
+ }
1310
+ end
1311
+ function Map.prototype.keys(self)
1312
+ local nextKey = self.nextKey
1313
+ local key = self.firstKey
1314
+ return {
1315
+ [Symbol.iterator] = function(self)
1316
+ return self
1317
+ end,
1318
+ next = function(self)
1319
+ local result = {done = not key, value = key}
1320
+ key = nextKey[key]
1321
+ return result
1322
+ end
1323
+ }
1324
+ end
1325
+ function Map.prototype.values(self)
1326
+ local ____temp_1 = self
1327
+ local items = ____temp_1.items
1328
+ local nextKey = ____temp_1.nextKey
1329
+ local key = self.firstKey
1330
+ return {
1331
+ [Symbol.iterator] = function(self)
1332
+ return self
1333
+ end,
1334
+ next = function(self)
1335
+ local result = {done = not key, value = items[key]}
1336
+ key = nextKey[key]
1337
+ return result
1338
+ end
1339
+ }
1340
+ end
1341
+ Map[Symbol.species] = Map
1342
+ end
1343
+
1344
+ local __TS__MathAtan2 = math.atan2 or math.atan
1345
+
1346
+ local function __TS__MathSign(val)
1347
+ if val > 0 then
1348
+ return 1
1349
+ elseif val < 0 then
1350
+ return -1
1351
+ end
1352
+ return 0
1353
+ end
1354
+
1355
+ local function __TS__Number(value)
1356
+ local valueType = type(value)
1357
+ if valueType == "number" then
1358
+ return value
1359
+ elseif valueType == "string" then
1360
+ local numberValue = tonumber(value)
1361
+ if numberValue then
1362
+ return numberValue
1363
+ end
1364
+ if value == "Infinity" then
1365
+ return math.huge
1366
+ end
1367
+ if value == "-Infinity" then
1368
+ return -math.huge
1369
+ end
1370
+ local stringWithoutSpaces = string.gsub(value, "%s", "")
1371
+ if stringWithoutSpaces == "" then
1372
+ return 0
1373
+ end
1374
+ return 0 / 0
1375
+ elseif valueType == "boolean" then
1376
+ return value and 1 or 0
1377
+ else
1378
+ return 0 / 0
1379
+ end
1380
+ end
1381
+
1382
+ local function __TS__NumberIsFinite(value)
1383
+ return type(value) == "number" and value == value and value ~= math.huge and value ~= -math.huge
1384
+ end
1385
+
1386
+ local function __TS__NumberIsNaN(value)
1387
+ return value ~= value
1388
+ end
1389
+
1390
+ local __TS__NumberToString
1391
+ do
1392
+ local radixChars = "0123456789abcdefghijklmnopqrstuvwxyz"
1393
+ function __TS__NumberToString(self, radix)
1394
+ if radix == nil or radix == 10 or self == math.huge or self == -math.huge or self ~= self then
1395
+ return tostring(self)
1396
+ end
1397
+ radix = math.floor(radix)
1398
+ if radix < 2 or radix > 36 then
1399
+ error("toString() radix argument must be between 2 and 36", 0)
1400
+ end
1401
+ local integer, fraction = math.modf(math.abs(self))
1402
+ local result = ""
1403
+ if radix == 8 then
1404
+ result = string.format("%o", integer)
1405
+ elseif radix == 16 then
1406
+ result = string.format("%x", integer)
1407
+ else
1408
+ repeat
1409
+ do
1410
+ result = __TS__StringAccess(radixChars, integer % radix) .. result
1411
+ integer = math.floor(integer / radix)
1412
+ end
1413
+ until not (integer ~= 0)
1414
+ end
1415
+ if fraction ~= 0 then
1416
+ result = result .. "."
1417
+ local delta = 1e-16
1418
+ repeat
1419
+ do
1420
+ fraction = fraction * radix
1421
+ delta = delta * radix
1422
+ local digit = math.floor(fraction)
1423
+ result = result .. __TS__StringAccess(radixChars, digit)
1424
+ fraction = fraction - digit
1425
+ end
1426
+ until not (fraction >= delta)
1427
+ end
1428
+ if self < 0 then
1429
+ result = "-" .. result
1430
+ end
1431
+ return result
1432
+ end
1433
+ end
1434
+
1435
+ local function __TS__ObjectDefineProperty(target, key, desc)
1436
+ local ____temp_0
1437
+ if type(key) == "number" then
1438
+ ____temp_0 = key + 1
1439
+ else
1440
+ ____temp_0 = key
1441
+ end
1442
+ local luaKey = ____temp_0
1443
+ local value = rawget(target, luaKey)
1444
+ local hasGetterOrSetter = desc.get ~= nil or desc.set ~= nil
1445
+ local descriptor
1446
+ if hasGetterOrSetter then
1447
+ if value ~= nil then
1448
+ error(
1449
+ "Cannot redefine property: " .. tostring(key),
1450
+ 0
1451
+ )
1452
+ end
1453
+ descriptor = desc
1454
+ else
1455
+ local valueExists = value ~= nil
1456
+ local ____desc_set_5 = desc.set
1457
+ local ____desc_get_6 = desc.get
1458
+ local ____temp_1
1459
+ if desc.configurable ~= nil then
1460
+ ____temp_1 = desc.configurable
1461
+ else
1462
+ ____temp_1 = valueExists
1463
+ end
1464
+ local ____temp_2
1465
+ if desc.enumerable ~= nil then
1466
+ ____temp_2 = desc.enumerable
1467
+ else
1468
+ ____temp_2 = valueExists
1469
+ end
1470
+ local ____temp_3
1471
+ if desc.writable ~= nil then
1472
+ ____temp_3 = desc.writable
1473
+ else
1474
+ ____temp_3 = valueExists
1475
+ end
1476
+ local ____temp_4
1477
+ if desc.value ~= nil then
1478
+ ____temp_4 = desc.value
1479
+ else
1480
+ ____temp_4 = value
1481
+ end
1482
+ descriptor = {
1483
+ set = ____desc_set_5,
1484
+ get = ____desc_get_6,
1485
+ configurable = ____temp_1,
1486
+ enumerable = ____temp_2,
1487
+ writable = ____temp_3,
1488
+ value = ____temp_4
1489
+ }
1490
+ end
1491
+ __TS__SetDescriptor(target, luaKey, descriptor)
1492
+ return target
1493
+ end
1494
+
1495
+ local function __TS__ObjectEntries(obj)
1496
+ local result = {}
1497
+ local len = 0
1498
+ for key in pairs(obj) do
1499
+ len = len + 1
1500
+ result[len] = {key, obj[key]}
1501
+ end
1502
+ return result
1503
+ end
1504
+
1505
+ local function __TS__ObjectFromEntries(entries)
1506
+ local obj = {}
1507
+ local iterable = entries
1508
+ if iterable[Symbol.iterator] then
1509
+ local iterator = iterable[Symbol.iterator](iterable)
1510
+ while true do
1511
+ local result = iterator:next()
1512
+ if result.done then
1513
+ break
1514
+ end
1515
+ local value = result.value
1516
+ obj[value[1]] = value[2]
1517
+ end
1518
+ else
1519
+ for ____, entry in ipairs(entries) do
1520
+ obj[entry[1]] = entry[2]
1521
+ end
1522
+ end
1523
+ return obj
1524
+ end
1525
+
1526
+ local function __TS__ObjectKeys(obj)
1527
+ local result = {}
1528
+ local len = 0
1529
+ for key in pairs(obj) do
1530
+ len = len + 1
1531
+ result[len] = key
1532
+ end
1533
+ return result
1534
+ end
1535
+
1536
+ local function __TS__ObjectRest(target, usedProperties)
1537
+ local result = {}
1538
+ for property in pairs(target) do
1539
+ if not usedProperties[property] then
1540
+ result[property] = target[property]
1541
+ end
1542
+ end
1543
+ return result
1544
+ end
1545
+
1546
+ local function __TS__ObjectValues(obj)
1547
+ local result = {}
1548
+ local len = 0
1549
+ for key in pairs(obj) do
1550
+ len = len + 1
1551
+ result[len] = obj[key]
1552
+ end
1553
+ return result
1554
+ end
1555
+
1556
+ local function __TS__ParseFloat(numberString)
1557
+ local infinityMatch = string.match(numberString, "^%s*(-?Infinity)")
1558
+ if infinityMatch then
1559
+ local ____temp_0
1560
+ if __TS__StringAccess(infinityMatch, 0) == "-" then
1561
+ ____temp_0 = -math.huge
1562
+ else
1563
+ ____temp_0 = math.huge
1564
+ end
1565
+ return ____temp_0
1566
+ end
1567
+ local number = tonumber(string.match(numberString, "^%s*(-?%d+%.?%d*)"))
1568
+ return number or 0 / 0
1569
+ end
1570
+
1571
+ local function __TS__StringSubstr(self, from, length)
1572
+ if from ~= from then
1573
+ from = 0
1574
+ end
1575
+ if length ~= nil then
1576
+ if length ~= length or length <= 0 then
1577
+ return ""
1578
+ end
1579
+ length = length + from
1580
+ end
1581
+ if from >= 0 then
1582
+ from = from + 1
1583
+ end
1584
+ return string.sub(self, from, length)
1585
+ end
1586
+
1587
+ local function __TS__StringSubstring(self, start, ____end)
1588
+ if ____end ~= ____end then
1589
+ ____end = 0
1590
+ end
1591
+ if ____end ~= nil and start > ____end then
1592
+ start, ____end = ____end, start
1593
+ end
1594
+ if start >= 0 then
1595
+ start = start + 1
1596
+ else
1597
+ start = 1
1598
+ end
1599
+ if ____end ~= nil and ____end < 0 then
1600
+ ____end = 0
1601
+ end
1602
+ return string.sub(self, start, ____end)
1603
+ end
1604
+
1605
+ local __TS__ParseInt
1606
+ do
1607
+ local parseIntBasePattern = "0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTvVwWxXyYzZ"
1608
+ function __TS__ParseInt(numberString, base)
1609
+ if base == nil then
1610
+ base = 10
1611
+ local hexMatch = string.match(numberString, "^%s*-?0[xX]")
1612
+ if hexMatch then
1613
+ base = 16
1614
+ local ____string_match_result__0_0
1615
+ if string.match(hexMatch, "-") then
1616
+ ____string_match_result__0_0 = "-" .. __TS__StringSubstr(numberString, #hexMatch)
1617
+ else
1618
+ ____string_match_result__0_0 = __TS__StringSubstr(numberString, #hexMatch)
1619
+ end
1620
+ numberString = ____string_match_result__0_0
1621
+ end
1622
+ end
1623
+ if base < 2 or base > 36 then
1624
+ return 0 / 0
1625
+ end
1626
+ local ____temp_1
1627
+ if base <= 10 then
1628
+ ____temp_1 = __TS__StringSubstring(parseIntBasePattern, 0, base)
1629
+ else
1630
+ ____temp_1 = __TS__StringSubstr(parseIntBasePattern, 0, 10 + 2 * (base - 10))
1631
+ end
1632
+ local allowedDigits = ____temp_1
1633
+ local pattern = ("^%s*(-?[" .. allowedDigits) .. "]*)"
1634
+ local number = tonumber(
1635
+ string.match(numberString, pattern),
1636
+ base
1637
+ )
1638
+ if number == nil then
1639
+ return 0 / 0
1640
+ end
1641
+ if number >= 0 then
1642
+ return math.floor(number)
1643
+ else
1644
+ return math.ceil(number)
1645
+ end
1646
+ end
1647
+ end
1648
+
1649
+ local function __TS__PromiseAll(iterable)
1650
+ local results = {}
1651
+ local toResolve = {}
1652
+ local numToResolve = 0
1653
+ local i = 0
1654
+ for ____, item in __TS__Iterator(iterable) do
1655
+ if __TS__InstanceOf(item, __TS__Promise) then
1656
+ if item.state == 1 then
1657
+ results[i + 1] = item.value
1658
+ elseif item.state == 2 then
1659
+ return __TS__Promise.reject(item.rejectionReason)
1660
+ else
1661
+ numToResolve = numToResolve + 1
1662
+ toResolve[i] = item
1663
+ end
1664
+ else
1665
+ results[i + 1] = item
1666
+ end
1667
+ i = i + 1
1668
+ end
1669
+ if numToResolve == 0 then
1670
+ return __TS__Promise.resolve(results)
1671
+ end
1672
+ return __TS__New(
1673
+ __TS__Promise,
1674
+ function(____, resolve, reject)
1675
+ for index, promise in pairs(toResolve) do
1676
+ promise["then"](
1677
+ promise,
1678
+ function(____, data)
1679
+ results[index + 1] = data
1680
+ numToResolve = numToResolve - 1
1681
+ if numToResolve == 0 then
1682
+ resolve(nil, results)
1683
+ end
1684
+ end,
1685
+ function(____, reason)
1686
+ reject(nil, reason)
1687
+ end
1688
+ )
1689
+ end
1690
+ end
1691
+ )
1692
+ end
1693
+
1694
+ local function __TS__PromiseAllSettled(iterable)
1695
+ local results = {}
1696
+ local toResolve = {}
1697
+ local numToResolve = 0
1698
+ local i = 0
1699
+ for ____, item in __TS__Iterator(iterable) do
1700
+ if __TS__InstanceOf(item, __TS__Promise) then
1701
+ if item.state == 1 then
1702
+ results[i + 1] = {status = "fulfilled", value = item.value}
1703
+ elseif item.state == 2 then
1704
+ results[i + 1] = {status = "rejected", reason = item.rejectionReason}
1705
+ else
1706
+ numToResolve = numToResolve + 1
1707
+ toResolve[i] = item
1708
+ end
1709
+ else
1710
+ results[i + 1] = {status = "fulfilled", value = item}
1711
+ end
1712
+ i = i + 1
1713
+ end
1714
+ if numToResolve == 0 then
1715
+ return __TS__Promise.resolve(results)
1716
+ end
1717
+ return __TS__New(
1718
+ __TS__Promise,
1719
+ function(____, resolve)
1720
+ for index, promise in pairs(toResolve) do
1721
+ promise["then"](
1722
+ promise,
1723
+ function(____, data)
1724
+ results[index + 1] = {status = "fulfilled", value = data}
1725
+ numToResolve = numToResolve - 1
1726
+ if numToResolve == 0 then
1727
+ resolve(nil, results)
1728
+ end
1729
+ end,
1730
+ function(____, reason)
1731
+ results[index + 1] = {status = "rejected", reason = reason}
1732
+ numToResolve = numToResolve - 1
1733
+ if numToResolve == 0 then
1734
+ resolve(nil, results)
1735
+ end
1736
+ end
1737
+ )
1738
+ end
1739
+ end
1740
+ )
1741
+ end
1742
+
1743
+ local function __TS__PromiseAny(iterable)
1744
+ local rejections = {}
1745
+ local pending = {}
1746
+ for ____, item in __TS__Iterator(iterable) do
1747
+ if __TS__InstanceOf(item, __TS__Promise) then
1748
+ if item.state == 1 then
1749
+ return __TS__Promise.resolve(item.value)
1750
+ elseif item.state == 2 then
1751
+ rejections[#rejections + 1] = item.rejectionReason
1752
+ else
1753
+ pending[#pending + 1] = item
1754
+ end
1755
+ else
1756
+ return __TS__Promise.resolve(item)
1757
+ end
1758
+ end
1759
+ if #pending == 0 then
1760
+ return __TS__Promise.reject("No promises to resolve with .any()")
1761
+ end
1762
+ local numResolved = 0
1763
+ return __TS__New(
1764
+ __TS__Promise,
1765
+ function(____, resolve, reject)
1766
+ for ____, promise in ipairs(pending) do
1767
+ promise["then"](
1768
+ promise,
1769
+ function(____, data)
1770
+ resolve(nil, data)
1771
+ end,
1772
+ function(____, reason)
1773
+ rejections[#rejections + 1] = reason
1774
+ numResolved = numResolved + 1
1775
+ if numResolved == #pending then
1776
+ reject(nil, {name = "AggregateError", message = "All Promises rejected", errors = rejections})
1777
+ end
1778
+ end
1779
+ )
1780
+ end
1781
+ end
1782
+ )
1783
+ end
1784
+
1785
+ local function __TS__PromiseRace(iterable)
1786
+ local pending = {}
1787
+ for ____, item in __TS__Iterator(iterable) do
1788
+ if __TS__InstanceOf(item, __TS__Promise) then
1789
+ if item.state == 1 then
1790
+ return __TS__Promise.resolve(item.value)
1791
+ elseif item.state == 2 then
1792
+ return __TS__Promise.reject(item.rejectionReason)
1793
+ else
1794
+ pending[#pending + 1] = item
1795
+ end
1796
+ else
1797
+ return __TS__Promise.resolve(item)
1798
+ end
1799
+ end
1800
+ return __TS__New(
1801
+ __TS__Promise,
1802
+ function(____, resolve, reject)
1803
+ for ____, promise in ipairs(pending) do
1804
+ promise["then"](
1805
+ promise,
1806
+ function(____, value) return resolve(nil, value) end,
1807
+ function(____, reason) return reject(nil, reason) end
1808
+ )
1809
+ end
1810
+ end
1811
+ )
1812
+ end
1813
+
1814
+ local Set
1815
+ do
1816
+ Set = __TS__Class()
1817
+ Set.name = "Set"
1818
+ function Set.prototype.____constructor(self, values)
1819
+ self[Symbol.toStringTag] = "Set"
1820
+ self.size = 0
1821
+ self.nextKey = {}
1822
+ self.previousKey = {}
1823
+ if values == nil then
1824
+ return
1825
+ end
1826
+ local iterable = values
1827
+ if iterable[Symbol.iterator] then
1828
+ local iterator = iterable[Symbol.iterator](iterable)
1829
+ while true do
1830
+ local result = iterator:next()
1831
+ if result.done then
1832
+ break
1833
+ end
1834
+ self:add(result.value)
1835
+ end
1836
+ else
1837
+ local array = values
1838
+ for ____, value in ipairs(array) do
1839
+ self:add(value)
1840
+ end
1841
+ end
1842
+ end
1843
+ function Set.prototype.add(self, value)
1844
+ local isNewValue = not self:has(value)
1845
+ if isNewValue then
1846
+ self.size = self.size + 1
1847
+ end
1848
+ if self.firstKey == nil then
1849
+ self.firstKey = value
1850
+ self.lastKey = value
1851
+ elseif isNewValue then
1852
+ self.nextKey[self.lastKey] = value
1853
+ self.previousKey[value] = self.lastKey
1854
+ self.lastKey = value
1855
+ end
1856
+ return self
1857
+ end
1858
+ function Set.prototype.clear(self)
1859
+ self.nextKey = {}
1860
+ self.previousKey = {}
1861
+ self.firstKey = nil
1862
+ self.lastKey = nil
1863
+ self.size = 0
1864
+ end
1865
+ function Set.prototype.delete(self, value)
1866
+ local contains = self:has(value)
1867
+ if contains then
1868
+ self.size = self.size - 1
1869
+ local next = self.nextKey[value]
1870
+ local previous = self.previousKey[value]
1871
+ if next and previous then
1872
+ self.nextKey[previous] = next
1873
+ self.previousKey[next] = previous
1874
+ elseif next then
1875
+ self.firstKey = next
1876
+ self.previousKey[next] = nil
1877
+ elseif previous then
1878
+ self.lastKey = previous
1879
+ self.nextKey[previous] = nil
1880
+ else
1881
+ self.firstKey = nil
1882
+ self.lastKey = nil
1883
+ end
1884
+ self.nextKey[value] = nil
1885
+ self.previousKey[value] = nil
1886
+ end
1887
+ return contains
1888
+ end
1889
+ function Set.prototype.forEach(self, callback)
1890
+ for ____, key in __TS__Iterator(self:keys()) do
1891
+ callback(nil, key, key, self)
1892
+ end
1893
+ end
1894
+ function Set.prototype.has(self, value)
1895
+ return self.nextKey[value] ~= nil or self.lastKey == value
1896
+ end
1897
+ Set.prototype[Symbol.iterator] = function(self)
1898
+ return self:values()
1899
+ end
1900
+ function Set.prototype.entries(self)
1901
+ local nextKey = self.nextKey
1902
+ local key = self.firstKey
1903
+ return {
1904
+ [Symbol.iterator] = function(self)
1905
+ return self
1906
+ end,
1907
+ next = function(self)
1908
+ local result = {done = not key, value = {key, key}}
1909
+ key = nextKey[key]
1910
+ return result
1911
+ end
1912
+ }
1913
+ end
1914
+ function Set.prototype.keys(self)
1915
+ local nextKey = self.nextKey
1916
+ local key = self.firstKey
1917
+ return {
1918
+ [Symbol.iterator] = function(self)
1919
+ return self
1920
+ end,
1921
+ next = function(self)
1922
+ local result = {done = not key, value = key}
1923
+ key = nextKey[key]
1924
+ return result
1925
+ end
1926
+ }
1927
+ end
1928
+ function Set.prototype.values(self)
1929
+ local nextKey = self.nextKey
1930
+ local key = self.firstKey
1931
+ return {
1932
+ [Symbol.iterator] = function(self)
1933
+ return self
1934
+ end,
1935
+ next = function(self)
1936
+ local result = {done = not key, value = key}
1937
+ key = nextKey[key]
1938
+ return result
1939
+ end
1940
+ }
1941
+ end
1942
+ Set[Symbol.species] = Set
1943
+ end
1944
+
1945
+ local function __TS__SparseArrayNew(...)
1946
+ local sparseArray = {...}
1947
+ sparseArray.sparseLength = select("#", ...)
1948
+ return sparseArray
1949
+ end
1950
+
1951
+ local function __TS__SparseArrayPush(sparseArray, ...)
1952
+ local args = {...}
1953
+ local argsLen = select("#", ...)
1954
+ local listLen = sparseArray.sparseLength
1955
+ for i = 1, argsLen do
1956
+ sparseArray[listLen + i] = args[i]
1957
+ end
1958
+ sparseArray.sparseLength = listLen + argsLen
1959
+ end
1960
+
1961
+ local function __TS__SparseArraySpread(sparseArray)
1962
+ local _unpack = unpack or table.unpack
1963
+ return _unpack(sparseArray, 1, sparseArray.sparseLength)
1964
+ end
1965
+
1966
+ local WeakMap
1967
+ do
1968
+ WeakMap = __TS__Class()
1969
+ WeakMap.name = "WeakMap"
1970
+ function WeakMap.prototype.____constructor(self, entries)
1971
+ self[Symbol.toStringTag] = "WeakMap"
1972
+ self.items = {}
1973
+ setmetatable(self.items, {__mode = "k"})
1974
+ if entries == nil then
1975
+ return
1976
+ end
1977
+ local iterable = entries
1978
+ if iterable[Symbol.iterator] then
1979
+ local iterator = iterable[Symbol.iterator](iterable)
1980
+ while true do
1981
+ local result = iterator:next()
1982
+ if result.done then
1983
+ break
1984
+ end
1985
+ local value = result.value
1986
+ self.items[value[1]] = value[2]
1987
+ end
1988
+ else
1989
+ for ____, kvp in ipairs(entries) do
1990
+ self.items[kvp[1]] = kvp[2]
1991
+ end
1992
+ end
1993
+ end
1994
+ function WeakMap.prototype.delete(self, key)
1995
+ local contains = self:has(key)
1996
+ self.items[key] = nil
1997
+ return contains
1998
+ end
1999
+ function WeakMap.prototype.get(self, key)
2000
+ return self.items[key]
2001
+ end
2002
+ function WeakMap.prototype.has(self, key)
2003
+ return self.items[key] ~= nil
2004
+ end
2005
+ function WeakMap.prototype.set(self, key, value)
2006
+ self.items[key] = value
2007
+ return self
2008
+ end
2009
+ WeakMap[Symbol.species] = WeakMap
2010
+ end
2011
+
2012
+ local WeakSet
2013
+ do
2014
+ WeakSet = __TS__Class()
2015
+ WeakSet.name = "WeakSet"
2016
+ function WeakSet.prototype.____constructor(self, values)
2017
+ self[Symbol.toStringTag] = "WeakSet"
2018
+ self.items = {}
2019
+ setmetatable(self.items, {__mode = "k"})
2020
+ if values == nil then
2021
+ return
2022
+ end
2023
+ local iterable = values
2024
+ if iterable[Symbol.iterator] then
2025
+ local iterator = iterable[Symbol.iterator](iterable)
2026
+ while true do
2027
+ local result = iterator:next()
2028
+ if result.done then
2029
+ break
2030
+ end
2031
+ self.items[result.value] = true
2032
+ end
2033
+ else
2034
+ for ____, value in ipairs(values) do
2035
+ self.items[value] = true
2036
+ end
2037
+ end
2038
+ end
2039
+ function WeakSet.prototype.add(self, value)
2040
+ self.items[value] = true
2041
+ return self
2042
+ end
2043
+ function WeakSet.prototype.delete(self, value)
2044
+ local contains = self:has(value)
2045
+ self.items[value] = nil
2046
+ return contains
2047
+ end
2048
+ function WeakSet.prototype.has(self, value)
2049
+ return self.items[value] == true
2050
+ end
2051
+ WeakSet[Symbol.species] = WeakSet
2052
+ end
2053
+
2054
+ local function __TS__SourceMapTraceBack(fileName, sourceMap)
2055
+ _G.__TS__sourcemap = _G.__TS__sourcemap or ({})
2056
+ _G.__TS__sourcemap[fileName] = sourceMap
2057
+ if _G.__TS__originalTraceback == nil then
2058
+ local originalTraceback = debug.traceback
2059
+ _G.__TS__originalTraceback = originalTraceback
2060
+ debug.traceback = function(thread, message, level)
2061
+ local trace
2062
+ if thread == nil and message == nil and level == nil then
2063
+ trace = originalTraceback()
2064
+ else
2065
+ trace = originalTraceback(thread, message, level)
2066
+ end
2067
+ if type(trace) ~= "string" then
2068
+ return trace
2069
+ end
2070
+ local function replacer(____, file, srcFile, line)
2071
+ local fileSourceMap = _G.__TS__sourcemap[file]
2072
+ if fileSourceMap and fileSourceMap[line] then
2073
+ local data = fileSourceMap[line]
2074
+ if type(data) == "number" then
2075
+ return (srcFile .. ":") .. tostring(data)
2076
+ end
2077
+ return (tostring(data.file) .. ":") .. tostring(data.line)
2078
+ end
2079
+ return (file .. ":") .. line
2080
+ end
2081
+ local result = string.gsub(
2082
+ trace,
2083
+ "(%S+)%.lua:(%d+)",
2084
+ function(file, line) return replacer(nil, file .. ".lua", file .. ".ts", line) end
2085
+ )
2086
+ local function stringReplacer(____, file, line)
2087
+ local fileSourceMap = _G.__TS__sourcemap[file]
2088
+ if fileSourceMap and fileSourceMap[line] then
2089
+ local chunkName = string.match(file, "%[string \"([^\"]+)\"%]")
2090
+ local sourceName = string.gsub(chunkName, ".lua$", ".ts")
2091
+ local data = fileSourceMap[line]
2092
+ if type(data) == "number" then
2093
+ return (sourceName .. ":") .. tostring(data)
2094
+ end
2095
+ return (tostring(data.file) .. ":") .. tostring(data.line)
2096
+ end
2097
+ return (file .. ":") .. line
2098
+ end
2099
+ result = string.gsub(
2100
+ result,
2101
+ "(%[string \"[^\"]+\"%]):(%d+)",
2102
+ function(file, line) return stringReplacer(nil, file, line) end
2103
+ )
2104
+ return result
2105
+ end
2106
+ end
2107
+ end
2108
+
2109
+ local function __TS__Spread(iterable)
2110
+ local arr = {}
2111
+ if type(iterable) == "string" then
2112
+ for i = 0, #iterable - 1 do
2113
+ arr[i + 1] = __TS__StringAccess(iterable, i)
2114
+ end
2115
+ else
2116
+ local len = 0
2117
+ for ____, item in __TS__Iterator(iterable) do
2118
+ len = len + 1
2119
+ arr[len] = item
2120
+ end
2121
+ end
2122
+ return __TS__Unpack(arr)
2123
+ end
2124
+
2125
+ local function __TS__StringCharAt(self, pos)
2126
+ if pos ~= pos then
2127
+ pos = 0
2128
+ end
2129
+ if pos < 0 then
2130
+ return ""
2131
+ end
2132
+ return string.sub(self, pos + 1, pos + 1)
2133
+ end
2134
+
2135
+ local function __TS__StringCharCodeAt(self, index)
2136
+ if index ~= index then
2137
+ index = 0
2138
+ end
2139
+ if index < 0 then
2140
+ return 0 / 0
2141
+ end
2142
+ return string.byte(self, index + 1) or 0 / 0
2143
+ end
2144
+
2145
+ local function __TS__StringEndsWith(self, searchString, endPosition)
2146
+ if endPosition == nil or endPosition > #self then
2147
+ endPosition = #self
2148
+ end
2149
+ return string.sub(self, endPosition - #searchString + 1, endPosition) == searchString
2150
+ end
2151
+
2152
+ local function __TS__StringIncludes(self, searchString, position)
2153
+ if not position then
2154
+ position = 1
2155
+ else
2156
+ position = position + 1
2157
+ end
2158
+ local index = string.find(self, searchString, position, true)
2159
+ return index ~= nil
2160
+ end
2161
+
2162
+ local function __TS__StringPadEnd(self, maxLength, fillString)
2163
+ if fillString == nil then
2164
+ fillString = " "
2165
+ end
2166
+ if maxLength ~= maxLength then
2167
+ maxLength = 0
2168
+ end
2169
+ if maxLength == -math.huge or maxLength == math.huge then
2170
+ error("Invalid string length", 0)
2171
+ end
2172
+ if #self >= maxLength or #fillString == 0 then
2173
+ return self
2174
+ end
2175
+ maxLength = maxLength - #self
2176
+ if maxLength > #fillString then
2177
+ fillString = fillString .. string.rep(
2178
+ fillString,
2179
+ math.floor(maxLength / #fillString)
2180
+ )
2181
+ end
2182
+ return self .. string.sub(
2183
+ fillString,
2184
+ 1,
2185
+ math.floor(maxLength)
2186
+ )
2187
+ end
2188
+
2189
+ local function __TS__StringPadStart(self, maxLength, fillString)
2190
+ if fillString == nil then
2191
+ fillString = " "
2192
+ end
2193
+ if maxLength ~= maxLength then
2194
+ maxLength = 0
2195
+ end
2196
+ if maxLength == -math.huge or maxLength == math.huge then
2197
+ error("Invalid string length", 0)
2198
+ end
2199
+ if #self >= maxLength or #fillString == 0 then
2200
+ return self
2201
+ end
2202
+ maxLength = maxLength - #self
2203
+ if maxLength > #fillString then
2204
+ fillString = fillString .. string.rep(
2205
+ fillString,
2206
+ math.floor(maxLength / #fillString)
2207
+ )
2208
+ end
2209
+ return string.sub(
2210
+ fillString,
2211
+ 1,
2212
+ math.floor(maxLength)
2213
+ ) .. self
2214
+ end
2215
+
2216
+ local __TS__StringReplace
2217
+ do
2218
+ local sub = string.sub
2219
+ function __TS__StringReplace(source, searchValue, replaceValue)
2220
+ local startPos, endPos = string.find(source, searchValue, nil, true)
2221
+ if not startPos then
2222
+ return source
2223
+ end
2224
+ local before = sub(source, 1, startPos - 1)
2225
+ local ____temp_0
2226
+ if type(replaceValue) == "string" then
2227
+ ____temp_0 = replaceValue
2228
+ else
2229
+ ____temp_0 = replaceValue(nil, searchValue, startPos - 1, source)
2230
+ end
2231
+ local replacement = ____temp_0
2232
+ local after = sub(source, endPos + 1)
2233
+ return (before .. replacement) .. after
2234
+ end
2235
+ end
2236
+
2237
+ local __TS__StringSplit
2238
+ do
2239
+ local sub = string.sub
2240
+ local find = string.find
2241
+ function __TS__StringSplit(source, separator, limit)
2242
+ if limit == nil then
2243
+ limit = 4294967295
2244
+ end
2245
+ if limit == 0 then
2246
+ return {}
2247
+ end
2248
+ local result = {}
2249
+ local resultIndex = 1
2250
+ if separator == nil or separator == "" then
2251
+ for i = 1, #source do
2252
+ result[resultIndex] = sub(source, i, i)
2253
+ resultIndex = resultIndex + 1
2254
+ end
2255
+ else
2256
+ local currentPos = 1
2257
+ while resultIndex <= limit do
2258
+ local startPos, endPos = find(source, separator, currentPos, true)
2259
+ if not startPos then
2260
+ break
2261
+ end
2262
+ result[resultIndex] = sub(source, currentPos, startPos - 1)
2263
+ resultIndex = resultIndex + 1
2264
+ currentPos = endPos + 1
2265
+ end
2266
+ if resultIndex <= limit then
2267
+ result[resultIndex] = sub(source, currentPos)
2268
+ end
2269
+ end
2270
+ return result
2271
+ end
2272
+ end
2273
+
2274
+ local __TS__StringReplaceAll
2275
+ do
2276
+ local sub = string.sub
2277
+ local find = string.find
2278
+ function __TS__StringReplaceAll(source, searchValue, replaceValue)
2279
+ if type(replaceValue) == "string" then
2280
+ local concat = table.concat(
2281
+ __TS__StringSplit(source, searchValue),
2282
+ replaceValue
2283
+ )
2284
+ if #searchValue == 0 then
2285
+ return (replaceValue .. concat) .. replaceValue
2286
+ end
2287
+ return concat
2288
+ end
2289
+ local parts = {}
2290
+ local partsIndex = 1
2291
+ if #searchValue == 0 then
2292
+ parts[1] = replaceValue(nil, "", 0, source)
2293
+ partsIndex = 2
2294
+ for i = 1, #source do
2295
+ parts[partsIndex] = sub(source, i, i)
2296
+ parts[partsIndex + 1] = replaceValue(nil, "", i, source)
2297
+ partsIndex = partsIndex + 2
2298
+ end
2299
+ else
2300
+ local currentPos = 1
2301
+ while true do
2302
+ local startPos, endPos = find(source, searchValue, currentPos, true)
2303
+ if not startPos then
2304
+ break
2305
+ end
2306
+ parts[partsIndex] = sub(source, currentPos, startPos - 1)
2307
+ parts[partsIndex + 1] = replaceValue(nil, searchValue, startPos - 1, source)
2308
+ partsIndex = partsIndex + 2
2309
+ currentPos = endPos + 1
2310
+ end
2311
+ parts[partsIndex] = sub(source, currentPos)
2312
+ end
2313
+ return table.concat(parts)
2314
+ end
2315
+ end
2316
+
2317
+ local function __TS__StringSlice(self, start, ____end)
2318
+ if start == nil or start ~= start then
2319
+ start = 0
2320
+ end
2321
+ if ____end ~= ____end then
2322
+ ____end = 0
2323
+ end
2324
+ if start >= 0 then
2325
+ start = start + 1
2326
+ end
2327
+ if ____end ~= nil and ____end < 0 then
2328
+ ____end = ____end - 1
2329
+ end
2330
+ return string.sub(self, start, ____end)
2331
+ end
2332
+
2333
+ local function __TS__StringStartsWith(self, searchString, position)
2334
+ if position == nil or position < 0 then
2335
+ position = 0
2336
+ end
2337
+ return string.sub(self, position + 1, #searchString + position) == searchString
2338
+ end
2339
+
2340
+ local function __TS__StringTrim(self)
2341
+ local result = string.gsub(self, "^[%s ]*(.-)[%s ]*$", "%1")
2342
+ return result
2343
+ end
2344
+
2345
+ local function __TS__StringTrimEnd(self)
2346
+ local result = string.gsub(self, "[%s ]*$", "")
2347
+ return result
2348
+ end
2349
+
2350
+ local function __TS__StringTrimStart(self)
2351
+ local result = string.gsub(self, "^[%s ]*", "")
2352
+ return result
2353
+ end
2354
+
2355
+ local __TS__SymbolRegistryFor, __TS__SymbolRegistryKeyFor
2356
+ do
2357
+ local symbolRegistry = {}
2358
+ function __TS__SymbolRegistryFor(key)
2359
+ if not symbolRegistry[key] then
2360
+ symbolRegistry[key] = __TS__Symbol(key)
2361
+ end
2362
+ return symbolRegistry[key]
2363
+ end
2364
+ function __TS__SymbolRegistryKeyFor(sym)
2365
+ for key in pairs(symbolRegistry) do
2366
+ if symbolRegistry[key] == sym then
2367
+ return key
2368
+ end
2369
+ end
2370
+ end
2371
+ end
2372
+
2373
+ local function __TS__TypeOf(value)
2374
+ local luaType = type(value)
2375
+ if luaType == "table" then
2376
+ return "object"
2377
+ elseif luaType == "nil" then
2378
+ return "undefined"
2379
+ else
2380
+ return luaType
2381
+ end
2382
+ end
2383
+
2384
+ return {
2385
+ __TS__ArrayConcat = __TS__ArrayConcat,
2386
+ __TS__ArrayEntries = __TS__ArrayEntries,
2387
+ __TS__ArrayEvery = __TS__ArrayEvery,
2388
+ __TS__ArrayFilter = __TS__ArrayFilter,
2389
+ __TS__ArrayForEach = __TS__ArrayForEach,
2390
+ __TS__ArrayFind = __TS__ArrayFind,
2391
+ __TS__ArrayFindIndex = __TS__ArrayFindIndex,
2392
+ __TS__ArrayFrom = __TS__ArrayFrom,
2393
+ __TS__ArrayIncludes = __TS__ArrayIncludes,
2394
+ __TS__ArrayIndexOf = __TS__ArrayIndexOf,
2395
+ __TS__ArrayIsArray = __TS__ArrayIsArray,
2396
+ __TS__ArrayJoin = __TS__ArrayJoin,
2397
+ __TS__ArrayMap = __TS__ArrayMap,
2398
+ __TS__ArrayPush = __TS__ArrayPush,
2399
+ __TS__ArrayPushArray = __TS__ArrayPushArray,
2400
+ __TS__ArrayReduce = __TS__ArrayReduce,
2401
+ __TS__ArrayReduceRight = __TS__ArrayReduceRight,
2402
+ __TS__ArrayReverse = __TS__ArrayReverse,
2403
+ __TS__ArrayUnshift = __TS__ArrayUnshift,
2404
+ __TS__ArraySort = __TS__ArraySort,
2405
+ __TS__ArraySlice = __TS__ArraySlice,
2406
+ __TS__ArraySome = __TS__ArraySome,
2407
+ __TS__ArraySplice = __TS__ArraySplice,
2408
+ __TS__ArrayToObject = __TS__ArrayToObject,
2409
+ __TS__ArrayFlat = __TS__ArrayFlat,
2410
+ __TS__ArrayFlatMap = __TS__ArrayFlatMap,
2411
+ __TS__ArraySetLength = __TS__ArraySetLength,
2412
+ __TS__AsyncAwaiter = __TS__AsyncAwaiter,
2413
+ __TS__Await = __TS__Await,
2414
+ __TS__Class = __TS__Class,
2415
+ __TS__ClassExtends = __TS__ClassExtends,
2416
+ __TS__CloneDescriptor = __TS__CloneDescriptor,
2417
+ __TS__Decorate = __TS__Decorate,
2418
+ __TS__DecorateParam = __TS__DecorateParam,
2419
+ __TS__Delete = __TS__Delete,
2420
+ __TS__DelegatedYield = __TS__DelegatedYield,
2421
+ Error = Error,
2422
+ RangeError = RangeError,
2423
+ ReferenceError = ReferenceError,
2424
+ SyntaxError = SyntaxError,
2425
+ TypeError = TypeError,
2426
+ URIError = URIError,
2427
+ __TS__FunctionBind = __TS__FunctionBind,
2428
+ __TS__Generator = __TS__Generator,
2429
+ __TS__InstanceOf = __TS__InstanceOf,
2430
+ __TS__InstanceOfObject = __TS__InstanceOfObject,
2431
+ __TS__Iterator = __TS__Iterator,
2432
+ Map = Map,
2433
+ __TS__MathAtan2 = __TS__MathAtan2,
2434
+ __TS__MathSign = __TS__MathSign,
2435
+ __TS__New = __TS__New,
2436
+ __TS__Number = __TS__Number,
2437
+ __TS__NumberIsFinite = __TS__NumberIsFinite,
2438
+ __TS__NumberIsNaN = __TS__NumberIsNaN,
2439
+ __TS__NumberToString = __TS__NumberToString,
2440
+ __TS__ObjectAssign = __TS__ObjectAssign,
2441
+ __TS__ObjectDefineProperty = __TS__ObjectDefineProperty,
2442
+ __TS__ObjectEntries = __TS__ObjectEntries,
2443
+ __TS__ObjectFromEntries = __TS__ObjectFromEntries,
2444
+ __TS__ObjectGetOwnPropertyDescriptor = __TS__ObjectGetOwnPropertyDescriptor,
2445
+ __TS__ObjectGetOwnPropertyDescriptors = __TS__ObjectGetOwnPropertyDescriptors,
2446
+ __TS__ObjectKeys = __TS__ObjectKeys,
2447
+ __TS__ObjectRest = __TS__ObjectRest,
2448
+ __TS__ObjectValues = __TS__ObjectValues,
2449
+ __TS__ParseFloat = __TS__ParseFloat,
2450
+ __TS__ParseInt = __TS__ParseInt,
2451
+ __TS__Promise = __TS__Promise,
2452
+ __TS__PromiseAll = __TS__PromiseAll,
2453
+ __TS__PromiseAllSettled = __TS__PromiseAllSettled,
2454
+ __TS__PromiseAny = __TS__PromiseAny,
2455
+ __TS__PromiseRace = __TS__PromiseRace,
2456
+ Set = Set,
2457
+ __TS__SetDescriptor = __TS__SetDescriptor,
2458
+ __TS__SparseArrayNew = __TS__SparseArrayNew,
2459
+ __TS__SparseArrayPush = __TS__SparseArrayPush,
2460
+ __TS__SparseArraySpread = __TS__SparseArraySpread,
2461
+ WeakMap = WeakMap,
2462
+ WeakSet = WeakSet,
2463
+ __TS__SourceMapTraceBack = __TS__SourceMapTraceBack,
2464
+ __TS__Spread = __TS__Spread,
2465
+ __TS__StringAccess = __TS__StringAccess,
2466
+ __TS__StringCharAt = __TS__StringCharAt,
2467
+ __TS__StringCharCodeAt = __TS__StringCharCodeAt,
2468
+ __TS__StringEndsWith = __TS__StringEndsWith,
2469
+ __TS__StringIncludes = __TS__StringIncludes,
2470
+ __TS__StringPadEnd = __TS__StringPadEnd,
2471
+ __TS__StringPadStart = __TS__StringPadStart,
2472
+ __TS__StringReplace = __TS__StringReplace,
2473
+ __TS__StringReplaceAll = __TS__StringReplaceAll,
2474
+ __TS__StringSlice = __TS__StringSlice,
2475
+ __TS__StringSplit = __TS__StringSplit,
2476
+ __TS__StringStartsWith = __TS__StringStartsWith,
2477
+ __TS__StringSubstr = __TS__StringSubstr,
2478
+ __TS__StringSubstring = __TS__StringSubstring,
2479
+ __TS__StringTrim = __TS__StringTrim,
2480
+ __TS__StringTrimEnd = __TS__StringTrimEnd,
2481
+ __TS__StringTrimStart = __TS__StringTrimStart,
2482
+ __TS__Symbol = __TS__Symbol,
2483
+ Symbol = Symbol,
2484
+ __TS__SymbolRegistryFor = __TS__SymbolRegistryFor,
2485
+ __TS__SymbolRegistryKeyFor = __TS__SymbolRegistryKeyFor,
2486
+ __TS__TypeOf = __TS__TypeOf,
2487
+ __TS__Unpack = __TS__Unpack
2488
+ }