(type: z.ZodType, minPrecedence = 0)
| 121 | } |
| 122 | |
| 123 | function appendType(type: z.ZodType, minPrecedence = 0) { |
| 124 | const name = namedTypes.get(getTypeIdentity(type)); |
| 125 | if (name) { |
| 126 | append(name); |
| 127 | } |
| 128 | else { |
| 129 | const parenthesize = getTypePrecedence(type) < minPrecedence; |
| 130 | if (parenthesize) append("("); |
| 131 | appendTypeDefinition(type); |
| 132 | if (parenthesize) append(")"); |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | function appendTypeDefinition(type: z.ZodType) { |
| 137 | switch (getTypeKind(type)) { |
no test coverage detected
searching dependent graphs…