diff --git a/packages/svelte/src/compiler/phases/2-analyze/index.js b/packages/svelte/src/compiler/phases/2-analyze/index.js
index d17cc34a5f..042e88fa2f 100644
--- a/packages/svelte/src/compiler/phases/2-analyze/index.js
+++ b/packages/svelte/src/compiler/phases/2-analyze/index.js
@@ -698,16 +698,8 @@ export function analyze_component(root, source, options) {
}
for (const node of analysis.module.ast.body) {
- if (
- node.type === 'ExportNamedDeclaration' &&
- // @ts-expect-error
- node.exportKind !== 'type' &&
- node.specifiers !== null &&
- node.source == null
- ) {
+ if (node.type === 'ExportNamedDeclaration' && node.specifiers !== null && node.source == null) {
for (const specifier of node.specifiers) {
- // @ts-expect-error
- if (specifier.exportKind === 'type') continue;
if (specifier.local.type !== 'Identifier') continue;
const binding = analysis.module.scope.get(specifier.local.name);
diff --git a/packages/svelte/src/compiler/phases/scope.js b/packages/svelte/src/compiler/phases/scope.js
index 20dcfa2821..3536dd6a18 100644
--- a/packages/svelte/src/compiler/phases/scope.js
+++ b/packages/svelte/src/compiler/phases/scope.js
@@ -433,13 +433,7 @@ export function create_scopes(ast, root, allow_reactive_declarations, parent) {
},
ImportDeclaration(node, { state }) {
- // @ts-expect-error
- if (node.importKind === 'type') return;
-
for (const specifier of node.specifiers) {
- // @ts-expect-error
- if (specifier.importKind === 'type') continue;
-
state.scope.declare(specifier.local, 'normal', 'import', node);
}
},
diff --git a/packages/svelte/tests/runtime-browser/samples/typescript-class-and-interface/_config.js b/packages/svelte/tests/runtime-browser/samples/typescript-class-and-interface/_config.js
deleted file mode 100644
index 4e8f43d5db..0000000000
--- a/packages/svelte/tests/runtime-browser/samples/typescript-class-and-interface/_config.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import { test } from '../../assert';
-
-export default test({});
diff --git a/packages/svelte/tests/runtime-browser/samples/typescript-class-and-interface/main.svelte b/packages/svelte/tests/runtime-browser/samples/typescript-class-and-interface/main.svelte
deleted file mode 100644
index 3d58f1072d..0000000000
--- a/packages/svelte/tests/runtime-browser/samples/typescript-class-and-interface/main.svelte
+++ /dev/null
@@ -1,5 +0,0 @@
-
\ No newline at end of file
diff --git a/packages/svelte/tests/runtime-runes/samples/typescript/main.svelte b/packages/svelte/tests/runtime-runes/samples/typescript/main.svelte
index cc31350601..cd23b31096 100644
--- a/packages/svelte/tests/runtime-runes/samples/typescript/main.svelte
+++ b/packages/svelte/tests/runtime-runes/samples/typescript/main.svelte
@@ -8,6 +8,10 @@
console.log(this);
}
+ function foo(): string {
+ return ""!;
+ }
+
class Foo {
public name: string;
x = 'x' as const;
@@ -16,6 +20,8 @@
}
}
+ class MyClass implements Hello {}
+
declare const declared_const: number;
declare function declared_fn(): void;
declare class declared_class {