internal
<TSchema extends v.GenericSchema>(schema: TSchema, value: unknown): InferOutput<TSchema> import {parseWithSummary} from 'svelte-docinfo/schema.js'; Validate value against schema, throwing an error that lists every issue
valibot reports.
Collects all issues rather than stopping at the first, and replaces the
message valibot's own parse would throw (the first issue only, with no
path). The format is this package's own, built from each issue's message
and v.getDotPath: one line per issue, in issue order, as path: message,
or the bare message when the issue has no dot path (the root value, or a
path through a key a dot path can't express).
That isn't every problem in the value: a strict object with several unknown keys reports only the first, so fixing one can surface the next.
schema
the schema to validate against
TSchemavalue
the value to validate
unknownreturns
InferOutput<TSchema> the parsed output, defaults applied
generics
parseWithSummary<TSchema extends v.GenericSchema>TSchema
v.GenericSchemathrows
ValiError- when `value` doesn't match; `message` lists the issues in the format above and `issues` holds them structured