[docs] set language on FAQ code blocks (#7237)

pull/7248/head
Geoff Rich 3 years ago committed by GitHub
parent eb6fb66f19
commit a4a1c3c272
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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';

@ -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';
```

Loading…
Cancel
Save