Skip to content

Commit

Permalink
fix: export provider ersi and algolia result types
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscofsales committed Apr 30, 2024
1 parent 555f153 commit 8779de0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/providers/algoliaProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import AbstractProvider, {
SearchResult,
} from './provider';

interface RequestResult {
export interface RequestResult {
hits: RawResult[];
}

Expand All @@ -16,7 +16,7 @@ interface ValueMatch {
fullyHighlighted?: boolean;
}

interface RawResult {
export interface RawResult {
country: { [key: string]: string };
country_code: string;
city: { [key: string]: string[] };
Expand Down Expand Up @@ -86,21 +86,21 @@ export default class Provider extends AbstractProvider<
return [
// Building + Street
result.locale_names?.default[
this.findBestMatchLevelIndex(
result._highlightResult.locale_names.default,
)
this.findBestMatchLevelIndex(

Check failure on line 89 in src/providers/algoliaProvider.ts

View workflow job for this annotation

GitHub Actions / Eslint

Insert `··`
result._highlightResult.locale_names.default,

Check failure on line 90 in src/providers/algoliaProvider.ts

View workflow job for this annotation

GitHub Actions / Eslint

Insert `··`
)

Check failure on line 91 in src/providers/algoliaProvider.ts

View workflow job for this annotation

GitHub Actions / Eslint

Insert `··`
],
// City
result.city?.default[
this.findBestMatchLevelIndex(result._highlightResult.city.default)
this.findBestMatchLevelIndex(result._highlightResult.city.default)

Check failure on line 95 in src/providers/algoliaProvider.ts

View workflow job for this annotation

GitHub Actions / Eslint

Insert `··`
],
// Administrative (State / Province)
result.administrative[
this.findBestMatchLevelIndex(result._highlightResult.administrative)
this.findBestMatchLevelIndex(result._highlightResult.administrative)

Check failure on line 99 in src/providers/algoliaProvider.ts

View workflow job for this annotation

GitHub Actions / Eslint

Insert `··`
],
// Zip code / Postal code
result.postcode?.[
this.findBestMatchLevelIndex(result._highlightResult.postcode)
this.findBestMatchLevelIndex(result._highlightResult.postcode)

Check failure on line 103 in src/providers/algoliaProvider.ts

View workflow job for this annotation

GitHub Actions / Eslint

Insert `··`
],
// Country
result.country?.default,
Expand Down
4 changes: 2 additions & 2 deletions src/providers/esriProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import AbstractProvider, {
SearchResult,
} from './provider';

interface RequestResult {
export interface RequestResult {
spatialReference: { wkid: number; latestWkid: number };
locations: RawResult[];
}

interface RawResult {
export interface RawResult {
name: string;
extent: {
xmin: number;
Expand Down

0 comments on commit 8779de0

Please sign in to comment.