diff options
| author | Stéphane Prohaszka <[email protected]> | 2022-02-22 14:17:36 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-02-22 14:17:36 +0100 |
| commit | 03c3d1156312153428f2db5649b24dd5fc046d43 (patch) | |
| tree | 4ae7dadb155ab2483b9180d23188ea4ab84a9280 /README.md | |
| parent | 92dc6418f83d311526031ffa656ccf9c48b701ee (diff) | |
| download | faker-03c3d1156312153428f2db5649b24dd5fc046d43.tar.xz faker-03c3d1156312153428f2db5649b24dd5fc046d43.zip | |
docs: Add prerequisite for typescript configuration (#539)
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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. |
