bupkis 0.11.1 → 0.12.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.
Files changed (128) hide show
  1. package/CHANGELOG.md +68 -91
  2. package/dist/commonjs/assertion/assertion-async.d.ts.map +1 -1
  3. package/dist/commonjs/assertion/assertion-async.js +32 -9
  4. package/dist/commonjs/assertion/assertion-async.js.map +1 -1
  5. package/dist/commonjs/assertion/assertion-standard-schema-async.d.ts +64 -0
  6. package/dist/commonjs/assertion/assertion-standard-schema-async.d.ts.map +1 -0
  7. package/dist/commonjs/assertion/assertion-standard-schema-async.js +155 -0
  8. package/dist/commonjs/assertion/assertion-standard-schema-async.js.map +1 -0
  9. package/dist/commonjs/assertion/assertion-standard-schema-sync.d.ts +64 -0
  10. package/dist/commonjs/assertion/assertion-standard-schema-sync.d.ts.map +1 -0
  11. package/dist/commonjs/assertion/assertion-standard-schema-sync.js +164 -0
  12. package/dist/commonjs/assertion/assertion-standard-schema-sync.js.map +1 -0
  13. package/dist/commonjs/assertion/assertion-sync.d.ts.map +1 -1
  14. package/dist/commonjs/assertion/assertion-sync.js +38 -5
  15. package/dist/commonjs/assertion/assertion-sync.js.map +1 -1
  16. package/dist/commonjs/assertion/assertion-types.d.ts +82 -14
  17. package/dist/commonjs/assertion/assertion-types.d.ts.map +1 -1
  18. package/dist/commonjs/assertion/assertion.d.ts +11 -0
  19. package/dist/commonjs/assertion/assertion.d.ts.map +1 -1
  20. package/dist/commonjs/assertion/assertion.js +30 -0
  21. package/dist/commonjs/assertion/assertion.js.map +1 -1
  22. package/dist/commonjs/assertion/create.d.ts.map +1 -1
  23. package/dist/commonjs/assertion/create.js +10 -2
  24. package/dist/commonjs/assertion/create.js.map +1 -1
  25. package/dist/commonjs/assertion/impl/sync-basic.d.ts +37 -37
  26. package/dist/commonjs/assertion/impl/sync-basic.d.ts.map +1 -1
  27. package/dist/commonjs/assertion/impl/sync-collection.d.ts +3 -3
  28. package/dist/commonjs/assertion/impl/sync-collection.d.ts.map +1 -1
  29. package/dist/commonjs/assertion/impl/sync-date.d.ts +1 -1
  30. package/dist/commonjs/assertion/impl/sync-date.d.ts.map +1 -1
  31. package/dist/commonjs/assertion/impl/sync-esoteric.d.ts +3 -3
  32. package/dist/commonjs/assertion/impl/sync-esoteric.d.ts.map +1 -1
  33. package/dist/commonjs/assertion/impl/sync-parametric.d.ts +1 -1
  34. package/dist/commonjs/assertion/impl/sync.d.ts +18 -18
  35. package/dist/commonjs/assertion/impl/sync.d.ts.map +1 -1
  36. package/dist/commonjs/assertion/slotify.js +25 -7
  37. package/dist/commonjs/assertion/slotify.js.map +1 -1
  38. package/dist/commonjs/bootstrap.d.ts +9 -9
  39. package/dist/commonjs/diff.d.ts.map +1 -1
  40. package/dist/commonjs/diff.js +14 -21
  41. package/dist/commonjs/diff.js.map +1 -1
  42. package/dist/commonjs/guards.d.ts +16 -0
  43. package/dist/commonjs/guards.d.ts.map +1 -1
  44. package/dist/commonjs/guards.js +27 -1
  45. package/dist/commonjs/guards.js.map +1 -1
  46. package/dist/commonjs/index.d.ts +22 -15
  47. package/dist/commonjs/index.d.ts.map +1 -1
  48. package/dist/commonjs/index.js.map +1 -1
  49. package/dist/commonjs/internal-schema.d.ts.map +1 -1
  50. package/dist/commonjs/internal-schema.js +30 -12
  51. package/dist/commonjs/internal-schema.js.map +1 -1
  52. package/dist/commonjs/standard-schema.d.ts +192 -0
  53. package/dist/commonjs/standard-schema.d.ts.map +1 -0
  54. package/dist/commonjs/standard-schema.js +13 -0
  55. package/dist/commonjs/standard-schema.js.map +1 -0
  56. package/dist/commonjs/types.d.ts +165 -13
  57. package/dist/commonjs/types.d.ts.map +1 -1
  58. package/dist/esm/assertion/assertion-async.d.ts.map +1 -1
  59. package/dist/esm/assertion/assertion-async.js +33 -10
  60. package/dist/esm/assertion/assertion-async.js.map +1 -1
  61. package/dist/esm/assertion/assertion-standard-schema-async.d.ts +64 -0
  62. package/dist/esm/assertion/assertion-standard-schema-async.d.ts.map +1 -0
  63. package/dist/esm/assertion/assertion-standard-schema-async.js +151 -0
  64. package/dist/esm/assertion/assertion-standard-schema-async.js.map +1 -0
  65. package/dist/esm/assertion/assertion-standard-schema-sync.d.ts +64 -0
  66. package/dist/esm/assertion/assertion-standard-schema-sync.d.ts.map +1 -0
  67. package/dist/esm/assertion/assertion-standard-schema-sync.js +160 -0
  68. package/dist/esm/assertion/assertion-standard-schema-sync.js.map +1 -0
  69. package/dist/esm/assertion/assertion-sync.d.ts.map +1 -1
  70. package/dist/esm/assertion/assertion-sync.js +39 -6
  71. package/dist/esm/assertion/assertion-sync.js.map +1 -1
  72. package/dist/esm/assertion/assertion-types.d.ts +82 -14
  73. package/dist/esm/assertion/assertion-types.d.ts.map +1 -1
  74. package/dist/esm/assertion/assertion.d.ts +11 -0
  75. package/dist/esm/assertion/assertion.d.ts.map +1 -1
  76. package/dist/esm/assertion/assertion.js +30 -0
  77. package/dist/esm/assertion/assertion.js.map +1 -1
  78. package/dist/esm/assertion/create.d.ts.map +1 -1
  79. package/dist/esm/assertion/create.js +11 -3
  80. package/dist/esm/assertion/create.js.map +1 -1
  81. package/dist/esm/assertion/impl/sync-basic.d.ts +37 -37
  82. package/dist/esm/assertion/impl/sync-basic.d.ts.map +1 -1
  83. package/dist/esm/assertion/impl/sync-collection.d.ts +3 -3
  84. package/dist/esm/assertion/impl/sync-collection.d.ts.map +1 -1
  85. package/dist/esm/assertion/impl/sync-date.d.ts +1 -1
  86. package/dist/esm/assertion/impl/sync-date.d.ts.map +1 -1
  87. package/dist/esm/assertion/impl/sync-esoteric.d.ts +3 -3
  88. package/dist/esm/assertion/impl/sync-esoteric.d.ts.map +1 -1
  89. package/dist/esm/assertion/impl/sync-parametric.d.ts +1 -1
  90. package/dist/esm/assertion/impl/sync.d.ts +18 -18
  91. package/dist/esm/assertion/impl/sync.d.ts.map +1 -1
  92. package/dist/esm/assertion/slotify.js +26 -8
  93. package/dist/esm/assertion/slotify.js.map +1 -1
  94. package/dist/esm/bootstrap.d.ts +9 -9
  95. package/dist/esm/diff.d.ts.map +1 -1
  96. package/dist/esm/diff.js +14 -21
  97. package/dist/esm/diff.js.map +1 -1
  98. package/dist/esm/guards.d.ts +16 -0
  99. package/dist/esm/guards.d.ts.map +1 -1
  100. package/dist/esm/guards.js +25 -0
  101. package/dist/esm/guards.js.map +1 -1
  102. package/dist/esm/index.d.ts +22 -15
  103. package/dist/esm/index.d.ts.map +1 -1
  104. package/dist/esm/index.js.map +1 -1
  105. package/dist/esm/internal-schema.d.ts.map +1 -1
  106. package/dist/esm/internal-schema.js +31 -13
  107. package/dist/esm/internal-schema.js.map +1 -1
  108. package/dist/esm/standard-schema.d.ts +192 -0
  109. package/dist/esm/standard-schema.d.ts.map +1 -0
  110. package/dist/esm/standard-schema.js +12 -0
  111. package/dist/esm/standard-schema.js.map +1 -0
  112. package/dist/esm/types.d.ts +165 -13
  113. package/dist/esm/types.d.ts.map +1 -1
  114. package/package.json +26 -18
  115. package/src/assertion/assertion-async.ts +54 -14
  116. package/src/assertion/assertion-standard-schema-async.ts +202 -0
  117. package/src/assertion/assertion-standard-schema-sync.ts +214 -0
  118. package/src/assertion/assertion-sync.ts +65 -10
  119. package/src/assertion/assertion-types.ts +113 -13
  120. package/src/assertion/assertion.ts +40 -0
  121. package/src/assertion/create.ts +11 -5
  122. package/src/assertion/slotify.ts +29 -7
  123. package/src/diff.ts +14 -29
  124. package/src/guards.ts +29 -0
  125. package/src/index.ts +16 -6
  126. package/src/internal-schema.ts +36 -16
  127. package/src/standard-schema.ts +214 -0
  128. package/src/types.ts +176 -14
