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