mapbox / polylabel

A fast algorithm for finding the pole of inaccessibility of a polygon (in JavaScript and C++)
Other
1.44k stars 151 forks source link

Implemented a Typescript definition #6

Closed DenisCarriere closed 8 years ago

DenisCarriere commented 8 years ago

Please review typescript definition @mourner. Added JSDocs to definition @tmcw must be happy :)

Importing polylabel with Typescript looks like this:

import polylabel = require('polylabel')

It would be nice to define the default module to make it the import look like this.

import polylabel from polylabel
// OR
import * as polylabel from polylabel

The JSDocs outputs pretty well using VS Code or Atom. image

mourner commented 8 years ago

Thanks!