You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/docs/05-misc/01-faq.md
+1-30Lines changed: 1 addition & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -59,42 +59,13 @@ It will show up on hover.
59
59
60
60
Note: The `@component` is necessary in the HTML comment which describes your component.
61
61
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
-
exportinterfaceSomeInterface {
81
-
foo:string;
82
-
}
83
-
84
-
// @filename: index.ts
85
-
// ---cut---
86
-
importtype { 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
-
91
62
## Does Svelte scale?
92
63
93
64
There will be a blog post about this eventually, but in the meantime, check out [this issue](https://github.com/sveltejs/svelte/issues/2546).
94
65
95
66
## Is there a UI component library?
96
67
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.
0 commit comments