<S extends Constraint>(self: S): StandardJSONSchemaV1<
S["Encoded"],
S["Type"]
> &
SConverts a schema to an experimental Standard JSON Schema V1 representation.
Details
https://github.com/standard-schema/standard-schema/pull/134
export function function toStandardJSONSchemaV1<
S extends Constraint
>(
self: S
): StandardJSONSchemaV1<S["Encoded"], S["Type"]> &
S
Converts a schema to an experimental Standard JSON Schema V1 representation.
Details
https://github.com/standard-schema/standard-schema/pull/134
toStandardJSONSchemaV1<function (type parameter) S in toStandardJSONSchemaV1<S extends Constraint>(self: S): StandardJSONSchemaV1<S["Encoded"], S["Type"]> & SS extends Constraint>(
self: S extends Constraintself: function (type parameter) S in toStandardJSONSchemaV1<S extends Constraint>(self: S): StandardJSONSchemaV1<S["Encoded"], S["Type"]> & SS
): import StandardJSONSchemaV1StandardJSONSchemaV1<function (type parameter) S in toStandardJSONSchemaV1<S extends Constraint>(self: S): StandardJSONSchemaV1<S["Encoded"], S["Type"]> & SS["Encoded"], function (type parameter) S in toStandardJSONSchemaV1<S extends Constraint>(self: S): StandardJSONSchemaV1<S["Encoded"], S["Type"]> & SS["Type"]> & function (type parameter) S in toStandardJSONSchemaV1<S extends Constraint>(self: S): StandardJSONSchemaV1<S["Encoded"], S["Type"]> & SS {
const const jsonSchema: StandardJSONSchemaV1.Props<
S["Encoded"],
S["Type"]
>
jsonSchema: import StandardJSONSchemaV1StandardJSONSchemaV1.type StandardJSONSchemaV1.Props = /*unresolved*/ anyProps<function (type parameter) S in toStandardJSONSchemaV1<S extends Constraint>(self: S): StandardJSONSchemaV1<S["Encoded"], S["Type"]> & SS["Encoded"], function (type parameter) S in toStandardJSONSchemaV1<S extends Constraint>(self: S): StandardJSONSchemaV1<S["Encoded"], S["Type"]> & SS["Type"]>["jsonSchema"] = {
function input(options: any): JsonSchema.JsonSchemainput(options: anyoptions) {
return function toBaseStandardJSONSchemaV1(
self: Constraint,
target: StandardJSONSchemaV1.Target
): JsonSchema.JsonSchema
toBaseStandardJSONSchemaV1(self: S extends Constraintself, options: anyoptions.target)
},
function output(options: any): JsonSchema.JsonSchemaoutput(options: anyoptions) {
return function toBaseStandardJSONSchemaV1(
self: Constraint,
target: StandardJSONSchemaV1.Target
): JsonSchema.JsonSchema
toBaseStandardJSONSchemaV1(const toType: toTypeLambda
;<S>(self: S) => toType<S>
Type-level representation returned by
toType
.
Extracts the type-side schema: sets Encoded to equal the decoded Type,
discarding the encoding transformation path.
toType(self: S extends Constraintself), options: anyoptions.target)
}
}
if ("~standard" in self: S extends Constraintself) {
const const out: anyout = self: S & Record<"~standard", unknown>self as any
if ("jsonSchema" in const out: anyout["~standard"]) return const out: anyout
var Object: ObjectConstructorProvides functionality common to all JavaScript objects.
Object.ObjectConstructor.assign<any, {
jsonSchema: StandardJSONSchemaV1.Props<S["Encoded"], S["Type"]>;
}>(target: any, source: {
jsonSchema: StandardJSONSchemaV1.Props<S["Encoded"], S["Type"]>;
}): any (+3 overloads)
Copy the values of all of the enumerable own properties from one or more source objects to a
target object. Returns the target object.
assign(const out: anyout["~standard"], { jsonSchema: StandardJSONSchemaV1.Props<
S["Encoded"],
S["Type"]
>
jsonSchema })
return const out: anyout
} else {
return var Object: ObjectConstructorProvides functionality common to all JavaScript objects.
Object.ObjectConstructor.assign<S, {
"~standard": {
readonly version: 1;
readonly vendor: "effect";
readonly jsonSchema: StandardJSONSchemaV1.Props<S["Encoded"], S["Type"]>;
};
}>(target: S, source: {
"~standard": {
readonly version: 1;
readonly vendor: "effect";
readonly jsonSchema: StandardJSONSchemaV1.Props<S["Encoded"], S["Type"]>;
};
}): S & {
"~standard": {
readonly version: 1;
readonly vendor: "effect";
readonly jsonSchema: StandardJSONSchemaV1.Props<S["Encoded"], S["Type"]>;
};
} (+3 overloads)
Copy the values of all of the enumerable own properties from one or more source objects to a
target object. Returns the target object.
assign(self: S extends Constraintself, {
"~standard": {
version: 1version: 1,
vendor: "effect"vendor: "effect",
jsonSchema: StandardJSONSchemaV1.Props<
S["Encoded"],
S["Type"]
>
jsonSchema
} as type const = {
readonly version: 1;
readonly vendor: "effect";
readonly jsonSchema: StandardJSONSchemaV1.Props<S["Encoded"], S["Type"]>;
}
const
})
}
}