[{"data":1,"prerenderedAt":301},["ShallowReactive",2],{"navigation_docs":3,"diagnostic-content-TS0011":48},[4,8,12,16,20,24,28,32,36,40,44],{"title":5,"path":6,"stem":7},"CLI","\u002Fcli","1.cli",{"title":9,"path":10,"stem":11},"Nuxt","\u002Fnuxt","2.nuxt",{"title":13,"path":14,"stem":15},"Vue","\u002Fvue","3.vue",{"title":17,"path":18,"stem":19},"Vite","\u002Fvite","4.vite",{"title":21,"path":22,"stem":23},"Nitro","\u002Fnitro","5.nitro",{"title":25,"path":26,"stem":27},"TypeScript","\u002Ftypescript","6.typescript",{"title":29,"path":30,"stem":31},"shadcn","\u002Fshadcn","7.shadcn",{"title":33,"path":34,"stem":35},"Package","\u002Fpackage","8.package",{"title":37,"path":38,"stem":39},"Extending Doctor","\u002Fextending","9.extending",{"title":41,"path":42,"stem":43},"MCP","\u002Fmcp","9.mcp",{"title":45,"path":46,"stem":47},"Pinia","\u002Fpinia","9.pinia",{"id":49,"title":50,"body":51,"category":57,"code":290,"description":291,"docsUrl":58,"extension":292,"fix":86,"framework":293,"meta":294,"navigation":295,"pack":60,"path":296,"ruleId":61,"rulePath":62,"seo":297,"severity":63,"source":64,"sourceUrl":65,"stem":298,"why":299,"__hash__":300},"diagnostics\u002Fdiagnostics\u002FTS0011.md","TS0011: Preserve known values in local declarations",{"type":52,"value":53,"toc":278},"minimark",[54,66,71,80,84,87,91,96,99,162,165,208,212,215,246,250,262,266,274],[55,56],"rule-metadata",{"category":57,"docsUrl":58,"fix":59,"pack":60,"ruleId":61,"rulePath":62,"severity":63,"source":64,"sourceUrl":65},"evidence","https:\u002F\u002Fgithub.com\u002Fdmmulroy\u002Fanti-slop\u002Ftree\u002Fc44ef22ca116d0ba62a3ff663a0bd13a3f3fa40b#rules","structural-review","vite-doctor\u002Ftypescript","typescript\u002Fevidence\u002Fno-known-value-widening","\u002Ftypescript\u002Frules\u002Fevidence\u002Fno-known-value-widening","warn","src\u002Frule-packs\u002Ftypescript\u002Frules\u002Fno-known-value-widening.ts","https:\u002F\u002Fgithub.com\u002Fonmax\u002Fvite-doctor\u002Fblob\u002Fmain\u002Fsrc\u002Frule-packs\u002Ftypescript\u002Frules\u002Fno-known-value-widening.ts",[67,68,70],"h2",{"id":69},"why-it-happens","Why it happens",[72,73,74,75,79],"p",{},"Broad annotations can discard useful evidence from an initializer. This rule checks local variable annotations with direct syntax evidence and open Record annotations on nonempty object literals. It allows empty dictionary accumulators, finite-key Records, and bindings that rely on the declared type: exported or ",[76,77,78],"code",{},"let"," bindings, member writes or deletes, and reads with a runtime or undeclared key. It does not infer imported types, calls, or generic aliases.",[67,81,83],{"id":82},"fix","Fix",[72,85,86],{},"Keep inference, or use satisfies to check a contract while preserving the inferred type.",[67,88,90],{"id":89},"example","Example",[92,93,95],"h3",{"id":94},"preserve-known-values-in-local-declarations","Preserve known values in local declarations",[72,97,98],{},"Before",[100,101,106],"pre",{"className":102,"code":103,"language":104,"meta":105,"style":105},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const handlers: Record\u003Cstring, Handler> = { start: startHandler }\n","ts","",[76,107,108],{"__ignoreMap":105},[109,110,113,117,121,125,129,132,135,138,141,144,147,150,154,156,159],"span",{"class":111,"line":112},"line",1,[109,114,116],{"class":115},"spNyl","const",[109,118,120],{"class":119},"sTEyZ"," handlers",[109,122,124],{"class":123},"sMK4o",":",[109,126,128],{"class":127},"sBMFI"," Record",[109,130,131],{"class":123},"\u003C",[109,133,134],{"class":127},"string",[109,136,137],{"class":123},",",[109,139,140],{"class":127}," Handler",[109,142,143],{"class":123},">",[109,145,146],{"class":123}," =",[109,148,149],{"class":123}," {",[109,151,153],{"class":152},"swJcz"," start",[109,155,124],{"class":123},[109,157,158],{"class":119}," startHandler ",[109,160,161],{"class":123},"}\n",[72,163,164],{},"After",[100,166,168],{"className":102,"code":167,"language":104,"meta":105,"style":105},"const handlers = { start: startHandler } satisfies Record\u003Cstring, Handler>\n",[76,169,170],{"__ignoreMap":105},[109,171,172,174,177,180,182,184,186,188,191,195,197,199,201,203,205],{"class":111,"line":112},[109,173,116],{"class":115},[109,175,176],{"class":119}," handlers ",[109,178,179],{"class":123},"=",[109,181,149],{"class":123},[109,183,153],{"class":152},[109,185,124],{"class":123},[109,187,158],{"class":119},[109,189,190],{"class":123},"}",[109,192,194],{"class":193},"s7zQu"," satisfies",[109,196,128],{"class":127},[109,198,131],{"class":123},[109,200,134],{"class":127},[109,202,137],{"class":123},[109,204,140],{"class":127},[109,206,207],{"class":123},">\n",[67,209,211],{"id":210},"verify-the-fix","Verify the fix",[72,213,214],{},"Run only this rule after editing so the report stays focused on the diagnostic you are closing:",[100,216,220],{"className":217,"code":218,"language":219,"meta":105,"style":105},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm vite-doctor . --extends auto,typescript\u002Fstrict --rules typescript\u002Fevidence\u002Fno-known-value-widening\n","bash",[76,221,222],{"__ignoreMap":105},[109,223,224,227,231,234,237,240,243],{"class":111,"line":112},[109,225,226],{"class":127},"pnpm",[109,228,230],{"class":229},"sfazB"," vite-doctor",[109,232,233],{"class":229}," .",[109,235,236],{"class":229}," --extends",[109,238,239],{"class":229}," auto,typescript\u002Fstrict",[109,241,242],{"class":229}," --rules",[109,244,245],{"class":229}," typescript\u002Fevidence\u002Fno-known-value-widening\n",[67,247,249],{"id":248},"useful-links","Useful links",[251,252,253],"ul",{},[254,255,256],"li",{},[257,258,261],"a",{"href":58,"rel":259},[260],"nofollow","Upstream docs",[67,263,265],{"id":264},"related-rule","Related rule",[251,267,268],{},[254,269,270],{},[257,271,272],{"href":62},[76,273,61],{},[275,276,277],"style",{},"html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}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 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 .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}",{"title":105,"searchDepth":279,"depth":279,"links":280},2,[281,282,283,287,288,289],{"id":69,"depth":279,"text":70},{"id":82,"depth":279,"text":83},{"id":89,"depth":279,"text":90,"children":284},[285],{"id":94,"depth":286,"text":95},3,{"id":210,"depth":279,"text":211},{"id":248,"depth":279,"text":249},{"id":264,"depth":279,"text":265},"TS0011","Detect local annotations that discard known values or object keys.","md","typescript",{},true,"\u002Fdiagnostics\u002Fts0011",{"title":50,"description":291},"diagnostics\u002FTS0011","Broad annotations can discard useful evidence from an initializer. This rule checks local variable annotations with direct syntax evidence and open Record annotations on nonempty object literals. It allows empty dictionary accumulators, finite-key Records, and bindings that rely on the declared type: exported or `let` bindings, member writes or deletes, and reads with a runtime or undeclared key. It does not infer imported types, calls, or generic aliases.","x4iSj5FXq3iTCOAphgYYZuYkw5z1BuUWxcJWd1r4ksw",1795268816175]