🤖 Merge PR #49925 Changed faker.address.nearByGPSCoordinate() coordinate parameter type from string to ReadOnlyArray<string> by @evengul

* Changed type of coordinate to string[] from string. The function itself uses coordinate[0] and coordinate[1] as latitude and longitude, so the old type led to a typeerror when you tried to input the coordinate array.

The test has been changed to reflect the change in input.

* Changed the type of faker.address.nearByGPSCoordinate's parameter coordinate from string[] to ReadOnlyArray<string>.
This commit is contained in:
evengul
2020-12-03 15:27:48 +01:00
committed by GitHub
parent 0ccadb4963
commit 4c93caeeab
2 changed files with 2 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ resultStr = faker.address.cardinalDirection(true);
resultStr = faker.address.ordinalDirection();
resultStr = faker.address.ordinalDirection(true);
resultStrArr = faker.address.nearbyGPSCoordinate();
resultStrArr = faker.address.nearbyGPSCoordinate('foo', 0, true);
resultStrArr = faker.address.nearbyGPSCoordinate(['0', '0'], 0, true);
resultStr = faker.address.timeZone();
resultStr = faker.commerce.color();

View File

@@ -36,7 +36,7 @@ declare namespace Faker {
direction(useAbbr?: boolean): string;
cardinalDirection(useAbbr?: boolean): string;
ordinalDirection(useAbbr?: boolean): string;
nearbyGPSCoordinate(coordinate?: string, radius?: number, isMetric?: boolean): string[];
nearbyGPSCoordinate(coordinate?: ReadonlyArray<string>, radius?: number, isMetric?: boolean): string[];
timeZone(): string;
};