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 {
LoadContext,
Plugin,
HtmlTags,
OptionValidationContext,
ValidationResult,
ThemeConfig,
@ -62,7 +61,7 @@ export default function pluginGoogleAnalytics(
src: 'https://www.google-analytics.com/analytics.js',
},
},
] as HtmlTags,
],
};
},
};

View file

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

View file

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