@tstdl/base 0.81.35 → 0.82.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 (419) hide show
  1. package/api/client/client.d.ts +3 -3
  2. package/api/default-error-handlers.d.ts +1 -1
  3. package/api/response.d.ts +8 -8
  4. package/api/server/api-controller.d.ts +1 -1
  5. package/api/server/gateway.d.ts +9 -9
  6. package/api/server/middlewares/cors.middleware.d.ts +1 -1
  7. package/api/server/module.d.ts +1 -1
  8. package/api/types.d.ts +30 -30
  9. package/api/utils.d.ts +1 -1
  10. package/api/utils.js +3 -1
  11. package/api/utils.js.map +1 -1
  12. package/authentication/authentication-credentials.service.d.ts +6 -0
  13. package/authentication/authentication-credentials.service.js +17 -0
  14. package/authentication/authentication-credentials.service.js.map +1 -0
  15. package/authentication/authentication-session.repository.d.ts +6 -0
  16. package/authentication/authentication-session.repository.js +18 -0
  17. package/authentication/authentication-session.repository.js.map +1 -0
  18. package/authentication/authentication-token-payload.provider.d.ts +3 -0
  19. package/authentication/authentication-token-payload.provider.js +17 -0
  20. package/authentication/authentication-token-payload.provider.js.map +1 -0
  21. package/authentication/authentication.service.d.ts +42 -0
  22. package/authentication/authentication.service.js +133 -0
  23. package/authentication/authentication.service.js.map +1 -0
  24. package/authentication/models/authentication-credentials.model.d.ts +11 -0
  25. package/authentication/models/authentication-credentials.model.js +44 -0
  26. package/authentication/models/authentication-credentials.model.js.map +1 -0
  27. package/authentication/models/authentication-session.model.d.ts +14 -0
  28. package/authentication/models/authentication-session.model.js +59 -0
  29. package/authentication/models/authentication-session.model.js.map +1 -0
  30. package/authentication/models/index.d.ts +2 -0
  31. package/authentication/models/index.js +19 -0
  32. package/authentication/models/index.js.map +1 -0
  33. package/authentication/tokens.d.ts +2 -0
  34. package/authentication/tokens.js +6 -0
  35. package/authentication/tokens.js.map +1 -0
  36. package/collections/keyed-set.d.ts +1 -1
  37. package/collections/observable/observable-collection.d.ts +1 -1
  38. package/collections/observable/observable-list.d.ts +2 -2
  39. package/container/container.d.ts +3 -3
  40. package/container/container.js +3 -3
  41. package/container/container.js.map +1 -1
  42. package/container/decorators.d.ts +3 -3
  43. package/container/decorators.js +0 -1
  44. package/container/decorators.js.map +1 -1
  45. package/container/interfaces.d.ts +1 -1
  46. package/container/provider.d.ts +6 -6
  47. package/container/resolve-chain.d.ts +2 -2
  48. package/container/resolve-chain.js +1 -1
  49. package/container/resolve-chain.js.map +1 -1
  50. package/container/token.d.ts +3 -3
  51. package/container/type-info.d.ts +1 -1
  52. package/container/types.d.ts +4 -4
  53. package/core.d.ts +1 -1
  54. package/data-structures/linked-list.d.ts +1 -1
  55. package/data-structures/multi-key-map.d.ts +2 -2
  56. package/data-structures/sorted-array-list.d.ts +1 -1
  57. package/database/entity-repository.d.ts +2 -2
  58. package/database/entity.d.ts +3 -3
  59. package/database/module.d.ts +1 -1
  60. package/database/mongo/classes.d.ts +3 -3
  61. package/database/mongo/model/document.d.ts +3 -3
  62. package/database/mongo/module.d.ts +1 -1
  63. package/database/mongo/mongo-base.repository.d.ts +11 -11
  64. package/database/mongo/mongo-bulk.d.ts +1 -1
  65. package/database/mongo/mongo-entity-repository.d.ts +7 -7
  66. package/database/mongo/types.d.ts +16 -16
  67. package/database/query.d.ts +38 -38
  68. package/disposable/async-disposer.d.ts +3 -3
  69. package/distributed-loop/distributed-loop.d.ts +2 -2
  70. package/error/custom.error.d.ts +1 -1
  71. package/http/client/adapters/undici-http-client.adapter.d.ts +1 -1
  72. package/http/client/http-client-request.d.ts +5 -5
  73. package/http/client/http-client-response.d.ts +2 -2
  74. package/http/client/http-client.d.ts +5 -5
  75. package/http/http-body.d.ts +3 -1
  76. package/http/http-body.js +18 -12
  77. package/http/http-body.js.map +1 -1
  78. package/http/http-form.d.ts +2 -2
  79. package/http/http-headers.d.ts +3 -3
  80. package/http/http-query.d.ts +2 -2
  81. package/http/http-url-parameters.d.ts +2 -2
  82. package/http/http-value-map.d.ts +1 -1
  83. package/http/server/http-server-request.d.ts +1 -1
  84. package/http/server/http-server-response.d.ts +1 -1
  85. package/http/server/http-server.d.ts +1 -1
  86. package/http/server/node/node-http-server.d.ts +1 -1
  87. package/http/types.d.ts +5 -5
  88. package/http/utils.d.ts +3 -3
  89. package/image-service/imgproxy/imgproxy-image-service.d.ts +1 -1
  90. package/json-path/json-path.d.ts +4 -4
  91. package/key-value-store/key-value.store.d.ts +1 -1
  92. package/key-value-store/mongo/module.d.ts +1 -1
  93. package/key-value-store/mongo/mongo-key-value.model.d.ts +1 -1
  94. package/lock/lock.d.ts +4 -4
  95. package/lock/mongo/model.d.ts +1 -1
  96. package/lock/mongo/module.d.ts +1 -1
  97. package/lock/provider.d.ts +1 -1
  98. package/logger/logger.d.ts +6 -6
  99. package/mail/mail.client.d.ts +1 -1
  100. package/mail/mail.service.d.ts +3 -1
  101. package/mail/mail.service.js +11 -6
  102. package/mail/mail.service.js.map +1 -1
  103. package/mail/models/mail-address.model.d.ts +1 -1
  104. package/mail/models/mail-content.model.d.ts +1 -1
  105. package/mail/models/mail-data.model.d.ts +2 -1
  106. package/mail/models/mail-log.model.d.ts +2 -2
  107. package/mail/models/mail-send-result.model.d.ts +1 -1
  108. package/mail/models/mail-template.model.d.ts +1 -1
  109. package/mail/module.d.ts +4 -2
  110. package/mail/module.js +6 -2
  111. package/mail/module.js.map +1 -1
  112. package/mail/repositories/mongo-mail-log.repository.d.ts +2 -2
  113. package/mail/tokens.d.ts +1 -0
  114. package/mail/tokens.js +2 -1
  115. package/mail/tokens.js.map +1 -1
  116. package/message-bus/local/types.d.ts +1 -1
  117. package/message-bus/message-bus.d.ts +1 -1
  118. package/migration/migration-state.d.ts +2 -2
  119. package/migration/migrator.d.ts +4 -4
  120. package/migration/mongo/module.d.ts +1 -1
  121. package/module/module-metric-reporter.d.ts +2 -2
  122. package/module/module.d.ts +1 -1
  123. package/module/modules/function.module.d.ts +1 -1
  124. package/module/modules/web-server.module.d.ts +1 -1
  125. package/notification/api.d.ts +3 -6
  126. package/notification/api.js +2 -5
  127. package/notification/api.js.map +1 -1
  128. package/notification/models/index.d.ts +2 -0
  129. package/notification/models/index.js +19 -0
  130. package/notification/models/index.js.map +1 -0
  131. package/notification/models/notification-channel-job.model.d.ts +3 -0
  132. package/notification/models/notification-channel-job.model.js +3 -0
  133. package/notification/models/notification-channel-job.model.js.map +1 -0
  134. package/notification/models/notification.model.d.ts +27 -0
  135. package/notification/{model.js → models/notification.model.js} +28 -16
  136. package/notification/models/notification.model.js.map +1 -0
  137. package/notification/module.d.ts +1 -1
  138. package/notification/notification-channel.service.d.ts +5 -0
  139. package/notification/notification-channel.service.js +7 -0
  140. package/notification/notification-channel.service.js.map +1 -0
  141. package/notification/notification.service.d.ts +8 -0
  142. package/notification/notification.service.js +40 -0
  143. package/notification/notification.service.js.map +1 -0
  144. package/object-storage/object-storage.d.ts +2 -2
  145. package/object-storage/object.d.ts +1 -1
  146. package/object-storage/s3/s3.object-storage-provider.d.ts +1 -1
  147. package/openid-connect/mongo-oidc-state.repository.d.ts +1 -1
  148. package/openid-connect/oidc-configuration.service.d.ts +1 -1
  149. package/openid-connect/oidc-state.model.d.ts +2 -2
  150. package/openid-connect/oidc.service-model.d.ts +8 -8
  151. package/orm/decorators.d.ts +26 -0
  152. package/orm/decorators.js +170 -0
  153. package/orm/decorators.js.map +1 -1
  154. package/orm/entity-definition.model.d.ts +51 -0
  155. package/orm/entity-definition.model.js +27 -0
  156. package/orm/entity-definition.model.js.map +1 -0
  157. package/orm/index.d.ts +1 -0
  158. package/orm/index.js +18 -0
  159. package/orm/index.js.map +1 -0
  160. package/orm/models/entity.d.ts +22 -0
  161. package/orm/models/entity.js +87 -0
  162. package/orm/models/entity.js.map +1 -0
  163. package/orm/models/index.d.ts +1 -0
  164. package/orm/models/index.js +18 -0
  165. package/orm/models/index.js.map +1 -0
  166. package/orm/repository/mongo/classes.d.ts +25 -0
  167. package/orm/repository/mongo/classes.js +33 -0
  168. package/orm/repository/mongo/classes.js.map +1 -0
  169. package/orm/repository/mongo/module.d.ts +8 -0
  170. package/orm/repository/mongo/module.js +88 -0
  171. package/orm/repository/mongo/module.js.map +1 -0
  172. package/orm/repository/mongo/mongo-repository.d.ts +11 -0
  173. package/orm/repository/mongo/mongo-repository.js +55 -0
  174. package/orm/repository/mongo/mongo-repository.js.map +1 -0
  175. package/orm/repository/mongo/mongo-transaction.d.ts +10 -0
  176. package/orm/repository/mongo/mongo-transaction.js +28 -0
  177. package/orm/repository/mongo/mongo-transaction.js.map +1 -0
  178. package/orm/repository/repository.d.ts +75 -0
  179. package/orm/repository/repository.js +182 -0
  180. package/orm/repository/repository.js.map +1 -0
  181. package/orm/repository/transaction.d.ts +26 -0
  182. package/orm/repository/transaction.js +65 -0
  183. package/orm/repository/transaction.js.map +1 -0
  184. package/orm/{types.d.ts → types/definition.d.ts} +5 -5
  185. package/orm/{types.js → types/definition.js} +8 -8
  186. package/orm/types/definition.js.map +1 -0
  187. package/orm/types/index.d.ts +3 -0
  188. package/orm/types/index.js +20 -0
  189. package/orm/types/index.js.map +1 -0
  190. package/orm/types/options.d.ts +36 -0
  191. package/orm/types/options.js +5 -0
  192. package/orm/types/options.js.map +1 -0
  193. package/orm/types/query.d.ts +110 -0
  194. package/orm/types/query.js +10 -0
  195. package/orm/types/query.js.map +1 -0
  196. package/package.json +5 -5
  197. package/pdf/pdf.service.d.ts +3 -3
  198. package/pool/pool.d.ts +4 -4
  199. package/promise/cancelable-promise.d.ts +1 -1
  200. package/promise/lazy-promise.d.ts +1 -1
  201. package/queue/mongo/job.d.ts +2 -2
  202. package/queue/mongo/queue.js +2 -2
  203. package/queue/mongo/queue.js.map +1 -1
  204. package/queue/queue.d.ts +11 -6
  205. package/queue/queue.js +2 -1
  206. package/queue/queue.js.map +1 -1
  207. package/reflection/decorator-data.js +2 -1
  208. package/reflection/decorator-data.js.map +1 -1
  209. package/reflection/registry.d.ts +18 -17
  210. package/reflection/registry.js +25 -10
  211. package/reflection/registry.js.map +1 -1
  212. package/reflection/types.d.ts +34 -34
  213. package/reflection/utils.d.ts +8 -8
  214. package/reflection/utils.js +6 -6
  215. package/reflection/utils.js.map +1 -1
  216. package/rpc/endpoints/message-port.rpc-endpoint.d.ts +3 -3
  217. package/rpc/model.d.ts +22 -22
  218. package/rpc/rpc.d.ts +1 -1
  219. package/rxjs/intersection-observer.d.ts +1 -1
  220. package/rxjs/mutation-observer.d.ts +1 -1
  221. package/rxjs/performance-observer.d.ts +1 -1
  222. package/rxjs/resize-observer.d.ts +1 -1
  223. package/rxjs/slow-array.d.ts +1 -1
  224. package/rxjs/touch.d.ts +1 -1
  225. package/schema/array-constraints/maximum-length.d.ts +2 -2
  226. package/schema/array-constraints/maximum-length.js +2 -2
  227. package/schema/array-constraints/maximum-length.js.map +1 -1
  228. package/schema/array-constraints/minimum-length.d.ts +2 -2
  229. package/schema/array-constraints/minimum-length.js +2 -2
  230. package/schema/array-constraints/minimum-length.js.map +1 -1
  231. package/schema/constraints/enumeration.d.ts +4 -4
  232. package/schema/constraints/enumeration.js +5 -5
  233. package/schema/constraints/enumeration.js.map +1 -1
  234. package/schema/constraints/generic.d.ts +4 -4
  235. package/schema/constraints/generic.js +2 -2
  236. package/schema/constraints/generic.js.map +1 -1
  237. package/schema/constraints/integer.d.ts +2 -2
  238. package/schema/constraints/integer.js +3 -2
  239. package/schema/constraints/integer.js.map +1 -1
  240. package/schema/constraints/length.d.ts +1 -1
  241. package/schema/constraints/literal.d.ts +2 -2
  242. package/schema/constraints/literal.js +2 -2
  243. package/schema/constraints/literal.js.map +1 -1
  244. package/schema/constraints/maximum-date.d.ts +2 -2
  245. package/schema/constraints/maximum-date.js +3 -2
  246. package/schema/constraints/maximum-date.js.map +1 -1
  247. package/schema/constraints/maximum-length.d.ts +2 -2
  248. package/schema/constraints/maximum-length.js +2 -2
  249. package/schema/constraints/maximum-length.js.map +1 -1
  250. package/schema/constraints/maximum.d.ts +2 -2
  251. package/schema/constraints/maximum.js +3 -2
  252. package/schema/constraints/maximum.js.map +1 -1
  253. package/schema/constraints/minimum-date.d.ts +2 -2
  254. package/schema/constraints/minimum-date.js +3 -2
  255. package/schema/constraints/minimum-date.js.map +1 -1
  256. package/schema/constraints/minimum-length.d.ts +2 -2
  257. package/schema/constraints/minimum-length.js +2 -2
  258. package/schema/constraints/minimum-length.js.map +1 -1
  259. package/schema/constraints/minimum.d.ts +2 -2
  260. package/schema/constraints/minimum.js +3 -2
  261. package/schema/constraints/minimum.js.map +1 -1
  262. package/schema/constraints/pattern.d.ts +2 -2
  263. package/schema/constraints/pattern.js +3 -2
  264. package/schema/constraints/pattern.js.map +1 -1
  265. package/schema/decorators/types.d.ts +3 -3
  266. package/schema/decorators/utils.d.ts +4 -1
  267. package/schema/decorators/utils.js +1 -1
  268. package/schema/decorators/utils.js.map +1 -1
  269. package/schema/schema.d.ts +4 -4
  270. package/schema/schema.error.d.ts +1 -1
  271. package/schema/schema.js +10 -13
  272. package/schema/schema.js.map +1 -1
  273. package/schema/schemas/any.d.ts +1 -1
  274. package/schema/schemas/array.d.ts +2 -2
  275. package/schema/schemas/array.js +2 -2
  276. package/schema/schemas/array.js.map +1 -1
  277. package/schema/schemas/boolean.d.ts +1 -1
  278. package/schema/schemas/date.d.ts +2 -2
  279. package/schema/schemas/date.js +2 -2
  280. package/schema/schemas/date.js.map +1 -1
  281. package/schema/schemas/enumeration.d.ts +2 -2
  282. package/schema/schemas/enumeration.js +2 -2
  283. package/schema/schemas/enumeration.js.map +1 -1
  284. package/schema/schemas/instance.d.ts +1 -1
  285. package/schema/schemas/literal.d.ts +2 -2
  286. package/schema/schemas/literal.js +2 -2
  287. package/schema/schemas/literal.js.map +1 -1
  288. package/schema/schemas/nullable.d.ts +1 -1
  289. package/schema/schemas/number.d.ts +2 -2
  290. package/schema/schemas/number.js +2 -2
  291. package/schema/schemas/number.js.map +1 -1
  292. package/schema/schemas/object.d.ts +1 -1
  293. package/schema/schemas/omit.d.ts +2 -2
  294. package/schema/schemas/omit.js.map +1 -1
  295. package/schema/schemas/one-or-many.d.ts +2 -2
  296. package/schema/schemas/optional.d.ts +1 -1
  297. package/schema/schemas/readable-stream.d.ts +1 -1
  298. package/schema/schemas/record.d.ts +1 -1
  299. package/schema/schemas/regexp.d.ts +1 -1
  300. package/schema/schemas/string.d.ts +2 -2
  301. package/schema/schemas/string.js +3 -3
  302. package/schema/schemas/string.js.map +1 -1
  303. package/schema/schemas/uint8-array.d.ts +2 -2
  304. package/schema/schemas/uint8-array.js +3 -3
  305. package/schema/schemas/uint8-array.js.map +1 -1
  306. package/schema/schemas/union.d.ts +1 -1
  307. package/schema/schemas/unknown.d.ts +1 -1
  308. package/schema/transformers/generic.d.ts +1 -1
  309. package/schema/types/index.d.ts +5 -0
  310. package/schema/types/index.js +22 -0
  311. package/schema/types/index.js.map +1 -0
  312. package/schema/types/schema-array-constraint.d.ts +5 -0
  313. package/schema/types/schema-array-constraint.js +7 -0
  314. package/schema/types/schema-array-constraint.js.map +1 -0
  315. package/schema/types/schema-value-coercer.d.ts +8 -0
  316. package/schema/types/schema-value-coercer.js +7 -0
  317. package/schema/types/schema-value-coercer.js.map +1 -0
  318. package/schema/types/schema-value-constraint.d.ts +8 -0
  319. package/schema/types/schema-value-constraint.js +7 -0
  320. package/schema/types/schema-value-constraint.js.map +1 -0
  321. package/schema/types/schema-value-transformer.d.ts +7 -0
  322. package/schema/types/schema-value-transformer.js +7 -0
  323. package/schema/types/schema-value-transformer.js.map +1 -0
  324. package/schema/{types.d.ts → types/types.d.ts} +47 -57
  325. package/schema/types/types.js +174 -0
  326. package/schema/types/types.js.map +1 -0
  327. package/schema/utils/schema.js +1 -1
  328. package/schema/utils/schema.js.map +1 -1
  329. package/schema/utils/value-type.d.ts +1 -1
  330. package/schema/utils/value-type.js +1 -1
  331. package/schema/utils/value-type.js.map +1 -1
  332. package/search-index/elastic/config.d.ts +1 -1
  333. package/search-index/elastic/model/elastic-query.d.ts +15 -15
  334. package/search-index/elastic/model/index-mapping.d.ts +14 -14
  335. package/search-index/elastic/model/sort.d.ts +3 -3
  336. package/search-index/elastic/module.d.ts +1 -1
  337. package/search-index/search-index.d.ts +1 -1
  338. package/search-index/search-result.d.ts +2 -2
  339. package/serializer/handlers/error.d.ts +1 -1
  340. package/serializer/handlers/map.d.ts +1 -1
  341. package/serializer/handlers/regex.d.ts +1 -1
  342. package/serializer/handlers/set.d.ts +1 -1
  343. package/serializer/serializable.d.ts +6 -6
  344. package/serializer/serializer.d.ts +1 -1
  345. package/serializer/types.d.ts +15 -15
  346. package/sse/server-sent-events.d.ts +3 -3
  347. package/tailwind/theme-adapter.d.ts +1 -1
  348. package/templates/module.d.ts +1 -1
  349. package/templates/providers/file.provider-template.d.ts +2 -2
  350. package/templates/providers/file.provider-template.js +2 -1
  351. package/templates/providers/file.provider-template.js.map +1 -1
  352. package/templates/renderers/handlebars.template-renderer.d.ts +9 -9
  353. package/templates/renderers/mjml.template-renderer.d.ts +3 -3
  354. package/templates/renderers/string.template-renderer.d.ts +1 -1
  355. package/templates/resolvers/file.template-resolver.d.ts +2 -2
  356. package/templates/template.model.d.ts +1 -1
  357. package/templates/template.renderer.d.ts +4 -4
  358. package/templates/template.service.d.ts +1 -1
  359. package/text/dynamic-text.model.d.ts +1 -1
  360. package/text/localizable-text.model.d.ts +1 -1
  361. package/text/localization.service.d.ts +11 -11
  362. package/theme/theme-service.d.ts +6 -6
  363. package/threading/thread-pool.d.ts +1 -1
  364. package/threading/thread-worker.d.ts +1 -1
  365. package/types/geo-json.d.ts +12 -12
  366. package/types.d.ts +91 -91
  367. package/utils/any-iterable-iterator.d.ts +3 -3
  368. package/utils/array/array.d.ts +14 -1
  369. package/utils/array/array.js +16 -2
  370. package/utils/array/array.js.map +1 -1
  371. package/utils/async-iterable-helpers/parallel/types.d.ts +2 -2
  372. package/utils/async-iterable-helpers/types.d.ts +7 -7
  373. package/utils/backoff.d.ts +5 -5
  374. package/utils/benchmark.d.ts +1 -1
  375. package/utils/binary-search.d.ts +1 -1
  376. package/utils/binary.js.map +1 -1
  377. package/utils/cancellation-token.d.ts +1 -1
  378. package/utils/compression.d.ts +1 -1
  379. package/utils/cryptography.d.ts +11 -11
  380. package/utils/date-time.d.ts +8 -7
  381. package/utils/date-time.js +6 -2
  382. package/utils/date-time.js.map +1 -1
  383. package/utils/equals.d.ts +3 -3
  384. package/utils/factory-map.d.ts +1 -1
  385. package/utils/format-error.d.ts +1 -1
  386. package/utils/function/memoize.d.ts +1 -1
  387. package/utils/helpers.d.ts +1 -1
  388. package/utils/iterable-helpers/types.d.ts +6 -6
  389. package/utils/jwt.d.ts +4 -4
  390. package/utils/math.d.ts +1 -1
  391. package/utils/merge.d.ts +1 -1
  392. package/utils/middleware.d.ts +9 -9
  393. package/utils/moving-metric.d.ts +1 -1
  394. package/utils/object/decycle.d.ts +1 -1
  395. package/utils/object/dereference.d.ts +1 -1
  396. package/utils/object/forward-ref.d.ts +2 -2
  397. package/utils/object/lazy-property.d.ts +5 -5
  398. package/utils/object/merge.d.ts +1 -1
  399. package/utils/object/object.js +1 -2
  400. package/utils/object/object.js.map +1 -1
  401. package/utils/object/property-name.d.ts +5 -5
  402. package/utils/patch-worker.d.ts +1 -1
  403. package/utils/periodic-sampler.d.ts +1 -1
  404. package/utils/provider-function-iterable.d.ts +2 -2
  405. package/utils/proxy.d.ts +1 -1
  406. package/utils/singleton.d.ts +2 -2
  407. package/utils/sort.d.ts +2 -2
  408. package/utils/stream/stream-helper-types.d.ts +5 -5
  409. package/utils/type-guards.d.ts +3 -3
  410. package/utils/url-builder.d.ts +4 -4
  411. package/web-types.d.ts +4 -4
  412. package/notification/model.d.ts +0 -18
  413. package/notification/model.js.map +0 -1
  414. package/orm/mongo/mongo-repository.d.ts +0 -2
  415. package/orm/mongo/mongo-repository.js +0 -7
  416. package/orm/mongo/mongo-repository.js.map +0 -1
  417. package/orm/types.js.map +0 -1
  418. package/schema/types.js +0 -102
  419. package/schema/types.js.map +0 -1
