Installation
npm install --save @types/react-select-country-list
Summary
This package contains type definitions for react-select-country-list (https://github.com/Chun-Lin/react-select-country-list).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-select-country-list.
declare namespace ReactSelectCountries {
interface CountryData {
label: string;
value: string;
}
interface LabelValueMap {
[key: string]: string;
}
interface Countries {
data: CountryData[];
labelMap: LabelValueMap;
valueMap: LabelValueMap;
}
interface NativeCountries extends Countries {
nativeData: CountryData[];
}
}
declare class CountryList {
data: ReactSelectCountries.CountryData[];
labelMap: ReactSelectCountries.LabelValueMap;
valueMap: ReactSelectCountries.LabelValueMap;
getValue(label: string): string;
getLabel(value: string): string;
getValues(): string[];
getLabels(): string[];
getLabelList(): ReactSelectCountries.LabelValueMap;
getValueList(): ReactSelectCountries.LabelValueMap;
getData(): ReactSelectCountries.CountryData[];
setLabel(value: string, label: string): ReactSelectCountries.Countries;
setEmpty(label: string): ReactSelectCountries.Countries;
native(): ReactSelectCountries.NativeCountries;
}
declare function countryList(): CountryList;
export = countryList;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: none
Credits
These definitions were written by Kieran Roberts.