From 5e27ce4ac25a88ebb73f2102d6b49d247a53ad28 Mon Sep 17 00:00:00 2001 From: Ashish Bhatia Date: Tue, 7 Mar 2023 01:26:03 -0800 Subject: [PATCH] Update typescript-support.md Replace ```ts import { InjectionKey } from 'vue' ``` with ```ts import type { InjectionKey } from 'vue' ``` As the types should now be explicitly imported as type-only imports --- docs/guide/typescript-support.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/typescript-support.md b/docs/guide/typescript-support.md index 9f86dbdc9..a4127a799 100644 --- a/docs/guide/typescript-support.md +++ b/docs/guide/typescript-support.md @@ -39,7 +39,7 @@ Let's tackle this step by step. First, define the key using Vue's `InjectionKey` ```ts // store.ts -import { InjectionKey } from 'vue' +import type { InjectionKey } from 'vue' import { createStore, Store } from 'vuex' // define your typings for the store state @@ -96,7 +96,7 @@ Having to import `InjectionKey` and passing it to `useStore` everywhere it's use ```ts // store.ts -import { InjectionKey } from 'vue' +import type { InjectionKey } from 'vue' import { createStore, useStore as baseUseStore, Store } from 'vuex' export interface State {