internal
<TSchema extends s.Schema>(schema: TSchema, value: unknown): ReturnType<TSchema["run"]> import {parseWithSummary} from 'svelte-docinfo/schema.js'; Validate value against schema, throwing an error that lists every issue
the parse reports.
s.parse_or_throw's message stops at ten issues; this one lists every issue
the parse builds, one per line, as s.format_issue_with_value writes it:
path: expected X, received Y, or the bare text for an issue at the root,
where Y is the value that failed when it's a string, number, or boolean
(a string quoted as JSON and cut at 32 code units, so received "funtion"),
and its type otherwise (received undefined, received object). An unknown
key reads its value's type, never the value. So the message carries short
pieces of value's values, which issues never does. Unknown keys of a strict
object are each reported. fuz_schema builds at most a hundred issues for a
parse, so a message of a hundred ends with a line saying there may be more.
schema
the schema to validate against
TSchemavalue
the value to validate
unknownreturns
Infer<TSchema>
the parsed output, defaults applied
generics
parseWithSummary<TSchema extends s.Schema>TSchema
s.Schemathrows
SchemaError- when `value` doesn't match; `message` lists the issues in the format above and `issues` holds them structured