Skip to content

Commit

Permalink
Add circle typescript definition #515
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Nov 9, 2016
1 parent ae7750a commit d5e6f16
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions packages/turf-circle/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/// <reference types="geojson" />

/***
* http://turfjs.org/docs/#circle
*/
declare function circle(
center: GeoJSON.Feature<GeoJSON.Point>,
radius: number,
steps?: number,
units?: string): GeoJSON.Feature<GeoJSON.Polygon>;

declare namespace circle { }
export = circle

// import * as circle from './index'

// const center: GeoJSON.Feature<GeoJSON.Point> = {
// type: "Feature",
// properties: {},
// geometry: {type: "Point", coordinates: [-75.343, 39.984]}
// };
// const unit = "kilometers";
// const radius = 5;
// const steps = 10;

// circle(center, radius);
// circle(center, radius, steps);
// circle(center, radius, steps, unit);

0 comments on commit d5e6f16

Please sign in to comment.