diff --git a/.changeset/blue-dolls-melt.md b/.changeset/blue-dolls-melt.md new file mode 100644 index 000000000000..a4d0c26d7961 --- /dev/null +++ b/.changeset/blue-dolls-melt.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Updates the `HTMLAttributes` type exported from `astro` to allow data attributes diff --git a/packages/astro/types.d.ts b/packages/astro/types.d.ts index 7eaa4823c636..eaf3f30c6baf 100644 --- a/packages/astro/types.d.ts +++ b/packages/astro/types.d.ts @@ -4,11 +4,14 @@ import type { Simplify } from './dist/type-utils.js'; /** Any supported HTML or SVG element name, as defined by the HTML specification */ export type HTMLTag = keyof astroHTML.JSX.DefinedIntrinsicElements; + /** The built-in attributes for any known HTML or SVG element name */ export type HTMLAttributes = Omit< astroHTML.JSX.IntrinsicElements[Tag], keyof Omit ->; +> & { + [key: string]: string | number | boolean | null | undefined; +}; /** * All the CSS properties available, as defined by the CSS specification