Files
DefinitelyTyped/types/react-google-places-suggest/index.d.ts
Nathan Shively-Sanders f0ce987bc1 Update project urls to match NPM url
Note that this *trivially* updates project urls by adding the NPM url to
the end, even when the urls are almost identical or the DT one is
outdated. I'll clean up the urls in a later commit.

This PR is unfinished! Please do not merge it yet.
2019-02-11 17:10:55 -08:00

35 lines
1.3 KiB
TypeScript

// Type definitions for react-google-places-suggest 3.4
// Project: https://xuopled.github.io/react-google-places-suggest, https://github.com/xuopled/react-google-places-suggest
// Definitions by: Vasily Nesterov <https://github.com/vasilysn>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
/// <reference types="googlemaps" />
import { Component, ReactNode } from "react";
export default ReactGooglePlacesSuggest;
declare class ReactGooglePlacesSuggest extends Component<
ReactGooglePlacesSuggest.Props
> { }
declare namespace ReactGooglePlacesSuggest {
type Prediction = google.maps.places.AutocompletePrediction;
type GeocodedPrediction = google.maps.GeocoderResult;
interface Props {
autocompletionRequest: google.maps.places.AutocompletionRequest;
children?: ReactNode;
customRender?: (prediction?: Prediction) => JSX.Element | string;
customContainerRender?: (
predictions: ReadonlyArray<Prediction>
) => JSX.Element | string;
googleMaps: typeof google.maps;
onSelectSuggest?: (
geocodedPrediction: GeocodedPrediction,
originalPrediction: Prediction
) => any;
textNoResults?: string | null;
}
}