mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-01 18:32:52 +02:00
refactor: reduce number of leaked anys (#7465)
This commit is contained in:
parent
6e62bba30f
commit
89b0fff128
39 changed files with 121 additions and 89 deletions
|
@ -13,7 +13,11 @@ import {
|
|||
URISchema,
|
||||
} from '@docusaurus/utils-validation';
|
||||
import {GlobExcludeDefault} from '@docusaurus/utils';
|
||||
import type {PluginOptions, Options} from '@docusaurus/plugin-content-blog';
|
||||
import type {
|
||||
PluginOptions,
|
||||
Options,
|
||||
FeedType,
|
||||
} from '@docusaurus/plugin-content-blog';
|
||||
import type {OptionValidationContext} from '@docusaurus/types';
|
||||
|
||||
export const DEFAULT_OPTIONS: PluginOptions = {
|
||||
|
@ -101,7 +105,7 @@ const PluginOptionSchema = Joi.object<PluginOptions>({
|
|||
Joi.alternatives().conditional(
|
||||
Joi.string().equal('all', 'rss', 'atom', 'json'),
|
||||
{
|
||||
then: Joi.custom((val) =>
|
||||
then: Joi.custom((val: FeedType | 'all') =>
|
||||
val === 'all' ? ['rss', 'atom', 'json'] : [val],
|
||||
),
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue