diff options
| author | DivisionByZero <[email protected]> | 2023-02-18 16:05:22 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-02-18 15:05:22 +0000 |
| commit | fccd641f02fc0db463d34e1a7cc459ad6bd0b265 (patch) | |
| tree | 50a74c5d2ef9ed59119be6c597347fd45981d7b7 /src | |
| parent | 6b41a79d82256f4ae48e69a6c0b6c4b6d73281db (diff) | |
| download | faker-fccd641f02fc0db463d34e1a7cc459ad6bd0b265.tar.xz faker-fccd641f02fc0db463d34e1a7cc459ad6bd0b265.zip | |
refactor(datatype): deprecate `json` (#1852)
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/datatype/index.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/datatype/index.ts b/src/modules/datatype/index.ts index 7410e149..bf07cfd5 100644 --- a/src/modules/datatype/index.ts +++ b/src/modules/datatype/index.ts @@ -383,8 +383,17 @@ export class DatatypeModule { * faker.datatype.json() // `{"foo":"mxz.v8ISij","bar":29154,"bike":8658,"a":"GxTlw$nuC:","b":40693,"name":"%'<FTou{7X","prop":"X(bd4iT>77"}` * * @since 5.5.0 + * + * @deprecated Build your own function to generate complex objects. */ json(): string { + deprecated({ + deprecated: 'faker.datatype.json()', + proposed: 'your own function to generate complex objects', + since: '8.0', + until: '9.0', + }); + const properties = ['foo', 'bar', 'bike', 'a', 'b', 'name', 'prop']; const returnObject: Record<string, string | number> = {}; |
