Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/content/faq/450-how-do-i-document-my-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ question: How do I document my components?

In editors which use the Svelte Language Server you can document Components, functions and exports using specially formatted comments.

````svelte
````sv
<script>
/** What should we call the user? */
export let name = 'world';
Expand Down
4 changes: 2 additions & 2 deletions site/content/faq/500-what-about-typescript-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ You need to install a preprocessor such as [svelte-preprocess](https://github.co

To declare the type of a reactive variable in a Svelte template, you should use the following syntax:

```
```ts
let x: number;
$: x = count + 1;
```

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):

```
```ts
import type { SomeInterface } from './SomeFile';
```

Expand Down