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 {
|
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,
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -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,
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
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
|
* 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`
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue