MCPcopy Create free account
hub / github.com/microsoft/TypeChat / getTypeIdentity

Function getTypeIdentity

typescript/src/zod/validate.ts:42–52  ·  view source on GitHub ↗
(type: z.ZodType)

Source from the content-addressed store, hash-verified

40}
41
42function getTypeIdentity(type: z.ZodType): object {
43 switch (getTypeKind(type)) {
44 case "object":
45 return (type._zod.def as z.core.$ZodObjectDef).shape;
46 case "enum":
47 return (type._zod.def as z.core.$ZodEnumDef).entries;
48 case "union":
49 return (type._zod.def as z.core.$ZodUnionDef).options;
50 }
51 return type;
52}
53
54const enum TypePrecedence {
55 Union = 0,

Callers 2

getZodSchemaAsTypeScriptFunction · 0.85
appendTypeFunction · 0.85

Calls 1

getTypeKindFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…