Skip to content

Commit c9e2a94

Browse files
authored
import Component as Type
interfaces can only be used as a Type, that way it should be imported as type
1 parent f1c9edc commit c9e2a94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/svelte/types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ declare module 'svelte' {
110110
* you export a component called `MyComponent`. For Svelte+TypeScript users,
111111
* you want to provide typings. Therefore you create a `index.d.ts`:
112112
* ```ts
113-
* import { Component } from "svelte";
113+
* import type { Component } from "svelte";
114114
* export declare const MyComponent: Component<{ foo: string }> {}
115115
* ```
116116
* Typing this makes it possible for IDEs like VS Code with the Svelte extension
@@ -2962,4 +2962,4 @@ declare function $inspect<T extends any[]>(
29622962
*/
29632963
declare function $host<El extends HTMLElement = HTMLElement>(): El;
29642964

2965-
//# sourceMappingURL=index.d.ts.map
2965+
//# sourceMappingURL=index.d.ts.map

0 commit comments

Comments
 (0)