Skip to content

Commit

Permalink
docs: mention strict typescript usage (#3171)
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Oct 20, 2024
1 parent 7141608 commit abd4d24
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/guide/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,17 @@ 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:

```json
{
"compilerOptions": {
"esModuleInterop": true,
"moduleResolution": "Bundler" // "Node10", "Node16" or "NodeNext"
"moduleResolution": "Bundler", // "Node10", "Node16" or "NodeNext"
"strict": true // Optional, but recommended
}
}
```
Expand Down

0 comments on commit abd4d24

Please sign in to comment.