[{"data":1,"prerenderedAt":2247},["ShallowReactive",2],{"navigation_docs":3,"-runtypes-type-formats-overview":399},[4,162,346],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":24},"RPC","icon-park-outline:lightning","\u002Frpc","01.rpc",[10,25,63,77,102,136],{"title":11,"icon":12,"redirect":7,"path":13,"stem":14,"children":15,"page":24},"Introduction","icon-park-outline:home","\u002Frpc\u002Fintroduction","01.rpc\u002F01.introduction",[16,20],{"title":17,"path":18,"stem":19},"Quick Start","\u002Frpc\u002Fintroduction\u002Fquick-start","01.rpc\u002F01.introduction\u002F02.quick-start",{"title":21,"path":22,"stem":23},"Manual Install","\u002Frpc\u002Fintroduction\u002Fmanual-install","01.rpc\u002F01.introduction\u002F03.manual-install",false,{"title":26,"icon":27,"path":28,"stem":29,"children":30,"page":24},"Server","icon-park-outline:server","\u002Frpc\u002Fserver","01.rpc\u002F02.server",[31,35,39,43,47,51,55,59],{"title":32,"path":33,"stem":34},"Routes","\u002Frpc\u002Fserver\u002Froutes","01.rpc\u002F02.server\u002F01.routes",{"title":36,"path":37,"stem":38},"Middleware","\u002Frpc\u002Fserver\u002Fmiddleware","01.rpc\u002F02.server\u002F02.middleware",{"title":40,"path":41,"stem":42},"Call Context","\u002Frpc\u002Fserver\u002Fcall-context","01.rpc\u002F02.server\u002F03.call-context",{"title":44,"path":45,"stem":46},"Headers","\u002Frpc\u002Fserver\u002Fheaders","01.rpc\u002F02.server\u002F04.headers",{"title":48,"path":49,"stem":50},"Error Handling","\u002Frpc\u002Fserver\u002Ferror-handling","01.rpc\u002F02.server\u002F05.error-handling",{"title":52,"path":53,"stem":54},"Validation","\u002Frpc\u002Fserver\u002Fvalidation","01.rpc\u002F02.server\u002F06.validation",{"title":56,"path":57,"stem":58},"JSON Round Trip","\u002Frpc\u002Fserver\u002Fjson-round-trip","01.rpc\u002F02.server\u002F07.json-round-trip",{"title":60,"path":61,"stem":62},"Drizzle Tables","\u002Frpc\u002Fserver\u002Fdrizzle-tables","01.rpc\u002F02.server\u002F08.drizzle-tables",{"title":64,"icon":65,"path":66,"stem":67,"children":68,"page":24},"Middlewares","icon-park-outline:link-one","\u002Frpc\u002Fmiddlewares","01.rpc\u002F03.middlewares",[69,73],{"title":70,"path":71,"stem":72},"fetchMetadata","\u002Frpc\u002Fmiddlewares\u002Ffetch-metadata","01.rpc\u002F03.middlewares\u002F01.fetch-metadata",{"title":74,"path":75,"stem":76},"syncRoutes","\u002Frpc\u002Fmiddlewares\u002Fsync-routes","01.rpc\u002F03.middlewares\u002F02.sync-routes",{"title":78,"icon":79,"path":80,"stem":81,"children":82,"page":24},"Client","icon-park-outline:computer","\u002Frpc\u002Fclient","01.rpc\u002F04.client",[83,87,91,94,98],{"title":84,"path":85,"stem":86},"Client Overview","\u002Frpc\u002Fclient\u002Fclient-overview","01.rpc\u002F04.client\u002F00.client-overview",{"title":88,"path":89,"stem":90},"Client Middleware","\u002Frpc\u002Fclient\u002Fclient-middleware","01.rpc\u002F04.client\u002F01.client-middleware",{"title":48,"path":92,"stem":93},"\u002Frpc\u002Fclient\u002Ferror-handling","01.rpc\u002F04.client\u002F02.error-handling",{"title":95,"path":96,"stem":97},"Batch Requests","\u002Frpc\u002Fclient\u002Fbatch","01.rpc\u002F04.client\u002F03.batch",{"title":99,"path":100,"stem":101},"Cancellation & Timeouts","\u002Frpc\u002Fclient\u002Fcancellation-timeouts","01.rpc\u002F04.client\u002F04.cancellation-timeouts",{"title":103,"redirect":104,"icon":105,"path":106,"stem":107,"children":108,"page":24},"Platforms","\u002Frpc\u002Fplatforms\u002Fnode-js","icon-park-outline:play","\u002Frpc\u002Fplatforms","01.rpc\u002F06.platforms",[109,112,116,120,124,128,132],{"title":110,"path":104,"stem":111},"Node.js","01.rpc\u002F06.platforms\u002F01.node-js",{"title":113,"path":114,"stem":115},"Bun","\u002Frpc\u002Fplatforms\u002Fbun","01.rpc\u002F06.platforms\u002F02.bun",{"title":117,"path":118,"stem":119},"AWS Lambda","\u002Frpc\u002Fplatforms\u002Faws-lambda","01.rpc\u002F06.platforms\u002F03.aws-lambda",{"title":121,"path":122,"stem":123},"Google Cloud Functions","\u002Frpc\u002Fplatforms\u002Fgoogle-cloud-functions","01.rpc\u002F06.platforms\u002F04.google-cloud-functions",{"title":125,"path":126,"stem":127},"Cloudflare Workers","\u002Frpc\u002Fplatforms\u002Fcloudflare","01.rpc\u002F06.platforms\u002F05.cloudflare",{"title":129,"path":130,"stem":131},"Vercel","\u002Frpc\u002Fplatforms\u002Fvercel","01.rpc\u002F06.platforms\u002F06.vercel",{"title":133,"path":134,"stem":135},"uWebSockets.js","\u002Frpc\u002Fplatforms\u002Fuwebsockets","01.rpc\u002F06.platforms\u002F07.uwebsockets",{"title":137,"icon":138,"path":139,"stem":140,"children":141,"page":24},"Devtools","icon-park-outline:tool","\u002Frpc\u002Fdevtools","01.rpc\u002F07.devtools",[142,146,150,154,158],{"title":143,"path":144,"stem":145},"Linter","\u002Frpc\u002Fdevtools\u002Flinter","01.rpc\u002F07.devtools\u002F01.linter",{"title":147,"path":148,"stem":149},"Vite","\u002Frpc\u002Fdevtools\u002Fvite","01.rpc\u002F07.devtools\u002F02.vite",{"title":151,"path":152,"stem":153},"Next.js","\u002Frpc\u002Fdevtools\u002Fnextjs","01.rpc\u002F07.devtools\u002F03.nextjs",{"title":155,"path":156,"stem":157},"CLI","\u002Frpc\u002Fdevtools\u002Fcli","01.rpc\u002F07.devtools\u002F04.cli",{"title":159,"path":160,"stem":161},"API Types","\u002Frpc\u002Fdevtools\u002Fapi-types","01.rpc\u002F07.devtools\u002F05.api-types",{"title":163,"icon":164,"path":165,"stem":166,"children":167,"page":24},"RunTypes","i-lucide-braces","\u002Fruntypes","02.runtypes",[168,184,224,254,268,290,332],{"title":11,"icon":169,"redirect":165,"path":170,"stem":171,"children":172,"page":24},"i-lucide-rocket","\u002Fruntypes\u002Fintroduction","02.runtypes\u002F01.introduction",[173,177,180],{"title":174,"path":175,"stem":176},"Built on typescript-go","\u002Fruntypes\u002Fintroduction\u002Fbuilt-on-typescript-go","02.runtypes\u002F01.introduction\u002F02.built-on-typescript-go",{"title":17,"path":178,"stem":179},"\u002Fruntypes\u002Fintroduction\u002Fquick-start","02.runtypes\u002F01.introduction\u002F03.quick-start",{"title":181,"path":182,"stem":183},"Configuration","\u002Fruntypes\u002Fintroduction\u002Fconfiguration","02.runtypes\u002F01.introduction\u002F04.configuration",{"title":185,"icon":186,"redirect":187,"path":188,"stem":189,"children":190,"page":24},"Guide","i-lucide-book-open","\u002Fruntypes\u002Fguide\u002Ftype-builders","\u002Fruntypes\u002Fguide","02.runtypes\u002F02.guide",[191,194,198,201,204,208,212,216,220],{"title":192,"path":187,"stem":193},"Types vs Type Builders","02.runtypes\u002F02.guide\u002F01.type-builders",{"title":195,"path":196,"stem":197},"Reflection","\u002Fruntypes\u002Fguide\u002Freflection","02.runtypes\u002F02.guide\u002F02.reflection",{"title":52,"path":199,"stem":200},"\u002Fruntypes\u002Fguide\u002Fvalidation","02.runtypes\u002F02.guide\u002F03.validation",{"title":56,"path":202,"stem":203},"\u002Fruntypes\u002Fguide\u002Fjson-round-trip","02.runtypes\u002F02.guide\u002F04.json-round-trip",{"title":205,"path":206,"stem":207},"Data Mocking","\u002Fruntypes\u002Fguide\u002Fmocking","02.runtypes\u002F02.guide\u002F07.mocking",{"title":209,"path":210,"stem":211},"JSON Schemas","\u002Fruntypes\u002Fguide\u002Fjson-schemas","02.runtypes\u002F02.guide\u002F08.json-schemas",{"title":213,"path":214,"stem":215},"Pure Functions","\u002Fruntypes\u002Fguide\u002Fpure-functions","02.runtypes\u002F02.guide\u002F09.pure-functions",{"title":217,"path":218,"stem":219},"Compiler Markers","\u002Fruntypes\u002Fguide\u002Fcompiler-markers","02.runtypes\u002F02.guide\u002F10.compiler-markers",{"title":221,"path":222,"stem":223},"All Compiled Functions","\u002Fruntypes\u002Fguide\u002Fall-compiled-functions","02.runtypes\u002F02.guide\u002F11.all-compiled-functions",{"title":225,"icon":226,"redirect":227,"path":228,"stem":229,"children":230,"page":24},"Type Formats","i-lucide-shapes","\u002Fruntypes\u002Ftype-formats\u002Foverview","\u002Fruntypes\u002Ftype-formats","02.runtypes\u002F03.type-formats",[231,234,238,242,246,250],{"title":232,"path":227,"stem":233},"Overview","02.runtypes\u002F03.type-formats\u002F01.overview",{"title":235,"path":236,"stem":237},"String Formats","\u002Fruntypes\u002Ftype-formats\u002Fstring","02.runtypes\u002F03.type-formats\u002F02.string",{"title":239,"path":240,"stem":241},"Number Formats","\u002Fruntypes\u002Ftype-formats\u002Fnumber","02.runtypes\u002F03.type-formats\u002F03.number",{"title":243,"path":244,"stem":245},"BigInt Formats","\u002Fruntypes\u002Ftype-formats\u002Fbigint","02.runtypes\u002F03.type-formats\u002F04.bigint",{"title":247,"path":248,"stem":249},"Date and Time Formats","\u002Fruntypes\u002Ftype-formats\u002Fdate-time","02.runtypes\u002F03.type-formats\u002F05.date-time",{"title":251,"path":252,"stem":253},"Collection Formats","\u002Fruntypes\u002Ftype-formats\u002Fcollections","02.runtypes\u002F03.type-formats\u002F06.collections",{"title":255,"icon":256,"redirect":257,"path":258,"stem":259,"children":260,"page":24},"Tooling","i-lucide-wrench","\u002Fruntypes\u002Ftooling\u002Flinting","\u002Fruntypes\u002Ftooling","02.runtypes\u002F04.tooling",[261,264],{"title":262,"path":257,"stem":263},"Linting","02.runtypes\u002F04.tooling\u002F01.linting",{"title":265,"path":266,"stem":267},"Source Conversion","\u002Fruntypes\u002Ftooling\u002Fsource-conversion","02.runtypes\u002F04.tooling\u002F02.source-conversion",{"title":269,"icon":270,"redirect":271,"path":272,"stem":273,"children":274,"page":24},"AI Integration","i-lucide-sparkles","\u002Fruntypes\u002Fai-integration\u002Fworkflow-and-commands","\u002Fruntypes\u002Fai-integration","02.runtypes\u002F05.ai-integration",[275,278,282,286],{"title":276,"path":271,"stem":277},"AI Workflow","02.runtypes\u002F05.ai-integration\u002F01.workflow-and-commands",{"title":279,"path":280,"stem":281},"FriendlyText","\u002Fruntypes\u002Fai-integration\u002Ffriendly-text","02.runtypes\u002F05.ai-integration\u002F02.friendly-text",{"title":283,"path":284,"stem":285},"MockData","\u002Fruntypes\u002Fai-integration\u002Fmock-data","02.runtypes\u002F05.ai-integration\u002F03.mock-data",{"title":287,"path":288,"stem":289},"Translations (i18n)","\u002Fruntypes\u002Fai-integration\u002Fi18n","02.runtypes\u002F05.ai-integration\u002F04.i18n",{"title":291,"icon":292,"redirect":293,"path":294,"stem":295,"children":296,"page":24},"Drizzle ORM","i-lineicons-drizzle","\u002Fruntypes\u002Fdrizzle-orm\u002Fdrizzle-overview","\u002Fruntypes\u002Fdrizzle-orm","02.runtypes\u002F06.drizzle-orm",[297,300,304,308,312,316,320,324,328],{"title":298,"path":293,"stem":299},"Drizzle Overview","02.runtypes\u002F06.drizzle-orm\u002F00.drizzle-overview",{"title":301,"path":302,"stem":303},"Column Formats","\u002Fruntypes\u002Fdrizzle-orm\u002Fcolumn-formats","02.runtypes\u002F06.drizzle-orm\u002F01.column-formats",{"title":305,"path":306,"stem":307},"Views","\u002Fruntypes\u002Fdrizzle-orm\u002Fviews","02.runtypes\u002F06.drizzle-orm\u002F02.views",{"title":309,"path":310,"stem":311},"Indexes and Constraints","\u002Fruntypes\u002Fdrizzle-orm\u002Fconstraints","02.runtypes\u002F06.drizzle-orm\u002F03.constraints",{"title":313,"path":314,"stem":315},"Row Level Security","\u002Fruntypes\u002Fdrizzle-orm\u002Frow-level-security","02.runtypes\u002F06.drizzle-orm\u002F04.row-level-security",{"title":317,"path":318,"stem":319},"Relations","\u002Fruntypes\u002Fdrizzle-orm\u002Frelations","02.runtypes\u002F06.drizzle-orm\u002F05.relations",{"title":321,"path":322,"stem":323},"The Schema File","\u002Fruntypes\u002Fdrizzle-orm\u002Fschema-file","02.runtypes\u002F06.drizzle-orm\u002F06.schema-file",{"title":325,"path":326,"stem":327},"Migrate an Existing Schema","\u002Fruntypes\u002Fdrizzle-orm\u002Fmigrate-an-existing-schema","02.runtypes\u002F06.drizzle-orm\u002F07.migrate-an-existing-schema",{"title":329,"path":330,"stem":331},"Cloudflare D1 and Durable Objects","\u002Fruntypes\u002Fdrizzle-orm\u002Fcloudflare-storage","02.runtypes\u002F06.drizzle-orm\u002F08.cloudflare-storage",{"title":333,"icon":334,"redirect":335,"path":336,"stem":337,"children":338,"page":24},"Diagnostics","i-lucide-triangle-alert","\u002Fruntypes\u002Fdiagnostics\u002Ferror-levels","\u002Fruntypes\u002Fdiagnostics","02.runtypes\u002F08.diagnostics",[339,342],{"title":340,"path":335,"stem":341},"Error Levels","02.runtypes\u002F08.diagnostics\u002F01.error-levels",{"title":343,"path":344,"stem":345},"All Diagnostics","\u002Fruntypes\u002Fdiagnostics\u002Fall-diagnostics","02.runtypes\u002F08.diagnostics\u002F02.all-diagnostics",{"title":347,"icon":348,"path":349,"stem":350,"children":351,"page":24},"Benchmarks","i-lucide-gauge","\u002Fbenchmarks","03.benchmarks",[352,372],{"title":5,"icon":6,"redirect":353,"path":354,"stem":355,"children":356,"page":24},"\u002Fbenchmarks\u002Frpc\u002Fhello-world","\u002Fbenchmarks\u002Frpc","03.benchmarks\u002F02.rpc",[357,360,364,368],{"title":358,"path":353,"stem":359},"Hello World","03.benchmarks\u002F02.rpc\u002F01.hello-world",{"title":361,"path":362,"stem":363},"Light Validation","\u002Fbenchmarks\u002Frpc\u002Flight-validation","03.benchmarks\u002F02.rpc\u002F02.light-validation",{"title":365,"path":366,"stem":367},"Heavy Validation","\u002Fbenchmarks\u002Frpc\u002Fheavy-validation","03.benchmarks\u002F02.rpc\u002F03.heavy-validation",{"title":369,"path":370,"stem":371},"Payload Sizes","\u002Fbenchmarks\u002Frpc\u002Fpayload-sizes","03.benchmarks\u002F02.rpc\u002F04.payload-sizes",{"title":163,"icon":164,"redirect":373,"path":374,"stem":375,"children":376,"page":24},"\u002Fbenchmarks\u002Fruntypes\u002Fis-valid","\u002Fbenchmarks\u002Fruntypes","03.benchmarks\u002F03.runtypes",[377,380,384,388,392,395],{"title":378,"path":373,"stem":379},"Is Valid","03.benchmarks\u002F03.runtypes\u002F01.is-valid",{"title":381,"path":382,"stem":383},"Is Valid Formats","\u002Fbenchmarks\u002Fruntypes\u002Fis-valid-formats","03.benchmarks\u002F03.runtypes\u002F02.is-valid-formats",{"title":385,"path":386,"stem":387},"Get Errors","\u002Fbenchmarks\u002Fruntypes\u002Fget-errors","03.benchmarks\u002F03.runtypes\u002F03.get-errors",{"title":389,"path":390,"stem":391},"Get Errors Formats","\u002Fbenchmarks\u002Fruntypes\u002Fget-errors-formats","03.benchmarks\u002F03.runtypes\u002F04.get-errors-formats",{"title":56,"path":393,"stem":394},"\u002Fbenchmarks\u002Fruntypes\u002Fjson-round-trip","03.benchmarks\u002F03.runtypes\u002F05.json-round-trip",{"title":396,"path":397,"stem":398},"Type Checking","\u002Fbenchmarks\u002Fruntypes\u002Ftype-checking","03.benchmarks\u002F03.runtypes\u002F07.type-checking",{"id":400,"title":232,"body":401,"description":2241,"extension":2242,"links":2243,"meta":2244,"navigation":669,"path":227,"seo":2245,"stem":233,"__hash__":2246},"docs\u002F02.runtypes\u002F03.type-formats\u002F01.overview.md",{"type":402,"value":403},"minimark",[404,409,431,555,566,570,581,1252,1256,1283,1818,1917,1934,1938,1967,2228,2237],[405,406,408],"h2",{"id":407},"atomic-and-collection-type-formats","Atomic and Collection Type Formats",[410,411,412,413,417,418,422,423,426,427,430],"p",{},"A type format adds a rule to a type. An ",[414,415,416],"strong",{},"atomic"," format checks one value and replaces its type: ",[419,420,421],"code",{},"TF.Email"," instead of ",[419,424,425],{},"string",". A ",[414,428,429],{},"collection"," format wraps an array, object, Set or Map you already wrote and checks the whole, like its size or repeated entries.",[432,433,434,450],"table",{},[435,436,437],"thead",{},[438,439,440,444,447],"tr",{},[441,442,443],"th",{},"Family",[441,445,446],{},"Kind",[441,448,449],{},"Examples",[451,452,453,481,501,518,538],"tbody",{},[438,454,455,462,464],{},[456,457,458],"td",{},[459,460,461],"a",{"href":236},"String",[456,463,416],{},[456,465,466,468,469,468,472,468,475,468,478],{},[419,467,421],{},", ",[419,470,471],{},"TF.UUIDv4",[419,473,474],{},"TF.StringUrl",[419,476,477],{},"TF.Url",[419,479,480],{},"TF.CreditCard",[438,482,483,488,490],{},[456,484,485],{},[459,486,487],{"href":240},"Number",[456,489,416],{},[456,491,492,468,495,468,498],{},[419,493,494],{},"TF.Int32",[419,496,497],{},"TF.Positive",[419,499,500],{},"TF.Currency",[438,502,503,508,510],{},[456,504,505],{},[459,506,507],{"href":244},"BigInt",[456,509,416],{},[456,511,512,468,515],{},[419,513,514],{},"TF.BigInt64",[419,516,517],{},"TF.BigPositive",[438,519,520,525,527],{},[456,521,522],{},[459,523,524],{"href":248},"Date and time",[456,526,416],{},[456,528,529,468,532,468,535],{},[419,530,531],{},"TF.StringDate",[419,533,534],{},"TF.Date",[419,536,537],{},"TFT.PlainDate",[438,539,540,545,547],{},[456,541,542],{},[459,543,544],{"href":252},"Collections",[456,546,429],{},[456,548,549,468,552],{},[419,550,551],{},"TF.FormattedArray\u003Cstring[], {maxItems: 5}>",[419,553,554],{},"TF.FormattedMap",[556,557,558,559,561,562,565],"tip",{},"An atomic format type is capitalized (",[419,560,421],{},"), and its builder is a call (",[419,563,564],{},"TF.email()","). A collection format has no named presets: its rules are options on the collection.",[405,567,569],{"id":568},"declaring-a-type-format","Declaring a Type Format",[410,571,572,573,576,577,580],{},"Use a format type from the ",[419,574,575],{},"TF"," namespace, or the matching ",[419,578,579],{},"TF.*"," builder. Both compile to the same validator, and you can mix them in one file.",[582,583,586,995],"div",{"className":584},[585],"rt-define-cols",[587,588,589],"code-group",{},[590,591,597],"pre",{"className":592,"code":593,"filename":594,"language":595,"meta":596,"style":596},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import type * as TF from '@mionjs\u002Frun-types\u002Fformats';\nimport {createValidateFn} from '@mionjs\u002Frun-types';\n\ntype Account = {\n  id: TF.UUIDv4;\n  email: TF.Email;\n  age: TF.Int32;\n  credits: TF.Positive;\n};\n\nconst isAccount = createValidateFn\u003CAccount>();\n\nisAccount({\n  id: '109156be-c4fb-41ea-b1b4-efe1671c5836',\n  email: 'ada@example.com',\n  age: 36,\n  credits: 100,\n}); \u002F\u002F true\n\nisAccount({id: 'not-a-uuid', email: 'nope', age: 1.5, credits: -5}); \u002F\u002F false\n\nexport {isAccount};\nexport type {Account};\n","Type Definition","ts","",[419,598,599,638,664,671,688,709,726,743,760,766,771,801,806,818,835,851,864,876,891,896,965,970,982],{"__ignoreMap":596},[600,601,604,608,611,615,618,622,625,628,632,635],"span",{"class":602,"line":603},"line",1,[600,605,607],{"class":606},"s7zQu","import",[600,609,610],{"class":606}," type",[600,612,614],{"class":613},"sMK4o"," *",[600,616,617],{"class":606}," as",[600,619,621],{"class":620},"sTEyZ"," TF ",[600,623,624],{"class":606},"from",[600,626,627],{"class":613}," '",[600,629,631],{"class":630},"sfazB","@mionjs\u002Frun-types\u002Fformats",[600,633,634],{"class":613},"'",[600,636,637],{"class":613},";\n",[600,639,641,643,646,649,652,655,657,660,662],{"class":602,"line":640},2,[600,642,607],{"class":606},[600,644,645],{"class":613}," {",[600,647,648],{"class":620},"createValidateFn",[600,650,651],{"class":613},"}",[600,653,654],{"class":606}," from",[600,656,627],{"class":613},[600,658,659],{"class":630},"@mionjs\u002Frun-types",[600,661,634],{"class":613},[600,663,637],{"class":613},[600,665,667],{"class":602,"line":666},3,[600,668,670],{"emptyLinePlaceholder":669},true,"\n",[600,672,674,678,682,685],{"class":602,"line":673},4,[600,675,677],{"class":676},"spNyl","type",[600,679,681],{"class":680},"sBMFI"," Account",[600,683,684],{"class":613}," =",[600,686,687],{"class":613}," {\n",[600,689,691,695,698,701,704,707],{"class":602,"line":690},5,[600,692,694],{"class":693},"swJcz","  id",[600,696,697],{"class":613},":",[600,699,700],{"class":680}," TF",[600,702,703],{"class":613},".",[600,705,706],{"class":680},"UUIDv4",[600,708,637],{"class":613},[600,710,712,715,717,719,721,724],{"class":602,"line":711},6,[600,713,714],{"class":693},"  email",[600,716,697],{"class":613},[600,718,700],{"class":680},[600,720,703],{"class":613},[600,722,723],{"class":680},"Email",[600,725,637],{"class":613},[600,727,729,732,734,736,738,741],{"class":602,"line":728},7,[600,730,731],{"class":693},"  age",[600,733,697],{"class":613},[600,735,700],{"class":680},[600,737,703],{"class":613},[600,739,740],{"class":680},"Int32",[600,742,637],{"class":613},[600,744,746,749,751,753,755,758],{"class":602,"line":745},8,[600,747,748],{"class":693},"  credits",[600,750,697],{"class":613},[600,752,700],{"class":680},[600,754,703],{"class":613},[600,756,757],{"class":680},"Positive",[600,759,637],{"class":613},[600,761,763],{"class":602,"line":762},9,[600,764,765],{"class":613},"};\n",[600,767,769],{"class":602,"line":768},10,[600,770,670],{"emptyLinePlaceholder":669},[600,772,774,777,780,783,787,790,793,796,799],{"class":602,"line":773},11,[600,775,776],{"class":676},"const",[600,778,779],{"class":620}," isAccount ",[600,781,782],{"class":613},"=",[600,784,786],{"class":785},"s2Zo4"," createValidateFn",[600,788,789],{"class":613},"\u003C",[600,791,792],{"class":680},"Account",[600,794,795],{"class":613},">",[600,797,798],{"class":620},"()",[600,800,637],{"class":613},[600,802,804],{"class":602,"line":803},12,[600,805,670],{"emptyLinePlaceholder":669},[600,807,809,812,815],{"class":602,"line":808},13,[600,810,811],{"class":785},"isAccount",[600,813,814],{"class":620},"(",[600,816,817],{"class":613},"{\n",[600,819,821,823,825,827,830,832],{"class":602,"line":820},14,[600,822,694],{"class":693},[600,824,697],{"class":613},[600,826,627],{"class":613},[600,828,829],{"class":630},"109156be-c4fb-41ea-b1b4-efe1671c5836",[600,831,634],{"class":613},[600,833,834],{"class":613},",\n",[600,836,838,840,842,844,847,849],{"class":602,"line":837},15,[600,839,714],{"class":693},[600,841,697],{"class":613},[600,843,627],{"class":613},[600,845,846],{"class":630},"ada@example.com",[600,848,634],{"class":613},[600,850,834],{"class":613},[600,852,854,856,858,862],{"class":602,"line":853},16,[600,855,731],{"class":693},[600,857,697],{"class":613},[600,859,861],{"class":860},"sbssI"," 36",[600,863,834],{"class":613},[600,865,867,869,871,874],{"class":602,"line":866},17,[600,868,748],{"class":693},[600,870,697],{"class":613},[600,872,873],{"class":860}," 100",[600,875,834],{"class":613},[600,877,879,881,884,887],{"class":602,"line":878},18,[600,880,651],{"class":613},[600,882,883],{"class":620},")",[600,885,886],{"class":613},";",[600,888,890],{"class":889},"sHwdD"," \u002F\u002F true\n",[600,892,894],{"class":602,"line":893},19,[600,895,670],{"emptyLinePlaceholder":669},[600,897,899,901,903,906,909,911,913,916,918,921,924,926,928,931,933,935,938,940,943,945,948,950,953,956,958,960,962],{"class":602,"line":898},20,[600,900,811],{"class":785},[600,902,814],{"class":620},[600,904,905],{"class":613},"{",[600,907,908],{"class":693},"id",[600,910,697],{"class":613},[600,912,627],{"class":613},[600,914,915],{"class":630},"not-a-uuid",[600,917,634],{"class":613},[600,919,920],{"class":613},",",[600,922,923],{"class":693}," email",[600,925,697],{"class":613},[600,927,627],{"class":613},[600,929,930],{"class":630},"nope",[600,932,634],{"class":613},[600,934,920],{"class":613},[600,936,937],{"class":693}," age",[600,939,697],{"class":613},[600,941,942],{"class":860}," 1.5",[600,944,920],{"class":613},[600,946,947],{"class":693}," credits",[600,949,697],{"class":613},[600,951,952],{"class":613}," -",[600,954,955],{"class":860},"5",[600,957,651],{"class":613},[600,959,883],{"class":620},[600,961,886],{"class":613},[600,963,964],{"class":889}," \u002F\u002F false\n",[600,966,968],{"class":602,"line":967},21,[600,969,670],{"emptyLinePlaceholder":669},[600,971,973,976,978,980],{"class":602,"line":972},22,[600,974,975],{"class":606},"export",[600,977,645],{"class":613},[600,979,811],{"class":620},[600,981,765],{"class":613},[600,983,985,987,989,991,993],{"class":602,"line":984},23,[600,986,975],{"class":606},[600,988,610],{"class":606},[600,990,645],{"class":613},[600,992,792],{"class":620},[600,994,765],{"class":613},[587,996,997],{},[590,998,1001],{"className":592,"code":999,"filename":1000,"language":595,"meta":596,"style":596},"import * as TF from '@mionjs\u002Frun-types\u002Fformats';\nimport {createValidateFn, type InferType} from '@mionjs\u002Frun-types';\nimport * as RT from '@mionjs\u002Frun-types\u002Fbuilders';\n\nconst account = RT.object({\n  id: TF.uuidv4(),\n  email: TF.email(),\n  age: TF.int32(),\n  credits: TF.positive(),\n});\n\n\u002F\u002F InferType\u003Ctypeof runType> hands the TypeScript type back.\ntype Account = InferType\u003Ctypeof account>;\n\nconst isAccount = createValidateFn(account);\n\nexport {account, isAccount};\nexport type {Account};\n","Type Builder",[419,1002,1003,1023,1050,1072,1076,1097,1114,1131,1148,1165,1173,1177,1182,1201,1205,1220,1224,1240],{"__ignoreMap":596},[600,1004,1005,1007,1009,1011,1013,1015,1017,1019,1021],{"class":602,"line":603},[600,1006,607],{"class":606},[600,1008,614],{"class":613},[600,1010,617],{"class":606},[600,1012,621],{"class":620},[600,1014,624],{"class":606},[600,1016,627],{"class":613},[600,1018,631],{"class":630},[600,1020,634],{"class":613},[600,1022,637],{"class":613},[600,1024,1025,1027,1029,1031,1033,1035,1038,1040,1042,1044,1046,1048],{"class":602,"line":640},[600,1026,607],{"class":606},[600,1028,645],{"class":613},[600,1030,648],{"class":620},[600,1032,920],{"class":613},[600,1034,610],{"class":606},[600,1036,1037],{"class":620}," InferType",[600,1039,651],{"class":613},[600,1041,654],{"class":606},[600,1043,627],{"class":613},[600,1045,659],{"class":630},[600,1047,634],{"class":613},[600,1049,637],{"class":613},[600,1051,1052,1054,1056,1058,1061,1063,1065,1068,1070],{"class":602,"line":666},[600,1053,607],{"class":606},[600,1055,614],{"class":613},[600,1057,617],{"class":606},[600,1059,1060],{"class":620}," RT ",[600,1062,624],{"class":606},[600,1064,627],{"class":613},[600,1066,1067],{"class":630},"@mionjs\u002Frun-types\u002Fbuilders",[600,1069,634],{"class":613},[600,1071,637],{"class":613},[600,1073,1074],{"class":602,"line":673},[600,1075,670],{"emptyLinePlaceholder":669},[600,1077,1078,1080,1083,1085,1088,1090,1093,1095],{"class":602,"line":690},[600,1079,776],{"class":676},[600,1081,1082],{"class":620}," account ",[600,1084,782],{"class":613},[600,1086,1087],{"class":620}," RT",[600,1089,703],{"class":613},[600,1091,1092],{"class":785},"object",[600,1094,814],{"class":620},[600,1096,817],{"class":613},[600,1098,1099,1101,1103,1105,1107,1110,1112],{"class":602,"line":711},[600,1100,694],{"class":693},[600,1102,697],{"class":613},[600,1104,700],{"class":620},[600,1106,703],{"class":613},[600,1108,1109],{"class":785},"uuidv4",[600,1111,798],{"class":620},[600,1113,834],{"class":613},[600,1115,1116,1118,1120,1122,1124,1127,1129],{"class":602,"line":728},[600,1117,714],{"class":693},[600,1119,697],{"class":613},[600,1121,700],{"class":620},[600,1123,703],{"class":613},[600,1125,1126],{"class":785},"email",[600,1128,798],{"class":620},[600,1130,834],{"class":613},[600,1132,1133,1135,1137,1139,1141,1144,1146],{"class":602,"line":745},[600,1134,731],{"class":693},[600,1136,697],{"class":613},[600,1138,700],{"class":620},[600,1140,703],{"class":613},[600,1142,1143],{"class":785},"int32",[600,1145,798],{"class":620},[600,1147,834],{"class":613},[600,1149,1150,1152,1154,1156,1158,1161,1163],{"class":602,"line":762},[600,1151,748],{"class":693},[600,1153,697],{"class":613},[600,1155,700],{"class":620},[600,1157,703],{"class":613},[600,1159,1160],{"class":785},"positive",[600,1162,798],{"class":620},[600,1164,834],{"class":613},[600,1166,1167,1169,1171],{"class":602,"line":768},[600,1168,651],{"class":613},[600,1170,883],{"class":620},[600,1172,637],{"class":613},[600,1174,1175],{"class":602,"line":773},[600,1176,670],{"emptyLinePlaceholder":669},[600,1178,1179],{"class":602,"line":803},[600,1180,1181],{"class":889},"\u002F\u002F InferType\u003Ctypeof runType> hands the TypeScript type back.\n",[600,1183,1184,1186,1188,1190,1192,1195,1198],{"class":602,"line":808},[600,1185,677],{"class":676},[600,1187,681],{"class":680},[600,1189,684],{"class":613},[600,1191,1037],{"class":680},[600,1193,1194],{"class":613},"\u003Ctypeof",[600,1196,1197],{"class":620}," account",[600,1199,1200],{"class":613},">;\n",[600,1202,1203],{"class":602,"line":820},[600,1204,670],{"emptyLinePlaceholder":669},[600,1206,1207,1209,1211,1213,1215,1218],{"class":602,"line":837},[600,1208,776],{"class":676},[600,1210,779],{"class":620},[600,1212,782],{"class":613},[600,1214,786],{"class":785},[600,1216,1217],{"class":620},"(account)",[600,1219,637],{"class":613},[600,1221,1222],{"class":602,"line":853},[600,1223,670],{"emptyLinePlaceholder":669},[600,1225,1226,1228,1230,1233,1235,1238],{"class":602,"line":866},[600,1227,975],{"class":606},[600,1229,645],{"class":613},[600,1231,1232],{"class":620},"account",[600,1234,920],{"class":613},[600,1236,1237],{"class":620}," isAccount",[600,1239,765],{"class":613},[600,1241,1242,1244,1246,1248,1250],{"class":602,"line":878},[600,1243,975],{"class":606},[600,1245,610],{"class":606},[600,1247,645],{"class":613},[600,1249,792],{"class":620},[600,1251,765],{"class":613},[405,1253,1255],{"id":1254},"custom-type-formats","Custom Type Formats",[410,1257,1258,468,1261,1264,1265,1268,1269,1272,1273,1276,1277,468,1280,1282],{},[419,1259,1260],{},"TF.String",[419,1262,1263],{},"TF.Number"," and ",[419,1266,1267],{},"TF.BigInt"," take your own params when no named format fits. ",[419,1270,1271],{},"multipleOfTolerance"," widens the rounding a decimal ",[419,1274,1275],{},"multipleOf"," allows. With ",[419,1278,1279],{},"integer: true",[419,1281,1275],{}," must be a whole number.",[590,1284,1286],{"className":592,"code":1285,"language":595,"meta":596,"style":596},"import type * as TF from '@mionjs\u002Frun-types\u002Fformats';\nimport {createValidateFn} from '@mionjs\u002Frun-types';\n\ntype Username = TF.String\u003C{\n  minLength: 3;\n  maxLength: 20;\n  pattern: {source: '^[a-z0-9_]+$'; mockSamples: ['ada_99', 'grace']};\n}>;\ntype Percentage = TF.Number\u003C{min: 0; max: 100}>;\ntype BigPositive = TF.BigInt\u003C{min: 0n}>;\ntype Price = TF.Number\u003C{min: 0; multipleOf: 0.01}>;\n\ntype Profile = {\n  handle: Username;\n  completion: Percentage;\n  followers: BigPositive;\n};\n\nconst isProfile = createValidateFn\u003CProfile>();\n\nisProfile({handle: 'ada_99', completion: 80, followers: 1200n}); \u002F\u002F true\nisProfile({handle: 'no', completion: 150, followers: -1n}); \u002F\u002F false\n\nconst isPrice = createValidateFn\u003CPrice>();\n\nisPrice(19.99); \u002F\u002F true, a decimal multipleOf allows tiny float rounding errors\nisPrice(19.995); \u002F\u002F false\n\nexport {isProfile, isPrice};\nexport type {Profile, Price};\n",[419,1287,1288,1310,1330,1334,1352,1364,1376,1428,1433,1470,1498,1533,1537,1548,1559,1570,1581,1585,1589,1611,1615,1665,1714,1718,1741,1746,1764,1780,1785,1801],{"__ignoreMap":596},[600,1289,1290,1292,1294,1296,1298,1300,1302,1304,1306,1308],{"class":602,"line":603},[600,1291,607],{"class":606},[600,1293,610],{"class":606},[600,1295,614],{"class":613},[600,1297,617],{"class":606},[600,1299,621],{"class":620},[600,1301,624],{"class":606},[600,1303,627],{"class":613},[600,1305,631],{"class":630},[600,1307,634],{"class":613},[600,1309,637],{"class":613},[600,1311,1312,1314,1316,1318,1320,1322,1324,1326,1328],{"class":602,"line":640},[600,1313,607],{"class":606},[600,1315,645],{"class":613},[600,1317,648],{"class":620},[600,1319,651],{"class":613},[600,1321,654],{"class":606},[600,1323,627],{"class":613},[600,1325,659],{"class":630},[600,1327,634],{"class":613},[600,1329,637],{"class":613},[600,1331,1332],{"class":602,"line":666},[600,1333,670],{"emptyLinePlaceholder":669},[600,1335,1336,1338,1341,1343,1345,1347,1349],{"class":602,"line":673},[600,1337,677],{"class":676},[600,1339,1340],{"class":680}," Username",[600,1342,684],{"class":613},[600,1344,700],{"class":680},[600,1346,703],{"class":613},[600,1348,461],{"class":680},[600,1350,1351],{"class":613},"\u003C{\n",[600,1353,1354,1357,1359,1362],{"class":602,"line":690},[600,1355,1356],{"class":693},"  minLength",[600,1358,697],{"class":613},[600,1360,1361],{"class":860}," 3",[600,1363,637],{"class":613},[600,1365,1366,1369,1371,1374],{"class":602,"line":711},[600,1367,1368],{"class":693},"  maxLength",[600,1370,697],{"class":613},[600,1372,1373],{"class":860}," 20",[600,1375,637],{"class":613},[600,1377,1378,1381,1383,1385,1388,1390,1392,1395,1397,1399,1402,1404,1407,1409,1412,1414,1416,1418,1421,1423,1426],{"class":602,"line":728},[600,1379,1380],{"class":693},"  pattern",[600,1382,697],{"class":613},[600,1384,645],{"class":613},[600,1386,1387],{"class":693},"source",[600,1389,697],{"class":613},[600,1391,627],{"class":613},[600,1393,1394],{"class":630},"^[a-z0-9_]+$",[600,1396,634],{"class":613},[600,1398,886],{"class":613},[600,1400,1401],{"class":693}," mockSamples",[600,1403,697],{"class":613},[600,1405,1406],{"class":620}," [",[600,1408,634],{"class":613},[600,1410,1411],{"class":630},"ada_99",[600,1413,634],{"class":613},[600,1415,920],{"class":613},[600,1417,627],{"class":613},[600,1419,1420],{"class":630},"grace",[600,1422,634],{"class":613},[600,1424,1425],{"class":620},"]",[600,1427,765],{"class":613},[600,1429,1430],{"class":602,"line":745},[600,1431,1432],{"class":613},"}>;\n",[600,1434,1435,1437,1440,1442,1444,1446,1448,1451,1454,1456,1459,1461,1464,1466,1468],{"class":602,"line":762},[600,1436,677],{"class":676},[600,1438,1439],{"class":680}," Percentage",[600,1441,684],{"class":613},[600,1443,700],{"class":680},[600,1445,703],{"class":613},[600,1447,487],{"class":680},[600,1449,1450],{"class":613},"\u003C{",[600,1452,1453],{"class":693},"min",[600,1455,697],{"class":613},[600,1457,1458],{"class":860}," 0",[600,1460,886],{"class":613},[600,1462,1463],{"class":693}," max",[600,1465,697],{"class":613},[600,1467,873],{"class":860},[600,1469,1432],{"class":613},[600,1471,1472,1474,1477,1479,1481,1483,1485,1487,1489,1491,1493,1496],{"class":602,"line":768},[600,1473,677],{"class":676},[600,1475,1476],{"class":680}," BigPositive",[600,1478,684],{"class":613},[600,1480,700],{"class":680},[600,1482,703],{"class":613},[600,1484,507],{"class":680},[600,1486,1450],{"class":613},[600,1488,1453],{"class":693},[600,1490,697],{"class":613},[600,1492,1458],{"class":860},[600,1494,1495],{"class":676},"n",[600,1497,1432],{"class":613},[600,1499,1500,1502,1505,1507,1509,1511,1513,1515,1517,1519,1521,1523,1526,1528,1531],{"class":602,"line":773},[600,1501,677],{"class":676},[600,1503,1504],{"class":680}," Price",[600,1506,684],{"class":613},[600,1508,700],{"class":680},[600,1510,703],{"class":613},[600,1512,487],{"class":680},[600,1514,1450],{"class":613},[600,1516,1453],{"class":693},[600,1518,697],{"class":613},[600,1520,1458],{"class":860},[600,1522,886],{"class":613},[600,1524,1525],{"class":693}," multipleOf",[600,1527,697],{"class":613},[600,1529,1530],{"class":860}," 0.01",[600,1532,1432],{"class":613},[600,1534,1535],{"class":602,"line":803},[600,1536,670],{"emptyLinePlaceholder":669},[600,1538,1539,1541,1544,1546],{"class":602,"line":808},[600,1540,677],{"class":676},[600,1542,1543],{"class":680}," Profile",[600,1545,684],{"class":613},[600,1547,687],{"class":613},[600,1549,1550,1553,1555,1557],{"class":602,"line":820},[600,1551,1552],{"class":693},"  handle",[600,1554,697],{"class":613},[600,1556,1340],{"class":680},[600,1558,637],{"class":613},[600,1560,1561,1564,1566,1568],{"class":602,"line":837},[600,1562,1563],{"class":693},"  completion",[600,1565,697],{"class":613},[600,1567,1439],{"class":680},[600,1569,637],{"class":613},[600,1571,1572,1575,1577,1579],{"class":602,"line":853},[600,1573,1574],{"class":693},"  followers",[600,1576,697],{"class":613},[600,1578,1476],{"class":680},[600,1580,637],{"class":613},[600,1582,1583],{"class":602,"line":866},[600,1584,765],{"class":613},[600,1586,1587],{"class":602,"line":878},[600,1588,670],{"emptyLinePlaceholder":669},[600,1590,1591,1593,1596,1598,1600,1602,1605,1607,1609],{"class":602,"line":893},[600,1592,776],{"class":676},[600,1594,1595],{"class":620}," isProfile ",[600,1597,782],{"class":613},[600,1599,786],{"class":785},[600,1601,789],{"class":613},[600,1603,1604],{"class":680},"Profile",[600,1606,795],{"class":613},[600,1608,798],{"class":620},[600,1610,637],{"class":613},[600,1612,1613],{"class":602,"line":898},[600,1614,670],{"emptyLinePlaceholder":669},[600,1616,1617,1620,1622,1624,1627,1629,1631,1633,1635,1637,1640,1642,1645,1647,1650,1652,1655,1657,1659,1661,1663],{"class":602,"line":967},[600,1618,1619],{"class":785},"isProfile",[600,1621,814],{"class":620},[600,1623,905],{"class":613},[600,1625,1626],{"class":693},"handle",[600,1628,697],{"class":613},[600,1630,627],{"class":613},[600,1632,1411],{"class":630},[600,1634,634],{"class":613},[600,1636,920],{"class":613},[600,1638,1639],{"class":693}," completion",[600,1641,697],{"class":613},[600,1643,1644],{"class":860}," 80",[600,1646,920],{"class":613},[600,1648,1649],{"class":693}," followers",[600,1651,697],{"class":613},[600,1653,1654],{"class":860}," 1200",[600,1656,1495],{"class":676},[600,1658,651],{"class":613},[600,1660,883],{"class":620},[600,1662,886],{"class":613},[600,1664,890],{"class":889},[600,1666,1667,1669,1671,1673,1675,1677,1679,1682,1684,1686,1688,1690,1693,1695,1697,1699,1701,1704,1706,1708,1710,1712],{"class":602,"line":972},[600,1668,1619],{"class":785},[600,1670,814],{"class":620},[600,1672,905],{"class":613},[600,1674,1626],{"class":693},[600,1676,697],{"class":613},[600,1678,627],{"class":613},[600,1680,1681],{"class":630},"no",[600,1683,634],{"class":613},[600,1685,920],{"class":613},[600,1687,1639],{"class":693},[600,1689,697],{"class":613},[600,1691,1692],{"class":860}," 150",[600,1694,920],{"class":613},[600,1696,1649],{"class":693},[600,1698,697],{"class":613},[600,1700,952],{"class":613},[600,1702,1703],{"class":860},"1",[600,1705,1495],{"class":676},[600,1707,651],{"class":613},[600,1709,883],{"class":620},[600,1711,886],{"class":613},[600,1713,964],{"class":889},[600,1715,1716],{"class":602,"line":984},[600,1717,670],{"emptyLinePlaceholder":669},[600,1719,1721,1723,1726,1728,1730,1732,1735,1737,1739],{"class":602,"line":1720},24,[600,1722,776],{"class":676},[600,1724,1725],{"class":620}," isPrice ",[600,1727,782],{"class":613},[600,1729,786],{"class":785},[600,1731,789],{"class":613},[600,1733,1734],{"class":680},"Price",[600,1736,795],{"class":613},[600,1738,798],{"class":620},[600,1740,637],{"class":613},[600,1742,1744],{"class":602,"line":1743},25,[600,1745,670],{"emptyLinePlaceholder":669},[600,1747,1749,1752,1754,1757,1759,1761],{"class":602,"line":1748},26,[600,1750,1751],{"class":785},"isPrice",[600,1753,814],{"class":620},[600,1755,1756],{"class":860},"19.99",[600,1758,883],{"class":620},[600,1760,886],{"class":613},[600,1762,1763],{"class":889}," \u002F\u002F true, a decimal multipleOf allows tiny float rounding errors\n",[600,1765,1767,1769,1771,1774,1776,1778],{"class":602,"line":1766},27,[600,1768,1751],{"class":785},[600,1770,814],{"class":620},[600,1772,1773],{"class":860},"19.995",[600,1775,883],{"class":620},[600,1777,886],{"class":613},[600,1779,964],{"class":889},[600,1781,1783],{"class":602,"line":1782},28,[600,1784,670],{"emptyLinePlaceholder":669},[600,1786,1788,1790,1792,1794,1796,1799],{"class":602,"line":1787},29,[600,1789,975],{"class":606},[600,1791,645],{"class":613},[600,1793,1619],{"class":620},[600,1795,920],{"class":613},[600,1797,1798],{"class":620}," isPrice",[600,1800,765],{"class":613},[600,1802,1804,1806,1808,1810,1812,1814,1816],{"class":602,"line":1803},30,[600,1805,975],{"class":606},[600,1807,610],{"class":606},[600,1809,645],{"class":613},[600,1811,1604],{"class":620},[600,1813,920],{"class":613},[600,1815,1504],{"class":620},[600,1817,765],{"class":613},[432,1819,1820,1830],{},[435,1821,1822],{},[438,1823,1824,1827],{},[441,1825,1826],{},"Format",[441,1828,1829],{},"Common params",[451,1831,1832,1859,1891],{},[438,1833,1834,1838],{},[456,1835,1836],{},[419,1837,1260],{},[456,1839,1840,468,1843,468,1846,468,1849,468,1852,468,1855,1858],{},[419,1841,1842],{},"minLength",[419,1844,1845],{},"maxLength",[419,1847,1848],{},"length",[419,1850,1851],{},"pattern",[419,1853,1854],{},"allowedChars",[419,1856,1857],{},"allowedValues",", …",[438,1860,1861,1865],{},[456,1862,1863],{},[419,1864,1263],{},[456,1866,1867,468,1869,468,1872,468,1875,468,1878,468,1881,468,1884,468,1886,468,1888],{},[419,1868,1453],{},[419,1870,1871],{},"max",[419,1873,1874],{},"gt",[419,1876,1877],{},"lt",[419,1879,1880],{},"integer",[419,1882,1883],{},"float",[419,1885,1275],{},[419,1887,1271],{},[419,1889,1890],{},"isCurrency",[438,1892,1893,1897],{},[456,1894,1895],{},[419,1896,1267],{},[456,1898,1899,468,1901,468,1903,468,1905,468,1907,1909,1910,1913,1914,883],{},[419,1900,1453],{},[419,1902,1871],{},[419,1904,1874],{},[419,1906,1877],{},[419,1908,1275],{}," (all ",[419,1911,1912],{},"bigint"," literals, e.g. ",[419,1915,1916],{},"0n",[556,1918,1919,1921,1922,1924,1925,1921,1927,1929,1930,1933],{},[419,1920,1453],{}," \u002F ",[419,1923,1871],{}," are inclusive, ",[419,1926,1874],{},[419,1928,1877],{}," exclusive. Use one or the other per edge: the build rejects a type with both, such as ",[419,1931,1932],{},"{min: 0, gt: 0}",". Date formats take the same four bounds.",[405,1935,1937],{"id":1936},"branded-types","Branded Types",[410,1939,1940,1941,1943,1944,1947,1948,1951,1952,1955,1956,1959,1960,1963,1964,703],{},"By default an atomic format is still structurally a ",[419,1942,425],{}," or ",[419,1945,1946],{},"number",", so a raw string fits where a ",[419,1949,1950],{},"UserId"," belongs. Add a ",[414,1953,1954],{},"brand name"," as the second type argument and nothing else fits without an ",[419,1957,1958],{},"as"," cast. With builders, use the ",[419,1961,1962],{},"brand()"," tag: ",[419,1965,1966],{},"TF.string({minLength: 1}, TF.brand('UserId'))",[590,1968,1970],{"className":592,"code":1969,"language":595,"meta":596,"style":596},"import type * as TF from '@mionjs\u002Frun-types\u002Fformats';\n\ntype UserId = TF.String\u003C{minLength: 1}, 'UserId'>;\ntype Cents = TF.Number\u003C{min: 0; integer: true}, 'Cents'>;\n\n\u002F\u002F a bare string would not fit\nconst id = 'usr_abc123' as UserId;\nconst price = 4999 as Cents;\n\n\u002F\u002F Now UserId and Cents don't mix with each other or with raw string\u002Fnumber.\nfunction chargeUser(_user: UserId, _amount: Cents): void {}\nchargeUser(id, price); \u002F\u002F ok\n\nexport {id, price, chargeUser};\nexport type {UserId, Cents};\n",[419,1971,1972,1994,1998,2033,2077,2081,2086,2108,2126,2130,2135,2171,2189,2193,2212],{"__ignoreMap":596},[600,1973,1974,1976,1978,1980,1982,1984,1986,1988,1990,1992],{"class":602,"line":603},[600,1975,607],{"class":606},[600,1977,610],{"class":606},[600,1979,614],{"class":613},[600,1981,617],{"class":606},[600,1983,621],{"class":620},[600,1985,624],{"class":606},[600,1987,627],{"class":613},[600,1989,631],{"class":630},[600,1991,634],{"class":613},[600,1993,637],{"class":613},[600,1995,1996],{"class":602,"line":640},[600,1997,670],{"emptyLinePlaceholder":669},[600,1999,2000,2002,2005,2007,2009,2011,2013,2015,2017,2019,2022,2025,2027,2029,2031],{"class":602,"line":666},[600,2001,677],{"class":676},[600,2003,2004],{"class":680}," UserId",[600,2006,684],{"class":613},[600,2008,700],{"class":680},[600,2010,703],{"class":613},[600,2012,461],{"class":680},[600,2014,1450],{"class":613},[600,2016,1842],{"class":693},[600,2018,697],{"class":613},[600,2020,2021],{"class":860}," 1",[600,2023,2024],{"class":613},"},",[600,2026,627],{"class":613},[600,2028,1950],{"class":630},[600,2030,634],{"class":613},[600,2032,1200],{"class":613},[600,2034,2035,2037,2040,2042,2044,2046,2048,2050,2052,2054,2056,2058,2061,2063,2066,2068,2070,2073,2075],{"class":602,"line":673},[600,2036,677],{"class":676},[600,2038,2039],{"class":680}," Cents",[600,2041,684],{"class":613},[600,2043,700],{"class":680},[600,2045,703],{"class":613},[600,2047,487],{"class":680},[600,2049,1450],{"class":613},[600,2051,1453],{"class":693},[600,2053,697],{"class":613},[600,2055,1458],{"class":860},[600,2057,886],{"class":613},[600,2059,2060],{"class":693}," integer",[600,2062,697],{"class":613},[600,2064,2065],{"class":680}," true",[600,2067,2024],{"class":613},[600,2069,627],{"class":613},[600,2071,2072],{"class":630},"Cents",[600,2074,634],{"class":613},[600,2076,1200],{"class":613},[600,2078,2079],{"class":602,"line":690},[600,2080,670],{"emptyLinePlaceholder":669},[600,2082,2083],{"class":602,"line":711},[600,2084,2085],{"class":889},"\u002F\u002F a bare string would not fit\n",[600,2087,2088,2090,2093,2095,2097,2100,2102,2104,2106],{"class":602,"line":728},[600,2089,776],{"class":676},[600,2091,2092],{"class":620}," id ",[600,2094,782],{"class":613},[600,2096,627],{"class":613},[600,2098,2099],{"class":630},"usr_abc123",[600,2101,634],{"class":613},[600,2103,617],{"class":606},[600,2105,2004],{"class":680},[600,2107,637],{"class":613},[600,2109,2110,2112,2115,2117,2120,2122,2124],{"class":602,"line":745},[600,2111,776],{"class":676},[600,2113,2114],{"class":620}," price ",[600,2116,782],{"class":613},[600,2118,2119],{"class":860}," 4999",[600,2121,617],{"class":606},[600,2123,2039],{"class":680},[600,2125,637],{"class":613},[600,2127,2128],{"class":602,"line":762},[600,2129,670],{"emptyLinePlaceholder":669},[600,2131,2132],{"class":602,"line":768},[600,2133,2134],{"class":889},"\u002F\u002F Now UserId and Cents don't mix with each other or with raw string\u002Fnumber.\n",[600,2136,2137,2140,2143,2145,2149,2151,2153,2155,2158,2160,2162,2165,2168],{"class":602,"line":773},[600,2138,2139],{"class":676},"function",[600,2141,2142],{"class":785}," chargeUser",[600,2144,814],{"class":613},[600,2146,2148],{"class":2147},"sHdIc","_user",[600,2150,697],{"class":613},[600,2152,2004],{"class":680},[600,2154,920],{"class":613},[600,2156,2157],{"class":2147}," _amount",[600,2159,697],{"class":613},[600,2161,2039],{"class":680},[600,2163,2164],{"class":613},"):",[600,2166,2167],{"class":680}," void",[600,2169,2170],{"class":613}," {}\n",[600,2172,2173,2176,2179,2181,2184,2186],{"class":602,"line":803},[600,2174,2175],{"class":785},"chargeUser",[600,2177,2178],{"class":620},"(id",[600,2180,920],{"class":613},[600,2182,2183],{"class":620}," price)",[600,2185,886],{"class":613},[600,2187,2188],{"class":889}," \u002F\u002F ok\n",[600,2190,2191],{"class":602,"line":808},[600,2192,670],{"emptyLinePlaceholder":669},[600,2194,2195,2197,2199,2201,2203,2206,2208,2210],{"class":602,"line":820},[600,2196,975],{"class":606},[600,2198,645],{"class":613},[600,2200,908],{"class":620},[600,2202,920],{"class":613},[600,2204,2205],{"class":620}," price",[600,2207,920],{"class":613},[600,2209,2142],{"class":620},[600,2211,765],{"class":613},[600,2213,2214,2216,2218,2220,2222,2224,2226],{"class":602,"line":837},[600,2215,975],{"class":606},[600,2217,610],{"class":606},[600,2219,645],{"class":613},[600,2221,1950],{"class":620},[600,2223,920],{"class":613},[600,2225,2039],{"class":620},[600,2227,765],{"class":613},[556,2229,2230,2231,2233,2234,2236],{},"Put the ",[419,2232,1958],{}," cast where a raw value becomes a ",[419,2235,1950],{},", usually right after you validate it. Everywhere else, TypeScript keeps your ids, cents and timestamps apart.",[2238,2239,2240],"style",{},"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}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}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 .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 .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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 .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 .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}","Add rules like email, int32 or a maximum item count to your types.","md",null,{"toc":24},{"title":232,"description":2241},"N8f51Dx_dR09fMr-KvLXU0j5cSQeEwj6z9Pyl-aLjkE",1793324364395]