oas-truth 0.7.0 → 0.7.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 +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,7 +52,9 @@ dependency order. `makeSchemaDeclarations` returns the same declarations one by
|
|
|
52
52
|
`varName`, `fileName`, `importLine`, `code`) so a host can split a file per schema.
|
|
53
53
|
|
|
54
54
|
Recursive `$ref` cycles keep a helper type so the const can be annotated (`z.ZodType<NodeType>`,
|
|
55
|
-
`v.GenericSchema<NodeType>`, `Schema.
|
|
55
|
+
`v.GenericSchema<NodeType>`, `Schema.Codec<NodeType, unknown>`). The Effect annotation leaves the
|
|
56
|
+
encoded side free and the services `never`, so the declaration still decodes and passes to
|
|
57
|
+
`Schema.toStandardSchemaV1`. That helper matches what the library
|
|
56
58
|
infers — `| undefined` on Valibot optionals, `readonly` arrays on Effect — so it
|
|
57
59
|
type-checks under `exactOptionalPropertyTypes`. ArkType cycles become
|
|
58
60
|
`scope({...}).export().Member`; that declaration's `importLine` is then
|
package/dist/index.d.ts
CHANGED
|
@@ -709,7 +709,7 @@ type SchemasOptions = {
|
|
|
709
709
|
readonly typeAlias?: 'const' | 'key';
|
|
710
710
|
/**
|
|
711
711
|
* Shape of the TS7022 helper type. `'library'` (default) matches what the
|
|
712
|
-
* validator infers, so `v.GenericSchema<Helper>` / `Schema.
|
|
712
|
+
* validator infers, so `v.GenericSchema<Helper>` / `Schema.Codec<Helper, unknown>`
|
|
713
713
|
* type-check under `exactOptionalPropertyTypes`. `'literal'` is the
|
|
714
714
|
* Zod-shaped `prop?: T` form for every library.
|
|
715
715
|
*/
|
package/dist/index.js
CHANGED
|
@@ -292,7 +292,7 @@ function makeEffectAdapter() {
|
|
|
292
292
|
return `Schema.suspend(() => ${varName})`;
|
|
293
293
|
},
|
|
294
294
|
cyclicAnnotation(typeName) {
|
|
295
|
-
return `Schema.
|
|
295
|
+
return `Schema.Codec<${typeName}, unknown>`;
|
|
296
296
|
},
|
|
297
297
|
cyclicTypeStyle: { readonlyArrays: true },
|
|
298
298
|
reservedTypeNames: ["Schema", "Effect"],
|