functype 0.8.83 → 0.8.85

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 (38) hide show
  1. package/dist/{Either-CncND8cm.d.ts → Either-BlY4VB1r.d.ts} +3 -3
  2. package/dist/{chunk-JMCOLAJY.mjs → chunk-JAPOUVPL.mjs} +2 -2
  3. package/dist/chunk-JAPOUVPL.mjs.map +1 -0
  4. package/dist/either/index.d.ts +1 -1
  5. package/dist/either/index.mjs +1 -1
  6. package/dist/fpromise/index.d.ts +1 -1
  7. package/dist/fpromise/index.mjs +1 -1
  8. package/dist/index.d.ts +3 -28
  9. package/dist/index.mjs +1 -1
  10. package/dist/list/index.d.ts +1 -1
  11. package/dist/list/index.mjs +1 -1
  12. package/dist/map/index.d.ts +1 -1
  13. package/dist/map/index.mjs +1 -1
  14. package/dist/option/index.d.ts +1 -1
  15. package/dist/option/index.mjs +1 -1
  16. package/dist/set/index.d.ts +1 -1
  17. package/dist/set/index.mjs +1 -1
  18. package/dist/try/index.d.ts +1 -1
  19. package/dist/try/index.mjs +1 -1
  20. package/package.json +1 -1
  21. package/dist/chunk-JMCOLAJY.mjs.map +0 -1
  22. package/readme/BUNDLE_OPTIMIZATION.md +0 -74
  23. package/readme/FPromise-Assessment.md +0 -43
  24. package/readme/HKT.md +0 -110
  25. package/readme/ROADMAP.md +0 -113
  26. package/readme/TASK-IMPLEMENTATION.md +0 -290
  27. package/readme/TASK-TODO.md +0 -40
  28. package/readme/TASK-UPDATES.md +0 -64
  29. package/readme/TUPLE-EXAMPLES.md +0 -76
  30. package/readme/TaskMigration.md +0 -129
  31. package/readme/ai-guide.md +0 -406
  32. package/readme/examples.md +0 -2093
  33. package/readme/quick-reference.md +0 -514
  34. package/readme/task-cancellation-progress.md +0 -258
  35. package/readme/task-error-handling.md +0 -127
  36. package/readme/task-quick-reference.md +0 -157
  37. package/readme/tasks.md +0 -205
  38. package/readme/type-index.md +0 -238
@@ -267,7 +267,7 @@ interface Set<A> extends FunctypeCollection<A, "Set">, Collection<A> {
267
267
  fold: <U extends Type>(onEmpty: () => U, onValue: (value: A) => U) => U;
268
268
  toList: () => List<A>;
269
269
  toSet: () => Set<A>;
270
- toArray: <B = A>() => readonly B[];
270
+ toArray: <B = A>() => B[];
271
271
  toString: () => string;
272
272
  }
