()
| 6203 | return ["string", fmtDef, fmt]; |
| 6204 | } |
| 6205 | function validCondition() { |
| 6206 | if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) { |
| 6207 | if (!schemaEnv.$async) |
| 6208 | throw new Error("async format in sync schema"); |
| 6209 | return (0, codegen_1._) `await ${fmtRef}(${data})`; |
| 6210 | } |
| 6211 | return typeof format == "function" ? (0, codegen_1._) `${fmtRef}(${data})` : (0, codegen_1._) `${fmtRef}.test(${data})`; |
| 6212 | } |
| 6213 | } |
| 6214 | }, |
| 6215 | }; |