# @types/polylabel

> TypeScript definitions for polylabel

Latest version **2.0.0** (published 2026-06-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/polylabel
pnpm add @types/polylabel
yarn add @types/polylabel
bun add @types/polylabel
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2026-06-22 |
| First published | 2016-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51446 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/polylabel
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/polylabel
- npm.io page: https://npm.io/package/@types/polylabel

## Recent versions

- 2.0.0 (latest) — 2026-06-22
- 1.1.3 (ts4.5) — 2023-11-07
- 1.1.0 (ts4.3) — 2023-06-06
- 1.0.5 (ts2.3) — 2017-10-25
- 1.1.2 — 2023-10-18
- 1.1.1 — 2023-09-24
- 1.0.4 — 2017-09-26
- 1.0.3 — 2016-10-05
- 1.0.2 — 2016-09-21
- 1.0.1 — 2016-09-19

## README

# Installation
> `npm install --save @types/polylabel`

# Summary
This package contains type definitions for polylabel (https://github.com/mapbox/polylabel).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/polylabel.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/polylabel/index.d.ts)
````ts
/**
 * Returns the pole of inaccessibility for a polygon — the most distant internal
 * point from the polygon outline — as a `[x, y]` coordinate pair. The
 * `distance` property on the returned array holds the distance from the pole to
 * the nearest polygon edge (the "pole radius").
 *
 * @param polygon - Polygon rings: outer ring first, holes (if any) following.
 *   Each ring is an array of `[x, y]` coordinate pairs.
 * @param precision - Precision of the result in the same units as the polygon
 *   coordinates. Defaults to `1.0`.
 * @param debug - When `true`, logs progress to the console.
 * @example
 * const [x, y] = polylabel(polygon, 1.0);
 */
declare function polylabel(
    polygon: Array<Array<[number, number]>>,
    precision?: number,
    debug?: boolean,
): [number, number] & { distance: number };
declare namespace polylabel {}
export default polylabel;

````

### Additional Details
 * Last updated: Mon, 22 Jun 2026 11:32:25 GMT
 * Dependencies: none

# Credits
These definitions were written by [Denis Carriere](https://github.com/DenisCarriere).

---
_Source: https://npm.io/package/@types/polylabel · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
