diff --git a/.changeset/six-vans-add.md b/.changeset/six-vans-add.md new file mode 100644 index 0000000000..3ced1ff9e1 --- /dev/null +++ b/.changeset/six-vans-add.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: stricter `crossorigin` and `wrap` attributes types diff --git a/packages/svelte/elements.d.ts b/packages/svelte/elements.d.ts index 05c113358e..be12ddbcbb 100644 --- a/packages/svelte/elements.d.ts +++ b/packages/svelte/elements.d.ts @@ -1091,7 +1091,7 @@ export interface HTMLLiAttributes extends HTMLAttributes { export interface HTMLLinkAttributes extends HTMLAttributes { as?: string | undefined | null; - crossorigin?: string | undefined | null; + crossorigin?: 'anonymous' | 'use-credentials' | '' | undefined | null; href?: string | undefined | null; hreflang?: string | undefined | null; integrity?: string | undefined | null; @@ -1125,7 +1125,7 @@ export interface HTMLMediaAttributes extends HTMLAtt | (string & {}) | undefined | null; - crossorigin?: string | undefined | null; + crossorigin?: 'anonymous' | 'use-credentials' | '' | undefined | null; currenttime?: number | undefined | null; defaultmuted?: boolean | undefined | null; defaultplaybackrate?: number | undefined | null; @@ -1236,7 +1236,7 @@ export interface HTMLScriptAttributes extends HTMLAttributes async?: boolean | undefined | null; /** @deprecated */ charset?: string | undefined | null; - crossorigin?: string | undefined | null; + crossorigin?: 'anonymous' | 'use-credentials' | '' | undefined | null; defer?: boolean | undefined | null; fetchpriority?: 'auto' | 'high' | 'low' | undefined | null; integrity?: string | undefined | null; @@ -1306,7 +1306,7 @@ export interface HTMLTextareaAttributes extends HTMLAttributes | undefined | null; onchange?: ChangeEventHandler | undefined | null;