mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
react-map-gl - Added missing types (#40891)
* Added missing types Fixed missing types according to https://github.com/uber/react-map-gl/blob/5.1-release/examples/viewport-animation/src/app.js FlyToInterpolator class was missing it's constructor props and transitionDuration property couldn't have 'auto' value * Added tests changed types * Added my name to Definitions by * Reverted the auto-formatted codes, changed 'type' to 'interface' * Removed Unnecessary semicolon * Removed Unnecessary semicolons * Reverted formatting changes on test file
This commit is contained in:
16
types/react-map-gl/index.d.ts
vendored
16
types/react-map-gl/index.d.ts
vendored
@@ -4,6 +4,7 @@
|
||||
// Fabio Berta <https://github.com/fnberta>
|
||||
// Sander Siim <https://github.com/sandersiim>
|
||||
// Otto Urpelainen <https://github.com/oturpe>
|
||||
// Arman Safikhani <https://github.com/Arman92>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.0
|
||||
|
||||
@@ -126,7 +127,7 @@ export interface ViewportProps {
|
||||
minZoom: number;
|
||||
maxPitch: number;
|
||||
minPitch: number;
|
||||
transitionDuration?: number;
|
||||
transitionDuration?: number | 'auto';
|
||||
transitionInterpolator?: TransitionInterpolator;
|
||||
transitionInterruption?: TRANSITION_EVENTS;
|
||||
transitionEasing?: EasingFunction;
|
||||
@@ -215,7 +216,16 @@ export class LinearInterpolator extends TransitionInterpolator {
|
||||
constructor(transitionProps?: string[]);
|
||||
}
|
||||
|
||||
export class FlyToInterpolator extends TransitionInterpolator {}
|
||||
export interface FlyToInterpolatorProps {
|
||||
curve?: number;
|
||||
speed?: number;
|
||||
screenSpeed?: number;
|
||||
maxDuraiton?: number;
|
||||
}
|
||||
|
||||
export class FlyToInterpolator extends TransitionInterpolator {
|
||||
constructor(props?: FlyToInterpolatorProps);
|
||||
}
|
||||
|
||||
export interface ViewStateChangeInfo {
|
||||
viewState: ViewportProps;
|
||||
@@ -239,7 +249,7 @@ export interface InteractiveMapProps extends StaticMapProps {
|
||||
onViewStateChange?: ContextViewStateChangeHandler;
|
||||
onViewportChange?: ContextViewportChangeHandler;
|
||||
onInteractionStateChange?: (state: ExtraState) => void;
|
||||
transitionDuration?: number;
|
||||
transitionDuration?: number | 'auto';
|
||||
transitionInterpolator?: TransitionInterpolator;
|
||||
transitionInterruption?: TRANSITION_EVENTS;
|
||||
transitionEasing?: EasingFunction;
|
||||
|
||||
Reference in New Issue
Block a user