@ndriadev/futurable 2.1.1 → 2.2.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.
package/README.md CHANGED
@@ -41,6 +41,7 @@
41
41
  - [Futurable.any](#futurableanyvalues-t-signal-abortsignal)
42
42
  - [Futurable.race](#futurableracevalues-t-signal-abortsignal)
43
43
  - [Futurable.polling](#futurablepollingvalue--futurable--interval-signal-interval-number-signal-abortsignal)
44
+ - [Futurable.withResolvers](#futurablewithresolverssignal-abortsignal)
44
45
  - [ToDo](#TODO)
45
46
  - [License](#License)
46
47
 
@@ -136,6 +137,7 @@ They are the following:
136
137
  - [Futurable.any](#futurableanyvalues-t-signal-abortsignal)
137
138
  - [Futurable.race](#futurableracevalues-t-signal-abortsignal)
138
139
  - [Futurable.polling](#futurablepollingvalue--futurable--interval-signal-interval-number-signal-abortsignal)
140
+ - [Futurable.withResolvers](#futurablewithresolverssignal-abortsignal)
139
141
 
140
142
  ### constructor(executor: FuturableExecutor<T>, signal?: AbortSignal)
141
143
  Futurable is instantiable like a classic Promise.
@@ -357,7 +359,7 @@ async function op() {
357
359
  ```
358
360
  --->
359
361
  ### futurizable(promise: Promise | (val => Promise))
360
- Takes a promise and transforms it into a futurizable. Promise can be also a function that receives value from futurable chaining as parameter.
362
+ Takes a promise and transforms it into a futurable. Promise can be also a function that receives value from futurable chaining as parameter.
361
363
 
362
364
  *Example*
363
365
  ```javascript
@@ -464,7 +466,7 @@ Futurable.futurizable({promise: /*promise to futurizable*/, signal: controller.s
464
466
  ```
465
467
 
466
468
  ### Futurable.all(values: T, signal?: AbortSignal)
467
- Extension of the static method all with cancellation support.
469
+ Extension of the static method _all_ with cancellation support.
468
470
 
469
471
  *Example*
470
472
  ```javascript
@@ -496,7 +498,7 @@ f.cancel();
496
498
  ```
497
499
 
498
500
  ### Futurable.allSettled(values: T, signal?: AbortSignal)
499
- Extension of the static method allSettled with cancellation support.
501
+ Extension of the static method _allSettled_ with cancellation support.
500
502
 
501
503
  *Example*
502
504
  ```javascript
@@ -528,7 +530,7 @@ f.cancel();
528
530
  ```
529
531
 
530
532
  ### Futurable.any(values: T, signal?: AbortSignal)
531
- Extension of the static method any with cancellation support.
533
+ Extension of the static method _any_ with cancellation support.
532
534
 
533
535
  *Example*
534
536
  ```javascript
@@ -559,7 +561,7 @@ f.cancel();
559
561
  ```
560
562
 
561
563
  ### Futurable.race(values: T, signal?: AbortSignal)
562
- Extension of the static method race with cancellation support.
564
+ Extension of the static method _race_ with cancellation support.
563
565
 
564
566
  *Example*
565
567
  ```javascript
@@ -603,8 +605,23 @@ polling.catch(err => console.error(err));
603
605
  polling.cancel();
604
606
  ```
605
607
 
608
+ ### Futurable.withResolvers<T>(signal?: AbortSignal)
609
+ Extension of static method _withResolvers_ with support of _cancel_ function and _utils_ object of Futurable.
610
+
611
+ *Example*
612
+ ```javascript
613
+ //...code
614
+ const {futurable, resolve, reject} = Futurable.withResolvers();
615
+
616
+ //...code
617
+
618
+ const result = await futurable;
619
+
620
+ //...code
621
+ resolve("resolved");
622
+ ```
623
+
606
624
  # ToDo
607
- - Think about the possibility of making a static method that returns an object with the futurable, resolve, reject, utils properties inside to be used as done for usePromiser.
608
625
  - Extends fetch api support to third library like axios.
609
626
  - Implement promise cache.
610
627
 
@@ -1 +1 @@
1
- "use strict";var T=Object.defineProperty;var C=(w,g,t)=>g in w?T(w,g,{enumerable:!0,configurable:!0,writable:!0,value:t}):w[g]=t;var S=(w,g,t)=>(C(w,typeof g!="symbol"?g+"":g,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class i extends Promise{constructor(t,e){const r=e?null:new AbortController,n=e||r.signal,o=[],c=()=>{for(const a of o)clearTimeout(a)};let l;const h={signal:n,cancel:()=>{var a;return(a=this.controller)==null?void 0:a.abort()},onCancel:a=>{l=a},delay:(a,u)=>new i(d=>{o.push(setTimeout(()=>{d(a())},u))},n),sleep:a=>h.delay(()=>{},a),fetch:(a,u)=>new i((d,p)=>{fetch(a,{...u||{},signal:n}).then(y=>d(y)).catch(y=>{y.name!=="AbortError"&&p(y)})},n),futurizable:a=>new i((u,d)=>{a.then(u).catch(d)},n)};let f="pending";const m=new Promise((a,u)=>{if(n.aborted){c(),f==="pending"&&l&&l();return}else{const d=typeof n.onabort=="function"?n.onabort:()=>{};n.onabort=()=>{d(),c(),f==="pending"&&l&&l()},t(j=>{f="fulfilled",a(j)},j=>{f="rejected",u(j)},h)}});super((a,u)=>{m.then(d=>a(d)).catch(u)});S(this,"controller");S(this,"internalSignal");S(this,"idsTimeout");this.controller=r,this.internalSignal=n,this.idsTimeout=o}static get[Symbol.species](){return this}get[Symbol.toStringTag](){return"Futurable"}get signal(){return this.internalSignal}clearTimeout(){for(const t of this.idsTimeout)clearTimeout(t)}then(t,e){let r,n;const o=new i((c,l)=>{r=c,n=l},this.internalSignal);return o.controller=this.controller,super.then(c=>{var l;if((l=this.internalSignal)!=null&&l.aborted){this.clearTimeout();return}try{r(t?t(c):c)}catch(s){n(s)}},c=>{var l;if((l=this.internalSignal)!=null&&l.aborted){this.clearTimeout();return}try{e?r(e(c)):n(c)}catch(s){n(s)}}),o}catch(t){return this.then(null,t)}finally(t){return this.then(e=>(t(),e),e=>{if(t(),e instanceof Error)throw e;return e})}cancel(){var t,e;!((t=this.internalSignal)!=null&&t.aborted)&&((e=this.controller)==null||e.abort())}delay(t,e){let r,n;const o=new i((c,l)=>{r=c,n=l},this.internalSignal);return o.controller=this.controller,this.then(c=>{this.idsTimeout.push(setTimeout(()=>r(t(c)),e))},c=>{n(c)}),o}sleep(t){return this.delay(e=>e,t)}fetch(t,e){let r,n;const o=new i((c,l)=>{r=c,n=l},this.internalSignal);return o.controller=this.controller,this.then(c=>{const l=typeof t=="function"?t(c):t,s={...typeof e=="function"?e(c):e,signal:this.internalSignal};fetch(l,s).then(h=>r(h)).catch(h=>{h.name!=="AbortError"&&n(h)})}),o}onCancel(t){let e,r;const n=new i((o,c,l)=>{l.onCancel(t),e=o,r=c},this.internalSignal);return n.controller=this.controller,this.then(o=>e(o),o=>r(o)),n}futurizable(t){let e,r;const n=new i((o,c)=>{e=o,r=c},this.internalSignal);return n.controller=this.controller,this.then(o=>{(typeof t=="function"?t(o):t).then(e).catch(r)}),n}static resolve(t,e){return t?new i(r=>r(t),e):new i(r=>r(),e)}static reject(t,e){return new i((r,n)=>n(t),e)}static onCancel({cb:t,signal:e}){return new i((r,n,o)=>{o.onCancel(()=>r(t()))},e)}static delay({cb:t,timer:e,signal:r}){return new i((n,o,c)=>{c.delay(t,e).then(n,o)},r)}static sleep({timer:t,signal:e}){return i.delay({cb:()=>{},timer:t,signal:e})}static fetch(t,e){const r=(e==null?void 0:e.signal)||void 0;return e!=null&&e.signal&&delete e.signal,new i((n,o,c)=>{c.fetch(t,e).then(n)},r)}static futurizable({promise:t,signal:e}){return new i((r,n)=>{t.then(r).catch(n)},e)}static handleValues(t,e){const r=[];for(const n in t)t[n]instanceof i?r.push(t[n]):t[n]instanceof Promise?r.push(new i((o,c)=>{t[n].then(l=>o(l)).catch(c)},e)):r.push(new i(o=>o(t[n]),e));return r}static all(t,e){let r,n;const o=new i((l,s,h)=>{r=l,n=s,h.onCancel(()=>{for(const f of c)f.cancel()})},e);e||(e=o.internalSignal);const c=i.handleValues(t,e);return super.all(c).then(l=>r(l)).catch(l=>n(l)),o}static allSettled(t,e){let r;const n=new i((c,l,s)=>{r=c,s.onCancel(()=>{for(const h of o)h.cancel()})},e);e||(e=n.internalSignal);const o=i.handleValues(t,e);return super.allSettled(o).then(c=>r(c)),n}static race(t,e){let r,n;const o=new i((l,s,h)=>{r=l,n=s,h.onCancel(()=>{for(const f of c)f.cancel()})},e);e||(e=o.internalSignal);const c=i.handleValues(t,e);return super.race(c).then(l=>r(l)).catch(l=>n(l)),o}static any(t,e){let r,n;const o=new i((l,s,h)=>{r=l,n=s,h.onCancel(()=>{for(const f of c)f.cancel()})},e);e||(e=o.internalSignal);const c=i.handleValues(t,e);return super.any(c).then(l=>r(l)).catch(l=>n(l)),o}static polling(t,{interval:e,signal:r}){let n,o,c;const l=setInterval(()=>{n&&n.cancel(),n=new i((s,h,f)=>{f.onCancel(()=>{o&&o.cancel()}),o=t().then(()=>s()).catch(m=>c&&c(m))},r)},e);return{cancel:()=>{l&&clearInterval(l),n&&n.cancel()},catch:s=>{c=s}}}}exports.Futurable=i;
1
+ "use strict";var T=Object.defineProperty;var C=(g,w,t)=>w in g?T(g,w,{enumerable:!0,configurable:!0,writable:!0,value:t}):g[w]=t;var S=(g,w,t)=>(C(g,typeof w!="symbol"?w+"":w,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class i extends Promise{constructor(t,e){const r=e?null:new AbortController,n=e||r.signal,o=[],c=()=>{for(const h of o)clearTimeout(h)};let l;const a={signal:n,cancel:()=>{var h;return(h=this.controller)==null?void 0:h.abort()},onCancel:h=>{l=h},delay:(h,u)=>new i(d=>{o.push(setTimeout(()=>{d(h())},u))},n),sleep:h=>a.delay(()=>{},h),fetch:(h,u)=>new i((d,p)=>{fetch(h,{...u||{},signal:n}).then(y=>d(y)).catch(y=>{y.name!=="AbortError"&&p(y)})},n),futurizable:h=>new i((u,d)=>{h.then(u).catch(d)},n)};let f="pending";const m=new Promise((h,u)=>{if(n.aborted){c();return}else{const d=typeof n.onabort=="function"?n.onabort:()=>{};n.onabort=()=>{d(),c(),f==="pending"&&l&&l()},t(j=>{f="fulfilled",h(j)},j=>{f="rejected",u(j)},a)}});super((h,u)=>{m.then(d=>h(d)).catch(u)});S(this,"controller");S(this,"internalSignal");S(this,"idsTimeout");this.controller=r,this.internalSignal=n,this.idsTimeout=o}static get[Symbol.species](){return this}get[Symbol.toStringTag](){return"Futurable"}get signal(){return this.internalSignal}clearTimeout(){for(const t of this.idsTimeout)clearTimeout(t)}then(t,e){let r,n;const o=new i((c,l)=>{r=c,n=l},this.internalSignal);return o.controller=this.controller,super.then(c=>{var l;if((l=this.internalSignal)!=null&&l.aborted){this.clearTimeout();return}try{r(t?t(c):c)}catch(s){n(s)}},c=>{var l;if((l=this.internalSignal)!=null&&l.aborted){this.clearTimeout();return}try{e?r(e(c)):n(c)}catch(s){n(s)}}),o}catch(t){return this.then(null,t)}finally(t){return this.then(e=>(t(),e),e=>{if(t(),e instanceof Error)throw e;return e})}cancel(){var t,e;!((t=this.internalSignal)!=null&&t.aborted)&&((e=this.controller)==null||e.abort())}delay(t,e){let r,n;const o=new i((c,l)=>{r=c,n=l},this.internalSignal);return o.controller=this.controller,this.then(c=>{this.idsTimeout.push(setTimeout(()=>r(t(c)),e))},c=>{n(c)}),o}sleep(t){return this.delay(e=>e,t)}fetch(t,e){let r,n;const o=new i((c,l)=>{r=c,n=l},this.internalSignal);return o.controller=this.controller,this.then(c=>{const l=typeof t=="function"?t(c):t,s={...typeof e=="function"?e(c):e,signal:this.internalSignal};fetch(l,s).then(a=>r(a)).catch(a=>{a.name!=="AbortError"&&n(a)})}),o}onCancel(t){let e,r;const n=new i((o,c,l)=>{l.onCancel(t),e=o,r=c},this.internalSignal);return n.controller=this.controller,this.then(o=>e(o),o=>r(o)),n}futurizable(t){let e,r;const n=new i((o,c)=>{e=o,r=c},this.internalSignal);return n.controller=this.controller,this.then(o=>{(typeof t=="function"?t(o):t).then(e).catch(r)}),n}static resolve(t,e){return t?new i(r=>r(t),e):new i(r=>r(),e)}static reject(t,e){return new i((r,n)=>n(t),e)}static onCancel({cb:t,signal:e}){return new i((r,n,o)=>{o.onCancel(()=>r(t()))},e)}static delay({cb:t,timer:e,signal:r}){return new i((n,o,c)=>{c.delay(t,e).then(n,o)},r)}static sleep({timer:t,signal:e}){return i.delay({cb:()=>{},timer:t,signal:e})}static fetch(t,e){const r=(e==null?void 0:e.signal)||void 0;return e!=null&&e.signal&&delete e.signal,new i((n,o,c)=>{c.fetch(t,e).then(n)},r)}static futurizable({promise:t,signal:e}){return new i((r,n)=>{t.then(r).catch(n)},e)}static handleValues(t,e){const r=[];for(const n in t)t[n]instanceof i?r.push(t[n]):t[n]instanceof Promise?r.push(new i((o,c)=>{t[n].then(l=>o(l)).catch(c)},e)):r.push(new i(o=>o(t[n]),e));return r}static all(t,e){let r,n;const o=new i((l,s,a)=>{r=l,n=s,a.onCancel(()=>{for(const f of c)f.cancel()})},e);e||(e=o.internalSignal);const c=i.handleValues(t,e);return super.all(c).then(l=>r(l)).catch(l=>n(l)),o}static allSettled(t,e){let r;const n=new i((c,l,s)=>{r=c,s.onCancel(()=>{for(const a of o)a.cancel()})},e);e||(e=n.internalSignal);const o=i.handleValues(t,e);return super.allSettled(o).then(c=>r(c)),n}static race(t,e){let r,n;const o=new i((l,s,a)=>{r=l,n=s,a.onCancel(()=>{for(const f of c)f.cancel()})},e);e||(e=o.internalSignal);const c=i.handleValues(t,e);return super.race(c).then(l=>r(l)).catch(l=>n(l)),o}static any(t,e){let r,n;const o=new i((l,s,a)=>{r=l,n=s,a.onCancel(()=>{for(const f of c)f.cancel()})},e);e||(e=o.internalSignal);const c=i.handleValues(t,e);return super.any(c).then(l=>r(l)).catch(l=>n(l)),o}static polling(t,{interval:e,signal:r}){let n,o,c;const l=setInterval(()=>{n&&n.cancel(),n=new i((s,a,f)=>{f.onCancel(()=>{o&&o.cancel()}),o=t().then(()=>s()).catch(m=>c&&c(m))},r)},e);return{cancel:()=>{l&&clearInterval(l),n&&n.cancel()},catch:s=>{c=s}}}static withResolvers(t){let e,r,n;const o=new i((l,s,a)=>{e=l,r=s,n=a},t),c=o.cancel;return{resolve:e,reject:r,utils:n,cancel:c,promise:o}}}exports.Futurable=i;
@@ -1,61 +1,61 @@
1
1
  var T = Object.defineProperty;
2
2
  var C = (g, w, t) => w in g ? T(g, w, { enumerable: !0, configurable: !0, writable: !0, value: t }) : g[w] = t;
3
- var S = (g, w, t) => (C(g, typeof w != "symbol" ? w + "" : w, t), t);
3
+ var m = (g, w, t) => (C(g, typeof w != "symbol" ? w + "" : w, t), t);
4
4
  class i extends Promise {
5
5
  constructor(t, e) {
6
6
  const r = e ? null : new AbortController(), n = e || r.signal, o = [], c = () => {
7
- for (const a of o)
8
- clearTimeout(a);
7
+ for (const h of o)
8
+ clearTimeout(h);
9
9
  };
10
10
  let l;
11
- const h = {
11
+ const a = {
12
12
  signal: n,
13
13
  cancel: () => {
14
- var a;
15
- return (a = this.controller) == null ? void 0 : a.abort();
14
+ var h;
15
+ return (h = this.controller) == null ? void 0 : h.abort();
16
16
  },
17
- onCancel: (a) => {
18
- l = a;
17
+ onCancel: (h) => {
18
+ l = h;
19
19
  },
20
- delay: (a, u) => new i((d) => {
20
+ delay: (h, u) => new i((d) => {
21
21
  o.push(setTimeout(() => {
22
- d(a());
22
+ d(h());
23
23
  }, u));
24
24
  }, n),
25
- sleep: (a) => h.delay(() => {
26
- }, a),
27
- fetch: (a, u) => new i((d, j) => {
28
- fetch(a, { ...u || {}, signal: n }).then((y) => d(y)).catch((y) => {
29
- y.name !== "AbortError" && j(y);
25
+ sleep: (h) => a.delay(() => {
26
+ }, h),
27
+ fetch: (h, u) => new i((d, p) => {
28
+ fetch(h, { ...u || {}, signal: n }).then((y) => d(y)).catch((y) => {
29
+ y.name !== "AbortError" && p(y);
30
30
  });
31
31
  }, n),
32
- futurizable: (a) => new i((u, d) => {
33
- a.then(u).catch(d);
32
+ futurizable: (h) => new i((u, d) => {
33
+ h.then(u).catch(d);
34
34
  }, n)
35
35
  };
36
36
  let f = "pending";
37
- const m = new Promise((a, u) => {
37
+ const S = new Promise((h, u) => {
38
38
  if (n.aborted) {
39
- c(), f === "pending" && l && l();
39
+ c();
40
40
  return;
41
41
  } else {
42
42
  const d = typeof n.onabort == "function" ? n.onabort : () => {
43
43
  };
44
44
  n.onabort = () => {
45
45
  d(), c(), f === "pending" && l && l();
46
- }, t((p) => {
47
- f = "fulfilled", a(p);
48
- }, (p) => {
49
- f = "rejected", u(p);
50
- }, h);
46
+ }, t((j) => {
47
+ f = "fulfilled", h(j);
48
+ }, (j) => {
49
+ f = "rejected", u(j);
50
+ }, a);
51
51
  }
52
52
  });
53
- super((a, u) => {
54
- m.then((d) => a(d)).catch(u);
53
+ super((h, u) => {
54
+ S.then((d) => h(d)).catch(u);
55
55
  });
56
- S(this, "controller");
57
- S(this, "internalSignal");
58
- S(this, "idsTimeout");
56
+ m(this, "controller");
57
+ m(this, "internalSignal");
58
+ m(this, "idsTimeout");
59
59
  this.controller = r, this.internalSignal = n, this.idsTimeout = o;
60
60
  }
61
61
  static get [Symbol.species]() {
@@ -66,6 +66,7 @@ class i extends Promise {
66
66
  }
67
67
  /**
68
68
  * Return internal futurable signal
69
+ * @returns {AbortSignal}
69
70
  */
70
71
  get signal() {
71
72
  return this.internalSignal;
@@ -76,6 +77,9 @@ class i extends Promise {
76
77
  }
77
78
  /**
78
79
  * Attaches callbacks for the resolution and/or rejection of the Futurable.
80
+ * @param {((value: T) => TResult1 | PromiseLike<TResult1> | FuturableLike<TResult1>) | undefined | null} onfulfilled
81
+ * @param {((reason: any) => TResult2 | PromiseLike<TResult2> | FuturableLike<TResult2>) | undefined | null} onrejected
82
+ * @returns {Futurable<TResult1 | TResult2>}
79
83
  */
80
84
  then(t, e) {
81
85
  let r, n;
@@ -108,6 +112,8 @@ class i extends Promise {
108
112
  }
109
113
  /**
110
114
  * Attaches a callback for only the rejection of the Futurable.
115
+ * @param {((reason: any) => TResult2 | PromiseLike<TResult2> | FuturableLike<TResult2>) | undefined | null} onRejected
116
+ * @returns {Futurable<T | TResult2>}
111
117
  */
112
118
  catch(t) {
113
119
  return this.then(null, t);
@@ -115,6 +121,8 @@ class i extends Promise {
115
121
  /**
116
122
  * Attaches a callback that is invoked when the Futurable is settled (fulfilled or rejected).
117
123
  * The resolved value cannot be modified from the callback.
124
+ * @param {() => void | undefined | null} onfinally
125
+ * @returns {Futurable<T>}
118
126
  */
119
127
  finally(t) {
120
128
  return this.then(
@@ -135,8 +143,8 @@ class i extends Promise {
135
143
  }
136
144
  /**
137
145
  * Waits for timer, then executes callback with the futurable value and returns the result obtained from the invocation.
138
- * @param cb: callback executed after timer with futurable chain value as parameter
139
- * @param timer: timer to wait (in milliseconds)
146
+ * @param {(val: T) => TResult1 | PromiseLike<TResult1> | FuturableLike<TResult1>} cb - callback executed after timer with futurable chain value as parameter
147
+ * @param {number} timer - timer to wait (in milliseconds)
140
148
  */
141
149
  delay(t, e) {
142
150
  let r, n;
@@ -154,15 +162,17 @@ class i extends Promise {
154
162
  }
155
163
  /**
156
164
  * Waits for timer parameter (in milliseconds) before returning the value.
157
- * @param timer: timer to wait (in milliseconds)
165
+ * @param {number} timer - timer to wait (in milliseconds)
166
+ * @returns {Futurable<T>}
158
167
  */
159
168
  sleep(t) {
160
169
  return this.delay((e) => e, t);
161
170
  }
162
171
  /**
163
172
  * Extension of the fetch API with cancellation support. Url parameter can be a string or a function with receive value from futurable chaining as paremeter.
164
- * @param url: url to fetch or function with futurable chaining value that returns url to fetch
165
- * @param opts: fetch options or function with futurable chaining value that return fetch options
173
+ * @param {string| ((val?:T)=>string)} url - url to fetch or function with futurable chaining value that returns url to fetch
174
+ * @param {object | RequestInit | ((val?: T) => RequestInit)} opts - fetch options or function with futurable chaining value that return fetch options
175
+ * @returns {Futurable<Response>}
166
176
  */
167
177
  fetch(t, e) {
168
178
  let r, n;
@@ -171,14 +181,15 @@ class i extends Promise {
171
181
  }, this.internalSignal);
172
182
  return o.controller = this.controller, this.then((c) => {
173
183
  const l = typeof t == "function" ? t(c) : t, s = { ...typeof e == "function" ? e(c) : e, signal: this.internalSignal };
174
- fetch(l, s).then((h) => r(h)).catch((h) => {
175
- h.name !== "AbortError" && n(h);
184
+ fetch(l, s).then((a) => r(a)).catch((a) => {
185
+ a.name !== "AbortError" && n(a);
176
186
  });
177
187
  }), o;
178
188
  }
179
189
  /**
180
190
  * Executes the callback passed as a parameter when the futurable is cancelled.
181
- * @param cb: callback
191
+ * @param {()=>void} cb
192
+ * @returns {Futurable<TResult1 | TResult2>}
182
193
  */
183
194
  onCancel(t) {
184
195
  let e, r;
@@ -190,22 +201,10 @@ class i extends Promise {
190
201
  (o) => r(o)
191
202
  ), n;
192
203
  }
193
- // promisify<TResult1 = T, TResult2 = never>(): Promise<TResult1 | TResult2> {
194
- // return new Promise((res, rej) => {
195
- // if (this.#signal.aborted) {
196
- // this.#clearTimeout();
197
- // return;
198
- // } else {
199
- // this.then(
200
- // val => res(val),
201
- // reason => rej(reason)
202
- // );
203
- // }
204
- // });
205
- // }
206
204
  /**
207
205
  * Takes a promise and transforms it into a futurizable. Promise can be also a function that receives value from futurable chaining as parameter.
208
- * @param promise: Promise to futurize or function that return promise with futurable chaining value as parameter
206
+ * @param {Promise<TResult1> | ((val?: T) => Promise<TResult1>)} promise - Promise to futurize or function that return promise with futurable chaining value as parameter
207
+ * @returns {Futurable<TResult1 | TResult2>}
209
208
  */
210
209
  futurizable(t) {
211
210
  let e, r;
@@ -216,15 +215,28 @@ class i extends Promise {
216
215
  (typeof t == "function" ? t(o) : t).then(e).catch(r);
217
216
  }), n;
218
217
  }
218
+ /**
219
+ * @param {T | PromiseLike<T> | FuturableLike<T>} [value]
220
+ * @param {AbortSignal} [signal]
221
+ * @returns {Futurable<T|void>}
222
+ */
219
223
  static resolve(t, e) {
220
224
  return t ? new i((r) => r(t), e) : new i((r) => r(), e);
221
225
  }
226
+ /**
227
+ * Creates a new rejected futurable for the provided reason.
228
+ * @param {any} [reason]
229
+ * @param {AbortSignal} [signal]
230
+ * @returns {Futurable<T>}
231
+ */
222
232
  static reject(t, e) {
223
233
  return new i((r, n) => n(t), e);
224
234
  }
225
235
  /**
226
236
  * OnCancel static method. It accepts a callback or a object with cb property and an optional signal.
227
- */
237
+ * @param {{cb: () => T, signal: AbortSignal|undefined}} options
238
+ * @returns {Futurable<T>}
239
+ */
228
240
  static onCancel({ cb: t, signal: e }) {
229
241
  return new i((r, n, o) => {
230
242
  o.onCancel(() => r(t()));
@@ -232,6 +244,8 @@ class i extends Promise {
232
244
  }
233
245
  /**
234
246
  * Delay static method. It accepts a object with timer and cb properties and an optional signal property.
247
+ * @param {{cb: () => T, timer: number, signal: AbortSignal|undefined}} options
248
+ * @returns {Futurable<T|TResult2>}
235
249
  */
236
250
  static delay({ cb: t, timer: e, signal: r }) {
237
251
  return new i((n, o, c) => {
@@ -240,6 +254,8 @@ class i extends Promise {
240
254
  }
241
255
  /**
242
256
  * Sleep static method. It accepts a timer or a object with timer property and an optional signal.
257
+ * @param {{timer: number, signal: AbortSignal|undefined}} options
258
+ * @returns {Futurable<void>}
243
259
  */
244
260
  static sleep({ timer: t, signal: e }) {
245
261
  return i.delay({
@@ -251,6 +267,9 @@ class i extends Promise {
251
267
  }
252
268
  /**
253
269
  * Fetch static method.
270
+ * @param {string} url
271
+ * @param {RequestInit} [opts]
272
+ * @returns {Futurable<Response>}
254
273
  */
255
274
  static fetch(t, e) {
256
275
  const r = (e == null ? void 0 : e.signal) || void 0;
@@ -260,6 +279,8 @@ class i extends Promise {
260
279
  }
261
280
  /**
262
281
  * Futurizable static method.
282
+ * @param {{promise: Promise<TResult1>, signal: AbortSignal|undefined}} options
283
+ * @returns {Futurable<TResult1 | TResult2>}
263
284
  */
264
285
  static futurizable({ promise: t, signal: e }) {
265
286
  return new i((r, n) => {
@@ -286,11 +307,14 @@ class i extends Promise {
286
307
  }
287
308
  /**
288
309
  * Creates a Futurable with cancellation support that is resolved with an array of results when all of the provided Futurables resolve, or rejected when any Futurable is rejected.
310
+ * @param {T} values
311
+ * @param {AbortSignal} [signal]
312
+ * @returns {Futurable<{ -readonly [P in keyof T]: Awaited<T[P]>; }>}
289
313
  */
290
314
  static all(t, e) {
291
315
  let r, n;
292
- const o = new i((l, s, h) => {
293
- r = l, n = s, h.onCancel(() => {
316
+ const o = new i((l, s, a) => {
317
+ r = l, n = s, a.onCancel(() => {
294
318
  for (const f of c)
295
319
  f.cancel();
296
320
  });
@@ -301,13 +325,16 @@ class i extends Promise {
301
325
  }
302
326
  /**
303
327
  * Creates a Futurable with cancellation support that is resolved with an array of results when all of the provided Futurables resolve or reject.
328
+ * @param {T} values
329
+ * @param {AbortSignal} [signal]
330
+ * @returns {Futurable<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>> }>}
304
331
  */
305
332
  static allSettled(t, e) {
306
333
  let r;
307
334
  const n = new i((c, l, s) => {
308
335
  r = c, s.onCancel(() => {
309
- for (const h of o)
310
- h.cancel();
336
+ for (const a of o)
337
+ a.cancel();
311
338
  });
312
339
  }, e);
313
340
  e || (e = n.internalSignal);
@@ -316,11 +343,14 @@ class i extends Promise {
316
343
  }
317
344
  /**
318
345
  * Creates a Futurable with cancellation support that is resolved or rejected when any of the provided Futurables are resolved or rejected.
346
+ * @param {T} values
347
+ * @param {AbortSignal} [signal]
348
+ * @returns {Futurable<Awaited<T[number]>>}
319
349
  */
320
350
  static race(t, e) {
321
351
  let r, n;
322
- const o = new i((l, s, h) => {
323
- r = l, n = s, h.onCancel(() => {
352
+ const o = new i((l, s, a) => {
353
+ r = l, n = s, a.onCancel(() => {
324
354
  for (const f of c)
325
355
  f.cancel();
326
356
  });
@@ -334,11 +364,14 @@ class i extends Promise {
334
364
  * or rejected with an AggregateError containing an array of rejection reasons if all of the
335
365
  * given futurables are rejected. It resolves all elements of the passed iterable to futurables as
336
366
  * it runs this algorithm.
367
+ * @param {T} values
368
+ * @param {AbortSignal} [signal]
369
+ * @returns {Futurable<Awaited<T[number]>>}
337
370
  */
338
371
  static any(t, e) {
339
372
  let r, n;
340
- const o = new i((l, s, h) => {
341
- r = l, n = s, h.onCancel(() => {
373
+ const o = new i((l, s, a) => {
374
+ r = l, n = s, a.onCancel(() => {
342
375
  for (const f of c)
343
376
  f.cancel();
344
377
  });
@@ -349,14 +382,17 @@ class i extends Promise {
349
382
  }
350
383
  /**
351
384
  * Creates a polling service with cancellation support and possibility to handle error.
385
+ * @param {()=> Futurable<T>} value
386
+ * @param {{interval: number, signal?: AbortSignal}} options
387
+ * @returns {{cancel: () => void, catch: (onrejected:(reason: unknown)=>void)=>void }}
352
388
  */
353
389
  static polling(t, { interval: e, signal: r }) {
354
390
  let n, o, c;
355
391
  const l = setInterval(() => {
356
- n && n.cancel(), n = new i((s, h, f) => {
392
+ n && n.cancel(), n = new i((s, a, f) => {
357
393
  f.onCancel(() => {
358
394
  o && o.cancel();
359
- }), o = t().then(() => s()).catch((m) => c && c(m));
395
+ }), o = t().then(() => s()).catch((S) => c && c(S));
360
396
  }, r);
361
397
  }, e);
362
398
  return {
@@ -368,6 +404,24 @@ class i extends Promise {
368
404
  }
369
405
  };
370
406
  }
407
+ /**
408
+ * Extension of _Promise.withResolvers_ static method. Creates a new Futurable and returns it in an object, along with its resolve, reject and cancel functions and utils object.
409
+ * @param {AbortSignal} [signal]
410
+ * @returns {{ resolve: null | FuturableResolve<T>, reject: null | FuturableReject, utils: null | FuturableUtils<T>, futurable: Futurable<T>, cancel: null | (() => void) }}
411
+ */
412
+ static withResolvers(t) {
413
+ let e, r, n;
414
+ const o = new i((l, s, a) => {
415
+ e = l, r = s, n = a;
416
+ }, t), c = o.cancel;
417
+ return {
418
+ resolve: e,
419
+ reject: r,
420
+ utils: n,
421
+ cancel: c,
422
+ promise: o
423
+ };
424
+ }
371
425
  }
372
426
  export {
373
427
  i as Futurable
package/dist/index.d.ts CHANGED
@@ -56,6 +56,13 @@ export type FuturableExecutor<T> = (resolve: FuturableResolve<T>, reject: Futura
56
56
  */
57
57
  utils: FuturableUtils<T>) => void;
58
58
  export type FuturableIterable<T = any> = Iterable<FuturableLike<T> | PromiseLike<T> | T>;
59
+ interface FuturableWithResolvers<T> {
60
+ promise: Futurable<T> | Promise<T>;
61
+ resolve: (value: T | PromiseLike<T> | FuturableLike<T>) => void;
62
+ reject: (reason?: any) => void;
63
+ cancel: () => void;
64
+ utils: FuturableUtils<T>;
65
+ }
59
66
  export declare class Futurable<T> extends Promise<T> {
60
67
  private controller;
61
68
  private internalSignal;
@@ -65,20 +72,28 @@ export declare class Futurable<T> extends Promise<T> {
65
72
  get [Symbol.toStringTag](): string;
66
73
  /**
67
74
  * Return internal futurable signal
75
+ * @returns {AbortSignal}
68
76
  */
69
77
  get signal(): AbortSignal;
70
78
  private clearTimeout;
71
79
  /**
72
80
  * Attaches callbacks for the resolution and/or rejection of the Futurable.
81
+ * @param {((value: T) => TResult1 | PromiseLike<TResult1> | FuturableLike<TResult1>) | undefined | null} onfulfilled
82
+ * @param {((reason: any) => TResult2 | PromiseLike<TResult2> | FuturableLike<TResult2>) | undefined | null} onrejected
83
+ * @returns {Futurable<TResult1 | TResult2>}
73
84
  */
74
85
  then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1> | FuturableLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2> | FuturableLike<TResult2>) | undefined | null): Futurable<TResult1 | TResult2>;
75
86
  /**
76
87
  * Attaches a callback for only the rejection of the Futurable.
88
+ * @param {((reason: any) => TResult2 | PromiseLike<TResult2> | FuturableLike<TResult2>) | undefined | null} onRejected
89
+ * @returns {Futurable<T | TResult2>}
77
90
  */
78
91
  catch<TResult2 = never>(onRejected: ((reason: any) => TResult2 | PromiseLike<TResult2> | FuturableLike<TResult2>) | undefined | null): Futurable<T | TResult2>;
79
92
  /**
80
93
  * Attaches a callback that is invoked when the Futurable is settled (fulfilled or rejected).
81
94
  * The resolved value cannot be modified from the callback.
95
+ * @param {() => void | undefined | null} onfinally
96
+ * @returns {Futurable<T>}
82
97
  */
83
98
  finally(onfinally: () => void | undefined | null): Futurable<T>;
84
99
  /**
@@ -87,43 +102,66 @@ export declare class Futurable<T> extends Promise<T> {
87
102
  cancel(): void;
88
103
  /**
89
104
  * Waits for timer, then executes callback with the futurable value and returns the result obtained from the invocation.
90
- * @param cb: callback executed after timer with futurable chain value as parameter
91
- * @param timer: timer to wait (in milliseconds)
105
+ * @param {(val: T) => TResult1 | PromiseLike<TResult1> | FuturableLike<TResult1>} cb - callback executed after timer with futurable chain value as parameter
106
+ * @param {number} timer - timer to wait (in milliseconds)
92
107
  */
93
108
  delay<TResult1 = T, TResult2 = never>(cb: (val: T) => TResult1 | PromiseLike<TResult1> | FuturableLike<TResult1>, timer: number): Futurable<TResult1 | TResult2>;
94
109
  /**
95
110
  * Waits for timer parameter (in milliseconds) before returning the value.
96
- * @param timer: timer to wait (in milliseconds)
111
+ * @param {number} timer - timer to wait (in milliseconds)
112
+ * @returns {Futurable<T>}
97
113
  */
98
114
  sleep(timer: number): Futurable<T>;
99
115
  /**
100
116
  * Extension of the fetch API with cancellation support. Url parameter can be a string or a function with receive value from futurable chaining as paremeter.
101
- * @param url: url to fetch or function with futurable chaining value that returns url to fetch
102
- * @param opts: fetch options or function with futurable chaining value that return fetch options
117
+ * @param {string| ((val?:T)=>string)} url - url to fetch or function with futurable chaining value that returns url to fetch
118
+ * @param {object | RequestInit | ((val?: T) => RequestInit)} opts - fetch options or function with futurable chaining value that return fetch options
119
+ * @returns {Futurable<Response>}
103
120
  */
104
121
  fetch(url: string | ((val?: T) => string), opts?: object | RequestInit | ((val?: T) => RequestInit)): Futurable<Response>;
105
122
  /**
106
123
  * Executes the callback passed as a parameter when the futurable is cancelled.
107
- * @param cb: callback
124
+ * @param {()=>void} cb
125
+ * @returns {Futurable<TResult1 | TResult2>}
108
126
  */
109
127
  onCancel<TResult1 = void, TResult2 = never>(cb: () => void): Futurable<TResult1 | TResult2>;
110
128
  /**
111
129
  * Takes a promise and transforms it into a futurizable. Promise can be also a function that receives value from futurable chaining as parameter.
112
- * @param promise: Promise to futurize or function that return promise with futurable chaining value as parameter
130
+ * @param {Promise<TResult1> | ((val?: T) => Promise<TResult1>)} promise - Promise to futurize or function that return promise with futurable chaining value as parameter
131
+ * @returns {Futurable<TResult1 | TResult2>}
113
132
  */
114
133
  futurizable<TResult1 = T, TResult2 = never>(promise: Promise<TResult1> | ((val?: T) => Promise<TResult1>)): Futurable<TResult1 | TResult2>;
134
+ /**
135
+ * Creates a new resolved futurable. Creates a new resolved futurable for the provided value.
136
+ * @returns {Futurable<void>}
137
+ */
115
138
  static resolve(): Futurable<void>;
139
+ /**
140
+ * @param {T | PromiseLike<T> | FuturableLike<T>} value
141
+ * @param {AbortSignal} [signal]
142
+ * @returns {Futurable<T>}
143
+ */
116
144
  static resolve<T = any>(value: T | PromiseLike<T> | FuturableLike<T>, signal?: AbortSignal): Futurable<T>;
145
+ /**
146
+ * Creates a new rejected futurable for the provided reason.
147
+ * @param {any} [reason]
148
+ * @param {AbortSignal} [signal]
149
+ * @returns {Futurable<T>}
150
+ */
117
151
  static reject<T = never>(reason?: any, signal?: AbortSignal): Futurable<T>;
118
152
  /**
119
153
  * OnCancel static method. It accepts a callback or a object with cb property and an optional signal.
120
- */
154
+ * @param {{cb: () => T, signal: AbortSignal|undefined}} options
155
+ * @returns {Futurable<T>}
156
+ */
121
157
  static onCancel<T = void>({ cb, signal }: {
122
158
  cb: () => T;
123
159
  signal?: AbortSignal;
124
160
  }): Futurable<T>;
125
161
  /**
126
162
  * Delay static method. It accepts a object with timer and cb properties and an optional signal property.
163
+ * @param {{cb: () => T, timer: number, signal: AbortSignal|undefined}} options
164
+ * @returns {Futurable<T|TResult2>}
127
165
  */
128
166
  static delay<T = any, TResult2 = never>({ cb, timer, signal }: {
129
167
  cb: () => T;
@@ -132,6 +170,8 @@ export declare class Futurable<T> extends Promise<T> {
132
170
  }): Futurable<T | TResult2>;
133
171
  /**
134
172
  * Sleep static method. It accepts a timer or a object with timer property and an optional signal.
173
+ * @param {{timer: number, signal: AbortSignal|undefined}} options
174
+ * @returns {Futurable<void>}
135
175
  */
136
176
  static sleep({ timer, signal }: {
137
177
  timer: number;
@@ -139,10 +179,15 @@ export declare class Futurable<T> extends Promise<T> {
139
179
  }): Futurable<void>;
140
180
  /**
141
181
  * Fetch static method.
182
+ * @param {string} url
183
+ * @param {RequestInit} [opts]
184
+ * @returns {Futurable<Response>}
142
185
  */
143
186
  static fetch(url: string, opts?: RequestInit): Futurable<Response>;
144
187
  /**
145
188
  * Futurizable static method.
189
+ * @param {{promise: Promise<TResult1>, signal: AbortSignal|undefined}} options
190
+ * @returns {Futurable<TResult1 | TResult2>}
146
191
  */
147
192
  static futurizable<TResult1 = any, TResult2 = never>({ promise, signal }: {
148
193
  promise: Promise<TResult1>;
@@ -151,18 +196,27 @@ export declare class Futurable<T> extends Promise<T> {
151
196
  private static handleValues;
152
197
  /**
153
198
  * Creates a Futurable with cancellation support that is resolved with an array of results when all of the provided Futurables resolve, or rejected when any Futurable is rejected.
199
+ * @param {T} values
200
+ * @param {AbortSignal} [signal]
201
+ * @returns {Futurable<{ -readonly [P in keyof T]: Awaited<T[P]>; }>}
154
202
  */
155
203
  static all<T extends readonly unknown[] | []>(values: T, signal?: AbortSignal): Futurable<{
156
204
  -readonly [P in keyof T]: Awaited<T[P]>;
157
205
  }>;
158
206
  /**
159
207
  * Creates a Futurable with cancellation support that is resolved with an array of results when all of the provided Futurables resolve or reject.
208
+ * @param {T} values
209
+ * @param {AbortSignal} [signal]
210
+ * @returns {Futurable<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>> }>}
160
211
  */
161
212
  static allSettled<T extends readonly unknown[] | []>(values: T, signal?: AbortSignal): Futurable<{
162
213
  -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>;
163
214
  }>;
164
215
  /**
165
216
  * Creates a Futurable with cancellation support that is resolved or rejected when any of the provided Futurables are resolved or rejected.
217
+ * @param {T} values
218
+ * @param {AbortSignal} [signal]
219
+ * @returns {Futurable<Awaited<T[number]>>}
166
220
  */
167
221
  static race<T extends readonly unknown[] | []>(values: T, signal?: AbortSignal): Futurable<Awaited<T[number]>>;
168
222
  /**
@@ -170,10 +224,16 @@ export declare class Futurable<T> extends Promise<T> {
170
224
  * or rejected with an AggregateError containing an array of rejection reasons if all of the
171
225
  * given futurables are rejected. It resolves all elements of the passed iterable to futurables as
172
226
  * it runs this algorithm.
227
+ * @param {T} values
228
+ * @param {AbortSignal} [signal]
229
+ * @returns {Futurable<Awaited<T[number]>>}
173
230
  */
174
231
  static any<T extends readonly unknown[] | []>(values: T, signal?: AbortSignal): Futurable<Awaited<T[number]>>;
175
232
  /**
176
233
  * Creates a polling service with cancellation support and possibility to handle error.
234
+ * @param {()=> Futurable<T>} value
235
+ * @param {{interval: number, signal?: AbortSignal}} options
236
+ * @returns {{cancel: () => void, catch: (onrejected:(reason: unknown)=>void)=>void }}
177
237
  */
178
238
  static polling<T>(value: () => Futurable<T>, { interval, signal }: {
179
239
  interval: number;
@@ -182,5 +242,12 @@ export declare class Futurable<T> extends Promise<T> {
182
242
  cancel: () => void;
183
243
  catch: (onrejected: (reason: unknown) => void) => void;
184
244
  };
245
+ /**
246
+ * Extension of _Promise.withResolvers_ static method. Creates a new Futurable and returns it in an object, along with its resolve, reject and cancel functions and utils object.
247
+ * @param {AbortSignal} [signal]
248
+ * @returns {{ resolve: null | FuturableResolve<T>, reject: null | FuturableReject, utils: null | FuturableUtils<T>, futurable: Futurable<T>, cancel: null | (() => void) }}
249
+ */
250
+ static withResolvers<T>(signal?: AbortSignal): FuturableWithResolvers<T>;
185
251
  }
252
+ export {};
186
253
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa,CAAC,CAAC;IAC/B;;;;;OAKG;IACH,IAAI,CAAC,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,KAAK,EAClC,WAAW,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,EAC3G,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,GAC3G,aAAa,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC;C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AAQ,EAAE,MAAM,EAAE,EAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAC,GAAG;QAAC,MAAM,EAAE,MAAM,IAAI,CAAC;QAAC,KAAK,EAAE,CAAC,UAAU,EAAC,CAAC,MAAM,EAAE,OAAO,KAAG,IAAI,KAAG,IAAI,CAAA;KAAE;IAsBpL;;;;OAIG;IACH,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,sBAAsB,CAAC,CAAC,CAAC;CAkBxE"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@ndriadev/futurable",
3
3
  "description": "Extension Javascript's Promise API with more functionalities",
4
4
  "private": false,
5
- "version": "2.1.1",
5
+ "version": "2.2.0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist/",