aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShinigami92 <[email protected]>2022-01-11 13:00:40 +0100
committerDamien Retzinger <[email protected]>2022-01-14 18:37:49 -0500
commitfb51209888653a19b13731f8a748372247c5dc8f (patch)
tree08fbf2edb4c21ec53dd0e90b358370e01322e4fb /src
parentfc98303c228eaead7ce98304bc7cf9785501f5b7 (diff)
downloadfaker-fb51209888653a19b13731f8a748372247c5dc8f.tar.xz
faker-fb51209888653a19b13731f8a748372247c5dc8f.zip
chore: add @ts-expect-error
Diffstat (limited to 'src')
-rw-r--r--src/index.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts
index f605e032..cf63c266 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -34,7 +34,8 @@ export class Faker {
locale: string;
localeFallback: string;
- readonly definitions = {};
+ // @ts-expect-error: will be lazy filled by constructor
+ readonly definitions: Record<keyof DefinitionTypes, any> = {};
private readonly definitionTypes: DefinitionTypes = {
name: [
'first_name',
@@ -180,6 +181,7 @@ export class Faker {
}
// TODO @Shinigami92 2022-01-11: We may have a bug here for the keys 'title' and 'separator'
+ // @ts-expect-error
types[t].forEach((p) => {
Object.defineProperty(this.definitions[t], p, {
get: () => {