@sushichan044/kg-core 0.6.4 → 0.7.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,18 @@
1
+ //#region src/internal/assert-never.ts
2
+ /**
3
+ * Marks a branch the compiler proved unreachable. Reaching it at runtime means a variant was added
4
+ * to a union without updating the switch that produced this call.
5
+ */
6
+ function assertNever(value) {
7
+ throw new TypeError(`unhandled variant: ${JSON.stringify(value)}`);
8
+ }
9
+ //#endregion
10
+ //#region src/internal/describe-cause.ts
11
+ /**
12
+ * Renders an unknown throwable for display, without assuming it is an Error.
13
+ */
14
+ function describeCause(cause) {
15
+ return cause instanceof Error ? cause.message : String(cause);
16
+ }
17
+ //#endregion
18
+ export { assertNever as n, describeCause as t };