Skip to content

Commit

Permalink
[docs] set language on FAQ code blocks (sveltejs#7237)
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffrich authored and nevilm-lt committed Apr 21, 2022
1 parent 6eba853 commit 420086a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit 420086a

Please sign in to comment.