<S extends Top>(toFormatter: () => Formatter<S["Type"]>): (
self: S
) => S["Rebuild"]Attaches a custom formatter used by toFormatter.
Details
Use this when the formatter derived from the schema structure is not suitable.
The annotation is applied through this helper because adding it directly to
Annotations.Bottom would make schemas invariant.
Formatter
Source effect/Schema.ts:131165 lines
export function function overrideToFormatter<
S extends Top
>(
toFormatter: () => Formatter<S["Type"]>
): (self: S) => S["Rebuild"]
Attaches a custom formatter used by toFormatter.
Details
Use this when the formatter derived from the schema structure is not suitable.
The annotation is applied through this helper because adding it directly to
Annotations.Bottom would make schemas invariant.
overrideToFormatter<function (type parameter) S in overrideToFormatter<S extends Top>(toFormatter: () => Formatter<S["Type"]>): (self: S) => S["Rebuild"]S extends Top>(toFormatter: () => Formatter<S["Type"]>toFormatter: () => import FormatterFormatter<function (type parameter) S in overrideToFormatter<S extends Top>(toFormatter: () => Formatter<S["Type"]>): (self: S) => S["Rebuild"]S["Type"]>) {
return (self: S extends Topself: function (type parameter) S in overrideToFormatter<S extends Top>(toFormatter: () => Formatter<S["Type"]>): (self: S) => S["Rebuild"]S): function (type parameter) S in overrideToFormatter<S extends Top>(toFormatter: () => Formatter<S["Type"]>): (self: S) => S["Rebuild"]S["Rebuild"] => {
return self: S extends Topself.Bottom<unknown, unknown, unknown, unknown, AST, Top, unknown, unknown, any, unknown, Mutability, Optionality, ConstructorDefault, Mutability, Optionality>.annotate(annotations: Annotations.Bottom<S["Type"], S["~type.parameters"]>): S["Rebuild"]annotate({ toFormatter: () => Formatter<S["Type"]>toFormatter })
}
}