[{"data":1,"prerenderedAt":514},["ShallowReactive",2],{"navigation_docs":3,"diagnostic-content-TS0014":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":502,"description":503,"docsUrl":58,"extension":504,"fix":505,"framework":506,"meta":507,"navigation":508,"pack":60,"path":509,"ruleId":61,"rulePath":62,"seo":510,"severity":63,"source":64,"sourceUrl":65,"stem":511,"why":512,"__hash__":513},"diagnostics\u002Fdiagnostics\u002FTS0014.md","TS0014: Do not compare prototypes of values from another realm",{"type":52,"value":53,"toc":492},"minimark",[54,66,71,88,92,103,107,112,115,294,297,423,427,430,460,464,476,480,488],[55,56],"rule-metadata",{"category":57,"docsUrl":58,"fix":59,"pack":60,"ruleId":61,"rulePath":62,"severity":63,"source":64,"sourceUrl":65},"boundaries","https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FJavaScript\u002FReference\u002FOperators\u002Finstanceof#instanceof_and_multiple_realms","structural-review","vite-doctor\u002Ftypescript","typescript\u002Fboundaries\u002Fno-cross-realm-prototype-identity","\u002Ftypescript\u002Frules\u002Fboundaries\u002Fno-cross-realm-prototype-identity","warn","src\u002Frule-packs\u002Ftypescript\u002Frules\u002Fno-cross-realm-prototype-identity.ts","https:\u002F\u002Fgithub.com\u002Fonmax\u002Fvite-doctor\u002Fblob\u002Fmain\u002Fsrc\u002Frule-packs\u002Ftypescript\u002Frules\u002Fno-cross-realm-prototype-identity.ts",[67,68,70],"h2",{"id":69},"why-it-happens","Why it happens",[72,73,74,75,79,80,83,84,87],"p",{},"Every realm has its own Object.prototype, Array.prototype and built-in constructors. A plain object or array created by the Vite module runner, workerd or miniflare, or a Vitest environment has that realm's prototype, so Object.",[76,77,78],"code",{},"getPrototypeOf(value)"," === Object.prototype or value.constructor === Array is false and the check rejects or misroutes it. This rule only reports values that crossed a boundary in this file: parameters typed unknown or any, results of calling a parameter, and module namespaces from ",[76,81,82],{},"import()"," or ",[76,85,86],{},"ssrLoadModule()",".",[67,89,91],{"id":90},"fix","Fix",[72,93,94,95,98,99,102],{},"Avoid realm identity: use Array.",[76,96,97],{},"isArray(value)"," for arrays, Object.",[76,100,101],{},"getPrototypeOf(prototype)"," === null for plain objects, or a tag shared by the implementations you support where applicable. Narrow only to the capabilities a member check verifies. If you need full class semantics, validate or normalize the value at the integration boundary.",[67,104,106],{"id":105},"example","Example",[108,109,111],"h3",{"id":110},"check-plain-objects-without-objectprototype","Check plain objects without Object.prototype",[72,113,114],{},"Before",[116,117,122],"pre",{"className":118,"code":119,"language":120,"meta":121,"style":121},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export function isPlainObject(value: unknown): value is Record\u003Cstring, unknown> {\n  if (typeof value !== 'object' || value === null) return false\n  const prototype = Object.getPrototypeOf(value)\n  return prototype === Object.prototype || prototype === null\n}\n","ts","",[76,123,124,185,235,262,288],{"__ignoreMap":121},[125,126,129,133,137,141,145,149,152,156,159,162,165,168,171,174,177,179,182],"span",{"class":127,"line":128},"line",1,[125,130,132],{"class":131},"s7zQu","export",[125,134,136],{"class":135},"spNyl"," function",[125,138,140],{"class":139},"s2Zo4"," isPlainObject",[125,142,144],{"class":143},"sMK4o","(",[125,146,148],{"class":147},"sHdIc","value",[125,150,151],{"class":143},":",[125,153,155],{"class":154},"sBMFI"," unknown",[125,157,158],{"class":143},"):",[125,160,161],{"class":147}," value",[125,163,164],{"class":143}," is",[125,166,167],{"class":154}," Record",[125,169,170],{"class":143},"\u003C",[125,172,173],{"class":154},"string",[125,175,176],{"class":143},",",[125,178,155],{"class":154},[125,180,181],{"class":143},">",[125,183,184],{"class":143}," {\n",[125,186,188,191,195,198,201,204,207,211,214,217,219,222,225,228,231],{"class":127,"line":187},2,[125,189,190],{"class":131},"  if",[125,192,194],{"class":193},"swJcz"," (",[125,196,197],{"class":143},"typeof",[125,199,161],{"class":200},"sTEyZ",[125,202,203],{"class":143}," !==",[125,205,206],{"class":143}," '",[125,208,210],{"class":209},"sfazB","object",[125,212,213],{"class":143},"'",[125,215,216],{"class":143}," ||",[125,218,161],{"class":200},[125,220,221],{"class":143}," ===",[125,223,224],{"class":143}," null",[125,226,227],{"class":193},") ",[125,229,230],{"class":131},"return",[125,232,234],{"class":233},"sfNiH"," false\n",[125,236,238,241,244,247,250,252,255,257,259],{"class":127,"line":237},3,[125,239,240],{"class":135},"  const",[125,242,243],{"class":200}," prototype",[125,245,246],{"class":143}," =",[125,248,249],{"class":200}," Object",[125,251,87],{"class":143},[125,253,254],{"class":139},"getPrototypeOf",[125,256,144],{"class":193},[125,258,148],{"class":200},[125,260,261],{"class":193},")\n",[125,263,265,268,270,272,274,276,279,281,283,285],{"class":127,"line":264},4,[125,266,267],{"class":131},"  return",[125,269,243],{"class":200},[125,271,221],{"class":143},[125,273,249],{"class":154},[125,275,87],{"class":143},[125,277,278],{"class":200},"prototype",[125,280,216],{"class":143},[125,282,243],{"class":200},[125,284,221],{"class":143},[125,286,287],{"class":143}," null\n",[125,289,291],{"class":127,"line":290},5,[125,292,293],{"class":143},"}\n",[72,295,296],{},"After",[116,298,300],{"className":118,"code":299,"language":120,"meta":121,"style":121},"export function isPlainObject(value: unknown): value is Record\u003Cstring, unknown> {\n  if (typeof value !== 'object' || value === null) return false\n  const prototype = Object.getPrototypeOf(value)\n  return prototype === null || Object.getPrototypeOf(prototype) === null\n}\n",[76,301,302,338,370,390,419],{"__ignoreMap":121},[125,303,304,306,308,310,312,314,316,318,320,322,324,326,328,330,332,334,336],{"class":127,"line":128},[125,305,132],{"class":131},[125,307,136],{"class":135},[125,309,140],{"class":139},[125,311,144],{"class":143},[125,313,148],{"class":147},[125,315,151],{"class":143},[125,317,155],{"class":154},[125,319,158],{"class":143},[125,321,161],{"class":147},[125,323,164],{"class":143},[125,325,167],{"class":154},[125,327,170],{"class":143},[125,329,173],{"class":154},[125,331,176],{"class":143},[125,333,155],{"class":154},[125,335,181],{"class":143},[125,337,184],{"class":143},[125,339,340,342,344,346,348,350,352,354,356,358,360,362,364,366,368],{"class":127,"line":187},[125,341,190],{"class":131},[125,343,194],{"class":193},[125,345,197],{"class":143},[125,347,161],{"class":200},[125,349,203],{"class":143},[125,351,206],{"class":143},[125,353,210],{"class":209},[125,355,213],{"class":143},[125,357,216],{"class":143},[125,359,161],{"class":200},[125,361,221],{"class":143},[125,363,224],{"class":143},[125,365,227],{"class":193},[125,367,230],{"class":131},[125,369,234],{"class":233},[125,371,372,374,376,378,380,382,384,386,388],{"class":127,"line":237},[125,373,240],{"class":135},[125,375,243],{"class":200},[125,377,246],{"class":143},[125,379,249],{"class":200},[125,381,87],{"class":143},[125,383,254],{"class":139},[125,385,144],{"class":193},[125,387,148],{"class":200},[125,389,261],{"class":193},[125,391,392,394,396,398,400,402,404,406,408,410,412,414,417],{"class":127,"line":264},[125,393,267],{"class":131},[125,395,243],{"class":200},[125,397,221],{"class":143},[125,399,224],{"class":143},[125,401,216],{"class":143},[125,403,249],{"class":200},[125,405,87],{"class":143},[125,407,254],{"class":139},[125,409,144],{"class":193},[125,411,278],{"class":200},[125,413,227],{"class":193},[125,415,416],{"class":143},"===",[125,418,287],{"class":143},[125,420,421],{"class":127,"line":290},[125,422,293],{"class":143},[67,424,426],{"id":425},"verify-the-fix","Verify the fix",[72,428,429],{},"Run only this rule after editing so the report stays focused on the diagnostic you are closing:",[116,431,435],{"className":432,"code":433,"language":434,"meta":121,"style":121},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm vite-doctor . --extends auto,typescript\u002Fstrict --rules typescript\u002Fboundaries\u002Fno-cross-realm-prototype-identity\n","bash",[76,436,437],{"__ignoreMap":121},[125,438,439,442,445,448,451,454,457],{"class":127,"line":128},[125,440,441],{"class":154},"pnpm",[125,443,444],{"class":209}," vite-doctor",[125,446,447],{"class":209}," .",[125,449,450],{"class":209}," --extends",[125,452,453],{"class":209}," auto,typescript\u002Fstrict",[125,455,456],{"class":209}," --rules",[125,458,459],{"class":209}," typescript\u002Fboundaries\u002Fno-cross-realm-prototype-identity\n",[67,461,463],{"id":462},"useful-links","Useful links",[465,466,467],"ul",{},[468,469,470],"li",{},[471,472,475],"a",{"href":58,"rel":473},[474],"nofollow","Upstream docs",[67,477,479],{"id":478},"related-rule","Related rule",[465,481,482],{},[468,483,484],{},[471,485,486],{"href":62},[76,487,61],{},[489,490,491],"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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}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}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 .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 .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}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);}",{"title":121,"searchDepth":187,"depth":187,"links":493},[494,495,496,499,500,501],{"id":69,"depth":187,"text":70},{"id":90,"depth":187,"text":91},{"id":105,"depth":187,"text":106,"children":497},[498],{"id":110,"depth":237,"text":111},{"id":425,"depth":187,"text":426},{"id":462,"depth":187,"text":463},{"id":478,"depth":187,"text":479},"TS0014","Report prototype and constructor identity checks against built-in classes on values that may come from another JavaScript realm.","md","Avoid realm identity: use Array.isArray(value) for arrays, Object.getPrototypeOf(prototype) === null for plain objects, or a tag shared by the implementations you support where applicable. Narrow only to the capabilities a member check verifies. If you need full class semantics, validate or normalize the value at the integration boundary.","typescript",{},true,"\u002Fdiagnostics\u002Fts0014",{"title":50,"description":503},"diagnostics\u002FTS0014","Every realm has its own Object.prototype, Array.prototype and built-in constructors. A plain object or array created by the Vite module runner, workerd or miniflare, or a Vitest environment has that realm's prototype, so Object.getPrototypeOf(value) === Object.prototype or value.constructor === Array is false and the check rejects or misroutes it. This rule only reports values that crossed a boundary in this file: parameters typed unknown or any, results of calling a parameter, and module namespaces from import() or ssrLoadModule().","cUgD_fuKwyEBLeWRXqE-gmI3o-PLH_6-57J7Yz2aeIQ",1795268815934]