From 0c51f180f43328f5b0d753ae01d857f21ab6880b Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Fri, 9 Jul 2021 21:38:20 +0200 Subject: [PATCH] types: add exported types --- src/index.ts | 2 ++ test-dts/customizations.test-d.ts | 10 ++++++++-- test-dts/plugins.test-d.ts | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index b6913215..d4ece6c2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -26,6 +26,8 @@ export type { PiniaCustomProperties, PiniaCustomStateProperties, DefineStoreOptions, + DefineSetupStoreOptions, + DefineStoreOptionsInPlugin, } from './types' export { MutationType } from './types' diff --git a/test-dts/customizations.test-d.ts b/test-dts/customizations.test-d.ts index 54f91b27..4bf4460b 100644 --- a/test-dts/customizations.test-d.ts +++ b/test-dts/customizations.test-d.ts @@ -1,4 +1,10 @@ -import { expectType, createPinia, defineStore, mapStores } from './' +import { + expectType, + createPinia, + defineStore, + mapStores, + ActionsTree, +} from './' import { App } from 'vue' declare module '../dist/pinia' { @@ -27,7 +33,7 @@ declare module '../dist/pinia' { const pinia = createPinia() pinia.use((context) => { - expectType(context.options.id) + expectType(context.options.actions) expectType(context.store.$id) expectType(context.app) diff --git a/test-dts/plugins.test-d.ts b/test-dts/plugins.test-d.ts index 7d99bb47..ddf68881 100644 --- a/test-dts/plugins.test-d.ts +++ b/test-dts/plugins.test-d.ts @@ -5,7 +5,7 @@ import { Store, Pinia, StateTree, - DefineStoreOptions, + DefineStoreOptionsInPlugin, } from './' const pinia = createPinia() @@ -15,7 +15,7 @@ pinia.use(({ store, app, options, pinia }) => { expectType(pinia) expectType(app) expectType< - DefineStoreOptions< + DefineStoreOptionsInPlugin< string, StateTree, Record, -- 2.47.2