@pithos/core 2.1.1 → 2.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.
@@ -0,0 +1,31 @@
1
+ /**
2
+ * A lightweight discriminated union for success/failure outcomes.
3
+ *
4
+ * Use this when you need a typed return value without the full
5
+ * `Result<T, E>` class from Zygos. No methods, no runtime cost,
6
+ * just a plain object.
7
+ *
8
+ * @template E - The error type. Defaults to `string`.
9
+ * @since 2.2.0
10
+ * @example
11
+ * ```typescript
12
+ * function save(data: string): SimpleResult {
13
+ * if (data.length > 1000) {
14
+ * return { ok: false, error: 'Payload too large' }
15
+ * }
16
+ * return { ok: true }
17
+ * }
18
+ *
19
+ * const result = save(payload)
20
+ * if (!result.ok) {
21
+ * console.error(result.error)
22
+ * }
23
+ * ```
24
+ */
25
+ export type SimpleResult<E = string> = {
26
+ ok: true;
27
+ } | {
28
+ ok: false;
29
+ error: E;
30
+ };
31
+ //# sourceMappingURL=simple-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple-result.d.ts","sourceRoot":"","sources":["../../../../src/arkhe/types/common/simple-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,MAAM,IAAI;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=simple-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple-result.js","sourceRoot":"","sources":["../../../../src/arkhe/types/common/simple-result.ts"],"names":[],"mappings":""}
@@ -10,7 +10,7 @@
10
10
  * ❌ const distance = math.geometry.distance; // from autocompletion
11
11
  * ✅ import { distance } from 'pithos/math/geometry';
12
12
  *
13
- * Generated on: 2026-03-07T08:17:09.168Z
13
+ * Generated on: 2026-03-07T15:23:33.893Z
14
14
  * */
15
15
 
16
16
  /**
@@ -500,6 +500,8 @@ declare const _autocompletion: {
500
500
  };
501
501
  nullish: {
502
502
  };
503
+ simple_result: {
504
+ };
503
505
  };
504
506
  dom: {
505
507
  attachable: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pithos/core",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "Advanced JavaScript/TypeScript superset providing utilities, validation, and functional patterns",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -30,6 +30,7 @@
30
30
  "./kanon/core/*": "./dist/kanon/core/*.js",
31
31
  "./kanon/helpers/*": "./dist/kanon/helpers/*.js",
32
32
  "./kanon/*": "./dist/kanon/*.js",
33
+ "./kanon": "./dist/kanon/index.js",
33
34
  "./kanon/jit/builders/*": "./dist/kanon/jit/builders/*.js",
34
35
  "./kanon/jit/builders/composites/*": "./dist/kanon/jit/builders/composites/*.js",
35
36
  "./kanon/jit/builders/operators/*": "./dist/kanon/jit/builders/operators/*.js",