273
273
  declare const Set: (<A>(iterable?: Iterable<A>) => Set<A>) & {
@@ -507,7 +507,7 @@ interface CollectionOps<A extends Type, Self> {
507
507
  /**
508
508
  * Converts the collection to an array.
509
509
  */
510
- toArray<B = A>(): readonly B[];
510
+ toArray<B = A>(): B[];
511
511
  }
512
512
 
513
513
  /**
@@ -706,4 +706,4 @@ declare const Either: {
706
706
  fromBinary: <L extends Type, R extends Type>(binary: string) => Either<L, R>;
707
707
  };
708
708
 
709
- export { type AsyncMonad as A, type Collection as C, Either as E, type Foldable as F, List as L, type Matchable as M, None as N, Option as O, type Pipe as P, Right as R, type Serializable as S, type Traversable as T, type FunctypeBase as a, type Extractable as b, type TestEither as c, Left as d, isLeft as e, TypeCheckRight as f, TypeCheckLeft as g, tryCatchAsync as h, isRight as i, type Functype as j, type FunctypeCollection as k, MatchableUtils as l, Some as m, OptionConstructor as n, type SerializationMethods as o, Set as p, type CollectionOps as q, type ContainerOps as r, type Applicative as s, tryCatch as t, type Functor as u, type Monad as v };
709
+ export { type Applicative as A, type Collection as C, Either as E, type Foldable as F, List as L, type Matchable as M, None as N, Option as O, type Pipe as P, Right as R, type Serializable as S, type Traversable as T, type FunctypeBase as a, type Extractable as b, type TestEither as c, Left as d, isLeft as e, TypeCheckRight as f, TypeCheckLeft as g, tryCatchAsync as h, isRight as i, type Functype as j, type FunctypeCollection as k, MatchableUtils as l, Some as m, OptionConstructor as n, type SerializationMethods as o, Set as p, type CollectionOps as q, type ContainerOps as r, type AsyncMonad as s, tryCatch as t, type Functor as u, type Monad as v };
@@ -38,5 +38,5 @@ value: ${JSON.stringify(r)}`,toBinary:()=>Buffer.from(JSON.stringify({_tag:"Stac
38
38
  `)[1]?.split(": ")[1];if(!r)return ge([]);let n=JSON.parse(r);return ge(n)},fromBinary:e=>{let t=Buffer.from(e,"base64").toString();return _e.fromJSON(t)}},ge=E(at,_e);var b=e=>({_tag:"Some",value:e,isEmpty:false,get:()=>e,getOrElse:()=>e,getOrThrow:()=>e,orElse:t=>b(e),orNull:()=>e,orUndefined:()=>e,map:t=>b(t(e)),ap:t=>t._tag==="Some"&&t.value?b(t.value(e)):K,filter(t){return t(e)?b(e):K},count:t=>t(e)?1:0,find:t=>t(e)?b(e):K,exists:t=>t(e),forEach:t=>t(e),fold:(t,r)=>r(e),match:t=>t.Some(e),flatMap:t=>t(e),flatMapAsync:async t=>await t(e),reduce:t=>t(void 0,e),reduceRight:t=>t(void 0,e),foldLeft:t=>r=>r(t,e),foldRight:t=>r=>r(e,t),toList:()=>m([e]),contains:t=>t===e,size:1,toEither:t=>T(e),toString:()=>`Some(${te(e)})`,toValue:()=>({_tag:"Some",value:e}),pipe:t=>t(e),serialize:()=>({toJSON:()=>JSON.stringify({_tag:"Some",value:e}),toYAML:()=>`_tag: Some
39
39
  value: ${te(e)}`,toBinary:()=>Buffer.from(JSON.stringify({_tag:"Some",value:e})).toString("base64")})}),K={_tag:"None",value:void 0,isEmpty:true,get:()=>{throw new Error("Cannot call get() on None")},getOrElse:e=>e,getOrThrow(e){throw e},orElse:e=>e,orNull:()=>null,orUndefined:()=>{},map:e=>K,ap:e=>K,filter(e){return K},count:e=>0,find:e=>K,exists:e=>false,forEach:e=>{},flatMap:e=>K,flatMapAsync:async e=>K,reduce:()=>{},reduceRight:()=>{},fold:(e,t)=>e(),match:e=>e.None(),foldLeft:e=>()=>e,foldRight:e=>()=>e,toList:()=>m([]),contains:()=>false,size:0,toEither:e=>c(e),toString:()=>"None",toValue:()=>({_tag:"None",value:void 0}),pipe:e=>e(void 0),serialize:()=>({toJSON:()=>JSON.stringify({_tag:"None",value:null}),toYAML:()=>`_tag: None
40
40
  value: null`,toBinary:()=>Buffer.from(JSON.stringify({_tag:"None",value:null})).toString("base64")})},k=()=>K,st=e=>e!=null?b(e):k(),Ce={from:e=>f(e),none:()=>k(),fromJSON:e=>{let t=JSON.parse(e);return t._tag==="Some"?b(t.value):k()},fromYAML:e=>{let t=e.split(`
41
- `),r=t[0]?.split(": ")[1],n=t[1]?.split(": ")[1];if(!r||!n)return k();let o=n==="null"?null:JSON.parse(n);return r==="Some"?b(o):k()},fromBinary:e=>{let t=Buffer.from(e,"base64").toString();return Ce.fromJSON(t)}},f=E(st,Ce);export{me as $,$t as A,Jt as B,Wt as C,Dt as D,Ht as E,H as F,ie as G,R as H,He as I,fe as J,Qe as K,Ue as L,Se as M,Te as N,F as O,Oe as P,le as Q,yr as R,dr as S,gr as T,xr as U,de as V,w as W,_r as X,N as Y,Qr as Z,re as _,E as a,ot as aa,b,ge as ba,k as c,st as d,f as e,Y as f,m as g,T as h,c as i,bt as j,vt as k,wt as l,We as m,je as n,Ut as o,xe as p,M as q,Ye as r,Nt as s,zt as t,_t as u,Ft as v,Ct as w,Vt as x,Kt as y,It as z};//# sourceMappingURL=chunk-JMCOLAJY.mjs.map
42
- //# sourceMappingURL=chunk-JMCOLAJY.mjs.map
41
+ `),r=t[0]?.split(": ")[1],n=t[1]?.split(": ")[1];if(!r||!n)return k();let o=n==="null"?null:JSON.parse(n);return r==="Some"?b(o):k()},fromBinary:e=>{let t=Buffer.from(e,"base64").toString();return Ce.fromJSON(t)}},f=E(st,Ce);export{me as $,$t as A,Jt as B,Wt as C,Dt as D,Ht as E,H as F,ie as G,R as H,He as I,fe as J,Qe as K,Ue as L,Se as M,Te as N,F as O,Oe as P,le as Q,yr as R,dr as S,gr as T,xr as U,de as V,w as W,_r as X,N as Y,Qr as Z,re as _,E as a,ot as aa,b,ge as ba,k as c,st as d,f as e,Y as f,m as g,T as h,c as i,bt as j,vt as k,wt as l,We as m,je as n,Ut as o,xe as p,M as q,Ye as r,Nt as s,zt as t,_t as u,Ft as v,Ct as w,Vt as x,Kt as y,It as z};//# sourceMappingURL=chunk-JAPOUVPL.mjs.map
42
+ //# sourceMappingURL=chunk-JAPOUVPL.mjs.map