test: fix some type errors in test files (#7486)

This commit is contained in:
Joshua Chen 2022-05-25 11:46:10 +08:00 committed by GitHub
parent 624735bd92
commit e2e40b8f5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 319 additions and 182 deletions

View file

@ -17,7 +17,7 @@ declare module '@docusaurus/plugin-content-docs' {
Tag,
} from '@docusaurus/utils';
import type {Plugin, LoadContext} from '@docusaurus/types';
import type {Required} from 'utility-types';
import type {Overwrite, Required} from 'utility-types';
export type Assets = {
image?: string;
@ -206,7 +206,22 @@ declare module '@docusaurus/plugin-content-docs' {
*/
tagsBasePath: string;
};
export type Options = Partial<PluginOptions>;
export type Options = Partial<
Overwrite<
PluginOptions,
{
/**
* Custom parsing logic to extract number prefixes from file names. Use
* `false` to disable this behavior and leave the docs untouched, and
* `true` to use the default parser.
*
* @param filename One segment of the path, without any slashes.
* @see https://docusaurus.io/docs/sidebar#using-number-prefixes
*/
numberPrefixParser: PluginOptions['numberPrefixParser'] | boolean;
}
>
>;
export type SidebarsConfig = import('./sidebars/types').SidebarsConfig;
export type VersionMetadata = ContentPaths & {