* Emit the final JSON Schema after processing. * Must call process() first.
(schema: schemas.$ZodType, _params?: EmitParams)
| 109 | * Must call process() first. |
| 110 | */ |
| 111 | emit(schema: schemas.$ZodType, _params?: EmitParams): JSONSchema.BaseSchema { |
| 112 | // Apply emit params to the context |
| 113 | if (_params) { |
| 114 | if (_params.cycles) this.ctx.cycles = _params.cycles; |
| 115 | if (_params.reused) this.ctx.reused = _params.reused; |
| 116 | if (_params.external) this.ctx.external = _params.external; |
| 117 | } |
| 118 | |
| 119 | extractDefs(this.ctx, schema); |
| 120 | const result = finalize(this.ctx, schema); |
| 121 | |
| 122 | // Strip ~standard property to match old implementation's return type |
| 123 | const { "~standard": _, ...plainResult } = result as any; |
| 124 | return plainResult as JSONSchema.BaseSchema; |
| 125 | } |
| 126 | } |
nothing calls this directly
no test coverage detected