diff options
-rw-r--r-- | .changeset/blue-dolls-melt.md | 5 | ||||
-rw-r--r-- | packages/astro/types.d.ts | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/.changeset/blue-dolls-melt.md b/.changeset/blue-dolls-melt.md new file mode 100644 index 000000000..a4d0c26d7 --- /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 7eaa4823c..eaf3f30c6 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<Tag extends HTMLTag> = Omit< astroHTML.JSX.IntrinsicElements[Tag], keyof Omit<AstroBuiltinAttributes, 'class:list'> ->; +> & { + [key: string]: string | number | boolean | null | undefined; +}; /** * All the CSS properties available, as defined by the CSS specification |