Skip to content

Commit

Permalink
refactor(types): use isolatedModules
Browse files Browse the repository at this point in the history
this allows using the lib directly with vite
  • Loading branch information
posva committed May 11, 2021
1 parent 49dc89d commit 9ca186d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
18 changes: 9 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +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 {

export type {
StateTree,
Store,
GenericStore,
Expand All @@ -26,8 +23,11 @@ export {
mapState,
mapWritableState,
mapGetters,
MapStoresCustomization,
setMapStoreSuffix,
} from './mapHelpers'

export type {
MapStoresCustomization,
_MapActionsObjectReturn,
_MapActionsReturn,
_MapStateObjectReturn,
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface StoreWithState<Id extends string, S extends StateTree> {
_p: Pinia

/**
* Used by devtools plugin to retrieve getters. Removed in production
* Used by devtools plugin to retrieve getters. Removed in production.
*
* @internal
*/
Expand Down
9 changes: 3 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"include": [
"src/global.d.ts",
"src/**/*.ts",
"__tests__/**/*.ts"
],
"include": ["src/global.d.ts", "src/**/*.ts", "__tests__/**/*.ts"],
"compilerOptions": {
"baseUrl": ".",
"rootDir": ".",
Expand All @@ -15,14 +11,15 @@
"module": "esnext",
"moduleResolution": "node",
"allowJs": false,
"skipLibCheck": true,

"noUnusedLocals": true,
"strictNullChecks": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noImplicitReturns": false,
"strict": true,
"isolatedModules": false,
"isolatedModules": true,

"experimentalDecorators": true,
"resolveJsonModule": true,
Expand Down

0 comments on commit 9ca186d

Please sign in to comment.