diff --git a/types/react-places-autocomplete/index.d.ts b/types/react-places-autocomplete/index.d.ts index f4609e9ca0..568a0db0ca 100644 --- a/types/react-places-autocomplete/index.d.ts +++ b/types/react-places-autocomplete/index.d.ts @@ -8,8 +8,7 @@ // TypeScript Version: 2.8 // /// - -import * as React from "react"; +import * as React from 'react'; export type AutocompletePrediction = google.maps.places.AutocompletePrediction; @@ -29,6 +28,8 @@ export interface Suggestion { } export interface PropTypes { + onChange?: (value: string) => void; + value?: string; onError?: (status: string, clearSuggestion: () => void) => void; onSelect?: (address: string, placeID: string) => void; searchOptions?: { @@ -39,13 +40,10 @@ export interface PropTypes { radius?: number | string; types?: string[]; }; - value?: string; - onChange?: (value: string) => void; - debounce?: number; highlightFirstSuggestion?: boolean; shouldFetchSuggestions?: boolean; - + googleCallbackName?: string; children: (opts: Readonly<{ loading: boolean; suggestions: ReadonlyArray; diff --git a/types/react-places-autocomplete/react-places-autocomplete-tests.tsx b/types/react-places-autocomplete/react-places-autocomplete-tests.tsx index d2420edb6b..7d72ac4397 100644 --- a/types/react-places-autocomplete/react-places-autocomplete-tests.tsx +++ b/types/react-places-autocomplete/react-places-autocomplete-tests.tsx @@ -1,5 +1,7 @@ import * as React from 'react'; -import PlacesAutocomplete, { geocodeByAddress, geocodeByPlaceId, getLatLng } from 'react-places-autocomplete'; +import PlacesAutocomplete, { + geocodeByAddress, geocodeByPlaceId, getLatLng +} from 'react-places-autocomplete'; class Test extends React.Component { state = { @@ -28,7 +30,7 @@ class Test extends React.Component { render() { return (
- + {({getInputProps, getSuggestionItemProps, suggestions}) => ( <>