diff options
| author | ST-DDT <[email protected]> | 2024-10-20 17:49:39 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-10-20 15:49:39 +0000 |
| commit | abd4d247707a123272a3b337d7183230eec860b7 (patch) | |
| tree | 913b1633b797a379db406e0f01d329a387b96be9 /docs/guide/usage.md | |
| parent | 7141608aa0a570be88dc7f0ffb6dbd9a2c72c2ab (diff) | |
| download | faker-abd4d247707a123272a3b337d7183230eec860b7.tar.xz faker-abd4d247707a123272a3b337d7183230eec860b7.zip | |
docs: mention strict typescript usage (#3171)
Diffstat (limited to 'docs/guide/usage.md')
| -rw-r--r-- | docs/guide/usage.md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/guide/usage.md b/docs/guide/usage.md index 52205677..9b5bbf93 100644 --- a/docs/guide/usage.md +++ b/docs/guide/usage.md @@ -94,7 +94,8 @@ It is highly recommended to use version tags when importing libraries in Deno, e ## TypeScript Support -Faker supports TypeScript out of the box, so you don't have to install any extra packages. +We assume that you use TypeScript (strict mode). +You can use Faker without it, but we don't have dedicated error messages for wrong parameter types. In order to have Faker working properly, you need to check if these `compilerOptions` are set correctly in your `tsconfig` file: @@ -102,7 +103,8 @@ In order to have Faker working properly, you need to check if these `compilerOpt { "compilerOptions": { "esModuleInterop": true, - "moduleResolution": "Bundler" // "Node10", "Node16" or "NodeNext" + "moduleResolution": "Bundler", // "Node10", "Node16" or "NodeNext" + "strict": true // Optional, but recommended } } ``` |
