Socket
Socket
Sign inDemoInstall

@types/leaflet

Package Overview
Dependencies
Maintainers
1
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/leaflet - npm Package Compare versions

Comparing version 1.0.39 to 1.0.40

126

leaflet/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for Leaflet.js 1.0.0
// Type definitions for Leaflet.js 1.0.2
// Project: https://github.com/Leaflet/Leaflet

@@ -12,8 +12,36 @@ // Definitions by: Alejandro Sánchez <https://github.com/alejo90>

export class Class {
static extend(props:any):any/* how to return constructor of self extended type ? */;
static include(props:any):any /* how to return self extended type ? */;
static mergeOptions(props:any): any /* how to return self extended type ? */;
static addInitHook(initHookFn: ()=> void): any/* how to return self extended type ? */;
static extend(props: any): any/* how to return constructor of self extended type ? */;
static include(props: any): any /* how to return self extended type ? */;
static mergeOptions(props: any): any /* how to return self extended type ? */;
static addInitHook(initHookFn: () => void): any/* how to return self extended type ? */;
}
export class Transformation {
constructor(a: number, b: number, c: number, d: number);
transform(point: Point, scale?: number): Point;
untransform(point: Point, scale?: number): Point;
}
export namespace LineUtil {
export function simplify(points: Array<Point>, tolerance: number): Array<Point>;
export function simplify(points: Array<PointTuple>, tolerance: number): Array<Point>;
export function pointToSegmentDistance(p: Point, p1: Point, p2: Point): number;
export function pointToSegmentDistance(p: PointTuple, p1: PointTuple, p2: PointTuple): number;
export function closestPointOnSegment(p: Point, p1: Point, p2: Point): Point;
export function closestPointOnSegment(p: PointTuple, p1: PointTuple, p2: PointTuple): Point;
}
export namespace PolyUtil {
export function clipPolygon(points: Array<Point>, bounds: Bounds, round?: boolean): Array<Point>;
export function clipPolygon(points: Array<PointTuple>, bounds: BoundsLiteral, round?: boolean): Array<Point>;
}
export class DomUtil {

@@ -37,9 +65,9 @@ static get(id: string): HTMLElement;

static setPosition(el: HTMLElement, position: Point):void;
static getPosition(el: HTMLElement): Point
static disableTextSelection(): void
static enableTextSelection(): void
static disableImageDrag(): void
static enableImageDrag(): void
static preventOutline(el: HTMLElement): void
static restoreOutline(): void
static getPosition(el: HTMLElement): Point;
static disableTextSelection(): void;
static enableTextSelection(): void;
static disableImageDrag(): void;
static enableImageDrag(): void;
static preventOutline(el: HTMLElement): void;
static restoreOutline(): void;
}

@@ -159,3 +187,3 @@

ceil(): Point;
distanceTo(otherPoint: PointExpression): Point;
distanceTo(otherPoint: PointExpression): number;
equals(otherPoint: PointExpression): boolean;

@@ -209,3 +237,3 @@ contains(otherPoint: PointExpression): boolean;

