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.35 to 1.0.36

48

leaflet/index.d.ts

@@ -6,2 +6,4 @@ // Type definitions for Leaflet.js 1.0.0-rc3

/// <reference types="geojson" />
declare namespace L {

@@ -449,2 +451,3 @@ export interface CRS {

crossOrigin?: boolean;
[name: string]: any;
}

@@ -528,4 +531,3 @@

export interface Polyline extends Path {
toGeoJSON(): Object; // should import GeoJSON typings
interface InternalPolyline extends Path {
getLatLngs(): Array<LatLng>;

@@ -546,2 +548,6 @@ setLatLngs(latlngs: Array<LatLng>): this;

export interface Polyline extends InternalPolyline {
toGeoJSON(): GeoJSON.LineString | GeoJSON.MultiLineString;
}
export function polyline(latlngs: Array<LatLng>, options?: PolylineOptions): Polyline;

@@ -559,4 +565,4 @@

export interface Polygon extends Polyline {
toGeoJSON(): Object; // should import GeoJSON typings
export interface Polygon extends InternalPolyline {
toGeoJSON(): GeoJSON.Polygon | GeoJSON.MultiPolygon;
}

@@ -590,3 +596,3 @@

export interface CircleMarker extends Path {
toGeoJSON(): Object; // should import GeoJSON typings
toGeoJSON(): GeoJSON.Point;
setLatLng(latLng: LatLng): this;

@@ -659,3 +665,3 @@ setLatLng(latLng: LatLngLiteral): this;

*/
toGeoJSON(): Object; // should import GeoJSON typings
toGeoJSON(): GeoJSON.GeometryCollection;

@@ -757,3 +763,3 @@ /**

type StyleFunction = (feature: any) => PathOptions;
type StyleFunction = (feature: GeoJSON.Feature<GeoJSON.GeometryObject>) => PathOptions;

@@ -774,3 +780,3 @@ export interface GeoJSONOptions extends LayerOptions {

*/
pointToLayer?: (geoJsonPoint: Object, latlng: LatLng) => Layer; // should import GeoJSON typings
pointToLayer?: (geoJsonPoint: GeoJSON.Point, latlng: LatLng) => Layer; // should import GeoJSON typings

@@ -789,3 +795,3 @@ /**

*/
style?: (geoJsonFeature: Object) => PathOptions;
style?: StyleFunction;

@@ -802,3 +808,3 @@ /**

*/
onEachFeature?: (feature: Object, layer: Layer) => void;
onEachFeature?: (feature: GeoJSON.Feature<GeoJSON.GeometryObject>, layer: Layer) => void;

@@ -816,3 +822,3 @@ /**

*/
filter?: (geoJsonFeature: Object) => boolean;
filter?: (geoJsonFeature: GeoJSON.Feature<GeoJSON.GeometryObject>) => boolean;

@@ -834,3 +840,3 @@ /**

*/
addData(data: Object): Layer;
addData(data: GeoJSON.GeoJsonObject): Layer;

@@ -846,3 +852,3 @@ /**

*/
setStyle(style: PathOptions | StyleFunction): this;
setStyle(style: StyleFunction): this;

@@ -853,3 +859,3 @@ /**

*/
geometryToLayer(featureData: Object, options?: GeoJSONOptions): Layer;
geometryToLayer(featureData: GeoJSON.Feature<GeoJSON.GeometryObject>, options?: GeoJSONOptions): Layer;

@@ -860,4 +866,6 @@ /**

*/
coordsToLatLng(coords: [number, number] | [number, number, number]): LatLng;
coordsToLatLng(coords: [number, number]): LatLng;
coordsToLatLng(coords: [number, number, number]): LatLng;
/**

@@ -886,3 +894,5 @@ * Creates a multidimensional array of LatLngs from a GeoJSON coordinates array.

*/
asFeature(geojson: Object): Object;
asFeature(geojson: GeoJSON.GeometryObject): GeoJSON.Feature<GeoJSON.GeometryObject>;
asFeature(geojson: GeoJSON.Feature<GeoJSON.GeometryObject>): GeoJSON.Feature<GeoJSON.GeometryObject>;
}

@@ -897,3 +907,3 @@

*/
export function geoJSON(geojson?: Object, options?: GeoJSONOptions): GeoJSON;
export function geoJSON(geojson?: GeoJSON.GeoJsonObject, options?: GeoJSONOptions): GeoJSON;

@@ -1252,4 +1262,4 @@ type Zoom = boolean | 'center';

panBy(offset: PointTuple): this;
setMaxBounds(bounds: Bounds): this; // is this really bounds and not lanlngbounds?
setMaxBounds(bounds: BoundsLiteral): this;
setMaxBounds(bounds: LatLngBounds): this;
setMaxBounds(bounds: LatLngBoundsLiteral): this;
setMinZoom(zoom: number): this;

@@ -1256,0 +1266,0 @@ setMaxZoom(zoom: number): this;

{
"name": "@types/leaflet",
"version": "1.0.35",
"version": "1.0.36",
"description": "TypeScript definitions for Leaflet.js 1.0.0-rc3",

@@ -13,6 +13,8 @@ "license": "MIT",

"scripts": {},
"dependencies": {},
"dependencies": {
"@types/geojson": "*"
},
"peerDependencies": {},
"typings": "index.d.ts",
"typesPublisherContentHash": "28ddaf4f8223fa568b858c235d414ddcc6447bd0acd4e9b4deb624cc67d76c15"
"typesPublisherContentHash": "82b956a8739e064d3e64875ddae404223d5c31961871bf082b06e30be73c5fe6"
}

@@ -11,5 +11,5 @@ # Installation

Additional Details
* Last updated: Wed, 05 Oct 2016 20:53:34 GMT
* Last updated: Wed, 26 Oct 2016 19:23:28 GMT
* File structure: OldUMD
* Library Dependencies: none
* Library Dependencies: geojson
* Module Dependencies: none

@@ -16,0 +16,0 @@ * Global values: L

{
"authors": "Alejandro Sánchez <https://github.com/alejo90>",
"definitionFilename": "index.d.ts",
"libraryDependencies": [],
"libraryDependencies": [
"geojson"
],
"moduleDependencies": [],

@@ -24,3 +26,3 @@ "libraryMajorVersion": "1",

"hasPackageJson": false,
"contentHash": "28ddaf4f8223fa568b858c235d414ddcc6447bd0acd4e9b4deb624cc67d76c15"
"contentHash": "82b956a8739e064d3e64875ddae404223d5c31961871bf082b06e30be73c5fe6"
}
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