@typed/guard 1.0.0-beta.0 → 1.0.0-beta.1

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
@@ -85,12 +85,16 @@ const Positive = Schema.Number.pipe(Schema.positive());
85
85
  const guardDecode = Guard.fromSchemaDecode(Positive);
86
86
 
87
87
  // Inside Effect.gen(function* () { ... })
88
- const result = yield* guardDecode(42).pipe(
89
- Effect.map(Option.match({
90
- onNone: () => "invalid",
91
- onSome: (n) => `ok: ${n}`,
92
- })),
93
- );
88
+ const result =
89
+ yield *
90
+ guardDecode(42).pipe(
91
+ Effect.map(
92
+ Option.match({
93
+ onNone: () => "invalid",
94
+ onSome: (n) => `ok: ${n}`,
95
+ }),
96
+ ),
97
+ );
94
98
  // result === "ok: 42"
95
99
 
96
100
  const even = Guard.liftPredicate((n: number) => n % 2 === 0);
package/package.json CHANGED
@@ -1,9 +1,6 @@
1
1
  {
2
2
  "name": "@typed/guard",
3
- "version": "1.0.0-beta.0",
4
- "publishConfig": {
5
- "access": "public"
6
- },
3
+ "version": "1.0.0-beta.1",
7
4
  "type": "module",
8
5
  "exports": {
9
6
  ".": {
@@ -15,15 +12,22 @@
15
12
  "import": "./dist/*.js"
16
13
  }
17
14
  },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "scripts": {
19
+ "build": "[ -d dist ] || rm -f tsconfig.tsbuildinfo; tsc",
20
+ "test": "vitest run --passWithNoTests"
21
+ },
18
22
  "dependencies": {
19
- "effect": "4.0.0-beta.4"
23
+ "effect": "catalog:"
20
24
  },
21
25
  "devDependencies": {
22
- "typescript": "5.9.3",
23
- "vitest": "4.0.18"
26
+ "typescript": "catalog:",
27
+ "vitest": "catalog:"
24
28
  },
25
- "scripts": {
26
- "build": "tsc",
27
- "test": "vitest run --passWithNoTests"
28
- }
29
- }
29
+ "files": [
30
+ "dist",
31
+ "src"
32
+ ]
33
+ }
package/src/index.ts CHANGED
@@ -368,7 +368,7 @@ export const catchTag: {
368
368
  R | R2
369
369
  > {
370
370
  const g = getGuard(guard);
371
- return (i: I) => Effect.catchTag(g(i), tag as any, (e) => Effect.asSome(f(e)));
371
+ return (i: I) => Effect.catchTag(g(i), tag as any, (e) => Effect.asSome(f(e as any)));
372
372
  });
373
373
 
374
374
  /**
package/tsconfig.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": { "rootDir": "src", "outDir": "dist" },
4
- "include": ["src"]
5
- }