mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
🤖 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:
@@ -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();
|
||||
|
||||
2
types/faker/index.d.ts
vendored
2
types/faker/index.d.ts
vendored
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user