Skip to content

Commit fc82a27

Browse files
authored
(docs) Update typescript.md (#401)
Some advice about getting vscode to allow absolute imports and not just relative ones.
1 parent 9386d04 commit fc82a27

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/preprocessors/typescript.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,13 @@ $: show = !!data.someKey; // <-- `show` now has type `boolean`
128128
### Can I use TypeScript syntax inside the template/mustache tags?
129129

130130
At the moment, you cannot. Only `script`/`style` tags are preprocessed/transpiled. See [this issue](https://github.com/sveltejs/svelte/issues/4701) for more info.
131+
132+
### Why is VSCode not finding absolute paths for type imports?
133+
134+
You may need to set `baseUrl` in `tsconfig.json` at the project root to include (restart the language server to see this take effect):
135+
```
136+
"compilerOptions": {
137+
"baseUrl": "."
138+
}
139+
}
140+
```

0 commit comments

Comments
 (0)