[{"data":1,"prerenderedAt":284},["Reactive",2],{"category-data-vuex":3},[4],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"date":11,"image":12,"alt":9,"ogImage":12,"tags":13,"published":16,"body":17,"_type":278,"_id":279,"_source":280,"_file":281,"_extension":282,"sitemap":283},"/blogs/how-to-fix-vuex-type-issue","blogs",false,"","How to fix vuex type issue","In recent vue project we see that vuex type not working properly. We will fix that type issue and make vuex type workable","9th June 2024","/blogs-img/blog6.jpg",[14,15],"vue","vuex",true,{"type":18,"children":19,"toc":274},"root",[20,29,35,41,65,260,268],{"type":21,"tag":22,"props":23,"children":25},"element","h3",{"id":24},"introduction",[26],{"type":27,"value":28},"text","Introduction",{"type":21,"tag":30,"props":31,"children":32},"p",{},[33],{"type":27,"value":34},"In recent version of our vue project, when we try to add vuex we see type error and vuex type not found. We can easily fix that issue.",{"type":21,"tag":22,"props":36,"children":38},{"id":37},"how-to-fix-that-issue",[39],{"type":27,"value":40},"How to fix that issue",{"type":21,"tag":42,"props":43,"children":44},"ol",{},[45,60],{"type":21,"tag":46,"props":47,"children":48},"li",{},[49,51,58],{"type":27,"value":50},"Create a ",{"type":21,"tag":52,"props":53,"children":55},"code",{"className":54},[],[56],{"type":27,"value":57},"vuex.d.ts",{"type":27,"value":59}," file inside of your route project.",{"type":21,"tag":46,"props":61,"children":62},{},[63],{"type":27,"value":64},"Pase this code in that file",{"type":21,"tag":66,"props":67,"children":71},"pre",{"className":68,"code":69,"language":70,"meta":8,"style":8},"language-ts shiki shiki-themes dracula","declare module \"vuex\" {\n  export * from \"vuex/types/index.d.ts\";\n  export * from \"vuex/types/helpers.d.ts\";\n  export * from \"vuex/types/logger.d.ts\";\n  export * from \"vuex/types/vue.d.ts\";\n}\n\n","ts",[72],{"type":21,"tag":52,"props":73,"children":74},{"__ignoreMap":8},[75,114,152,185,218,251],{"type":21,"tag":76,"props":77,"children":80},"span",{"class":78,"line":79},"line",1,[81,87,92,98,103,108],{"type":21,"tag":76,"props":82,"children":84},{"style":83},"--shiki-default:#FF79C6",[85],{"type":27,"value":86},"declare",{"type":21,"tag":76,"props":88,"children":89},{"style":83},[90],{"type":27,"value":91}," module",{"type":21,"tag":76,"props":93,"children":95},{"style":94},"--shiki-default:#E9F284",[96],{"type":27,"value":97}," \"",{"type":21,"tag":76,"props":99,"children":101},{"style":100},"--shiki-default:#F1FA8C",[102],{"type":27,"value":15},{"type":21,"tag":76,"props":104,"children":105},{"style":94},[106],{"type":27,"value":107},"\"",{"type":21,"tag":76,"props":109,"children":111},{"style":110},"--shiki-default:#F8F8F2",[112],{"type":27,"value":113}," {\n",{"type":21,"tag":76,"props":115,"children":117},{"class":78,"line":116},2,[118,123,129,134,138,143,147],{"type":21,"tag":76,"props":119,"children":120},{"style":83},[121],{"type":27,"value":122},"  export",{"type":21,"tag":76,"props":124,"children":126},{"style":125},"--shiki-default:#BD93F9",[127],{"type":27,"value":128}," *",{"type":21,"tag":76,"props":130,"children":131},{"style":83},[132],{"type":27,"value":133}," from",{"type":21,"tag":76,"props":135,"children":136},{"style":94},[137],{"type":27,"value":97},{"type":21,"tag":76,"props":139,"children":140},{"style":100},[141],{"type":27,"value":142},"vuex/types/index.d.ts",{"type":21,"tag":76,"props":144,"children":145},{"style":94},[146],{"type":27,"value":107},{"type":21,"tag":76,"props":148,"children":149},{"style":110},[150],{"type":27,"value":151},";\n",{"type":21,"tag":76,"props":153,"children":155},{"class":78,"line":154},3,[156,160,164,168,172,177,181],{"type":21,"tag":76,"props":157,"children":158},{"style":83},[159],{"type":27,"value":122},{"type":21,"tag":76,"props":161,"children":162},{"style":125},[163],{"type":27,"value":128},{"type":21,"tag":76,"props":165,"children":166},{"style":83},[167],{"type":27,"value":133},{"type":21,"tag":76,"props":169,"children":170},{"style":94},[171],{"type":27,"value":97},{"type":21,"tag":76,"props":173,"children":174},{"style":100},[175],{"type":27,"value":176},"vuex/types/helpers.d.ts",{"type":21,"tag":76,"props":178,"children":179},{"style":94},[180],{"type":27,"value":107},{"type":21,"tag":76,"props":182,"children":183},{"style":110},[184],{"type":27,"value":151},{"type":21,"tag":76,"props":186,"children":188},{"class":78,"line":187},4,[189,193,197,201,205,210,214],{"type":21,"tag":76,"props":190,"children":191},{"style":83},[192],{"type":27,"value":122},{"type":21,"tag":76,"props":194,"children":195},{"style":125},[196],{"type":27,"value":128},{"type":21,"tag":76,"props":198,"children":199},{"style":83},[200],{"type":27,"value":133},{"type":21,"tag":76,"props":202,"children":203},{"style":94},[204],{"type":27,"value":97},{"type":21,"tag":76,"props":206,"children":207},{"style":100},[208],{"type":27,"value":209},"vuex/types/logger.d.ts",{"type":21,"tag":76,"props":211,"children":212},{"style":94},[213],{"type":27,"value":107},{"type":21,"tag":76,"props":215,"children":216},{"style":110},[217],{"type":27,"value":151},{"type":21,"tag":76,"props":219,"children":221},{"class":78,"line":220},5,[222,226,230,234,238,243,247],{"type":21,"tag":76,"props":223,"children":224},{"style":83},[225],{"type":27,"value":122},{"type":21,"tag":76,"props":227,"children":228},{"style":125},[229],{"type":27,"value":128},{"type":21,"tag":76,"props":231,"children":232},{"style":83},[233],{"type":27,"value":133},{"type":21,"tag":76,"props":235,"children":236},{"style":94},[237],{"type":27,"value":97},{"type":21,"tag":76,"props":239,"children":240},{"style":100},[241],{"type":27,"value":242},"vuex/types/vue.d.ts",{"type":21,"tag":76,"props":244,"children":245},{"style":94},[246],{"type":27,"value":107},{"type":21,"tag":76,"props":248,"children":249},{"style":110},[250],{"type":27,"value":151},{"type":21,"tag":76,"props":252,"children":254},{"class":78,"line":253},6,[255],{"type":21,"tag":76,"props":256,"children":257},{"style":110},[258],{"type":27,"value":259},"}\n",{"type":21,"tag":42,"props":261,"children":262},{"start":154},[263],{"type":21,"tag":46,"props":264,"children":265},{},[266],{"type":27,"value":267},"That's it. Your are ok to go.",{"type":21,"tag":269,"props":270,"children":271},"style",{},[272],{"type":27,"value":273},"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);}",{"title":8,"searchDepth":116,"depth":116,"links":275},[276,277],{"id":24,"depth":154,"text":28},{"id":37,"depth":154,"text":40},"markdown","content:blogs:6. how-to-fix-vuex-type-issue.md","content","blogs/6. how-to-fix-vuex-type-issue.md","md",{"loc":5},1718272703982]