@@ -18,6 +18,18 @@ export * as assertions from './assertion/impl/index.js';
18
18
  export { expect, expectAsync } from './bootstrap.js';
19
19
  export * from './error.js';
20
20
  export * as schema from './schema.js';
21
+ /**
22
+ * Re-export of Standard Schema v1 types for use in custom assertion
23
+ * implementations.
24
+ *
25
+ * @see {@link https://standardschema.dev | Standard Schema Specification}
26
+ */
27
+ export type { StandardSchemaV1 } from './standard-schema.js';
28
+ /**
29
+ * Re-export of {@link https://zod.dev Zod v4} for use in custom assertion
30
+ * implementations.
31
+ */
32
+ export { z };
21
33
  /**
22
34
  * Re-export of most (all?) types defined within <span
23
35
  * class="bupkis">Bupkis</span>.
@@ -29,15 +41,10 @@ export * as schema from './schema.js';
29
41
  * ```
30
42
  */
31
43
  export type * as types from './types.js';
32
- /**
33
- * Re-export of {@link https://zod.dev Zod v4} for use in custom assertion
34
- * implementations.
35
- */
36
- export { z };
37
44
  /**
38
45
  * @primaryExport
39
46
  */
40
- export type { AssertionFailure, Bupkis, CreateAssertionFn, CreateAsyncAssertionFn, Expect, ExpectAsync, ExpectIt, ExpectItAsync, FailFn, Keypath, UseFn, } from './types.js';
47
+ export type { AssertionFailure, AssertionStandardSchemaAsync, AssertionStandardSchemaSync, Bupkis, CreateAssertionFn, CreateAsyncAssertionFn, Expect, ExpectAsync, ExpectIt, ExpectItAsync, FailFn, Keypath, UseFn, } from './types.js';
41
48
  export { createAssertion, createAsyncAssertion, fail, use };
42
49
  declare const
