diff options
| author | Shinigami92 <[email protected]> | 2022-01-14 19:21:49 +0100 |
|---|---|---|
| committer | Damien Retzinger <[email protected]> | 2022-01-14 18:37:49 -0500 |
| commit | fa0079df8d2c153fc5a9eabb85ec19366f477a46 (patch) | |
| tree | a680bd3e46f907f2cff6c5ab6ca101dcb3cc6111 | |
| parent | 661f3b4272b2a429c704ab31b4e839bd9ac94f94 (diff) | |
| download | faker-fa0079df8d2c153fc5a9eabb85ec19366f477a46.tar.xz faker-fa0079df8d2c153fc5a9eabb85ec19366f477a46.zip | |
chore: typify index.js
| -rw-r--r-- | index.d.ts | 3 | ||||
| -rw-r--r-- | index.js | 7 | ||||
| -rw-r--r-- | index.ts | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 00000000..9a883c7e --- /dev/null +++ b/index.d.ts @@ -0,0 +1,3 @@ +import { Faker } from './lib'; +declare const faker: Faker; +export = faker; @@ -1,4 +1,5 @@ +"use strict"; // since we are requiring the top level of faker, load all locales by default -var Faker = require('./lib'); -var faker = new Faker({ locales: require('./lib/locales') }); -module['exports'] = faker; +var lib_1 = require("./lib"); +var faker = new lib_1.Faker({ locales: require('./lib/locales') }); +module.exports = faker; diff --git a/index.ts b/index.ts new file mode 100644 index 00000000..fd90f2b2 --- /dev/null +++ b/index.ts @@ -0,0 +1,4 @@ +// since we are requiring the top level of faker, load all locales by default +import { Faker } from './lib'; +const faker: Faker = new Faker({ locales: require('./lib/locales') }); +export = faker; |
