@docusaurus/types 0.0.0-4615 → 0.0.0-4620

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 +9 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/types",
3
- "version": "0.0.0-4615",
3
+ "version": "0.0.0-4620",
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.69.1",
24
24
  "webpack-merge": "^5.8.0"
25
25
  },
26
- "gitHead": "02bd619fc85e38d320177f4d96f39864109300c8"
26
+ "gitHead": "21930f0c569b3c2fe2fc5d0ec67c544dc795d9c6"
27
27
  }
package/src/index.d.ts CHANGED
@@ -11,6 +11,7 @@ import type {CommanderStatic} from 'commander';
11
11
  import type {ParsedUrlQueryInput} from 'querystring';
12
12
  import type Joi from 'joi';
13
13
  import type {Overwrite, DeepPartial} from 'utility-types';
14
+ import type {Location} from 'history';
14
15
 
15
16
  export type ReportingSeverity = 'ignore' | 'log' | 'warn' | 'error' | 'throw';
16
17
 
@@ -448,3 +449,11 @@ export interface TOCItem {
448
449
  }
449
450
 
450
451
  export type RouteChunksTree = {[x: string | number]: string | RouteChunksTree};
452
+
453
+ export type ClientModule = {
454
+ onRouteUpdate?: (args: {
455
+ previousLocation: Location | null;
456
+ location: Location;
457
+ }) => void;
458
+ onRouteUpdateDelayed?: (args: {location: Location}) => void;
459
+ };