MCPcopy Index your code
hub / github.com/microsoft/TypeChat / appendUnionOrIntersectionTypes

Function appendUnionOrIntersectionTypes

typescript/src/zod/validate.ts:219–226  ·  view source on GitHub ↗
(types: readonly z.ZodType[], minPrecedence: TypePrecedence)

Source from the content-addressed store, hash-verified

217 }
218
219 function appendUnionOrIntersectionTypes(types: readonly z.ZodType[], minPrecedence: TypePrecedence) {
220 let first = true;
221 for (const type of types) {
222 if (!first) append(minPrecedence === TypePrecedence.Intersection ? " & " : " | ");
223 appendType(type, minPrecedence);
224 first = false;
225 }
226 }
227
228 function appendTupleType(tupleType: z.ZodType) {
229 append("[");

Callers 1

appendTypeDefinitionFunction · 0.85

Calls 2

appendFunction · 0.85
appendTypeFunction · 0.85

Tested by

no test coverage detected