From 5297b2b337cb2bcdc50c9ac395495bc971c88b8e Mon Sep 17 00:00:00 2001 From: pngwn Date: Sun, 15 Aug 2021 17:28:49 +0100 Subject: [PATCH] docs: fix heading levels (#6655) --- site/content/blog/2020-07-17-svelte-and-typescript.md | 10 +++++----- .../2020-10-01-whats-new-in-svelte-october-2020.md | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/site/content/blog/2020-07-17-svelte-and-typescript.md b/site/content/blog/2020-07-17-svelte-and-typescript.md index bb5f389aa2..16b3f7f260 100644 --- a/site/content/blog/2020-07-17-svelte-and-typescript.md +++ b/site/content/blog/2020-07-17-svelte-and-typescript.md @@ -41,7 +41,7 @@ When we say that Svelte now supports TypeScript, we mean a few different things: * You get autocompletion hints and type-checking as you're writing components, even in expressions inside markup * TypeScript files understand the Svelte component API — no more red squiggles when you import a `.svelte` file into a `.ts` module -#### How does it work? +### How does it work? To understand the two main parts of TypeScript support, we'll compare it to the technique TypeScript uses to provide dev tools. There is a compiler `tsc` which you run on the command-line to convert `*.ts` to `*.js`, then there is a `TSServer` which is a node API that responds to requests from text editors. The `TSServer` is what provides all the JavaScript and TypeScript realtime introspection for editors while coding, and it has most of the compiler's code inside it. @@ -52,7 +52,7 @@ The Svelte compiler support for TypeScript is handled by [Christian Kaisermann]( For the editor level, we took inspiration from [Pine's](https://github.com/octref) work in the [Vue](https://vuejs.org) ecosystem via [Vetur](https://github.com/vuejs/vetur). Vetur provides an [LSP](https://github.com/vuejs/vetur/blob/master/server), a VS Code extension and a [CLI](https://github.com/vuejs/vetur/blob/master/vti). Svelte now also has an [LSP](https://github.com/sveltejs/language-tools/blob/master/packages/language-server), a [VS Code extension](https://github.com/sveltejs/language-tools/blob/master/packages/svelte-vscode) and a [CLI](https://github.com/sveltejs/language-tools/blob/master/packages/svelte-check). -#### `*.svelte` Introspection +### `*.svelte` Introspection For the official Svelte VS Code extension, we built off the foundations which [James Birtles](https://github.com/UnwrittenFun) has created in [`UnwrittenFun/svelte-vscode`](https://github.com/UnwrittenFun/svelte-vscode) and [`UnwrittenFun/svelte-language-server`](https://github.com/UnwrittenFun/svelte-language-server/). @@ -67,7 +67,7 @@ Before getting started, add the dependencies: npm install --save-dev @tsconfig/svelte typescript svelte-preprocess svelte-check ``` -##### 1. Compiling TypeScript +### 1. Compiling TypeScript You first need to set up [`svelte-preprocess`](https://github.com/sveltejs/svelte-preprocess#svelte-preprocess), which passes the contents of your `