ctx-core 4.18.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/all/CacheControl_1hour_headers_/index.d.ts +5 -0
  2. package/all/CacheControl_1hour_headers_/index.js +10 -0
  3. package/all/CacheControl_5min_headers_/index.d.ts +5 -0
  4. package/all/CacheControl_5min_headers_/index.js +10 -0
  5. package/all/ContentType__is_binary_/index.d.ts +1 -0
  6. package/all/ContentType__is_binary_/index.js +9 -0
  7. package/all/ContentType_json_headers_/index.d.ts +5 -0
  8. package/all/ContentType_json_headers_/index.js +10 -0
  9. package/all/ContentType_svg_headers_/index.d.ts +5 -0
  10. package/all/ContentType_svg_headers_/index.js +10 -0
  11. package/all/a_in_idx_a_map/index.d.ts +1 -3
  12. package/all/a_item/index.d.ts +3 -9
  13. package/all/a_length/index.d.ts +4 -7
  14. package/all/a_nowrap/index.d.ts +1 -3
  15. package/all/a_present/index.d.ts +4 -7
  16. package/all/a_some/index.d.ts +1 -3
  17. package/all/and/index.d.ts +3 -9
  18. package/all/and_call/index.d.ts +4 -8
  19. package/all/andand/index.d.ts +4 -11
  20. package/all/andand_or/index.d.ts +6 -8
  21. package/all/andandfn/index.d.ts +3 -12
  22. package/all/apply/index.d.ts +2 -2
  23. package/all/arg_i0_a/index.d.ts +1 -1
  24. package/all/array_types/index.d.ts +21 -28
  25. package/all/assign_fn_key_a/index.d.ts +1 -3
  26. package/all/be/index.d.ts +5 -3
  27. package/all/be_/index.d.ts +69 -48
  28. package/all/be_/index.js +39 -76
  29. package/all/be_/index.test.ts +244 -121
  30. package/all/be_lock_memosig_triple/index.d.ts +16 -22
  31. package/all/be_lock_memosig_triple/index.test.ts +47 -36
  32. package/all/be_memo_pair/index.d.ts +14 -11
  33. package/all/be_memo_pair/index.js +1 -2
  34. package/all/be_memo_pair/index.test.ts +47 -31
  35. package/all/be_memosig_triple/index.d.ts +16 -22
  36. package/all/be_memosig_triple/index.test.ts +48 -34
  37. package/all/be_sig_triple/index.d.ts +16 -13
  38. package/all/be_sig_triple/index.js +2 -3
  39. package/all/be_sig_triple/index.test.ts +42 -29
  40. package/all/bind_apply/index.d.ts +3 -3
  41. package/all/bind_call/index.d.ts +10 -11
  42. package/all/bind_map_apply/index.d.ts +2 -2
  43. package/all/bind_map_call/index.d.ts +2 -2
  44. package/all/call/index.d.ts +3 -3
  45. package/all/call_assign/index.d.ts +2 -6
  46. package/all/call_fn_a/index.d.ts +4 -3
  47. package/all/call_or_fn/index.d.ts +1 -4
  48. package/all/chain/index.d.ts +4 -8
  49. package/all/chunk_aa/index.d.ts +3 -5
  50. package/all/clear_ctx/index.d.ts +1 -3
  51. package/all/combinators/index.d.ts +12 -49
  52. package/all/compact/index.d.ts +4 -7
  53. package/all/compact_a_ctx/index.d.ts +1 -3
  54. package/all/compare/index.d.ts +1 -3
  55. package/all/compose/index.d.ts +3 -3
  56. package/all/concat/index.d.ts +2 -6
  57. package/all/concat_truthy_a/index.d.ts +3 -4
  58. package/all/ctx/index.d.ts +18 -2
  59. package/all/ctx/index.js +20 -8
  60. package/all/ctx/index.test.ts +33 -7
  61. package/all/curry/index.d.ts +5 -7
  62. package/all/curry/index.js +6 -3
  63. package/all/debounce/index.d.ts +12 -12
  64. package/all/difference_a/index.d.ts +1 -3
  65. package/all/difference_by/index.d.ts +3 -4
  66. package/all/difference_set/index.d.ts +1 -5
  67. package/all/each/index.d.ts +5 -9
  68. package/all/ensure/index.d.ts +1 -3
  69. package/all/ensure__refresh/index.d.ts +1 -3
  70. package/all/eq/index.d.ts +4 -10
  71. package/all/eql/index.d.ts +3 -9
  72. package/all/eql_a/index.d.ts +1 -3
  73. package/all/eql_fn_a/index.d.ts +1 -3
  74. package/all/every/index.d.ts +3 -9
  75. package/all/exclude/index.d.ts +1 -4
  76. package/all/ext_R_mime/index.d.ts +86 -0
  77. package/all/ext_R_mime/index.js +86 -0
  78. package/all/falsy_async_guard/index.d.ts +3 -4
  79. package/all/falsy_guard/index.d.ts +4 -3
  80. package/all/fetch__template_pair/index.test.ts +5 -5
  81. package/all/filter/index.d.ts +4 -12
  82. package/all/find/index.d.ts +6 -10
  83. package/all/first/index.d.ts +2 -7
  84. package/all/flatten/index.d.ts +2 -6
  85. package/all/flip/index.d.ts +3 -3
  86. package/all/hasOwnProperty_pick/index.d.ts +4 -4
  87. package/all/head_arg_a/index.d.ts +4 -3
  88. package/all/http__headers__assign/index.d.ts +11 -0
  89. package/all/http__headers__assign/index.js +11 -0
  90. package/all/idx/index.d.ts +1 -3
  91. package/all/idx_reject/index.d.ts +3 -9
  92. package/all/idx_sort_a/index.d.ts +1 -3
  93. package/all/idx_sort_a__sort_idx_o/index.d.ts +1 -3
  94. package/all/idx_sort_r_a/index.d.ts +1 -3
  95. package/all/if_null_set_false/index.d.ts +1 -3
  96. package/all/ifelse/index.d.ts +5 -3
  97. package/all/iife/index.d.ts +3 -3
  98. package/all/index.d.ts +9 -0
  99. package/all/index.js +9 -0
  100. package/all/internal_server_error__throw/index.d.ts +5 -0
  101. package/all/internal_server_error__throw/index.js +7 -0
  102. package/all/intersection_a/index.d.ts +5 -6
  103. package/all/intersection_by/index.d.ts +3 -4
  104. package/all/intersection_set/index.d.ts +1 -3
  105. package/all/isArray/index.d.ts +2 -2
  106. package/all/last/index.d.ts +2 -7
  107. package/all/left_and/index.d.ts +1 -3
  108. package/all/left_or/index.d.ts +1 -3
  109. package/all/many_andand/index.d.ts +7 -6
  110. package/all/many_andand_or/index.d.ts +2 -8
  111. package/all/map/index.d.ts +4 -18
  112. package/all/map_andand/index.d.ts +3 -9
  113. package/all/map_andand_or/index.d.ts +1 -3
  114. package/all/map_andandfn/index.d.ts +2 -6
  115. package/all/map_apply/index.d.ts +5 -8
  116. package/all/map_call/index.d.ts +5 -8
  117. package/all/map_find/index.d.ts +3 -11
  118. package/all/map_fn/index.d.ts +1 -4
  119. package/all/map_obj/index.d.ts +3 -12
  120. package/all/map_obj_andand/index.d.ts +2 -8
  121. package/all/merge/index.d.ts +1 -4
  122. package/all/mixin/index.d.ts +1 -4
  123. package/all/neq/index.d.ts +2 -6
  124. package/all/neql/index.d.ts +2 -6
  125. package/all/noinit/index.d.ts +5 -8
  126. package/all/not/index.d.ts +3 -9
  127. package/all/notnot/index.d.ts +2 -4
  128. package/all/nullish__guard/index.d.ts +3 -4
  129. package/all/nullish__guard__async/index.d.ts +3 -4
  130. package/all/nullish__none/index.d.ts +1 -3
  131. package/all/o_a_present/index.d.ts +2 -6
  132. package/all/o_some/index.d.ts +1 -3
  133. package/all/offset_destructure_aa/index.d.ts +1 -3
  134. package/all/offset_i_slice/index.d.ts +2 -6
  135. package/all/one_andand/index.d.ts +3 -3
  136. package/all/one_andand_or/index.d.ts +3 -5
  137. package/all/or/index.d.ts +6 -17
  138. package/all/or_property/index.d.ts +1 -5
  139. package/all/promise_timeout/index.d.ts +4 -4
  140. package/all/prototype_mixin/index.d.ts +4 -3
  141. package/all/prototype_mixin/index.js +3 -3
  142. package/all/push/index.d.ts +2 -6
  143. package/all/r_val_a/index.d.ts +2 -6
  144. package/all/rank/index.d.ts +3 -4
  145. package/all/reduce/index.d.ts +10 -23
  146. package/all/reject/index.d.ts +7 -14
  147. package/all/remove/index.d.ts +2 -6
  148. package/all/remove_idx/index.d.ts +4 -4
  149. package/all/resolver_curry/index.d.ts +2 -2
  150. package/all/reverse/index.d.ts +2 -10
  151. package/all/right_and/index.d.ts +1 -3
  152. package/all/right_or/index.d.ts +1 -3
  153. package/all/rmemo/index.js +3 -3
  154. package/all/rmemo__wait/index.test.ts +1 -1
  155. package/all/run/index.d.ts +1 -4
  156. package/all/selector_splice/index.d.ts +1 -3
  157. package/all/slice/index.d.ts +5 -15
  158. package/all/slice_arg_a/index.d.ts +3 -12
  159. package/all/slice_arg_spread_a/index.d.ts +3 -11
  160. package/all/sort/index.d.ts +4 -14
  161. package/all/sort_a/index.d.ts +2 -6
  162. package/all/sort_idx_a/index.d.ts +2 -6
  163. package/all/sort_idx_o/index.d.ts +2 -6
  164. package/all/sort_val_a/index.d.ts +2 -6
  165. package/all/sort_val_a__transition_idx_a/index.d.ts +4 -12
  166. package/all/sort_val_a__transition_idx_a/index.js +4 -2
  167. package/all/sparse_a/index.d.ts +1 -3
  168. package/all/splice/index.d.ts +2 -6
  169. package/all/spread/index.d.ts +2 -6
  170. package/all/tap/index.d.ts +1 -3
  171. package/all/test/index.d.ts +12 -0
  172. package/all/test/index.js +1 -0
  173. package/all/throttle/index.d.ts +2 -2
  174. package/all/throttle/index.js +8 -7
  175. package/all/tick/index.d.ts +1 -5
  176. package/all/timeout_promise/index.d.ts +1 -5
  177. package/all/times/index.d.ts +1 -5
  178. package/all/tup/index.d.ts +22 -6
  179. package/all/union_a/index.d.ts +1 -3
  180. package/all/union_set/index.d.ts +1 -5
  181. package/all/val/index.d.ts +1 -3
  182. package/all/value_r/index.d.ts +2 -6
  183. package/all/weak_r/index.d.ts +3 -3
  184. package/all/wrap_a/index.d.ts +4 -12
  185. package/all/wrap_a_item/index.d.ts +4 -3
  186. package/all/wrap_aa/index.d.ts +2 -8
  187. package/all/wrap_aa_item/index.d.ts +4 -3
  188. package/all/wrap_concat/index.d.ts +1 -5
  189. package/http/index.d.ts +8 -0
  190. package/http/index.js +8 -0
  191. package/package.json +35 -10
  192. package/test/index.d.ts +1 -0
  193. package/test/index.js +1 -0
