From ca0c7e8b836b1be2db6a77698c9535a34ada8fe6 Mon Sep 17 00:00:00 2001 From: Erika <3019731+Princesseuh@users.noreply.github.com> Date: Tue, 23 Aug 2022 11:39:02 -0300 Subject: [PATCH] Allow string as a valid value for the target attribute (#4441) --- .changeset/nice-mice-teach.md | 5 +++++ packages/astro/astro-jsx.d.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/nice-mice-teach.md diff --git a/.changeset/nice-mice-teach.md b/.changeset/nice-mice-teach.md new file mode 100644 index 000000000..1d0d916a9 --- /dev/null +++ b/.changeset/nice-mice-teach.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Allow arbitrary strings on the target attribute diff --git a/packages/astro/astro-jsx.d.ts b/packages/astro/astro-jsx.d.ts index 226391a82..bdf6b6aa2 100644 --- a/packages/astro/astro-jsx.d.ts +++ b/packages/astro/astro-jsx.d.ts @@ -548,7 +548,7 @@ declare namespace astroHTML.JSX { | 'strict-origin-when-cross-origin' | 'unsafe-url'; - type HTMLAttributeAnchorTarget = '_self' | '_blank' | '_parent' | '_top'; + type HTMLAttributeAnchorTarget = '_self' | '_blank' | '_parent' | '_top' | (string & {}); interface AnchorHTMLAttributes extends HTMLAttributes { download?: string | boolean | undefined | null; @@ -756,7 +756,7 @@ declare namespace astroHTML.JSX { size?: number | string | undefined | null; src?: string | undefined | null; step?: number | string | undefined | null; - type?: HTMLInputTypeAttribute | string | undefined | null; + type?: HTMLInputTypeAttribute | undefined | null; value?: string | string[] | number | undefined | null; width?: number | string | undefined | null; }