aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/README.md
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-23 17:00:27 +0800
committerFabio Berger <me@fabioberger.com>2018-07-23 17:00:27 +0800
commit4f73b81b9cb421817b56f747c367a02a37f16ce5 (patch)
treef7f41c041d059c6e2a75acb074a6d454f238fdd8 /packages/utils/README.md
parentb325ad17352f9418b6beb2d810b8b0c9c9f7bd23 (diff)
downloaddexon-sol-tools-4f73b81b9cb421817b56f747c367a02a37f16ce5.tar
dexon-sol-tools-4f73b81b9cb421817b56f747c367a02a37f16ce5.tar.gz
dexon-sol-tools-4f73b81b9cb421817b56f747c367a02a37f16ce5.tar.bz2
dexon-sol-tools-4f73b81b9cb421817b56f747c367a02a37f16ce5.tar.lz
dexon-sol-tools-4f73b81b9cb421817b56f747c367a02a37f16ce5.tar.xz
dexon-sol-tools-4f73b81b9cb421817b56f747c367a02a37f16ce5.tar.zst
dexon-sol-tools-4f73b81b9cb421817b56f747c367a02a37f16ce5.zip
Add troubleshooting section to utils README
Diffstat (limited to 'packages/utils/README.md')
-rw-r--r--packages/utils/README.md16
1 files changed, 15 insertions, 1 deletions
diff --git a/packages/utils/README.md b/packages/utils/README.md
index 82421e3ff..c9a2f5846 100644
--- a/packages/utils/README.md
+++ b/packages/utils/README.md
@@ -12,7 +12,6 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol
```json
"compilerOptions": {
- "lib": ["dom"],
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
@@ -23,6 +22,21 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol
import { addressUtils, bigNumberConfigs, classUtils, intervalUtils, promisify } from '@0xproject/utils';
```
+## 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
We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.