From abd4d247707a123272a3b337d7183230eec860b7 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Sun, 20 Oct 2024 17:49:39 +0200 Subject: [PATCH] docs: mention strict typescript usage (#3171) --- docs/guide/usage.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/guide/usage.md b/docs/guide/usage.md index 522056779cf..9b5bbf934b8 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 } } ```