Svelte5 (Types/Doc) import Component as Type (#11992)

* import Component as Type

interfaces can only be used as a Type, that way it should be imported as type

* fix import type

* regenerate types

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
pull/12009/head
Dennis Dudek 3 weeks ago committed by GitHub
parent 0d51dbae32
commit 84ad208f2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -113,7 +113,7 @@ export class SvelteComponent<
* you export a component called `MyComponent`. For Svelte+TypeScript users,
* you want to provide typings. Therefore you create a `index.d.ts`:
* ```ts
* import { Component } from "svelte";
* import type { Component } from 'svelte';
* export declare const MyComponent: Component<{ foo: string }> {}
* ```
* Typing this makes it possible for IDEs like VS Code with the Svelte extension

@ -110,7 +110,7 @@ declare module 'svelte' {
* you export a component called `MyComponent`. For Svelte+TypeScript users,
* you want to provide typings. Therefore you create a `index.d.ts`:
* ```ts
* import { Component } from "svelte";
* import type { Component } from 'svelte';
* export declare const MyComponent: Component<{ foo: string }> {}
* ```
* Typing this makes it possible for IDEs like VS Code with the Svelte extension

Loading…
Cancel
Save