From b2ce3fa85ed77ba173da9ab27d7bc36f17b7e9c7 Mon Sep 17 00:00:00 2001 From: Mateusz Kadlubowski Date: Sun, 18 May 2025 16:25:11 +0800 Subject: [PATCH] (fix/ast types) fix: Add missing `AttachTag` in `Tag` union type inside the `AST` namespace from `"svelte/compiler"` (#15946) --- .changeset/funny-carrots-teach.md | 5 +++++ packages/svelte/src/compiler/types/template.d.ts | 8 +++++++- packages/svelte/types/index.d.ts | 8 +++++++- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 .changeset/funny-carrots-teach.md diff --git a/.changeset/funny-carrots-teach.md b/.changeset/funny-carrots-teach.md new file mode 100644 index 0000000000..53ff135e84 --- /dev/null +++ b/.changeset/funny-carrots-teach.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: Add missing `AttachTag` in `Tag` union type inside the `AST` namespace from `"svelte/compiler"` diff --git a/packages/svelte/src/compiler/types/template.d.ts b/packages/svelte/src/compiler/types/template.d.ts index 6dec1f2dbe..b51c9e9a8d 100644 --- a/packages/svelte/src/compiler/types/template.d.ts +++ b/packages/svelte/src/compiler/types/template.d.ts @@ -547,7 +547,13 @@ export namespace AST { | AST.SvelteWindow | AST.SvelteBoundary; - export type Tag = AST.ExpressionTag | AST.HtmlTag | AST.ConstTag | AST.DebugTag | AST.RenderTag; + export type Tag = + | AST.AttachTag + | AST.ConstTag + | AST.DebugTag + | AST.ExpressionTag + | AST.HtmlTag + | AST.RenderTag; export type TemplateNode = | AST.Root diff --git a/packages/svelte/types/index.d.ts b/packages/svelte/types/index.d.ts index bb958c5108..1fda9a36b8 100644 --- a/packages/svelte/types/index.d.ts +++ b/packages/svelte/types/index.d.ts @@ -1362,7 +1362,13 @@ declare module 'svelte/compiler' { | AST.SvelteWindow | AST.SvelteBoundary; - export type Tag = AST.ExpressionTag | AST.HtmlTag | AST.ConstTag | AST.DebugTag | AST.RenderTag; + export type Tag = + | AST.AttachTag + | AST.ConstTag + | AST.DebugTag + | AST.ExpressionTag + | AST.HtmlTag + | AST.RenderTag; export type TemplateNode = | AST.Root