aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorStéphane Prohaszka <[email protected]>2022-02-22 14:17:36 +0100
committerGitHub <[email protected]>2022-02-22 14:17:36 +0100
commit03c3d1156312153428f2db5649b24dd5fc046d43 (patch)
tree4ae7dadb155ab2483b9180d23188ea4ab84a9280 /README.md
parent92dc6418f83d311526031ffa656ccf9c48b701ee (diff)
downloadfaker-03c3d1156312153428f2db5649b24dd5fc046d43.tar.xz
faker-03c3d1156312153428f2db5649b24dd5fc046d43.zip
docs: Add prerequisite for typescript configuration (#539)
Diffstat (limited to 'README.md')
-rw-r--r--README.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/README.md b/README.md
index d65d99ca..cf2d71ba 100644
--- a/README.md
+++ b/README.md
@@ -73,6 +73,17 @@ const randomCard = faker.helpers.createCard(); // random contact card containing
Since version `v6+` there is native TypeScript support.
+In order to have faker working properly, you need to check if these `compilerOptions` are set correctly in your `tsconfig` file:
+
+```json
+{
+ "compilerOptions": {
+ "esModuleInterop": true,
+ "moduleResolution": "Node"
+ }
+}
+```
+
If you want for whatever reason the versions prior to `v6`,
you can use `@types/faker` and rebind the declarations to the `@faker-js/faker` package with a `faker.d.ts` file in your e.g. src folder.