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

pull/7738/head
Geoff Rich 5 years ago committed by GitHub
parent fe036817ef
commit cd07f30419

@ -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. In editors which use the Svelte Language Server you can document Components, functions and exports using specially formatted comments.
````svelte ````sv
<script> <script>
/** What should we call the user? */ /** What should we call the user? */
export let name = 'world'; 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: To declare the type of a reactive variable in a Svelte template, you should use the following syntax:
``` ```ts
let x: number; let x: number;
$: x = count + 1; $: 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): 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'; import type { SomeInterface } from './SomeFile';
``` ```

Loading…
Cancel
Save