Skip to content

Commit

Permalink
Merge pull request #4 from 365talents/feat/add-types
Browse files Browse the repository at this point in the history
feat: add some basic types
  • Loading branch information
arnaudvalle authored Oct 11, 2024
2 parents ccfc55e + 46ae46f commit f5d2c9c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// https://github.com/jan-rus/country-in-text-detector/
declare module 'country-in-text-detector' {
type CountryResult = {
iso3166: string;
name: string;
type: 'country';
matches: string[];
};

type CityResult = {
iso3166: string;
name: string;
countryName: string;
type: 'city';
matches: string[];
};

export function detect(text: string): Array<CountryResult | CityResult>;
}

0 comments on commit f5d2c9c

Please sign in to comment.