aeon-types 0.1.0 → 0.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/LICENSE +21 -0
- package/dist/index.cjs +0 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -20
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +0 -10
- package/dist/interfaces.d.ts.map +1 -1
- package/package.json +15 -7
- package/dist/hkt.d.ts +0 -32
- package/dist/hkt.d.ts.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Josh Burgess
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.cjs
CHANGED
|
@@ -18,32 +18,9 @@
|
|
|
18
18
|
/** Zero duration. */ const DURATION_ZERO = 0;
|
|
19
19
|
/** Zero offset. */ const OFFSET_ZERO = 0;
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
* Higher-Kinded Type encoding via URI-indexed Kind map.
|
|
23
|
-
*
|
|
24
|
-
* Uses module augmentation (Effect-TS / fp-ts style) so that each
|
|
25
|
-
* package can register its own types without circular imports.
|
|
26
|
-
*/ // biome-ignore lint/suspicious/noEmptyInterface: open for module augmentation
|
|
27
|
-
// --- Derived combinators ---
|
|
28
|
-
/** Lift a binary function over two Applicative values. */ const liftA2 = (A)=>(f, fa1, fa2)=>A.ap(A.map((a1)=>(a2)=>f(a1, a2), fa1), fa2);
|
|
29
|
-
/** Lift a ternary function over three Applicative values. */ const liftA3 = (A)=>(f, fa1, fa2, fa3)=>A.ap(A.ap(A.map((a1)=>(a2)=>(a3)=>f(a1, a2, a3), fa1), fa2), fa3);
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Core runtime interfaces for the push/pull reactive system.
|
|
33
|
-
*
|
|
34
|
-
* These define the contracts that packages/core and packages/scheduler implement.
|
|
35
|
-
* Denotational meanings are stated in JSDoc.
|
|
36
|
-
*/ // --- URI constants for HKT registration ---
|
|
37
|
-
const EventURI = "Event";
|
|
38
|
-
const BehaviorURI = "Behavior";
|
|
39
|
-
|
|
40
|
-
exports.BehaviorURI = BehaviorURI;
|
|
41
21
|
exports.DURATION_ZERO = DURATION_ZERO;
|
|
42
|
-
exports.EventURI = EventURI;
|
|
43
22
|
exports.OFFSET_ZERO = OFFSET_ZERO;
|
|
44
23
|
exports.TIME_ZERO = TIME_ZERO;
|
|
45
|
-
exports.liftA2 = liftA2;
|
|
46
|
-
exports.liftA3 = liftA3;
|
|
47
24
|
exports.timeAdd = timeAdd;
|
|
48
25
|
exports.timeDiff = timeDiff;
|
|
49
26
|
exports.timeShift = timeShift;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/branded.ts"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/branded.ts"],"sourcesContent":["/**\n * Branded types for temporal values.\n *\n * Branding prevents accidental mixing of Time, Duration, and Offset\n * at the type level while remaining plain numbers at runtime.\n */\n\ndeclare const TimeBrand: unique symbol;\ndeclare const DurationBrand: unique symbol;\ndeclare const OffsetBrand: unique symbol;\n\n/** Absolute point in time (milliseconds). Denotation: a point on the timeline. */\nexport type Time = number & { readonly [TimeBrand]: typeof TimeBrand };\n\n/** Relative duration (milliseconds). Denotation: a span between two points. */\nexport type Duration = number & { readonly [DurationBrand]: typeof DurationBrand };\n\n/** Scheduler-relative offset (milliseconds). Denotation: displacement from a scheduler's epoch. */\nexport type Offset = number & { readonly [OffsetBrand]: typeof OffsetBrand };\n\n// --- Constructors ---\n\n/** Wrap a raw millisecond value as a Time. */\nexport const toTime = (ms: number): Time => ms as Time;\n\n/** Wrap a raw millisecond value as a Duration. */\nexport const toDuration = (ms: number): Duration => ms as Duration;\n\n/** Wrap a raw millisecond value as an Offset. */\nexport const toOffset = (ms: number): Offset => ms as Offset;\n\n// --- Arithmetic ---\n\n/** Compute the Duration between two Time points. */\nexport const timeDiff = (a: Time, b: Time): Duration => (a - b) as Duration;\n\n/** Advance a Time by a Duration. */\nexport const timeAdd = (t: Time, d: Duration): Time => (t + d) as Time;\n\n/** Advance a Time by an Offset. */\nexport const timeShift = (t: Time, o: Offset): Time => (t + o) as Time;\n\n// --- Constants ---\n\n/** Time zero — the epoch. */\nexport const TIME_ZERO: Time = 0 as Time;\n\n/** Zero duration. */\nexport const DURATION_ZERO: Duration = 0 as Duration;\n\n/** Zero offset. */\nexport const OFFSET_ZERO: Offset = 0 as Offset;\n"],"names":["toTime","ms","toDuration","toOffset","timeDiff","a","b","timeAdd","t","d","timeShift","o","TIME_ZERO","DURATION_ZERO","OFFSET_ZERO"],"mappings":";;AAAA;;;;;AAKC;AAiBD,+CACO,MAAMA,MAAAA,GAAS,CAACC,KAAqBA;AAE5C,mDACO,MAAMC,UAAAA,GAAa,CAACD,KAAyBA;AAEpD,kDACO,MAAME,QAAAA,GAAW,CAACF,KAAuBA;AAEhD;AAEA,qDACO,MAAMG,QAAAA,GAAW,CAACC,CAAAA,EAASC,CAAAA,GAAuBD,IAAIC;AAE7D,qCACO,MAAMC,OAAAA,GAAU,CAACC,CAAAA,EAASC,CAAAA,GAAuBD,IAAIC;AAE5D,oCACO,MAAMC,SAAAA,GAAY,CAACF,CAAAA,EAASG,CAAAA,GAAqBH,IAAIG;AAE5D;AAEA,8BACO,MAAMC,SAAAA,GAAkB;AAE/B,sBACO,MAAMC,aAAAA,GAA0B;AAEvC,oBACO,MAAMC,WAAAA,GAAsB;;;;;;;;;;;;"}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { type Time, type Duration, type Offset, toTime, toDuration, toOffset, timeDiff, timeAdd, timeShift, TIME_ZERO, DURATION_ZERO, OFFSET_ZERO, } from "./branded.js";
|
|
2
|
-
export
|
|
3
|
-
export { type Disposable, type Sink, type Source, type Task, type ScheduledTask, type Scheduler, type Event, type Behavior, EventURI, type EventURI as EventURIType, BehaviorURI, type BehaviorURI as BehaviorURIType, } from "./interfaces.js";
|
|
2
|
+
export type { Disposable, Sink, Source, Task, ScheduledTask, Scheduler, Event, Behavior, } from "./interfaces.js";
|
|
4
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { type Time, type Duration, type Offset, toTime, toDuration, toOffset, timeDiff, timeAdd, timeShift, TIME_ZERO, DURATION_ZERO, OFFSET_ZERO, } from "./branded.js";
|
|
2
|
-
export
|
|
3
|
-
export { type Disposable, type Sink, type Source, type Task, type ScheduledTask, type Scheduler, type Event, type Behavior, EventURI, type EventURI as EventURIType, BehaviorURI, type BehaviorURI as BehaviorURIType, } from "./interfaces.js";
|
|
2
|
+
export type { Disposable, Sink, Source, Task, ScheduledTask, Scheduler, Event, Behavior, } from "./interfaces.js";
|
|
4
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,MAAM,EACN,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,SAAS,EACT,SAAS,EACT,aAAa,EACb,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,MAAM,EACN,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,SAAS,EACT,SAAS,EACT,aAAa,EACb,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,UAAU,EACV,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,aAAa,EACb,SAAS,EACT,KAAK,EACL,QAAQ,GACT,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -16,24 +16,5 @@
|
|
|
16
16
|
/** Zero duration. */ const DURATION_ZERO = 0;
|
|
17
17
|
/** Zero offset. */ const OFFSET_ZERO = 0;
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
* Higher-Kinded Type encoding via URI-indexed Kind map.
|
|
21
|
-
*
|
|
22
|
-
* Uses module augmentation (Effect-TS / fp-ts style) so that each
|
|
23
|
-
* package can register its own types without circular imports.
|
|
24
|
-
*/ // biome-ignore lint/suspicious/noEmptyInterface: open for module augmentation
|
|
25
|
-
// --- Derived combinators ---
|
|
26
|
-
/** Lift a binary function over two Applicative values. */ const liftA2 = (A)=>(f, fa1, fa2)=>A.ap(A.map((a1)=>(a2)=>f(a1, a2), fa1), fa2);
|
|
27
|
-
/** Lift a ternary function over three Applicative values. */ const liftA3 = (A)=>(f, fa1, fa2, fa3)=>A.ap(A.ap(A.map((a1)=>(a2)=>(a3)=>f(a1, a2, a3), fa1), fa2), fa3);
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Core runtime interfaces for the push/pull reactive system.
|
|
31
|
-
*
|
|
32
|
-
* These define the contracts that packages/core and packages/scheduler implement.
|
|
33
|
-
* Denotational meanings are stated in JSDoc.
|
|
34
|
-
*/ // --- URI constants for HKT registration ---
|
|
35
|
-
const EventURI = "Event";
|
|
36
|
-
const BehaviorURI = "Behavior";
|
|
37
|
-
|
|
38
|
-
export { BehaviorURI, DURATION_ZERO, EventURI, OFFSET_ZERO, TIME_ZERO, liftA2, liftA3, timeAdd, timeDiff, timeShift, toDuration, toOffset, toTime };
|
|
19
|
+
export { DURATION_ZERO, OFFSET_ZERO, TIME_ZERO, timeAdd, timeDiff, timeShift, toDuration, toOffset, toTime };
|
|
39
20
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/branded.ts"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/branded.ts"],"sourcesContent":["/**\n * Branded types for temporal values.\n *\n * Branding prevents accidental mixing of Time, Duration, and Offset\n * at the type level while remaining plain numbers at runtime.\n */\n\ndeclare const TimeBrand: unique symbol;\ndeclare const DurationBrand: unique symbol;\ndeclare const OffsetBrand: unique symbol;\n\n/** Absolute point in time (milliseconds). Denotation: a point on the timeline. */\nexport type Time = number & { readonly [TimeBrand]: typeof TimeBrand };\n\n/** Relative duration (milliseconds). Denotation: a span between two points. */\nexport type Duration = number & { readonly [DurationBrand]: typeof DurationBrand };\n\n/** Scheduler-relative offset (milliseconds). Denotation: displacement from a scheduler's epoch. */\nexport type Offset = number & { readonly [OffsetBrand]: typeof OffsetBrand };\n\n// --- Constructors ---\n\n/** Wrap a raw millisecond value as a Time. */\nexport const toTime = (ms: number): Time => ms as Time;\n\n/** Wrap a raw millisecond value as a Duration. */\nexport const toDuration = (ms: number): Duration => ms as Duration;\n\n/** Wrap a raw millisecond value as an Offset. */\nexport const toOffset = (ms: number): Offset => ms as Offset;\n\n// --- Arithmetic ---\n\n/** Compute the Duration between two Time points. */\nexport const timeDiff = (a: Time, b: Time): Duration => (a - b) as Duration;\n\n/** Advance a Time by a Duration. */\nexport const timeAdd = (t: Time, d: Duration): Time => (t + d) as Time;\n\n/** Advance a Time by an Offset. */\nexport const timeShift = (t: Time, o: Offset): Time => (t + o) as Time;\n\n// --- Constants ---\n\n/** Time zero — the epoch. */\nexport const TIME_ZERO: Time = 0 as Time;\n\n/** Zero duration. */\nexport const DURATION_ZERO: Duration = 0 as Duration;\n\n/** Zero offset. */\nexport const OFFSET_ZERO: Offset = 0 as Offset;\n"],"names":["toTime","ms","toDuration","toOffset","timeDiff","a","b","timeAdd","t","d","timeShift","o","TIME_ZERO","DURATION_ZERO","OFFSET_ZERO"],"mappings":"AAAA;;;;;AAKC;AAiBD,+CACO,MAAMA,MAAAA,GAAS,CAACC,KAAqBA;AAE5C,mDACO,MAAMC,UAAAA,GAAa,CAACD,KAAyBA;AAEpD,kDACO,MAAME,QAAAA,GAAW,CAACF,KAAuBA;AAEhD;AAEA,qDACO,MAAMG,QAAAA,GAAW,CAACC,CAAAA,EAASC,CAAAA,GAAuBD,IAAIC;AAE7D,qCACO,MAAMC,OAAAA,GAAU,CAACC,CAAAA,EAASC,CAAAA,GAAuBD,IAAIC;AAE5D,oCACO,MAAMC,SAAAA,GAAY,CAACF,CAAAA,EAASG,CAAAA,GAAqBH,IAAIG;AAE5D;AAEA,8BACO,MAAMC,SAAAA,GAAkB;AAE/B,sBACO,MAAMC,aAAAA,GAA0B;AAEvC,oBACO,MAAMC,WAAAA,GAAsB;;;;"}
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -79,15 +79,5 @@ declare const BehaviorBrand: unique symbol;
|
|
|
79
79
|
export type Behavior<A, E = never> = {
|
|
80
80
|
readonly [BehaviorBrand]: [A, E];
|
|
81
81
|
};
|
|
82
|
-
export declare const EventURI: "Event";
|
|
83
|
-
export type EventURI = typeof EventURI;
|
|
84
|
-
export declare const BehaviorURI: "Behavior";
|
|
85
|
-
export type BehaviorURI = typeof BehaviorURI;
|
|
86
|
-
declare module "./hkt.js" {
|
|
87
|
-
interface URItoKind<A, E> {
|
|
88
|
-
readonly [EventURI]: Event<A, E>;
|
|
89
|
-
readonly [BehaviorURI]: Behavior<A, E>;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
82
|
export {};
|
|
93
83
|
//# sourceMappingURL=interfaces.d.ts.map
|
package/dist/interfaces.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAI3D,mDAAmD;AACnD,MAAM,WAAW,UAAU;IACzB,OAAO,IAAI,IAAI,CAAC;CACjB;AAID;;;;;GAKG;AACH,MAAM,WAAW,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK;IAChC,0CAA0C;IAC1C,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IAClC,2CAA2C;IAC3C,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC;IAChC,8CAA8C;IAC9C,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;CACvB;AAID;;;;;GAK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AM,WAAW,SAAS;IACxB,oDAAoD;IACpD,WAAW,IAAI,IAAI,CAAC;IAEpB,4CAA4C;IAC5C,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,GAAG,aAAa,CAAC;IAEzD,mEAAmE;IACnE,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpC,0CAA0C;IAC1C,UAAU,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;CACvC;AAID,OAAO,CAAC,MAAM,UAAU,EAAE,OAAO,MAAM,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,IAAI;IAChC,QAAQ,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC/B,CAAC;AAEF,OAAO,CAAC,MAAM,aAAa,EAAE,OAAO,MAAM,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,IAAI;IACnC,QAAQ,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAClC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aeon-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Core type definitions for Aeon reactive streams",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Josh Burgess",
|
|
@@ -11,7 +11,13 @@
|
|
|
11
11
|
},
|
|
12
12
|
"homepage": "https://github.com/joshburgess/aeon#readme",
|
|
13
13
|
"bugs": "https://github.com/joshburgess/aeon/issues",
|
|
14
|
-
"keywords": [
|
|
14
|
+
"keywords": [
|
|
15
|
+
"reactive",
|
|
16
|
+
"streams",
|
|
17
|
+
"frp",
|
|
18
|
+
"types",
|
|
19
|
+
"typescript"
|
|
20
|
+
],
|
|
15
21
|
"type": "module",
|
|
16
22
|
"sideEffects": false,
|
|
17
23
|
"main": "./dist/index.cjs",
|
|
@@ -29,14 +35,16 @@
|
|
|
29
35
|
}
|
|
30
36
|
}
|
|
31
37
|
},
|
|
32
|
-
"files": [
|
|
38
|
+
"files": [
|
|
39
|
+
"dist"
|
|
40
|
+
],
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"typescript": "^5.7.2"
|
|
43
|
+
},
|
|
33
44
|
"scripts": {
|
|
34
45
|
"build": "rm -rf dist && rollup -c rollup.config.mjs && tsc -p tsconfig.build.json && cp dist/index.d.ts dist/index.d.cts",
|
|
35
46
|
"typecheck": "tsc --noEmit",
|
|
36
47
|
"test": "vitest run",
|
|
37
48
|
"clean": "rm -rf dist"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"typescript": "^5.7.2"
|
|
41
49
|
}
|
|
42
|
-
}
|
|
50
|
+
}
|
package/dist/hkt.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Higher-Kinded Type encoding via URI-indexed Kind map.
|
|
3
|
-
*
|
|
4
|
-
* Uses module augmentation (Effect-TS / fp-ts style) so that each
|
|
5
|
-
* package can register its own types without circular imports.
|
|
6
|
-
*/
|
|
7
|
-
export interface URItoKind<A, E> {
|
|
8
|
-
}
|
|
9
|
-
/** Union of all registered type URIs. */
|
|
10
|
-
export type URIS = keyof URItoKind<unknown, unknown>;
|
|
11
|
-
/** Project a registered HKT to its concrete type given A and E. */
|
|
12
|
-
export type Kind<F extends URIS, A, E = never> = URItoKind<A, E>[F];
|
|
13
|
-
export interface Functor<F extends URIS> {
|
|
14
|
-
readonly URI: F;
|
|
15
|
-
readonly map: <A, B, E>(f: (a: A) => B, fa: Kind<F, A, E>) => Kind<F, B, E>;
|
|
16
|
-
}
|
|
17
|
-
export interface Applicative<F extends URIS> extends Functor<F> {
|
|
18
|
-
readonly of: <A>(a: A) => Kind<F, A, never>;
|
|
19
|
-
readonly ap: <A, B, E>(ff: Kind<F, (a: A) => B, E>, fa: Kind<F, A, E>) => Kind<F, B, E>;
|
|
20
|
-
}
|
|
21
|
-
export interface Monad<F extends URIS> extends Applicative<F> {
|
|
22
|
-
readonly chain: <A, B, E>(f: (a: A) => Kind<F, B, E>, fa: Kind<F, A, E>) => Kind<F, B, E>;
|
|
23
|
-
}
|
|
24
|
-
export interface Filterable<F extends URIS> {
|
|
25
|
-
readonly URI: F;
|
|
26
|
-
readonly filter: <A, E>(predicate: (a: A) => boolean, fa: Kind<F, A, E>) => Kind<F, A, E>;
|
|
27
|
-
}
|
|
28
|
-
/** Lift a binary function over two Applicative values. */
|
|
29
|
-
export declare const liftA2: <F extends URIS>(A: Applicative<F>) => <A1, A2, B, E>(f: (a1: A1, a2: A2) => B, fa1: Kind<F, A1, E>, fa2: Kind<F, A2, E>) => Kind<F, B, E>;
|
|
30
|
-
/** Lift a ternary function over three Applicative values. */
|
|
31
|
-
export declare const liftA3: <F extends URIS>(A: Applicative<F>) => <A1, A2, A3, B, E>(f: (a1: A1, a2: A2, a3: A3) => B, fa1: Kind<F, A1, E>, fa2: Kind<F, A2, E>, fa3: Kind<F, A3, E>) => Kind<F, B, E>;
|
|
32
|
-
//# sourceMappingURL=hkt.d.ts.map
|
package/dist/hkt.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hkt.d.ts","sourceRoot":"","sources":["../src/hkt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,MAAM,WAAW,SAAS,CAAC,CAAC,EAAE,CAAC;CAAI;AAEnC,yCAAyC;AACzC,MAAM,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAErD,mEAAmE;AACnE,MAAM,MAAM,IAAI,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,IAAI,SAAS,CAAC,C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