mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-23 14:06:59 +02:00
test: strengthen internal types (#7488)
This commit is contained in:
parent
d50fe3b670
commit
cd21a31005
15 changed files with 67 additions and 55 deletions
|
@ -96,14 +96,14 @@ type SidebarGenerator = (generatorArgs: {
|
|||
/** Useful metadata for the version this sidebar belongs to. */
|
||||
version: {contentPath: string; versionName: string};
|
||||
/** All the docs of that version (unfiltered). */
|
||||
docs: Array<{
|
||||
docs: {
|
||||
id: string;
|
||||
title: string;
|
||||
frontMatter: DocFrontMatter & Record<string, unknown>;
|
||||
source: string;
|
||||
sourceDirName: string;
|
||||
sidebarPosition?: number | undefined;
|
||||
}>;
|
||||
}[];
|
||||
/** Number prefix parser configured for this plugin. */
|
||||
numberPrefixParser: PrefixParser;
|
||||
/** The default category index matcher which you can override. */
|
||||
|
|
|
@ -112,8 +112,8 @@ Turn debug mode on:
|
|||
|
||||
### `offlineModeActivationStrategies` {#offlinemodeactivationstrategies}
|
||||
|
||||
- Type: `Array<'appInstalled' | 'mobile' | 'saveData'| 'queryString' | 'always'>`
|
||||
- Default: `['appInstalled','queryString','standalone']`
|
||||
- Type: `('appInstalled' | 'mobile' | 'saveData'| 'queryString' | 'always')[]`
|
||||
- Default: `['appInstalled', 'queryString', 'standalone']`
|
||||
|
||||
Strategies used to turn the offline mode on:
|
||||
|
||||
|
@ -194,7 +194,7 @@ The default theme includes an implementation for the reload popup and uses [Infi
|
|||
|
||||
### `pwaHead` {#pwahead}
|
||||
|
||||
- Type: `Array<{ tagName: string } & Record<string,string>>`
|
||||
- Type: `({ tagName: string; [attributeName: string]: string })[]`
|
||||
- Default: `[]`
|
||||
|
||||
Array of objects containing `tagName` and key-value pairs for attributes to inject into the `<head>` tag. Technically you can inject any head tag through this, but it's ideally used for tags to make your site PWA compliant. Here's a list of tag to make your app fully compliant:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue