fortepiano 1.0.3 → 1.0.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#96](https://github.com/facile-it/fortepiano/pull/96) [`854860e`](https://github.com/facile-it/fortepiano/commit/854860ea7e6f27b137a13f4dfb4e077f198106d6) Thanks [@pierroberto](https://github.com/pierroberto)! - Upgrade the development toolchain.
8
+
9
+ - typescript 4.7.4 → 6.0.3
10
+ - eslint 8.18.0 → 9.39.5
11
+ - eslint-config-facile 0.5.0 → 1.2.0
12
+ - jest 26.6.3 → 30.5.2
13
+ - ts-jest 26.5.6 → 29.4.14
14
+ - @types/jest 26.0.24 → 30.0.0
15
+ - prettier 2.7.1 → 3.9.10
16
+ - @types/node 22.8.7 → 26.6.5
17
+ - fp-ts 2.12.1 → 2.16.11 (devDependency; peer stays ^2.5.0)
18
+ - io-ts 2.2.16 → 2.2.22 (devDependency; peer stays ^2.2.0)
19
+
20
+ Remove @rushstack/eslint-patch and move ESLint to the flat config.
21
+
3
22
  ## 1.0.3
4
23
 
5
24
  ### Patch Changes
@@ -1,23 +1,23 @@
1
- import * as Appli from 'fp-ts/Applicative';
1
+ import type * as Appli from 'fp-ts/Applicative';
2
2
  import * as _Apply from 'fp-ts/Apply';
3
3
  import * as C from 'fp-ts/Chain';
4
4
  import * as FIO from 'fp-ts/FromIO';
5
5
  import * as F from 'fp-ts/Functor';
6
6
  import * as IO from 'fp-ts/IO';
7
- import * as M from 'fp-ts/Monad';
8
- import * as MIO from 'fp-ts/MonadIO';
9
- import * as P from 'fp-ts/Pointed';
7
+ import type * as M from 'fp-ts/Monad';
8
+ import type * as MIO from 'fp-ts/MonadIO';
9
+ import type * as P from 'fp-ts/Pointed';
10
10
  import * as RNEA from 'fp-ts/ReadonlyNonEmptyArray';
11
11
  import * as RR from 'fp-ts/ReadonlyRecord';
12
- import { PartialDeep } from './utils/struct';
12
+ import type { PartialDeep } from './utils/struct';
13
13
  export declare const URI = "Mock";
14
- export declare type URI = typeof URI;
14
+ export type URI = typeof URI;
15
15
  declare module 'fp-ts/HKT' {
16
16
  interface URItoKind<A> {
17
17
  readonly [URI]: Mock<A>;
18
18
  }
19
19
  }
20
- declare type EnforceNonEmptyRecord<R> = keyof R extends never ? never : R;
20
+ type EnforceNonEmptyRecord<R> = keyof R extends never ? never : R;
21
21
  export interface Mock<A> {
22
22
  (...as: ReadonlyArray<PartialDeep<A>>): IO.IO<A>;
23
23
  }
@@ -36,12 +36,12 @@ export declare const apS: <N extends string, A, B>(name: Exclude<N, keyof A>, fb
36
36
  export declare const Applicative: Appli.Applicative1<URI>;
37
37
  export declare const Chain: C.Chain1<URI>;
38
38
  export declare const chain: <A, B>(a: (a: A) => Mock<B>) => (b: Mock<A>) => Mock<B>;
39
- export declare const chainFirst: <A, B>(f: (a: A) => Mock<B>) => (first: Mock<A>) => Mock<A>;
39
+ export declare const chainFirst: <A, _>(f: (a: A) => Mock<_>) => (first: Mock<A>) => Mock<A>;
40
40
  export declare const bind: <N extends string, A, B>(name: Exclude<N, keyof A>, f: (a: A) => Mock<B>) => (ma: Mock<A>) => Mock<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B; }>;
41
41
  export declare const Monad: M.Monad1<URI>;
42
42
  export declare const FromIO: FIO.FromIO1<URI>;
43
- export declare const fromIO: import("fp-ts/lib/NaturalTransformation").NaturalTransformation11<"IO", "Mock">;
44
- export declare const fromIOK: <A extends readonly unknown[], B>(f: (...a: A) => IO.IO<B>) => (...a: A) => Mock<B>;
43
+ export declare const fromIO: <A>(fa: IO.IO<A>) => Mock<A>;
44
+ export declare const fromIOK: <A extends ReadonlyArray<unknown>, B>(f: (...a: A) => IO.IO<B>) => (...a: A) => Mock<B>;
45
45
  export declare const chainIOK: <A, B>(f: (a: A) => IO.IO<B>) => (first: Mock<A>) => Mock<B>;
