diff --git a/types/react-leaflet-markercluster/index.d.ts b/types/react-leaflet-markercluster/index.d.ts new file mode 100644 index 0000000000..5db583d409 --- /dev/null +++ b/types/react-leaflet-markercluster/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for react-leaflet-markercluster 2.0 +// Project: https://github.com/YUzhva/react-leaflet-markercluster +// Definitions by: Adam Binford +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// +import * as Leaflet from 'leaflet'; +import * as ReactLeaflet from 'react-leaflet'; + +export type MarkerClusterGroupProps = ReactLeaflet.MapLayerProps & Leaflet.MarkerClusterGroupOptions; + +export default class MarkerClusterGroup

extends ReactLeaflet.MapLayer

{ } diff --git a/types/react-leaflet-markercluster/react-leaflet-markercluster-tests.tsx b/types/react-leaflet-markercluster/react-leaflet-markercluster-tests.tsx new file mode 100644 index 0000000000..9fc901c527 --- /dev/null +++ b/types/react-leaflet-markercluster/react-leaflet-markercluster-tests.tsx @@ -0,0 +1,30 @@ +import * as React from 'react'; +import * as Leaflet from 'leaflet'; +import MarkerClusterGroup from 'react-leaflet-markercluster'; + +const MarkerCluster = ( + Leaflet.divIcon({ html: `${cluster.getChildCount()}` }) }/> +); diff --git a/types/react-leaflet-markercluster/tsconfig.json b/types/react-leaflet-markercluster/tsconfig.json new file mode 100644 index 0000000000..071c9c734d --- /dev/null +++ b/types/react-leaflet-markercluster/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-leaflet-markercluster-tests.tsx" + ] +} diff --git a/types/react-leaflet-markercluster/tslint.json b/types/react-leaflet-markercluster/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-leaflet-markercluster/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }