@docusaurus/types 2.0.0-beta.13 → 2.0.0-beta.15

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/types",
3
- "version": "2.0.0-beta.13",
3
+ "version": "2.0.0-beta.15",
4
4
  "description": "Common types for Docusaurus packages.",
5
5
  "types": "./src/index.d.ts",
6
6
  "publishConfig": {
@@ -18,10 +18,10 @@
18
18
  "dependencies": {
19
19
  "commander": "^5.1.0",
20
20
  "joi": "^17.4.2",
21
- "querystring": "0.2.0",
21
+ "querystring": "0.2.1",
22
22
  "utility-types": "^3.10.0",
23
23
  "webpack": "^5.61.0",
24
24
  "webpack-merge": "^5.8.0"
25
25
  },
26
- "gitHead": "b6ca12aedf10a10c2375f4f8b7e7380cfd7c7202"
26
+ "gitHead": "32ec84ef3c0a238436e913b2026ab809e5750fa8"
27
27
  }
package/src/index.d.ts CHANGED
@@ -120,6 +120,7 @@ export type TranslationFiles = TranslationFile[];
120
120
 
121
121
  export type I18nLocaleConfig = {
122
122
  label: string;
123
+ htmlLang: string;
123
124
  direction: string;
124
125
  };
125
126
 
@@ -208,7 +209,7 @@ export interface LoadContext {
208
209
  outDir: string;
209
210
  baseUrl: string; // TODO to remove: useless, there's already siteConfig.baseUrl!
210
211
  i18n: I18n;
211
- ssrTemplate?: string;
212
+ ssrTemplate: string;
212
213
  codeTranslations: Record<string, string>;
213
214
  }
214
215
 
@@ -257,7 +258,7 @@ export interface Plugin<Content = unknown> {
257
258
  actions: PluginContentLoadedActions;
258
259
  }) => Promise<void>;
259
260
  routesLoaded?: (routes: RouteConfig[]) => void; // TODO remove soon, deprecated (alpha-60)
260
- postBuild?: (props: Props) => void;
261
+ postBuild?: (props: Props & {content: Content}) => Promise<void>;
261
262
  postStart?: (props: Props) => void;
262
263
  // TODO refactor the configureWebpack API surface: use an object instead of multiple params (requires breaking change)
263
264
  configureWebpack?: (
@@ -317,7 +318,9 @@ export type LoadedPlugin<Content = unknown> = InitializedPlugin<Content> & {
317
318
  };
318
319
 
319
320
  export type PluginModule = {
320
- <T, X>(context: LoadContext, options: T): Plugin<X>;
321
+ <Options, Content>(context: LoadContext, options: Options):
322
+ | Plugin<Content>
323
+ | Promise<Plugin<Content>>;
321
324
  validateOptions?: <T>(data: OptionValidationContext<T>) => T;
322
325
  validateThemeConfig?: <T>(data: ThemeConfigValidationContext<T>) => T;
323
326
  getSwizzleComponentList?: () => string[];
package/tsconfig.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "http://json.schemastore.org/tsconfig",
3
- "extends": "../../tsconfig.json",
4
- "compilerOptions": {
5
- "noEmit": true
6
- }
7
- }