46
46
  export declare const chainFirstIOK: <A, B>(f: (a: A) => IO.IO<B>) => (first: Mock<A>) => Mock<A>;
47
47
  export declare const MonadIO: MIO.MonadIO1<URI>;
@@ -53,7 +53,7 @@ export declare const float: (min?: number, max?: number) => Mock<number>;
53
53
  export declare const integer: (min?: number, max?: number) => Mock<number>;
54
54
  export declare const number: (min?: number, max?: number) => Mock<number>;
55
55
  export declare const string: Mock<string>;
56
- export declare const literal: <A extends string | number | boolean>(a: A) => Mock<A>;
56
+ export declare const literal: <A extends boolean | number | string>(a: A) => Mock<A>;
57
57
  export declare const unknown: (depth?: number) => Mock<unknown>;
58
58
  export declare const nullable: <A>(M: Mock<A>) => Mock<A | undefined>;
59
59
  export declare const tuple: <T extends Mock<any>[]>(...t: T & {
@@ -75,7 +75,7 @@ export declare function union<A, B, C, D, E>(a: Mock<A>, b: Mock<B>, c: Mock<C>,
75
75
  export declare function union<A, B, C, D>(a: Mock<A>, b: Mock<B>, c: Mock<C>, d: Mock<D>): Mock<A | B | C | D>;
76
76
  export declare function union<A, B, C>(a: Mock<A>, b: Mock<B>, c: Mock<C>): Mock<A | B | C>;
77
77
  export declare function union<A, B>(a: Mock<A>, b: Mock<B>): Mock<A | B>;
78
- export declare const readonlyArray: <A>(M: Mock<A>, min?: number, max?: number) => Mock<readonly A[]>;
78
+ export declare const readonlyArray: <A>(M: Mock<A>, min?: number, max?: number) => Mock<ReadonlyArray<A>>;
79
79
  export declare const readonlyNonEmptyArray: <A>(M: Mock<A>, min?: number, max?: number) => Mock<RNEA.ReadonlyNonEmptyArray<A>>;
80
- export declare const readonlyRecord: <K extends string, T>(KM: Mock<K>, TM: Mock<T>, min?: number, max?: number) => Mock<Readonly<Record<K, T>>>;
80
+ export declare const readonlyRecord: <K extends string, T>(KM: Mock<K>, TM: Mock<T>, min?: number, max?: number) => Mock<RR.ReadonlyRecord<K, T>>;
81
81
  export { _void as void, _undefined as undefined, _null as null };
package/dist/cjs/index.js CHANGED
@@ -15,15 +15,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.null = exports.undefined = exports.void = exports.readonlyRecord = exports.readonlyNonEmptyArray = exports.readonlyArray = exports.union = exports.partial = exports.struct = exports.tuple = exports.nullable = exports.unknown = exports.literal = exports.string = exports.number = exports.integer = exports.float = exports.boolean = exports.MonadIO = exports.chainFirstIOK = exports.chainIOK = exports.fromIOK = exports.fromIO = exports.FromIO = exports.Monad = exports.bind = exports.chainFirst = exports.chain = exports.Chain = exports.Applicative = exports.apS = exports.apSecond = exports.apFirst = exports.ap = exports.Apply = exports.Do = exports.of = exports.Pointed = exports.bindTo = exports.flap = exports.map = exports.Functor = exports.URI = void 0;
36
+ exports.null = exports.undefined = exports.void = exports.readonlyRecord = exports.readonlyNonEmptyArray = exports.readonlyArray = exports.partial = exports.struct = exports.tuple = exports.nullable = exports.unknown = exports.literal = exports.string = exports.number = exports.integer = exports.float = exports.boolean = exports.MonadIO = exports.chainFirstIOK = exports.chainIOK = exports.fromIOK = exports.fromIO = exports.FromIO = exports.Monad = exports.bind = exports.chainFirst = exports.chain = exports.Chain = exports.Applicative = exports.apS = exports.apSecond = exports.apFirst = exports.ap = exports.Apply = exports.Do = exports.of = exports.Pointed = exports.bindTo = exports.flap = exports.map = exports.Functor = exports.URI = void 0;
37
+ exports.union = union;
27
38
  const _Apply = __importStar(require("fp-ts/Apply"));
28
39
  const C = __importStar(require("fp-ts/Chain"));
29
40
  const FIO = __importStar(require("fp-ts/FromIO"));
@@ -48,7 +59,7 @@ exports.Functor = {
48
59
  URI: exports.URI,
49
60
  map: (fa, f) => (0, function_1.pipe)(fa(), IO.map(f), exports.FromIO.fromIO),
50
61
  };
51
- exports.map = (0, function_2.curry)((0, function_1.flip)(exports.Functor.map));
62
+ exports.map = (0, function_2.curry)((0, function_2.flip)(exports.Functor.map));
52
63
  exports.flap = F.flap(exports.Functor);
53
64
  exports.bindTo = F.bindTo(exports.Functor);
54
65
  exports.Pointed = {
@@ -60,13 +71,13 @@ exports.Pointed = {
60
71
  exports.of = exports.Pointed.of;
61
72
  exports.Do = exports.Pointed.of({});
62
73
  exports.Apply = Object.assign(Object.assign({}, exports.Functor), { ap: (fab, fa) => exports.Chain.chain(fab, (0, function_2.curry)(exports.Functor.map)(fa)) });
63
- exports.ap = (0, function_2.curry)((0, function_1.flip)(exports.Apply.ap));
74
+ exports.ap = (0, function_2.curry)((0, function_2.flip)(exports.Apply.ap));
64
75
  exports.apFirst = _Apply.apFirst(exports.Apply);
65
76
  exports.apSecond = _Apply.apSecond(exports.Apply);
66
77
  exports.apS = _Apply.apS(exports.Apply);
67
78
  exports.Applicative = Object.assign(Object.assign({}, exports.Pointed), exports.Apply);
68
79
  exports.Chain = Object.assign(Object.assign({}, exports.Apply), { chain: (fa, f) => exports.Functor.map(exports.Functor.map(fa, f), (fb) => fb()()) });
69
- exports.chain = (0, function_2.curry)((0, function_1.flip)(exports.Chain.chain));
80
+ exports.chain = (0, function_2.curry)((0, function_2.flip)(exports.Chain.chain));
70
81
  exports.chainFirst = C.chainFirst(exports.Chain);
71
82
  exports.bind = C.bind(exports.Chain);
72
83
  exports.Monad = Object.assign(Object.assign({}, exports.Applicative), exports.Chain);
@@ -108,7 +119,6 @@ exports.partial = partial;
108
119
  function union(...Ms) {
109
120
  return (0, function_1.pipe)(Ms, R.randomElem, IO.chain(function_2.run), exports.fromIO);
110
121
  }
111
- exports.union = union;
112
122
  const readonlyArray = (M, min = 0, max = 10) => {
113
123
  return (as) => () => {
114
124
  if (as !== undefined) {
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.struct = void 0;
27
37
  const function_1 = require("fp-ts/function");
@@ -1,4 +1,5 @@
1
- import { Lazy } from 'fp-ts/function';
1
+ import type { Lazy } from 'fp-ts/function';
2
+ export declare function flip<A, B, C>(f: (a: A, b: B) => C): (b: B, a: A) => C;
2
3
  export declare const run: <A>(f: Lazy<A>) => A;
3
4
  export declare function curry<A, B, C>(f: (a: A, b: B) => C): (a: A) => (b: B) => C;
4
5
  export declare function curry<A, B, C, D>(f: (a: A, b: B, c: C) => D): (a: A) => (b: B) => (c: C) => D;
@@ -1,6 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.recurse = exports.curry = exports.run = void 0;
3
+ exports.recurse = exports.run = void 0;
4
+ exports.flip = flip;
5
+ exports.curry = curry;
6
+ function flip(f) {
7
+ return (b, a) => {
8
+ return f(a, b);
9
+ };
10
+ }
4
11
  const run = (f) => f();
5
12
  exports.run = run;
6
13
  function curry(f) {
@@ -10,7 +17,6 @@ function curry(f) {
10
17
  : (...rest) => curried(...head.concat(rest));
11
18
  };
12
19
  }
13
- exports.curry = curry;
14
20
  /**
15
21
  * @example
16
22
  * const pi = (max: number) => (): ((n?: number) => number) =>
@@ -1,16 +1,16 @@
1
- import { Predicate } from 'fp-ts/Predicate';
2
- export declare type Struct = object;
3
- export declare type PartialDeep<A> = A extends {
1
+ import type { Predicate } from 'fp-ts/Predicate';
2
+ export type Struct = object;
3
+ export type PartialDeep<A> = A extends {
4
4
  readonly [x: string]: unknown;
5
5
  } ? Partial<{
6
6
  readonly [K in keyof A]: PartialDeep<A[K]>;
7
7
  }> : A;
8
- declare type IntersectionDeep<A, B> = A extends {
8
+ type IntersectionDeep<A, B> = A extends {
9
9
  readonly [x: string]: unknown;
10
10
  } ? A & {
11
11
  readonly [K in keyof B]: IntersectionDeep<K extends keyof A ? A[K] : unknown, B[K]>;
12
12
  } : B;
13
- export declare const toReadonlyArray: <A extends object>(a: A) => readonly (readonly [keyof A, A[keyof A]])[];
14
- export declare const filterDeep: <A extends object>(f: Predicate<unknown>) => (a: A) => PartialDeep<A>;
15
- export declare const patch: <A extends object, B extends PartialDeep<A> & object>(b: B) => (a: A) => IntersectionDeep<A, B>;
13
+ export declare const toReadonlyArray: <A extends Struct>(a: A) => ReadonlyArray<Readonly<[keyof A, A[keyof A]]>>;
14
+ export declare const filterDeep: <A extends Struct>(f: Predicate<unknown>) => (a: A) => PartialDeep<A>;
15
+ export declare const patch: <A extends Struct, B extends PartialDeep<A> & Struct>(b: B) => (a: A) => IntersectionDeep<A, B>;
16
16
  export {};
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.patch = exports.filterDeep = exports.toReadonlyArray = void 0;
27
37
  const function_1 = require("fp-ts/function");
@@ -1,23 +1,23 @@
1
- import * as Appli from 'fp-ts/Applicative';
1
+ import type * as Appli from 'fp-ts/Applicative';
2
2
  import * as _Apply from 'fp-ts/Apply';
3
3
  import * as C from 'fp-ts/Chain';
4
4
  import * as FIO from 'fp-ts/FromIO';
5
5
  import * as F from 'fp-ts/Functor';
6
6
  import * as IO from 'fp-ts/IO';
7
- import * as M from 'fp-ts/Monad';
8
- import * as MIO from 'fp-ts/MonadIO';
9
- import * as P from 'fp-ts/Pointed';
7
+ import type * as M from 'fp-ts/Monad';
8
+ import type * as MIO from 'fp-ts/MonadIO';
9
+ import type * as P from 'fp-ts/Pointed';
10
10
  import * as RNEA from 'fp-ts/ReadonlyNonEmptyArray';
11
11
  import * as RR from 'fp-ts/ReadonlyRecord';
12
- import { PartialDeep } from './utils/struct';
12
+ import type { PartialDeep } from './utils/struct';
13
13
  export declare const URI = "Mock";
14
- export declare type URI = typeof URI;
14
+ export type URI = typeof URI;
15
15
  declare module 'fp-ts/HKT' {
16
16
  interface URItoKind<A> {
17
17
  readonly [URI]: Mock<A>;
18
18
  }
19
19
  }
20
- declare type EnforceNonEmptyRecord<R> = keyof R extends never ? never : R;
20
+ type EnforceNonEmptyRecord<R> = keyof R extends never ? never : R;
21
21
  export interface Mock<A> {
22
22
  (...as: ReadonlyArray<PartialDeep<A>>): IO.IO<A>;
23
23
  }
@@ -36,12 +36,12 @@ export declare const apS: <N extends string, A, B>(name: Exclude<N, keyof A>, fb
36
36
  export declare const Applicative: Appli.Applicative1<URI>;
37
37
  export declare const Chain: C.Chain1<URI>;
38
38
  export declare const chain: <A, B>(a: (a: A) => Mock<B>) => (b: Mock<A>) => Mock<B>;
39
- export declare const chainFirst: <A, B>(f: (a: A) => Mock<B>) => (first: Mock<A>) => Mock<A>;
39
+ export declare const chainFirst: <A, _>(f: (a: A) => Mock<_>) => (first: Mock<A>) => Mock<A>;
40
40
  export declare const bind: <N extends string, A, B>(name: Exclude<N, keyof A>, f: (a: A) => Mock<B>) => (ma: Mock<A>) => Mock<{ readonly [K in N | keyof A]: K extends keyof A ? A[K] : B; }>;
41
41
  export declare const Monad: M.Monad1<URI>;
42
42
  export declare const FromIO: FIO.FromIO1<URI>;
43
- export declare const fromIO: import("fp-ts/lib/NaturalTransformation").NaturalTransformation11<"IO", "Mock">;
44
- export declare const fromIOK: <A extends readonly unknown[], B>(f: (...a: A) => IO.IO<B>) => (...a: A) => Mock<B>;
43
+ export declare const fromIO: <A>(fa: IO.IO<A>) => Mock<A>;
44
+ export declare const fromIOK: <A extends ReadonlyArray<unknown>, B>(f: (...a: A) => IO.IO<B>) => (...a: A) => Mock<B>;
45
45
  export declare const chainIOK: <A, B>(f: (a: A) => IO.IO<B>) => (first: Mock<A>) => Mock<B>;
46
46
  export declare const chainFirstIOK: <A, B>(f: (a: A) => IO.IO<B>) => (first: Mock<A>) => Mock<A>;
47
47
  export declare const MonadIO: MIO.MonadIO1<URI>;
@@ -53,7 +53,7 @@ export declare const float: (min?: number, max?: number) => Mock<number>;
53
53
  export declare const integer: (min?: number, max?: number) => Mock<number>;
54
54
  export declare const number: (min?: number, max?: number) => Mock<number>;
55
55
  export declare const string: Mock<string>;
56
- export declare const literal: <A extends string | number | boolean>(a: A) => Mock<A>;
56
+ export declare const literal: <A extends boolean | number | string>(a: A) => Mock<A>;
57
57
  export declare const unknown: (depth?: number) => Mock<unknown>;
58
58
  export declare const nullable: <A>(M: Mock<A>) => Mock<A | undefined>;
59
59
  export declare const tuple: <T extends Mock<any>[]>(...t: T & {
@@ -75,7 +75,7 @@ export declare function union<A, B, C, D, E>(a: Mock<A>, b: Mock<B>, c: Mock<C>,
75
75
  export declare function union<A, B, C, D>(a: Mock<A>, b: Mock<B>, c: Mock<C>, d: Mock<D>): Mock<A | B | C | D>;
76
76
  export declare function union<A, B, C>(a: Mock<A>, b: Mock<B>, c: Mock<C>): Mock<A | B | C>;
77
77
  export declare function union<A, B>(a: Mock<A>, b: Mock<B>): Mock<A | B>;
78
- export declare const readonlyArray: <A>(M: Mock<A>, min?: number, max?: number) => Mock<readonly A[]>;
78
+ export declare const readonlyArray: <A>(M: Mock<A>, min?: number, max?: number) => Mock<ReadonlyArray<A>>;
79
79
  export declare const readonlyNonEmptyArray: <A>(M: Mock<A>, min?: number, max?: number) => Mock<RNEA.ReadonlyNonEmptyArray<A>>;
80
- export declare const readonlyRecord: <K extends string, T>(KM: Mock<K>, TM: Mock<T>, min?: number, max?: number) => Mock<Readonly<Record<K, T>>>;
80
+ export declare const readonlyRecord: <K extends string, T>(KM: Mock<K>, TM: Mock<T>, min?: number, max?: number) => Mock<RR.ReadonlyRecord<K, T>>;
81
81
  export { _void as void, _undefined as undefined, _null as null };
package/dist/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _Apply from 'fp-ts/Apply';
2
2
  import * as C from 'fp-ts/Chain';
3
3
  import * as FIO from 'fp-ts/FromIO';
4
- import { constNull, constUndefined, constVoid, flip, pipe, } from 'fp-ts/function';
4
+ import { constNull, constUndefined, constVoid, pipe } from 'fp-ts/function';
5
5
  import * as F from 'fp-ts/Functor';
6
6
  import * as IO from 'fp-ts/IO';
7
7
  import * as N from 'fp-ts/number';
@@ -14,7 +14,7 @@ import * as RNEA from 'fp-ts/ReadonlyNonEmptyArray';
14
14
  import * as RR from 'fp-ts/ReadonlyRecord';
15
15
  import * as Se from 'fp-ts/Semigroup';
16
16
  import * as t from 'io-ts';
17
- import { curry, recurse, run } from './utils/function';
17
+ import { curry, flip, recurse, run } from './utils/function';
18
18
  import * as $St from './utils/struct';
19
19
  import * as $t from './utils/Type';
20
20
  export const URI = 'Mock';
@@ -1,4 +1,5 @@
1
- import { Lazy } from 'fp-ts/function';
1
+ import type { Lazy } from 'fp-ts/function';
2
+ export declare function flip<A, B, C>(f: (a: A, b: B) => C): (b: B, a: A) => C;
2
3
  export declare const run: <A>(f: Lazy<A>) => A;
3
4
  export declare function curry<A, B, C>(f: (a: A, b: B) => C): (a: A) => (b: B) => C;
4
5
  export declare function curry<A, B, C, D>(f: (a: A, b: B, c: C) => D): (a: A) => (b: B) => (c: C) => D;
@@ -1,3 +1,8 @@
1
+ export function flip(f) {
2
+ return (b, a) => {
3
+ return f(a, b);
4
+ };
5
+ }
1
6
  export const run = (f) => f();
2
7
  export function curry(f) {
3
8
  return function curried(...head) {
@@ -1,16 +1,16 @@
1
- import { Predicate } from 'fp-ts/Predicate';
2
- export declare type Struct = object;
3
- export declare type PartialDeep<A> = A extends {
1
+ import type { Predicate } from 'fp-ts/Predicate';
2
+ export type Struct = object;
3
+ export type PartialDeep<A> = A extends {
4
4
  readonly [x: string]: unknown;
5
5
  } ? Partial<{
6
6
  readonly [K in keyof A]: PartialDeep<A[K]>;
7
7
  }> : A;
8
- declare type IntersectionDeep<A, B> = A extends {
8
+ type IntersectionDeep<A, B> = A extends {
9
9
  readonly [x: string]: unknown;
10
10
  } ? A & {
11
11
  readonly [K in keyof B]: IntersectionDeep<K extends keyof A ? A[K] : unknown, B[K]>;
12
12
  } : B;
13
- export declare const toReadonlyArray: <A extends object>(a: A) => readonly (readonly [keyof A, A[keyof A]])[];
14
- export declare const filterDeep: <A extends object>(f: Predicate<unknown>) => (a: A) => PartialDeep<A>;
15
- export declare const patch: <A extends object, B extends PartialDeep<A> & object>(b: B) => (a: A) => IntersectionDeep<A, B>;
13
+ export declare const toReadonlyArray: <A extends Struct>(a: A) => ReadonlyArray<Readonly<[keyof A, A[keyof A]]>>;
14
+ export declare const filterDeep: <A extends Struct>(f: Predicate<unknown>) => (a: A) => PartialDeep<A>;
15
+ export declare const patch: <A extends Struct, B extends PartialDeep<A> & Struct>(b: B) => (a: A) => IntersectionDeep<A, B>;
16
16
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fortepiano",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Playing actual music over fp-ts notes",
5
5
  "keywords": [
6
6
  "typescript",
@@ -54,18 +54,17 @@
54
54
  "devDependencies": {
55
55
  "@changesets/changelog-github": "^1.0.1",
56
56
  "@changesets/cli": "^3.0.3",
57
- "@rushstack/eslint-patch": "^1.1.3",
58
- "@types/jest": "^26.0.24",
59
- "@types/node": "^22.8.7",
60
- "eslint": "^8.16.0",
61
- "eslint-config-facile": "^0.5.0",
62
- "fp-ts": "^2.0.0",
63
- "io-ts": "^2.0.0",
64
- "jest": "^26.6.3",
65
- "prettier": "^2.6.2",
66
- "ts-jest": "^26.5.6",
57
+ "@types/jest": "^30.0.0",
58
+ "@types/node": "^26.6.5",
59
+ "eslint": "^9.39.5",
60
+ "eslint-config-facile": "^1.2.0",
61
+ "fp-ts": "^2.16.0",
62
+ "io-ts": "^2.2.20",
63
+ "jest": "^30.5.2",
64
+ "prettier": "^3.3.3",
65
+ "ts-jest": "^29.2.5",
67
66
  "ts-node": "^10.9.2",
68
- "typescript": "^4.6.4"
67
+ "typescript": "^6.0.3"
69
68
  },
70
69
  "peerDependencies": {
71
70
  "fp-ts": "^2.5.0",