]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: upgrade api gen
authorEduardo San Martin Morote <posva13@gmail.com>
Mon, 25 Jul 2022 09:33:07 +0000 (11:33 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Mon, 25 Jul 2022 09:33:07 +0000 (11:33 +0200)
packages/docs/.vitepress/config.js
packages/docs/run-typedoc.js
packages/docs/typedoc.tsconfig.json [new file with mode: 0644]
packages/nuxt/src/module.ts
packages/pinia/src/types.ts
packages/testing/src/testing.ts

index 2824f91dc0f0d9e3a710ff91dd7057c2c151ccc6..c78641468cd645d18d4a965e97a30a87dcaf8c5d 100644 (file)
@@ -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
       '/': [
         {
index dc23810046aad62e7070186a65b7854a0778945d..48e036954b791e0e7186556c46d6d28f040306fe 100644 (file)
@@ -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 (file)
index 0000000..78e0a12
--- /dev/null
@@ -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"]
+  }
+}
index 10d297dcbc409e7ad1254dce4104df49880b04fa..66ed375f6a00ffb7729924b4e4a2c82b6d19041a 100644 (file)
@@ -73,7 +73,7 @@ export default defineNuxtModule<ModuleOptions>({
     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] }
index 0ae89bfa43f7c6ad2a4aa2147834fe154cced486..bc8ec38e5f9f4ebbc2cf7883da46da8fc67df5ff 100644 (file)
@@ -28,7 +28,7 @@ export function isPlainObject(
 }
 
 /**
- * Recursive `Partial<T>`. Used by {@link Store.$patch}.
+ * Recursive `Partial<T>`. Used by {@link Store['$patch']}.
  *
  * For internal use **only**
  */
index 7afaadfbaee74cb91dbfa99573894e513cd7beee..d076ff9a7b049fe9e073b7a6e83403651efdb979 100644 (file)
@@ -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 */