DefinitelyTyped/types/leaflet.pancontrol/index.d.ts
Brictarus 3aa8aa9e93 Add types for leaflet.pancontrol NPM package (#22618)
* Add types for leaflet.pancontrol NPM package

* Add typescript minimal version because of leaflet dependency
2018-01-02 10:44:42 -08:00

30 lines
742 B
TypeScript

// Type definitions for leaflet.pancontrol 1.0
// Project: https://github.com/kartena/Leaflet.Pancontrol
// Definitions by: Brictarus <https://github.com/Brictarus>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import { ControlOptions, Control as LControl } from 'leaflet';
declare module 'leaflet' {
interface MapOptions {
panControl?: boolean;
}
namespace control {
function pan(options?: Control.PanControlOptions): Control.Pan;
}
namespace Control {
interface PanControlOptions extends ControlOptions {
panOffset?: number;
}
class Pan extends LControl {
options: PanControlOptions;
constructor(options?: PanControlOptions);
}
}
}