[{"data":1,"prerenderedAt":1274},["ShallowReactive",2],{"navigation_docs":3,"-guide-types-vs-schemas":127,"-guide-types-vs-schemas-surround":1269},[4,19,53,71,95],{"title":5,"icon":6,"redirect":7,"path":8,"stem":9,"children":10,"page":18},"Introduction","i-lucide-rocket","\u002Fintroduction\u002Fabout-ts-runtypes","\u002Fintroduction","1.introduction",[11,14],{"title":12,"path":7,"stem":13},"About RunTypes","1.introduction\u002F1.about-ts-runtypes",{"title":15,"path":16,"stem":17},"Quick Start","\u002Fintroduction\u002Fquick-start","1.introduction\u002F2.quick-start",false,{"title":20,"icon":21,"redirect":22,"path":23,"stem":24,"children":25,"page":18},"Guide","i-lucide-book-open","\u002Fguide\u002Ftypes-vs-schemas","\u002Fguide","2.guide",[26,29,33,37,41,45,49],{"title":27,"path":22,"stem":28},"Types vs Schemas","2.guide\u002F1.types-vs-schemas",{"title":30,"path":31,"stem":32},"Type Formats","\u002Fguide\u002Ftype-formats","2.guide\u002F2.type-formats",{"title":34,"path":35,"stem":36},"Serialization","\u002Fguide\u002Fserialization","2.guide\u002F3.serialization",{"title":38,"path":39,"stem":40},"Mock Data","\u002Fguide\u002Fmocking","2.guide\u002F4.mocking",{"title":42,"path":43,"stem":44},"Validation","\u002Fguide\u002Fvalidation","2.guide\u002F5.validation",{"title":46,"path":47,"stem":48},"Reflection","\u002Fguide\u002Fmarkers-and-reflection","2.guide\u002F6.markers-and-reflection",{"title":50,"path":51,"stem":52},"Pure Functions","\u002Fguide\u002Fpure-functions","2.guide\u002F7.pure-functions",{"title":54,"icon":55,"redirect":56,"path":57,"stem":58,"children":59,"page":18},"AI Integration","i-lucide-sparkles","\u002Fai-integration\u002Fworkflow-and-commands","\u002Fai-integration","3.ai-integration",[60,63,67],{"title":61,"path":56,"stem":62},"AI Workflow","3.ai-integration\u002F1.workflow-and-commands",{"title":64,"path":65,"stem":66},"FriendlyType","\u002Fai-integration\u002Ffriendly-type","3.ai-integration\u002F2.friendly-type",{"title":68,"path":69,"stem":70},"MockData","\u002Fai-integration\u002Fmock-data","3.ai-integration\u002F3.mock-data",{"title":72,"icon":73,"redirect":74,"path":75,"stem":76,"children":77,"page":18},"Test Suites","i-lucide-terminal","\u002Fsuites\u002Fvalidation","\u002Fsuites","6.suites",[78,80,83,87,91],{"title":42,"path":74,"stem":79},"6.suites\u002F1.validation",{"title":34,"path":81,"stem":82},"\u002Fsuites\u002Fserialization","6.suites\u002F2.serialization",{"title":84,"path":85,"stem":86},"Formats Validation","\u002Fsuites\u002Fformat-validation","6.suites\u002F3.format-validation",{"title":88,"path":89,"stem":90},"Formats Serialization","\u002Fsuites\u002Fformat-serialization","6.suites\u002F4.format-serialization",{"title":92,"path":93,"stem":94},"Fuzzing","\u002Fsuites\u002Ffuzzing","6.suites\u002F5.fuzzing",{"title":96,"icon":97,"redirect":98,"path":99,"stem":100,"children":101,"page":18},"Benchmarks","i-lucide-gauge","\u002Fbenchmarks\u002Fvalidation","\u002Fbenchmarks","7.benchmarks",[102,104,108,112,116,119,123],{"title":42,"path":98,"stem":103},"7.benchmarks\u002F1.validation",{"title":105,"path":106,"stem":107},"Validation Formats","\u002Fbenchmarks\u002Fvalidation-formats","7.benchmarks\u002F2.validation-formats",{"title":109,"path":110,"stem":111},"Validation Errors","\u002Fbenchmarks\u002Fgetvalidationerrors","7.benchmarks\u002F3.getvalidationerrors",{"title":113,"path":114,"stem":115},"Validation Error Formats","\u002Fbenchmarks\u002Fgetvalidationerrors-formats","7.benchmarks\u002F4.getvalidationerrors-formats",{"title":34,"path":117,"stem":118},"\u002Fbenchmarks\u002Fserialization","7.benchmarks\u002F5.serialization",{"title":120,"path":121,"stem":122},"Serialization Formats","\u002Fbenchmarks\u002Fserialization-formats","7.benchmarks\u002F6.serialization-formats",{"title":124,"path":125,"stem":126},"Compile Time","\u002Fbenchmarks\u002Fcompiletime","7.benchmarks\u002F7.compiletime",{"id":128,"title":27,"body":129,"description":1263,"extension":1264,"links":1265,"meta":1266,"navigation":287,"path":22,"seo":1267,"stem":28,"__hash__":1268},"docs\u002F2.guide\u002F1.types-vs-schemas.md",{"type":130,"value":131},"minimark",[132,137,150,537,540,547,554,859,865,869,872,1256,1259],[133,134,136],"h2",{"id":135},"side-by-side","Side by side",[138,139,140,141,145,146,149],"p",{},"Same shape, two spellings. Both ",[142,143,144],"code",{},"isProductA"," and ",[142,147,148],{},"isProductB"," are identical validators under the hood.",[151,152,155,319],"div",{"className":153},[154],"rt-define-cols",[156,157,158],"code-group",{},[159,160,166],"pre",{"className":161,"code":162,"filename":163,"language":164,"meta":165,"style":165},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F packages\u002Fexamples\u002Fsrc\u002Fguide\u002Ftypes-vs-schemas-side-by-side.ts\n\u002F\u002F Option A — a plain TypeScript type. Fastest path, nothing extra to write.\ntype Product = {\n  id: number;\n  name: string;\n  tags: string[];\n  status: 'draft' | 'live';\n};\n\nconst isProductA = createValidate\u003CProduct>();\n","Type Definition","ts","",[142,167,168,177,183,201,217,230,246,276,282,289],{"__ignoreMap":165},[169,170,173],"span",{"class":171,"line":172},"line",1,[169,174,176],{"class":175},"sHwdD","\u002F\u002F packages\u002Fexamples\u002Fsrc\u002Fguide\u002Ftypes-vs-schemas-side-by-side.ts\n",[169,178,180],{"class":171,"line":179},2,[169,181,182],{"class":175},"\u002F\u002F Option A — a plain TypeScript type. Fastest path, nothing extra to write.\n",[169,184,186,190,194,198],{"class":171,"line":185},3,[169,187,189],{"class":188},"spNyl","type",[169,191,193],{"class":192},"sBMFI"," Product",[169,195,197],{"class":196},"sMK4o"," =",[169,199,200],{"class":196}," {\n",[169,202,204,208,211,214],{"class":171,"line":203},4,[169,205,207],{"class":206},"swJcz","  id",[169,209,210],{"class":196},":",[169,212,213],{"class":192}," number",[169,215,216],{"class":196},";\n",[169,218,220,223,225,228],{"class":171,"line":219},5,[169,221,222],{"class":206},"  name",[169,224,210],{"class":196},[169,226,227],{"class":192}," string",[169,229,216],{"class":196},[169,231,233,236,238,240,244],{"class":171,"line":232},6,[169,234,235],{"class":206},"  tags",[169,237,210],{"class":196},[169,239,227],{"class":192},[169,241,243],{"class":242},"sTEyZ","[]",[169,245,216],{"class":196},[169,247,249,252,254,257,261,264,267,269,272,274],{"class":171,"line":248},7,[169,250,251],{"class":206},"  status",[169,253,210],{"class":196},[169,255,256],{"class":196}," '",[169,258,260],{"class":259},"sfazB","draft",[169,262,263],{"class":196},"'",[169,265,266],{"class":196}," |",[169,268,256],{"class":196},[169,270,271],{"class":259},"live",[169,273,263],{"class":196},[169,275,216],{"class":196},[169,277,279],{"class":171,"line":278},8,[169,280,281],{"class":196},"};\n",[169,283,285],{"class":171,"line":284},9,[169,286,288],{"emptyLinePlaceholder":287},true,"\n",[169,290,292,295,298,301,305,308,311,314,317],{"class":171,"line":291},10,[169,293,294],{"class":188},"const",[169,296,297],{"class":242}," isProductA ",[169,299,300],{"class":196},"=",[169,302,304],{"class":303},"s2Zo4"," createValidate",[169,306,307],{"class":196},"\u003C",[169,309,310],{"class":192},"Product",[169,312,313],{"class":196},">",[169,315,316],{"class":242},"()",[169,318,216],{"class":196},[156,320,321],{},[159,322,325],{"className":161,"code":323,"filename":324,"language":164,"meta":165,"style":165},"\u002F\u002F packages\u002Fexamples\u002Fsrc\u002Fguide\u002Ftypes-vs-schemas-side-by-side.ts\n\u002F\u002F Option B — the RT.* builders, if you like the Zod \u002F TypeBox feel.\nconst productSchema = RT.object({\n  id: TF.number(),\n  name: TF.string(),\n  tags: RT.array(TF.string()),\n  status: RT.union([RT.literal('draft'), RT.literal('live')]),\n});\n\n\u002F\u002F Recover the TypeScript type from the schema whenever you need it.\ntype ProductFromSchema = Static\u003Ctypeof productSchema>;\n\nconst isProductB = createValidate(productSchema);\n","Schema",[142,326,327,331,336,360,379,396,421,475,484,488,493,515,520],{"__ignoreMap":165},[169,328,329],{"class":171,"line":172},[169,330,176],{"class":175},[169,332,333],{"class":171,"line":179},[169,334,335],{"class":175},"\u002F\u002F Option B — the RT.* builders, if you like the Zod \u002F TypeBox feel.\n",[169,337,338,340,343,345,348,351,354,357],{"class":171,"line":185},[169,339,294],{"class":188},[169,341,342],{"class":242}," productSchema ",[169,344,300],{"class":196},[169,346,347],{"class":242}," RT",[169,349,350],{"class":196},".",[169,352,353],{"class":303},"object",[169,355,356],{"class":242},"(",[169,358,359],{"class":196},"{\n",[169,361,362,364,366,369,371,374,376],{"class":171,"line":203},[169,363,207],{"class":206},[169,365,210],{"class":196},[169,367,368],{"class":242}," TF",[169,370,350],{"class":196},[169,372,373],{"class":303},"number",[169,375,316],{"class":242},[169,377,378],{"class":196},",\n",[169,380,381,383,385,387,389,392,394],{"class":171,"line":219},[169,382,222],{"class":206},[169,384,210],{"class":196},[169,386,368],{"class":242},[169,388,350],{"class":196},[169,390,391],{"class":303},"string",[169,393,316],{"class":242},[169,395,378],{"class":196},[169,397,398,400,402,404,406,409,412,414,416,419],{"class":171,"line":232},[169,399,235],{"class":206},[169,401,210],{"class":196},[169,403,347],{"class":242},[169,405,350],{"class":196},[169,407,408],{"class":303},"array",[169,410,411],{"class":242},"(TF",[169,413,350],{"class":196},[169,415,391],{"class":303},[169,417,418],{"class":242},"())",[169,420,378],{"class":196},[169,422,423,425,427,429,431,434,437,439,442,444,446,448,450,453,456,458,460,462,464,466,468,470,473],{"class":171,"line":248},[169,424,251],{"class":206},[169,426,210],{"class":196},[169,428,347],{"class":242},[169,430,350],{"class":196},[169,432,433],{"class":303},"union",[169,435,436],{"class":242},"([RT",[169,438,350],{"class":196},[169,440,441],{"class":303},"literal",[169,443,356],{"class":242},[169,445,263],{"class":196},[169,447,260],{"class":259},[169,449,263],{"class":196},[169,451,452],{"class":242},")",[169,454,455],{"class":196},",",[169,457,347],{"class":242},[169,459,350],{"class":196},[169,461,441],{"class":303},[169,463,356],{"class":242},[169,465,263],{"class":196},[169,467,271],{"class":259},[169,469,263],{"class":196},[169,471,472],{"class":242},")])",[169,474,378],{"class":196},[169,476,477,480,482],{"class":171,"line":278},[169,478,479],{"class":196},"}",[169,481,452],{"class":242},[169,483,216],{"class":196},[169,485,486],{"class":171,"line":284},[169,487,288],{"emptyLinePlaceholder":287},[169,489,490],{"class":171,"line":291},[169,491,492],{"class":175},"\u002F\u002F Recover the TypeScript type from the schema whenever you need it.\n",[169,494,496,498,501,503,506,509,512],{"class":171,"line":495},11,[169,497,189],{"class":188},[169,499,500],{"class":192}," ProductFromSchema",[169,502,197],{"class":196},[169,504,505],{"class":192}," Static",[169,507,508],{"class":196},"\u003Ctypeof",[169,510,511],{"class":242}," productSchema",[169,513,514],{"class":196},">;\n",[169,516,518],{"class":171,"line":517},12,[169,519,288],{"emptyLinePlaceholder":287},[169,521,523,525,528,530,532,535],{"class":171,"line":522},13,[169,524,294],{"class":188},[169,526,527],{"class":242}," isProductB ",[169,529,300],{"class":196},[169,531,304],{"class":303},[169,533,534],{"class":242},"(productSchema)",[169,536,216],{"class":196},[138,538,539],{},"The pure type is the fast path. There's nothing to write but the type you already have. The schema is a real value you can store in a variable, pass to a function, or build up piece by piece.",[133,541,543,544],{"id":542},"get-the-type-back-with-static","Get the type back with ",[142,545,546],{},"Static",[138,548,549,550,553],{},"A schema is a value, but sometimes you want the TypeScript type it stands for. ",[142,551,552],{},"Static\u003Ctypeof schema>"," hands it back:",[159,555,557],{"className":161,"code":556,"language":164,"meta":165,"style":165},"\u002F\u002F packages\u002Fexamples\u002Fsrc\u002Fguide\u002Ftypes-vs-schemas-static.ts\nimport * as TF from 'ts-runtypes\u002Fformats';\nimport {type Static} from 'ts-runtypes';\nimport * as RT from 'ts-runtypes\u002Fschema';\n\n\u002F\u002F Build a schema as a value you can pass around, store, or compose.\nconst address = RT.object({\n  street: TF.string(),\n  city: TF.string(),\n  zip: TF.string(),\n});\n\n\u002F\u002F Static\u003Ctypeof schema> hands you the TypeScript type back.\ntype Address = Static\u003Ctypeof address>;\n\n\u002F\u002F Now `Address` is a normal type — use it anywhere.\nconst home: Address = {street: '1 Infinite Loop', city: 'Cupertino', zip: '95014'};\n\nexport {address, home};\nexport type {Address};\n",[142,558,559,564,591,616,638,642,647,666,683,700,717,725,729,734,753,758,764,822,827,844],{"__ignoreMap":165},[169,560,561],{"class":171,"line":172},[169,562,563],{"class":175},"\u002F\u002F packages\u002Fexamples\u002Fsrc\u002Fguide\u002Ftypes-vs-schemas-static.ts\n",[169,565,566,570,573,576,579,582,584,587,589],{"class":171,"line":179},[169,567,569],{"class":568},"s7zQu","import",[169,571,572],{"class":196}," *",[169,574,575],{"class":568}," as",[169,577,578],{"class":242}," TF ",[169,580,581],{"class":568},"from",[169,583,256],{"class":196},[169,585,586],{"class":259},"ts-runtypes\u002Fformats",[169,588,263],{"class":196},[169,590,216],{"class":196},[169,592,593,595,598,600,602,604,607,609,612,614],{"class":171,"line":185},[169,594,569],{"class":568},[169,596,597],{"class":196}," {",[169,599,189],{"class":568},[169,601,505],{"class":242},[169,603,479],{"class":196},[169,605,606],{"class":568}," from",[169,608,256],{"class":196},[169,610,611],{"class":259},"ts-runtypes",[169,613,263],{"class":196},[169,615,216],{"class":196},[169,617,618,620,622,624,627,629,631,634,636],{"class":171,"line":203},[169,619,569],{"class":568},[169,621,572],{"class":196},[169,623,575],{"class":568},[169,625,626],{"class":242}," RT ",[169,628,581],{"class":568},[169,630,256],{"class":196},[169,632,633],{"class":259},"ts-runtypes\u002Fschema",[169,635,263],{"class":196},[169,637,216],{"class":196},[169,639,640],{"class":171,"line":219},[169,641,288],{"emptyLinePlaceholder":287},[169,643,644],{"class":171,"line":232},[169,645,646],{"class":175},"\u002F\u002F Build a schema as a value you can pass around, store, or compose.\n",[169,648,649,651,654,656,658,660,662,664],{"class":171,"line":248},[169,650,294],{"class":188},[169,652,653],{"class":242}," address ",[169,655,300],{"class":196},[169,657,347],{"class":242},[169,659,350],{"class":196},[169,661,353],{"class":303},[169,663,356],{"class":242},[169,665,359],{"class":196},[169,667,668,671,673,675,677,679,681],{"class":171,"line":278},[169,669,670],{"class":206},"  street",[169,672,210],{"class":196},[169,674,368],{"class":242},[169,676,350],{"class":196},[169,678,391],{"class":303},[169,680,316],{"class":242},[169,682,378],{"class":196},[169,684,685,688,690,692,694,696,698],{"class":171,"line":284},[169,686,687],{"class":206},"  city",[169,689,210],{"class":196},[169,691,368],{"class":242},[169,693,350],{"class":196},[169,695,391],{"class":303},[169,697,316],{"class":242},[169,699,378],{"class":196},[169,701,702,705,707,709,711,713,715],{"class":171,"line":291},[169,703,704],{"class":206},"  zip",[169,706,210],{"class":196},[169,708,368],{"class":242},[169,710,350],{"class":196},[169,712,391],{"class":303},[169,714,316],{"class":242},[169,716,378],{"class":196},[169,718,719,721,723],{"class":171,"line":495},[169,720,479],{"class":196},[169,722,452],{"class":242},[169,724,216],{"class":196},[169,726,727],{"class":171,"line":517},[169,728,288],{"emptyLinePlaceholder":287},[169,730,731],{"class":171,"line":522},[169,732,733],{"class":175},"\u002F\u002F Static\u003Ctypeof schema> hands you the TypeScript type back.\n",[169,735,737,739,742,744,746,748,751],{"class":171,"line":736},14,[169,738,189],{"class":188},[169,740,741],{"class":192}," Address",[169,743,197],{"class":196},[169,745,505],{"class":192},[169,747,508],{"class":196},[169,749,750],{"class":242}," address",[169,752,514],{"class":196},[169,754,756],{"class":171,"line":755},15,[169,757,288],{"emptyLinePlaceholder":287},[169,759,761],{"class":171,"line":760},16,[169,762,763],{"class":175},"\u002F\u002F Now `Address` is a normal type — use it anywhere.\n",[169,765,767,769,772,774,776,778,780,783,785,787,790,792,794,797,799,801,804,806,808,811,813,815,818,820],{"class":171,"line":766},17,[169,768,294],{"class":188},[169,770,771],{"class":242}," home",[169,773,210],{"class":196},[169,775,741],{"class":192},[169,777,197],{"class":196},[169,779,597],{"class":196},[169,781,782],{"class":206},"street",[169,784,210],{"class":196},[169,786,256],{"class":196},[169,788,789],{"class":259},"1 Infinite Loop",[169,791,263],{"class":196},[169,793,455],{"class":196},[169,795,796],{"class":206}," city",[169,798,210],{"class":196},[169,800,256],{"class":196},[169,802,803],{"class":259},"Cupertino",[169,805,263],{"class":196},[169,807,455],{"class":196},[169,809,810],{"class":206}," zip",[169,812,210],{"class":196},[169,814,256],{"class":196},[169,816,817],{"class":259},"95014",[169,819,263],{"class":196},[169,821,281],{"class":196},[169,823,825],{"class":171,"line":824},18,[169,826,288],{"emptyLinePlaceholder":287},[169,828,830,833,835,838,840,842],{"class":171,"line":829},19,[169,831,832],{"class":568},"export",[169,834,597],{"class":196},[169,836,837],{"class":242},"address",[169,839,455],{"class":196},[169,841,771],{"class":242},[169,843,281],{"class":196},[169,845,847,849,852,854,857],{"class":171,"line":846},20,[169,848,832],{"class":568},[169,850,851],{"class":568}," type",[169,853,597],{"class":196},[169,855,856],{"class":242},"Address",[169,858,281],{"class":196},[138,860,861,862,864],{},"So you never write a shape twice. Start from a type and reflect it, or start from a schema and ",[142,863,546],{}," your way to the type. Either direction gives you one source of truth.",[133,866,868],{"id":867},"mix-them-freely","Mix them freely",[138,870,871],{},"They're the same thing, so you can use both in the same file: a plain type here, a schema there, even nesting one kind of thinking inside the other.",[159,873,875],{"className":161,"code":874,"language":164,"meta":165,"style":165},"\u002F\u002F packages\u002Fexamples\u002Fsrc\u002Fguide\u002Ftypes-vs-schemas-mixed.ts\nimport * as TF from 'ts-runtypes\u002Fformats';\nimport {createValidate} from 'ts-runtypes';\nimport * as RT from 'ts-runtypes\u002Fschema';\n\n\u002F\u002F Mix both in one file — a pure type nested inside a schema and back again.\ntype Money = {amount: number; currency: 'USD' | 'EUR'};\n\n\u002F\u002F A schema that references the plain type via RT.* leaves.\nconst invoice = RT.object({\n  id: TF.string(),\n  lines: RT.array(\n    RT.object({\n      sku: TF.string(),\n      total: RT.object({amount: TF.number(), currency: RT.union([RT.literal('USD'), RT.literal('EUR')])}),\n    })\n  ),\n});\n\nconst isMoney = createValidate\u003CMoney>();\nconst isInvoice = createValidate(invoice);\n\nexport {isMoney, isInvoice};\n",[142,876,877,882,902,923,943,947,952,996,1000,1005,1024,1040,1056,1069,1086,1168,1176,1183,1191,1195,1217,1234,1239],{"__ignoreMap":165},[169,878,879],{"class":171,"line":172},[169,880,881],{"class":175},"\u002F\u002F packages\u002Fexamples\u002Fsrc\u002Fguide\u002Ftypes-vs-schemas-mixed.ts\n",[169,883,884,886,888,890,892,894,896,898,900],{"class":171,"line":179},[169,885,569],{"class":568},[169,887,572],{"class":196},[169,889,575],{"class":568},[169,891,578],{"class":242},[169,893,581],{"class":568},[169,895,256],{"class":196},[169,897,586],{"class":259},[169,899,263],{"class":196},[169,901,216],{"class":196},[169,903,904,906,908,911,913,915,917,919,921],{"class":171,"line":185},[169,905,569],{"class":568},[169,907,597],{"class":196},[169,909,910],{"class":242},"createValidate",[169,912,479],{"class":196},[169,914,606],{"class":568},[169,916,256],{"class":196},[169,918,611],{"class":259},[169,920,263],{"class":196},[169,922,216],{"class":196},[169,924,925,927,929,931,933,935,937,939,941],{"class":171,"line":203},[169,926,569],{"class":568},[169,928,572],{"class":196},[169,930,575],{"class":568},[169,932,626],{"class":242},[169,934,581],{"class":568},[169,936,256],{"class":196},[169,938,633],{"class":259},[169,940,263],{"class":196},[169,942,216],{"class":196},[169,944,945],{"class":171,"line":219},[169,946,288],{"emptyLinePlaceholder":287},[169,948,949],{"class":171,"line":232},[169,950,951],{"class":175},"\u002F\u002F Mix both in one file — a pure type nested inside a schema and back again.\n",[169,953,954,956,959,961,963,966,968,970,973,976,978,980,983,985,987,989,992,994],{"class":171,"line":248},[169,955,189],{"class":188},[169,957,958],{"class":192}," Money",[169,960,197],{"class":196},[169,962,597],{"class":196},[169,964,965],{"class":206},"amount",[169,967,210],{"class":196},[169,969,213],{"class":192},[169,971,972],{"class":196},";",[169,974,975],{"class":206}," currency",[169,977,210],{"class":196},[169,979,256],{"class":196},[169,981,982],{"class":259},"USD",[169,984,263],{"class":196},[169,986,266],{"class":196},[169,988,256],{"class":196},[169,990,991],{"class":259},"EUR",[169,993,263],{"class":196},[169,995,281],{"class":196},[169,997,998],{"class":171,"line":278},[169,999,288],{"emptyLinePlaceholder":287},[169,1001,1002],{"class":171,"line":284},[169,1003,1004],{"class":175},"\u002F\u002F A schema that references the plain type via RT.* leaves.\n",[169,1006,1007,1009,1012,1014,1016,1018,1020,1022],{"class":171,"line":291},[169,1008,294],{"class":188},[169,1010,1011],{"class":242}," invoice ",[169,1013,300],{"class":196},[169,1015,347],{"class":242},[169,1017,350],{"class":196},[169,1019,353],{"class":303},[169,1021,356],{"class":242},[169,1023,359],{"class":196},[169,1025,1026,1028,1030,1032,1034,1036,1038],{"class":171,"line":495},[169,1027,207],{"class":206},[169,1029,210],{"class":196},[169,1031,368],{"class":242},[169,1033,350],{"class":196},[169,1035,391],{"class":303},[169,1037,316],{"class":242},[169,1039,378],{"class":196},[169,1041,1042,1045,1047,1049,1051,1053],{"class":171,"line":517},[169,1043,1044],{"class":206},"  lines",[169,1046,210],{"class":196},[169,1048,347],{"class":242},[169,1050,350],{"class":196},[169,1052,408],{"class":303},[169,1054,1055],{"class":242},"(\n",[169,1057,1058,1061,1063,1065,1067],{"class":171,"line":522},[169,1059,1060],{"class":242},"    RT",[169,1062,350],{"class":196},[169,1064,353],{"class":303},[169,1066,356],{"class":242},[169,1068,359],{"class":196},[169,1070,1071,1074,1076,1078,1080,1082,1084],{"class":171,"line":736},[169,1072,1073],{"class":206},"      sku",[169,1075,210],{"class":196},[169,1077,368],{"class":242},[169,1079,350],{"class":196},[169,1081,391],{"class":303},[169,1083,316],{"class":242},[169,1085,378],{"class":196},[169,1087,1088,1091,1093,1095,1097,1099,1101,1104,1106,1108,1110,1112,1114,1116,1118,1120,1122,1124,1126,1128,1130,1132,1134,1136,1138,1140,1142,1144,1146,1148,1150,1152,1154,1156,1158,1160,1162,1164,1166],{"class":171,"line":755},[169,1089,1090],{"class":206},"      total",[169,1092,210],{"class":196},[169,1094,347],{"class":242},[169,1096,350],{"class":196},[169,1098,353],{"class":303},[169,1100,356],{"class":242},[169,1102,1103],{"class":196},"{",[169,1105,965],{"class":206},[169,1107,210],{"class":196},[169,1109,368],{"class":242},[169,1111,350],{"class":196},[169,1113,373],{"class":303},[169,1115,316],{"class":242},[169,1117,455],{"class":196},[169,1119,975],{"class":206},[169,1121,210],{"class":196},[169,1123,347],{"class":242},[169,1125,350],{"class":196},[169,1127,433],{"class":303},[169,1129,436],{"class":242},[169,1131,350],{"class":196},[169,1133,441],{"class":303},[169,1135,356],{"class":242},[169,1137,263],{"class":196},[169,1139,982],{"class":259},[169,1141,263],{"class":196},[169,1143,452],{"class":242},[169,1145,455],{"class":196},[169,1147,347],{"class":242},[169,1149,350],{"class":196},[169,1151,441],{"class":303},[169,1153,356],{"class":242},[169,1155,263],{"class":196},[169,1157,991],{"class":259},[169,1159,263],{"class":196},[169,1161,472],{"class":242},[169,1163,479],{"class":196},[169,1165,452],{"class":242},[169,1167,378],{"class":196},[169,1169,1170,1173],{"class":171,"line":760},[169,1171,1172],{"class":196},"    }",[169,1174,1175],{"class":242},")\n",[169,1177,1178,1181],{"class":171,"line":766},[169,1179,1180],{"class":242},"  )",[169,1182,378],{"class":196},[169,1184,1185,1187,1189],{"class":171,"line":824},[169,1186,479],{"class":196},[169,1188,452],{"class":242},[169,1190,216],{"class":196},[169,1192,1193],{"class":171,"line":829},[169,1194,288],{"emptyLinePlaceholder":287},[169,1196,1197,1199,1202,1204,1206,1208,1211,1213,1215],{"class":171,"line":846},[169,1198,294],{"class":188},[169,1200,1201],{"class":242}," isMoney ",[169,1203,300],{"class":196},[169,1205,304],{"class":303},[169,1207,307],{"class":196},[169,1209,1210],{"class":192},"Money",[169,1212,313],{"class":196},[169,1214,316],{"class":242},[169,1216,216],{"class":196},[169,1218,1220,1222,1225,1227,1229,1232],{"class":171,"line":1219},21,[169,1221,294],{"class":188},[169,1223,1224],{"class":242}," isInvoice ",[169,1226,300],{"class":196},[169,1228,304],{"class":303},[169,1230,1231],{"class":242},"(invoice)",[169,1233,216],{"class":196},[169,1235,1237],{"class":171,"line":1236},22,[169,1238,288],{"emptyLinePlaceholder":287},[169,1240,1242,1244,1246,1249,1251,1254],{"class":171,"line":1241},23,[169,1243,832],{"class":568},[169,1245,597],{"class":196},[169,1247,1248],{"class":242},"isMoney",[169,1250,455],{"class":196},[169,1252,1253],{"class":242}," isInvoice",[169,1255,281],{"class":196},[138,1257,1258],{},"Either way you end up at the same validator, the same JSON codec, the same mock. Pick whichever reads better to you.",[1260,1261,1262],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}","Describe a shape as a plain TypeScript type or with schema builders; both compile to the same thing.","md",null,{"toc":18},{"title":27,"description":1263},"OLdmCZuWDo-j5d1pTUoNB_mp3DxKtC648LQ19dpFnB4",[1270,1272],{"title":15,"path":16,"stem":17,"description":1271,"children":-1},"Install the package + Vite plugin and generate your first validator from a TypeScript type.",{"title":30,"path":31,"stem":32,"description":1273,"children":-1},"Bake constraints like email, UUID, int32 or positive straight into your types or schemas.",1781995977801]