@@ -2,16 +2,10 @@ import type { a_nowrap_T } from '../a_nowrap/index.js'
2
2
  /**
3
3
  * Returns not applied to the spread of `in_value_a`
4
4
  */
5
- export declare function not<
6
- I extends unknown = unknown
7
- >(in_value_a:a_nowrap_T<I>):boolean
5
+ export declare function not<I>(in_value_a:a_nowrap_T<I>):boolean
8
6
  /**
9
7
  * Returns function that calls [not](#not) with [wrap_concat](#wrap_concat) of the arguments.
10
8
  */
11
- export declare function not_<
12
- I extends unknown = unknown
13
- >(a_unwrap:a_nowrap_T<I>):not_T<I>
14
- export declare type not_T<
15
- I extends unknown = unknown
16
- > = (val_a:I[])=>boolean
9
+ export declare function not_<I>(a_unwrap:a_nowrap_T<I>):not_T<I>
10
+ export declare type not_T<I> = (val_a:I[])=>boolean
17
11
  export { not_ as _not, }
@@ -5,8 +5,6 @@ export declare function notnot<I>(in_value_a:I|I[]):boolean
5
5
  /**
6
6
  * Returns function that calls [notnot](#notnot) with [wrap_concat](#wrap_concat) of the arguments.
7
7
  */
