From: Eduardo San Martin Morote Date: Mon, 25 Jul 2022 09:33:07 +0000 (+0200) Subject: docs: upgrade api gen X-Git-Tag: @pinia/nuxt@0.3.1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43bdd30db7027bbabb28339e6c9f07dc542d6b32;p=thirdparty%2Fvuejs%2Fpinia.git docs: upgrade api gen --- diff --git a/packages/docs/.vitepress/config.js b/packages/docs/.vitepress/config.js index 2824f91d..c7864146 100644 --- a/packages/docs/.vitepress/config.js +++ b/packages/docs/.vitepress/config.js @@ -177,6 +177,16 @@ module.exports = { ], sidebar: { + '/api/': [ + { + text: 'packages', + children: [ + { text: 'pinia', link: '/api/modules/pinia.html' }, + { text: '@pinia/nuxt', link: '/api/modules/pinia_nuxt.html' }, + { text: '@pinia/testing', link: '/api/modules/pinia_testing.html' }, + ], + }, + ], // catch-all fallback '/': [ { diff --git a/packages/docs/run-typedoc.js b/packages/docs/run-typedoc.js index dc238100..48e03695 100644 --- a/packages/docs/run-typedoc.js +++ b/packages/docs/run-typedoc.js @@ -3,7 +3,7 @@ const path = require('path') createTypeDocApp({ name: 'API Documentation', - // tsconfig: path.resolve(__dirname, '../../tsconfig.json'), + tsconfig: path.resolve(__dirname, './typedoc.tsconfig.json'), // entryPointStrategy: 'packages', githubPages: false, entryPoints: [ diff --git a/packages/docs/typedoc.tsconfig.json b/packages/docs/typedoc.tsconfig.json new file mode 100644 index 00000000..78e0a12d --- /dev/null +++ b/packages/docs/typedoc.tsconfig.json @@ -0,0 +1,46 @@ +{ + "include": ["../pinia/src/global.d.ts", "../*/src/**/*.ts"], + "exclude": [ + "../test-vue-2", + "../pinia/__tests__/test-utils.ts", + "../pinia/test-dts", + "../*/__tests__/**/*.ts", + "../*/src/*.spec.ts", + "../nuxt/playground", + "../nuxt/src/runtime", + "**/*.spec.ts" + ], + "compilerOptions": { + "baseUrl": ".", + "rootDir": "..", + "outDir": "dist", + "sourceMap": false, + "noEmit": true, + "paths": { + "@pinia/*": ["../*/src"], + "pinia": ["../pinia/src"] + }, + + "target": "esnext", + "module": "esnext", + "moduleResolution": "node", + "allowJs": false, + "skipLibCheck": true, + + "noUnusedLocals": true, + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitThis": true, + "noImplicitReturns": false, + "strict": true, + "isolatedModules": true, + + "experimentalDecorators": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "removeComments": false, + "jsx": "preserve", + "lib": ["esnext", "dom"], + "types": ["jest", "node", "vite/client"] + } +} diff --git a/packages/nuxt/src/module.ts b/packages/nuxt/src/module.ts index 10d297dc..66ed375f 100644 --- a/packages/nuxt/src/module.ts +++ b/packages/nuxt/src/module.ts @@ -73,7 +73,7 @@ export default defineNuxtModule({ const composables = resolver.resolve('./runtime/composables') addAutoImport([ { from: composables, name: 'usePinia' }, - ...options.autoImports.map((imports) => + ...options.autoImports!.map((imports) => typeof imports === 'string' ? { from: composables, name: imports } : { from: composables, name: imports[0], as: imports[1] } diff --git a/packages/pinia/src/types.ts b/packages/pinia/src/types.ts index 0ae89bfa..bc8ec38e 100644 --- a/packages/pinia/src/types.ts +++ b/packages/pinia/src/types.ts @@ -28,7 +28,7 @@ export function isPlainObject( } /** - * Recursive `Partial`. Used by {@link Store.$patch}. + * Recursive `Partial`. Used by {@link Store['$patch']}. * * For internal use **only** */ diff --git a/packages/testing/src/testing.ts b/packages/testing/src/testing.ts index 7afaadfb..d076ff9a 100644 --- a/packages/testing/src/testing.ts +++ b/packages/testing/src/testing.ts @@ -65,7 +65,7 @@ export interface TestingOptions { /** * Pinia instance specifically designed for testing. Extends a regular - * {@link Pinia} instance with test specific properties. + * `Pinia` instance with test specific properties. */ export interface TestingPinia extends Pinia { /** App used by Pinia */