From: Eduardo San Martin Morote Date: Fri, 7 May 2021 13:41:39 +0000 (+0200) Subject: refactor(types): use isolatedModules X-Git-Tag: v0.5.0~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42e81e3b386a63aa96e585fdc3c663b8e944d73c;p=thirdparty%2Fvuejs%2Fpinia.git refactor(types): use isolatedModules this allows using the lib directly with vite --- diff --git a/src/index.ts b/src/index.ts index c06f2da3..a4fb795e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,13 +1,9 @@ -export { - setActivePinia, - createPinia, - Pinia, - PiniaStorePlugin, - PiniaPluginContext, -} from './rootStore' +export { setActivePinia, createPinia } from './rootStore' +export type { Pinia, PiniaStorePlugin, PiniaPluginContext } from './rootStore' + export { defineStore } from './store' export { PiniaPlugin } from './plugin' -export { +export type { StateTree, Store, StoreDefinition, @@ -27,8 +23,11 @@ export { mapState, mapWritableState, mapGetters, - MapStoresCustomization, setMapStoreSuffix, +} from './mapHelpers' + +export type { + MapStoresCustomization, _MapActionsObjectReturn, _MapActionsReturn, _MapStateObjectReturn, diff --git a/tsconfig.json b/tsconfig.json index 00cb97ab..7367d68c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,5 @@ { + "include": ["src/**/*.ts", "nuxt/*.js", "__tests__/**/*.ts", "nuxt/*.d.ts'"], "compilerOptions": { "allowJs": true, "target": "esnext", @@ -7,11 +8,20 @@ "strict": true, "noImplicitThis": true, "composite": true, - "esModuleInterop": true, "moduleResolution": "node", + "skipLibCheck": true, + + "noUnusedLocals": true, + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitReturns": false, + "isolatedModules": true, + + "experimentalDecorators": true, + "resolveJsonModule": true, + "esModuleInterop": true, "rootDir": ".", "baseUrl": "." - }, - "include": ["src/**/*.ts", "nuxt/*.js", "__tests__/**/*.ts", "nuxt/*.d.ts'"] + } }