refactor(types): correct HtmlTags types (#5959)

This commit is contained in:
Armano 2021-11-17 00:10:44 +01:00 committed by GitHub
parent 85fcd9eb0f
commit 3bf59a65a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 7 deletions

View file

@ -10,7 +10,6 @@ import {Joi} from '@docusaurus/utils-validation';
import type { import type {
LoadContext, LoadContext,
Plugin, Plugin,
HtmlTags,
OptionValidationContext, OptionValidationContext,
ValidationResult, ValidationResult,
ThemeConfig, ThemeConfig,
@ -62,7 +61,7 @@ export default function pluginGoogleAnalytics(
src: 'https://www.google-analytics.com/analytics.js', src: 'https://www.google-analytics.com/analytics.js',
}, },
}, },
] as HtmlTags, ],
}; };
}, },
}; };

View file

@ -10,7 +10,6 @@ import {Joi} from '@docusaurus/utils-validation';
import type { import type {
LoadContext, LoadContext,
Plugin, Plugin,
HtmlTags,
OptionValidationContext, OptionValidationContext,
ValidationResult, ValidationResult,
ThemeConfig, ThemeConfig,
@ -75,7 +74,7 @@ export default function pluginGoogleGtag(
anonymizeIP ? "'anonymize_ip': true" : '' anonymizeIP ? "'anonymize_ip': true" : ''
} });`, } });`,
}, },
] as HtmlTags, ],
}; };
}, },
}; };

View file

@ -397,9 +397,7 @@ interface HtmlTagObject {
* Attributes of the html tag * Attributes of the html tag
* E.g. `{'disabled': true, 'value': 'demo', 'rel': 'preconnect'}` * E.g. `{'disabled': true, 'value': 'demo', 'rel': 'preconnect'}`
*/ */
attributes?: { attributes?: Partial<Record<string, string | boolean>>;
[attributeName: string]: string | boolean;
};
/** /**
* The tag name e.g. `div`, `script`, `link`, `meta` * The tag name e.g. `div`, `script`, `link`, `meta`
*/ */