mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-31 01:47:17 +02:00
refactor(types): correct HtmlTags types (#5959)
This commit is contained in:
parent
85fcd9eb0f
commit
3bf59a65a9
3 changed files with 3 additions and 7 deletions
|
@ -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,
|
||||
],
|
||||
};
|
||||
},
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
],
|
||||
};
|
||||
},
|
||||
};
|
||||
|
|
4
packages/docusaurus-types/src/index.d.ts
vendored
4
packages/docusaurus-types/src/index.d.ts
vendored
|
@ -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`
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue