@docusaurus/types 2.0.0-beta.1ec2c95e3 → 2.0.0-beta.2

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.1ec2c95e3",
3
+ "version": "2.0.0-beta.2",
4
4
  "description": "Common types for Docusaurus packages.",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -13,9 +13,6 @@
13
13
  "directory": "packages/docusaurus-types"
14
14
  },
15
15
  "license": "MIT",
16
- "scripts": {
17
- "test": "tsc -p ."
18
- },
19
16
  "dependencies": {
20
17
  "commander": "^5.1.0",
21
18
  "joi": "^17.4.0",
@@ -23,5 +20,5 @@
23
20
  "webpack": "^5.40.0",
24
21
  "webpack-merge": "^5.8.0"
25
22
  },
26
- "gitHead": "05c1ed75bb06738f274fe71baf71749a05b2db24"
23
+ "gitHead": "883f07fddffaf1657407c8e202e370cc436e25f7"
27
24
  }
package/src/index.d.ts CHANGED
@@ -180,7 +180,7 @@ export interface LoadContext {
180
180
  siteConfig: DocusaurusConfig;
181
181
  siteConfigPath: string;
182
182
  outDir: string;
183
- baseUrl: string; // TODO to remove: useless, there's already siteConfig.baseUrl!
183
+ baseUrl: string;
184
184
  i18n: I18n;
185
185
  ssrTemplate?: string;
186
186
  codeTranslations: Record<string, string>;
@@ -198,7 +198,7 @@ export interface Props extends LoadContext, InjectedHtmlTags {
198
198
  siteMetadata: DocusaurusSiteMetadata;
199
199
  routes: RouteConfig[];
200
200
  routesPaths: string[];
201
- plugins: LoadedPlugin[];
201
+ plugins: LoadedPlugin<unknown>[];
202
202
  }
203
203
 
204
204
  export interface PluginContentLoadedActions {
@@ -219,7 +219,7 @@ export type AllContent = Record<
219
219
  // TODO improve type (not exposed by postcss-loader)
220
220
  export type PostCssOptions = Record<string, unknown> & {plugins: unknown[]};
221
221
 
222
- export interface Plugin<Content = unknown> {
222
+ export interface Plugin<Content> {
223
223
  name: string;
224
224
  loadContent?(): Promise<Content>;
225
225
  contentLoaded?({
@@ -283,14 +283,12 @@ export interface Plugin<Content = unknown> {
283
283
  }): ThemeConfig;
284
284
  }
285
285
 
286
- export type InitializedPlugin<Content = unknown> = Plugin<Content> & {
286
+ export type InitializedPlugin = Plugin<unknown> & {
287
287
  readonly options: PluginOptions;
288
288
  readonly version: DocusaurusPluginVersionInformation;
289
289
  };
290
290
 
291
- export type LoadedPlugin<Content = unknown> = InitializedPlugin<Content> & {
292
- readonly content: Content;
293
- };
291
+ export type LoadedPlugin = InitializedPlugin & {readonly content: unknown};
294
292
 
295
293
  export type PluginModule = {
296
294
  <T, X>(context: LoadContext, options: T): Plugin<X>;
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
- }