8
- export declare function notnot_<
9
- Val extends unknown = unknown
10
- >(in_value_a:Val|Val[]):(val:Val)=>boolean
11
- export declare type notnot_T<Val extends unknown = unknown> = (val:Val)=>boolean
8
+ export declare function notnot_<Val>(in_value_a:Val|Val[]):(val:Val)=>boolean
9
+ export declare type notnot_T<Val> = (val:Val)=>boolean
12
10
  export { notnot_ as _notnot, }
@@ -1,8 +1,7 @@
1
1
  import type { nullish } from '../nullish/index.js'
2
- export declare function nullish__guard<
3
- Val extends unknown = unknown
4
- >(
5
- label:string, ...fn_a:(()=>(nullish|Val))[]
2
+ export declare function nullish__guard<Val>(
3
+ label:string,
4
+ ...fn_a:(()=>(nullish|Val))[]
6
5
  ):Val|nullish
7
6
  export {
8
7
  nullish__guard as nullish_guard,
@@ -1,8 +1,7 @@
1
1
  import type { nullish } from '../nullish/index.js'
2
- export declare function nullish__guard__async<
3
- Val extends unknown = unknown
4
- >(
5
- label:string, ...fn_a:(()=>Promise<nullish|Val>)[]
2
+ export declare function nullish__guard__async<Val>(
3
+ label:string,
4
+ ...fn_a:(()=>Promise<nullish|Val>)[]
6
5
  ):Promise<Val>
7
6
  export {
8
7
  nullish__guard__async as nullish_async_guard,
@@ -1,8 +1,6 @@
1
1
  import type { nullish } from '../nullish/index.js'
2
2
  import type { TupleExclude } from '../tup/index.js'
3
- export function nullish__none_<
4
- T extends unknown[], U
5
- >(
3
+ export function nullish__none_<T extends unknown[], U>(
6
4
  $:T,
7
5
  _:(...$:TupleExclude<T, nullish>)=>U,
8
6
  onnullish?:(nullish:nullish)=>unknown
@@ -4,12 +4,8 @@ import type { filter_o_T } from '../filter_o/index.js'
4
4
  * boolean of whether the array has items present
5
5
  */
6
6
  export declare function o_a_present<
7
- Val extends unknown = unknown,
8
- Obj extends {
9
- [key:string]:Val[];
10
- } = {
11
- [key:string]:Val[];
12
- }
7
+ Val,
8
+ Obj extends { [key:string]:Val[] } = { [key:string]:Val[] }
13
9
  >(o:Obj):filter_o_T|undefined
14
10
  export {
15
11
  o_a_present as r_a_present,
@@ -5,9 +5,7 @@ import type { maybe } from '../maybe/index.js'
5
5
  * some({foo: 9, bar: 10}, (value, key) => value === 10) // returns true
6
6
  * some({baz: 11, quux: 12}, (value, key) => value === 10) // returns false
7
7
  */
8
- export declare function o_some<
9
- I extends unknown = unknown
10
- >(
8
+ export declare function o_some<I>(
11
9
  obj:Record<string, I>,
12
10
  compare_some:(obj:I, key:string)=>unknown
13
11
  ):maybe<boolean>
@@ -1,9 +1,7 @@
1
1
  /**
2
2
  * Returns 2d Array where `source_a` is destructured into subarray of length `offset`.
3
3
  */
4
- export declare function offset_destructure_aa_<
5
- I extends unknown = unknown
6
- >(
4
+ export declare function offset_destructure_aa_<I>(
7
5
  source_a:readonly I[], offset?:number
8
6
  ):I[][]
9
7
  export {
@@ -1,16 +1,12 @@
1
1
  /**
2
2
  * Returns an Array from slicing an array from an array's offset from position i
3
3
  */
4
- export declare function offset_i_slice<
5
- I extends unknown = unknown
6
- >(
4
+ export declare function offset_i_slice<I>(
7
5
  a:readonly I[],
8
6
  i:number,
9
7
  offset?:number
10
8
  ):I[]
11
- export declare function maybe_offset_i_slice<
12
- I extends unknown = unknown, Or = null
13
- >(
9
+ export declare function maybe_offset_i_slice<I, Or = null>(
14
10
  maybe_a:readonly I[]|undefined,
15
11
  i:number,
16
12
  offset?:number,
@@ -2,9 +2,9 @@ import type { andand_key_T } from '../andand/index.js'
2
2
  /**
3
3
  * Returns a function that calls `andand(obj, ...name_a)`
4
4
  */
5
- export declare function one_andand_<
6
- Val extends unknown = unknown, Out extends unknown = unknown
7
- >(...name_a:andand_key_T<Val>[]):(obj:Val)=>Out|null
5
+ export declare function one_andand_<Val, Out>(
6
+ ...name_a:andand_key_T<Val>[]
7
+ ):(obj:Val)=>Out|null
8
8
  export {
9
9
  one_andand_ as andand_,
10
10
  one_andand_ as _one_andand,
@@ -3,11 +3,9 @@ import type { andand_or_T } from '../andand_or/index.js'
3
3
  /**
4
4
  * Returns function that calls `andand_or(obj, name_a, or_fn)`
5
5
  */
6
- export declare function one_andand_or_<
7
- In extends unknown = unknown,
8
- Out extends unknown = unknown
9
- >(
10
- name_a:andand_key_T<In>[], or_:andand_or_T<In, Out>
6
+ export declare function one_andand_or_<In, Out>(
7
+ name_a:andand_key_T<In>[],
8
+ or_:andand_or_T<In, Out>
11
9
  ):(obj:In)=>Out
12
10
  export {
13
11
  one_andand_or_ as andand_or_,
package/all/or/index.d.ts CHANGED
@@ -3,37 +3,26 @@ import type { wrap_a_T } from '../wrap_a/index.js'
3
3
  /**
4
4
  * Returns first truthy or last item in `a_unwrap`.
5
5
  */
6
- export declare function or<
7
- Val extends unknown = unknown
8
- >(
6
+ export declare function or<Val>(
9
7
  a_unwrap:Val|wrap_a_T<Val>
10
8
  ):Val|undefined
11
9
  /**
12
10
  * Returns first truthy or last item call or value in `a_unwrap`.
13
11
  */
14
- export declare function or_<
15
- Val extends unknown,
16
- Ret extends unknown
17
- >(a_unwrap:a_nowrap_T<Val>):or_T<Val, Ret>
18
- export interface or_fn_callable_T<I extends unknown = unknown> {
12
+ export declare function or_<Val, Ret>(a_unwrap:a_nowrap_T<Val>):or_T<Val, Ret>
13
+ export interface or_fn_callable_T<I> {
19
14
  (...args:wrap_a_T<I>):I
20
15
  }
21
- export declare type or_T<Val extends unknown, Ret extends unknown> =
16
+ export declare type or_T<Val, Ret> =
22
17
  (Val extends or_fn_callable_T<Val> ? Ret : Val)
23
18
  |undefined
24
19
  /**
25
20
  * Returns function that returns first truthy or last item call or value in `a_unwrap`.
26
21
  */
27
- export declare function or_fn_<
28
- Val extends unknown,
29
- Ret extends unknown
30
- >(
22
+ export declare function or_fn_<Val, Ret>(
31
23
  a_unwrap:a_nowrap_T<Val>
32
24
  ):(val:Val)=>or_T<Val, Ret>
33
- export declare type or_fn_T<
34
- Val extends unknown,
35
- Ret extends unknown
36
- > = (val:Val)=>or_T<Val, Ret>
25
+ export declare type or_fn_T<Val, Ret> = (val:Val)=>or_T<Val, Ret>
37
26
  export {
38
27
  or_ as on__fn,
39
28
  or_fn_ as _or__fn,
@@ -1,9 +1,5 @@
1
1
  /**
2
2
  * Returns first obj property that is truthy
3
3
  */
4
- export declare function or_property<
5
- I extends unknown = unknown
6
- >(
7
- obj:I, name_a:string[]
8
- ):I[keyof I]|undefined
4
+ export declare function or_property<I>(obj:I, name_a:string[]):I[keyof I]|undefined
9
5
  export { or_property as or__property }
@@ -1,5 +1,5 @@
1
- export declare function promise_timeout<
2
- O extends unknown = unknown
3
- >(
4
- promise:(()=>Promise<O>)|Promise<O>, ms:number, error?:Error
1
+ export declare function promise_timeout<O>(
2
+ promise:(()=>Promise<O>)|Promise<O>,
3
+ ms:number,
4
+ error?:Error
5
5
  ):Promise<O>
@@ -1,7 +1,8 @@
1
1
  export declare function prototype_mixin<
2
- target_T extends Function&{ prototype:object },
3
- source_T extends Function&{ prototype:object },
4
- out_T extends Function&{ prototype:object } = target_T&{ prototype:target_T['prototype']&source_T['prototype'] },
2
+ target_T extends { prototype:object },
3
+ source_T extends { prototype:object },
4
+ out_T extends { prototype:object } =
5
+ target_T&{ prototype:target_T['prototype']&source_T['prototype'] },
5
6
  >(
6
7
  target:target_T,
7
8
  source:source_T
@@ -1,7 +1,7 @@
1
1
  /**
2
- * @param {Function&{ prototype:object }}target
3
- * @param {Function&{ prototype:object }}source
4
- * @returns {Function&{ prototype:object }}
2
+ * @param {{ prototype:object }}target
3
+ * @param {{ prototype:object }}source
4
+ * @returns {{ prototype:object }}
5
5
  */
6
6
  export function prototype_mixin(target, source) {
7
7
  const target_prototype = target.prototype
@@ -1,15 +1,11 @@
1
1
  /**
2
2
  * Calls push on an array
3
3
  */
4
- export declare function push<
5
- I extends unknown = unknown
6
- >(
4
+ export declare function push<I>(
7
5
  a:readonly I[],
8
6
  ...arg_a:readonly I[]
9
7
  ):number
10
- export declare function maybe_push<
11
- I extends unknown = unknown
12
- >(
8
+ export declare function maybe_push<I>(
13
9
  maybe_a:readonly I[]|undefined,
14
10
  ...arg_a:readonly I[]
15
11
  ):number|undefined
@@ -1,15 +1,11 @@
1
1
  /**
2
2
  * Returns Array of `obj[key_a[]]`.
3
3
  */
4
- export declare function r_val_a_<
5
- Val extends unknown = unknown
6
- >(
4
+ export declare function r_val_a_<Val>(
7
5
  obj:Record<string, Val>,
8
6
  key_a?:readonly string[]
9
7
  ):Val[]
10
- export declare function maybe_r_val_a_<
11
- Val extends unknown = unknown, Or = null
12
- >(
8
+ export declare function maybe_r_val_a_<Val, Or = null>(
13
9
  obj:Record<string, Val>|undefined,
14
10
  key_a?:readonly string[],
15
11
  or?:Or
@@ -2,9 +2,8 @@ import type { compare_1_T } from '../array_types/index.js'
2
2
  /**
3
3
  * Returns the rank of the items where the compare function === 0
4
4
  */
5
- export declare function rank<
6
- I extends unknown = unknown
7
- >(
8
- a:readonly I[], compare_1:compare_1_T
5
+ export declare function rank<I>(
6
+ a:readonly I[],
7
+ compare_1:compare_1_T
9
8
  ):number
10
9
  export { rank as rank__a1, }
@@ -1,23 +1,18 @@
1
1
  /**
2
2
  * Returns reduced `memo` iterating over `a` with `fn(memo, a[], i, a)`.
3
3
  */
4
- export declare function reduce<
5
- I extends unknown = unknown, O extends unknown = unknown
6
- >(
4
+ export declare function reduce<I, O>(
7
5
  a:readonly I[],
8
6
  fn:reduce_fn_T<I, O>,
9
7
  memo:O
10
8
  ):O
11
- export declare type reduce_fn_T<
12
- I extends unknown = unknown, O extends unknown = unknown
13
- > = (
14
- memo:O, item:I, idx:number, a:readonly I[]
9
+ export declare type reduce_fn_T<I, O> = (
10
+ memo:O,
11
+ item:I,
12
+ idx:number,
13
+ a:readonly I[]
15
14
  )=>O
16
- export declare function maybe_reduce<
17
- I extends unknown = unknown,
18
- O extends unknown = unknown,
19
- Or = null
20
- >(
15
+ export declare function maybe_reduce<I, O, Or = null>(
21
16
  maybe_a:readonly I[]|undefined,
22
17
  fn:reduce_fn_T<I, O>,
23
18
  memo:O,
@@ -26,20 +21,12 @@ export declare function maybe_reduce<
26
21
  /**
27
22
  * Return Function that returns from `reduce` with `fn` and factory `memo_(a)`.
28
23
  */
29
- export declare function reduce_<
30
- I extends unknown = unknown, O extends unknown = unknown
31
- >(
24
+ export declare function reduce_<I, O>(
32
25
  fn:reduce_fn_T<I, O>, memo_:memo_fn_T<I, O>
33
26
  ):(a:readonly I[], memo:O)=>O
34
- export declare type memo_fn_T<
35
- I extends unknown = unknown, O extends unknown = unknown
36
- > =
27
+ export declare type memo_fn_T<I, O> =
37
28
  (a:readonly I[])=>O
38
- export declare function maybe_reduce_<
39
- I extends unknown = unknown,
40
- O extends unknown = unknown,
41
- Or = null
42
- >(
29
+ export declare function maybe_reduce_<I, O, Or = null>(
43
30
  fn:reduce_fn_T<I, O|undefined>,
44
31
  memo_fn:memo_fn_T<I, O>|undefined,
45
32
  or?:Or
@@ -2,14 +2,13 @@ import type { is_match__T } from '../array_types/index.js'
2
2
  /**
3
3
  * Returns Array of items not rejected by `fn`.
4
4
  */
5
- export declare function reject<
6
- Val extends unknown = unknown, Out extends unknown = readonly Val[]
7
- >(
8
- a:readonly Val[], is_match_:is_match__T<Val>
5
+ export declare function reject<Val, Out = readonly Val[]>(
6
+ a:readonly Val[],
7
+ is_match_:is_match__T<Val>
9
8
  ):Out
10
9
  export declare function maybe_reject<
11
- Val extends unknown = unknown,
12
- Out extends unknown = readonly Val[],
10
+ Val,
11
+ Out = readonly Val[],
13
12
  Or = null
14
13
  >(
15
14
  maybe_a:readonly Val[]|undefined,
@@ -19,16 +18,10 @@ export declare function maybe_reject<
19
18
  /**
20
19
  * Returns function that returns value from [reject](#reject) with `fn` argument.
21
20
  */
22
- export declare function reject_<
23
- I extends unknown = unknown, O extends unknown = readonly I[]
24
- >(
21
+ export declare function reject_<I, O = readonly I[]>(
25
22
  is_match_:is_match__T<I>
26
23
  ):(a:readonly I[])=>O
27
- export declare function maybe_reject_<
28
- I extends unknown = unknown,
29
- O extends unknown = readonly I[],
30
- Or = null
31
- >(
24
+ export declare function maybe_reject_<I, O = readonly I[], Or = null>(
32
25
  is_match_:is_match__T<I>,
33
26
  or?:Or
34
27
  ):(a:readonly I[]|undefined)=>O|Or
@@ -1,15 +1,11 @@
1
1
  /**
2
2
  * Remove each `...item_a` from `a`.
3
3
  */
4
- export declare function remove<
5
- I extends unknown = unknown, O extends unknown = readonly I[]
6
- >(
4
+ export declare function remove<I, O = readonly I[]>(
7
5
  a:readonly I[],
8
6
  ...item_a:readonly I[]
9
7
  ):O
10
- export declare function maybe_remove<
11
- I extends unknown = unknown, O extends unknown = readonly I[]
12
- >(
8
+ export declare function maybe_remove<I, O = readonly I[]>(
13
9
  maybe_a:readonly I[]|undefined,
14
10
  ...item_a:readonly I[]
15
11
  ):O|undefined
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Remove `count = 1` items from `a` at position `idx`.
3
3
  */
4
- export declare function remove_idx<
5
- I extends unknown = unknown, O extends unknown = readonly I[]
6
- >(
7
- a:readonly I[], idx:number, count?:number
4
+ export declare function remove_idx<I, O = readonly I[]>(
5
+ a:readonly I[],
6
+ idx:number,
7
+ count?:number
8
8
  ):O
9
9
  export {
10
10
  remove_idx as remove__idx,
@@ -1,6 +1,6 @@
1
- export type resolver_curry_T<ResolverArg extends unknown = unknown> = (
1
+ export type resolver_curry_T<ResolverArg> = (
2
2
  ...resolver_arg_a:ResolverArg[]
3
3
  )=>resolver_curry_T<ResolverArg>
4
- export type append_current_T<ResolverArg extends unknown = unknown> = (
4
+ export type append_current_T<ResolverArg> = (
5
5
  local:ResolverArg[], arg_a:ResolverArg[]
6
6
  )=>any
@@ -1,16 +1,8 @@
1
1
  /**
2
2
  * Reverses the order of items in `in_a` by mutating `in_a`.
3
3
  */
4
- export declare function reverse<
5
- I extends unknown = unknown, O extends unknown = readonly I[]
6
- >(
7
- in_a:readonly I[]
8
- ):O
9
- export declare function maybe_reverse<
10
- I extends unknown = unknown,
11
- O extends unknown = readonly I[],
12
- Or = null
13
- >(
4
+ export declare function reverse<I, O = readonly I[]>(in_a:readonly I[]):O
5
+ export declare function maybe_reverse<I, O = readonly I[], Or = null>(
14
6
  maybe_a:readonly I[]|undefined,
15
7
  or?:Or
16
8
  ):O|Or
@@ -3,9 +3,7 @@ import type { falsy } from '../falsy/index.js'
3
3
  /**
4
4
  * Returns function that returns the first falsy from `value` or `a_unwrap` or the last value of `a_unwrap`.
5
5
  */
6
- export declare function right_and_<
7
- Val extends unknown = unknown
8
- >(
6
+ export declare function right_and_<Val>(
9
7
  a_unwrap:a_nowrap_T<Val>
10
8
  ):(val:Val)=>Val|falsy
11
9
  export {
@@ -2,9 +2,7 @@ import type { a_nowrap_T } from '../a_nowrap/index.js'
2
2
  /**
3
3
  * Returns function that returns first truthy or last item in `a_unwrap`.
4
4
  */
5
- export declare function right_or_<
6
- Val extends unknown = unknown
7
- >(
5
+ export declare function right_or_<Val>(
8
6
  a_unwrap:a_nowrap_T<Val>
9
7
  ):(fn_a_unwrap:Val)=>Val|undefined
10
8
  export {
@@ -15,12 +15,12 @@ export function memo_(memo_def, ...subscriber_a) {
15
15
  memo.f()
16
16
  }
17
17
  if (cur_memo) {
18
- if (!~memo.memor.indexOf(cur_memo.r ||= new WeakRef(cur_memo.f))) memo.memor.push(cur_memo.r)
18
+ if (!memo.memor.includes(cur_memo.r ||= new WeakRef(cur_memo.f))) memo.memor.push(cur_memo.r)
19
19
  if (cur_memo.f.l < memo.f.l + 1) cur_memo.f.l = memo.f.l + 1
20
20
  // conditional in r calls this r_memo
21
21
  cur_memo.f.s.push(memo)
22
22
  // prevent this rmemo from GC while cur_memo is still active
23
- if (!~cur_memo.f.S.indexOf(memo)) cur_memo.f.S.push(memo)
23
+ if (!cur_memo.f.S.includes(memo)) cur_memo.f.S.push(memo)
24
24
  }
25
25
  return memo.val
26
26
  }
@@ -32,7 +32,7 @@ export function memo_(memo_def, ...subscriber_a) {
32
32
  run_queue = !queue.size
33
33
  memo.memor = memo.memor.filter(r=>{
34
34
  r = r.deref()
35
- if (r && ~r.s.indexOf(memo)) { // if conditional r refresh calls this r_memo, add to queue
35
+ if (r && r.s.includes(memo)) { // if conditional r refresh calls this r_memo, add to queue
36
36
  queue.add(r)
37
37
  }
38
38
  return r
@@ -17,7 +17,7 @@ test('rmemo__wait', async ()=>{
17
17
  subject$._ = 1
18
18
  equal(subject, -1)
19
19
  equal(subject$(), 1)
20
- }).catch($=>console.trace($))
20
+ })
21
21
  equal(subject, 1)
22
22
  })
23
23
  test.run()
@@ -1,7 +1,4 @@
1
- export declare function run<
2
- O extends unknown = unknown,
3
- A extends any[] = any[]
4
- >(
1
+ export declare function run<O, A extends unknown[] = unknown[]>(
5
2
  fn:(...arg_a:A)=>O,
6
3
  ...arg_a:A
7
4
  ):O
@@ -1,9 +1,7 @@
1
1
  /**
2
2
  * splice out any `array` elements matching `selector`
3
3
  */
4
- export declare function selector_splice<
5
- I extends unknown = unknown, O extends unknown = readonly I[]
6
- >(
4
+ export declare function selector_splice<I, O extends unknown[] = readonly I[]>(
7
5
  a:readonly I[],
8
6
  selector:(v:I, i:number, a:readonly I[])=>I
9
7
  ):O
@@ -1,18 +1,12 @@
1
1
  /**
2
2
  * Calls slice on a
3
3
  */
4
- export declare function slice<
5
- I extends unknown = unknown, O extends unknown = readonly I[]
6
- >(
7
- a:readonly I[],
4
+ export declare function slice<I, O extends unknown[] = readonly I[]>(
5
+ a:readonly I[],
8
6
  begin_idx?:number,
9
7
  end_idx?:number
10
8
  ):O
11
- export declare function maybe_slice<
12
- I extends unknown = unknown,
13
- O extends unknown = readonly I[],
14
- Or = null
15
- >(
9
+ export declare function maybe_slice<I, O extends unknown[] = readonly I[], Or = null>(
16
10
  maybe_a:readonly I[]|undefined,
17
11
  begin_idx?:number,
18
12
  end_idx?:number,
@@ -21,14 +15,10 @@ export declare function maybe_slice<
21
15
  /**
22
16
  * Returns a `slice` function with the given `...arg_a` that takes a Array `a` as it's argument.
23
17
  */
24
- export declare function slice_<
25
- I extends unknown = unknown
26
- >(
18
+ export declare function slice_<I>(
27
19
  begin_idx?:number, end_idx?:number
28
20
  ):(a:readonly I[])=>I[]
29
- export declare function maybe_slice_<
30
- I extends unknown = unknown, Or = null
31
- >(
21
+ export declare function maybe_slice_<I, Or = null>(
32
22
  begin_idx?:number, end_idx?:number, or?:Or
33
23
  ):(maybe_a:readonly I[]|undefined)=>I[]|Or
34
24
  export {
@@ -2,22 +2,13 @@ import type { a_nowrap_T } from '../a_nowrap/index.js'
2
2
  /**
3
3
  * Returns a function where the arguments to the wrapped function are sliced with begin_idx & end_idx.
4
4
  */
5
- export declare function slice_arg_a_<
6
- In extends unknown = unknown,
7
- Out extends unknown[] = unknown[]
8
- >(
5
+ export declare function slice_arg_a_<In, Out extends unknown[] = unknown[]>(
9
6
  fn:slice_arg_a_fn_T<In, Out>, begin_idx?:number, end_idx?:number
10
7
  ):slice_arg_a_T<In, Out>
11
- export declare type slice_arg_a_fn_T<
12
- In extends unknown = unknown,
13
- Out extends unknown[] = unknown[]
14
- > = (
8
+ export declare type slice_arg_a_fn_T<In, Out extends unknown[] = unknown[]> = (
15
9
  arg_a:a_nowrap_T<In>
16
10
  )=>Out
17
- export declare type slice_arg_a_T<
18
- In extends unknown = unknown,
19
- Out extends unknown[] = unknown[]
20
- > = (
11
+ export declare type slice_arg_a_T<In, Out extends unknown[] = unknown[]> = (
21
12
  arg_a:a_nowrap_T<In>
22
13
  )=>Out
23
14
  export {
@@ -1,10 +1,7 @@
1
1
  /**
2
2
  * Returns a function that calls fn passing the arguments sliced by slice_arg_a.
3
3
  */
4
- export declare function slice_arg_spread_a_<
5
- In extends unknown[] = unknown[],
6
- Out extends unknown = unknown,
7
- >(
4
+ export declare function slice_arg_spread_a_<In extends unknown[] = unknown[], Out = unknown>(
8
5
  fn:slice_arg_spread_a__arg__T<In, Out>,
9
6
  begin_idx?:number,
10
7
  end_idx?:number
@@ -14,16 +11,11 @@ export {
14
11
  slice_arg_spread_a_ as slice_arg_a1,
15
12
  slice_arg_spread_a_ as slice__a1__arg,
16
13
  }
17
- export declare type slice_arg_spread_a__arg__T<
18
- In extends unknown[] = unknown[],
19
- Out extends unknown = unknown
20
- > = (
14
+ export declare type slice_arg_spread_a__arg__T<In extends unknown[] = unknown[], Out = unknown> = (
21
15
  arg_a:In[number][]
22
16
  )=>Out
23
17
  export declare type slice_arg_spread_a__arg_fn_T = slice_arg_spread_a__arg__T
24
- export declare type slice_arg_spread_a___ret_T<
25
- In extends unknown[] = unknown[],
26
- Out extends unknown = unknown> = (
18
+ export declare type slice_arg_spread_a___ret_T<In extends unknown[] = unknown[], Out = unknown> = (
27
19
  ...arg_a:In
28
20
  )=>Out
29
21
  export declare type slice_arg_spread_a__ret_T = slice_arg_spread_a__arg__T