aboutsummaryrefslogtreecommitdiff
path: root/src/modules/location
diff options
context:
space:
mode:
authorShinigami <[email protected]>2024-01-24 18:09:37 +0100
committerGitHub <[email protected]>2024-01-24 18:09:37 +0100
commitca50f824919a199fd9c6148d5521e5bf991da156 (patch)
tree40aff90c67e002da69371f406786e2a2e7cdd08d /src/modules/location
parente0e9ab131f297deb0b49c3fc3fcdc10245b51c4a (diff)
downloadfaker-ca50f824919a199fd9c6148d5521e5bf991da156.tar.xz
faker-ca50f824919a199fd9c6148d5521e5bf991da156.zip
docs: fix missing deprecations (#2614)
Diffstat (limited to 'src/modules/location')
-rw-r--r--src/modules/location/index.ts25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/modules/location/index.ts b/src/modules/location/index.ts
index 20e26093..0bd679cc 100644
--- a/src/modules/location/index.ts
+++ b/src/modules/location/index.ts
@@ -477,6 +477,8 @@ export class LocationModule extends ModuleBase {
* faker.location.latitude(10, -10, 5) // 2.68452
*
* @since 8.0.0
+ *
+ * @deprecated Use `faker.location.latitude({ max, min, precision })` instead.
*/
latitude(max?: number, min?: number, precision?: number): number;
/**
@@ -494,9 +496,6 @@ export class LocationModule extends ModuleBase {
* faker.location.latitude({ max: 10 }) // 5.7225
* faker.location.latitude({ max: 10, min: -10 }) // -9.6273
* faker.location.latitude({ max: 10, min: -10, precision: 5 }) // 2.68452
- * faker.location.latitude(10) // 5.7225
- * faker.location.latitude(10, -10) // -9.6273
- * faker.location.latitude(10, -10, 5) // 2.68452
*
* @since 8.0.0
*/
@@ -541,9 +540,6 @@ export class LocationModule extends ModuleBase {
* faker.location.latitude({ max: 10 }) // 5.7225
* faker.location.latitude({ max: 10, min: -10 }) // -9.6273
* faker.location.latitude({ max: 10, min: -10, precision: 5 }) // 2.68452
- * faker.location.latitude(10) // 5.7225
- * faker.location.latitude(10, -10) // -9.6273
- * faker.location.latitude(10, -10, 5) // 2.68452
*
* @since 8.0.0
*/
@@ -574,6 +570,12 @@ export class LocationModule extends ModuleBase {
legacyPrecision = 4
): number {
if (typeof options === 'number') {
+ deprecated({
+ deprecated: 'faker.location.latitude(max, min, precision)',
+ proposed: 'faker.location.latitude({ max, min, precision })',
+ since: '8.0',
+ until: '9.0',
+ });
options = { max: options };
}
@@ -633,6 +635,8 @@ export class LocationModule extends ModuleBase {
* faker.location.longitude({ max: 10, min: -10, precision: 5 }) // 2.68452
*
* @since 8.0.0
+ *
+ * @deprecated Use `faker.location.longitude({ max, min, precision })` instead.
*/
longitude(max?: number, min?: number, precision?: number): number;
/**
@@ -694,9 +698,6 @@ export class LocationModule extends ModuleBase {
* faker.location.longitude({ max: 10 }) // 2.4387
* faker.location.longitude({ max: 10, min: -10 }) // 6.9126
* faker.location.longitude({ max: 10, min: -10, precision: 5 }) // -4.03620
- * faker.location.longitude(10) // 2.4387
- * faker.location.longitude(10, -10) // 6.9126
- * faker.location.longitude(10, -10, 5) // -4.03620
*
* @since 8.0.0
*/
@@ -727,6 +728,12 @@ export class LocationModule extends ModuleBase {
legacyPrecision = 4
): number {
if (typeof options === 'number') {
+ deprecated({
+ deprecated: 'faker.location.longitude(max, min, precision)',
+ proposed: 'faker.location.longitude({ max, min, precision })',
+ since: '8.0',
+ until: '9.0',
+ });
options = { max: options };
}