Add troubleshooting section to dev-utils section

This commit is contained in:
Fabio B 2018-11-28 16:56:48 +00:00 committed by GitHub
parent 4861e48059
commit 53f8e1b3b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,21 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol
} }
``` ```
## Troubleshooting
If you are still seeing TS type errors complaining about missing DOM types such as `Response`:
```
error TS2304: Cannot find name 'Response'.
```
Then you need to explicitly add the `dom` lib to your compiler options in `tsconfig.json`. The `dom` library is included by default, but customizing the `lib` option can cause it to be dropped.
```
"compilerOptions": {
"lib": [..., "dom"],
```
## Contributing ## Contributing
We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.