43
50
  /**
@@ -85,7 +92,7 @@ use: import("./types.js").UseFn<readonly [import("./types.js").AssertionFunction
85
92
  actual: unknown;
86
93
  expected: string;
87
94
  message: string;
88
- } | undefined, readonly [z.ZodUnion<[z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, z.ZodCustom<WeakMap<WeakKey, unknown>, WeakMap<WeakKey, unknown>>]>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to contain", "to include"]>, z.ZodUnknown]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, "to have size", z.ZodInt], (_subject: Map<unknown, unknown>, expectedSize: number) => z.ZodMap<z.ZodUnknown, z.ZodUnknown>, readonly [z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, import("./types.js").PhraseLiteralSlot<"to have size">, z.ZodInt]>, import("./types.js").AssertionSchemaSync<readonly [z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, "to be empty"], import("./types.js").AssertionImplSchemaSync<readonly [z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, "to be empty"]>, readonly [z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, import("./types.js").PhraseLiteralSlot<"to be empty">]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodUnion<[z.ZodCustom<Set<unknown>, Set<unknown>>, z.ZodCustom<WeakSet<WeakKey>, WeakSet<WeakKey>>]>, readonly ["to contain", "to include"], z.ZodUnknown], (subject: Set<unknown> | WeakSet<WeakKey>, value: unknown) => {
95
+ } | undefined, readonly [z.ZodUnion<[z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, z.ZodCustom<WeakMap<WeakKey, unknown>, WeakMap<WeakKey, unknown>>]>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to contain", "to include"]>, z.ZodUnknown]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, "to have size", z.ZodInt], (_subject: Map<unknown, unknown>, expectedSize: number) => z.ZodMap<z.ZodUnknown, z.ZodUnknown>, readonly [z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, import("./types.js").PhraseLiteralSlot<"to have size">, z.ZodInt]>, import("./types.js").AssertionStandardSchemaSync<readonly [z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, "to be empty"], z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, readonly [z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, import("./types.js").PhraseLiteralSlot<"to be empty">]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodUnion<[z.ZodCustom<Set<unknown>, Set<unknown>>, z.ZodCustom<WeakSet<WeakKey>, WeakSet<WeakKey>>]>, readonly ["to contain", "to include"], z.ZodUnknown], (subject: Set<unknown> | WeakSet<WeakKey>, value: unknown) => {
89
96
  message: string;
90
97
  actual?: never;
91
98
  expected?: never;
@@ -93,9 +100,9 @@ use: import("./types.js").UseFn<readonly [import("./types.js").AssertionFunction
93
100
  actual: unknown;
94
101
  expected: string;
95
102
  message: string;
96
- } | undefined, readonly [z.ZodUnion<[z.ZodCustom<Set<unknown>, Set<unknown>>, z.ZodCustom<WeakSet<WeakKey>, WeakSet<WeakKey>>]>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to contain", "to include"]>, z.ZodUnknown]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<Set<unknown>, Set<unknown>>, "to have size", z.ZodInt], (_subject: Set<unknown>, expectedSize: number) => z.ZodSet<z.ZodUnknown>, readonly [z.ZodCustom<Set<unknown>, Set<unknown>>, import("./types.js").PhraseLiteralSlot<"to have size">, z.ZodInt]>, import("./types.js").AssertionSchemaSync<readonly [z.ZodCustom<Set<unknown>, Set<unknown>>, "to be empty"], import("./types.js").AssertionImplSchemaSync<readonly [z.ZodCustom<Set<unknown>, Set<unknown>>, "to be empty"]>, readonly [z.ZodCustom<Set<unknown>, Set<unknown>>, import("./types.js").PhraseLiteralSlot<"to be empty">]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodArray<z.ZodUnknown>, readonly ["to contain", "to include"], z.ZodUnknown], (subject: unknown[], value: unknown) => {
103
+ } | undefined, readonly [z.ZodUnion<[z.ZodCustom<Set<unknown>, Set<unknown>>, z.ZodCustom<WeakSet<WeakKey>, WeakSet<WeakKey>>]>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to contain", "to include"]>, z.ZodUnknown]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<Set<unknown>, Set<unknown>>, "to have size", z.ZodInt], (_subject: Set<unknown>, expectedSize: number) => z.ZodSet<z.ZodUnknown>, readonly [z.ZodCustom<Set<unknown>, Set<unknown>>, import("./types.js").PhraseLiteralSlot<"to have size">, z.ZodInt]>, import("./types.js").AssertionStandardSchemaSync<readonly [z.ZodCustom<Set<unknown>, Set<unknown>>, "to be empty"], z.ZodCustom<Set<unknown>, Set<unknown>>, readonly [z.ZodCustom<Set<unknown>, Set<unknown>>, import("./types.js").PhraseLiteralSlot<"to be empty">]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodArray<z.ZodUnknown>, readonly ["to contain", "to include"], z.ZodUnknown], (subject: unknown[], value: unknown) => {
97
104
  message: string;
98
- } | undefined, readonly [z.ZodArray<z.ZodUnknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to contain", "to include"]>, z.ZodUnknown]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodArray<z.ZodUnknown>, readonly ["to have length", "to have size"], z.ZodInt], (_subject: unknown[], expectedSize: number) => z.ZodArray<z.ZodUnknown>, readonly [z.ZodArray<z.ZodUnknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to have length", "to have size"]>, z.ZodInt]>, import("./types.js").AssertionSchemaSync<readonly [z.ZodArray<z.ZodUnknown>, "to be non-empty"], import("./types.js").AssertionImplSchemaSync<readonly [z.ZodArray<z.ZodUnknown>, "to be non-empty"]>, readonly [z.ZodArray<z.ZodUnknown>, import("./types.js").PhraseLiteralSlot<"to be non-empty">]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<Record<PropertyKey, unknown> | ((...args: any[]) => any), Record<PropertyKey, unknown> | ((...args: any[]) => any)>, readonly ["to have keys", "to have properties", "to have props", "to contain keys", "to contain properties", "to contain props", "to include keys", "to include properties", "to include props"], z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>>], (_subject: Record<PropertyKey, unknown> | ((...args: any[]) => any), keys: (string | number | symbol)[]) => z.ZodCustom<Record<PropertyKey, unknown> | ((...args: any[]) => any), Record<PropertyKey, unknown> | ((...args: any[]) => any)>, readonly [z.ZodCustom<Record<PropertyKey, unknown> | ((...args: any[]) => any), Record<PropertyKey, unknown> | ((...args: any[]) => any)>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to have keys", "to have properties", "to have props", "to contain keys", "to contain properties", "to contain props", "to include keys", "to include properties", "to include props"]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, z.ZodUnknown>, "to have size", z.ZodInt], (subject: Record<string | number | symbol, unknown>, expectedSize: number) => {
105
+ } | undefined, readonly [z.ZodArray<z.ZodUnknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to contain", "to include"]>, z.ZodUnknown]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodArray<z.ZodUnknown>, readonly ["to have length", "to have size"], z.ZodInt], (_subject: unknown[], expectedSize: number) => z.ZodArray<z.ZodUnknown>, readonly [z.ZodArray<z.ZodUnknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to have length", "to have size"]>, z.ZodInt]>, import("./types.js").AssertionStandardSchemaSync<readonly [z.ZodArray<z.ZodUnknown>, "to be non-empty"], z.ZodArray<z.ZodUnknown>, readonly [z.ZodArray<z.ZodUnknown>, import("./types.js").PhraseLiteralSlot<"to be non-empty">]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<Record<PropertyKey, unknown> | ((...args: any[]) => any), Record<PropertyKey, unknown> | ((...args: any[]) => any)>, readonly ["to have keys", "to have properties", "to have props", "to contain keys", "to contain properties", "to contain props", "to include keys", "to include properties", "to include props"], z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>>], (_subject: Record<PropertyKey, unknown> | ((...args: any[]) => any), keys: (string | number | symbol)[]) => z.ZodCustom<Record<PropertyKey, unknown> | ((...args: any[]) => any), Record<PropertyKey, unknown> | ((...args: any[]) => any)>, readonly [z.ZodCustom<Record<PropertyKey, unknown> | ((...args: any[]) => any), Record<PropertyKey, unknown> | ((...args: any[]) => any)>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to have keys", "to have properties", "to have props", "to contain keys", "to contain properties", "to contain props", "to include keys", "to include properties", "to include props"]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, z.ZodUnknown>, "to have size", z.ZodInt], (subject: Record<string | number | symbol, unknown>, expectedSize: number) => {
99
106
  actual: number;
100
107
  expected: number;
101
108
  message: string;
@@ -141,7 +148,7 @@ use: import("./types.js").UseFn<readonly [import("./types.js").AssertionFunction
141
148
  message: string;
142
149
  } | undefined, readonly [z.ZodUnion<readonly [z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, z.ZodCustom<Set<unknown>, Set<unknown>>]>, import("./types.js").PhraseLiteralSlot<"to have size less than">, z.ZodInt]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodUnion<readonly [z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, z.ZodCustom<Set<unknown>, Set<unknown>>]>, "to have size between", z.ZodTuple<[z.ZodInt, z.ZodInt], null>], (collection: Map<unknown, unknown> | Set<unknown>, [min, max]: [number, number]) => {
143
150
  message: string;
144
- } | undefined, readonly [z.ZodUnion<readonly [z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, z.ZodCustom<Set<unknown>, Set<unknown>>]>, import("./types.js").PhraseLiteralSlot<"to have size between">, z.ZodTuple<[z.ZodInt, z.ZodInt], null>]>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be an array", "to be array"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be an array", "to be array"]]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be an async function"], import("./types.js").AssertionImplSchemaSync<readonly ["to be an async function"]>, never>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be a bigint", "to be a BigInt"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be a bigint", "to be a BigInt"]]>, never>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be a boolean", "to be boolean", "to be a bool"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be a boolean", "to be boolean", "to be a bool"]]>, never>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be a class", "to be a constructor", "to be constructible"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be a class", "to be a constructor", "to be constructible"]]>, never>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be a date", "to be a Date"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be a date", "to be a Date"]]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be defined"], import("./types.js").AssertionImplSchemaSync<readonly ["to be defined"]>, never>, import("./types.js").AssertionFunctionSync<readonly [z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodTuple<[z.ZodUnknown], z.ZodUnknown>, z.ZodObject<{
151
+ } | undefined, readonly [z.ZodUnion<readonly [z.ZodCustom<Map<unknown, unknown>, Map<unknown, unknown>>, z.ZodCustom<Set<unknown>, Set<unknown>>]>, import("./types.js").PhraseLiteralSlot<"to have size between">, z.ZodTuple<[z.ZodInt, z.ZodInt], null>]>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be an array", "to be array"]], z.ZodArray<z.ZodUnknown>, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be an async function"], z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, never>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a bigint", "to be a BigInt"]], z.ZodBigInt, never>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a boolean", "to be boolean", "to be a bool"]], z.ZodBoolean, never>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a class", "to be a constructor", "to be constructible"]], z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>, never>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a date", "to be a Date"]], z.ZodDate, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be defined"], z.ZodNonOptional<z.ZodUnknown>, never>, import("./types.js").AssertionFunctionSync<readonly [z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodTuple<[z.ZodUnknown], z.ZodUnknown>, z.ZodObject<{
145
152
  length: z.ZodNumber;
146
153
  }, z.core.$loose>]>, "to be empty"], (subject: unknown[] | [unknown, ...unknown[]] | {
147
154
  [x: string]: unknown;
@@ -152,9 +159,9 @@ use: import("./types.js").UseFn<readonly [import("./types.js").AssertionFunction
152
159
  message: string;
153
160
  } | undefined, readonly [z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodTuple<[z.ZodUnknown], z.ZodUnknown>, z.ZodObject<{
154
161
  length: z.ZodNumber;
155
- }, z.core.$loose>]>, import("./types.js").PhraseLiteralSlot<"to be empty">]>, import("./types.js").AssertionSchemaSync<readonly [z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, z.ZodUnknown>, "to be empty"], import("./types.js").AssertionImplSchemaSync<readonly [z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, z.ZodUnknown>, "to be empty"]>, readonly [z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, z.ZodUnknown>, import("./types.js").PhraseLiteralSlot<"to be empty">]>, import("./types.js").AssertionSchemaSync<readonly [z.ZodString, "to be empty"], import("./types.js").AssertionImplSchemaSync<readonly [z.ZodString, "to be empty"]>, readonly [z.ZodString, import("./types.js").PhraseLiteralSlot<"to be empty">]>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be an Error", "to be a Error"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be an Error", "to be a Error"]]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be false"], import("./types.js").AssertionImplSchemaSync<readonly ["to be false"]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be falsy"], import("./types.js").AssertionImplSchemaSync<readonly ["to be falsy"]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be a function"], import("./types.js").AssertionImplSchemaSync<readonly ["to be a function"]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be infinite"], import("./types.js").AssertionImplSchemaSync<readonly ["to be infinite"]>, never>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be an integer", "to be a safe integer", "to be an int", "to be a safe int"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be an integer", "to be a safe integer", "to be an int", "to be a safe int"]]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be NaN"], import("./types.js").AssertionImplSchemaSync<readonly ["to be NaN"]>, never>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be negative", "to be a negative number"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be negative", "to be a negative number"]]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be -Infinity"], import("./types.js").AssertionImplSchemaSync<readonly ["to be -Infinity"]>, never>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be a negative integer", "to be a negative int"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be a negative integer", "to be a negative int"]]>, never>, import("./types.js").AssertionSchemaSync<readonly [z.ZodString, "to be non-empty"], import("./types.js").AssertionImplSchemaSync<readonly [z.ZodString, "to be non-empty"]>, readonly [z.ZodString, import("./types.js").PhraseLiteralSlot<"to be non-empty">]>, import("./types.js").AssertionSchemaSync<readonly ["to be null"], import("./types.js").AssertionImplSchemaSync<readonly ["to be null"]>, never>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be a number", "to be finite"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be a number", "to be finite"]]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be an object"], import("./types.js").AssertionImplSchemaSync<readonly ["to be an object"]>, never>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be positive", "to be a positive number"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be positive", "to be a positive number"]]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be Infinity"], import("./types.js").AssertionImplSchemaSync<readonly ["to be Infinity"]>, never>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be a positive integer", "to be a positive int"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be a positive integer", "to be a positive int"]]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be a primitive"], import("./types.js").AssertionImplSchemaSync<readonly ["to be a primitive"]>, never>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be a record", "to be a plain object"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be a record", "to be a plain object"]]>, never>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be a RegExp", "to be a regex", "to be a regexp"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be a RegExp", "to be a regex", "to be a regexp"]]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be a Set"], import("./types.js").AssertionImplSchemaSync<readonly ["to be a Set"]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be a string"], import("./types.js").AssertionImplSchemaSync<readonly ["to be a string"]>, never>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be a symbol", "to be a Symbol"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be a symbol", "to be a Symbol"]]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be true"], import("./types.js").AssertionImplSchemaSync<readonly ["to be true"]>, never>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be truthy", "to exist", "to be ok"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be truthy", "to exist", "to be ok"]]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be undefined"], import("./types.js").AssertionImplSchemaSync<readonly ["to be undefined"]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be a WeakMap"], import("./types.js").AssertionImplSchemaSync<readonly ["to be a WeakMap"]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be a WeakSet"], import("./types.js").AssertionImplSchemaSync<readonly ["to be a WeakSet"]>, never>, import("./types.js").AssertionFunctionSync<readonly [readonly ["to be an instance of", "to be a", "to be an"], z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>], (_: unknown, ctor: import("./types.js").Constructor) => z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>, readonly [z.ZodUnknown, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to be an instance of", "to be a", "to be an"]>, z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodUnknown, readonly ["to be a", "to be an", "to have type"], z.ZodEnum<{
162
+ }, z.core.$loose>]>, import("./types.js").PhraseLiteralSlot<"to be empty">]>, import("./types.js").AssertionStandardSchemaSync<readonly [z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, z.ZodUnknown>, "to be empty"], z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, z.ZodUnknown>, readonly [z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, z.ZodUnknown>, import("./types.js").PhraseLiteralSlot<"to be empty">]>, import("./types.js").AssertionStandardSchemaSync<readonly [z.ZodString, "to be empty"], z.ZodString, readonly [z.ZodString, import("./types.js").PhraseLiteralSlot<"to be empty">]>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be an Error", "to be a Error"]], z.ZodCustom<Error, Error>, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be false"], z.ZodLiteral<false>, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be falsy"], z.ZodNullable<z.ZodAny>, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be a function"], z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be infinite"], z.ZodUnion<[z.ZodLiteral<number>, z.ZodLiteral<number>]>, never>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be an integer", "to be a safe integer", "to be an int", "to be a safe int"]], z.ZodNumber, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be NaN"], z.ZodNaN, never>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be negative", "to be a negative number"]], z.ZodNumber, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be -Infinity"], z.ZodLiteral<number>, never>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a negative integer", "to be a negative int"]], z.ZodNumber, never>, import("./types.js").AssertionStandardSchemaSync<readonly [z.ZodString, "to be non-empty"], z.ZodString, readonly [z.ZodString, import("./types.js").PhraseLiteralSlot<"to be non-empty">]>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be null"], z.ZodNull, never>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a number", "to be finite"]], z.ZodNumber, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be an object"], z.ZodNonOptional<z.ZodUnknown>, never>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be positive", "to be a positive number"]], z.ZodNumber, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be Infinity"], z.ZodLiteral<number>, never>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a positive integer", "to be a positive int"]], z.ZodNumber, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be a primitive"], z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodBigInt, z.ZodSymbol, z.ZodNull, z.ZodUndefined]>, never>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a record", "to be a plain object"]], z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, z.ZodUnknown>, never>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a RegExp", "to be a regex", "to be a regexp"]], z.ZodCustom<RegExp, RegExp>, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be a Set"], z.ZodCustom<Set<unknown>, Set<unknown>>, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be a string"], z.ZodString, never>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a symbol", "to be a Symbol"]], z.ZodSymbol, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be true"], z.ZodLiteral<true>, never>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be truthy", "to exist", "to be ok"]], z.ZodNonOptional<z.ZodAny>, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be undefined"], z.ZodUndefined, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be a WeakMap"], z.ZodCustom<WeakMap<WeakKey, unknown>, WeakMap<WeakKey, unknown>>, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be a WeakSet"], z.ZodCustom<WeakSet<WeakKey>, WeakSet<WeakKey>>, never>, import("./types.js").AssertionFunctionSync<readonly [readonly ["to be an instance of", "to be a", "to be an"], z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>], (_: unknown, ctor: import("./types.js").Constructor) => z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>, readonly [z.ZodUnknown, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to be an instance of", "to be a", "to be an"]>, z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodUnknown, readonly ["to be a", "to be an", "to have type"], z.ZodEnum<{
156
163
  [x: string]: string;
157
- }>], (_: unknown, type: string) => z.ZodString | z.ZodCustom<WeakMap<WeakKey, unknown>, WeakMap<WeakKey, unknown>> | z.ZodNumber | z.ZodCustom<WeakSet<WeakKey>, WeakSet<WeakKey>> | z.ZodArray<z.ZodUnknown> | z.ZodSymbol | z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown> | z.ZodBigInt | z.ZodBoolean | z.ZodDate | z.ZodCustom<Error, Error> | z.ZodNull | z.ZodUndefined | z.ZodCustom<RegExp, RegExp> | z.ZodObject<{}, z.core.$loose> | z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>> | z.ZodCustom<WeakRef<WeakKey>, WeakRef<WeakKey>>, readonly [z.ZodUnknown, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to be a", "to be an", "to have type"]>, z.ZodEnum<{
164
+ }>], (_: unknown, type: string) => z.ZodString | z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown> | z.ZodNumber | z.ZodSymbol | z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>> | z.ZodBoolean | z.ZodBigInt | z.ZodNull | z.ZodUndefined | z.ZodArray<z.ZodUnknown> | z.ZodCustom<RegExp, RegExp> | z.ZodDate | z.ZodCustom<WeakSet<WeakKey>, WeakSet<WeakKey>> | z.ZodCustom<WeakMap<WeakKey, unknown>, WeakMap<WeakKey, unknown>> | z.ZodCustom<Error, Error> | z.ZodCustom<WeakRef<WeakKey>, WeakRef<WeakKey>> | z.ZodObject<{}, z.core.$loose>, readonly [z.ZodUnknown, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to be a", "to be an", "to have type"]>, z.ZodEnum<{
158
165
  [x: string]: string;
159
166
  }>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodNumber, "to be greater than", z.ZodNumber], (_: number, other: number) => z.ZodNumber, readonly [z.ZodNumber, import("./types.js").PhraseLiteralSlot<"to be greater than">, z.ZodNumber]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodNumber, readonly ["to be less than", "to be lt"], z.ZodNumber], (_: number, other: number) => z.ZodNumber, readonly [z.ZodNumber, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to be less than", "to be lt"]>, z.ZodNumber]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodNumber, readonly ["to be greater than or equal to", "to be at least", "to be gte"], z.ZodNumber], (_: number, other: number) => z.ZodNumber, readonly [z.ZodNumber, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to be greater than or equal to", "to be at least", "to be gte"]>, z.ZodNumber]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodNumber, readonly ["to be less than or equal to", "to be at most", "to be lte"], z.ZodNumber], (_: number, other: number) => z.ZodNumber, readonly [z.ZodNumber, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to be less than or equal to", "to be at most", "to be lte"]>, z.ZodNumber]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodNumber, readonly ["to be within", "to be between"], z.ZodNumber, z.ZodNumber], (subject: number, min: number, max: number) => {
160
167
  message: string;
@@ -236,7 +243,7 @@ use: import("./types.js").UseFn<readonly [import("./types.js").AssertionFunction
236
243
  length: number;
237
244
  }, shape: unknown) => z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>, readonly [z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodTuple<[z.ZodUnknown], z.ZodUnknown>, z.ZodObject<{
238
245
  length: z.ZodNumber;
239
- }, z.core.$loose>]>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to satisfy", "to be like"]>, z.ZodUnknown]>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to have a null prototype", "to be a dictionary"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to have a null prototype", "to be a dictionary"]]>, never>, import("./types.js").AssertionFunctionSync<readonly ["to be frozen"], (subject: unknown) => {
246
+ }, z.core.$loose>]>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to satisfy", "to be like"]>, z.ZodUnknown]>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to have a null prototype", "to be a dictionary"]], z.ZodCustom<Record<PropertyKey, unknown>, Record<PropertyKey, unknown>>, never>, import("./types.js").AssertionFunctionSync<readonly ["to be frozen"], (subject: unknown) => {
240
247
  actual: boolean;
241
248
  expected: boolean;
242
249
  message: string;
@@ -244,7 +251,7 @@ use: import("./types.js").UseFn<readonly [import("./types.js").AssertionFunction
244
251
  actual: boolean;
245
252
  expected: boolean;
246
253
  message: string;
247
- } | undefined, readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, import("./types.js").PhraseLiteralSlot<"to be an enumerable property of">, z.ZodNonOptional<z.ZodUnknown>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodNonOptional<z.ZodUnknown>, "to have enumerable property", z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>], (_subject: unknown, key: string | number | symbol) => z.ZodCustom<unknown, unknown>, readonly [z.ZodNonOptional<z.ZodUnknown>, import("./types.js").PhraseLiteralSlot<"to have enumerable property">, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>]>, import("./types.js").AssertionSchemaSync<readonly ["to be sealed"], import("./types.js").AssertionImplSchemaSync<readonly ["to be sealed"]>, never>, import("./types.js").AssertionSchemaSync<readonly ["to be extensible"], import("./types.js").AssertionImplSchemaSync<readonly ["to be extensible"]>, never>, import("./types.js").AssertionFunctionSync<readonly [z.ZodUnion<readonly [z.ZodDate, z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODate]>, z.ZodNumber]>, "to be after", z.ZodUnion<readonly [z.ZodDate, z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODate]>, z.ZodNumber]>], (subject: string | number | Date, other: string | number | Date) => {
254
+ } | undefined, readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, import("./types.js").PhraseLiteralSlot<"to be an enumerable property of">, z.ZodNonOptional<z.ZodUnknown>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodNonOptional<z.ZodUnknown>, "to have enumerable property", z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>], (_subject: unknown, key: string | number | symbol) => z.ZodCustom<unknown, unknown>, readonly [z.ZodNonOptional<z.ZodUnknown>, import("./types.js").PhraseLiteralSlot<"to have enumerable property">, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>]>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be sealed"], z.ZodUnknown, never>, import("./types.js").AssertionStandardSchemaSync<readonly ["to be extensible"], z.ZodUnknown, never>, import("./types.js").AssertionFunctionSync<readonly [z.ZodUnion<readonly [z.ZodDate, z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODate]>, z.ZodNumber]>, "to be after", z.ZodUnion<readonly [z.ZodDate, z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODate]>, z.ZodNumber]>], (subject: string | number | Date, other: string | number | Date) => {
248
255
  message: string;
249
256
  schema?: never;
250
257
  subject?: never;
@@ -288,7 +295,7 @@ use: import("./types.js").UseFn<readonly [import("./types.js").AssertionFunction
288
295
  actual: string;
289
296
  expected: string;
290
297
  message: string;
291
- } | undefined, readonly [z.ZodUnion<readonly [z.ZodDate, z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODate]>, z.ZodNumber]>, import("./types.js").PhraseLiteralSlot<"to be the same date as">, z.ZodUnion<readonly [z.ZodDate, z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODate]>, z.ZodNumber]>]>, import("./types.js").AssertionSchemaSync<readonly [readonly ["to be a valid date", "to be date-like"]], import("./types.js").AssertionImplSchemaSync<readonly [readonly ["to be a valid date", "to be date-like"]]>, never>, import("./types.js").AssertionFunctionSync<readonly ["to be a weekday"], (subject: unknown) => {
298
+ } | undefined, readonly [z.ZodUnion<readonly [z.ZodDate, z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODate]>, z.ZodNumber]>, import("./types.js").PhraseLiteralSlot<"to be the same date as">, z.ZodUnion<readonly [z.ZodDate, z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODate]>, z.ZodNumber]>]>, import("./types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a valid date", "to be date-like"]], z.ZodUnion<readonly [z.ZodDate, z.ZodUnion<readonly [z.ZodISODateTime, z.ZodISODate]>, z.ZodNumber]>, never>, import("./types.js").AssertionFunctionSync<readonly ["to be a weekday"], (subject: unknown) => {
292
299
  message: string;
293
300
  } | undefined, never>, import("./types.js").AssertionFunctionSync<readonly ["to be a weekend"], (subject: unknown) => {
294
301
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,OAAO,KAAK,UAAU,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACrD,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC;;;;;;;;;GASG;AACH,YAAY,KAAK,KAAK,MAAM,YAAY,CAAC;AAEzC;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,CAAC;AAEb;;GAEG;AACH,YAAY,EACV,gBAAgB,EAChB,MAAM,EACN,iBAAiB,EACjB,sBAAsB,EACtB,MAAM,EACN,WAAW,EACX,QAAQ,EACR,aAAa,EACb,MAAM,EACN,OAAO,EACP,KAAK,GACN,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AAC5D,QAAA;AACE;;;;;;;;;GASG;AACH,eAAe;AACf;;;;;;;;;GASG;AACH,oBAAoB;AACpB;;;;;;GAMG;AACH,IAAI;AACJ;;;;;;GAMG;AACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8TAEgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+BAA2B;AAwBlB,kFAxBA,MAAC,OAwBA;AAtBV,iDAA6D;AAC7D,wEAAwD;AACxD,+CAAqD;AAA5C,sGAAA,MAAM,OAAA;AAAE,2GAAA,WAAW,OAAA;AAC5B,6CAA2B;AAC3B,sDAAsC;AAqCtC,MAAM;AACJ;;;;;;;;;GASG;AACH,eAAe;AACf;;;;;;;;;GASG;AACH,oBAAoB;AACpB;;;;;;GAMG;AACH,IAAI;AACJ;;;;;;GAMG;AACH,GAAG,EACH,GAAG,KAAK,EACT,GAAG,qBAAiB,CAAC;AAzCb,0CAAe;AAAE,oDAAoB;AAAE,oBAAI;AAAE,kBAAG"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+BAA2B;AAoBlB,kFApBA,MAAC,OAoBA;AAlBV,iDAA6D;AAC7D,wEAAwD;AACxD,+CAAqD;AAA5C,sGAAA,MAAM,OAAA;AAAE,2GAAA,WAAW,OAAA;AAC5B,6CAA2B;AAC3B,sDAAsC;AA+CtC,MAAM;AACJ;;;;;;;;;GASG;AACH,eAAe;AACf;;;;;;;;;GASG;AACH,oBAAoB;AACpB;;;;;;GAMG;AACH,IAAI;AACJ;;;;;;GAMG;AACH,GAAG,EACH,GAAG,KAAK,EACT,GAAG,qBAAiB,CAAC;AAzCb,0CAAe;AAAE,oDAAoB;AAAE,oBAAI;AAAE,kBAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"internal-schema.d.ts","sourceRoot":"","sources":["../../src/internal-schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAoB,qBAAqB,EAAE,MAAM,YAAY,CAAC;AA+J1E;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,OAAO,OAAO,KACb,KAAK,IAAI,qBAEX,CAAC"}
1
+ {"version":3,"file":"internal-schema.d.ts","sourceRoot":"","sources":["../../src/internal-schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAoB,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAmL1E;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,OAAO,OAAO,KACb,KAAK,IAAI,qBAEX,CAAC"}
@@ -38,6 +38,22 @@ const ZodTypeSchema = v4_1.z
38
38
  error: 'Must be a Zod schema',
39
39
  })
40
40
  .describe('A Zod schema within AssertionParts');
41
+ /**
42
+ * @internal
43
+ */
44
+ const StandardSchemaSchema = v4_1.z
45
+ .custom(guards_js_1.isStandardSchema, {
46
+ error: 'Must be a Standard Schema v1',
47
+ })
48
+ .describe('A Standard Schema v1 within AssertionParts');
49
+ /**
50
+ * Schema that accepts either Zod or Standard Schema validators.
51
+ *
52
+ * @internal
53
+ */
54
+ const SchemaSchema = v4_1.z
55
+ .union([ZodTypeSchema, StandardSchemaSchema])
56
+ .describe('A Zod schema or Standard Schema v1');
41
57
  /** @internal */