*/
export interface Evented extends Class {
export abstract class Evented extends Class {
/**

@@ -217,3 +245,3 @@ * Adds a listener function (fn) to a particular event type of the object.

*/
on(type: string, fn: EventHandlerFn, context?: Object): this;
on(type: string, fn: EventHandlerFn, context?: any): this;

@@ -231,3 +259,3 @@ /**

*/
off(type: string, fn?: EventHandlerFn, context?: Object): this;
off(type: string, fn?: EventHandlerFn, context?: any): this;

@@ -249,3 +277,3 @@ /**

*/
fire(type: string, data?: Object, propagate?: boolean): this;
fire(type: string, data?: any, propagate?: boolean): this;

@@ -260,3 +288,3 @@ /**

*/
once(type: string, fn: EventHandlerFn, context?: Object): this;
once(type: string, fn: EventHandlerFn, context?: any): this;

@@ -286,3 +314,3 @@ /**

*/
addEventListener(type: string, fn: EventHandlerFn, context?: Object): this;
addEventListener(type: string, fn: EventHandlerFn, context?: any): this;

@@ -304,3 +332,3 @@ /**

*/
removeEventListener(type: string, fn: EventHandlerFn, context?: Object): this;
removeEventListener(type: string, fn: EventHandlerFn, context?: any): this;

@@ -326,3 +354,3 @@ /**

*/
addOneTimeEventListener(type: string, fn: EventHandlerFn, context?: Object): this;
addOneTimeEventListener(type: string, fn: EventHandlerFn, context?: any): this;

@@ -343,3 +371,3 @@ /**

*/
fireEvent(type: string, data?: Object, propagate?: boolean): this;
fireEvent(type: string, data?: any, propagate?: boolean): this;

@@ -354,2 +382,17 @@ /**

/**
* A class for making DOM elements draggable (including touch support).
* Used internally for map and marker dragging. Only works for elements
* that were positioned with [`L.DomUtil.setPosition`](#domutil-setposition).
*/
export class Draggable extends Evented {
constructor(element: HTMLElement, dragStartTarget?: HTMLElement, preventOutline?: boolean);
enable(): void;
disable(): void;
finishDrag(): void;
}
interface LayerOptions {

@@ -471,3 +514,3 @@ pane?: string;

export interface WMS extends TileLayer {
setParams(params: Object, noRedraw?: boolean): this;
setParams(params: any, noRedraw?: boolean): this;
}

@@ -492,2 +535,11 @@

setUrl(url: string): this;
/** Update the bounds that this ImageOverlay covers */
setBounds(bounds: LatLngBounds): this;
/** Get the bounds that this ImageOverlay covers */
getBounds(): LatLngBounds;
/** Get the img element that represents the ImageOverlay on the map */
getElement(): HTMLImageElement;
}

@@ -658,3 +710,3 @@

*/
eachLayer(fn: (layer: Layer) => void, context?: Object): this;
eachLayer(fn: (layer: Layer) => void, context?: any): this;

@@ -1084,3 +1136,3 @@ /**

type: string;
target: any; // should this be Object and have users cast?
target: any;
}

@@ -1135,3 +1187,3 @@

layer: Layer;
properties: any; // any or Object?
properties: any;
geometryType: string;

@@ -1154,9 +1206,9 @@ id: string;

export namespace DomEvent {
export function on(el: HTMLElement, types: string, fn: (ev: Event) => any, context?: Object): typeof DomEvent;
export function on(el: HTMLElement, types: string, fn: (ev: Event) => any, context?: any): typeof DomEvent;
export function on(el: HTMLElement, eventMap: {[eventName: string]: Function}, context?: Object): typeof DomEvent;
export function on(el: HTMLElement, eventMap: {[eventName: string]: Function}, context?: any): typeof DomEvent;
export function off(el: HTMLElement, types: string, fn: (ev: Event) => any, context?: Object): typeof DomEvent;
export function off(el: HTMLElement, types: string, fn: (ev: Event) => any, context?: any): typeof DomEvent;
export function off(el: HTMLElement, eventMap: {[eventName: string]: Function}, context?: Object): typeof DomEvent;
export function off(el: HTMLElement, eventMap: {[eventName: string]: Function}, context?: any): typeof DomEvent;

@@ -1177,9 +1229,9 @@ export function stopPropagation(ev: Event): typeof DomEvent;

export function addListener(el: HTMLElement, types: string, fn: (ev: Event) => any, context?: Object): typeof DomEvent;
export function addListener(el: HTMLElement, types: string, fn: (ev: Event) => any, context?: any): typeof DomEvent;
export function addListener(el: HTMLElement, eventMap: {[eventName: string]: Function}, context?: Object): typeof DomEvent;
export function addListener(el: HTMLElement, eventMap: {[eventName: string]: Function}, context?: any): typeof DomEvent;
export function removeListener(el: HTMLElement, types: string, fn: (ev: Event) => any, context?: Object): typeof DomEvent;
export function removeListener(el: HTMLElement, types: string, fn: (ev: Event) => any, context?: any): typeof DomEvent;
export function removeListener(el: HTMLElement, eventMap: {[eventName: string]: Function}, context?: Object): typeof DomEvent;
export function removeListener(el: HTMLElement, eventMap: {[eventName: string]: Function}, context?: any): typeof DomEvent;
}

@@ -1206,3 +1258,3 @@

hasLayer(layer: Layer): boolean;
eachLayer(fn: (layer: Layer) => void, context?: Object): this;
eachLayer(fn: (layer: Layer) => void, context?: any): this;
openPopup(popup: Popup): this;

@@ -1246,3 +1298,3 @@ openPopup(content: string, latlng: LatLngExpression, options?: PopupOptions): this;

getContainer(): HTMLElement;
whenReady(fn: () => void, context?: Object): this;
whenReady(fn: () => void, context?: any): this;

@@ -1317,3 +1369,3 @@ // Methods for getting map state

}
export namespace Icon {

@@ -1320,0 +1372,0 @@ export const Default: IconDefault;

{
"name": "@types/leaflet",
"version": "1.0.39",
"version": "1.0.40",
"description": "TypeScript definitions for Leaflet.js",

@@ -14,6 +14,6 @@ "license": "MIT",

"dependencies": {
"@types/geojson": "*"
"@types/geojson": "0.0.31"
},
"peerDependencies": {},
"typesPublisherContentHash": "991497d9ec82b24419a6014cf321230b9b5792fa39493a0f257915c1175a9992"
"typesPublisherContentHash": "5d00f6bcf648569a45a0fc7833f5153f4240a8e1de7c127e773622fe6b8aa5e5"
}

@@ -8,6 +8,6 @@ # Installation

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/leaflet
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/leaflet
Additional Details
* Last updated: Mon, 12 Dec 2016 22:50:17 GMT
* Last updated: Thu, 15 Dec 2016 16:51:51 GMT
* Library Dependencies: geojson

@@ -14,0 +14,0 @@ * Module Dependencies: none

@@ -13,3 +13,3 @@ {

"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped",
"sourceBranch": "types-2.0",
"sourceBranch": "master",
"globals": [

@@ -24,4 +24,4 @@ "L"

],
"hasPackageJson": false,
"contentHash": "991497d9ec82b24419a6014cf321230b9b5792fa39493a0f257915c1175a9992"
"hasPackageJson": true,
"contentHash": "5d00f6bcf648569a45a0fc7833f5153f4240a8e1de7c127e773622fe6b8aa5e5"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc