(ctx, result)
| 29533 | } |
| 29534 | }; |
| 29535 | var handleResult = (ctx, result) => { |
| 29536 | if ((0, parseUtil_1.isValid)(result)) { |
| 29537 | return { success: true, data: result.value }; |
| 29538 | } else { |
| 29539 | if (!ctx.common.issues.length) { |
| 29540 | throw new Error("Validation failed but no issues detected."); |
| 29541 | } |
| 29542 | return { |
| 29543 | success: false, |
| 29544 | get error() { |
| 29545 | if (this._error) |
| 29546 | return this._error; |
| 29547 | const error = new ZodError_1.ZodError(ctx.common.issues); |
| 29548 | this._error = error; |
| 29549 | return this._error; |
| 29550 | } |
| 29551 | }; |
| 29552 | } |
| 29553 | }; |
| 29554 | function processCreateParams(params) { |
| 29555 | if (!params) |
| 29556 | return {}; |
no outgoing calls
no test coverage detected
searching dependent graphs…