From 049b4cdcf9743f0a8dbf1362f93798b948381083 Mon Sep 17 00:00:00 2001 From: Jess Date: Tue, 11 Jan 2022 13:10:37 -0500 Subject: [PATCH 1/2] docs: add installation instructions to top of README --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index e5734871e70..784cddef7c8 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,14 @@ Generate massive amounts of fake data in the browser and node.js. [![Chat on Discord](https://img.shields.io/discord/929487054990110771)](https://discord.com/invite/4qDjAmDj4P) +## Installation + +Please replace your `faker` dependency with `@faker-js/faker`. This is the official, stable fork of Faker. + +```shell +npm install @faker-js/faker -D +``` + ## FAQ - What happened to the original faker.js? This project was originally created and hosted at https://github.com/marak/Faker.js/ - however around 4th Jan, 2022 - the author decided to delete the repository (for unknown reasons). From 019f0ed2dfc9c4c63f92a24f6b40489e7b59904b Mon Sep 17 00:00:00 2001 From: Jess Date: Tue, 11 Jan 2022 17:26:55 -0500 Subject: [PATCH 2/2] docs: add Typescript Support instructions to README --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 784cddef7c8..55223eef3e0 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,18 @@ Please replace your `faker` dependency with `@faker-js/faker`. This is the offic npm install @faker-js/faker -D ``` +### Typescript Support + +Types are available via the `@types/faker` package. You must manually link them using a `*.d.ts` file, like so: + +```typescript +// faker.d.ts +declare module '@faker-js/faker' { + import faker from 'faker'; + export default faker; +} +``` + ## FAQ - What happened to the original faker.js? This project was originally created and hosted at https://github.com/marak/Faker.js/ - however around 4th Jan, 2022 - the author decided to delete the repository (for unknown reasons).