fullstackreact / google-maps-react

Companion code to the "How to Write a Google Maps React Component" Tutorial
https://www.fullstackreact.com/articles/how-to-write-a-google-maps-react-component/
MIT License
1.64k stars 819 forks source link

Typescript definitions? #155

Open sheam opened 6 years ago

sheam commented 6 years ago

Any chance of getting typescript definitions? I may have time to do them at some point...

hrc7505 commented 6 years ago

I also want type definitions.

auser commented 6 years ago

This would be great. @sheam Definitely would love to get types in.

alamothe commented 6 years ago

+1

Seems like a pretty good and well-maintained project - but it's useless without type definitions.

auser commented 5 years ago

@alamothe feel like adding some? I’m away from the keyboard, but can definitely review a PR if ya do.

valoricDe commented 5 years ago

At least some typings for GoogleApiWrapper

declare module 'google-maps-react' {
  import google from '@types/googlemaps'
  import { ComponentType } from 'react'
  import { InferableComponentEnhancer } from 'react-redux'

  interface Options {
    apiKey: string
    libraries?: string[]
    version?: string
    language?: string
    url?: string
    client?: any
    LoadingContainer?: ComponentType<any>
  }

  export interface GoogleApiWrapperProps {
    google: google;
  }

  type Connect = (options: Options) => InferableComponentEnhancer<GoogleApiWrapperProps>;

  export declare const GoogleApiWrapper: Connect
}