diff --git a/src/jsx/base.ts b/src/jsx/base.ts
index c250a9123..bfeb8a081 100644
--- a/src/jsx/base.ts
+++ b/src/jsx/base.ts
@@ -56,6 +56,7 @@ const booleanAttributes = [
'default',
'defer',
'disabled',
+ 'download',
'formnovalidate',
'hidden',
'inert',
diff --git a/src/jsx/index.test.tsx b/src/jsx/index.test.tsx
index cafca6b15..110633eab 100644
--- a/src/jsx/index.test.tsx
+++ b/src/jsx/index.test.tsx
@@ -297,6 +297,28 @@ describe('render to string', () => {
})
})
+ describe('download attribute', () => {
+ it(' should be rendered as ', () => {
+ const template =
+ expect(template.toString()).toBe('')
+ })
+
+ it(' should be rendered as ', () => {
+ const template =
+ expect(template.toString()).toBe('')
+ })
+
+ it(' should be rendered as ', () => {
+ const template =
+ expect(template.toString()).toBe('')
+ })
+
+ it(' should be rendered as ', () => {
+ const template =
+ expect(template.toString()).toBe('')
+ })
+ })
+
describe('Function', () => {
it('should be ignored used in on* props', () => {
const onClick = () => {}
diff --git a/src/jsx/intrinsic-elements.ts b/src/jsx/intrinsic-elements.ts
index 7f0bd12a3..66e6a8290 100644
--- a/src/jsx/intrinsic-elements.ts
+++ b/src/jsx/intrinsic-elements.ts
@@ -179,7 +179,7 @@ export namespace JSX {
type HTMLAttributeAnchorTarget = '_self' | '_blank' | '_parent' | '_top' | string
interface AnchorHTMLAttributes extends HTMLAttributes {
- download?: any
+ download?: string | boolean | undefined
href?: string | undefined
hreflang?: string | undefined
media?: string | undefined
@@ -194,7 +194,7 @@ export namespace JSX {
interface AreaHTMLAttributes extends HTMLAttributes {
alt?: string | undefined
coords?: string | undefined
- download?: any
+ download?: string | boolean | undefined
href?: string | undefined
hreflang?: string | undefined
media?: string | undefined