Skip to content

Commit 3149873

Browse files
committed
feat: update action types
1 parent ceee0d5 commit 3149873

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/geolocation-controller/src/GeolocationController-method-action-types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
import type { GeolocationController } from './GeolocationController';
77

88
/**
9-
* Returns the geolocation country code. Delegates to the
9+
* Returns the geolocation code. Delegates to the
1010
* {@link GeolocationApiService} for network fetching and caching, then
1111
* updates controller state with the result.
1212
*
13-
* @returns The ISO country code string.
13+
* @returns The ISO 3166-2 location code string.
1414
*/
1515
export type GeolocationControllerGetGeolocationAction = {
1616
type: `GeolocationController:getGeolocation`;
@@ -20,7 +20,7 @@ export type GeolocationControllerGetGeolocationAction = {
2020
/**
2121
* Forces a fresh geolocation fetch, bypassing the service's cache.
2222
*
23-
* @returns The ISO country code string.
23+
* @returns The ISO 3166-2 location code string.
2424
*/
2525
export type GeolocationControllerRefreshGeolocationAction = {
2626
type: `GeolocationController:refreshGeolocation`;

packages/geolocation-controller/src/geolocation-api-service/geolocation-api-service-method-action-types.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
import type { GeolocationApiService } from './geolocation-api-service';
77

88
/**
9-
* Returns the geolocation country code. Serves from cache when the TTL has
10-
* not expired, otherwise performs a network fetch. Concurrent callers are
9+
* Returns the geolocation code. Serves from cache when the TTL has not
10+
* expired, otherwise performs a network fetch. Concurrent callers are
1111
* deduplicated to a single in-flight request.
1212
*
1313
* @param options - Optional fetch options.
1414
* @param options.bypassCache - When true, invalidates the cache and forces a
1515
* fresh network request.
16-
* @returns The ISO 3166-1 alpha-2 country code, or `UNKNOWN_LOCATION`
17-
* when the API returns an empty or invalid body.
16+
* @returns An ISO 3166-2 location code (e.g. `US`, `US-NY`, `CA-ON`), or
17+
* `UNKNOWN_LOCATION` when the API returns an empty or invalid body.
1818
*/
1919
export type GeolocationApiServiceFetchGeolocationAction = {
2020
type: `GeolocationApiService:fetchGeolocation`;

0 commit comments

Comments
 (0)