refactor: remove a lot of implicit anys (#7468)

This commit is contained in:
Joshua Chen 2022-05-23 15:40:53 +08:00 committed by GitHub
parent 0c8e57de67
commit 3666a2ede5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 148 additions and 163 deletions

View file

@ -6,9 +6,13 @@
*/
import {validateThemeConfig, DEFAULT_CONFIG} from '../validateThemeConfig';
import type {Joi} from '@docusaurus/utils-validation';
function testValidateThemeConfig(themeConfig) {
function validate(schema, cfg) {
function testValidateThemeConfig(themeConfig: {[key: string]: unknown}) {
function validate(
schema: Joi.ObjectSchema<{[key: string]: unknown}>,
cfg: {[key: string]: unknown},
) {
const {value, error} = schema.validate(cfg, {
convert: false,
});