@systemfsoftware/effect-schema-law 0.3.1 → 0.3.3

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.
@@ -0,0 +1,20 @@
1
+ import { Schema } from 'effect';
2
+
3
+ export declare const boundedUnion: <Base extends readonly [Schema.Schema.Any, ...ReadonlyArray<Schema.Schema.Any>], Recur extends readonly [Schema.Schema.Any, ...ReadonlyArray<Schema.Schema.Any>]>(identifier: string, options: {
4
+ readonly base: Base;
5
+ readonly recur: Recur;
6
+ readonly maxDepth?: number;
7
+ }) => Schema.Schema<Schema.Schema.Type<Base[number] | Recur[number]>, Schema.Schema.Encoded<Base[number] | Recur[number]>, Schema.Schema.Context<Base[number] | Recur[number]>>;
8
+
9
+ /**
10
+ * Property-test the round-trip and encode-stability laws of any Effect Schema.
11
+ *
12
+ * Registers two fast-check properties with `@effect/vitest`:
13
+ * 1. `∀x. enc(dec(enc(x))) === enc(x)` — encode stability across decode.
14
+ * 2. `∀x. dec(enc(x)) === x` — round-trip identity.
15
+ *
16
+ * Use inside a `describe` block to scope the generated tests.
17
+ */
18
+ export declare const ruleOfSchemas: <A, I>(name: string, schema: Schema.Schema<A, I, never>) => void;
19
+
20
+ export { }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@systemfsoftware/effect-schema-law",
3
3
  "license": "MIT",
4
- "version": "0.3.1",
4
+ "version": "0.3.3",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",
@@ -45,9 +45,9 @@
45
45
  "tsdown": "^0.22.9",
46
46
  "vite-tsconfig-paths": "^6.1.1",
47
47
  "vitest": "^4",
48
- "@systemfsoftware/tsconfig": "^1.1.0",
48
+ "@systemfsoftware/arethetypeswrong-cli": "^1.0.1",
49
49
  "@systemfsoftware/oxlint-config": "^0.1.0",
50
- "@systemfsoftware/arethetypeswrong-cli": "^1.0.0",
50
+ "@systemfsoftware/tsconfig": "^1.1.0",
51
51
  "@systemfsoftware/vitest-config": "^0.1.0"
52
52
  },
53
53
  "peerDependencies": {
@@ -57,7 +57,7 @@
57
57
  },
58
58
  "scripts": {
59
59
  "clean": "rimraf dist",
60
- "build": "tsdown",
60
+ "build": "tsdown && api-extractor run --local",
61
61
  "typecheck": "tsc --noEmit --incremental",
62
62
  "test": "vitest run",
63
63
  "test:run": "vitest run",