From 91299b32ff4edf451cd3d912b208338dbfd117dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Crozatier?= <48696601+fcrozatier@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:28:25 +0200 Subject: [PATCH] fix: stronger types for the `autocomplete` attribute (#13201) --- .changeset/curvy-foxes-wink.md | 5 +++++ packages/svelte/elements.d.ts | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .changeset/curvy-foxes-wink.md diff --git a/.changeset/curvy-foxes-wink.md b/.changeset/curvy-foxes-wink.md new file mode 100644 index 0000000000..1b405fb294 --- /dev/null +++ b/.changeset/curvy-foxes-wink.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +feat: better types for the `autocomplete` attribute diff --git a/packages/svelte/elements.d.ts b/packages/svelte/elements.d.ts index e4f86eee74..b5ceb80a13 100644 --- a/packages/svelte/elements.d.ts +++ b/packages/svelte/elements.d.ts @@ -937,7 +937,7 @@ export interface HTMLFieldsetAttributes extends HTMLAttributes { acceptcharset?: string | undefined | null; action?: string | undefined | null; - autocomplete?: string | undefined | null; + autocomplete?: AutoFillBase | undefined | null; enctype?: string | undefined | null; method?: string | undefined | null; name?: string | undefined | null; @@ -1025,7 +1025,7 @@ export type HTMLInputTypeAttribute = export interface HTMLInputAttributes extends HTMLAttributes { accept?: string | undefined | null; alt?: string | undefined | null; - autocomplete?: string | undefined | null; + autocomplete?: AutoFill | undefined | null; capture?: boolean | 'user' | 'environment' | undefined | null; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute checked?: boolean | undefined | null; dirname?: string | undefined | null; @@ -1244,7 +1244,7 @@ export interface HTMLScriptAttributes extends HTMLAttributes } export interface HTMLSelectAttributes extends HTMLAttributes { - autocomplete?: string | undefined | null; + autocomplete?: AutoFill | undefined | null; disabled?: boolean | undefined | null; form?: string | undefined | null; multiple?: boolean | undefined | null; @@ -1289,7 +1289,7 @@ export interface HTMLTableAttributes extends HTMLAttributes { } export interface HTMLTextareaAttributes extends HTMLAttributes { - autocomplete?: string | undefined | null; + autocomplete?: AutoFill | undefined | null; cols?: number | undefined | null; dirname?: string | undefined | null; disabled?: boolean | undefined | null;