[{"data":1,"prerenderedAt":2753},["ShallowReactive",2],{"navigation_docs":3,"-guide-compiler-markers":132,"-guide-compiler-markers-surround":2748},[4,27,69,91,127],{"title":5,"icon":6,"redirect":7,"path":8,"stem":9,"children":10,"page":26},"Introduction","i-lucide-rocket","\u002Fintroduction\u002Fabout-ts-runtypes","\u002Fintroduction","1.introduction",[11,14,18,22],{"title":12,"path":7,"stem":13},"About RunTypes","1.introduction\u002F1.about-ts-runtypes",{"title":15,"path":16,"stem":17},"Built on typescript-go","\u002Fintroduction\u002Fbuilt-on-typescript-go","1.introduction\u002F2.built-on-typescript-go",{"title":19,"path":20,"stem":21},"Quick Start","\u002Fintroduction\u002Fquick-start","1.introduction\u002F3.quick-start",{"title":23,"path":24,"stem":25},"Configuration","\u002Fintroduction\u002Fconfiguration","1.introduction\u002F4.configuration",false,{"title":28,"icon":29,"redirect":30,"path":31,"stem":32,"children":33,"page":26},"Guide","i-lucide-book-open","\u002Fguide\u002Ftypes-vs-schemas","\u002Fguide","2.guide",[34,37,41,45,49,53,57,61,65],{"title":35,"path":30,"stem":36},"Types vs Schemas","2.guide\u002F1.types-vs-schemas",{"title":38,"path":39,"stem":40},"Type Formats","\u002Fguide\u002Ftype-formats","2.guide\u002F2.type-formats",{"title":42,"path":43,"stem":44},"Reflection","\u002Fguide\u002Freflection","2.guide\u002F3.reflection",{"title":46,"path":47,"stem":48},"Serialization","\u002Fguide\u002Fserialization","2.guide\u002F4.serialization",{"title":50,"path":51,"stem":52},"Validation","\u002Fguide\u002Fvalidation","2.guide\u002F5.validation",{"title":54,"path":55,"stem":56},"Data Mocking","\u002Fguide\u002Fmocking","2.guide\u002F6.mocking",{"title":58,"path":59,"stem":60},"Compiler Markers","\u002Fguide\u002Fcompiler-markers","2.guide\u002F7.compiler-markers",{"title":62,"path":63,"stem":64},"Pure Functions","\u002Fguide\u002Fpure-functions","2.guide\u002F8.pure-functions",{"title":66,"path":67,"stem":68},"Linting","\u002Fguide\u002Flinting","2.guide\u002F9.linting",{"title":70,"icon":71,"redirect":72,"path":73,"stem":74,"children":75,"page":26},"AI Integration","i-lucide-sparkles","\u002Fai-integration\u002Fworkflow-and-commands","\u002Fai-integration","3.ai-integration",[76,79,83,87],{"title":77,"path":72,"stem":78},"AI Workflow","3.ai-integration\u002F1.workflow-and-commands",{"title":80,"path":81,"stem":82},"FriendlyText","\u002Fai-integration\u002Ffriendly-type","3.ai-integration\u002F2.friendly-type",{"title":84,"path":85,"stem":86},"MockData","\u002Fai-integration\u002Fmock-data","3.ai-integration\u002F3.mock-data",{"title":88,"path":89,"stem":90},"Translations (i18n)","\u002Fai-integration\u002Fi18n","3.ai-integration\u002F4.i18n",{"title":92,"icon":93,"redirect":94,"path":95,"stem":96,"children":97,"page":26},"Benchmarks","i-lucide-gauge","\u002Fbenchmarks\u002Fvalidation","\u002Fbenchmarks","7.benchmarks",[98,100,104,108,112,115,119,123],{"title":50,"path":94,"stem":99},"7.benchmarks\u002F1.validation",{"title":101,"path":102,"stem":103},"Validation Formats","\u002Fbenchmarks\u002Fvalidation-formats","7.benchmarks\u002F2.validation-formats",{"title":105,"path":106,"stem":107},"Validation Errors","\u002Fbenchmarks\u002Fgetvalidationerrors","7.benchmarks\u002F3.getvalidationerrors",{"title":109,"path":110,"stem":111},"Validation Error Formats","\u002Fbenchmarks\u002Fgetvalidationerrors-formats","7.benchmarks\u002F4.getvalidationerrors-formats",{"title":46,"path":113,"stem":114},"\u002Fbenchmarks\u002Fserialization","7.benchmarks\u002F5.serialization",{"title":116,"path":117,"stem":118},"Serialization Formats","\u002Fbenchmarks\u002Fserialization-formats","7.benchmarks\u002F6.serialization-formats",{"title":120,"path":121,"stem":122},"Compile Time","\u002Fbenchmarks\u002Fcompiletime","7.benchmarks\u002F7.compiletime",{"title":124,"path":125,"stem":126},"Correctness","\u002Fbenchmarks\u002Fcorrectness","7.benchmarks\u002F8.correctness",{"title":128,"path":129,"stem":130,"icon":131},"Diagnostics","\u002Fdiagnostics","8.diagnostics","i-lucide-triangle-alert",{"id":133,"title":58,"body":134,"description":2742,"extension":2743,"links":2744,"meta":2745,"navigation":473,"path":59,"seo":2746,"stem":60,"__hash__":2747},"docs\u002F2.guide\u002F7.compiler-markers.md",{"type":135,"value":136},"minimark",[137,146,151,157,407,409,413,427,727,738,759,865,869,879,1140,1153,1163,1167,1170,1455,1465,1469,1473,1480,1881,1895,1899,1906,2379,2403,2407,2417,2728,2738],[138,139,140,141,145],"p",{},"A marker is a special type you place in your code, almost always as a trailing parameter, that the compiler reads at build time and acts on. You write the type, the build fills in the rest, then the marker is erased. Every ",[142,143,144],"code",{},"createX"," factory works because of one, and the same markers are open for you to use in your own helpers.",[147,148,150],"h2",{"id":149},"what-each-marker-does","What each marker does",[138,152,153,154,156],{},"Each marker triggers a different build-time behaviour: You almost certainly will not type most of these (the ",[142,155,144],{}," factories use them for you), but here is the whole cast, so nothing is a mystery.",[158,159,163,213,242,275,305,338,366,399],"card-group",{"className":160},[161,162],"sm:grid-cols-2","rt-markers",[164,165,167,207],"card",{"title":166},"Factory injection",[168,169,174],"pre",{"className":170,"code":171,"language":172,"meta":173,"style":173},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","id?: InjectTypeFnArgs\u003CT, Fn>\n","ts","",[142,175,176],{"__ignoreMap":173},[177,178,181,185,189,192,195,198,201,204],"span",{"class":179,"line":180},"line",1,[177,182,184],{"class":183},"sTEyZ","id",[177,186,188],{"class":187},"sMK4o","?:",[177,190,191],{"class":183}," InjectTypeFnArgs",[177,193,194],{"class":187},"\u003C",[177,196,197],{"class":183},"T",[177,199,200],{"class":187},",",[177,202,203],{"class":183}," Fn",[177,205,206],{"class":187},">\n",[138,208,209,210,212],{},"Validates the call site's compile-time arguments, then injects the one generated function you asked for. Every ",[142,211,144],{}," already declares it; you never write it.",[164,214,216,236],{"title":215},"Reflection id",[168,217,219],{"className":170,"code":218,"language":172,"meta":173,"style":173},"id?: InjectRunTypeId\u003CT>\n",[142,220,221],{"__ignoreMap":173},[177,222,223,225,227,230,232,234],{"class":179,"line":180},[177,224,184],{"class":183},[177,226,188],{"class":187},[177,228,229],{"class":183}," InjectRunTypeId",[177,231,194],{"class":187},[177,233,197],{"class":183},[177,235,206],{"class":187},[138,237,238,239,241],{},"Injects a short, stable id for ",[142,240,197],{}," at each call site. The one marker you are likely to type, for wrapping your own helpers.",[164,243,245,268],{"title":244},"Compile-time literals",[168,246,248],{"className":170,"code":247,"language":172,"meta":173,"style":173},"options: CompTimeArgs\u003CT>\n",[142,249,250],{"__ignoreMap":173},[177,251,252,256,259,262,264,266],{"class":179,"line":180},[177,253,255],{"class":254},"sBMFI","options",[177,257,258],{"class":187},":",[177,260,261],{"class":183}," CompTimeArgs",[177,263,194],{"class":187},[177,265,197],{"class":183},[177,267,206],{"class":187},[138,269,270,271,274],{},"Brands a parameter as \"must be a literal at the call site\" (or a ",[142,272,273],{},"const"," of literals). It is how options bags get read at build time. Static check only.",[164,276,278,298],{"title":277},"Variant selection",[168,279,281],{"className":170,"code":280,"language":172,"meta":173,"style":173},"options: CompTimeFnArgs\u003CT>\n",[142,282,283],{"__ignoreMap":173},[177,284,285,287,289,292,294,296],{"class":179,"line":180},[177,286,255],{"class":254},[177,288,258],{"class":187},[177,290,291],{"class":183}," CompTimeFnArgs",[177,293,194],{"class":187},[177,295,197],{"class":183},[177,297,206],{"class":187},[138,299,300,301,304],{},"Like ",[142,302,303],{},"CompTimeArgs",", but the literal also selects which variant of a factory you get, such as the JSON encoder strategy. Static check only.",[164,306,308,330],{"title":307},"Pure functions",[168,309,311],{"className":170,"code":310,"language":172,"meta":173,"style":173},"fn: PureFunction\u003CF>\n",[142,312,313],{"__ignoreMap":173},[177,314,315,318,320,323,325,328],{"class":179,"line":180},[177,316,317],{"class":254},"fn",[177,319,258],{"class":187},[177,321,322],{"class":183}," PureFunction",[177,324,194],{"class":187},[177,326,327],{"class":183},"F",[177,329,206],{"class":187},[138,331,332,333,337],{},"Brands a pure function argument that passes the purity rules. The direct form: the argument is the helper itself. Used for ",[334,335,336],"a",{"href":63},"pure functions",".",[164,339,341,361],{"title":340},"Pure function factories",[168,342,344],{"className":170,"code":343,"language":172,"meta":173,"style":173},"fn: PureFunctionFactory\u003CF>\n",[142,345,346],{"__ignoreMap":173},[177,347,348,350,352,355,357,359],{"class":179,"line":180},[177,349,317],{"class":254},[177,351,258],{"class":187},[177,353,354],{"class":183}," PureFunctionFactory",[177,356,194],{"class":187},[177,358,327],{"class":183},[177,360,206],{"class":187},[138,362,363,364,337],{},"The factory form of the above, for a helper that needs one-time setup or composes another pure fn. Used for ",[334,365,336],{"href":63},[164,367,369,390],{"title":368},"Anonymous pure-fn id",[168,370,372],{"className":170,"code":371,"language":172,"meta":173,"style":173},"hash?: InjectPureFnHash\u003CF>\n",[142,373,374],{"__ignoreMap":173},[177,375,376,379,381,384,386,388],{"class":179,"line":180},[177,377,378],{"class":183},"hash",[177,380,188],{"class":187},[177,382,383],{"class":183}," InjectPureFnHash",[177,385,194],{"class":187},[177,387,327],{"class":183},[177,389,206],{"class":187},[138,391,392,393,396,397,337],{},"Injects a content hash of a pure helper's body, so a library can wrap ",[142,394,395],{},"registerAnonymousPureFn",". Used for ",[334,398,336],{"href":63},[164,400,401,404],{},[138,402,403],{},"Seven markers in total: one you will type, and six that quietly do their job.",[138,405,406],{},"None of them survive to runtime. The build reads each one, does its job, and emits ordinary JavaScript.",[138,408,337],{},[147,410,412],{"id":411},"arguments-read-at-compile-time","Arguments read at compile time",[138,414,415,416,419,420,423,424,426],{},"Some factory arguments are not ordinary runtime values, such as the ",[142,417,418],{},"ValidateOptions"," bag or the JSON encoder ",[142,421,422],{},"strategy",". The build reads them to choose the exact specialized function it emits, so each one has to be a literal the build can see at compile time. You can write it inline at the call site, or factor it into a ",[142,425,273],{},", including one imported from another module. A value computed at runtime will not do, because the build cannot read it.",[168,428,430],{"className":170,"code":429,"language":172,"meta":173,"style":173},"import {createValidateFn, createJsonEncoderFn} from '@ts-runtypes\u002Fcore';\n\ntype Flag = {kind: 'on' | 'off'};\n\n\u002F\u002F These options are read by the BUILD, so they must be a literal written right\n\u002F\u002F at the call site — the build picks the specialized function from what it sees.\nconst isFlag = createValidateFn\u003CFlag>(undefined, {noLiterals: true});\nconst encode = createJsonEncoderFn\u003CFlag>(undefined, {strategy: 'direct'});\n\n\u002F\u002F A computed value is NOT a literal, so the build can't read it — this line\n\u002F\u002F fails compilation with a CTA diagnostic.\nconst looseAtNight = new Date().getHours() \u003C 6;\ncreateValidateFn\u003CFlag>(undefined, {noLiterals: looseAtNight});\n\nexport {isFlag, encode};\n",[142,431,432,468,475,516,521,528,534,581,622,627,633,639,674,704,709],{"__ignoreMap":173},[177,433,434,438,441,444,446,449,452,455,458,462,465],{"class":179,"line":180},[177,435,437],{"class":436},"s7zQu","import",[177,439,440],{"class":187}," {",[177,442,443],{"class":183},"createValidateFn",[177,445,200],{"class":187},[177,447,448],{"class":183}," createJsonEncoderFn",[177,450,451],{"class":187},"}",[177,453,454],{"class":436}," from",[177,456,457],{"class":187}," '",[177,459,461],{"class":460},"sfazB","@ts-runtypes\u002Fcore",[177,463,464],{"class":187},"'",[177,466,467],{"class":187},";\n",[177,469,471],{"class":179,"line":470},2,[177,472,474],{"emptyLinePlaceholder":473},true,"\n",[177,476,478,482,485,488,490,494,496,498,501,503,506,508,511,513],{"class":179,"line":477},3,[177,479,481],{"class":480},"spNyl","type",[177,483,484],{"class":254}," Flag",[177,486,487],{"class":187}," =",[177,489,440],{"class":187},[177,491,493],{"class":492},"swJcz","kind",[177,495,258],{"class":187},[177,497,457],{"class":187},[177,499,500],{"class":460},"on",[177,502,464],{"class":187},[177,504,505],{"class":187}," |",[177,507,457],{"class":187},[177,509,510],{"class":460},"off",[177,512,464],{"class":187},[177,514,515],{"class":187},"};\n",[177,517,519],{"class":179,"line":518},4,[177,520,474],{"emptyLinePlaceholder":473},[177,522,524],{"class":179,"line":523},5,[177,525,527],{"class":526},"sHwdD","\u002F\u002F These options are read by the BUILD, so they must be a literal written right\n",[177,529,531],{"class":179,"line":530},6,[177,532,533],{"class":526},"\u002F\u002F at the call site — the build picks the specialized function from what it sees.\n",[177,535,537,539,542,545,549,551,554,557,560,563,565,568,570,574,576,579],{"class":179,"line":536},7,[177,538,273],{"class":480},[177,540,541],{"class":183}," isFlag ",[177,543,544],{"class":187},"=",[177,546,548],{"class":547},"s2Zo4"," createValidateFn",[177,550,194],{"class":187},[177,552,553],{"class":254},"Flag",[177,555,556],{"class":187},">",[177,558,559],{"class":183},"(",[177,561,562],{"class":187},"undefined,",[177,564,440],{"class":187},[177,566,567],{"class":492},"noLiterals",[177,569,258],{"class":187},[177,571,573],{"class":572},"sfNiH"," true",[177,575,451],{"class":187},[177,577,578],{"class":183},")",[177,580,467],{"class":187},[177,582,584,586,589,591,593,595,597,599,601,603,605,607,609,611,614,616,618,620],{"class":179,"line":583},8,[177,585,273],{"class":480},[177,587,588],{"class":183}," encode ",[177,590,544],{"class":187},[177,592,448],{"class":547},[177,594,194],{"class":187},[177,596,553],{"class":254},[177,598,556],{"class":187},[177,600,559],{"class":183},[177,602,562],{"class":187},[177,604,440],{"class":187},[177,606,422],{"class":492},[177,608,258],{"class":187},[177,610,457],{"class":187},[177,612,613],{"class":460},"direct",[177,615,464],{"class":187},[177,617,451],{"class":187},[177,619,578],{"class":183},[177,621,467],{"class":187},[177,623,625],{"class":179,"line":624},9,[177,626,474],{"emptyLinePlaceholder":473},[177,628,630],{"class":179,"line":629},10,[177,631,632],{"class":526},"\u002F\u002F A computed value is NOT a literal, so the build can't read it — this line\n",[177,634,636],{"class":179,"line":635},11,[177,637,638],{"class":526},"\u002F\u002F fails compilation with a CTA diagnostic.\n",[177,640,642,644,647,649,652,655,658,660,663,666,668,672],{"class":179,"line":641},12,[177,643,273],{"class":480},[177,645,646],{"class":183}," looseAtNight ",[177,648,544],{"class":187},[177,650,651],{"class":187}," new",[177,653,654],{"class":547}," Date",[177,656,657],{"class":183},"()",[177,659,337],{"class":187},[177,661,662],{"class":547},"getHours",[177,664,665],{"class":183},"() ",[177,667,194],{"class":187},[177,669,671],{"class":670},"sbssI"," 6",[177,673,467],{"class":187},[177,675,677,679,681,683,685,687,689,691,693,695,698,700,702],{"class":179,"line":676},13,[177,678,443],{"class":547},[177,680,194],{"class":187},[177,682,553],{"class":254},[177,684,556],{"class":187},[177,686,559],{"class":183},[177,688,562],{"class":187},[177,690,440],{"class":187},[177,692,567],{"class":492},[177,694,258],{"class":187},[177,696,697],{"class":183}," looseAtNight",[177,699,451],{"class":187},[177,701,578],{"class":183},[177,703,467],{"class":187},[177,705,707],{"class":179,"line":706},14,[177,708,474],{"emptyLinePlaceholder":473},[177,710,712,715,717,720,722,725],{"class":179,"line":711},15,[177,713,714],{"class":436},"export",[177,716,440],{"class":187},[177,718,719],{"class":183},"isFlag",[177,721,200],{"class":187},[177,723,724],{"class":183}," encode",[177,726,515],{"class":187},[138,728,729,730,733,734,737],{},"That rule is a marker, too. ",[142,731,732],{},"CompTimeArgs\u003CT>"," brands a parameter as \"must be a literal here\", and ",[142,735,736],{},"CompTimeFnArgs\u003CT>"," does the same for the literal that selects a variant (like the strategy above). The factories already declare them, so you just pass a literal and the build rejects anything else at compile time.",[138,739,740,741,743,744,747,748,751,752,755,756,758],{},"When you factor an options bag (or any literal value) into a ",[142,742,273],{},", declare it ",[142,745,746],{},"as const",". Without it, TypeScript widens ",[142,749,750],{},"{strategy: 'mutate'}"," to ",[142,753,754],{},"{strategy: string}",", and the build rejects the widened value, so the type the compiler resolves and the value the build reads can never disagree. The same shared ",[142,757,273],{}," then works whether it lives beside the call or in another module.",[168,760,762],{"className":170,"code":761,"language":172,"meta":173,"style":173},"\u002F\u002F shared-config.ts\nexport const strict = {noLiterals: true} as const; \u002F\u002F `as const` keeps the values literal\n\n\u002F\u002F anywhere.ts\ncreateValidateFn\u003CUser>(undefined, strict);            \u002F\u002F ok: a shared const, even imported\ncreateValidateFn\u003CUser>(undefined, {noLiterals: true}); \u002F\u002F ok: inline literal\n",[142,763,764,769,802,806,811,834],{"__ignoreMap":173},[177,765,766],{"class":179,"line":180},[177,767,768],{"class":526},"\u002F\u002F shared-config.ts\n",[177,770,771,773,776,779,781,783,785,787,789,791,794,796,799],{"class":179,"line":470},[177,772,714],{"class":436},[177,774,775],{"class":480}," const",[177,777,778],{"class":183}," strict ",[177,780,544],{"class":187},[177,782,440],{"class":187},[177,784,567],{"class":492},[177,786,258],{"class":187},[177,788,573],{"class":572},[177,790,451],{"class":187},[177,792,793],{"class":436}," as",[177,795,775],{"class":480},[177,797,798],{"class":187},";",[177,800,801],{"class":526}," \u002F\u002F `as const` keeps the values literal\n",[177,803,804],{"class":179,"line":477},[177,805,474],{"emptyLinePlaceholder":473},[177,807,808],{"class":179,"line":518},[177,809,810],{"class":526},"\u002F\u002F anywhere.ts\n",[177,812,813,815,817,820,822,824,826,829,831],{"class":179,"line":523},[177,814,443],{"class":547},[177,816,194],{"class":187},[177,818,819],{"class":254},"User",[177,821,556],{"class":187},[177,823,559],{"class":183},[177,825,562],{"class":187},[177,827,828],{"class":183}," strict)",[177,830,798],{"class":187},[177,832,833],{"class":526},"            \u002F\u002F ok: a shared const, even imported\n",[177,835,836,838,840,842,844,846,848,850,852,854,856,858,860,862],{"class":179,"line":530},[177,837,443],{"class":547},[177,839,194],{"class":187},[177,841,819],{"class":254},[177,843,556],{"class":187},[177,845,559],{"class":183},[177,847,562],{"class":187},[177,849,440],{"class":187},[177,851,567],{"class":492},[177,853,258],{"class":187},[177,855,573],{"class":572},[177,857,451],{"class":187},[177,859,578],{"class":183},[177,861,798],{"class":187},[177,863,864],{"class":526}," \u002F\u002F ok: inline literal\n",[147,866,868],{"id":867},"inject-an-id-into-your-own-helpers","Inject an id into your own helpers",[138,870,871,874,875,878],{},[142,872,873],{},"InjectRunTypeId\u003CT>"," is the one marker you are likely to type yourself. Add a trailing ",[142,876,877],{},"id?: InjectRunTypeId\u003CT>"," to a generic function and it opts in: the build injects the type's id at every call site, so you never pass it by hand.",[168,880,882],{"className":170,"code":881,"language":172,"meta":173,"style":173},"import {getRunType, type InjectRunTypeId} from '@ts-runtypes\u002Fcore';\n\n\u002F\u002F Wrap ts-runtypes into your OWN helper. Declare a trailing\n\u002F\u002F `id?: InjectRunTypeId\u003CT>` parameter and the build fills it in at every\n\u002F\u002F call site — you never pass the id yourself.\nfunction describe\u003CT>(id?: InjectRunTypeId\u003CT>): string {\n  \u002F\u002F The injected `id` is an OPAQUE handle, not a plain string. Resolve it by\n  \u002F\u002F forwarding it to a public resolver as the trailing argument: getRunType\n  \u002F\u002F registers T's type graph and returns the node (getRunTypeId returns the id\n  \u002F\u002F string). The build leaves this forwarded call untouched.\n  const runType = getRunType\u003CT>(undefined, id);\n  return `type #${runType.id} (kind ${runType.kind})`;\n}\n\n\u002F\u002F Call it like any generic function — no id argument in sight.\ndescribe\u003C{id: number; name: string}>();\ndescribe\u003Cstring[]>();\n\nexport {describe};\n",[142,883,884,912,916,921,926,931,966,971,976,981,986,1016,1059,1064,1068,1073,1105,1124,1129],{"__ignoreMap":173},[177,885,886,888,890,893,895,898,900,902,904,906,908,910],{"class":179,"line":180},[177,887,437],{"class":436},[177,889,440],{"class":187},[177,891,892],{"class":183},"getRunType",[177,894,200],{"class":187},[177,896,897],{"class":436}," type",[177,899,229],{"class":183},[177,901,451],{"class":187},[177,903,454],{"class":436},[177,905,457],{"class":187},[177,907,461],{"class":460},[177,909,464],{"class":187},[177,911,467],{"class":187},[177,913,914],{"class":179,"line":470},[177,915,474],{"emptyLinePlaceholder":473},[177,917,918],{"class":179,"line":477},[177,919,920],{"class":526},"\u002F\u002F Wrap ts-runtypes into your OWN helper. Declare a trailing\n",[177,922,923],{"class":179,"line":518},[177,924,925],{"class":526},"\u002F\u002F `id?: InjectRunTypeId\u003CT>` parameter and the build fills it in at every\n",[177,927,928],{"class":179,"line":523},[177,929,930],{"class":526},"\u002F\u002F call site — you never pass the id yourself.\n",[177,932,933,936,939,941,943,946,949,951,953,955,957,960,963],{"class":179,"line":530},[177,934,935],{"class":480},"function",[177,937,938],{"class":547}," describe",[177,940,194],{"class":187},[177,942,197],{"class":254},[177,944,945],{"class":187},">(",[177,947,184],{"class":948},"sHdIc",[177,950,188],{"class":187},[177,952,229],{"class":254},[177,954,194],{"class":187},[177,956,197],{"class":254},[177,958,959],{"class":187},">):",[177,961,962],{"class":254}," string",[177,964,965],{"class":187}," {\n",[177,967,968],{"class":179,"line":536},[177,969,970],{"class":526},"  \u002F\u002F The injected `id` is an OPAQUE handle, not a plain string. Resolve it by\n",[177,972,973],{"class":179,"line":583},[177,974,975],{"class":526},"  \u002F\u002F forwarding it to a public resolver as the trailing argument: getRunType\n",[177,977,978],{"class":179,"line":624},[177,979,980],{"class":526},"  \u002F\u002F registers T's type graph and returns the node (getRunTypeId returns the id\n",[177,982,983],{"class":179,"line":629},[177,984,985],{"class":526},"  \u002F\u002F string). The build leaves this forwarded call untouched.\n",[177,987,988,991,994,996,999,1001,1003,1005,1007,1009,1012,1014],{"class":179,"line":635},[177,989,990],{"class":480},"  const",[177,992,993],{"class":183}," runType",[177,995,487],{"class":187},[177,997,998],{"class":547}," getRunType",[177,1000,194],{"class":187},[177,1002,197],{"class":254},[177,1004,556],{"class":187},[177,1006,559],{"class":492},[177,1008,562],{"class":187},[177,1010,1011],{"class":183}," id",[177,1013,578],{"class":492},[177,1015,467],{"class":187},[177,1017,1018,1021,1024,1027,1030,1033,1035,1037,1039,1042,1044,1046,1048,1050,1052,1054,1057],{"class":179,"line":641},[177,1019,1020],{"class":436},"  return",[177,1022,1023],{"class":187}," `",[177,1025,1026],{"class":460},"type #",[177,1028,1029],{"class":187},"${",[177,1031,1032],{"class":183},"runType",[177,1034,337],{"class":187},[177,1036,184],{"class":183},[177,1038,451],{"class":187},[177,1040,1041],{"class":460}," (kind ",[177,1043,1029],{"class":187},[177,1045,1032],{"class":183},[177,1047,337],{"class":187},[177,1049,493],{"class":183},[177,1051,451],{"class":187},[177,1053,578],{"class":460},[177,1055,1056],{"class":187},"`",[177,1058,467],{"class":187},[177,1060,1061],{"class":179,"line":676},[177,1062,1063],{"class":187},"}\n",[177,1065,1066],{"class":179,"line":706},[177,1067,474],{"emptyLinePlaceholder":473},[177,1069,1070],{"class":179,"line":711},[177,1071,1072],{"class":526},"\u002F\u002F Call it like any generic function — no id argument in sight.\n",[177,1074,1076,1079,1082,1084,1086,1089,1091,1094,1096,1098,1101,1103],{"class":179,"line":1075},16,[177,1077,1078],{"class":547},"describe",[177,1080,1081],{"class":187},"\u003C{",[177,1083,184],{"class":492},[177,1085,258],{"class":187},[177,1087,1088],{"class":254}," number",[177,1090,798],{"class":187},[177,1092,1093],{"class":492}," name",[177,1095,258],{"class":187},[177,1097,962],{"class":254},[177,1099,1100],{"class":187},"}>",[177,1102,657],{"class":183},[177,1104,467],{"class":187},[177,1106,1108,1110,1112,1115,1118,1120,1122],{"class":179,"line":1107},17,[177,1109,1078],{"class":547},[177,1111,194],{"class":187},[177,1113,1114],{"class":254},"string",[177,1116,1117],{"class":183},"[]",[177,1119,556],{"class":187},[177,1121,657],{"class":183},[177,1123,467],{"class":187},[177,1125,1127],{"class":179,"line":1126},18,[177,1128,474],{"emptyLinePlaceholder":473},[177,1130,1132,1134,1136,1138],{"class":179,"line":1131},19,[177,1133,714],{"class":436},[177,1135,440],{"class":187},[177,1137,1078],{"class":183},[177,1139,515],{"class":187},[138,1141,1142,1143,1145,1146,1148,1149,1152],{},"The call looks like any ordinary generic call. Inside the helper the injected ",[142,1144,184],{}," is an opaque handle, not a plain string, so forward it to ",[142,1147,892],{}," or ",[142,1150,1151],{},"getRunTypeId"," (as the trailing argument) to register the type and read back its node or id string.",[1154,1155,1156,1157,1159,1160,1162],"note",{},"The marker only fires where ",[142,1158,197],{}," is concrete, at a real call site, not inside a generic body. To pass it through your own generic function, declare ",[142,1161,877],{}," and let the build fill it at each call site.",[147,1164,1166],{"id":1165},"wrapping-your-own-helpers","Wrapping your own helpers",[138,1168,1169],{},"The real payoff is composing the generated functions into higher-level helpers, say one call that parses JSON and validates it against your type in a single step.",[168,1171,1173],{"className":170,"code":1172,"language":172,"meta":173,"style":173},"import {createValidateFn, type ValidateFn} from '@ts-runtypes\u002Fcore';\n\n\u002F\u002F A realistic wrapper: parse JSON and validate it against your type in one call.\n\u002F\u002F A createX\u003CT>() factory needs a CONCRETE type at its OWN call site, so build\n\u002F\u002F the validator where the type is known and pass it in. Calling\n\u002F\u002F `createValidateFn\u003CT>()` inside this generic body would use the wrapper's free\n\u002F\u002F `T` (unknown at build time), which the build reports as MKR003.\nfunction parseChecked\u003CT>(raw: string, isValid: ValidateFn\u003CT>): T {\n  const data: unknown = JSON.parse(raw);\n  if (!isValid(data)) throw new Error('payload does not match the expected type');\n  return data as T;\n}\n\ntype User = {id: number; name: string};\n\n\u002F\u002F createValidateFn\u003CUser>() runs at a concrete call site — the build injects here.\nconst user = parseChecked('{\"id\":1,\"name\":\"Ada\"}', createValidateFn\u003CUser>());\n\nexport {parseChecked, user};\n",[142,1174,1175,1202,1206,1211,1216,1221,1226,1231,1271,1301,1344,1356,1360,1364,1391,1395,1400,1435,1439],{"__ignoreMap":173},[177,1176,1177,1179,1181,1183,1185,1187,1190,1192,1194,1196,1198,1200],{"class":179,"line":180},[177,1178,437],{"class":436},[177,1180,440],{"class":187},[177,1182,443],{"class":183},[177,1184,200],{"class":187},[177,1186,897],{"class":436},[177,1188,1189],{"class":183}," ValidateFn",[177,1191,451],{"class":187},[177,1193,454],{"class":436},[177,1195,457],{"class":187},[177,1197,461],{"class":460},[177,1199,464],{"class":187},[177,1201,467],{"class":187},[177,1203,1204],{"class":179,"line":470},[177,1205,474],{"emptyLinePlaceholder":473},[177,1207,1208],{"class":179,"line":477},[177,1209,1210],{"class":526},"\u002F\u002F A realistic wrapper: parse JSON and validate it against your type in one call.\n",[177,1212,1213],{"class":179,"line":518},[177,1214,1215],{"class":526},"\u002F\u002F A createX\u003CT>() factory needs a CONCRETE type at its OWN call site, so build\n",[177,1217,1218],{"class":179,"line":523},[177,1219,1220],{"class":526},"\u002F\u002F the validator where the type is known and pass it in. Calling\n",[177,1222,1223],{"class":179,"line":530},[177,1224,1225],{"class":526},"\u002F\u002F `createValidateFn\u003CT>()` inside this generic body would use the wrapper's free\n",[177,1227,1228],{"class":179,"line":536},[177,1229,1230],{"class":526},"\u002F\u002F `T` (unknown at build time), which the build reports as MKR003.\n",[177,1232,1233,1235,1238,1240,1242,1244,1247,1249,1251,1253,1256,1258,1260,1262,1264,1266,1269],{"class":179,"line":583},[177,1234,935],{"class":480},[177,1236,1237],{"class":547}," parseChecked",[177,1239,194],{"class":187},[177,1241,197],{"class":254},[177,1243,945],{"class":187},[177,1245,1246],{"class":948},"raw",[177,1248,258],{"class":187},[177,1250,962],{"class":254},[177,1252,200],{"class":187},[177,1254,1255],{"class":948}," isValid",[177,1257,258],{"class":187},[177,1259,1189],{"class":254},[177,1261,194],{"class":187},[177,1263,197],{"class":254},[177,1265,959],{"class":187},[177,1267,1268],{"class":254}," T",[177,1270,965],{"class":187},[177,1272,1273,1275,1278,1280,1283,1285,1288,1290,1293,1295,1297,1299],{"class":179,"line":624},[177,1274,990],{"class":480},[177,1276,1277],{"class":183}," data",[177,1279,258],{"class":187},[177,1281,1282],{"class":254}," unknown",[177,1284,487],{"class":187},[177,1286,1287],{"class":183}," JSON",[177,1289,337],{"class":187},[177,1291,1292],{"class":547},"parse",[177,1294,559],{"class":492},[177,1296,1246],{"class":183},[177,1298,578],{"class":492},[177,1300,467],{"class":187},[177,1302,1303,1306,1309,1312,1315,1317,1320,1323,1326,1328,1331,1333,1335,1338,1340,1342],{"class":179,"line":629},[177,1304,1305],{"class":436},"  if",[177,1307,1308],{"class":492}," (",[177,1310,1311],{"class":187},"!",[177,1313,1314],{"class":547},"isValid",[177,1316,559],{"class":492},[177,1318,1319],{"class":183},"data",[177,1321,1322],{"class":492},")) ",[177,1324,1325],{"class":436},"throw",[177,1327,651],{"class":187},[177,1329,1330],{"class":547}," Error",[177,1332,559],{"class":492},[177,1334,464],{"class":187},[177,1336,1337],{"class":460},"payload does not match the expected type",[177,1339,464],{"class":187},[177,1341,578],{"class":492},[177,1343,467],{"class":187},[177,1345,1346,1348,1350,1352,1354],{"class":179,"line":635},[177,1347,1020],{"class":436},[177,1349,1277],{"class":183},[177,1351,793],{"class":436},[177,1353,1268],{"class":254},[177,1355,467],{"class":187},[177,1357,1358],{"class":179,"line":641},[177,1359,1063],{"class":187},[177,1361,1362],{"class":179,"line":676},[177,1363,474],{"emptyLinePlaceholder":473},[177,1365,1366,1368,1371,1373,1375,1377,1379,1381,1383,1385,1387,1389],{"class":179,"line":706},[177,1367,481],{"class":480},[177,1369,1370],{"class":254}," User",[177,1372,487],{"class":187},[177,1374,440],{"class":187},[177,1376,184],{"class":492},[177,1378,258],{"class":187},[177,1380,1088],{"class":254},[177,1382,798],{"class":187},[177,1384,1093],{"class":492},[177,1386,258],{"class":187},[177,1388,962],{"class":254},[177,1390,515],{"class":187},[177,1392,1393],{"class":179,"line":711},[177,1394,474],{"emptyLinePlaceholder":473},[177,1396,1397],{"class":179,"line":1075},[177,1398,1399],{"class":526},"\u002F\u002F createValidateFn\u003CUser>() runs at a concrete call site — the build injects here.\n",[177,1401,1402,1404,1407,1409,1411,1413,1415,1418,1420,1422,1424,1426,1428,1430,1433],{"class":179,"line":1107},[177,1403,273],{"class":480},[177,1405,1406],{"class":183}," user ",[177,1408,544],{"class":187},[177,1410,1237],{"class":547},[177,1412,559],{"class":183},[177,1414,464],{"class":187},[177,1416,1417],{"class":460},"{\"id\":1,\"name\":\"Ada\"}",[177,1419,464],{"class":187},[177,1421,200],{"class":187},[177,1423,548],{"class":547},[177,1425,194],{"class":187},[177,1427,819],{"class":254},[177,1429,556],{"class":187},[177,1431,1432],{"class":183},"())",[177,1434,467],{"class":187},[177,1436,1437],{"class":179,"line":1126},[177,1438,474],{"emptyLinePlaceholder":473},[177,1440,1441,1443,1445,1448,1450,1453],{"class":179,"line":1131},[177,1442,714],{"class":436},[177,1444,440],{"class":187},[177,1446,1447],{"class":183},"parseChecked",[177,1449,200],{"class":187},[177,1451,1452],{"class":183}," user",[177,1454,515],{"class":187},[138,1456,1457,1458,1461,1462,1464],{},"Build the validator where the type is concrete and pass it in. A ",[142,1459,1460],{},"createX\u003CT>()"," factory injects at its own call site, so it cannot run inside a generic body where ",[142,1463,197],{}," is still abstract (the build reports that as MKR003).",[1466,1467,1468],"tip",{},"The marker is the public extension point. Whenever you wonder \"can RunTypes do X?\", the answer is often \"wrap it yourself\". It is exactly how the built-in factories are built.",[147,1470,1472],{"id":1471},"asking-for-several-functions-at-once","Asking for several functions at once",[138,1474,1475,1476,1479],{},"One ",[142,1477,1478],{},"InjectTypeFnArgs"," marker can name more than one function family. A route wrapper that validates a request, decodes it from JSON, and encodes the response asks for all three in a single marker:",[168,1481,1483],{"className":170,"code":1482,"language":172,"meta":173,"style":173},"import {createGetValidationErrorsFn, createJsonDecoderFn, createJsonEncoderFn, type InjectTypeFnArgs} from '@ts-runtypes\u002Fcore';\n\n\u002F\u002F A single marker can ask for SEVERAL generated functions at once. A route\n\u002F\u002F wrapper wants to validate a request, decode it from JSON, and encode the\n\u002F\u002F response, so it names all three families in one trailing marker. The build\n\u002F\u002F injects an array of handles, one per family, in the order you listed them.\ntype Handler = (...args: any[]) => unknown;\n\nfunction route\u003CH extends Handler>(handler: H, fns?: InjectTypeFnArgs\u003CParameters\u003CH>, 'verr', 'jsonDecoder', 'jsonEncoder'>) {\n  const getErrors = createGetValidationErrorsFn(undefined, undefined, fns?.[0] as never);\n  const decodeParams = createJsonDecoderFn(undefined, undefined, fns?.[1] as never);\n  const encodeParams = createJsonEncoderFn(undefined, undefined, fns?.[2] as never);\n  return {handler, getErrors, decodeParams, encodeParams};\n}\n\n\u002F\u002F route() runs at a concrete call site, so the build injects the three handles\n\u002F\u002F for this handler's parameters here.\nconst greet = route((name: string, times: number) => name.repeat(times));\n\nexport {route, greet};\n",[142,1484,1485,1521,1525,1530,1535,1540,1545,1576,1580,1658,1701,1737,1773,1795,1799,1803,1808,1813,1860,1864],{"__ignoreMap":173},[177,1486,1487,1489,1491,1494,1496,1499,1501,1503,1505,1507,1509,1511,1513,1515,1517,1519],{"class":179,"line":180},[177,1488,437],{"class":436},[177,1490,440],{"class":187},[177,1492,1493],{"class":183},"createGetValidationErrorsFn",[177,1495,200],{"class":187},[177,1497,1498],{"class":183}," createJsonDecoderFn",[177,1500,200],{"class":187},[177,1502,448],{"class":183},[177,1504,200],{"class":187},[177,1506,897],{"class":436},[177,1508,191],{"class":183},[177,1510,451],{"class":187},[177,1512,454],{"class":436},[177,1514,457],{"class":187},[177,1516,461],{"class":460},[177,1518,464],{"class":187},[177,1520,467],{"class":187},[177,1522,1523],{"class":179,"line":470},[177,1524,474],{"emptyLinePlaceholder":473},[177,1526,1527],{"class":179,"line":477},[177,1528,1529],{"class":526},"\u002F\u002F A single marker can ask for SEVERAL generated functions at once. A route\n",[177,1531,1532],{"class":179,"line":518},[177,1533,1534],{"class":526},"\u002F\u002F wrapper wants to validate a request, decode it from JSON, and encode the\n",[177,1536,1537],{"class":179,"line":523},[177,1538,1539],{"class":526},"\u002F\u002F response, so it names all three families in one trailing marker. The build\n",[177,1541,1542],{"class":179,"line":530},[177,1543,1544],{"class":526},"\u002F\u002F injects an array of handles, one per family, in the order you listed them.\n",[177,1546,1547,1549,1552,1554,1557,1560,1562,1565,1567,1569,1572,1574],{"class":179,"line":536},[177,1548,481],{"class":480},[177,1550,1551],{"class":254}," Handler",[177,1553,487],{"class":187},[177,1555,1556],{"class":187}," (...",[177,1558,1559],{"class":948},"args",[177,1561,258],{"class":187},[177,1563,1564],{"class":254}," any",[177,1566,1117],{"class":183},[177,1568,578],{"class":187},[177,1570,1571],{"class":480}," =>",[177,1573,1282],{"class":254},[177,1575,467],{"class":187},[177,1577,1578],{"class":179,"line":583},[177,1579,474],{"emptyLinePlaceholder":473},[177,1581,1582,1584,1587,1589,1592,1595,1597,1599,1602,1604,1607,1609,1612,1614,1616,1618,1621,1623,1625,1628,1630,1633,1635,1637,1639,1642,1644,1646,1648,1651,1653,1656],{"class":179,"line":624},[177,1583,935],{"class":480},[177,1585,1586],{"class":547}," route",[177,1588,194],{"class":187},[177,1590,1591],{"class":254},"H",[177,1593,1594],{"class":480}," extends",[177,1596,1551],{"class":254},[177,1598,945],{"class":187},[177,1600,1601],{"class":948},"handler",[177,1603,258],{"class":187},[177,1605,1606],{"class":254}," H",[177,1608,200],{"class":187},[177,1610,1611],{"class":948}," fns",[177,1613,188],{"class":187},[177,1615,191],{"class":254},[177,1617,194],{"class":187},[177,1619,1620],{"class":254},"Parameters",[177,1622,194],{"class":187},[177,1624,1591],{"class":254},[177,1626,1627],{"class":187},">,",[177,1629,457],{"class":187},[177,1631,1632],{"class":460},"verr",[177,1634,464],{"class":187},[177,1636,200],{"class":187},[177,1638,457],{"class":187},[177,1640,1641],{"class":460},"jsonDecoder",[177,1643,464],{"class":187},[177,1645,200],{"class":187},[177,1647,457],{"class":187},[177,1649,1650],{"class":460},"jsonEncoder",[177,1652,464],{"class":187},[177,1654,1655],{"class":187},">)",[177,1657,965],{"class":187},[177,1659,1660,1662,1665,1667,1670,1672,1674,1677,1679,1682,1685,1688,1691,1694,1697,1699],{"class":179,"line":629},[177,1661,990],{"class":480},[177,1663,1664],{"class":183}," getErrors",[177,1666,487],{"class":187},[177,1668,1669],{"class":547}," createGetValidationErrorsFn",[177,1671,559],{"class":492},[177,1673,562],{"class":187},[177,1675,1676],{"class":187}," undefined,",[177,1678,1611],{"class":183},[177,1680,1681],{"class":187},"?.",[177,1683,1684],{"class":492},"[",[177,1686,1687],{"class":670},"0",[177,1689,1690],{"class":492},"] ",[177,1692,1693],{"class":436},"as",[177,1695,1696],{"class":254}," never",[177,1698,578],{"class":492},[177,1700,467],{"class":187},[177,1702,1703,1705,1708,1710,1712,1714,1716,1718,1720,1722,1724,1727,1729,1731,1733,1735],{"class":179,"line":635},[177,1704,990],{"class":480},[177,1706,1707],{"class":183}," decodeParams",[177,1709,487],{"class":187},[177,1711,1498],{"class":547},[177,1713,559],{"class":492},[177,1715,562],{"class":187},[177,1717,1676],{"class":187},[177,1719,1611],{"class":183},[177,1721,1681],{"class":187},[177,1723,1684],{"class":492},[177,1725,1726],{"class":670},"1",[177,1728,1690],{"class":492},[177,1730,1693],{"class":436},[177,1732,1696],{"class":254},[177,1734,578],{"class":492},[177,1736,467],{"class":187},[177,1738,1739,1741,1744,1746,1748,1750,1752,1754,1756,1758,1760,1763,1765,1767,1769,1771],{"class":179,"line":641},[177,1740,990],{"class":480},[177,1742,1743],{"class":183}," encodeParams",[177,1745,487],{"class":187},[177,1747,448],{"class":547},[177,1749,559],{"class":492},[177,1751,562],{"class":187},[177,1753,1676],{"class":187},[177,1755,1611],{"class":183},[177,1757,1681],{"class":187},[177,1759,1684],{"class":492},[177,1761,1762],{"class":670},"2",[177,1764,1690],{"class":492},[177,1766,1693],{"class":436},[177,1768,1696],{"class":254},[177,1770,578],{"class":492},[177,1772,467],{"class":187},[177,1774,1775,1777,1779,1781,1783,1785,1787,1789,1791,1793],{"class":179,"line":676},[177,1776,1020],{"class":436},[177,1778,440],{"class":187},[177,1780,1601],{"class":183},[177,1782,200],{"class":187},[177,1784,1664],{"class":183},[177,1786,200],{"class":187},[177,1788,1707],{"class":183},[177,1790,200],{"class":187},[177,1792,1743],{"class":183},[177,1794,515],{"class":187},[177,1796,1797],{"class":179,"line":706},[177,1798,1063],{"class":187},[177,1800,1801],{"class":179,"line":711},[177,1802,474],{"emptyLinePlaceholder":473},[177,1804,1805],{"class":179,"line":1075},[177,1806,1807],{"class":526},"\u002F\u002F route() runs at a concrete call site, so the build injects the three handles\n",[177,1809,1810],{"class":179,"line":1107},[177,1811,1812],{"class":526},"\u002F\u002F for this handler's parameters here.\n",[177,1814,1815,1817,1820,1822,1824,1826,1828,1831,1833,1835,1837,1840,1842,1844,1846,1848,1850,1852,1855,1858],{"class":179,"line":1126},[177,1816,273],{"class":480},[177,1818,1819],{"class":183}," greet ",[177,1821,544],{"class":187},[177,1823,1586],{"class":547},[177,1825,559],{"class":183},[177,1827,559],{"class":187},[177,1829,1830],{"class":948},"name",[177,1832,258],{"class":187},[177,1834,962],{"class":254},[177,1836,200],{"class":187},[177,1838,1839],{"class":948}," times",[177,1841,258],{"class":187},[177,1843,1088],{"class":254},[177,1845,578],{"class":187},[177,1847,1571],{"class":480},[177,1849,1093],{"class":183},[177,1851,337],{"class":187},[177,1853,1854],{"class":547},"repeat",[177,1856,1857],{"class":183},"(times))",[177,1859,467],{"class":187},[177,1861,1862],{"class":179,"line":1131},[177,1863,474],{"emptyLinePlaceholder":473},[177,1865,1867,1869,1871,1874,1876,1879],{"class":179,"line":1866},20,[177,1868,714],{"class":436},[177,1870,440],{"class":187},[177,1872,1873],{"class":183},"route",[177,1875,200],{"class":187},[177,1877,1878],{"class":183}," greet",[177,1880,515],{"class":187},[138,1882,1883,1884,1887,1888,1887,1891,1894],{},"The build injects one handle per family, as an array in the order you listed them, and the wrapper forwards each element (",[142,1885,1886],{},"fns?.[0]",", ",[142,1889,1890],{},"fns?.[1]",[142,1892,1893],{},"fns?.[2]",") to its factory. There is no fixed limit on how many families you list. Naming the same family twice is a mistake (the second handle would be identical and go unused), so the build reports it as MKR006. List each family at most once.",[147,1896,1898],{"id":1897},"recovering-a-function-that-has-no-factory","Recovering a function that has no factory",[138,1900,1901,1902,1905],{},"The string encoder and decoder are built on smaller value-level pieces, one prepareForJson and one restoreFromJson per strategy. Those pieces have no createX factory of their own, but you can still ask for them by name in a marker and recover the injected handle with ",[142,1903,1904],{},"getRTFunction",". It is the generic counterpart of a createX factory: hand it the injected handle and it gives you back the callable function for your type.",[168,1907,1909],{"className":170,"code":1908,"language":172,"meta":173,"style":173},"import {getRTFunction, type InjectTypeFnArgs} from '@ts-runtypes\u002Fcore';\n\n\u002F\u002F Some functions the generated code is built from, like the per-strategy\n\u002F\u002F prepareForJson and restoreFromJson, have no createX factory of their own. You\n\u002F\u002F still reach them from a marker: name the primitive and recover the injected\n\u002F\u002F handle with getRTFunction, which turns it into the callable function for T.\n\u002F\u002F You pass the same key you named in the marker, so getRTFunction knows the\n\u002F\u002F function's type.\n\u002F\u002F\n\u002F\u002F 'pjs' is the clone prepare (a fresh JSON-safe value with undeclared keys\n\u002F\u002F dropped) and 'rj' is the matching restore. A framework that owns its own JSON\n\u002F\u002F envelope uses this pair to transform values without a string round-trip.\nfunction jsonValueCodec\u003CT>(fns?: InjectTypeFnArgs\u003CT, 'pjs', 'rj'>) {\n  const prepare = getRTFunction\u003C'pjs'>(fns?.[0]);\n  const restore = getRTFunction\u003C'rj'>(fns?.[1]);\n  return {prepare, restore};\n}\n\ntype Message = {id: bigint; sentAt: Date; body: string};\n\n\u002F\u002F A concrete call site: the build injects the clone-prepare and restore handles\n\u002F\u002F for Message here.\nconst messageCodec = jsonValueCodec\u003CMessage>();\n\n\u002F\u002F prepare turns a typed value into a JSON-safe one and restore turns it back.\n\u002F\u002F The caller owns the JSON.stringify and JSON.parse, so many values can share\n\u002F\u002F one envelope with a single stringify and a single parse.\nconst message: Message = {id: 42n, sentAt: new Date('2020-01-02T03:04:05.000Z'), body: 'hi'};\nconst wire = JSON.stringify(messageCodec.prepare(message));\nconst restored = messageCodec.restore(JSON.parse(wire));\n\nexport {jsonValueCodec, messageCodec, restored};\n",[142,1910,1911,1937,1941,1946,1951,1956,1961,1966,1971,1976,1981,1986,1991,2037,2074,2109,2124,2128,2132,2170,2174,2180,2186,2209,2214,2220,2226,2232,2294,2323,2353,2358],{"__ignoreMap":173},[177,1912,1913,1915,1917,1919,1921,1923,1925,1927,1929,1931,1933,1935],{"class":179,"line":180},[177,1914,437],{"class":436},[177,1916,440],{"class":187},[177,1918,1904],{"class":183},[177,1920,200],{"class":187},[177,1922,897],{"class":436},[177,1924,191],{"class":183},[177,1926,451],{"class":187},[177,1928,454],{"class":436},[177,1930,457],{"class":187},[177,1932,461],{"class":460},[177,1934,464],{"class":187},[177,1936,467],{"class":187},[177,1938,1939],{"class":179,"line":470},[177,1940,474],{"emptyLinePlaceholder":473},[177,1942,1943],{"class":179,"line":477},[177,1944,1945],{"class":526},"\u002F\u002F Some functions the generated code is built from, like the per-strategy\n",[177,1947,1948],{"class":179,"line":518},[177,1949,1950],{"class":526},"\u002F\u002F prepareForJson and restoreFromJson, have no createX factory of their own. You\n",[177,1952,1953],{"class":179,"line":523},[177,1954,1955],{"class":526},"\u002F\u002F still reach them from a marker: name the primitive and recover the injected\n",[177,1957,1958],{"class":179,"line":530},[177,1959,1960],{"class":526},"\u002F\u002F handle with getRTFunction, which turns it into the callable function for T.\n",[177,1962,1963],{"class":179,"line":536},[177,1964,1965],{"class":526},"\u002F\u002F You pass the same key you named in the marker, so getRTFunction knows the\n",[177,1967,1968],{"class":179,"line":583},[177,1969,1970],{"class":526},"\u002F\u002F function's type.\n",[177,1972,1973],{"class":179,"line":624},[177,1974,1975],{"class":526},"\u002F\u002F\n",[177,1977,1978],{"class":179,"line":629},[177,1979,1980],{"class":526},"\u002F\u002F 'pjs' is the clone prepare (a fresh JSON-safe value with undeclared keys\n",[177,1982,1983],{"class":179,"line":635},[177,1984,1985],{"class":526},"\u002F\u002F dropped) and 'rj' is the matching restore. A framework that owns its own JSON\n",[177,1987,1988],{"class":179,"line":641},[177,1989,1990],{"class":526},"\u002F\u002F envelope uses this pair to transform values without a string round-trip.\n",[177,1992,1993,1995,1998,2000,2002,2004,2007,2009,2011,2013,2015,2017,2019,2022,2024,2026,2028,2031,2033,2035],{"class":179,"line":676},[177,1994,935],{"class":480},[177,1996,1997],{"class":547}," jsonValueCodec",[177,1999,194],{"class":187},[177,2001,197],{"class":254},[177,2003,945],{"class":187},[177,2005,2006],{"class":948},"fns",[177,2008,188],{"class":187},[177,2010,191],{"class":254},[177,2012,194],{"class":187},[177,2014,197],{"class":254},[177,2016,200],{"class":187},[177,2018,457],{"class":187},[177,2020,2021],{"class":460},"pjs",[177,2023,464],{"class":187},[177,2025,200],{"class":187},[177,2027,457],{"class":187},[177,2029,2030],{"class":460},"rj",[177,2032,464],{"class":187},[177,2034,1655],{"class":187},[177,2036,965],{"class":187},[177,2038,2039,2041,2044,2046,2049,2051,2053,2055,2057,2059,2061,2063,2065,2067,2069,2072],{"class":179,"line":706},[177,2040,990],{"class":480},[177,2042,2043],{"class":183}," prepare",[177,2045,487],{"class":187},[177,2047,2048],{"class":547}," getRTFunction",[177,2050,194],{"class":187},[177,2052,464],{"class":187},[177,2054,2021],{"class":460},[177,2056,464],{"class":187},[177,2058,556],{"class":187},[177,2060,559],{"class":492},[177,2062,2006],{"class":183},[177,2064,1681],{"class":187},[177,2066,1684],{"class":492},[177,2068,1687],{"class":670},[177,2070,2071],{"class":492},"])",[177,2073,467],{"class":187},[177,2075,2076,2078,2081,2083,2085,2087,2089,2091,2093,2095,2097,2099,2101,2103,2105,2107],{"class":179,"line":711},[177,2077,990],{"class":480},[177,2079,2080],{"class":183}," restore",[177,2082,487],{"class":187},[177,2084,2048],{"class":547},[177,2086,194],{"class":187},[177,2088,464],{"class":187},[177,2090,2030],{"class":460},[177,2092,464],{"class":187},[177,2094,556],{"class":187},[177,2096,559],{"class":492},[177,2098,2006],{"class":183},[177,2100,1681],{"class":187},[177,2102,1684],{"class":492},[177,2104,1726],{"class":670},[177,2106,2071],{"class":492},[177,2108,467],{"class":187},[177,2110,2111,2113,2115,2118,2120,2122],{"class":179,"line":1075},[177,2112,1020],{"class":436},[177,2114,440],{"class":187},[177,2116,2117],{"class":183},"prepare",[177,2119,200],{"class":187},[177,2121,2080],{"class":183},[177,2123,515],{"class":187},[177,2125,2126],{"class":179,"line":1107},[177,2127,1063],{"class":187},[177,2129,2130],{"class":179,"line":1126},[177,2131,474],{"emptyLinePlaceholder":473},[177,2133,2134,2136,2139,2141,2143,2145,2147,2150,2152,2155,2157,2159,2161,2164,2166,2168],{"class":179,"line":1131},[177,2135,481],{"class":480},[177,2137,2138],{"class":254}," Message",[177,2140,487],{"class":187},[177,2142,440],{"class":187},[177,2144,184],{"class":492},[177,2146,258],{"class":187},[177,2148,2149],{"class":254}," bigint",[177,2151,798],{"class":187},[177,2153,2154],{"class":492}," sentAt",[177,2156,258],{"class":187},[177,2158,654],{"class":254},[177,2160,798],{"class":187},[177,2162,2163],{"class":492}," body",[177,2165,258],{"class":187},[177,2167,962],{"class":254},[177,2169,515],{"class":187},[177,2171,2172],{"class":179,"line":1866},[177,2173,474],{"emptyLinePlaceholder":473},[177,2175,2177],{"class":179,"line":2176},21,[177,2178,2179],{"class":526},"\u002F\u002F A concrete call site: the build injects the clone-prepare and restore handles\n",[177,2181,2183],{"class":179,"line":2182},22,[177,2184,2185],{"class":526},"\u002F\u002F for Message here.\n",[177,2187,2189,2191,2194,2196,2198,2200,2203,2205,2207],{"class":179,"line":2188},23,[177,2190,273],{"class":480},[177,2192,2193],{"class":183}," messageCodec ",[177,2195,544],{"class":187},[177,2197,1997],{"class":547},[177,2199,194],{"class":187},[177,2201,2202],{"class":254},"Message",[177,2204,556],{"class":187},[177,2206,657],{"class":183},[177,2208,467],{"class":187},[177,2210,2212],{"class":179,"line":2211},24,[177,2213,474],{"emptyLinePlaceholder":473},[177,2215,2217],{"class":179,"line":2216},25,[177,2218,2219],{"class":526},"\u002F\u002F prepare turns a typed value into a JSON-safe one and restore turns it back.\n",[177,2221,2223],{"class":179,"line":2222},26,[177,2224,2225],{"class":526},"\u002F\u002F The caller owns the JSON.stringify and JSON.parse, so many values can share\n",[177,2227,2229],{"class":179,"line":2228},27,[177,2230,2231],{"class":526},"\u002F\u002F one envelope with a single stringify and a single parse.\n",[177,2233,2235,2237,2240,2242,2244,2246,2248,2250,2252,2255,2258,2260,2262,2264,2266,2268,2270,2272,2275,2277,2279,2281,2283,2285,2287,2290,2292],{"class":179,"line":2234},28,[177,2236,273],{"class":480},[177,2238,2239],{"class":183}," message",[177,2241,258],{"class":187},[177,2243,2138],{"class":254},[177,2245,487],{"class":187},[177,2247,440],{"class":187},[177,2249,184],{"class":492},[177,2251,258],{"class":187},[177,2253,2254],{"class":670}," 42",[177,2256,2257],{"class":480},"n",[177,2259,200],{"class":187},[177,2261,2154],{"class":492},[177,2263,258],{"class":187},[177,2265,651],{"class":187},[177,2267,654],{"class":547},[177,2269,559],{"class":183},[177,2271,464],{"class":187},[177,2273,2274],{"class":460},"2020-01-02T03:04:05.000Z",[177,2276,464],{"class":187},[177,2278,578],{"class":183},[177,2280,200],{"class":187},[177,2282,2163],{"class":492},[177,2284,258],{"class":187},[177,2286,457],{"class":187},[177,2288,2289],{"class":460},"hi",[177,2291,464],{"class":187},[177,2293,515],{"class":187},[177,2295,2297,2299,2302,2304,2306,2308,2311,2314,2316,2318,2321],{"class":179,"line":2296},29,[177,2298,273],{"class":480},[177,2300,2301],{"class":183}," wire ",[177,2303,544],{"class":187},[177,2305,1287],{"class":183},[177,2307,337],{"class":187},[177,2309,2310],{"class":547},"stringify",[177,2312,2313],{"class":183},"(messageCodec",[177,2315,337],{"class":187},[177,2317,2117],{"class":547},[177,2319,2320],{"class":183},"(message))",[177,2322,467],{"class":187},[177,2324,2326,2328,2331,2333,2336,2338,2341,2344,2346,2348,2351],{"class":179,"line":2325},30,[177,2327,273],{"class":480},[177,2329,2330],{"class":183}," restored ",[177,2332,544],{"class":187},[177,2334,2335],{"class":183}," messageCodec",[177,2337,337],{"class":187},[177,2339,2340],{"class":547},"restore",[177,2342,2343],{"class":183},"(JSON",[177,2345,337],{"class":187},[177,2347,1292],{"class":547},[177,2349,2350],{"class":183},"(wire))",[177,2352,467],{"class":187},[177,2354,2356],{"class":179,"line":2355},31,[177,2357,474],{"emptyLinePlaceholder":473},[177,2359,2361,2363,2365,2368,2370,2372,2374,2377],{"class":179,"line":2360},32,[177,2362,714],{"class":436},[177,2364,440],{"class":187},[177,2366,2367],{"class":183},"jsonValueCodec",[177,2369,200],{"class":187},[177,2371,2335],{"class":183},[177,2373,200],{"class":187},[177,2375,2376],{"class":183}," restored",[177,2378,515],{"class":187},[138,2380,2381,2382,2384,2385,2388,2389,2391,2392,2384,2395,2398,2399,2402],{},"The keys mirror the encoder and decoder strategies: ",[142,2383,2021],{}," and ",[142,2386,2387],{},"pj"," are the clone and mutate prepares, ",[142,2390,2030],{}," is the restore, ",[142,2393,2394],{},"cj",[142,2396,2397],{},"cjr"," are the compact encode and decode, and ",[142,2400,2401],{},"sj"," is the single-pass stringify. This is what a framework reaches for when it owns its own JSON envelope: parse one request body once and restore each value, prepare each value and stringify one response once, with no extra string round-trip in between.",[147,2404,2406],{"id":2405},"rebuilding-a-storage-key-from-a-type-id","Rebuilding a storage key from a type id",[138,2408,2409,2410,2412,2413,2416],{},"The two ways above hand you a function through an injected marker. A framework sometimes needs the other direction: it already knows a type's id (from ",[142,2411,1151],{},") and wants the storage key for one of that type's functions, without a call site to inject a handle. ",[142,2414,2415],{},"getFnHash"," gives you the function half of that key for a family, and you join it with the type id yourself.",[168,2418,2420],{"className":170,"code":2419,"language":172,"meta":173,"style":173},"import {getFnHash, getRunTypeId} from '@ts-runtypes\u002Fcore';\n\n\u002F\u002F Every generated function is stored under a key with two parts: a short id for\n\u002F\u002F the FUNCTION (which family it belongs to, plus any compile-time options) and\n\u002F\u002F the id for the TYPE it works on, joined as `functionId_typeId`. A framework\n\u002F\u002F that already holds a type's id can rebuild that key itself with getFnHash. The\n\u002F\u002F ids getFnHash returns are stable across releases.\n\n\u002F\u002F The function id for the default validator.\nconst validateId = getFnHash('val');\n\n\u002F\u002F Options that change the generated function change its id too, and getFnHash\n\u002F\u002F follows them: a validator that skips literal checks is a different function.\nconst looseValidateId = getFnHash('val', {noLiterals: true});\n\n\u002F\u002F The JSON encoder has several strategies, and each one is its own function.\nconst encodeMutateId = getFnHash('jsonEncoder', {strategy: 'mutate'});\n\n\u002F\u002F Join the function id with a type id to get the full storage key. The type id\n\u002F\u002F is the same value getRunTypeId returns for that type.\ntype User = {id: number; name: string};\nconst userTypeId = getRunTypeId\u003CUser>();\nconst userValidatorKey = `${validateId}_${userTypeId}`;\n\nexport {validateId, looseValidateId, encodeMutateId, userValidatorKey};\n",[142,2421,2422,2447,2451,2456,2461,2466,2471,2476,2480,2485,2510,2514,2519,2524,2559,2563,2568,2608,2612,2617,2622,2648,2669,2699,2703],{"__ignoreMap":173},[177,2423,2424,2426,2428,2430,2432,2435,2437,2439,2441,2443,2445],{"class":179,"line":180},[177,2425,437],{"class":436},[177,2427,440],{"class":187},[177,2429,2415],{"class":183},[177,2431,200],{"class":187},[177,2433,2434],{"class":183}," getRunTypeId",[177,2436,451],{"class":187},[177,2438,454],{"class":436},[177,2440,457],{"class":187},[177,2442,461],{"class":460},[177,2444,464],{"class":187},[177,2446,467],{"class":187},[177,2448,2449],{"class":179,"line":470},[177,2450,474],{"emptyLinePlaceholder":473},[177,2452,2453],{"class":179,"line":477},[177,2454,2455],{"class":526},"\u002F\u002F Every generated function is stored under a key with two parts: a short id for\n",[177,2457,2458],{"class":179,"line":518},[177,2459,2460],{"class":526},"\u002F\u002F the FUNCTION (which family it belongs to, plus any compile-time options) and\n",[177,2462,2463],{"class":179,"line":523},[177,2464,2465],{"class":526},"\u002F\u002F the id for the TYPE it works on, joined as `functionId_typeId`. A framework\n",[177,2467,2468],{"class":179,"line":530},[177,2469,2470],{"class":526},"\u002F\u002F that already holds a type's id can rebuild that key itself with getFnHash. The\n",[177,2472,2473],{"class":179,"line":536},[177,2474,2475],{"class":526},"\u002F\u002F ids getFnHash returns are stable across releases.\n",[177,2477,2478],{"class":179,"line":583},[177,2479,474],{"emptyLinePlaceholder":473},[177,2481,2482],{"class":179,"line":624},[177,2483,2484],{"class":526},"\u002F\u002F The function id for the default validator.\n",[177,2486,2487,2489,2492,2494,2497,2499,2501,2504,2506,2508],{"class":179,"line":629},[177,2488,273],{"class":480},[177,2490,2491],{"class":183}," validateId ",[177,2493,544],{"class":187},[177,2495,2496],{"class":547}," getFnHash",[177,2498,559],{"class":183},[177,2500,464],{"class":187},[177,2502,2503],{"class":460},"val",[177,2505,464],{"class":187},[177,2507,578],{"class":183},[177,2509,467],{"class":187},[177,2511,2512],{"class":179,"line":635},[177,2513,474],{"emptyLinePlaceholder":473},[177,2515,2516],{"class":179,"line":641},[177,2517,2518],{"class":526},"\u002F\u002F Options that change the generated function change its id too, and getFnHash\n",[177,2520,2521],{"class":179,"line":676},[177,2522,2523],{"class":526},"\u002F\u002F follows them: a validator that skips literal checks is a different function.\n",[177,2525,2526,2528,2531,2533,2535,2537,2539,2541,2543,2545,2547,2549,2551,2553,2555,2557],{"class":179,"line":706},[177,2527,273],{"class":480},[177,2529,2530],{"class":183}," looseValidateId ",[177,2532,544],{"class":187},[177,2534,2496],{"class":547},[177,2536,559],{"class":183},[177,2538,464],{"class":187},[177,2540,2503],{"class":460},[177,2542,464],{"class":187},[177,2544,200],{"class":187},[177,2546,440],{"class":187},[177,2548,567],{"class":492},[177,2550,258],{"class":187},[177,2552,573],{"class":572},[177,2554,451],{"class":187},[177,2556,578],{"class":183},[177,2558,467],{"class":187},[177,2560,2561],{"class":179,"line":711},[177,2562,474],{"emptyLinePlaceholder":473},[177,2564,2565],{"class":179,"line":1075},[177,2566,2567],{"class":526},"\u002F\u002F The JSON encoder has several strategies, and each one is its own function.\n",[177,2569,2570,2572,2575,2577,2579,2581,2583,2585,2587,2589,2591,2593,2595,2597,2600,2602,2604,2606],{"class":179,"line":1107},[177,2571,273],{"class":480},[177,2573,2574],{"class":183}," encodeMutateId ",[177,2576,544],{"class":187},[177,2578,2496],{"class":547},[177,2580,559],{"class":183},[177,2582,464],{"class":187},[177,2584,1650],{"class":460},[177,2586,464],{"class":187},[177,2588,200],{"class":187},[177,2590,440],{"class":187},[177,2592,422],{"class":492},[177,2594,258],{"class":187},[177,2596,457],{"class":187},[177,2598,2599],{"class":460},"mutate",[177,2601,464],{"class":187},[177,2603,451],{"class":187},[177,2605,578],{"class":183},[177,2607,467],{"class":187},[177,2609,2610],{"class":179,"line":1126},[177,2611,474],{"emptyLinePlaceholder":473},[177,2613,2614],{"class":179,"line":1131},[177,2615,2616],{"class":526},"\u002F\u002F Join the function id with a type id to get the full storage key. The type id\n",[177,2618,2619],{"class":179,"line":1866},[177,2620,2621],{"class":526},"\u002F\u002F is the same value getRunTypeId returns for that type.\n",[177,2623,2624,2626,2628,2630,2632,2634,2636,2638,2640,2642,2644,2646],{"class":179,"line":2176},[177,2625,481],{"class":480},[177,2627,1370],{"class":254},[177,2629,487],{"class":187},[177,2631,440],{"class":187},[177,2633,184],{"class":492},[177,2635,258],{"class":187},[177,2637,1088],{"class":254},[177,2639,798],{"class":187},[177,2641,1093],{"class":492},[177,2643,258],{"class":187},[177,2645,962],{"class":254},[177,2647,515],{"class":187},[177,2649,2650,2652,2655,2657,2659,2661,2663,2665,2667],{"class":179,"line":2182},[177,2651,273],{"class":480},[177,2653,2654],{"class":183}," userTypeId ",[177,2656,544],{"class":187},[177,2658,2434],{"class":547},[177,2660,194],{"class":187},[177,2662,819],{"class":254},[177,2664,556],{"class":187},[177,2666,657],{"class":183},[177,2668,467],{"class":187},[177,2670,2671,2673,2676,2678,2681,2684,2686,2689,2691,2694,2697],{"class":179,"line":2188},[177,2672,273],{"class":480},[177,2674,2675],{"class":183}," userValidatorKey ",[177,2677,544],{"class":187},[177,2679,2680],{"class":187}," `${",[177,2682,2683],{"class":183},"validateId",[177,2685,451],{"class":187},[177,2687,2688],{"class":460},"_",[177,2690,1029],{"class":187},[177,2692,2693],{"class":183},"userTypeId",[177,2695,2696],{"class":187},"}`",[177,2698,467],{"class":187},[177,2700,2701],{"class":179,"line":2211},[177,2702,474],{"emptyLinePlaceholder":473},[177,2704,2705,2707,2709,2711,2713,2716,2718,2721,2723,2726],{"class":179,"line":2216},[177,2706,714],{"class":436},[177,2708,440],{"class":187},[177,2710,2683],{"class":183},[177,2712,200],{"class":187},[177,2714,2715],{"class":183}," looseValidateId",[177,2717,200],{"class":187},[177,2719,2720],{"class":183}," encodeMutateId",[177,2722,200],{"class":187},[177,2724,2725],{"class":183}," userValidatorKey",[177,2727,515],{"class":187},[138,2729,2730,2731,2384,2734,2737],{},"The value it returns is stable across releases, so it stays valid when you upgrade. It also follows compile-time options, so ",[142,2732,2733],{},"getFnHash('val', {noLiterals: true})",[142,2735,2736],{},"getFnHash('jsonEncoder', {strategy: 'mutate'})"," return the ids for those specific variants, not just for the family.",[2739,2740,2741],"style",{},"html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}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 .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 .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}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 .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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}","The compile-time markers that tell RunTypes what to generate and inject.","md",null,{"toc":26},{"title":58,"description":2742},"-2spO9tRkFTHTgo398BcqukDkzKfmoD3TgboFtKJBLM",[2749,2751],{"title":54,"path":55,"stem":56,"description":2750,"children":-1},"Generate valid or invalid type-shaped fake data for tests and fixtures.",{"title":62,"path":63,"stem":64,"description":2752,"children":-1},"Extend RunTypes with pure inline helpers and your own formats and mock generators.",1785369665015]