Skip to content

Commit

Permalink
Add type definition for AnimatedPoint (rnmapbox#1280)
Browse files Browse the repository at this point in the history
  • Loading branch information
naftalibeder authored and mikalaiulasevich committed Sep 23, 2021
1 parent dc6d860 commit b5f6971
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
StyleProp,
ImageSourcePropType,
} from 'react-native';
import ReactNative from 'react-native';

import {
Geometry,
Expand Down Expand Up @@ -156,6 +157,24 @@ declare namespace MapboxGL {
class BackgroundLayer extends Component<BackgroundLayerProps> { }
}

/**
* Classes
*/

class AnimatedPoint {
constructor(point?: GeoJSON.Point);
longitude: ReactNative.Animated.Value<number>;
latitude: ReactNative.Animated.Value<number>;
setValue: (point: GeoJSON.Point) => void;
setOffset: (point: GeoJSON.Point) => void;
flattenOffset: () => void;
stopAnimation: (cb?: () => GeoJSON.Point) => void;
addListener: (cb?: () => GeoJSON.Point) => void;
removeListener: (id: string) => void;
spring: (config: Record<string, any>) => ReactNative.Animated.CompositeAnimation;
timing: (config: Record<string, any>) => ReactNative.Animated.CompositeAnimation;
}

/**
* Components
*/
Expand Down

0 comments on commit b5f6971

Please sign in to comment.