42
58
  const BaseAssertionParseRequestSchema = v4_1.z.object({
43
59
  subject: v4_1.z.unknown().describe('The subject value to be validated'),
@@ -48,11 +64,11 @@ const BaseAssertionParseRequestSchema = v4_1.z.object({
48
64
  const AssertionParseRequestSchema = v4_1.z.union([
49
65
  v4_1.z.object({
50
66
  ...BaseAssertionParseRequestSchema.shape,
51
- schema: ZodTypeSchema.describe('The sync Zod schema to validate against'),
67
+ schema: SchemaSchema.describe('The sync schema to validate against'),
52
68
  }),
53
69
  v4_1.z.object({
54
70
  ...BaseAssertionParseRequestSchema.shape,
55
- asyncSchema: ZodTypeSchema.describe('The async Zod schema to validate against'),
71
+ asyncSchema: SchemaSchema.describe('The async schema to validate against'),
56
72
  }),
57
73
  ]);
58
74
  /**
@@ -76,13 +92,13 @@ const PhraseLiteralChoiceSchema = v4_1.z
76
92
  */
77
93
  const AssertionImplSchemaSync = v4_1.z
78
94
  .union([
79
- ZodTypeSchema,
95
+ SchemaSchema,
80
96
  v4_1.z.function({
81
97
  input: v4_1.z.tuple([v4_1.z.unknown()], v4_1.z.unknown()),
82
98
  output: v4_1.z.union([
83
99
  v4_1.z.void(),
84
100
  v4_1.z.boolean(),
85
- ZodTypeSchema,
101
+ SchemaSchema,
86
102
  AssertionFailureSchema,
87
103
  AssertionParseRequestSchema,
88
104
  ]),
@@ -91,18 +107,18 @@ const AssertionImplSchemaSync = v4_1.z
91
107
  .describe('A synchronous assertion implementation function');
92
108
  const AssertionImplSchemaAsync = v4_1.z
93
109
  .union([
94
- ZodTypeSchema,
110
+ SchemaSchema,
95
111
  v4_1.z.function({
96
112
  input: v4_1.z.tuple([v4_1.z.unknown()], v4_1.z.unknown()),
97
113
  output: v4_1.z.union([
98
114
  v4_1.z.void(),
99
115
  v4_1.z.boolean(),
100
- ZodTypeSchema,
116
+ SchemaSchema,
101
117
  AssertionFailureSchema,
102
118
  AssertionParseRequestSchema,
103
119
  v4_1.z.promise(v4_1.z.void()),
104
120
  v4_1.z.promise(v4_1.z.boolean()),
105
- v4_1.z.promise(ZodTypeSchema),
121
+ v4_1.z.promise(SchemaSchema),
106
122
  v4_1.z.promise(AssertionFailureSchema),
107
123
  v4_1.z.promise(AssertionParseRequestSchema),
108
124
  ]),
@@ -113,20 +129,22 @@ const AssertionImplSchemaAsync = v4_1.z
113
129
  * @internal
114
130
  */
115
131
  const AssertionPartsSchema = v4_1.z
116
- .array(v4_1.z.union([PhraseLiteralSchema, PhraseLiteralChoiceSchema, ZodTypeSchema]))
132
+ .array(v4_1.z.union([PhraseLiteralSchema, PhraseLiteralChoiceSchema, SchemaSchema]))
117
133
  .min(1, { error: 'At least one part is required for an assertion' })
118
134
  .refine((parts) => {
119
- // Special validation for 'and': it can only appear if followed by a ZodType
135
+ // Special validation for 'and': it can only appear if followed by a schema
120
136
  for (let i = 0; i < parts.length; i++) {
121
137
  if (parts[i] === 'and') {
122
- // 'and' must be followed by another part, and that part must be a ZodType
123
- if (i === parts.length - 1 || !(0, guards_js_1.isZodType)(parts[i + 1])) {
138
+ // 'and' must be followed by another part, and that part must be a schema
139
+ const nextPart = parts[i + 1];
140
+ if (i === parts.length - 1 ||
141
+ !((0, guards_js_1.isZodType)(nextPart) || (0, guards_js_1.isStandardSchema)(nextPart))) {
124
142
  return false;
125
143
  }
126
144
  }
127
145
  }
128
146
  return true;
129
- }, { error: '"and" can only appear when followed by a Zod schema' })
147
+ }, { error: '"and" can only appear when followed by a schema' })
130
148
  .describe('Assertion "parts" which define the input of an assertion');
131
149
  /**
132
150
  * Type guard for a {@link AssertionFailure}.
@@ -1 +1 @@
1
- {"version":3,"file":"internal-schema.js","sourceRoot":"","sources":["../../src/internal-schema.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+BAA2B;AAI3B,2CAAwC;AAExC;;;;GAIG;AAEH,MAAM,sBAAsB,GAAgC,MAAC;KAC1D,MAAM,CAAC;IACN,MAAM,EAAE,MAAC;SACN,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,2DAA2D,CAAC;IACxE,QAAQ,EAAE,MAAC;SACR,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CACP,iEAAiE,CAClE;IACH,OAAO,EAAE,MAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,iDAAiD,CAAC;CAC/D,CAAC;KACD,QAAQ,CAAC,+DAA+D,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,aAAa,GAAG,MAAC;K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,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,EACD,EAAE,KAAK,EAAE,iDAAiD,EAAE,CAC7D;KACA,QAAQ,CAAC,0DAA0D,CAAC,CAAC;AAExE;;;;;;;;;GASG;AACI,MAAM,kBAAkB,GAAG,CAChC,KAAc,EACa,EAAE;IAC7B,OAAO,sBAAsB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACzD,CAAC,CAAC;AAJW,QAAA,kBAAkB,sBAI7B;AAEF;;GAEG;AACI,MAAM,uBAAuB,GAAG,CACrC,KAAc,EACkB,EAAE;IAClC,OAAO,2BAA2B,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAC9D,CAAC,CAAC;AAJW,QAAA,uBAAuB,2BAIlC;AAEF;;GAEG;AACU,QAAA,0BAA0B,GAAG,MAAC;KACxC,KAAK,CAAC,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,CAAC;KACtD,QAAQ,CAAC,kCAAkC,CAAC,CAAC;AAEhD;;GAEG;AACU,QAAA,+BAA+B,GAAG,MAAC;KAC7C,KAAK,CAAC,CAAC,oBAAoB,EAAE,wBAAwB,CAAC,CAAC;KACvD,QAAQ,CAAC,uCAAuC,CAAC,CAAC"}
@@ -0,0 +1,192 @@
1
+ /**
2
+ * Standard Schema v1 specification types.
3
+ *
4
+ * These types define the Standard Schema interface that enables
5
+ * interoperability between different validation libraries (Zod, Valibot,
6
+ * ArkType, etc.).
7
+ *
8
+ * @packageDocumentation
9
+ * @see {@link https://standardschema.dev | Standard Schema Specification}
10
+ */
11
+ /**
12
+ * The Standard Schema interface.
13
+ *
14
+ * This is the primary interface that validation libraries implement to be
15
+ * Standard Schema compliant. The interface is designed to be minimal and
16
+ * non-invasive, tucked behind the `~standard` property to avoid API conflicts.
17
+ *
18
+ * @template Input - The input type accepted by the schema
19
+ * @template Output - The output type produced after successful validation
20
+ */
21
+ export interface StandardSchemaV1<Input = unknown, Output = Input> {
22
+ /**
23
+ * The Standard Schema properties.
24
+ *
25
+ * This property uses a tilde prefix to:
26
+ *
27
+ * - Avoid conflicts with existing library APIs
28
+ * - De-prioritize in IDE autocomplete (tilde sorts after alphanumeric)
29
+ * - Signal special/internal nature of the property
30
+ */
31
+ readonly '~standard': StandardSchemaV1.Props<Input, Output>;
32
+ }
33
+ export declare namespace StandardSchemaV1 {
34
+ /**
35
+ * The result interface if validation fails.
36
+ *
37
+ * Contains an array of issues describing what went wrong during validation.
38
+ */
39
+ interface FailureResult {
40
+ /**
41
+ * The issues of failed validation.
42
+ *
43
+ * Always present and non-empty when validation fails.
44
+ */
45
+ readonly issues: ReadonlyArray<Issue>;
46
+ }
47
+ /**
48
+ * Infers the input type of a Standard Schema.
49
+ *
50
+ * Utility type for extracting the input type from a schema instance.
51
+ *
52
+ * @template Schema - The Standard Schema to extract the input type from
53
+ */
54
+ type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['input'];
55
+ /**
56
+ * Infers the output type of a Standard Schema.
57
+ *
58
+ * Utility type for extracting the output type from a schema instance.
59
+ *
60
+ * @template Schema - The Standard Schema to extract the output type from
61
+ */
62
+ type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['output'];
63
+ /**
64
+ * The issue interface of the failure output.
65
+ *
66
+ * Describes a single validation problem, including a human-readable message
67
+ * and optional path to the problematic value in nested structures.
68
+ */
69
+ interface Issue {
70
+ /**
71
+ * The error message of the issue.
72
+ *
73
+ * Human-readable description of what validation rule was violated.
74
+ */
75
+ readonly message: string;
76
+ /**
77
+ * The path of the issue, if any.
78
+ *
79
+ * For nested structures, indicates where in the object/array hierarchy the
80
+ * validation failed. Can contain property keys or path segment objects.
81
+ */
82
+ readonly path?: ReadonlyArray<PathSegment | PropertyKey> | undefined;
83
+ }
84
+ /**
85
+ * The path segment interface of the issue.
86
+ *
87
+ * Allows path elements to carry additional metadata beyond just the key.
88
+ */
89
+ interface PathSegment {
90
+ /**
91
+ * The key representing a path segment.
92
+ *
93
+ * Can be a string, number, or symbol identifying the path component.
94
+ */
95
+ readonly key: PropertyKey;
96
+ }
97
+ /**
98
+ * The Standard Schema properties interface.
99
+ *
100
+ * Contains the actual validation logic and metadata required by the spec.
101
+ *
102
+ * @template Input - The input type accepted by the schema
103
+ * @template Output - The output type produced after successful validation
104
+ */
105
+ interface Props<Input = unknown, Output = Input> {
106
+ /**
107
+ * Inferred types associated with the schema.
108
+ *
109
+ * Optional property that allows TypeScript type inference for the schema.
110
+ * Not all libraries may provide this.
111
+ */
112
+ readonly types?: Types<Input, Output> | undefined;
113
+ /**
114
+ * Validates unknown input values.
115
+ *
116
+ * This function performs validation and returns either a success result
117
+ * with the validated/transformed data, or a failure result with validation
118
+ * issues. May return a Promise for async validation.
119
+ *
120
+ * @param value - The unknown value to validate
121
+ * @returns Result object or Promise resolving to result object
122
+ */
123
+ readonly validate: (value: unknown) => Promise<Result<Output>> | Result<Output>;
124
+ /**
125
+ * The vendor name of the schema library.
126
+ *
127
+ * Examples: 'zod', 'valibot', 'arktype', 'yup', etc.
128
+ */
129
+ readonly vendor: string;
130
+ /**
131
+ * The version number of the standard.
132
+ *
133
+ * Currently only version 1 is defined. Future versions will increment this
134
+ * number to maintain backward compatibility.
135
+ */
136
+ readonly version: 1;
137
+ }
138
+ /**
139
+ * The result interface of the validate function.
140
+ *
141
+ * A discriminated union that represents either successful or failed
142
+ * validation.
143
+ */
144
+ type Result<Output> = FailureResult | SuccessResult<Output>;
145
+ /**
146
+ * The result interface if validation succeeds.
147
+ *
148
+ * Contains the validated/transformed output value and explicitly sets
149
+ * `issues` to undefined to distinguish from failure results.
150
+ *
151
+ * @template Output - The output type after successful validation
152
+ */
153
+ interface SuccessResult<Output> {
154
+ /**
155
+ * The non-existent issues.
156
+ *
157
+ * Explicitly undefined to create a discriminated union with FailureResult.
158
+ */
159
+ readonly issues?: undefined;
160
+ /**
161
+ * The typed output value.
162
+ *
163
+ * This may be the same as the input or a transformed version, depending on
164
+ * the schema's validation logic.
165
+ */
166
+ readonly value: Output;
167
+ }
168
+ /**
169
+ * The Standard Schema types interface.
170
+ *
171
+ * Provides TypeScript type information for schemas that support type
172
+ * inference.
173
+ *
174
+ * @template Input - The input type of the schema
175
+ * @template Output - The output type of the schema
176
+ */
177
+ interface Types<Input = unknown, Output = Input> {
178
+ /**
179
+ * The input type of the schema.
180
+ *
181
+ * The type of values that can be passed to the validate function.
182
+ */
183
+ readonly input: Input;
184
+ /**
185
+ * The output type of the schema.
186
+ *
187
+ * The type of values produced after successful validation.
188
+ */
189
+ readonly output: Output;
190
+ }
191
+ }
192
+ //# sourceMappingURL=standard-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standard-schema.d.ts","sourceRoot":"","sources":["../../src/standard-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB,CAAC,KAAK,GAAG,OAAO,EAAE,MAAM,GAAG,KAAK;IAC/D;;;;;;;;OAQG;IACH,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;CAC7D;AAGD,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC;;;;OAIG;IACH,UAAiB,aAAa;QAC5B;;;;WAIG;QACH,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;KACvC;IAED;;;;;;OAMG;IACH,KAAY,UAAU,CAAC,MAAM,SAAS,gBAAgB,IAAI,WAAW,CACnE,MAAM,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAC7B,CAAC,OAAO,CAAC,CAAC;IAEX;;;;;;OAMG;IACH,KAAY,WAAW,CAAC,MAAM,SAAS,gBAAgB,IAAI,WAAW,CACpE,MAAM,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAC7B,CAAC,QAAQ,CAAC,CAAC;IAEZ;;;;;OA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AM,CAAC;KACzB;CACF"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * Standard Schema v1 specification types.
4
+ *
5
+ * These types define the Standard Schema interface that enables
6
+ * interoperability between different validation libraries (Zod, Valibot,
7
+ * ArkType, etc.).
8
+ *
9
+ * @packageDocumentation
10
+ * @see {@link https://standardschema.dev | Standard Schema Specification}
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ //# sourceMappingURL=standard-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standard-schema.js","sourceRoot":"","sources":["../../src/standard-schema.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG"}