@docusaurus/types 0.0.0-4618 → 0.0.0-4621
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 +2 -2
- package/src/index.d.ts +9 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/types",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4621",
|
|
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": "
|
|
26
|
+
"gitHead": "7b200da04774e7ce594eba4e5a4f73d4fdf1f13b"
|
|
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
|
|
|
@@ -391,18 +392,6 @@ export interface ConfigureWebpackUtils {
|
|
|
391
392
|
isServer: boolean;
|
|
392
393
|
babelOptions?: Record<string, unknown>;
|
|
393
394
|
}) => RuleSetRule;
|
|
394
|
-
|
|
395
|
-
// TODO deprecated: remove before end of 2021?
|
|
396
|
-
getCacheLoader: (
|
|
397
|
-
isServer: boolean,
|
|
398
|
-
cacheOptions?: Record<string, unknown>,
|
|
399
|
-
) => RuleSetRule | null;
|
|
400
|
-
|
|
401
|
-
// TODO deprecated: remove before end of 2021?
|
|
402
|
-
getBabelLoader: (
|
|
403
|
-
isServer: boolean,
|
|
404
|
-
options?: Record<string, unknown>,
|
|
405
|
-
) => RuleSetRule;
|
|
406
395
|
}
|
|
407
396
|
|
|
408
397
|
interface HtmlTagObject {
|
|
@@ -448,3 +437,11 @@ export interface TOCItem {
|
|
|
448
437
|
}
|
|
449
438
|
|
|
450
439
|
export type RouteChunksTree = {[x: string | number]: string | RouteChunksTree};
|
|
440
|
+
|
|
441
|
+
export type ClientModule = {
|
|
442
|
+
onRouteUpdate?: (args: {
|
|
443
|
+
previousLocation: Location | null;
|
|
444
|
+
location: Location;
|
|
445
|
+
}) => void;
|
|
446
|
+
onRouteUpdateDelayed?: (args: {location: Location}) => void;
|
|
447
|
+
};
|