@docusaurus/types 0.0.0-4523 → 0.0.0-4527

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.d.ts +10 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/types",
3
- "version": "0.0.0-4523",
3
+ "version": "0.0.0-4527",
4
4
  "description": "Common types for Docusaurus packages.",
5
5
  "types": "./src/index.d.ts",
6
6
  "publishConfig": {
@@ -23,5 +23,5 @@
23
23
  "webpack": "^5.61.0",
24
24
  "webpack-merge": "^5.8.0"
25
25
  },
26
- "gitHead": "e78e68d4bc6a23f7e616eb7b59da9c79d9fb7452"
26
+ "gitHead": "fdd9e4feffd46f92b4ee3c519026bff7f2de6d05"
27
27
  }
package/src/index.d.ts CHANGED
@@ -12,8 +12,8 @@ import type Joi from 'joi';
12
12
  import type {Overwrite, DeepPartial} from 'utility-types';
13
13
 
14
14
  // Convert webpack-merge webpack-merge enum to union type
15
- // For type retro-compatible webpack-merge upgrade: we used string literals before)
16
- // see https://github.com/survivejs/webpack-merge/issues/179
15
+ // For type retro-compatible webpack-merge upgrade: we used string literals
16
+ // before) See https://github.com/survivejs/webpack-merge/issues/179
17
17
  type MergeStrategy = 'match' | 'merge' | 'append' | 'prepend' | 'replace';
18
18
 
19
19
  export type ReportingSeverity = 'ignore' | 'log' | 'warn' | 'error' | 'throw';
@@ -30,7 +30,8 @@ export interface DocusaurusConfig {
30
30
  tagline: string;
31
31
  title: string;
32
32
  url: string;
33
- // trailingSlash undefined = legacy retrocompatible behavior => /file => /file/index.html
33
+ // trailingSlash undefined = legacy retrocompatible behavior
34
+ // /file => /file/index.html
34
35
  trailingSlash: boolean | undefined;
35
36
  i18n: I18nConfig;
36
37
  onBrokenLinks: ReportingSeverity;
@@ -73,8 +74,8 @@ export interface DocusaurusConfig {
73
74
  }
74
75
 
75
76
  // Docusaurus config, as provided by the user (partial/unnormalized)
76
- // This type is used to provide type-safety / IDE auto-complete on the config file
77
- // See https://docusaurus.io/docs/typescript-support
77
+ // This type is used to provide type-safety / IDE auto-complete on the config
78
+ // file. See https://docusaurus.io/docs/typescript-support
78
79
  export type Config = Overwrite<
79
80
  Partial<DocusaurusConfig>,
80
81
  {
@@ -88,7 +89,8 @@ export type Config = Overwrite<
88
89
  /**
89
90
  * - `type: 'package'`, plugin is in a different package.
90
91
  * - `type: 'project'`, plugin is in the same docusaurus project.
91
- * - `type: 'local'`, none of plugin's ancestor directory contains any package.json.
92
+ * - `type: 'local'`, none of the plugin's ancestor directories contains a
93
+ * package.json.
92
94
  * - `type: 'synthetic'`, docusaurus generated internal plugin.
93
95
  */
94
96
  export type DocusaurusPluginVersionInformation =
@@ -259,7 +261,8 @@ export interface Plugin<Content = unknown> {
259
261
  }) => Promise<void>;
260
262
  routesLoaded?: (routes: RouteConfig[]) => void; // TODO remove soon, deprecated (alpha-60)
261
263
  postBuild?: (props: Props & {content: Content}) => Promise<void>;
262
- // TODO refactor the configureWebpack API surface: use an object instead of multiple params (requires breaking change)
264
+ // TODO refactor the configureWebpack API surface: use an object instead of
265
+ // multiple params (requires breaking change)
263
266
  configureWebpack?: (
264
267
  config: Configuration,
265
268
  isServer: boolean,