Skip to content

Commit 1fa3d95

Browse files
authoredJan 1, 2023
fix(types): add or update referrerpolicy (#7199)
1 parent c6e5bda commit 1fa3d95

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed
 

‎packages/runtime-dom/types/jsx.d.ts

+17-2
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,17 @@ export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
309309
is?: string
310310
}
311311

312+
type HTMLAttributeReferrerPolicy =
313+
| ''
314+
| 'no-referrer'
315+
| 'no-referrer-when-downgrade'
316+
| 'origin'
317+
| 'origin-when-cross-origin'
318+
| 'same-origin'
319+
| 'strict-origin'
320+
| 'strict-origin-when-cross-origin'
321+
| 'unsafe-url'
322+
312323
export interface AnchorHTMLAttributes extends HTMLAttributes {
313324
download?: any
314325
href?: string
@@ -318,7 +329,7 @@ export interface AnchorHTMLAttributes extends HTMLAttributes {
318329
rel?: string
319330
target?: string
320331
type?: string
321-
referrerpolicy?: string
332+
referrerpolicy?: HTMLAttributeReferrerPolicy
322333
}
323334

324335
export interface AreaHTMLAttributes extends HTMLAttributes {
@@ -328,6 +339,7 @@ export interface AreaHTMLAttributes extends HTMLAttributes {
328339
href?: string
329340
hreflang?: string
330341
media?: string
342+
referrerpolicy?: HTMLAttributeReferrerPolicy
331343
rel?: string
332344
shape?: string
333345
target?: string
@@ -426,7 +438,7 @@ export interface IframeHTMLAttributes extends HTMLAttributes {
426438
marginheight?: Numberish
427439
marginwidth?: Numberish
428440
name?: string
429-
referrerpolicy?: string
441+
referrerpolicy?: HTMLAttributeReferrerPolicy
430442
sandbox?: string
431443
scrolling?: string
432444
seamless?: Booleanish
@@ -440,6 +452,7 @@ export interface ImgHTMLAttributes extends HTMLAttributes {
440452
crossorigin?: 'anonymous' | 'use-credentials' | ''
441453
decoding?: 'async' | 'auto' | 'sync'
442454
height?: Numberish
455+
referrerpolicy?: HTMLAttributeReferrerPolicy
443456
sizes?: string
444457
src?: string
445458
srcset?: string
@@ -514,6 +527,7 @@ export interface LinkHTMLAttributes extends HTMLAttributes {
514527
hreflang?: string
515528
integrity?: string
516529
media?: string
530+
referrerpolicy?: HTMLAttributeReferrerPolicy
517531
rel?: string
518532
sizes?: string
519533
type?: string
@@ -614,6 +628,7 @@ export interface ScriptHTMLAttributes extends HTMLAttributes {
614628
defer?: Booleanish
615629
integrity?: string
616630
nomodule?: Booleanish
631+
referrerpolicy?: HTMLAttributeReferrerPolicy
617632
nonce?: string
618633
src?: string
619634
type?: string

0 commit comments

Comments
 (0)
Please sign in to comment.