[{"data":1,"prerenderedAt":325},["ShallowReactive",2],{"page:\u002Fblog\u002Fv4":3},{"id":4,"title":5,"body":6,"description":307,"extension":308,"frontmatter":309,"heading":314,"meta":315,"navigation":316,"order":317,"path":318,"seo":319,"sitemap":320,"source":321,"stem":322,"__hash__":323,"hasPopups":324},"site\u002Fblog\u002Fv4.md","Release of Kubb 4.0",{"type":7,"value":8,"toc":295},"minimark",[9,13,18,28,37,101,112,287],[10,11,12],"p",{},"Kubb v4 sharpens type safety, schema generation, and query handling. Here is what changed.",[14,15,17],"h2",{"id":16},"breaking-changes","Breaking changes",[19,20,21,25],"ul",{},[22,23,24],"li",{},"Correct use of Infinite Query generics with Tanstack-Query",[22,26,27],{},"Unwrap in Vue infinite query",[29,30,32,33],"h3",{"id":31},"different-use-of-zoptional","Different use of ",[34,35,36],"code",{},"z.optional",[38,39,40,77],"code-group",{},[41,42,47],"pre",{"language":43,"filename":44,"code":45,"class":46},"typescript","Before","z.number().int().optional()","shiki shiki-themes github-light github-dark dark:github-dark",[34,48,50],{"class":49},"language-typescript",[51,52,55,59,63,66,69,71,74],"span",{"class":53,"style":54},"line","display: inline",[51,56,58],{"style":57},"color:#24292E;--shiki-dark:#E1E4E8","z.",[51,60,62],{"style":61},"color:#6F42C1;--shiki-dark:#B392F0","number",[51,64,65],{"style":57},"().",[51,67,68],{"style":61},"int",[51,70,65],{"style":57},[51,72,73],{"style":61},"optional",[51,75,76],{"style":57},"()",[41,78,81],{"language":43,"filename":79,"code":80,"class":46},"After","z.optional(z.number().int())",[34,82,83],{"class":49},[51,84,85,87,89,92,94,96,98],{"class":53,"style":54},[51,86,58],{"style":57},[51,88,73],{"style":61},[51,90,91],{"style":57},"(z.",[51,93,62],{"style":61},[51,95,65],{"style":57},[51,97,68],{"style":61},[51,99,100],{"style":57},"())",[29,102,104,105,108,109],{"id":103},"add-key-suffix-to-types-when-using-asconst","Add ",[34,106,107],{},"Key"," suffix to types when using ",[34,110,111],{},"asConst",[38,113,114,213],{},[41,115,117],{"language":43,"filename":44,"code":116,"class":46},"export const findPetsByStatusQueryParamsStatusEnum = {\n  available: 'available',\n  pending: 'pending',\n  sold: 'sold',\n} as const\n\nexport type FindPetsByStatusQueryParamsStatusEnum = (typeof findPetsByStatusQueryParamsStatusEnum)[keyof typeof findPetsByStatusQueryParamsStatusEnum]",[34,118,119,138,139,138,151,138,161,138,171,138,181,138,183],{"class":49},[51,120,121,125,128,132,135],{"class":53,"style":54},[51,122,124],{"style":123},"color:#D73A49;--shiki-dark:#F97583","export",[51,126,127],{"style":123}," const",[51,129,131],{"style":130},"color:#005CC5;--shiki-dark:#79B8FF"," findPetsByStatusQueryParamsStatusEnum",[51,133,134],{"style":123}," =",[51,136,137],{"style":57}," {","\n",[51,140,141,144,148],{"class":53,"style":54},[51,142,143],{"style":57},"  available: ",[51,145,147],{"style":146},"color:#032F62;--shiki-dark:#9ECBFF","'available'",[51,149,150],{"style":57},",",[51,152,153,156,159],{"class":53,"style":54},[51,154,155],{"style":57},"  pending: ",[51,157,158],{"style":146},"'pending'",[51,160,150],{"style":57},[51,162,163,166,169],{"class":53,"style":54},[51,164,165],{"style":57},"  sold: ",[51,167,168],{"style":146},"'sold'",[51,170,150],{"style":57},[51,172,173,176,179],{"class":53,"style":54},[51,174,175],{"style":57},"} ",[51,177,178],{"style":123},"as",[51,180,127],{"style":123},[51,182],{"class":53,"style":54},[51,184,185,187,190,193,195,198,201,204,207,210],{"class":53,"style":54},[51,186,124],{"style":123},[51,188,189],{"style":123}," type",[51,191,192],{"style":61}," FindPetsByStatusQueryParamsStatusEnum",[51,194,134],{"style":123},[51,196,197],{"style":57}," (",[51,199,200],{"style":123},"typeof",[51,202,203],{"style":57}," findPetsByStatusQueryParamsStatusEnum)[",[51,205,206],{"style":123},"keyof",[51,208,209],{"style":123}," typeof",[51,211,212],{"style":57}," findPetsByStatusQueryParamsStatusEnum]",[41,214,216],{"language":43,"filename":79,"code":215,"class":46},"export const findPetsByStatusQueryParamsStatusEnum = {\n  available: 'available',\n  pending: 'pending',\n  sold: 'sold',\n} as const\n\nexport type FindPetsByStatusQueryParamsStatusEnumKey = (typeof findPetsByStatusQueryParamsStatusEnum)[keyof typeof findPetsByStatusQueryParamsStatusEnum]",[34,217,218,138,230,138,238,138,246,138,254,138,262,138,264],{"class":49},[51,219,220,222,224,226,228],{"class":53,"style":54},[51,221,124],{"style":123},[51,223,127],{"style":123},[51,225,131],{"style":130},[51,227,134],{"style":123},[51,229,137],{"style":57},[51,231,232,234,236],{"class":53,"style":54},[51,233,143],{"style":57},[51,235,147],{"style":146},[51,237,150],{"style":57},[51,239,240,242,244],{"class":53,"style":54},[51,241,155],{"style":57},[51,243,158],{"style":146},[51,245,150],{"style":57},[51,247,248,250,252],{"class":53,"style":54},[51,249,165],{"style":57},[51,251,168],{"style":146},[51,253,150],{"style":57},[51,255,256,258,260],{"class":53,"style":54},[51,257,175],{"style":57},[51,259,178],{"style":123},[51,261,127],{"style":123},[51,263],{"class":53,"style":54},[51,265,266,268,270,273,275,277,279,281,283,285],{"class":53,"style":54},[51,267,124],{"style":123},[51,269,189],{"style":123},[51,271,272],{"style":61}," FindPetsByStatusQueryParamsStatusEnumKey",[51,274,134],{"style":123},[51,276,197],{"style":57},[51,278,200],{"style":123},[51,280,203],{"style":57},[51,282,206],{"style":123},[51,284,209],{"style":123},[51,286,212],{"style":57},[10,288,289,290],{},"👋🏽 ",[291,292,294],"a",{"href":293},"https:\u002F\u002Ftwitter.com\u002Fstijnvanhulle","Stijn Van Hulle",{"title":296,"searchDepth":297,"depth":297,"links":298},"",5,[299],{"id":16,"depth":300,"text":17,"children":301},2,[302,305],{"id":31,"depth":303,"text":304},3,"Different use of z.optional",{"id":103,"depth":303,"text":306},"Add Key suffix to types when using asConst","Release notes for Kubb 4.0 covering new features, breaking changes and upgrade instructions.","md",{"layout":310,"title":5,"description":307,"outline":311,"image":312,"date":313},"doc","deep","\u002Fblog\u002Fv4\u002Fcover.svg","2025-09-22","Introducing Kubb v4",{"layout":310,"outline":311,"image":312,"date":313},true,null,"\u002Fblog\u002Fv4",{"title":5,"description":307},{"loc":318,"lastmod":313},"platform\u002Fapps\u002Fkubb.dev\u002Fcontent\u002Fblog\u002Fv4.md","blog\u002Fv4","wUW66Q0W24fejpqzjWsFXQXEoC-0dDgPi8J2pFn5ZBY",false,1792276901738]