package/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { UnionToIntersection } from 'type-fest';
2
- export declare type ObjectLiteral = {};
3
- export declare type PrimitiveTypeMap = {
2
+ export type ObjectLiteral = {};
3
+ export type PrimitiveTypeMap = {
4
4
  'string': string;
5
5
  'number': number;
6
6
  'boolean': boolean;
@@ -10,162 +10,162 @@ export declare type PrimitiveTypeMap = {
10
10
  'function': Function;
11
11
  'undefined': undefined;
12
12
  };
13
- export declare type PrimitiveTypeString<T extends PrimitiveTypeMap[keyof PrimitiveTypeMap] = PrimitiveTypeMap[keyof PrimitiveTypeMap]> = Simplify<keyof PickBy<PrimitiveTypeMap, T>>;
14
- export declare type PrimitiveType<T extends keyof PrimitiveTypeMap = keyof PrimitiveTypeMap> = Simplify<PrimitiveTypeMap[T]>;
15
- export declare type Nested<T> = T | NestedObject<T> | NestedArray<T>;
16
- export declare type NestedObject<T> = {
13
+ export type PrimitiveTypeString<T extends PrimitiveTypeMap[keyof PrimitiveTypeMap] = PrimitiveTypeMap[keyof PrimitiveTypeMap]> = Simplify<keyof PickBy<PrimitiveTypeMap, T>>;
14
+ export type PrimitiveType<T extends keyof PrimitiveTypeMap = keyof PrimitiveTypeMap> = Simplify<PrimitiveTypeMap[T]>;
15
+ export type Nested<T> = T | NestedObject<T> | NestedArray<T>;
16
+ export type NestedObject<T> = {
17
17
  [key: string]: Nested<T>;
18
18
  };
19
- export declare type NestedArray<T> = T[];
20
- export declare type FilledArray<T> = [T, ...(T)[]];
21
- export declare type FilledReadonlyArray<T> = readonly [T, ...(T)[]];
22
- export declare type Primitive = string | number | boolean | bigint | null | undefined | symbol;
23
- export declare type PrimitiveValue = Primitive | PrimitiveObject | PrimitiveArray;
24
- export declare type PrimitiveObject = {
19
+ export type NestedArray<T> = T[];
20
+ export type FilledArray<T> = [T, ...(T)[]];
21
+ export type FilledReadonlyArray<T> = readonly [T, ...(T)[]];
22
+ export type Primitive = string | number | boolean | bigint | null | undefined | symbol;
23
+ export type PrimitiveValue = Primitive | PrimitiveObject | PrimitiveArray;
24
+ export type PrimitiveObject = {
25
25
  [key: string]: PrimitiveValue;
26
26
  };
27
- export declare type PrimitiveArray = PrimitiveValue[];
28
- export declare type BuiltIn = Primitive | RegExp | Date | Function;
29
- export declare type Json = JsonPrimitive | JsonObject | JsonArray;
30
- export declare type JsonPrimitive = string | number | boolean | null;
31
- export declare type JsonObject = {
27
+ export type PrimitiveArray = PrimitiveValue[];
28
+ export type BuiltIn = Primitive | RegExp | Date | Function;
29
+ export type Json = JsonPrimitive | JsonObject | JsonArray;
30
+ export type JsonPrimitive = string | number | boolean | null;
31
+ export type JsonObject = {
32
32
  [key: string]: Json;
33
33
  };
34
- export declare type JsonArray = Json[];
35
- export declare type UndefinableJson = JsonPrimitive | UndefinableJsonObject | UndefinableJsonArray;
36
- export declare type UndefinableJsonInnerNode = UndefinableJsonPrimitive | UndefinableJsonObject | UndefinableJsonArray;
37
- export declare type UndefinableJsonPrimitive = JsonPrimitive | undefined;
38
- export declare type UndefinableJsonObject = {
34
+ export type JsonArray = Json[];
35
+ export type UndefinableJson = JsonPrimitive | UndefinableJsonObject | UndefinableJsonArray;
36
+ export type UndefinableJsonInnerNode = UndefinableJsonPrimitive | UndefinableJsonObject | UndefinableJsonArray;
37
+ export type UndefinableJsonPrimitive = JsonPrimitive | undefined;
38
+ export type UndefinableJsonObject = {
39
39
  [key: string]: UndefinableJsonInnerNode;
40
40
  };
41
- export declare type UndefinableJsonArray = UndefinableJsonInnerNode[];
42
- export declare type ArrayItem<T extends readonly any[]> = T extends readonly (infer U)[] ? U : never;
43
- export declare type Enumeration = EnumerationArray | EnumerationObject;
44
- export declare type EnumerationArray = readonly [string | number, ...(string | number)[]];
45
- export declare type EnumerationObject = Record<string, string | number>;
46
- export declare type EnumerationKey<T extends EnumerationObject = EnumerationObject> = Extract<keyof T, string>;
47
- export declare type EnumerationMap<T extends EnumerationObject = EnumerationObject> = SimplifyObject<{
41
+ export type UndefinableJsonArray = UndefinableJsonInnerNode[];
42
+ export type ArrayItem<T extends readonly any[]> = T extends readonly (infer U)[] ? U : never;
43
+ export type Enumeration = EnumerationArray | EnumerationObject;
44
+ export type EnumerationArray = readonly [string | number, ...(string | number)[]];
45
+ export type EnumerationObject = Record<string, string | number>;
46
+ export type EnumerationKey<T extends EnumerationObject = EnumerationObject> = Extract<keyof T, string>;
47
+ export type EnumerationMap<T extends EnumerationObject = EnumerationObject> = SimplifyObject<{
48
48
  [P in EnumerationKey<T>]: (T[P] extends number ? (`${T[P]}` extends `${infer U extends number}` ? U : never) : `${T[P]}`) | T[P];
49
49
  }>;
50
- export declare type EnumerationValue<T extends Enumeration = Enumeration> = T extends EnumerationObject ? Simplify<EnumerationMap<T>[keyof EnumerationMap<T>]> : T extends EnumerationArray ? T[number] : never;
51
- export declare type EnumerationEntry<T extends EnumerationObject = EnumerationObject> = {
50
+ export type EnumerationValue<T extends Enumeration = Enumeration> = T extends EnumerationObject ? Simplify<EnumerationMap<T>[keyof EnumerationMap<T>]> : T extends EnumerationArray ? T[number] : never;
51
+ export type EnumerationEntry<T extends EnumerationObject = EnumerationObject> = {
52
52
  [P in EnumerationKey<T>]: [P, EnumerationMap<T>[P]];
53
53
  }[EnumerationKey<T>];
54
- declare type EnumerationEntriesHelper<T extends EnumerationObject = EnumerationObject, Tuple = UnionToTuple<EnumerationKey<T>>> = {
54
+ type EnumerationEntriesHelper<T extends EnumerationObject = EnumerationObject, Tuple = UnionToTuple<EnumerationKey<T>>> = {
55
55
  [P in keyof Tuple]: [Tuple[P], Tuple[P] extends EnumerationKey<T> ? EnumerationMap<T>[Tuple[P]] : never];
56
56
  };
57
- export declare type EnumerationEntries<T extends EnumerationObject = EnumerationObject> = EnumerationEntriesHelper<T> extends (infer U)[] ? U[] : never;
58
- export declare type Type<T = any, Arguments extends any[] = any> = Constructor<T, Arguments> & {
57
+ export type EnumerationEntries<T extends EnumerationObject = EnumerationObject> = EnumerationEntriesHelper<T> extends (infer U)[] ? U[] : never;
58
+ export type Type<T = any, Arguments extends any[] = any> = Constructor<T, Arguments> & {
59
59
  prototype: T;
60
60
  };
61
- export declare type Constructor<T = any, Arguments extends any[] = any> = new (...args: Arguments) => T;
62
- export declare type AbstractType<T = any, Arguments extends any[] = any> = AbstractConstructor<T, Arguments> & {
61
+ export type Constructor<T = any, Arguments extends any[] = any> = new (...args: Arguments) => T;
62
+ export type AbstractType<T = any, Arguments extends any[] = any> = AbstractConstructor<T, Arguments> & {
63
63
  prototype: T;
64
64
  };
65
- export declare type AbstractConstructor<T = any, Arguments extends any[] = any> = abstract new (...args: Arguments) => T;
66
- export declare type ReturnTypeOrT<T> = T extends (...args: any) => infer R ? R : T;
67
- export declare type Record<K extends PropertyKey = PropertyKey, V = any> = {
65
+ export type AbstractConstructor<T = any, Arguments extends any[] = any> = abstract new (...args: Arguments) => T;
66
+ export type ReturnTypeOrT<T> = T extends (...args: any) => infer R ? R : T;
67
+ export type Record<K extends PropertyKey = PropertyKey, V = any> = {
68
68
  [P in K]: V;
69
69
  };
70
- export declare type DeepRecord<K extends PropertyKey = PropertyKey, V = any> = {
70
+ export type DeepRecord<K extends PropertyKey = PropertyKey, V = any> = {
71
71
  [P in K]: V | DeepRecord<K, V>;
72
72
  };
73
- export declare type StringMap<T = any> = Record<string, T>;
74
- export declare type NumberMap<T = any> = Record<number, T>;
75
- export declare type StringNumberMap<T = any> = {
73
+ export type StringMap<T = any> = Record<string, T>;
74
+ export type NumberMap<T = any> = Record<number, T>;
75
+ export type StringNumberMap<T = any> = {
76
76
  [key: string]: T;
77
77
  [key: number]: T;
78
78
  };
79
- export declare type OneOrMany<T> = T | readonly T[];
80
- export declare type WritableOneOrMany<T> = T | T[];
81
- export declare type Writable<T> = {
79
+ export type OneOrMany<T> = T | readonly T[];
80
+ export type WritableOneOrMany<T> = T | T[];
81
+ export type Writable<T> = {
82
82
  -readonly [P in keyof T]: T[P];
83
83
  };
84
- export declare type RequiredKeys<T> = {
84
+ export type RequiredKeys<T> = {
85
85
  [K in keyof T]-?: {} extends Pick<T, K> ? never : K;
86
86
  }[keyof T];
87
- export declare type OptionalKeys<T> = {
87
+ export type OptionalKeys<T> = {
88
88
  [K in keyof T]-?: {} extends Pick<T, K> ? K : never;
89
89
  }[keyof T];
90
- export declare type TypedOmit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
91
- export declare type TypedExtract<T, U extends T> = T extends U ? T : never;
92
- export declare type ReplaceIfUnknown<T, U> = IfUnknown<T, U, T>;
93
- export declare type OmitNever<T extends Record> = {
90
+ export type TypedOmit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
91
+ export type TypedExtract<T, U extends T> = T extends U ? T : never;
92
+ export type ReplaceIfUnknown<T, U> = IfUnknown<T, U, T>;
93
+ export type OmitNever<T extends Record> = {
94
94
  [K in keyof T as T[K] extends never ? never : K]: T[K];
95
95
  };
96
- export declare type SharedProperties<A, B, C = unknown, D = unknown, E = unknown, F = unknown, G = unknown, H = unknown, I = unknown, J = unknown> = OmitNever<Pick<A & B & C & D & E & F & G & H & I & J, keyof A & keyof B & keyof ReplaceIfUnknown<C, never> & keyof ReplaceIfUnknown<D, never> & keyof ReplaceIfUnknown<E, never> & keyof ReplaceIfUnknown<F, never> & keyof ReplaceIfUnknown<G, never> & keyof ReplaceIfUnknown<H, never> & keyof ReplaceIfUnknown<I, never> & keyof ReplaceIfUnknown<J, never>>>;
96
+ export type SharedProperties<A, B, C = unknown, D = unknown, E = unknown, F = unknown, G = unknown, H = unknown, I = unknown, J = unknown> = OmitNever<Pick<A & B & C & D & E & F & G & H & I & J, keyof A & keyof B & keyof ReplaceIfUnknown<C, never> & keyof ReplaceIfUnknown<D, never> & keyof ReplaceIfUnknown<E, never> & keyof ReplaceIfUnknown<F, never> & keyof ReplaceIfUnknown<G, never> & keyof ReplaceIfUnknown<H, never> & keyof ReplaceIfUnknown<I, never> & keyof ReplaceIfUnknown<J, never>>>;
97
97
  /**
98
98
  * omit properties from a type that extend from a specific type.
99
99
  */
100
- export declare type OmitBy<T, V> = Omit<T, {
100
+ export type OmitBy<T, V> = Omit<T, {
101
101
  [K in keyof T]: V extends Extract<T[K], V> ? K : never;
102
102
  }[keyof T]>;
103
103
  /**
104
104
  * normalize properties of a type that allow `undefined` to make them optional.
105
105
  */
106
- export declare type Optionalize<T extends object> = OmitBy<T, undefined> & Partial<PickBy<T, undefined>>;
107
- export declare type SimplifiedOptionalize<T extends object> = Simplify<Optionalize<T>>;
106
+ export type Optionalize<T extends object> = OmitBy<T, undefined> & Partial<PickBy<T, undefined>>;
107
+ export type SimplifiedOptionalize<T extends object> = Simplify<Optionalize<T>>;
108
108
  /**
109
109
  * remove nested type information
110
110
  */
111
- export declare type Simplify<T> = T extends (Primitive | Function | Date | RegExp) ? T : T extends (infer AT)[] ? Simplify<AT>[] : T extends readonly (infer AT)[] ? readonly Simplify<AT>[] : T extends Record ? SimplifyObject<T> : T;
111
+ export type Simplify<T> = T extends (Primitive | Function | Date | RegExp) ? T : T extends (infer AT)[] ? Simplify<AT>[] : T extends readonly (infer AT)[] ? readonly Simplify<AT>[] : T extends Record ? SimplifyObject<T> : T;
112
112
  /**
113
113
  * remove type information on object
114
114
  */
115
- export declare type SimplifyObject<T extends Record> = {
115
+ export type SimplifyObject<T extends Record> = {
116
116
  [K in keyof T]: T[K];
117
117
  } & {};
118
- export declare type UnionToTuple<T, Tuple extends any[] = []> = UnionToIntersection<T extends any ? () => T : never> extends () => infer R ? UnionToTuple<Exclude<T, R>, [R, ...Tuple]> : Tuple;
119
- export declare type UndefinableObject<T extends Record> = {
118
+ export type UnionToTuple<T, Tuple extends any[] = []> = UnionToIntersection<T extends any ? () => T : never> extends () => infer R ? UnionToTuple<Exclude<T, R>, [R, ...Tuple]> : Tuple;
119
+ export type UndefinableObject<T extends Record> = {
120
120
  [K in keyof T]: T[K] | undefined;
121
121
  };
122
122
  /**
123
123
  * pick properties from a type that extend from a specific type.
124
124
  */
125
- export declare type PickBy<T, V> = Pick<T, {
125
+ export type PickBy<T, V> = Pick<T, {
126
126
  [K in keyof T]: V extends Extract<T[K], V> ? K : never;
127
127
  }[keyof T]>;
128
- export declare type NonNullable<T> = T extends null ? never : T;
129
- export declare type NonUndefinable<T> = T extends undefined ? never : T;
130
- export declare type NonNullOrUndefinable<T> = T extends null | undefined ? never : T;
128
+ export type NonNullable<T> = T extends null ? never : T;
129
+ export type NonUndefinable<T> = T extends undefined ? never : T;
130
+ export type NonNullOrUndefinable<T> = T extends null | undefined ? never : T;
131
131
  /**
132
132
  * makes optional properties required and removes null and undefined
133
133
  */
134
- export declare type DeepNonNullable<T> = T extends Record ? {
134
+ export type DeepNonNullable<T> = T extends Record ? {
135
135
  [P in keyof T]-?: DeepNonNullable<T[P]>;
136
136
  } : NonNullable<T>;
137
- export declare type IfAny<T, Then, Else = never> = true extends (false & T) ? Then : Else;
138
- export declare type IfUnknown<T, Then, Else = never> = unknown extends T ? Then : Else;
139
- export declare type IsAny<T> = IfAny<T, true, false>;
140
- export declare type IsUnknown<T> = IfUnknown<T, true, false>;
141
- export declare type If<B extends Boolean, Then, Else> = B extends true ? Then : Else;
142
- export declare type PartialProperty<T, P extends keyof T> = Omit<T, P> & Partial<Pick<T, P>>;
143
- export declare type TypeOf<T extends object, P extends keyof T> = T[P];
144
- export declare type PropertyOf<T extends object, P extends keyof T> = Property<Of<T>, P>;
145
- export declare type Property<T extends object, P extends keyof T> = {
137
+ export type IfAny<T, Then, Else = never> = true extends (false & T) ? Then : Else;
138
+ export type IfUnknown<T, Then, Else = never> = unknown extends T ? Then : Else;
139
+ export type IsAny<T> = IfAny<T, true, false>;
140
+ export type IsUnknown<T> = IfUnknown<T, true, false>;
141
+ export type If<B extends Boolean, Then, Else> = B extends true ? Then : Else;
142
+ export type PartialProperty<T, P extends keyof T> = Omit<T, P> & Partial<Pick<T, P>>;
143
+ export type TypeOf<T extends object, P extends keyof T> = T[P];
144
+ export type PropertyOf<T extends object, P extends keyof T> = Property<Of<T>, P>;
145
+ export type Property<T extends object, P extends keyof T> = {
146
146
  [P2 in keyof T[P]]: T[P][P2];
147
147
  };
148
- export declare type Of<T> = T;
149
- export declare type PropertiesOfType<T, U> = keyof PickBy<T, U>;
150
- export declare type Flatten<T> = T extends readonly (infer R)[] ? R : T;
151
- export declare type DeepFlatten<T> = T extends readonly (infer R)[] ? DeepFlatten<R> : T extends Record ? {
148
+ export type Of<T> = T;
149
+ export type PropertiesOfType<T, U> = keyof PickBy<T, U>;
150
+ export type Flatten<T> = T extends readonly (infer R)[] ? R : T;
151
+ export type DeepFlatten<T> = T extends readonly (infer R)[] ? DeepFlatten<R> : T extends Record ? {
152
152
  [P in keyof T]: DeepFlatten<T[P]>;
153
153
  } : T;
154
- export declare type DeepArray<T> = (T | DeepArray<T>)[];
155
- export declare type DeepReadonly<T> = T extends BuiltIn ? T : T extends (any[] | readonly any[]) ? DeepReadonlyArray<T[number]> : DeepReadonlyObject<T>;
156
- export declare type DeepReadonlyObject<T> = {
154
+ export type DeepArray<T> = (T | DeepArray<T>)[];
155
+ export type DeepReadonly<T> = T extends BuiltIn ? T : T extends (any[] | readonly any[]) ? DeepReadonlyArray<T[number]> : DeepReadonlyObject<T>;
156
+ export type DeepReadonlyObject<T> = {
157
157
  readonly [P in keyof T]: DeepReadonly<T[P]>;
158
158
  };
159
- export declare type DeepReadonlyArray<T> = readonly DeepReadonly<T>[];
160
- export declare type DeepPartial<T> = T extends BuiltIn ? T : T extends any[] ? DeepPartialArray<T[number]> : T extends readonly any[] ? Readonly<DeepPartialArray<T[number]>> : DeepPartialObject<T>;
161
- export declare type DeepPartialObject<T> = {
159
+ export type DeepReadonlyArray<T> = readonly DeepReadonly<T>[];
160
+ export type DeepPartial<T> = T extends BuiltIn ? T : T extends any[] ? DeepPartialArray<T[number]> : T extends readonly any[] ? Readonly<DeepPartialArray<T[number]>> : DeepPartialObject<T>;
161
+ export type DeepPartialObject<T> = {
162
162
  [P in keyof T]?: DeepPartial<T[P]>;
163
163
  };
164
- export declare type DeepPartialArray<T> = DeepPartial<T>[];
165
- export declare type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
166
- export declare type BinaryData = ArrayBuffer | ArrayBufferView;
167
- declare type JoinPaths<K, P> = K extends string | number ? P extends string | number ? `${K}${'' extends P ? '' : '.'}${P}` : never : never;
168
- declare type Prev = [
164
+ export type DeepPartialArray<T> = DeepPartial<T>[];
165
+ export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
166
+ export type BinaryData = ArrayBuffer | ArrayBufferView;
167
+ type JoinPaths<K, P> = K extends string | number ? P extends string | number ? `${K}${'' extends P ? '' : '.'}${P}` : never : never;
168
+ type Prev = [
169
169
  never,
170
170
  0,
171
171
  1,
@@ -190,10 +190,10 @@ declare type Prev = [
190
190
  20,
191
191
  ...0[]
192
192
  ];
193
- export declare type Paths<T, D extends number = 10> = [D] extends [never] ? never : T extends object ? {
193
+ export type Paths<T, D extends number = 10> = [D] extends [never] ? never : T extends object ? {
194
194
  [K in keyof T]-?: K extends string | number ? `${K}` | (Paths<T[K], Prev[D]> extends infer R ? JoinPaths<K, R> : never) : never;
195
195
  }[keyof T] : '';
196
- export declare type LeavePaths<T, D extends number = 10> = [D] extends [never] ? never : T extends object ? {
196
+ export type LeavePaths<T, D extends number = 10> = [D] extends [never] ? never : T extends object ? {
197
197
  [K in keyof T]-?: JoinPaths<K, LeavePaths<T[K], Prev[D]>>;
198
198
  }[keyof T] : '';
199
199
  export {};
@@ -1,4 +1,4 @@
1
- export declare type AnyIterable<T> = Iterable<T> | AsyncIterable<T>;
2
- export declare type AnyIterator<T> = Iterator<T> | AsyncIterator<T>;
3
- export declare type AnyIterableIterator<T> = IterableIterator<T> | AsyncIterableIterator<T>;
1
+ export type AnyIterable<T> = Iterable<T> | AsyncIterable<T>;
2
+ export type AnyIterator<T> = Iterator<T> | AsyncIterator<T>;
3
+ export type AnyIterableIterator<T> = IterableIterator<T> | AsyncIterableIterator<T>;
4
4
  export declare function isAnyIterable<T = any>(obj: any): obj is AnyIterable<T>;
@@ -1,4 +1,17 @@
1
- export declare function toArray<T>(value: T | T[] | readonly T[]): T[];
1
+ /**
2
+ * Returns value as is, if it is an array, otherwise puts the single value into an array.
3
+ */
4
+ export declare function toArray<T>(value: T | T[]): T[];
5
+ export declare function toArray<T>(value: T | readonly T[]): readonly T[];
6
+ /**
7
+ * Return copy of value, if it is an array, otherwise puts the single value into an array.
8
+ */
9
+ export declare function toArrayCopy<T>(value: T | T[] | readonly T[]): T[];
10
+ /**
11
+ * Returns element of value at index 0, if it is an array and has exactly one element, otherweise returns value as is.
12
+ */
13
+ export declare function extractValueOfArrayIfSingleElement<T>(value: T | T[]): T | T[];
14
+ export declare function extractValueOfArrayIfSingleElement<T>(value: T | readonly T[]): T | readonly T[];
2
15
  /**
3
16
  * creates a new array of specified length and fills it with values from the specified value provider function
4
17
  * @param length length of the new array
@@ -1,12 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.randomItems = exports.randomItem = exports.shuffle = exports.createArray = exports.toArray = void 0;
3
+ exports.randomItems = exports.randomItem = exports.shuffle = exports.createArray = exports.extractValueOfArrayIfSingleElement = exports.toArrayCopy = exports.toArray = void 0;
4
4
  const math_1 = require("../math");
5
5
  const type_guards_1 = require("../type-guards");
6
6
  function toArray(value) {
7
- return Array.isArray(value) ? value : [value];
7
+ return (0, type_guards_1.isArray)(value) ? value : [value];
8
8
  }
9
9
  exports.toArray = toArray;
10
+ /**
11
+ * Return copy of value, if it is an array, otherwise puts the single value into an array.
12
+ */
13
+ function toArrayCopy(value) {
14
+ return (0, type_guards_1.isArray)(value) ? [...value] : [value];
15
+ }
16
+ exports.toArrayCopy = toArrayCopy;
17
+ function extractValueOfArrayIfSingleElement(value) {
18
+ if ((0, type_guards_1.isArray)(value)) {
19
+ return (value.length == 1) ? value[0] : value;
20
+ }
21
+ return value;
22
+ }
23
+ exports.extractValueOfArrayIfSingleElement = extractValueOfArrayIfSingleElement;
10
24
  /**
11
25
  * creates a new array of specified length and fills it with values from the specified value provider function
12
26
  * @param length length of the new array
@@ -1 +1 @@
1
- {"version":3,"file":"array.js","sourceRoot":"","sources":["../../../source/utils/array/array.ts"],"names":[],"mappings":";;;AAAA,kCAAoC;AACpC,gDAA2C;AAE3C,SAAgB,OAAO,CAAI,KAA6B;IACtD,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAQ,CAAC;AACvD,CAAC;AAFD,0BAEC;AAED;;;;;GAKG;AACH,SAAgB,WAAW,CAAI,MAAc,EAAE,aAAmC;IAChF,MAAM,KAAK,GAAG,EAAE,CAAC;IAEjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;QAC/B,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;KAC9B;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AARD,kCAQC;AAED;;;;GAIG;AACH,SAAgB,OAAO,CAAI,KAAmB;IAC5C,MAAM,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;IAE1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,MAAM,CAAC,GAAG,IAAA,gBAAS,EAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC1C,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAE,EAAE,MAAM,CAAC,CAAC,CAAE,CAAC,CAAC;KACnD;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AATD,0BASC;AAED;;;;;GAKG;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KAAa,EAAE,kBAA2B,KAAK;IACjG,IAAI,eAAe,EAAE;QACnB,OAAO,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAA,gBAAS,EAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAE,CAAC,CAAC;KACzE;IAED,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE;QACxB,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;KAClF;IAED,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE;QAC/B,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;KACvC;IAED,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAEhC,OAAO,WAAW,CAAI,KAAK,EAAE,GAAG,EAAE;QAChC,OAAO,IAAI,EAAE;YACX,MAAM,KAAK,GAAG,IAAA,gBAAS,EAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAE7C,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;gBACrB,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBACjB,OAAO,KAAK,CAAC,KAAK,CAAE,CAAC;aACtB;SACF;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAzBD,kCAyBC"}
@@ -1,2 +1,2 @@
1
- export declare type FeedFunction<T> = (item: T, index: number) => void;
2
- export declare type ParallelFeedIteratorFunction<TIn, TOut> = (item: TIn, index: number, feed: FeedFunction<TOut>) => Promise<void>;
1
+ export type FeedFunction<T> = (item: T, index: number) => void;
2
+ export type ParallelFeedIteratorFunction<TIn, TOut> = (item: TIn, index: number, feed: FeedFunction<TOut>) => Promise<void>;
@@ -1,8 +1,8 @@
1
1
  export type { Context } from '../iterable-helpers/types';
2
- export declare type AsyncIteratorFunction<TIn, TOut> = (item: TIn, index: number) => TOut | Promise<TOut>;
3
- export declare type AsyncPredicate<T> = (item: T, index: number) => boolean | Promise<boolean>;
4
- export declare type AsyncRetryPredicate<T> = (error: Error, item: T, index: number) => boolean | Promise<boolean>;
5
- export declare type AsyncReducer<T, U> = (previous: U, current: T, index: number) => U | Promise<U>;
6
- export declare type ParallelizableIteratorFunction<TIn, TOut> = (item: TIn, index: number) => Promise<TOut>;
7
- export declare type ParallelizablePredicate<T> = ParallelizableIteratorFunction<T, boolean>;
8
- export declare type ThrottleFunction = () => Promise<void>;
2
+ export type AsyncIteratorFunction<TIn, TOut> = (item: TIn, index: number) => TOut | Promise<TOut>;
3
+ export type AsyncPredicate<T> = (item: T, index: number) => boolean | Promise<boolean>;
4
+ export type AsyncRetryPredicate<T> = (error: Error, item: T, index: number) => boolean | Promise<boolean>;
5
+ export type AsyncReducer<T, U> = (previous: U, current: T, index: number) => U | Promise<U>;
6
+ export type ParallelizableIteratorFunction<TIn, TOut> = (item: TIn, index: number) => Promise<TOut>;
7
+ export type ParallelizablePredicate<T> = ParallelizableIteratorFunction<T, boolean>;
8
+ export type ThrottleFunction = () => Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import type { ReadonlyCancellationToken } from './cancellation-token';
2
2
  import { CancellationToken } from './cancellation-token';
3
- export declare type BackoffStrategy = 'linear' | 'exponential';
4
- export declare type BackoffOptions = {
3
+ export type BackoffStrategy = 'linear' | 'exponential';
4
+ export type BackoffOptions = {
5
5
  /**
6
6
  * how to increase delay
7
7
  */
@@ -19,7 +19,7 @@ export declare type BackoffOptions = {
19
19
  */
20
20
  maximumDelay?: number;
21
21
  };
22
- export declare type BackoffLoopController = {
22
+ export type BackoffLoopController = {
23
23
  /**
24
24
  * backoff before next iteration
25
25
  */
@@ -29,11 +29,11 @@ export declare type BackoffLoopController = {
29
29
  */
30
30
  break: () => void;
31
31
  };
32
- export declare type BackoffLoopFunction = (controller: BackoffLoopController) => void | Promise<void>;
32
+ export type BackoffLoopFunction = (controller: BackoffLoopController) => void | Promise<void>;
33
33
  /**
34
34
  * @param continueToken token to continue loop immediately
35
35
  */
36
- export declare type BackoffGeneratorYield = (continueToken?: CancellationToken) => void;
36
+ export type BackoffGeneratorYield = (continueToken?: CancellationToken) => void;
37
37
  export declare class BackoffHelper {
38
38
  private readonly strategy;
39
39
  private readonly initialDelay;
@@ -1,4 +1,4 @@
1
- export declare type BenchmarkResult = {
1
+ export type BenchmarkResult = {
2
2
  operationsPerMillisecond: number;
3
3
  millisecondsPerOperation: number;
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import type { Comparator } from './sort';
2
- export declare type BinarySearchOptions = {
2
+ export type BinarySearchOptions = {
3
3
  /** minimum index to search at */
4
4
  min?: number;
5
5
  /** maximum index to search at */
@@ -1 +1 @@
1
- {"version":3,"file":"binary.js","sourceRoot":"","sources":["../../source/utils/binary.ts"],"names":[],"mappings":";;;AAAA,0CAA4C;AAE5C,+CAAsD;AAEtD;;;;GAIG;AACH,SAAgB,aAAa,CAAC,IAAgB,EAAE,QAAiB,KAAK;IACpE,IAAI,IAAA,2BAAa,EAAC,IAAI,CAAC,EAAE;QACvB,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;KACrC;IAED,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE;QACnF,OAAO,IAAI,CAAC,MAAM,CAAC;KACpB;IAED,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC;AAC/E,CAAC;AAVD,sCAUC;AAED;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,IAAgB,EAAE,QAAiB,KAAK;IACnE,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E,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IAC3F,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC;IAE1C,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;QAC1B,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC9C,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QACrC,YAAY,IAAI,UAAU,CAAC,UAAU,CAAC;KACvC;IAED,OAAO,IAAK,IAA8B,CAAC,MAAM,CAAC,MAAM,CAAiB,CAAC;AAC5E,CAAC;AApBD,wDAoBC"}
@@ -1,5 +1,5 @@
1
1
  import type { Observable, Observer, Subscribable, Subscription } from 'rxjs';
2
- export declare type ConnectConfig = {
2
+ export type ConnectConfig = {
3
3
  /**
4
4
  * Propagate parent set to child.
5
5
  * @default true
@@ -13,7 +13,7 @@ export interface CompressionResult {
13
13
  export interface DecompressionResult extends CompressionResult {
14
14
  toUtf8(): Promise<string>;
15
15
  }
16
- export declare type CompressionAlgorithm = 'gzip' | 'brotli' | 'deflate' | 'deflate-raw';
16
+ export type CompressionAlgorithm = 'gzip' | 'brotli' | 'deflate' | 'deflate-raw';
17
17
  export declare function compressString(input: string, algorithm: 'gzip' | 'deflate' | 'deflate-raw', options?: ZlibType.ZlibOptions): CompressionResult;
18
18
  export declare function compressString(input: string, algorithm: 'brotli', options?: ZlibType.BrotliOptions): CompressionResult;
19
19
  export declare function compressString(input: string, algorithm: CompressionAlgorithm, options?: ZlibType.ZlibOptions | ZlibType.BrotliOptions): CompressionResult;
@@ -1,15 +1,15 @@
1
1
  import type { BinaryData, TypedExtract } from "../types";
2
- export declare type AesMode = 'CBC' | 'CTR' | 'GCM' | 'KW';
3
- export declare type EcdsaCurve = 'P-256' | 'P-384' | 'P-521';
4
- export declare type HashAlgorithm = 'SHA-1' | 'SHA-256' | 'SHA-384' | 'SHA-512';
5
- export declare type SymmetricAlgorithm = `AES-${AesMode}`;
6
- export declare type AsymmetricAlgorithm = 'RSASSA-PKCS1-v1_5' | 'RSA-PSS' | 'RSA-OAEP' | 'ECDSA' | 'ECDH' | 'NODE-DSA' | 'NODE-DH' | 'NODE-ED25519' | 'NODE-ED448';
7
- export declare type CryptionAlgorithm = Parameters<typeof crypto.subtle.encrypt>[0];
8
- export declare type SignAlgorithm = Parameters<typeof crypto.subtle.sign>[0];
9
- export declare type KeyAlgorithm = Parameters<typeof crypto.subtle.generateKey>[0];
10
- export declare type KeyType = 'raw' | 'pkcs8' | 'spki' | 'jwk';
11
- export declare type Key = JsonWebKey | BinaryData;
12
- export declare type ScryptOptions = {
2
+ export type AesMode = 'CBC' | 'CTR' | 'GCM' | 'KW';
3
+ export type EcdsaCurve = 'P-256' | 'P-384' | 'P-521';
4
+ export type HashAlgorithm = 'SHA-1' | 'SHA-256' | 'SHA-384' | 'SHA-512';
5
+ export type SymmetricAlgorithm = `AES-${AesMode}`;
6
+ export type AsymmetricAlgorithm = 'RSASSA-PKCS1-v1_5' | 'RSA-PSS' | 'RSA-OAEP' | 'ECDSA' | 'ECDH' | 'NODE-DSA' | 'NODE-DH' | 'NODE-ED25519' | 'NODE-ED448';
7
+ export type CryptionAlgorithm = Parameters<typeof crypto.subtle.encrypt>[0];
8
+ export type SignAlgorithm = Parameters<typeof crypto.subtle.sign>[0];
9
+ export type KeyAlgorithm = Parameters<typeof crypto.subtle.generateKey>[0];
10
+ export type KeyType = 'raw' | 'pkcs8' | 'spki' | 'jwk';
11
+ export type Key = JsonWebKey | BinaryData;
12
+ export type ScryptOptions = {
13
13
  cost?: number;
14
14
  blockSize?: number;
15
15
  parallelization?: number;
@@ -1,33 +1,34 @@
1
1
  import type { DateObjectUnits, DateTimeJSOptions } from 'luxon';
2
2
  import { DateTime } from 'luxon';
3
- export declare type DateObject = {
3
+ export type DateObject = {
4
4
  year: number;
5
5
  month: number;
6
6
  day: number;
7
7
  };
8
- export declare type ZonedDateObject = DateObject & {
8
+ export type ZonedDateObject = DateObject & {
9
9
  zone: string;
10
10
  };
11
- export declare type TimeObject = {
11
+ export type TimeObject = {
12
12
  hour: number;
13
13
  minute: number;
14
14
  second: number;
15
15
  millisecond: number;
16
16
  };
17
- export declare type ZonedTimeObject = TimeObject & {
17
+ export type ZonedTimeObject = TimeObject & {
18
18
  zone: string;
19
19
  };
20
- export declare type SimpleDateTimeObject = DateObject & TimeObject;
21
- export declare type ZonedDateTimeObject = SimpleDateTimeObject & {
20
+ export type SimpleDateTimeObject = DateObject & TimeObject;
21
+ export type ZonedDateTimeObject = SimpleDateTimeObject & {
22
22
  zone: string;
23
23
  };
24
- export declare type NumericDateTime = {
24
+ export type NumericDateTime = {
25
25
  date: number;
26
26
  time: number;
27
27
  };
28
28
  export declare function now(): Date;
29
29
  export declare function currentTimestamp(): number;
30
30
  export declare function currentTimestampSeconds(): number;
31
+ export declare function timestampToTimestampSeconds(timestamp: number): number;
31
32
  export declare function currentDate(): number;
32
33
  export declare function currentTime(): number;
33
34
  export declare function timestampToNumericDate(timestamp: number): number;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.numericDateTimeToDateTime = exports.dateTimeToTime = exports.numericDateToDateTime = exports.dateTimeToNumericDate = exports.zonedDateObjectToDateTime = exports.numericDateTimeToTimestamp = exports.numericDateToDate = exports.numericDateToTimestamp = exports.timestampToNumericDateAndTime = exports.numericTimeToTimeObject = exports.timeObjectToNumericTime = exports.timestampToTime = exports.dateToNumericDate = exports.timestampToNumericDate = exports.currentTime = exports.currentDate = exports.currentTimestampSeconds = exports.currentTimestamp = exports.now = void 0;
3
+ exports.numericDateTimeToDateTime = exports.dateTimeToTime = exports.numericDateToDateTime = exports.dateTimeToNumericDate = exports.zonedDateObjectToDateTime = exports.numericDateTimeToTimestamp = exports.numericDateToDate = exports.numericDateToTimestamp = exports.timestampToNumericDateAndTime = exports.numericTimeToTimeObject = exports.timeObjectToNumericTime = exports.timestampToTime = exports.dateToNumericDate = exports.timestampToNumericDate = exports.currentTime = exports.currentDate = exports.timestampToTimestampSeconds = exports.currentTimestampSeconds = exports.currentTimestamp = exports.now = void 0;
4
4
  const luxon_1 = require("luxon");
5
5
  const units_1 = require("./units");
6
6
  function now() {
@@ -12,9 +12,13 @@ function currentTimestamp() {
12
12
  }
13
13
  exports.currentTimestamp = currentTimestamp;
14
14
  function currentTimestampSeconds() {
15
- return Math.floor(Date.now() / 1000);
15
+ return timestampToTimestampSeconds(currentTimestamp());
16
16
  }
17
17
  exports.currentTimestampSeconds = currentTimestampSeconds;
18
+ function timestampToTimestampSeconds(timestamp) {
19
+ return Math.floor(timestamp / 1000);
20
+ }
21
+ exports.timestampToTimestampSeconds = timestampToTimestampSeconds;
18
22
  function currentDate() {
19
23
  const timestamp = currentTimestamp();
20
24
  return timestampToNumericDate(timestamp);
@@ -1 +1 @@
1
- {"version":3,"file":"date-time.js","sourceRoot":"","sources":["../../source/utils/date-time.ts"],"names":[],"mappings":";;;AACA,iCAAiC;AACjC,mCAAgH;AAkChH,SAAgB,GAAG;IACjB,OAAO,IAAI,IAAI,EAAE,CAAC;AACpB,CAAC;AAFD,kBAEC;AAED,SAAgB,gBAAgB;IAC9B,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC;AACpB,CAAC;AAFD,4CAEC;AAED,SAAgB,uBAAuB;IACrC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;AACvC,CAAC;AAFD,0DAEC;AAED,SAAgB,WAAW;IACzB,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,OAAO,sBAAsB,CAAC,SAAS,CAAC,CAAC;AAC3C,CAAC;AAHD,kCAGC;AAED,SAAgB,WAAW;IACzB,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,OAAO,eAA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AC,CAAC,QAAQ,EAAE,CAAC;IAChF,OAAO,sBAAsB,CAAC,SAAS,CAAC,CAAC;AAC3C,CAAC;AAHD,sDAGC;AAED,SAAgB,qBAAqB,CAAC,WAAmB,EAAE,KAAuB,EAAE,OAA2B;IAC7G,MAAM,IAAI,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAC5C,OAAO,gBAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;AAC7D,CAAC;AAHD,sDAGC;AAED,SAAgB,cAAc,CAAC,QAAkB;IAC/C,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;AACvE,CAAC;AAFD,wCAEC;AAED,SAAgB,yBAAyB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAmB,EAAE,IAAa;IACtF,OAAO,qBAAqB,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;AACrF,CAAC;AAFD,8DAEC"}
package/utils/equals.d.ts CHANGED
@@ -7,13 +7,13 @@ declare const equalsSymbol: unique symbol;
7
7
  export declare const Equals: {
8
8
  readonly symbol: typeof equalsSymbol;
9
9
  };
10
- export declare type ArrayEqualsComparator<A, B> = (a: A, b: B) => boolean;
11
- export declare type ArrayEqualsOptions<A, B> = {
10
+ export type ArrayEqualsComparator<A, B> = (a: A, b: B) => boolean;
11
+ export type ArrayEqualsOptions<A, B> = {
12
12
  sort?: Comparator<A | B>;
13
13
  comparator?: ArrayEqualsComparator<A, B>;
14
14
  };
15
15
  export declare function arrayEquals<A, B>(a: readonly A[], b: readonly B[], options?: ArrayEqualsOptions<A, B>): boolean;
16
- export declare type EqualsOptions = {
16
+ export type EqualsOptions = {
17
17
  deep?: boolean;
18
18
  arrayDeep?: boolean;
19
19
  sortArray?: boolean;
@@ -1,4 +1,4 @@
1
- export declare type Factory<Key, Value> = (key: Key) => Value;
1
+ export type Factory<Key, Value> = (key: Key) => Value;
2
2
  /** same as {@link Map}, except that it will build the value with the provided factory on {@link get} if it doesnt exist */
3
3
  export declare class FactoryMap<K, V> implements Map<K, V> {
4
4
  private readonly factory;
@@ -1,5 +1,5 @@
1
1
  import type { UndefinableJson } from "../types";
2
- export declare type FormatErrorOptions = {
2
+ export type FormatErrorOptions = {
3
3
  /**
4
4
  * include all error properties beside name and message
5
5
  */
@@ -1,4 +1,4 @@
1
- export declare type MemoizeOptions = {
1
+ export type MemoizeOptions = {
2
2
  /** Use WeakMap instead of Map for caching. Can be used with object parameters only */
3
3
  weak?: boolean;
4
4
  };
@@ -26,7 +26,7 @@ export declare function parseFirstAndFamilyName(name: string): {
26
26
  firstName: string | undefined;
27
27
  familyName: string | undefined;
28
28
  };
29
- export declare type NormalizeTextOptions = {
29
+ export type NormalizeTextOptions = {
30
30
  /**
31
31
  * remove leading and trailing whitespace
32
32
  */