Skip to content

Commit 8e85b3f

Browse files
authored
docs: remove typescript faq (#9108)
1 parent 1a28d58 commit 8e85b3f

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

documentation/docs/05-misc/01-faq.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -59,42 +59,13 @@ It will show up on hover.
5959

6060
Note: The `@component` is necessary in the HTML comment which describes your component.
6161

62-
## What about TypeScript support?
63-
64-
You need to install a preprocessor such as [svelte-preprocess](https://github.com/sveltejs/svelte-preprocess). You can run type checking from the command line with [svelte-check](https://www.npmjs.com/package/svelte-check).
65-
66-
To declare the type of a reactive variable in a Svelte template, you should use the following syntax:
67-
68-
```ts
69-
const count: number = 100;
70-
71-
// ---cut---
72-
let x: number;
73-
$: x = count + 1;
74-
```
75-
76-
To import a type or interface make sure to use [TypeScript's `type` modifier](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export):
77-
78-
```ts
79-
// @filename: SomeFile.ts
80-
export interface SomeInterface {
81-
foo: string;
82-
}
83-
84-
// @filename: index.ts
85-
// ---cut---
86-
import type { SomeInterface } from './SomeFile';
87-
```
88-
89-
You must use the `type` modifier because `svelte-preprocess` doesn't know whether an import is a type or a value — it only transpiles one file at a time without knowledge of the other files and therefore can't safely erase imports which only contain types without this modifier present.
90-
9162
## Does Svelte scale?
9263

9364
There will be a blog post about this eventually, but in the meantime, check out [this issue](https://github.com/sveltejs/svelte/issues/2546).
9465

9566
## Is there a UI component library?
9667

97-
There are several UI component libraries as well as standalone components. Find them under the [components section](https://sveltesociety.dev/components#design-systems) of the Svelte Society website.
68+
There are several UI component libraries as well as standalone components. Find them under the [design systems section of the components page](https://sveltesociety.dev/components#design-systems) on the Svelte Society website.
9869

9970
## How do I test Svelte apps?
10071

0 commit comments

Comments
 (0)