Skip to content

Commit 0296cac

Browse files
authored
(docs) remove now obsolete troubleshooting
#228 fixed through #351
1 parent d15939c commit 0296cac

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

docs/preprocessors/typescript.md

-34
Original file line numberDiff line numberDiff line change
@@ -126,37 +126,3 @@ $: show = !!data.someKey; // <-- `show` now has type `boolean`
126126
### Can I use TypeScript syntax inside the template/mustache tags?
127127

128128
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.
129-
130-
### I get weird type errors on my html tags
131-
132-
This may be due to some library you are using having installed typings for `react`. These are picked up by the TypeScript compiler. Because we internally transform svelte to jsx, there is a clash and said error occurs.
133-
134-
![image](https://user-images.githubusercontent.com/374638/85633868-72697280-b67a-11ea-8f8c-7fe2b4702339.png)
135-
136-
The underlying [issue in TypeScript](https://github.com/microsoft/TypeScript/issues/18588) is yet to be fixed but in the meantime, one way to work around it is as follows:
137-
138-
1. Add a `sink.d.ts` with content `declare module 'react' {}`
139-
2. Go to your `tsconfig.json`
140-
3. If you do not have such a setting already, enhance `compilerOptions` with `"baseUrl": "."`
141-
4. Enhance `compilerOptions` with `"paths": { "react": ["<path to your sink.d.ts, relative to the baseUrl>"] }`
142-
143-
`tsconfig.json`
144-
145-
```json
146-
{
147-
"compilerOptions": {
148-
"baseUrl": ".",
149-
"paths": {
150-
"react": ["sink.d.ts"]
151-
}
152-
}
153-
}
154-
```
155-
156-
`sink.d.ts:`
157-
158-
```ts
159-
declare module 'react';
160-
```
161-
162-
For more info see [this issue](https://github.com/sveltejs/language-tools/issues/228)

0 commit comments

Comments
 (0)