]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
types: add exported types
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 9 Jul 2021 19:38:20 +0000 (21:38 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Mon, 19 Jul 2021 09:51:12 +0000 (11:51 +0200)
src/index.ts
test-dts/customizations.test-d.ts
test-dts/plugins.test-d.ts

index b691321507cddfd110a23d3c78fc13a2c3b594b0..d4ece6c25f8fbdcd2a5cbf371a850f97f37a9709 100644 (file)
@@ -26,6 +26,8 @@ export type {
   PiniaCustomProperties,
   PiniaCustomStateProperties,
   DefineStoreOptions,
+  DefineSetupStoreOptions,
+  DefineStoreOptionsInPlugin,
 } from './types'
 export { MutationType } from './types'
 
index 54f91b2799b2a872dc6b245db11c8e9829d8b7e5..4bf4460bdd4d39becce7e831efe85e208c1067fc 100644 (file)
@@ -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<string>(context.options.id)
+  expectType<ActionsTree>(context.options.actions)
   expectType<string>(context.store.$id)
   expectType<App>(context.app)
 
index 7d99bb47320c1714cb8919592106d1de5a35d9c2..ddf688810aa59b5ef584c1b9f9ae83354dc66eef 100644 (file)
@@ -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>(pinia)
   expectType<App>(app)
   expectType<
-    DefineStoreOptions<
+    DefineStoreOptionsInPlugin<
       string,
       StateTree,
       Record<string, any>,