Skip to content

Commit

Permalink
Added missing methods declaration (index.d.ts) (react-native-maps#1930)
Browse files Browse the repository at this point in the history
  • Loading branch information
budiadiono authored and christopherdro committed Jan 7, 2018
1 parent d598a99 commit 148c4d3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
declare module "react-native-maps" {
import * as React from 'react';

export interface Region {
latitude: number
longitude: number
latitudeDelta: number
longitudeDelta: number
}

export interface LatLng {
latitude: number
longitude: number
}

export interface MapViewProps {
provider?: 'google';
Expand Down Expand Up @@ -57,6 +69,14 @@ declare module "react-native-maps" {
export default class MapView extends React.Component<MapViewProps, any> {
static Animated: any;
static AnimatedRegion: any;
animateToRegion(region: Region, duration?: number): void;
animateToCoordinate(latLng: LatLng, duration?: number): void;
animateToBearing(bearing: number, duration?: number): void;
animateToViewingAngle(angle: number, duration?: number): void;
fitToElements(animated: boolean): void;
fitToSuppliedMarkers(markers: string[], animated: boolean): void;
fitToCoordinates(coordinates?: LatLng[], options?:{}): void;
setMapBoundaries(northEast: LatLng, southWest: LatLng): void;
}

export type LineCapType = 'butt' | 'round' | 'square';
Expand Down

0 comments on commit 148c4d3

Please sign in to comment.