docs: satisfy the new export-JSDoc gate on the assertion signature

Master's verify-export-jsdoc (landed mid-stack) wants @returns on every
exported function including asserts-returning ones; document the narrowing.
This commit is contained in:
Tianyi Cui
2026-07-07 22:13:01 +08:00
parent a1c01cda52
commit aeaccf6d36

View File

@@ -256,6 +256,8 @@ function checkSchemaNode(node: unknown, path: string, violations: string[], seen
* (`UNSUPPORTED_SCHEMA`) listing EVERY violation; returns (and narrows) on
* success. Call this at the seam boundary, before any child is created.
* @param schema - the caller-supplied schema (unknown until asserted).
* @returns nothing — the assertion signature narrows `schema` to
* {@link StructuredOutputSchema} in the caller's scope on normal return.
*/
export function assertSupportedOutputSchema(schema: unknown): asserts schema is StructuredOutputSchema {
const violations: string[] = []